annotate schedule.cc @ 9:dea6d34c8e91

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