Skip to content

Commit

Permalink
Merge pull request #45 from BambooSoftware/issue_43
Browse files Browse the repository at this point in the history
Issue 43
  • Loading branch information
michaelplatt07 authored Apr 10, 2017
2 parents 42b0054 + 7e68f68 commit 839527a
Show file tree
Hide file tree
Showing 45 changed files with 133 additions and 118 deletions.
Binary file added Assets/Alphabet/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/C.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/E.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/F.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/G.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/H.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/I.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/J.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/K.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/L.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/M.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/N.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/O.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Alphabet/P.png
Binary file added Assets/Alphabet/Q.png
Binary file added Assets/Alphabet/R.png
Binary file added Assets/Alphabet/S.png
Binary file added Assets/Alphabet/T.png
Binary file added Assets/Alphabet/U.png
Binary file added Assets/Alphabet/V.png
Binary file added Assets/Alphabet/W.png
Binary file added Assets/Alphabet/X.png
Binary file added Assets/Alphabet/Y.png
Binary file added Assets/Alphabet/Z.png
Binary file added Assets/Alphabet/c.png
Binary file added Assets/Alphabet/p.png
Binary file added Assets/Alphabet/s.png
5 changes: 3 additions & 2 deletions Configs/Buffers/buffer_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{ "id" : "grass_top_left_water", "path" : "/Assets/Map/Tiles/Water_Grass/grass_top_left_water.PNG"},
{ "id" : "grass_top_right_water", "path" : "/Assets/Map/Tiles/Water_Grass/grass_top_right_water.PNG"},
{ "id" : "grass_bottom_right_water", "path" : "/Assets/Map/Tiles/Water_Grass/grass_bottom_right_water.PNG"},
{ "id" : "dirt", "path" : "/Assets/Map/Tiles/Water_Grass/dirt.PNG"}
{ "id" : "dirt", "path" : "/Assets/Map/Tiles/Water_Grass/dirt.PNG"},
{ "id" : "alphabet_base", "path" : "/Assets/Alphabet/"}
]
}
}
3 changes: 2 additions & 1 deletion src/main/java/com/bamboo/tloll/Tloll.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ private void init() {
// NOTE(map) : We have this here because it was causing problems having int in drawCurrentScene
// as it reset the current scene to scene 0 every time. Maybe move this elswhere???
WorldMap.getInstance().setCurrentScene(Renderer.loadTileBuffers());
Logger.getInstance().setAlphabetSprites(Renderer.loadAlphabetSprites());
}

private void loop() {
Expand Down Expand Up @@ -99,4 +100,4 @@ private void update() {

}

}
}
3 changes: 3 additions & 0 deletions src/main/java/com/bamboo/tloll/constants/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ private Constants()
public static final float MAX_PLAYER_SPEED_UP = 7.0f;
public static final float MAX_PLAYER_SPEED_DOWN = -7.0f;

public static final int CHARACTER_WIDTH = 13;
public static final int CHARACTER_HEIGHT = 25;

public static final String ALPHABET_BASE = "alphabet_base";
}
36 changes: 22 additions & 14 deletions src/main/java/com/bamboo/tloll/debug/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.bamboo.tloll.graphics.Unit;
import com.bamboo.tloll.graphics.structure.Tile;
import com.bamboo.tloll.graphics.structure.WorldMap;
import com.bamboo.tloll.graphics.Sprite;

import com.bamboo.tloll.collision.CollisionDetector;

Expand All @@ -20,6 +21,9 @@ public class Logger {
private static Logger _instance;
private long fpsLastTime;

// NOTE(map) : This will get moved out eventually once we decide a good place for text rendering.
private Map<Character, Sprite> alphabetSprites;

public static Logger getInstance() {
if (_instance == null) {
_instance = new Logger();
Expand All @@ -29,27 +33,23 @@ public static Logger getInstance() {

private Logger() {
fpsLastTime = 0l;
alphabetSprites = new HashMap<Character, Sprite>();
}

public void displayPlayerInfo(Unit player) {
GraphicsUtil gu = GraphicsUtil.getInstance();


printToWindow(gu, "Player Pos X " + player.getPosX(), 0.0f, 470.0f, false);
printToWindow(gu, "Player Pos Y " + player.getPosY(), 0.0f, 450.0f, false);
printToWindow(gu, "Player Center Coords", 0.0f, 430.0f, false);
printToWindow(gu, "Player Center Coords", 0.0f, 430.0f, false);
printToWindow(gu, "" + player.getCenterX() + " " + player.getCenterY(), 0.0f, 410.0f, false);
printToWindow(gu, "Occupied TIle IDs", 0.0f, 390.0f, false);

printToWindow("Player Pos X " + player.getPosX(), 0.0f, 470.0f);
printToWindow("Player Pos Y " + player.getPosY(), 0.0f, 450.0f);
printToWindow("Player Center Coords", 0.0f, 430.0f);
printToWindow("" + player.getCenterX() + " " + player.getCenterY(), 0.0f, 410.0f);
printToWindow("Occupied TIle IDs", 0.0f, 390.0f);
}

public void displayOccupiedTiles(Unit player) {
GraphicsUtil gu = GraphicsUtil.getInstance();

float yPosForTileInfo = 370.0f;
for (Tile tile : CollisionDetector.getInstance().getOccupiedTiles(player)) {
printToWindow(gu, "" + tile.getTileId(), 0.0f, yPosForTileInfo, false);
printToWindow("" + tile.getTileId(), 0.0f, yPosForTileInfo);
yPosForTileInfo -= 20.0f;
}

Expand All @@ -65,7 +65,7 @@ public void calculateAndDisplayFps() {

private void displayFps(long fps) {
GraphicsUtil gu = GraphicsUtil.getInstance();
printToWindow(gu, "FPS: " + fps, 0.0f, 320.0f, false);
printToWindow("FPS: " + fps, 0.0f, 320.0f);
}


Expand All @@ -84,8 +84,16 @@ public void highlightCurrentTile(Unit player) {
}


public void printToWindow(GraphicsUtil gu, String message, float posX, float posY, boolean leftToRight) {
Renderer.drawString(gu, Constants.USER_DIR, posX, posY, message, leftToRight);
public void printToWindow(String message, float posX, float posY) {
Renderer.drawString(posX, posY, message);
}

public void setAlphabetSprites(Map<Character, Sprite> alphabetSprites)
{
this.alphabetSprites = alphabetSprites;
}
public Map<Character, Sprite> getAlphabetSprites()
{
return alphabetSprites;
}
}
181 changes: 81 additions & 100 deletions src/main/java/com/bamboo/tloll/graphics/Renderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
import com.bamboo.tloll.graphics.structure.WorldMap;
import com.bamboo.tloll.util.BufferMap;

import com.bamboo.tloll.debug.Logger;

import java.util.Map;
import java.util.HashMap;

import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL12.GL_CLAMP_TO_EDGE;
Expand Down Expand Up @@ -58,7 +61,7 @@ public static void drawSpriteAnimation(Sprite unit, int bufferId, int maxFrames,
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, imageWidth, imageHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE,
unit.getBufferMap().get(bufferId).getByteBuffer());
unit.getBufferMap().get(bufferId).getByteBuffer());
glBegin(GL_QUADS);
glTexCoord2f(xValMin, maxHeight);
glVertex3f(unit.getPosX(), unit.getPosY(), 0.0f);
Expand Down Expand Up @@ -105,108 +108,49 @@ public static void drawAnimatedUnit(Unit unit, int bufferId, int colNumber) {
// Method for drawing a string onto the screen. Only draws left to right curently.
// NOTE(map) : There are hard coded values currently because they match with the png file and have
// no need to be changed at the moment. They could be changed later if desired.
public static void drawString(GraphicsUtil gu, String currentDir, float posX, float posY, String message,
boolean leftToRight) {
int imageWidth = 468;
int imageHeight = 25;

public static void drawString(float posX, float posY, String message) {
message = message.toUpperCase();
char[] characters = message.toCharArray();

if (leftToRight) {
Sprite sprite = new Sprite(posX, posY, 13.0f, 25.0f);

int bufferId = 0;
SpriteBuffer spriteBuffer = new SpriteBuffer(gu.loadTexture(currentDir + "/Assets/Images/alphabet_white.png"), imageHeight, imageWidth, 1, 36);
sprite.addBufferToMap(bufferId, spriteBuffer);


for (char character : characters) {
// Setting up the parameters for getting the correct letter from the alphabet.
int numRepOfChar = character - 'A';
float xMin = (1.0f / 36.0f) * (numRepOfChar * 1);
float xMax = (1.0f / 36.0f) * ((numRepOfChar + 1) * 1);
float yMin = 0.0f;
float yMax = 1.0f;

// Doing the actual rendering here.
glBindTexture(GL_TEXTURE_2D, bufferId);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, imageWidth, imageHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE,
sprite.getBufferMap().get(bufferId).getByteBuffer());
glBegin(GL_QUADS);
glTexCoord2f(xMin, yMax);
glVertex3f(sprite.getPosX(), sprite.getPosY(), 0.0f);
glTexCoord2f(xMax, yMax);
glVertex3f(sprite.getPosX() + sprite.getWidth(), sprite.getPosY(), 0.0f);
glTexCoord2f(xMax, yMin);
glVertex3f(sprite.getPosX() + sprite.getWidth(), sprite.getPosY() + sprite.getHeight(), 0.0f);
glTexCoord2f(xMin, yMin);
glVertex3f(sprite.getPosX(), sprite.getPosY() + sprite.getHeight(), 0.0f);
glEnd();
sprite.setPosX(sprite.getPosX() + sprite.getWidth());
;
}
} else {
// NOTE(map) : This need - 13 px because that's the width of single square we
// need to go back for the first box to be drawn.
float leftJustifiedPosX = Constants.WIDTH - 13;
Sprite sprite = new Sprite(leftJustifiedPosX, posY, 13.0f, 25.0f);

int bufferId = 0;
SpriteBuffer spriteBuffer = new SpriteBuffer(gu.loadTexture(currentDir + "/Assets/Images/alphabet_white.png"), imageHeight, imageWidth, 1, 36);
sprite.addBufferToMap(bufferId, spriteBuffer);


for (int i = characters.length - 1; i > -1; i--) {
// Setting up the parameters for getting the correct letter from the alphabet.
if (characters[i] == '.') {
characters[i] = ' ';
}
if (characters[i] == 'f') {
characters[i] = 'F';
}

int numRepOfChar = characters[i] - 'A';
if (numRepOfChar < -7 && numRepOfChar > -19) {
int number = Character.getNumericValue(characters[i]);
if (number == 0)
number = 10;
numRepOfChar = 'Z' - 'A' + number;
}
float xMin = (1.0f / 36.0f) * (numRepOfChar * 1);
float xMax = (1.0f / 36.0f) * ((numRepOfChar + 1) * 1);
float yMin = 0.0f;
float yMax = 1.0f;

// Doing the actual rendering here.
glBindTexture(GL_TEXTURE_2D, bufferId);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, imageWidth, imageHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE,
sprite.getBufferMap().get(bufferId).getByteBuffer());
glBegin(GL_QUADS);
glTexCoord2f(xMin, yMax);
glVertex3f(sprite.getPosX(), sprite.getPosY(), 0.0f);
glTexCoord2f(xMax, yMax);
glVertex3f(sprite.getPosX() + sprite.getWidth(), sprite.getPosY(), 0.0f);
glTexCoord2f(xMax, yMin);
glVertex3f(sprite.getPosX() + sprite.getWidth(), sprite.getPosY() + sprite.getHeight(), 0.0f);
glTexCoord2f(xMin, yMin);
glVertex3f(sprite.getPosX(), sprite.getPosY() + sprite.getHeight(), 0.0f);
glEnd();
sprite.setPosX(sprite.getPosX() - sprite.getWidth());

}
// NOTE(map) : This need - 13 px because that's the width of single square we
// need to go back for the first box to be drawn.
float leftJustifiedPosX = Constants.WIDTH - 13;
Sprite sprite = new Sprite(leftJustifiedPosX, posY, 13.0f, 25.0f);

for (int i = characters.length - 1; i > -1; i--) {
// Setting up the parameters for getting the correct letter from the alphabet.
if (characters[i] == '.') {
characters[i] = 'p';
}
else if (characters[i] == ' ')
{
characters[i] = 's';
}
else if (characters[i] == ':')
{
characters[i] = 'c';
}

// Doing the actual rendering here.
glBindTexture(GL_TEXTURE_2D, 0);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, Constants.CHARACTER_WIDTH, Constants.CHARACTER_HEIGHT, 0, GL_RGBA, GL_UNSIGNED_BYTE, Logger.getInstance().getAlphabetSprites().get(characters[i]).getBufferMap().get(0).getByteBuffer());
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 1.0f);
glVertex3f(sprite.getPosX(), sprite.getPosY(), 0.0f);
glTexCoord2f(1.0f, 1.0f);
glVertex3f(sprite.getPosX() + sprite.getWidth(), sprite.getPosY(), 0.0f);
glTexCoord2f(1.0f, 0.0f);
glVertex3f(sprite.getPosX() + sprite.getWidth(), sprite.getPosY() + sprite.getHeight(), 0.0f);
glTexCoord2f(0.0f, 0.0f);
glVertex3f(sprite.getPosX(), sprite.getPosY() + sprite.getHeight(), 0.0f);
glEnd();
sprite.setPosX(sprite.getPosX() - sprite.getWidth());
}
}

Expand Down Expand Up @@ -234,5 +178,42 @@ public static void loadTileBuffers(Scene scene) {
}
}

public static Map<Character, Sprite> loadAlphabetSprites()
{
Map<Character, Sprite> alphabetSprites = new HashMap<Character, Sprite>();
for (char i = 'A'; i <= 'Z'; ++i)
{
SpriteBuffer spriteBuffer = BufferMap.getInstance().getSpriteBuffer(Constants.ALPHABET_BASE, Constants.CHARACTER_WIDTH, Constants.CHARACTER_HEIGHT, i);
Sprite alphabetSprite = new Sprite();
alphabetSprite.getBufferMap().put(0, spriteBuffer);
alphabetSprites.put(i, alphabetSprite);
}

for (char i = '0'; i <= '9'; ++i)
{
SpriteBuffer spriteBuffer = BufferMap.getInstance().getSpriteBuffer(Constants.ALPHABET_BASE, Constants.CHARACTER_WIDTH, Constants.CHARACTER_HEIGHT, i);
Sprite alphabetSprite = new Sprite();
alphabetSprite.getBufferMap().put(0, spriteBuffer);
alphabetSprites.put(i, alphabetSprite);
}

SpriteBuffer spaceSBuffer = BufferMap.getInstance().getSpriteBuffer(Constants.ALPHABET_BASE, Constants.CHARACTER_WIDTH, Constants.CHARACTER_HEIGHT, 's');
Sprite spaceSprite = new Sprite();
spaceSprite.getBufferMap().put(0, spaceSBuffer);
alphabetSprites.put('s', spaceSprite);

SpriteBuffer colonSBuffer = BufferMap.getInstance().getSpriteBuffer(Constants.ALPHABET_BASE, Constants.CHARACTER_WIDTH, Constants.CHARACTER_HEIGHT, 'c');
Sprite colonSprite = new Sprite();
colonSprite.getBufferMap().put(0, colonSBuffer);
alphabetSprites.put('c', colonSprite);

SpriteBuffer periodSBuffer = BufferMap.getInstance().getSpriteBuffer(Constants.ALPHABET_BASE, Constants.CHARACTER_WIDTH, Constants.CHARACTER_HEIGHT, 'p');
Sprite periodSprite = new Sprite();
periodSprite.getBufferMap().put(0, periodSBuffer);
alphabetSprites.put('p', periodSprite);

return alphabetSprites;
}


}
23 changes: 22 additions & 1 deletion src/main/java/com/bamboo/tloll/util/BufferMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,32 @@ public SpriteBuffer getSpriteBuffer(String id) {
return idToSpriteBufferMap.get(id);
}

public SpriteBuffer getSpriteBuffer(String id, int width, int height) {
GraphicsUtil gu = GraphicsUtil.getInstance();
if(idToSpriteBufferMap.get(id) == null) {
System.out.println(Constants.USER_DIR + idToPathBufferMap.get(id));
SpriteBuffer sBuffer = new SpriteBuffer(gu.loadTexture(Constants.USER_DIR + idToPathBufferMap.get(id)), height, width);
idToSpriteBufferMap.put(id, sBuffer);
}

return idToSpriteBufferMap.get(id);
}

public SpriteBuffer getSpriteBuffer(String id, int width, int height, char aChar) {
GraphicsUtil gu = GraphicsUtil.getInstance();
if(idToSpriteBufferMap.get(String.valueOf(aChar)) == null) {
SpriteBuffer sBuffer = new SpriteBuffer(gu.loadTexture(Constants.USER_DIR + idToPathBufferMap.get(id) + aChar + ".png"), height, width);
idToSpriteBufferMap.put(String.valueOf(aChar), sBuffer);
}

return idToSpriteBufferMap.get(String.valueOf(aChar));
}

public void unloadAllBuffers() {
idToSpriteBufferMap = new HashMap<>();
}

public void unloadBuffer(String id) {
idToSpriteBufferMap.remove(id);
}
}
}

0 comments on commit 839527a

Please sign in to comment.