2017-10-06 05:25:30 +02:00
|
|
|
#ifndef STRUCTS
|
|
|
|
#define STRUCTS
|
|
|
|
|
2017-09-14 05:21:36 +02:00
|
|
|
#include "defs.h"
|
|
|
|
|
|
|
|
typedef struct Game
|
|
|
|
{
|
2019-09-08 01:11:20 +02:00
|
|
|
SDL_Window *window;
|
|
|
|
SDL_Renderer *renderer;
|
|
|
|
SDL_Texture *texture;
|
2017-10-06 05:25:30 +02:00
|
|
|
|
2019-09-08 01:11:20 +02:00
|
|
|
TTF_Font *mapFont;
|
|
|
|
TTF_Font *mapBoldFont;
|
|
|
|
TTF_Font *listFont;
|
2017-10-06 18:34:36 +02:00
|
|
|
|
2019-09-08 01:11:20 +02:00
|
|
|
TTF_Font *messageFont;
|
|
|
|
TTF_Font *labelFont;
|
2017-10-06 18:34:36 +02:00
|
|
|
|
2017-10-10 22:56:05 +02:00
|
|
|
int mapFontWidth;
|
|
|
|
int mapFontHeight;
|
2017-10-06 18:34:36 +02:00
|
|
|
int labelFontWidth;
|
|
|
|
int labelFontHeight;
|
|
|
|
int messageFontWidth;
|
|
|
|
int messageFontHeight;
|
2017-09-14 05:21:36 +02:00
|
|
|
} Game;
|
2017-09-16 04:25:26 +02:00
|
|
|
|
2017-09-17 17:38:22 +02:00
|
|
|
Game game;
|
|
|
|
|
2017-09-16 04:25:26 +02:00
|
|
|
// functions
|
|
|
|
|
|
|
|
//font.c
|
|
|
|
TTF_Font *loadFont(char *, int);
|
|
|
|
void closeFont(TTF_Font *);
|
|
|
|
void drawString(char *, int, int, TTF_Font *, SDL_Color);
|
2017-10-06 18:34:36 +02:00
|
|
|
void drawString90(char *, int, int, TTF_Font *, SDL_Color);
|
2017-09-17 17:38:22 +02:00
|
|
|
void drawStringBG(char *, int, int, TTF_Font *, SDL_Color, SDL_Color);
|
2017-09-16 04:25:26 +02:00
|
|
|
|
|
|
|
//init.c
|
|
|
|
void init(char *);
|
|
|
|
void cleanup(void);
|
|
|
|
|
|
|
|
//input.c
|
|
|
|
void getInput(void);
|
|
|
|
|
2017-09-17 16:46:48 +02:00
|
|
|
//mapdata.c
|
2017-09-17 17:38:22 +02:00
|
|
|
void initMaps();
|
|
|
|
|
|
|
|
//list.c
|
2019-09-08 21:29:21 +02:00
|
|
|
void drawList(int top);
|
2017-10-05 16:58:23 +02:00
|
|
|
|
|
|
|
//draw.c
|
2017-10-06 05:25:30 +02:00
|
|
|
void draw();
|
|
|
|
|
|
|
|
//status.c
|
|
|
|
void updateStatus();
|
|
|
|
void drawStatus();
|
|
|
|
|
|
|
|
#endif
|