49
|
1 #ifndef INCLUDE_OBJECT
|
|
2 #define INCLUDE_OBJECT
|
|
3
|
|
4 #define TAMALV1P 14
|
|
5 #define TAMALV2P 50
|
|
6 #define TAMALV3P 24
|
|
7
|
|
8 #define LASERLV1P 17
|
|
9 #define LASERLV2P 154
|
|
10 #define LASERLV3P 51
|
|
11
|
|
12 #define TRUE 1
|
|
13 #define FALSE 0
|
|
14 #define BOOL char
|
|
15
|
|
16 typedef struct player {
|
|
17 int x;
|
|
18 int y;
|
|
19 int ch;
|
|
20 int point;
|
|
21 BOOL bf;
|
|
22 int muteki;
|
|
23 int zanki;
|
|
24 int ccount;
|
|
25 } player;
|
|
26
|
|
27
|
|
28 typedef struct tama {
|
|
29 int x;
|
|
30 int y;
|
|
31 } tama;
|
|
32
|
|
33
|
|
34 typedef struct tama1 {
|
|
35 int x;
|
|
36 int y;
|
|
37 int r;
|
|
38 int l;
|
|
39 } tama1;
|
|
40
|
|
41
|
|
42 typedef struct tama2 {
|
|
43 int x;
|
|
44 int y;
|
|
45 int rr;
|
|
46 int sr;
|
|
47 int sl;
|
|
48 int ll;
|
|
49 } tama2;
|
|
50
|
|
51
|
|
52 typedef struct stge {
|
|
53 int stg;
|
|
54 } stge;
|
|
55
|
|
56
|
|
57 typedef struct laser {
|
|
58 float x;
|
|
59 float y;
|
|
60 float sx;
|
|
61 float sy;
|
|
62 int r;
|
|
63 int enemyno;
|
|
64 float s;
|
|
65 } laser;
|
|
66
|
|
67
|
|
68 typedef struct bomchar {
|
|
69 int x;
|
|
70 int y;
|
|
71 int f;
|
|
72 int no;
|
|
73 } bomchar;
|
|
74
|
|
75
|
|
76 typedef struct CHARACTER{
|
|
77 float x; //position
|
|
78 float y;
|
|
79
|
|
80 float vx; //velocity
|
|
81 float vy;
|
|
82
|
|
83 float vit; //vitality
|
|
84 int score;
|
|
85 int dt1;
|
|
86 int dt2;
|
|
87 int charano; //sprite_number
|
|
88 BOOL tama; //bullet identifier
|
|
89 BOOL f; //apiarance idenfifier
|
|
90 float s;
|
51
|
91
|
|
92 int chara_id;
|
49
|
93 int task;
|
|
94
|
|
95 struct CHARACTER * (*state)(struct CHARACTER *p);
|
|
96 struct CHARACTER * (*collision)(struct CHARACTER *p);
|
|
97 struct CHARACTER *next;
|
|
98 struct CHARACTER *prev;
|
|
99
|
|
100 } CHARACTER;
|
|
101
|
|
102
|
|
103 typedef struct CollisionProperty {
|
|
104 int infg_level;
|
|
105 int enemycount;
|
|
106
|
53
|
107 CHARACTER p;
|
49
|
108 player jiki;
|
|
109 stge lg;
|
|
110 stge infg;
|
|
111
|
|
112 tama1 tama_lv1[20];
|
|
113 tama2 tama_lv2[20];
|
|
114 tama1 tlv3;
|
|
115 laser laser_lv1[20];
|
|
116 laser laser_lv2;
|
|
117 laser laser_lv3[128];
|
|
118 } CollisionProperty, *CollisionPropertyPtr;
|
|
119
|
|
120
|
|
121 typedef struct ObjData {
|
|
122 int type;
|
|
123
|
|
124 int tama_type;
|
|
125 int charano;
|
|
126 int task;
|
|
127 int zorder;
|
|
128 int number;
|
|
129 int color;
|
|
130 float angle;
|
|
131 float x, y;
|
|
132 float vx, vy;
|
|
133 float w, h;
|
|
134 float scalex, scaley;
|
|
135 short middlex, middley;
|
|
136 } ObjData, *ObjDataPtr;
|
|
137
|
|
138
|
|
139 typedef struct ObjContainer {
|
|
140 bool flag;
|
|
141 int length;
|
|
142
|
|
143 ObjData data[1];
|
|
144 } ObjContainer, *ObjContainerPtr;
|
|
145
|
|
146
|
|
147 CHARACTER * noaction(CHARACTER *p);
|
|
148 CHARACTER * delete_chara(CHARACTER *p);
|
|
149 void Bom(int x, int y, ObjDataPtr obj);
|
|
150 void Puttama(int type, float x, float y, ObjDataPtr tama);
|
|
151 void Putenemy(int charano, float x, float y, float vx, float vy, int task, ObjDataPtr obj);
|
|
152 void PutSprite(int zorder, short x, short y, int number, ObjDataPtr obj);
|
|
153 void DefSprite(int number, float w, float h, int color, ObjDataPtr obj);
|
|
154 void DefSpriteEx(int number, short middlex, short middley, ObjDataPtr obj);
|
|
155 void PutSpriteEx(int number, int x, int y, float scalex, float scaley, float angle, ObjDataPtr obj);
|
|
156
|
|
157 #endif
|