-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobals.c
91 lines (75 loc) · 3.14 KB
/
globals.c
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
#define persp 100
u_char lvlnum;
//Game cells
u_char level[63][63];
//World
SVECTOR ang={0,0,0}; //angle (512=45d)
VECTOR pos = {0, 0, 0}; //translation vector (position)
SVECTOR x[64][64][2]; //vertices
//Flappy attributes
VECTOR flappyPos = {0, 0, persp}; //translation vector (position)
SVECTOR flappyAng={0,0,0}; //angle (512=45d)
u_char fflags=0; //1=direction, 2=floor, 4=force floor, 8=death, 16=override cam, 32=pause
u_char fcheats=0; //1=coin magnet, 2=turn on air, 4=all terrain, 8=LVL unlock
short vacc;
u_char ncoins;
short *dcoin;
u_char remCoins,lastRemCoins;
u_char *lastCoinCollected, *coinCollected;
signed char spawnpoint[2]={3,8};
char *alertmsg=0;
u_char levelExitCode; //0=level in progress, 1=failed (pause menu exit, for example), 2=end success
u_long frame;
//Graphic elements
u_short tpages[4];
DR_TPAGE tp[4]; //DR TPAGE for sprites
//CD
POLY_FT4 cdp[4]={ //We still need to set tpage
{u0:0, v0:0, u1:0, v1:127, u2:127, v2:0, u3:127, v3:127},
{u0:128, v0:0, u1:128, v1:127, u2:255, v2:0, u3:255, v3:127},
{u0:0, v0:128, u1:0, v1:255, u2:127, v2:128, u3:127, v3:255},
{u0:128, v0:128, u1:128, v1:255, u2:255, v2:128, u3:255, v3:255}};
//Flappy
POLY_FT4 fp[4]={ //We still need to set tpage
{r0:128, g0:128, b0:128, u0:0, v0:238, u1:0, v1:255, u2:17, v2:238, u3:17, v3:255},
{r0:128, g0:128, b0:128, u0:18, v0:238, u1:18, v1:255, u2:35, v2:238, u3:35, v3:255},
{r0:128, g0:128, b0:128, u0:36, v0:238, u1:36, v1:255, u2:53, v2:238, u3:53, v3:255},
{r0:128, g0:128, b0:128, u0:18, v0:238, u1:18, v1:255, u2:35, v2:238, u3:35, v3:255}};
//World
POLY_FT4 p[3]={ //We still need to set tpage
{u0:0, v0:0, u1:0, v1:31, u2:31, v2:0, u3:31, v3:31},
{u0:32, v0:0, u1:32, v1:31, u2:63, v2:0, u3:63, v3:31},
{u0:64, v0:0, u1:64, v1:31, u2:95, v2:0, u3:95, v3:31}};
SPRT s[3]={
{r0:128, g0:128, b0:128, w:32, h:32, u0:0, v0:0},
{r0:128, g0:128, b0:128, w:32, h:32, u0:32, v0:0},
{r0:128, g0:128, b0:128, w:32, h:32, u0:64, v0:0}};
//Coins
SPRT_16 scoin[8]={
{u0:0, v0:198}, {u0:16, v0:198}, {u0:32, v0:198}, {u0:48, v0:198},
{u0:64, v0:198}, {u0:80, v0:198}, {u0:96, v0:198}, {u0:112, v0:198}};
SPRT tik={w:24, h:24, u0:0, v0:214, x0:280, y0:6};
//FullScreenBlack, alert, text
TILE fullScreenBlack={r0:0,g0:0,b0:0,x0:0,y0:0,w:320,h:240};
SPRT alertSprt={w:256, h:142, u0:0, v0:32, x0:32, y0:48};
SPRT_8 charSprt;
SPRT numSprt={w:12, h:18, v0:198};
long dmy,flg; //Work for RotTransPers
struct DB {
DRAWENV draw; //Drawing environment
DISPENV disp; //Display environment
};
struct DB db[2];
struct DB* cdb;
char stringholder[128];
char* songnames[]={"Apollo - Dance","Jazzberri eyes (Milk inc. remix)","Absolom - Where","Dj Rai - Step By Step","Corus - Destiny","Natascha Hagen - Without You","Flappy Adventure X - Final level","Flappy Adventure X - Credits","Chumi DJ - Follow My Dreams","Lucid - end of time","Wax - Destiny","DJ Rompe - I'm Just Dancing","Suzann - Little Bandit","Vicent de Moor - Fly Away","Critical mass - In your eyes","DJ Rompe & Sam Shokk - Ur Hands"};
/////////////////FlappyEngine//////////////
POLY_F4 f4; POLY_F3 f3;
struct FEObject {
u_char id;
u_char dataSize;
short dx,dy;
u_char *data;
};
u_char nFEObjects;
struct FEObject *FEObjects;