diff options
Diffstat (limited to 'apps/plugins/xrick/game.h')
-rw-r--r-- | apps/plugins/xrick/game.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/apps/plugins/xrick/game.h b/apps/plugins/xrick/game.h new file mode 100644 index 0000000000..025c3bdbe2 --- /dev/null +++ b/apps/plugins/xrick/game.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | * xrick/game.h | ||
3 | * | ||
4 | * Copyright (C) 1998-2002 BigOrno (bigorno@bigorno.net). | ||
5 | * Copyright (C) 2008-2014 Pierluigi Vicinanza. | ||
6 | * All rights reserved. | ||
7 | * | ||
8 | * The use and distribution terms for this software are contained in the file | ||
9 | * named README, which can be found in the root of this distribution. By | ||
10 | * using this software in any fashion, you are agreeing to be bound by the | ||
11 | * terms of this license. | ||
12 | * | ||
13 | * You must not remove this notice, or any other, from this software. | ||
14 | */ | ||
15 | |||
16 | #ifndef _GAME_H | ||
17 | #define _GAME_H | ||
18 | |||
19 | #include "xrick/config.h" | ||
20 | #include "xrick/rects.h" | ||
21 | #ifdef ENABLE_SOUND | ||
22 | #include "xrick/data/sounds.h" | ||
23 | #endif | ||
24 | |||
25 | #include <stddef.h> /* NULL */ | ||
26 | |||
27 | #define LEFT 1 | ||
28 | #define RIGHT 0 | ||
29 | |||
30 | #define GAME_PERIOD 40 | ||
31 | |||
32 | #define GAME_BOMBS_INIT 6 | ||
33 | #define GAME_BULLETS_INIT 6 | ||
34 | |||
35 | extern U8 game_lives; /* lives counter */ | ||
36 | extern U8 game_bombs; /* bombs counter */ | ||
37 | extern U8 game_bullets; /* bullets counter */ | ||
38 | |||
39 | extern U32 game_score; /* score */ | ||
40 | |||
41 | extern U16 game_map; /* current map */ | ||
42 | extern U16 game_submap; /* current submap */ | ||
43 | |||
44 | extern U8 game_dir; /* direction (LEFT, RIGHT) */ | ||
45 | extern bool game_chsm; /* change submap request (true, false) */ | ||
46 | |||
47 | extern bool game_waitevt; /* wait for events (true, false) */ | ||
48 | extern U8 game_period; /* time between each frame, in millisecond */ | ||
49 | |||
50 | extern const rect_t *game_rects; /* rectangles to redraw at each frame */ | ||
51 | |||
52 | extern void game_run(void); | ||
53 | #ifdef ENABLE_SOUND | ||
54 | extern void game_setmusic(sound_t * sound, S8 loop); | ||
55 | extern void game_stopmusic(void); | ||
56 | #endif /* ENABLE_SOUND */ | ||
57 | |||
58 | #ifdef ENABLE_CHEATS | ||
59 | typedef enum | ||
60 | { | ||
61 | Cheat_UNLIMITED_ALL, | ||
62 | Cheat_NEVER_DIE, | ||
63 | Cheat_EXPOSE | ||
64 | } cheat_t; | ||
65 | extern bool game_cheat1; /* infinite lives, bombs and bullets */ | ||
66 | extern bool game_cheat2; /* never die */ | ||
67 | extern bool game_cheat3; /* highlight sprites */ | ||
68 | extern void game_toggleCheat(cheat_t); | ||
69 | #endif /* ENABLE_CHEATS */ | ||
70 | |||
71 | #endif /* ndef _GAME_H */ | ||
72 | |||
73 | /* eof */ | ||