View | Details | Raw Unified | Return to bug 253722
Collapse All | Expand All

(-)Makefile (-3 lines)
Lines 12-20 Link Here
12
LICENSE=	GPLv3
12
LICENSE=	GPLv3
13
LICENSE_FILE=	${WRKSRC}/COPYING
13
LICENSE_FILE=	${WRKSRC}/COPYING
14
14
15
BROKEN_FreeBSD_13=	ld: error: duplicate symbol: BLOCK_MOVE_SPEED
16
BROKEN_FreeBSD_14=	ld: error: duplicate symbol: BLOCK_MOVE_SPEED
17
18
USE_GITHUB=	yes
15
USE_GITHUB=	yes
19
GH_ACCOUNT=	dorkster
16
GH_ACCOUNT=	dorkster
20
17
(-)files/patch-src_block.c (+32 lines)
Line 0 Link Here
1
--- src/block.c.orig	2015-03-09 12:48:31 UTC
2
+++ src/block.c
3
@@ -23,8 +23,28 @@ const int POINTS_PER_BLOCK = 10;
4
 const int POINTS_PER_BUMP = 5;
5
 const int POINTS_PER_COMBO_BLOCK = 15;
6
 
7
-int speed_init = 1;
8
+int ROWS;
9
+int COLS;
10
+int NUM_BLOCKS;
11
+int START_ROWS;
12
+int DISABLED_ROWS;
13
+int CURSOR_MAX_X;
14
+int CURSOR_MIN_Y;
15
+int CURSOR_MAX_Y;
16
+int BLOCK_MOVE_SPEED;
17
+int DRAW_OFFSET_X;
18
+int DRAW_OFFSET_Y;
19
+
20
 Block **blocks = NULL;
21
+int speed_init = 1;
22
+
23
+bool animating;
24
+int bump_timer;
25
+int bump_pixels;
26
+int speed;
27
+int speed_timer;
28
+int game_over_timer;
29
+bool jewels_cursor_select;
30
 
31
 int blockRand(void) {
32
     return rand() % NUM_BLOCKS;
(-)files/patch-src_block.h (+63 lines)
Line 0 Link Here
1
--- src/block.h.orig	2015-03-09 12:48:31 UTC
2
+++ src/block.h
3
@@ -33,21 +33,21 @@
4
 #define SPEED_TIME 1800 / (60/FPS)
5
 #define MAX_SPEED 25
6
 
7
-const int POINTS_PER_BLOCK;
8
-const int POINTS_PER_BUMP;
9
-const int POINTS_PER_COMBO_BLOCK;
10
+extern const int POINTS_PER_BLOCK;
11
+extern const int POINTS_PER_BUMP;
12
+extern const int POINTS_PER_COMBO_BLOCK;
13
 
14
-int ROWS;
15
-int COLS;
16
-int NUM_BLOCKS;
17
-int START_ROWS;
18
-int DISABLED_ROWS;
19
-int CURSOR_MAX_X;
20
-int CURSOR_MIN_Y;
21
-int CURSOR_MAX_Y;
22
-int BLOCK_MOVE_SPEED;
23
-int DRAW_OFFSET_X;
24
-int DRAW_OFFSET_Y;
25
+extern int ROWS;
26
+extern int COLS;
27
+extern int NUM_BLOCKS;
28
+extern int START_ROWS;
29
+extern int DISABLED_ROWS;
30
+extern int CURSOR_MAX_X;
31
+extern int CURSOR_MIN_Y;
32
+extern int CURSOR_MAX_Y;
33
+extern int BLOCK_MOVE_SPEED;
34
+extern int DRAW_OFFSET_X;
35
+extern int DRAW_OFFSET_Y;
36
 
37
 typedef struct Block{
38
     int x,y;
39
@@ -62,15 +62,15 @@ typedef struct Block{
40
     bool sound_after_move;
41
 }Block;
42
 
43
-Block **blocks;
44
-bool animating;
45
-int bump_timer;
46
-int bump_pixels;
47
-int speed;
48
-int speed_init;
49
-int speed_timer;
50
-int game_over_timer;
51
-bool jewels_cursor_select;
52
+extern Block **blocks;
53
+extern bool animating;
54
+extern int bump_timer;
55
+extern int bump_pixels;
56
+extern int speed;
57
+extern int speed_init;
58
+extern int speed_timer;
59
+extern int game_over_timer;
60
+extern bool jewels_cursor_select;
61
 
62
 void blockSet(int i, int j, bool alive, int color);
63
 void blockClear(int i, int j);
(-)files/patch-src_game.c (+13 lines)
Line 0 Link Here
1
--- src/game.c.orig	2015-03-09 12:48:31 UTC
2
+++ src/game.c
3
@@ -23,6 +23,10 @@
4
 #include "menu.h"
5
 #include "sys.h"
6
 
7
+bool cursor_moving;
8
+int cursor_timer;
9
+int rebind_index;
10
+
11
 void gameTitle() {
12
     title_screen = true;
13
     high_scores_screen = false;
(-)files/patch-src_game.h (+15 lines)
Line 0 Link Here
1
--- src/game.h.orig	2015-03-09 12:48:31 UTC
2
+++ src/game.h
3
@@ -21,9 +21,9 @@
4
 
5
 #include "sys.h"
6
 
7
-bool cursor_moving;
8
-int cursor_timer;
9
-int rebind_index;
10
+extern bool cursor_moving;
11
+extern int cursor_timer;
12
+extern int rebind_index;
13
 
14
 void gameTitle();
15
 void gameHighScores();
(-)files/patch-src_menu.h (+15 lines)
Line 0 Link Here
1
--- src/menu.h.orig	2015-03-09 12:48:31 UTC
2
+++ src/menu.h
3
@@ -37,9 +37,9 @@ typedef struct {
4
     bool has_action;
5
 }MenuItem;
6
 
7
-MenuItem** menu_items;
8
-int menu_option;
9
-int menu_size;
10
+extern MenuItem** menu_items;
11
+extern int menu_option;
12
+extern int menu_size;
13
 
14
 void menuItemUpdate(int i);
15
 char* menuItemGetText(int i);
(-)files/patch-src_sys.c (+63 lines)
Line 0 Link Here
1
--- src/sys.c.orig	2015-03-09 12:48:31 UTC
2
+++ src/sys.c
3
@@ -52,6 +52,7 @@ TTF_Font* font = NULL;
4
 SDL_Surface* surface_blocks = NULL;
5
 SDL_Surface* surface_clear = NULL;
6
 SDL_Surface* surface_cursor = NULL;
7
+SDL_Surface* surface_cursor_highlight = NULL;
8
 SDL_Surface* surface_cursor_single = NULL;
9
 SDL_Surface* surface_bar = NULL;
10
 SDL_Surface* surface_bar_inactive = NULL;
11
@@ -68,6 +69,7 @@ Mix_Chunk* sound_drop = NULL;
12
 SDL_Joystick* joy = NULL;
13
 
14
 int score = 0;
15
+int high_scores[10];
16
 bool title_screen = true;
17
 bool high_scores_screen = false;
18
 int options_screen = -1;
19
@@ -77,15 +79,22 @@ bool quit = false;
20
 
21
 int game_mode = GAME_MODE_DEFAULT;
22
 
23
+struct Cursor cursor;
24
+
25
 int action_cooldown = 0;
26
 ActionMove action_move = ACTION_NONE;
27
 ActionMove action_last_move = ACTION_NONE;
28
-ActionMove action_switch = ACTION_NONE;
29
+bool action_switch = false;
30
 bool action_bump = false;
31
 bool action_accept = false;
32
 bool action_pause = false;
33
 bool action_exit = false;
34
 
35
+Dork_String path_dir_config;
36
+Dork_String path_file_config;
37
+Dork_String path_file_highscores;
38
+Dork_String path_file_highscores_jewels;
39
+
40
 int option_joystick = -1;
41
 int option_sound = 8;
42
 int option_music = 8;
43
@@ -96,8 +105,20 @@ int option_fullscreen = 1;
44
 int option_fullscreen = 0;
45
 #endif
46
 
47
+SDLKey option_key[9];
48
+int option_joy_button[5];
49
+int option_joy_axis_x;
50
+int option_joy_axis_y;
51
+
52
 SDLKey last_key = SDLK_UNKNOWN;
53
 int last_joy_button = -1;
54
+
55
+SDL_Event event;
56
+
57
+// Timers
58
+unsigned int startTimer;
59
+unsigned int endTimer;
60
+unsigned int deltaTimer;
61
 
62
 bool sysInit() {
63
     if(SDL_Init(SDL_INIT_EVERYTHING) == -1) return false;
(-)files/patch-src_sys.h (+148 lines)
Line 0 Link Here
1
--- src/sys.h.orig	2015-03-09 12:48:31 UTC
2
+++ src/sys.h
3
@@ -99,62 +99,63 @@ enum KEYBINDS {
4
 
5
 extern const char* const key_desc[];
6
 
7
-SDL_Surface* screen;
8
-TTF_Font* font;
9
+extern SDL_Surface* screen;
10
+extern TTF_Font* font;
11
 
12
-int score;
13
-int high_scores[10];
14
-bool title_screen;
15
-bool high_scores_screen;
16
-int options_screen;
17
-bool game_over;
18
-bool paused;
19
-bool quit;
20
-int game_mode;
21
+extern int score;
22
+extern int high_scores[10];
23
+extern bool title_screen;
24
+extern bool high_scores_screen;
25
+extern int options_screen;
26
+extern bool game_over;
27
+extern bool paused;
28
+extern bool quit;
29
+extern int game_mode;
30
 
31
 struct Cursor {
32
     int x1;
33
     int y1;
34
     int x2;
35
     int y2;
36
-}cursor;
37
+};
38
+extern struct Cursor cursor;
39
 
40
-int action_cooldown;
41
+extern int action_cooldown;
42
 typedef enum {
43
     ACTION_NONE, ACTION_LEFT, ACTION_RIGHT, ACTION_UP, ACTION_DOWN
44
 }ActionMove;
45
-ActionMove action_move;
46
-ActionMove action_last_move;
47
-ActionMove action_switch;
48
-bool action_bump;
49
-bool action_accept;
50
-bool action_pause;
51
-bool action_exit;
52
+extern ActionMove action_move;
53
+extern ActionMove action_last_move;
54
+extern bool action_switch;
55
+extern bool action_bump;
56
+extern bool action_accept;
57
+extern bool action_pause;
58
+extern bool action_exit;
59
 
60
-Dork_String path_dir_config;
61
-Dork_String path_file_config;
62
-Dork_String path_file_highscores;
63
-Dork_String path_file_highscores_jewels;
64
+extern Dork_String path_dir_config;
65
+extern Dork_String path_file_config;
66
+extern Dork_String path_file_highscores;
67
+extern Dork_String path_file_highscores_jewels;
68
 
69
-int option_joystick;
70
-int option_sound;
71
-int option_music;
72
-int option_fullscreen;
73
+extern int option_joystick;
74
+extern int option_sound;
75
+extern int option_music;
76
+extern int option_fullscreen;
77
 
78
-SDLKey option_key[9];
79
-int option_joy_button[5];
80
-int option_joy_axis_x;
81
-int option_joy_axis_y;
82
+extern SDLKey option_key[9];
83
+extern int option_joy_button[5];
84
+extern int option_joy_axis_x;
85
+extern int option_joy_axis_y;
86
 
87
-SDLKey last_key;
88
-int last_joy_button;
89
+extern SDLKey last_key;
90
+extern int last_joy_button;
91
 
92
-SDL_Event event;
93
+extern SDL_Event event;
94
 
95
 // Timers
96
-unsigned int startTimer;
97
-unsigned int endTimer;
98
-unsigned int deltaTimer;
99
+extern unsigned int startTimer;
100
+extern unsigned int endTimer;
101
+extern unsigned int deltaTimer;
102
 
103
 // Functions
104
 bool sysInit();
105
@@ -176,26 +177,26 @@ void sysHighScoresSave();
106
 void sysHighScoresClear();
107
 
108
 // Images
109
-SDL_Surface* surface_blocks;
110
-SDL_Surface* surface_clear;
111
-SDL_Surface* surface_cursor;
112
-SDL_Surface* surface_cursor_highlight;
113
-SDL_Surface* surface_bar;
114
-SDL_Surface* surface_bar_inactive;
115
-SDL_Surface* surface_background;
116
-SDL_Surface* surface_background_jewels;
117
-SDL_Surface* surface_title;
118
-SDL_Surface* surface_highscores;
119
+extern SDL_Surface* surface_blocks;
120
+extern SDL_Surface* surface_clear;
121
+extern SDL_Surface* surface_cursor;
122
+extern SDL_Surface* surface_cursor_highlight;
123
+extern SDL_Surface* surface_bar;
124
+extern SDL_Surface* surface_bar_inactive;
125
+extern SDL_Surface* surface_background;
126
+extern SDL_Surface* surface_background_jewels;
127
+extern SDL_Surface* surface_title;
128
+extern SDL_Surface* surface_highscores;
129
 
130
 // Music and Sounds
131
-Mix_Music* music;
132
-Mix_Music* music_jewels;
133
-Mix_Chunk* sound_menu;
134
-Mix_Chunk* sound_switch;
135
-Mix_Chunk* sound_match;
136
-Mix_Chunk* sound_drop;
137
+extern Mix_Music* music;
138
+extern Mix_Music* music_jewels;
139
+extern Mix_Chunk* sound_menu;
140
+extern Mix_Chunk* sound_switch;
141
+extern Mix_Chunk* sound_match;
142
+extern Mix_Chunk* sound_drop;
143
 
144
 // Joystick
145
-SDL_Joystick* joy;
146
+extern SDL_Joystick* joy;
147
 
148
 #endif

Return to bug 253722