annotate schedule.cc @ 24:a131729d6e4d

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