Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Test/test_render/viewer.cpp @ 221:d61fded0729e
Cameraの設定、Makefile 修正
author | gongo@gendarme.local |
---|---|
date | Tue, 10 Feb 2009 01:47:12 +0900 |
parents | 0f1ff7b06157 |
children | 5ffee529dc59 |
rev | line source |
---|---|
140 | 1 #include <SDL.h> |
109 | 2 #include "viewer.h" |
120 | 3 #include "viewer_types.h" |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
4 #include "SceneGraph.h" |
195 | 5 #include "SceneGraphRoot.h" |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
6 #include "scene_graph_pack.h" |
109 | 7 #include "sys.h" |
8 #include "Func.h" | |
9 #include "error.h" | |
10 #include "TaskManager.h" | |
212 | 11 #include <wchar.h> |
221 | 12 #include "Pad.h" |
212 | 13 |
109 | 14 |
15 extern void post2runLoop(void *); | |
16 extern void post2runDraw(void *); | |
17 | |
18 /* measure for FPS (Frame Per Second) */ | |
19 int start_time; | |
20 int this_time; | |
21 int frames; | |
22 | |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
195
diff
changeset
|
23 SceneGraphRootPtr sgroot; |
109 | 24 |
176 | 25 /* Data Pack sent to Other CPUs (ex. SPE) */ |
109 | 26 SceneGraphPack *sgpack; |
27 PolygonPack *ppack; | |
28 SpanPackPtr spackList; | |
29 SpanPackPtr *spackList_ptr; | |
210 | 30 |
109 | 31 int spackList_length; |
32 int spackList_length_align; | |
33 | |
140 | 34 /** |
176 | 35 * |
36 */ | |
37 | |
109 | 38 Viewer::Viewer(int b, int w, int h, int _num) |
39 { | |
40 bpp = b; | |
41 width = w; | |
42 height = h; | |
43 spe_num = _num; | |
44 } | |
45 | |
46 int | |
47 Viewer::get_ticks() | |
48 { | |
49 int time; | |
50 time = SDL_GetTicks(); | |
51 return time; | |
52 } | |
53 | |
54 bool | |
55 Viewer::quit_check() | |
56 { | |
57 SDL_Event event; | |
58 | |
59 while(SDL_PollEvent(&event)) { | |
60 if (event.type==SDL_QUIT) { | |
61 return true; | |
62 } | |
63 } | |
64 | |
65 Uint8 *keys=SDL_GetKeyState(NULL); | |
66 | |
67 if (keys[SDLK_q] == SDL_PRESSED) { | |
68 return true; | |
69 } | |
70 | |
71 return false; | |
72 } | |
73 | |
74 void | |
75 Viewer::quit() | |
76 { | |
77 SDL_Quit(); | |
78 } | |
79 | |
80 void | |
81 Viewer::swap_buffers() | |
82 { | |
83 SDL_GL_SwapBuffers(); | |
84 } | |
85 | |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
86 extern void node_init(void); |
144 | 87 extern void create_cube_split(int); |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
195
diff
changeset
|
88 extern void panel_init(int); |
199
eb20274baa7c
add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
198
diff
changeset
|
89 extern void universe_init(void); |
eb20274baa7c
add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
198
diff
changeset
|
90 extern void ieshoot_init(void); |
210 | 91 extern void ball_bound_init(int, int); |
212 | 92 extern void lcube_init(int, int); |
93 extern void direction_init(void); | |
213
159519cdca1f
add SceneGraph "3D Super-Dandy"
gongo@localhost.localdomain
parents:
212
diff
changeset
|
94 extern void init_position(int, int); |
142 | 95 |
109 | 96 void |
180
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
177
diff
changeset
|
97 Viewer::run_init(const char *xml, int sg_number) |
109 | 98 { |
99 HTaskPtr task_next; | |
167
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
158
diff
changeset
|
100 HTaskPtr task_tex; |
109 | 101 |
102 start_time = get_ticks(); | |
103 this_time = 0; | |
104 frames = 0; | |
105 | |
221 | 106 sgroot = new SceneGraphRoot(this->width, this->height); |
195 | 107 //sgroot->createFromXMLFile(xml); |
140 | 108 |
144 | 109 switch (sg_number) { |
110 case 0: | |
111 case 1: | |
112 create_cube_split(sg_number); | |
113 break; | |
114 case 2: | |
153
c8c8bb4e9e58
画像のサイズテストを加える -sg = [2,3,4]
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
150
diff
changeset
|
115 case 3: |
c8c8bb4e9e58
画像のサイズテストを加える -sg = [2,3,4]
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
150
diff
changeset
|
116 case 4: |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
195
diff
changeset
|
117 panel_init(sg_number); |
144 | 118 break; |
153
c8c8bb4e9e58
画像のサイズテストを加える -sg = [2,3,4]
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
150
diff
changeset
|
119 case 5: |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
195
diff
changeset
|
120 universe_init(); |
158 | 121 break; |
122 case 6: | |
199
eb20274baa7c
add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
198
diff
changeset
|
123 ieshoot_init(); |
144 | 124 break; |
210 | 125 case 7: |
126 ball_bound_init(this->width, this->height); | |
127 break; | |
212 | 128 case 8: |
129 lcube_init(this->width, this->height); | |
130 break; | |
131 case 9: | |
132 direction_init(); | |
133 break; | |
213
159519cdca1f
add SceneGraph "3D Super-Dandy"
gongo@localhost.localdomain
parents:
212
diff
changeset
|
134 case 10: |
159519cdca1f
add SceneGraph "3D Super-Dandy"
gongo@localhost.localdomain
parents:
212
diff
changeset
|
135 init_position(this->width, this->height); |
159519cdca1f
add SceneGraph "3D Super-Dandy"
gongo@localhost.localdomain
parents:
212
diff
changeset
|
136 break; |
144 | 137 default: |
138 node_init(); | |
139 break; | |
140 } | |
142 | 141 |
217 | 142 sgpack = (SceneGraphPack*)manager->allocate(sizeof(SceneGraphPack)); |
109 | 143 sgpack->init(); |
217 | 144 ppack = (PolygonPack*)manager->allocate(sizeof(PolygonPack)); |
109 | 145 |
146 spackList_length = (this->height + split_screen_h - 1) / split_screen_h; | |
217 | 147 spackList = (SpanPack*)manager->allocate(sizeof(SpanPack)*spackList_length); |
109 | 148 |
176 | 149 /** |
150 * SPU に送る address list は 16 バイト倍数でないといけない。 | |
151 * spackList_length*sizeof(SpanPack*) が 16 バイト倍数になるような | |
152 * length_align を求めている。はみ出した部分は使われない | |
153 * (ex) spackList_length が 13 の場合 | |
154 * spackList_length_align = 16; | |
155 * 実際に送るデータは64バイトになるのでOK | |
156 * 14,15,16 の部分は何も入らない。 | |
157 */ | |
109 | 158 spackList_length_align = (spackList_length + 3)&(~3); |
159 | |
160 /* 各 SPU が持つ、SpanPack の address list */ | |
167
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
158
diff
changeset
|
161 spackList_ptr = |
217 | 162 (SpanPack**)manager->allocate(sizeof(SpanPack*)*spackList_length_align); |
109 | 163 |
164 for (int i = 0; i < spackList_length; i++) { | |
165 spackList_ptr[i] = &spackList[i]; | |
166 } | |
167 | |
126
7635f223fc7d
fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
168 for (int i = 1; i <= spackList_length; i++) { |
7635f223fc7d
fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
169 spackList[i-1].init(i*split_screen_h); |
7635f223fc7d
fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
170 } |
7635f223fc7d
fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
171 |
109 | 172 task_next = manager->create_task(TASK_DUMMY); |
173 task_next->set_post(&post2runLoop, NULL); | |
174 | |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
175 #if 0 |
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
176 // 諸事情で、今は SceneGraphPack を作らずに |
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
177 // そのまま SceneGraph でやっています |
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
178 HTaskPtr task_sgp; |
109 | 179 task_sgp = manager->create_task(TASK_CREATE_SGP); |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
180 task_sgp->add_param((uint32)scene_graph); |
109 | 181 task_sgp->add_param((uint32)sgpack); |
182 task_next->wait_for(task_sgp); | |
183 task_sgp->spawn(); | |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
184 #endif |
109 | 185 |
167
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
158
diff
changeset
|
186 for (int i = 0; i < spe_num; i++) { |
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
158
diff
changeset
|
187 task_tex = manager->create_task(TASK_INIT_TEXTURE); |
176 | 188 /* ここはもう少しわかりやすい使い方がいいかもしれぬ。こんなもん? */ |
167
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
158
diff
changeset
|
189 task_tex->set_cpu((CPU_TYPE)((int)SPE_0 + i)); |
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
158
diff
changeset
|
190 task_next->wait_for(task_tex); |
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
158
diff
changeset
|
191 task_tex->spawn(); |
c8b868871dce
DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
gongo@localhost.localdomain
parents:
158
diff
changeset
|
192 } |
120 | 193 |
109 | 194 task_next->spawn(); |
195 } | |
196 | |
197 void | |
198 Viewer::run_loop(void) | |
199 { | |
200 HTaskPtr task_create_pp = NULL; | |
201 HTaskPtr task_create_sp = NULL; | |
202 HTaskPtr task_next; | |
203 bool quit_flg; | |
204 | |
205 quit_flg = quit_check(); | |
206 | |
207 if (quit_flg == true) { | |
208 this_time = get_ticks(); | |
209 run_finish(); | |
210 return; | |
211 } | |
212 | |
200 | 213 //clean_pixels(); |
109 | 214 |
215 for (int i = 1; i <= spackList_length; i++) { | |
126
7635f223fc7d
fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
123
diff
changeset
|
216 spackList[i-1].reinit(i*split_screen_h); |
109 | 217 } |
218 | |
219 task_next = manager->create_task(TASK_DUMMY); | |
220 task_next->set_post(post2runDraw, NULL); | |
221 | |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
222 #if 0 |
157 | 223 // SceneGraphPack の update |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
224 HTaskPtr task_update_sgp = NULL; |
109 | 225 task_update_sgp = manager->create_task(TASK_UPDATE_SGP); |
226 task_update_sgp->add_inData(sgpack, sizeof(SceneGraphPack)); | |
227 task_update_sgp->add_outData(sgpack, sizeof(SceneGraphPack)); | |
228 task_update_sgp->add_param(width); | |
229 task_update_sgp->add_param(height); | |
230 task_next->wait_for(task_update_sgp); | |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
231 task_update_sgp->spawn(); |
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
232 #else |
195 | 233 sgroot->updateControllerState(); |
234 sgroot->allExecute(width, height); | |
219
0f1ff7b06157
allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents:
217
diff
changeset
|
235 //sgroot->checkRemove(); |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
236 #endif |
109 | 237 |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
238 #if 0 |
157 | 239 // SceneGraphPack(配列) -> PolygonPack |
109 | 240 task_create_pp = manager->create_task(TASK_CREATE_PP); |
241 task_create_pp->add_inData(sgpack, sizeof(SceneGraphPack)); | |
242 task_create_pp->add_param((uint32)ppack); | |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
243 #else |
157 | 244 // SceneGraph(木構造) -> PolygonPack |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
245 task_create_pp = manager->create_task(TASK_CREATE_PP2); |
195 | 246 task_create_pp->add_param((uint32)sgroot->getDrawSceneGraph()); |
137
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
247 task_create_pp->add_param((uint32)ppack); |
6cf991f28c6c
SceneGraphPack の代わりに、今は SceneGraph をそのまま使う様に設定。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
133
diff
changeset
|
248 #endif |
109 | 249 task_next->wait_for(task_create_pp); |
250 | |
251 int range_base = spe_num; | |
252 // 切り上げのつもり | |
253 int range = (spackList_length + range_base - 1) / range_base; | |
254 | |
255 for (int i = 0; i < range_base; i++) { | |
256 int index_start = range*i; | |
257 int index_end = (index_start + range >= spackList_length) | |
258 ? spackList_length : index_start + range; | |
259 | |
260 task_create_sp = manager->create_task(TASK_CREATE_SPAN); | |
261 task_create_sp->add_inData(ppack, sizeof(PolygonPack)); | |
262 task_create_sp->add_inData(spackList_ptr, | |
263 sizeof(SpanPack*)*spackList_length_align); | |
264 task_create_sp->add_inData(&spackList[index_start], sizeof(SpanPack)); | |
265 | |
266 task_create_sp->add_param(index_start); | |
267 | |
268 /** | |
133
435e0d24db39
DrawSpan のテクスチャ座標を求める部分で、width と height が逆に使われてた。
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
130
diff
changeset
|
269 * ex. screen_height が 480, spenum が 6 の場合、各SPEのy担当範囲 |
109 | 270 * [ 1.. 80] [ 81..160] [161..240] |
271 * [241..320] [321..400] [401..480] | |
272 * | |
273 * ex. screen_height が 1080, spenum が 5 の場合、 | |
274 * [ 1..216] [217..432] [433..648] | |
275 * [649..864] [865..1080] | |
276 */ | |
277 task_create_sp->add_param(index_start*split_screen_h + 1); | |
278 task_create_sp->add_param(index_end*split_screen_h); | |
279 | |
280 task_next->wait_for(task_create_sp); | |
281 task_create_sp->wait_for(task_create_pp); | |
282 | |
283 task_create_sp->set_cpu(SPE_ANY); | |
284 task_create_sp->spawn(); | |
285 } | |
286 | |
287 task_create_pp->spawn(); | |
288 task_next->spawn(); | |
289 } | |
290 | |
291 void | |
292 Viewer::run_draw(void) | |
293 { | |
294 HTaskPtr task_next; | |
295 HTaskPtr task_draw; | |
296 | |
297 task_next = manager->create_task(TASK_DUMMY); | |
298 task_next->set_post(post2runLoop, NULL); | |
299 | |
300 ppack->clear(); | |
301 for (int i = 0; i < spackList_length; i++) { | |
302 SpanPack *spack = &spackList[i]; | |
303 int startx = 1; | |
304 int endx = split_screen_w; | |
305 | |
180
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
177
diff
changeset
|
306 int starty = spack->info.y_top - split_screen_h + 1; |
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
177
diff
changeset
|
307 //int endy = spack->info.y_top; |
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
177
diff
changeset
|
308 int rangey = (starty + split_screen_h - 1 > this->height) |
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
177
diff
changeset
|
309 ? this->height - starty + 1 : split_screen_h; |
109 | 310 |
311 while (startx < this->width) { | |
312 if (spack->info.size > 0) { | |
313 // Draw SpanPack | |
314 task_draw = manager->create_task(TASK_DRAW_SPAN); | |
315 task_draw->add_inData(spack, sizeof(SpanPack)); | |
193 | 316 |
317 task_draw->add_param( | |
318 (uint32)&pixels[(startx-1) + this->width*(starty-1)]); | |
319 task_draw->add_param(this->width); | |
109 | 320 } else { |
200 | 321 #if 0 |
322 break; | |
109 | 323 // Draw Background (現在は塗りつぶし) |
324 task_draw = manager->create_task(TASK_DRAW_BACK); | |
170 | 325 task_draw->add_param(0xffffffff); |
205 | 326 |
193 | 327 for (int k = 0; k < rangey; k++) { |
328 task_draw->add_outData( | |
329 &pixels[(startx-1)+this->width*(k+starty-1)], | |
330 (endx - startx + 1)*sizeof(int)); | |
331 } | |
200 | 332 #else |
333 memset(&pixels[(startx-1)+this->width*(starty-1)], | |
213
159519cdca1f
add SceneGraph "3D Super-Dandy"
gongo@localhost.localdomain
parents:
212
diff
changeset
|
334 0, (this->width)*sizeof(int)*rangey); |
212 | 335 //wmemset((wchar_t*)&pixels[(startx-1)+this->width*(starty-1)], |
336 //0xFFFFFFFF, (this->width)*sizeof(int)*rangey/sizeof(wchar_t)); | |
200 | 337 break; |
338 #endif | |
109 | 339 } |
340 | |
341 task_draw->add_param(startx); | |
342 task_draw->add_param(endx); | |
343 task_draw->add_param(rangey); | |
344 task_draw->set_cpu(SPE_ANY); | |
345 task_next->wait_for(task_draw); | |
346 task_draw->spawn(); | |
347 | |
348 startx += split_screen_w; | |
349 endx += split_screen_w; | |
350 | |
351 if (endx > this->width) { | |
352 endx = this->width; | |
353 } | |
354 } | |
355 } | |
356 | |
357 task_next->spawn(); | |
358 | |
359 frames++; | |
360 } | |
361 | |
362 void | |
363 Viewer::run_finish(void) | |
364 { | |
365 if (this_time != start_time) { | |
366 printf("%f FPS\n", (((float)frames)/(this_time-start_time))*1000.0); | |
367 } | |
368 | |
219
0f1ff7b06157
allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents:
217
diff
changeset
|
369 delete sgroot; |
0f1ff7b06157
allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents:
217
diff
changeset
|
370 |
109 | 371 quit(); |
372 } |