kettek2/wiki/games/newsboy/Newsboy_0x00/engine/globals.h

71 lines
1.4 KiB
C

#ifndef GLOBAL
#define GLOBAL
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include "Text.h"
#include "PTime.h"
#include "report.h"
#define TITLE "Newsboy"
#define MAP_DIR "maps/"
#define MAP_EXT ".nbm"
#define GFX_DIR "gfx/"
#define GFX_EXT ".png"
#define ANIM_DIR "gfx/"
#define ANIM_EXT ".nba"
#define DECOR_DIR "decor/"
#define DECOR_EXT ".nbd"
#define MUSIC_DIR "music/"
#define MUSIC_EXT ".ogg"
#define SFX_DIR "sfx/"
#define SFX_EXT ".wav"
#define ENT_DIR "entities/"
#define ENT_EXT ".nbe"
// render globals - why not.
SDL_Window *g_window;
//SDL_Renderer *g_renderer;
SDL_GLContext g_context;
// fontz
TTF_Font *g_header_font;
TTF_Font *g_large_font;
TTF_Font *g_medium_font;
TTF_Font *g_small_font;
struct Glyphs g_header_glyphs;
struct Glyphs g_large_glyphs;
struct Glyphs g_medium_glyphs;
struct Glyphs g_small_glyphs;
struct Ui_Colors *ui_colors;
struct Ui_Colors *message_colors;
struct Ui_Colors *hint_colors;
struct Ui_Colors *button_colors;
int g_running;
int g_v_width;
int g_v_height;
int g_v_framecap;
int g_v_vsync;
float g_v_zoom;
int g_tile_w;
int g_tile_h;
struct PTime g_delta;
struct PTime g_tickrate;
struct PTime accumulator;
struct PTime current_time;
struct PTime last_time;
struct StateManager *g_state_manager;
struct ResourceManager *g_resource_manager;
struct Resources *g_sprites;
struct Resources *g_animdata;
struct Resources *g_music;
struct Resources *g_sound;
#endif