-
Notifications
You must be signed in to change notification settings - Fork 20
/
level.h
53 lines (44 loc) · 1.11 KB
/
level.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
#ifndef LEVEL_H__
#define LEVEL_H__
struct CheckpointData;
struct Game;
struct LvlObject;
struct Resource;
struct PafPlayer;
struct Video;
struct Level {
virtual ~Level() {
}
void setPointers(Game *g, LvlObject *andyObject, PafPlayer *paf, Resource *r, Video *video) {
_g = g;
_andyObject = andyObject;
_paf = paf;
_res = r;
_video = video;
}
virtual const CheckpointData *getCheckpointData(int num) const = 0;
virtual const uint8_t *getScreenRestartData() const = 0;
virtual void initialize() {}
virtual void terminate() {}
virtual void tick() {}
virtual void preScreenUpdate(int screenNum) = 0;
virtual void postScreenUpdate(int screenNum) = 0;
virtual void setupScreenCheckpoint(int screenNum) {}
Game *_g;
LvlObject *_andyObject;
PafPlayer *_paf;
Resource *_res;
Video *_video;
uint8_t _screenCounterTable[kMaxScreens];
int _checkpoint;
};
Level *Level_rock_create();
Level *Level_fort_create();
Level *Level_pwr1_create();
Level *Level_isld_create();
Level *Level_lava_create();
Level *Level_pwr2_create();
Level *Level_lar1_create();
Level *Level_lar2_create();
Level *Level_dark_create();
#endif