annotate schedule.cc @ 10:27d3291a7c82

fix
author tkaito
date Tue, 13 Jul 2010 18:09:25 +0900
parents dea6d34c8e91
children 632ce41a842a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
1 #include "dandy.h"
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
2
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
3 static const int FRAME_RATE = 32;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
4
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
5 void Putenemy(int charano, int x, int y, int sx, int sy, int move, int coll,
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
6 SceneGraphPtr node, void *sgroot_);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
8 void
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
9 schedule(SceneGraphPtr node, void *sgroot_, int w, int h)
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
10 {
8
tkaito
parents: 7
diff changeset
11 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
tkaito
parents: 7
diff changeset
12 Pad *pad = sgroot->getController();
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
13 // Title 画面
10
tkaito
parents: 9
diff changeset
14 /*
8
tkaito
parents: 7
diff changeset
15 if(back_property.flag == 0){
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
16 Putenemy(0, w/2, h/2, 0, 0, MOVE_00, MOVE_00, node, sgroot);
8
tkaito
parents: 7
diff changeset
17 if(pad->start.isPush()) {
tkaito
parents: 7
diff changeset
18 back_property.flag = 1;
tkaito
parents: 7
diff changeset
19 //node->children->remove();
tkaito
parents: 7
diff changeset
20 }
tkaito
parents: 7
diff changeset
21 }
10
tkaito
parents: 9
diff changeset
22 */
8
tkaito
parents: 7
diff changeset
23
tkaito
parents: 7
diff changeset
24 if(back_property.flag == 1) {
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
25 switch (node->frame) {
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
26 case 1:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
27 break;
8
tkaito
parents: 7
diff changeset
28 case FRAME_RATE * 10:
tkaito
parents: 7
diff changeset
29 Putenemy(1, w/2, 0, 2, 4, MOVE_00, MOVE_00, node, sgroot);
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
30 break;
8
tkaito
parents: 7
diff changeset
31 case FRAME_RATE * 20:
tkaito
parents: 7
diff changeset
32 Putenemy(1, w/3, 0, 0, 8, MOVE_00, MOVE_00, node, sgroot);
tkaito
parents: 7
diff changeset
33 Putenemy(1, w/2, 0, 0, 8, MOVE_00, MOVE_00, node, sgroot);
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
34 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
35 /*
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
36 case FRAME_RATE * 4:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
37 Putenemy(1, 120, -128, 0, 4, chara_state0);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
38 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
39 case FRAME_RATE * 5:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
40 Putenemy(1, 224, -128, 1, 1, chara_state0);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
41 Putenemy(1, 184, -128, 1, 1, chara_state0);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
42 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
43 case FRAME_RATE * 6:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
44 Putenemy(1, 120, -128, 1, 2, chara_state0);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
45 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
46 case FRAME_RATE * 7:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
47 Putenemy(1, 56, -128, 0, 1, chara_state0);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
48 Putenemy(1, 184, -128, 0, 1, chara_state0);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
49 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
50 case FRAME_RATE * 8:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
51 Putenemy(2, 120, -128, 0, 1, chara_state0);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
52 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
53
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
54 case FRAME_RATE * 12:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
55 Putenemy(1, 1280 - 128 - 120, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
56 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
57 case FRAME_RATE * 13:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
58 Putenemy(1, 1280 - 128 - 120, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
59 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
60 case FRAME_RATE * 14:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
61 Putenemy(1, 1280 - 128 - 120, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
62 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
63 case FRAME_RATE * 15:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
64 Putenemy(2, 1280 - 128 - 120, -128, -1, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
65 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
66 case FRAME_RATE * 16:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
67 Putenemy(2, 1280 - 128 - 120, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
68 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
69 case FRAME_RATE * 17:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
70 Putenemy(2, 1280 - 128 - 120, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
71 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
72 case FRAME_RATE * 18:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
73 Putenemy(1, 1280 - 128 - 120, -32, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
74 Putenemy(1, 1280 - 128, -128, -2, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
75 Putenemy(1, 800, -88, -1, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
76 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
77
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
78 case FRAME_RATE * 24:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
79 Putenemy(1, 256, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
80 Putenemy(1, 1280 - 256 - 128, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
81 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
82 case FRAME_RATE * 25:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
83 Putenemy(2, 512, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
84 Putenemy(2, 1280 - 128, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
85 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
86 case FRAME_RATE * 26:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
87 Putenemy(1, 384, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
88 Putenemy(1, 1280 - 256, -128, 0, 2, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
89 Putenemy(1, 512, -128, 0, 3, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
90 Putenemy(1, 1280 - 256, -128, 0, 2, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
91 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
92 case FRAME_RATE * 27:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
93 Putenemy(2, 512, -128, 0, 3, chara_state2);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
94 Putenemy(2, 256 - 128, -128, 0, 2, chara_state2);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
95 Putenemy(2, 768, -128, 0, 4, chara_state2);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
96 Putenemy(2, 128, -128, 0, 3, chara_state2);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
97 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
98 case FRAME_RATE * 28:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
99 Putenemy(1, 256, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
100 Putenemy(1, 1280 - 256 - 128, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
101 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
102 case FRAME_RATE * 29:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
103 Putenemy(2, 256, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
104 Putenemy(2, 1280 - 256 - 128, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
105 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
106 case FRAME_RATE * 30:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
107 Putenemy(1, 256, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
108 Putenemy(1, 1280 - 256 - 128, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
109 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
110
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
111 case FRAME_RATE * 33:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
112 Putenemy(1, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
113 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);//5/22/pm5:300
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
114 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
115 case FRAME_RATE * 34:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
116 Putenemy(2, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
117 Putenemy(2, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
118 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
119 case FRAME_RATE * 35:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
120 Putenemy(1, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
121 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
122 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
123 case FRAME_RATE * 36:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
124 Putenemy(2, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
125 Putenemy(2, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
126 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
127 case FRAME_RATE * 37:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
128 Putenemy(1, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
129 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
130 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
131 case FRAME_RATE * 38:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
132 Putenemy(2, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
133 Putenemy(2, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
134 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
135 case FRAME_RATE * 39:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
136 Putenemy(1, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
137 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
138 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
139
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
140 case FRAME_RATE * 50:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
141 Putenemy(40, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state3);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
142 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
143 case FRAME_RATE * 46:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
144 Putenemy(40, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state3);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
145 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
146 case FRAME_RATE * 54:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
147 Putenemy(40, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state3);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
148 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
149
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
150 case FRAME_RATE * 60:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
151 Putenemy(1, 256, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
152 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
153 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
154 case FRAME_RATE * 61:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
155 Putenemy(1, 256, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
156 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
157 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
158 case FRAME_RATE * 62:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
159 Putenemy(1, 256, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
160 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
161 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
162 case FRAME_RATE * 63:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
163 Putenemy(1, 256, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
164 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
165 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
166 case FRAME_RATE * 64:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
167 Putenemy(1, 256, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
168 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
169 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
170 case FRAME_RATE * 65:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
171 Putenemy(40, 256, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
172 Putenemy(40, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
173 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
174
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
175 case FRAME_RATE * 80:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
176 Putenemy(42, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
177 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
178 case FRAME_RATE * 66:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
179 Putenemy(41, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
180 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
181 case FRAME_RATE * 84:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
182 Putenemy(42, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
183 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
184 case FRAME_RATE * 70:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
185 Putenemy(41, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
186 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
187 case FRAME_RATE * 88:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
188 Putenemy(42, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
189 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
190 case FRAME_RATE * 74:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
191 Putenemy(41, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
192 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
193 case FRAME_RATE * 92:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
194 Putenemy(42, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
195 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
196 case FRAME_RATE * 78:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
197 Putenemy(41, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
198 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
199
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
200 case FRAME_RATE * 100:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
201 Putenemy(41, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
202 Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
203 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
204 case FRAME_RATE * 81:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
205 Putenemy(42, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
206 Putenemy(42, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
207 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
208 case FRAME_RATE * 104:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
209 Putenemy(41, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
210 Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
211 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
212 case FRAME_RATE * 83:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
213 Putenemy(42, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
214 Putenemy(42, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
215 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
216 case FRAME_RATE * 108:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
217 Putenemy(41, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
218 Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
219 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
220 case FRAME_RATE * 85:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
221 Putenemy(42, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
222 Putenemy(42, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
223 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
224 case FRAME_RATE * 112:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
225 Putenemy(41, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
226 Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
227 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
228
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
229 case FRAME_RATE * 130:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
230 SoundStop();
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
231 SoundPlay(4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
232 for(p = active_chara_list;p!=NULL;p=p->next)
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
233 {
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
234 p->f = FALSE;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
235 p->state = delete_chara;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
236 p->collision = noaction;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
237 }
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
238 Putenemy(4, 520, -128, 0, 1, chara_state8); // 1面ボスをPutenemy
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
239 }
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
240 */
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
241 }
8
tkaito
parents: 7
diff changeset
242 }
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
243 }
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
244
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
245 ObjProperty enemy[300];
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
246 ObjPropertyPtr e;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
247
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
248 void
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
249 create_enemy(SchedTask *s, void *enemy_, void *b)
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
250 {
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
251 ObjPropertyPtr ene = (ObjPropertyPtr)enemy_;
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
252 SceneGraphPtr back1, enemy1;
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
253 back1 = (SceneGraphPtr)ene->parent;
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
254 enemy1 = (SceneGraphPtr)ene->root;
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
255
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
256 enemy1->xyz[0] = ene->x;
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
257 enemy1->xyz[1] = ene->y;
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
258
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
259 back1->addChild(enemy1);
8
tkaito
parents: 7
diff changeset
260
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
261 }
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
262
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
263 void
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
264 Putenemy(int charano, int x, int y, int sx, int sy, int move, int coll,
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
265 SceneGraphPtr node, void *sgroot_)
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
266 {
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
267 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
268 SceneGraphPtr obj = (SceneGraphPtr)charactor[charano].root;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
269
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
270 int ii = 0;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
271 e = &enemy[0];
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
272 while ((e->flag) == 1) {
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
273 ii++;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
274 if (ii == 100)
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
275 return;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
276 e++;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
277 }
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
278 e->x = x;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
279 e->y = y;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
280 e->vx = sx;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
281 e->vy = sy;
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
282 e->root = (void*)obj;
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
283 e->parent = (void*)node;
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
284 e->flag = 1;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
285 e->vital = charactor[charano].vital;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
286 //e->move = move;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
287 e->score = charactor[charano].score;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
288 //e->dt1 = e->dt2 = 0;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
289 //e->tama = tf;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
290
10
tkaito
parents: 9
diff changeset
291 int size = sizeof(ObjProperty)*16;
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
292 //printf("size = %d\n", size);
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
293 sgroot->set_move_task(obj, move, (void*)e, size, create_enemy);
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
294 }