-
Notifications
You must be signed in to change notification settings - Fork 1
/
structures.h
111 lines (93 loc) · 2.93 KB
/
structures.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#ifndef STRUCTURES_H
#define STRUCTURES_H
struct collected {
UBYTE coal;
UBYTE excesscoal;
UBYTE capacitors;
UBYTE robboMsgCount;
};
struct moveControls {
BOOL stoneHit;
BOOL frameHit;
UBYTE anotherHit; // sprawdzam czy po uderzeniu w kamien chce jeszcze raz, zeby sie HUD 2 razy nie rozwijal
UBYTE kierunek;
UBYTE kierunekHold;
};
struct coordinates { // coordsy do rysowania falkona i kontrolowania zeby sie nie wypierdolil za ekran
UBYTE falkonx;
UBYTE falkony; // pozycja falkona na tablicy z tilesami 32x32
UBYTE falkonFace; // kierunek dziobem
BYTE krawedzx; // do sprawdzania czy chcemy wyleciec za ekran, BYTE - ze znakiem bo moze byc -1
BYTE krawedzy;
};
struct stateControls { // checking the states of different
BOOL falkonIdleControl; // elements and situations
UBYTE flyingAnimControl; // to handle them correctly
BOOL stonehitAnimControl;
BOOL hudScrollingControl; // check hud up/down and what to do next
UBYTE levelScoreControl;
UBYTE youWin; // bad naming - check which ending/gameover to proceed
UBYTE robboMsgCtrl; // checks if theres a need for scrolling hud etc.
};
struct anim { // variables for handling animation
UBYTE robboFrame; // of various elements on screen
UBYTE robboTick;
UBYTE robboTempo;
UBYTE portalGlowTick;
UBYTE portalGlowFrame;
UBYTE portalGlowX;
UBYTE portalGlowY;
UBYTE portalTickTempo;
UBYTE redCapacitorsAnimTileCheck;
UBYTE redCapacitorsAnimTick;
UBYTE blueCapacitorsAnimTileCheck;
UBYTE blueCapacitorsAnimTick;
UBYTE tickTempo;
UBYTE stonehitAnimTick;
UBYTE stonehitAnimFrame;
UBYTE flyingTick;
UBYTE flyingFrame;
UBYTE falkonIdle;
UBYTE idleFrame;
UBYTE falkonIdleTempo;
UBYTE hudScrollingTick; // scrolling up/down on Robbo & ESP tick
UBYTE hudTickTempo; // amiga mode hud animation variables
UBYTE hudAnimTick;
UBYTE hudTickFrame;
BYTE levelScoreTick;
UBYTE levelAnimFrame;
UBYTE levelScoreTempo;
};
struct flyingAnim {
// bad naming, but these are variables for drawing flying animation
// frame by frame moving per pixel:
// drawing Background on previous position, then
// drawing animation tile on the new position
UWORD uwPosX;
UWORD uwPosY;
UWORD uwPreviousX;
UWORD uwPreviousY;
UWORD newPosX;
UWORD newPosY;
UWORD HitPosX;
UWORD HitPosY;
UBYTE tempX; // remember to use meaningful names next time ! !
UBYTE tempY; // lesson learned ...
};
struct misc { // other but important variables
UBYTE level;
UBYTE doubleBufferFrameControl;
UBYTE audioFadeIn;
UBYTE robboMsgNr;
UBYTE HUDfontColor; //23
UBYTE HUDcollisionMsg;
UBYTE holdLastLevelForContinue;
};
struct db // handling double buffer, if true then will be drawn again in next frame
{
BOOL robbo;
BOOL hudAnimDB;
BOOL levelScoreDB;
BOOL portalGlowDB;
};
#endif // STRUCTURES_H