blob: 80ef26ad5ec868452761b60fd605449c058f9872 (
plain) (
blame)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
--- src/sys.c.orig 2015-03-09 12:48:31 UTC
+++ src/sys.c
@@ -52,6 +52,7 @@ TTF_Font* font = NULL;
SDL_Surface* surface_blocks = NULL;
SDL_Surface* surface_clear = NULL;
SDL_Surface* surface_cursor = NULL;
+SDL_Surface* surface_cursor_highlight = NULL;
SDL_Surface* surface_cursor_single = NULL;
SDL_Surface* surface_bar = NULL;
SDL_Surface* surface_bar_inactive = NULL;
@@ -68,6 +69,7 @@ Mix_Chunk* sound_drop = NULL;
SDL_Joystick* joy = NULL;
int score = 0;
+int high_scores[10];
bool title_screen = true;
bool high_scores_screen = false;
int options_screen = -1;
@@ -77,15 +79,22 @@ bool quit = false;
int game_mode = GAME_MODE_DEFAULT;
+struct Cursor cursor;
+
int action_cooldown = 0;
ActionMove action_move = ACTION_NONE;
ActionMove action_last_move = ACTION_NONE;
-ActionMove action_switch = ACTION_NONE;
+bool action_switch = false;
bool action_bump = false;
bool action_accept = false;
bool action_pause = false;
bool action_exit = false;
+Dork_String path_dir_config;
+Dork_String path_file_config;
+Dork_String path_file_highscores;
+Dork_String path_file_highscores_jewels;
+
int option_joystick = -1;
int option_sound = 8;
int option_music = 8;
@@ -96,8 +105,20 @@ int option_fullscreen = 1;
int option_fullscreen = 0;
#endif
+SDLKey option_key[9];
+int option_joy_button[5];
+int option_joy_axis_x;
+int option_joy_axis_y;
+
SDLKey last_key = SDLK_UNKNOWN;
int last_joy_button = -1;
+
+SDL_Event event;
+
+// Timers
+unsigned int startTimer;
+unsigned int endTimer;
+unsigned int deltaTimer;
bool sysInit() {
if(SDL_Init(SDL_INIT_EVERYTHING) == -1) return false;
|