63 lines
1.6 KiB
C
63 lines
1.6 KiB
C
#ifndef GLOBALS_H
|
|
#define GLOBALS_H
|
|
#include "ts_event.h"
|
|
#include "states/state_menu.h"
|
|
#include "states/state_modules.h"
|
|
#include "../common/data.h"
|
|
#include "../common/llist.h"
|
|
#include "sdl/spritesheets.h"
|
|
#include "timer.h"
|
|
|
|
struct Table *g_settings;
|
|
|
|
int g_running;
|
|
|
|
struct LList *g_modules_list;
|
|
|
|
/* video-related globals */
|
|
void *g_screen; // void pointer for SDL_Surface or others, set by interface
|
|
int g_video_width;
|
|
int g_video_height;
|
|
int g_video_fullscreen; // 0 = windowed, 1 = fullscreen
|
|
|
|
/* timer and physics related globals */
|
|
struct PTime g_tick_time;
|
|
|
|
/* function pointers */
|
|
int g_switch_state;
|
|
void (*g_initState)();
|
|
void (*g_freeState)();
|
|
void (*g_handleState)(struct TSEvent);
|
|
void (*g_processState)(int delta);
|
|
void (*g_renderState)();
|
|
|
|
void (*g_r_setupElement)(struct Element *element);
|
|
void (*g_r_cleanElement)(struct Element *element);
|
|
|
|
/* drawing function pointers */
|
|
void (*g_r_Init)();
|
|
void (*g_r_Reinit)();
|
|
void (*g_r_Close)();
|
|
int (*g_loadSpritesheet)(struct Spritesheet *spritesheet, char *file_name, int width, int height, int columns);
|
|
void (*g_setSpritesheetScale)(struct Spritesheet *spritesheet, float scale_x, float scale_y);
|
|
void (*g_renderElements)(struct ElementList *list);
|
|
void (*g_renderElement)(struct Element *element);
|
|
void (*g_renderSprite)(struct Spritesheet *sheet, void *surface, int id, int x, int y);
|
|
void (*g_renderScreen)();
|
|
void (*g_clearScreen)();
|
|
|
|
void *g_font_large;
|
|
void *g_font_medium;
|
|
|
|
//struct Font *g_font_large;
|
|
//struct Font *g_font_medium;
|
|
|
|
void *menu_bg;
|
|
|
|
/* module data */
|
|
struct Table *g_module_conf;
|
|
struct Spritesheet **g_module_spritesheets;
|
|
struct Data *g_tile_data;
|
|
|
|
#endif
|