summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/minesweeper.h20
-rw-r--r--src/main.c13
2 files changed, 23 insertions, 10 deletions
diff --git a/include/minesweeper.h b/include/minesweeper.h
index 6bc7738..8501195 100644
--- a/include/minesweeper.h
+++ b/include/minesweeper.h
@@ -19,18 +19,18 @@
enum { true = 1, false = 0 };
#endif
-SDL_Surface *scr;
-SDL_Surface *surf_number[9];
-SDL_Surface *bmb_surf;
-SDL_Surface *hidden_surf;
-SDL_Surface *selection_surf;
-SDL_Surface *flag_surf;
-SDL_Surface *wrong_flag;
+extern SDL_Surface *scr;
+extern SDL_Surface *surf_number[9];
+extern SDL_Surface *bmb_surf;
+extern SDL_Surface *hidden_surf;
+extern SDL_Surface *selection_surf;
+extern SDL_Surface *flag_surf;
+extern SDL_Surface *wrong_flag;
-SDL_mutex *mutex;
+extern SDL_mutex *mutex;
-unsigned int discovered;
-unsigned int g_flags;
+extern unsigned int discovered;
+extern unsigned int g_flags;
#define BLOCK_SIZE 30
#define BLOCK_W 30
diff --git a/src/main.c b/src/main.c
index d2ef531..346c130 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,6 +2,19 @@
#define shift_args(argc, argv) *argv++
+SDL_Surface *scr;
+SDL_Surface *surf_number[9];
+SDL_Surface *bmb_surf;
+SDL_Surface *hidden_surf;
+SDL_Surface *selection_surf;
+SDL_Surface *flag_surf;
+SDL_Surface *wrong_flag;
+
+SDL_mutex *mutex;
+
+unsigned int discovered;
+unsigned int g_flags;
+
static void reveal_bombs(map_t *map)
{
SDL_Rect rect;