aboutsummaryrefslogtreecommitdiff
path: root/sources/globals.c
blob: 4d9597d980c6130acbbdcf9d2eeaad4e10fdcc84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "TZR.h"
#include <stddef.h>
#include <SDL2/SDL_render.h>
#include <SDL2/SDL_scancode.h>
#include <SDL2/SDL_gamecontroller.h>

TZR_Config ___tzr_config = {0};
TZR_Color ___tzr_color = {0.0f, 0.0f, 0.0f, 0.0f, 1.0f};
TZR_Resource *___tzr_resources = NULL;
size_t ___tzr_resources_capacity = 0;
size_t ___tzr_resources_size = 0;
SDL_Window *___tzr_window = NULL;
SDL_Renderer *___tzr_renderer = NULL;
SDL_Texture *___tzr_target = NULL;
SDL_Texture *___tzr_target_pre = NULL;
unsigned long ___tzr_tick = 0;
unsigned long ___tzr_next_time = 0;
unsigned long ___tzr_min_dt = 0;
int ___tzr_should_quit = 0;
int ___tzr_mouse_x = 0;
int ___tzr_mouse_y = 0;
TZR_KeyState ___tzr_keystates[SDL_NUM_SCANCODES] = {0};
TZR_KeyState ___tzr_mousestates[256] = {0}; //doc says than mouse button is u8
TZR_KeyState ___tzr_joystates[SDL_CONTROLLER_BUTTON_MAX] = {0};
float ___tzr_scale = 1.0;
int ___tzr_off_x = 1.0;
int ___tzr_off_y = 1.0;
Mix_Music *___tzr_music = NULL;
TZR_Joystick *___tzr_joysticks = NULL;
size_t ___tzr_joysticks_capacity = 0;
size_t ___tzr_joysticks_size = 0;
SDL_BlendMode ___tzr_blendmode = SDL_BLENDMODE_BLEND;
int ___tzr_camera_x = 0;
int ___tzr_camera_y = 0;
SDL_GLContext ___tzr_gl_ctx = NULL;
int ___tzr_scroll_x = 0;
int ___tzr_scroll_y = 0;

#ifdef TZR_SOLOUD
Soloud ___tzr_soloud = NULL;
#endif