Added frame buffer support.

This commit is contained in:
2021-05-05 07:37:25 -07:00
parent 469750b0a0
commit c3244274ce
10 changed files with 168 additions and 44 deletions

View File

@ -11,7 +11,28 @@
#define FONT_CHAR_START 33
/**
* Get the division for a given character.
*
* @param tileset Tileset to get the division from.
* @param character Character to get the division for.
* @return The division from the tileset for the character.
*/
tilesetdiv_t * fontGetCharacterDivision(tileset_t *tileset, char character);
/**
* Renders a set of font characters to the sprite. Coordinates are anchored to
* the top left (0,0) origin.
*
* @param batch Sprite Batch to render to.
* @param tileset Tileset for the font.
* @param string String to render.
* @param x Position in X space.
* @param y Position in Y space.
* @param z Position in Z space.
* @param charWidth Width of each character.
* @param charHeight Height of each character.
*/
void fontSpriteBatchBuffer(spritebatch_t *batch, tileset_t *tileset,
char *string, float x, float y, float z, float charWidth, float charHeight
);