
Former-commit-id: 43a73a7b2dbb7be398f79f40602e3527d42f0e1a Former-commit-id: d49dd4b7d39d708518a7244f16be37db47027ac7
58 lines
922 B
C
58 lines
922 B
C
#ifndef STRUCTS
|
|
#define STRUCTS
|
|
|
|
#include "defs.h"
|
|
|
|
typedef struct Game
|
|
{
|
|
SDL_Window *window;
|
|
SDL_Renderer *renderer;
|
|
SDL_Texture *texture;
|
|
|
|
TTF_Font *mapFont;
|
|
TTF_Font *mapBoldFont;
|
|
TTF_Font *listFont;
|
|
|
|
TTF_Font *messageFont;
|
|
TTF_Font *labelFont;
|
|
|
|
int mapFontWidth;
|
|
int mapFontHeight;
|
|
int labelFontWidth;
|
|
int labelFontHeight;
|
|
int messageFontWidth;
|
|
int messageFontHeight;
|
|
} Game;
|
|
|
|
Game game;
|
|
|
|
// functions
|
|
|
|
//font.c
|
|
TTF_Font *loadFont(char *, int);
|
|
void closeFont(TTF_Font *);
|
|
void drawString(char *, int, int, TTF_Font *, SDL_Color);
|
|
void drawString90(char *, int, int, TTF_Font *, SDL_Color);
|
|
void drawStringBG(char *, int, int, TTF_Font *, SDL_Color, SDL_Color);
|
|
|
|
//init.c
|
|
void init(char *);
|
|
void cleanup(void);
|
|
|
|
//input.c
|
|
void getInput(void);
|
|
|
|
//mapdata.c
|
|
void initMaps();
|
|
|
|
//list.c
|
|
void drawList(int top);
|
|
|
|
//draw.c
|
|
void draw();
|
|
|
|
//status.c
|
|
void updateStatus();
|
|
void drawStatus();
|
|
|
|
#endif |