-
Notifications
You must be signed in to change notification settings - Fork 9
/
game.h
73 lines (60 loc) · 1.4 KB
/
game.h
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
#ifndef GAME_H
#define GAME_H
void initGame();
void restoreGame();
UBYTE *getSkinData();
void updateInput();
void updatePlayer();
void updateHUD();
void updateHUDTime();
void killPlayer();
void bouncePlayer(UBYTE entity, UBYTE str);
void updateEntities();
UBYTE spawnEntity(UBYTE type, UBYTE x, UBYTE y, UBYTE dir);
void clearEntities();
void initSpawns();
void updateSpawns();
void introAnimation();
void intoPortalAnimation();
void saveCatAnimation();
void deathAnimation();
void addScore();
void enterGame();
#define SCRLMGN 84U
#define NO_LAST_SPAWN 255U
#define MOVE_SPEED 2U
#define DASH_SPEED 4U
#define DASH_TIME 14U
#define SHORT_DASH_TIME 8U
#define BUMP_SPEED 28U
#define ALIEN_BUMP_SPEED 19U
#define MAX_YSPEED 24U
#define MAX_FLY_SPEED 23U
#define KEY_DASH J_A
#define KEY_USE J_B
#define SPAWN_INTERVAL 36U
#define MAX_TIME 32U
#define LOW_TIME 11U
#define CLOCK_BONUS 4U
#define MAX_BOOST 128U
#define STOMP_BONUS 32U
// Entities
#define E_NONE 0U
#define E_SPIKES 1U
#define E_FIREBALL 2U
#define E_ALIEN 3U
#define E_BAT 4U
#define E_BIRD 5U
#define E_GHOST 6U
#define E_CLOCK 7U
#define E_PORTAL 8U
#define E_CLOUD 9U
#define FIRST_ENEMY E_SPIKES
#define LAST_ENEMY E_GHOST
#define LAST_COLLIDABLE E_PORTAL
// States
#define INGAME_ACTIVE 0U
#define INGAME_DEAD 1U
#define INGAME_COMPLETED 2U
#define INGAME_QUIT 3U
#endif