blob: 96276768b85724ea5035636b52c6c6c8f7d58077 (
plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
|
/*
* xrick/game.h
*
* Copyright (C) 1998-2002 BigOrno (bigorno@bigorno.net).
* Copyright (C) 2008-2014 Pierluigi Vicinanza.
* All rights reserved.
*
* The use and distribution terms for this software are contained in the file
* named README, which can be found in the root of this distribution. By
* using this software in any fashion, you are agreeing to be bound by the
* terms of this license.
*
* You must not remove this notice, or any other, from this software.
*/
#ifndef _GAME_H
#define _GAME_H
#include "xrick/config.h"
#include "xrick/rects.h"
#ifdef ENABLE_SOUND
#include "xrick/data/sounds.h"
#endif
#include <stddef.h> /* NULL */
#define LEFT 1
#define RIGHT 0
#define GAME_PERIOD 40
#define GAME_BOMBS_INIT 6
#define GAME_BULLETS_INIT 6
extern U8 game_lives; /* lives counter */
extern U8 game_bombs; /* bombs counter */
extern U8 game_bullets; /* bullets counter */
extern U32 game_score; /* score */
extern U16 game_map; /* current map */
extern U16 game_submap; /* current submap */
extern U8 game_dir; /* direction (LEFT, RIGHT) */
extern bool game_chsm; /* change submap request (true, false) */
extern bool game_waitevt; /* wait for events (true, false) */
extern U8 game_period; /* time between each frame, in millisecond */
extern const rect_t *game_rects; /* rectangles to redraw at each frame */
extern void game_run(void);
#ifdef ENABLE_SOUND
extern void game_setmusic(sound_t * sound, S8 loop);
extern void game_stopmusic(void);
#endif /* ENABLE_SOUND */
#ifdef ENABLE_CHEATS
typedef enum
{
Cheat_UNLIMITED_ALL,
Cheat_NEVER_DIE,
Cheat_EXPOSE
} cheat_t;
extern bool game_cheat1; /* infinite lives, bombs and bullets */
extern bool game_cheat2; /* never die */
extern bool game_cheat3; /* highlight sprites */
extern void game_toggleCheat(cheat_t);
#endif /* ENABLE_CHEATS */
#endif /* ndef _GAME_H */
/* eof */
|