Moving some code around
This commit is contained in:
@ -15,6 +15,9 @@
|
||||
/** How many characters (after the first char) to generate */
|
||||
#define FONT_NUM_CHARS 96
|
||||
|
||||
/** Passed to STBTT for scaling the font nicely */
|
||||
#define FONT_TEXTURE_SIZE 64
|
||||
|
||||
/** Width of the loaded font texture */
|
||||
#define FONT_TEXTURE_WIDTH 512
|
||||
|
||||
@ -26,12 +29,12 @@
|
||||
|
||||
#define FONT_NEWLINE '\n'
|
||||
#define FONT_SPACE ' '
|
||||
#define FONT_LINE_HEIGHT 0.75
|
||||
#define FONT_LINE_HEIGHT FONT_TEXTURE_SIZE*0.75
|
||||
#define FONT_INITIAL_LINE FONT_LINE_HEIGHT*0.75
|
||||
#define FONT_SPACE_SIZE 0.35
|
||||
#define FONT_SPACE_SIZE FONT_TEXTURE_SIZE*0.75
|
||||
#define FONT_SCALE_ADJUST 0.03
|
||||
|
||||
typedef struct {
|
||||
float size;
|
||||
texture_t texture;
|
||||
stbtt_bakedchar characterData[FONT_NUM_CHARS];
|
||||
} font_t;
|
||||
@ -43,6 +46,6 @@ typedef struct {
|
||||
} fonttextinfo_t;
|
||||
|
||||
typedef struct {
|
||||
float width, height;
|
||||
float width, height, scale;
|
||||
stbtt_aligned_quad *quads;
|
||||
} fontmeasure_t;
|
@ -15,6 +15,7 @@
|
||||
#include "../display/shader.h"
|
||||
#include "../display/texture.h"
|
||||
#include "../display/tileset.h"
|
||||
#include "../display/framebuffer.h"
|
||||
|
||||
/** Rounds that the game can be in */
|
||||
#define POKER_ROUND_MATCH 0x00
|
||||
@ -77,6 +78,13 @@ typedef struct {
|
||||
uint32_t roundBet;
|
||||
|
||||
/** Rendering Assets */
|
||||
framebuffer_t frameWorld;
|
||||
framebuffer_t frameGui;
|
||||
font_t font;
|
||||
shader_t shader;
|
||||
camera_t cameraWorld;
|
||||
camera_t cameraGui;
|
||||
|
||||
texture_t dealerTexture;
|
||||
tileset_t dealerTileset;
|
||||
primitive_t dealerPrimitive;
|
||||
@ -91,6 +99,4 @@ typedef struct {
|
||||
tileset_t cardTileset;
|
||||
primitive_t cardPrimitive;
|
||||
|
||||
shader_t shader;
|
||||
camera_t camera;
|
||||
} poker_t;
|
Reference in New Issue
Block a user