annotate schedule.cc @ 27:34fde39c0a31

commit test.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Fri, 10 Dec 2010 02:57:29 +0900
parents 6bea374ee604 a131729d6e4d
children
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
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
3 #if 0
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
4 static const int FRAME_RATE = 32;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
5
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
6 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
7 SceneGraphPtr node, void *sgroot_);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
8
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
9 void
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
10 schedule(SceneGraphPtr node, void *sgroot_, int w, int h)
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
11 {
26
6bea374ee604 global alloc test.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
12 #if 0
8
tkaito
parents: 7
diff changeset
13 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
tkaito
parents: 7
diff changeset
14 Pad *pad = sgroot->getController();
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
15 // Title 画面
10
tkaito
parents: 9
diff changeset
16 /*
8
tkaito
parents: 7
diff changeset
17 if(back_property.flag == 0){
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
18 Putenemy(0, w/2, h/2, 0, 0, MOVE_00, MOVE_00, node, sgroot);
8
tkaito
parents: 7
diff changeset
19 if(pad->start.isPush()) {
tkaito
parents: 7
diff changeset
20 back_property.flag = 1;
tkaito
parents: 7
diff changeset
21 //node->children->remove();
tkaito
parents: 7
diff changeset
22 }
tkaito
parents: 7
diff changeset
23 }
10
tkaito
parents: 9
diff changeset
24 */
8
tkaito
parents: 7
diff changeset
25
19
632ce41a842a testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 10
diff changeset
26 /* 取りあえず根っこのSceneGraphのPropertyのフラグでif文に入るようにしてみた */
632ce41a842a testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 10
diff changeset
27 if(charactor[0].flag == 1) {
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
28 switch (node->frame) {
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
29 case 1:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
30 break;
8
tkaito
parents: 7
diff changeset
31 case FRAME_RATE * 10:
tkaito
parents: 7
diff changeset
32 Putenemy(1, w/2, 0, 2, 4, MOVE_00, MOVE_00, node, sgroot);
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
33 break;
8
tkaito
parents: 7
diff changeset
34 case FRAME_RATE * 20:
tkaito
parents: 7
diff changeset
35 Putenemy(1, w/3, 0, 0, 8, MOVE_00, MOVE_00, node, sgroot);
tkaito
parents: 7
diff changeset
36 Putenemy(1, w/2, 0, 0, 8, MOVE_00, MOVE_00, node, sgroot);
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
37 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
38 /*
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
39 case FRAME_RATE * 4:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
40 Putenemy(1, 120, -128, 0, 4, chara_state0);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
41 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
42 case FRAME_RATE * 5:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
43 Putenemy(1, 224, -128, 1, 1, chara_state0);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
44 Putenemy(1, 184, -128, 1, 1, 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 * 6:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
47 Putenemy(1, 120, -128, 1, 2, chara_state0);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
48 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
49 case FRAME_RATE * 7:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
50 Putenemy(1, 56, -128, 0, 1, chara_state0);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
51 Putenemy(1, 184, -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 case FRAME_RATE * 8:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
54 Putenemy(2, 120, -128, 0, 1, chara_state0);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
55 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
56
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
57 case FRAME_RATE * 12:
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 * 13:
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 * 14:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
64 Putenemy(1, 1280 - 128 - 120, -128, 0, 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 * 15:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
67 Putenemy(2, 1280 - 128 - 120, -128, -1, 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 * 16:
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 * 17:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
73 Putenemy(2, 1280 - 128 - 120, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
74 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
75 case FRAME_RATE * 18:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
76 Putenemy(1, 1280 - 128 - 120, -32, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
77 Putenemy(1, 1280 - 128, -128, -2, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
78 Putenemy(1, 800, -88, -1, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
79 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
80
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
81 case FRAME_RATE * 24:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
82 Putenemy(1, 256, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
83 Putenemy(1, 1280 - 256 - 128, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
84 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
85 case FRAME_RATE * 25:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
86 Putenemy(2, 512, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
87 Putenemy(2, 1280 - 128, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
88 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
89 case FRAME_RATE * 26:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
90 Putenemy(1, 384, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
91 Putenemy(1, 1280 - 256, -128, 0, 2, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
92 Putenemy(1, 512, -128, 0, 3, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
93 Putenemy(1, 1280 - 256, -128, 0, 2, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
94 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
95 case FRAME_RATE * 27:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
96 Putenemy(2, 512, -128, 0, 3, chara_state2);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
97 Putenemy(2, 256 - 128, -128, 0, 2, chara_state2);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
98 Putenemy(2, 768, -128, 0, 4, chara_state2);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
99 Putenemy(2, 128, -128, 0, 3, chara_state2);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
100 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
101 case FRAME_RATE * 28:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
102 Putenemy(1, 256, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
103 Putenemy(1, 1280 - 256 - 128, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
104 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
105 case FRAME_RATE * 29:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
106 Putenemy(2, 256, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
107 Putenemy(2, 1280 - 256 - 128, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
108 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
109 case FRAME_RATE * 30:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
110 Putenemy(1, 256, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
111 Putenemy(1, 1280 - 256 - 128, -128, 0, 1, chara_state4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
112 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
113
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
114 case FRAME_RATE * 33:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
115 Putenemy(1, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
116 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);//5/22/pm5:300
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
117 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
118 case FRAME_RATE * 34:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
119 Putenemy(2, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
120 Putenemy(2, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
121 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
122 case FRAME_RATE * 35:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
123 Putenemy(1, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
124 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
125 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
126 case FRAME_RATE * 36:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
127 Putenemy(2, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
128 Putenemy(2, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
129 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
130 case FRAME_RATE * 37:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
131 Putenemy(1, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
132 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
133 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
134 case FRAME_RATE * 38:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
135 Putenemy(2, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
136 Putenemy(2, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
137 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
138 case FRAME_RATE * 39:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
139 Putenemy(1, 256, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
140 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
141 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
142
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
143 case FRAME_RATE * 50:
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 * 46:
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 case FRAME_RATE * 54:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
150 Putenemy(40, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state3);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
151 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
152
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
153 case FRAME_RATE * 60:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
154 Putenemy(1, 256, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
155 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
156 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
157 case FRAME_RATE * 61:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
158 Putenemy(1, 256, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
159 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
160 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
161 case FRAME_RATE * 62:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
162 Putenemy(1, 256, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
163 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
164 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
165 case FRAME_RATE * 63:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
166 Putenemy(1, 256, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
167 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
168 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
169 case FRAME_RATE * 64:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
170 Putenemy(1, 256, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
171 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
172 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
173 case FRAME_RATE * 65:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
174 Putenemy(40, 256, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
175 Putenemy(40, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
176 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
177
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
178 case FRAME_RATE * 80:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
179 Putenemy(42, 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 * 66:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
182 Putenemy(41, 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 * 84:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
185 Putenemy(42, 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 * 70:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
188 Putenemy(41, 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 * 88:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
191 Putenemy(42, 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 * 74:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
194 Putenemy(41, 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 * 92:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
197 Putenemy(42, 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 case FRAME_RATE * 78:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
200 Putenemy(41, rand() % (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
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
203 case FRAME_RATE * 100:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
204 Putenemy(41, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
205 Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
206 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
207 case FRAME_RATE * 81:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
208 Putenemy(42, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
209 Putenemy(42, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
210 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
211 case FRAME_RATE * 104:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
212 Putenemy(41, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
213 Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
214 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
215 case FRAME_RATE * 83:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
216 Putenemy(42, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
217 Putenemy(42, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
218 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
219 case FRAME_RATE * 108:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
220 Putenemy(41, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
221 Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
222 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
223 case FRAME_RATE * 85:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
224 Putenemy(42, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
225 Putenemy(42, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
226 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
227 case FRAME_RATE * 112:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
228 Putenemy(41, 256, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
229 Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
230 break;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
231
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
232 case FRAME_RATE * 130:
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
233 SoundStop();
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
234 SoundPlay(4);
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
235 for(p = active_chara_list;p!=NULL;p=p->next)
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
236 {
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
237 p->f = FALSE;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
238 p->state = delete_chara;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
239 p->collision = noaction;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
240 }
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
241 Putenemy(4, 520, -128, 0, 1, chara_state8); // 1面ボスをPutenemy
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
242 }
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
243 */
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
244 }
8
tkaito
parents: 7
diff changeset
245 }
26
6bea374ee604 global alloc test.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
246 #endif
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
247 }
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
248
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
249 ObjProperty enemy[300];
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
250 ObjPropertyPtr e;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
251
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
252 void
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
253 create_enemy(SchedTask *s, void *enemy_, void *b)
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
254 {
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
255 ObjPropertyPtr ene = (ObjPropertyPtr)enemy_;
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
256 SceneGraphPtr back1, enemy1;
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
257 back1 = (SceneGraphPtr)ene->parent;
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
258 enemy1 = (SceneGraphPtr)ene->root;
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
259
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
260 enemy1->xyz[0] = ene->x;
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
261 enemy1->xyz[1] = ene->y;
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
262
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
263 back1->addChild(enemy1);
8
tkaito
parents: 7
diff changeset
264
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
265 }
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
266
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
267 void
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
268 Putenemy(int charano, int x, int y, int sx, int sy, int move, int coll,
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
269 SceneGraphPtr node, void *sgroot_)
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
270 {
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
271 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
272 SceneGraphPtr obj = (SceneGraphPtr)charactor[charano].root;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
273
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
274 int ii = 0;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
275 e = &enemy[0];
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
276 while ((e->flag) == 1) {
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
277 ii++;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
278 if (ii == 100)
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
279 return;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
280 e++;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
281 }
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
282 e->x = x;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
283 e->y = y;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
284 e->vx = sx;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
285 e->vy = sy;
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
286 e->root = (void*)obj;
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
287 e->parent = (void*)node;
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
288 e->flag = 1;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
289 e->vital = charactor[charano].vital;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
290 //e->move = move;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
291 e->score = charactor[charano].score;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
292 //e->dt1 = e->dt2 = 0;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
293 //e->tama = tf;
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
294
10
tkaito
parents: 9
diff changeset
295 int size = sizeof(ObjProperty)*16;
9
dea6d34c8e91 not move.
tkaito
parents: 8
diff changeset
296 //printf("size = %d\n", size);
26
6bea374ee604 global alloc test.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
297 // sgroot->set_move_task(obj, move, (void*)e, size, create_enemy);
7
c015109a6041 schedule add. 10% done.
tkaito
parents:
diff changeset
298 }
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
299 #endif