Mercurial > hg > Members > koba > t_dandy
annotate ppe/task_object.h @ 59:cd05eee90279
fix code.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 07 Feb 2011 03:31:18 +0900 |
parents | 978097c6427a |
children |
rev | line source |
---|---|
1 | 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 | |
34 | 27 |
1 | 28 typedef struct tama { |
29 int x; | |
30 int y; | |
31 } tama; | |
32 | |
34 | 33 |
1 | 34 typedef struct tama1 { |
35 int x; | |
36 int y; | |
37 int r; | |
38 int l; | |
39 } tama1; | |
40 | |
34 | 41 |
1 | 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 | |
34 | 51 |
1 | 52 typedef struct stge { |
53 int stg; | |
54 } stge; | |
55 | |
34 | 56 |
1 | 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 | |
34 | 67 |
1 | 68 typedef struct bomchar { |
69 int x; | |
70 int y; | |
71 int f; | |
72 int no; | |
73 } bomchar; | |
74 | |
34 | 75 |
1 | 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; | |
57 | 93 int state_task; |
94 bool collision_task; | |
19 | 95 |
1 | 96 struct CHARACTER * (*state)(struct CHARACTER *p); |
97 struct CHARACTER * (*collision)(struct CHARACTER *p); | |
98 struct CHARACTER *next; | |
99 struct CHARACTER *prev; | |
100 | |
101 } CHARACTER; | |
102 | |
34 | 103 |
2 | 104 typedef struct CollisionProperty { |
34 | 105 int infg_level; |
54
3acdeb3dc3e8
collision use global_alloc (not work)
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
53
diff
changeset
|
106 |
3acdeb3dc3e8
collision use global_alloc (not work)
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
53
diff
changeset
|
107 int tama_lv1_end; |
3acdeb3dc3e8
collision use global_alloc (not work)
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
53
diff
changeset
|
108 int tama_lv2_end; |
3acdeb3dc3e8
collision use global_alloc (not work)
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
53
diff
changeset
|
109 int laser_lv1_end; |
3acdeb3dc3e8
collision use global_alloc (not work)
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
53
diff
changeset
|
110 |
2 | 111 int enemycount; |
54
3acdeb3dc3e8
collision use global_alloc (not work)
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
53
diff
changeset
|
112 |
3acdeb3dc3e8
collision use global_alloc (not work)
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
53
diff
changeset
|
113 player jiki; |
2 | 114 |
19 | 115 stge lg; |
116 stge infg; | |
54
3acdeb3dc3e8
collision use global_alloc (not work)
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
53
diff
changeset
|
117 |
2 | 118 tama1 tama_lv1[20]; |
119 tama2 tama_lv2[20]; | |
120 tama1 tlv3; | |
121 laser laser_lv1[20]; | |
34 | 122 laser laser_lv2; |
59 | 123 laser laser_lv3[64]; |
54
3acdeb3dc3e8
collision use global_alloc (not work)
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
53
diff
changeset
|
124 |
2 | 125 } CollisionProperty, *CollisionPropertyPtr; |
126 | |
34 | 127 |
31
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
128 typedef struct ObjData { |
33 | 129 int type; |
130 | |
31
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
131 int tama_type; |
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
132 int charano; |
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
133 int task; |
33 | 134 int zorder; |
135 int number; | |
136 int color; | |
137 float angle; | |
31
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
138 float x, y; |
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
139 float vx, vy; |
33 | 140 float w, h; |
141 float scalex, scaley; | |
142 short middlex, middley; | |
31
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
143 } ObjData, *ObjDataPtr; |
25 | 144 |
34 | 145 |
31
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
146 typedef struct ObjContainer { |
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
147 bool flag; |
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
148 int length; |
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
149 |
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
150 ObjData data[1]; |
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
151 } ObjContainer, *ObjContainerPtr; |
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
152 |
34 | 153 |
1 | 154 CHARACTER * noaction(CHARACTER *p); |
155 CHARACTER * delete_chara(CHARACTER *p); | |
37 | 156 void Bom(int x, int y, ObjDataPtr obj); |
31
ccb8d9956a1e
add multi container function.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
157 void Puttama(int type, float x, float y, ObjDataPtr tama); |
33 | 158 void Putenemy(int charano, float x, float y, float vx, float vy, int task, ObjDataPtr obj); |
159 void PutSprite(int zorder, short x, short y, int number, ObjDataPtr obj); | |
36 | 160 void DefSprite(int number, float w, float h, int color, ObjDataPtr obj); |
33 | 161 void DefSpriteEx(int number, short middlex, short middley, ObjDataPtr obj); |
162 void PutSpriteEx(int number, int x, int y, float scalex, float scaley, float angle, ObjDataPtr obj); | |
1 | 163 |
164 #endif |