Include and link physfs properly.
[tuxanci.git] / src / client / pauza.c
blob61f80ea6f6c9613c23f7a971f7167f18f68ecdf2
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <assert.h>
5 #include "main.h"
6 #include "list.h"
7 #include "myTimer.h"
9 #include "interface.h"
10 #include "image.h"
11 #include "pauza.h"
12 #include "hotKey.h"
14 static image_t *g_pauza;
15 static bool_t activePauza;
17 static void switchPauzed()
19 if (activePauza == TRUE) {
20 activePauza = FALSE;
21 } else {
22 activePauza = TRUE;
26 static void hotkey_pauze()
28 switchPauzed();
31 void pauza_init()
33 g_pauza = image_add("pauza.png", IMAGE_ALPHA, "pauza", IMAGE_GROUP_USER);
34 activePauza = FALSE;
36 hot_key_register(SDLK_p, hotkey_pauze);
39 void pauza_draw()
41 if (activePauza) {
42 image_draw(g_pauza,
43 WINDOW_SIZE_X / 2 - g_pauza->w / 2,
44 WINDOW_SIZE_Y / 2 - g_pauza->h / 2,
45 0, 0, g_pauza->w, g_pauza->h);
49 void pauza_event()
53 bool_t pauza_is_active()
55 return activePauza;
58 void pauza_quit()
60 hot_key_unregister(SDLK_p);