comparison TaskManager/Test/test_render/viewer.cpp @ 212:fe2cc32cd94d

fix
author gongo@localhost.localdomain
date Sat, 31 Jan 2009 08:54:22 +0900
parents 204b03ca98f8
children 159519cdca1f
comparison
equal deleted inserted replaced
211:3e7e8b5d9f17 212:fe2cc32cd94d
8 #include "Func.h" 8 #include "Func.h"
9 #include "error.h" 9 #include "error.h"
10 #include "TaskManager.h" 10 #include "TaskManager.h"
11 #include "Keyboard.h" 11 #include "Keyboard.h"
12 #include "Joystick.h" 12 #include "Joystick.h"
13 #include <wchar.h>
14
13 15
14 extern void post2runLoop(void *); 16 extern void post2runLoop(void *);
15 extern void post2runDraw(void *); 17 extern void post2runDraw(void *);
16 18
17 /* measure for FPS (Frame Per Second) */ 19 /* measure for FPS (Frame Per Second) */
110 extern void create_cube_split(int); 112 extern void create_cube_split(int);
111 extern void panel_init(int); 113 extern void panel_init(int);
112 extern void universe_init(void); 114 extern void universe_init(void);
113 extern void ieshoot_init(void); 115 extern void ieshoot_init(void);
114 extern void ball_bound_init(int, int); 116 extern void ball_bound_init(int, int);
117 extern void lcube_init(int, int);
118 extern void direction_init(void);
115 119
116 void 120 void
117 Viewer::run_init(const char *xml, int sg_number) 121 Viewer::run_init(const char *xml, int sg_number)
118 { 122 {
119 HTaskPtr task_next; 123 HTaskPtr task_next;
142 case 6: 146 case 6:
143 ieshoot_init(); 147 ieshoot_init();
144 break; 148 break;
145 case 7: 149 case 7:
146 ball_bound_init(this->width, this->height); 150 ball_bound_init(this->width, this->height);
151 break;
152 case 8:
153 lcube_init(this->width, this->height);
154 break;
155 case 9:
156 direction_init();
147 break; 157 break;
148 default: 158 default:
149 node_init(); 159 node_init();
150 break; 160 break;
151 } 161 }
309 319
310 task_next = manager->create_task(TASK_DUMMY); 320 task_next = manager->create_task(TASK_DUMMY);
311 task_next->set_post(post2runLoop, NULL); 321 task_next->set_post(post2runLoop, NULL);
312 322
313 ppack->clear(); 323 ppack->clear();
314 int hoge = 0;
315 for (int i = 0; i < spackList_length; i++) { 324 for (int i = 0; i < spackList_length; i++) {
316 SpanPack *spack = &spackList[i]; 325 SpanPack *spack = &spackList[i];
317 int startx = 1; 326 int startx = 1;
318 int endx = split_screen_w; 327 int endx = split_screen_w;
319 328
344 (endx - startx + 1)*sizeof(int)); 353 (endx - startx + 1)*sizeof(int));
345 } 354 }
346 #else 355 #else
347 memset(&pixels[(startx-1)+this->width*(starty-1)], 356 memset(&pixels[(startx-1)+this->width*(starty-1)],
348 0xFF, (this->width)*sizeof(int)*rangey); 357 0xFF, (this->width)*sizeof(int)*rangey);
358 //wmemset((wchar_t*)&pixels[(startx-1)+this->width*(starty-1)],
359 //0xFFFFFFFF, (this->width)*sizeof(int)*rangey/sizeof(wchar_t));
349 break; 360 break;
350 #endif 361 #endif
351 } 362 }
352 363
353 task_draw->add_param(startx); 364 task_draw->add_param(startx);