Mercurial > hg > Game > Cerium
comparison TaskManager/Test/test_render/viewer.cpp @ 180:e3b7776b1420 draft
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
author | gongo@localhost.localdomain |
---|---|
date | Mon, 22 Dec 2008 16:09:57 +0900 |
parents | deb02b0e6291 |
children | a19d3ed4ce5b 2b7d631695ca |
comparison
equal
deleted
inserted
replaced
179:6e62f8cfbfe3 | 180:e3b7776b1420 |
---|---|
110 extern void create_cube_split(int); | 110 extern void create_cube_split(int); |
111 extern void create_snake_bg(int); | 111 extern void create_snake_bg(int); |
112 extern void universe_init(void); | 112 extern void universe_init(void); |
113 | 113 |
114 void | 114 void |
115 Viewer::run_init(char *xml, int sg_number) | 115 Viewer::run_init(const char *xml, int sg_number) |
116 { | 116 { |
117 HTaskPtr task_next; | 117 HTaskPtr task_next; |
118 HTaskPtr task_tex; | 118 HTaskPtr task_tex; |
119 | 119 |
120 start_time = get_ticks(); | 120 start_time = get_ticks(); |
321 for (int i = 0; i < spackList_length; i++) { | 321 for (int i = 0; i < spackList_length; i++) { |
322 SpanPack *spack = &spackList[i]; | 322 SpanPack *spack = &spackList[i]; |
323 int startx = 1; | 323 int startx = 1; |
324 int endx = split_screen_w; | 324 int endx = split_screen_w; |
325 | 325 |
326 int start_y = spack->info.y_top - split_screen_h + 1; | 326 int starty = spack->info.y_top - split_screen_h + 1; |
327 //int end_y = spack->info.y_top; | 327 //int endy = spack->info.y_top; |
328 int rangey = (start_y + split_screen_h - 1 > this->height) | 328 int rangey = (starty + split_screen_h - 1 > this->height) |
329 ? this->height - start_y + 1 : split_screen_h; | 329 ? this->height - starty + 1 : split_screen_h; |
330 | 330 |
331 while (startx < this->width) { | 331 while (startx < this->width) { |
332 if (spack->info.size > 0) { | 332 if (spack->info.size > 0) { |
333 // Draw SpanPack | 333 // Draw SpanPack |
334 task_draw = manager->create_task(TASK_DRAW_SPAN); | 334 task_draw = manager->create_task(TASK_DRAW_SPAN); |
342 task_draw->add_param(0xffffffff); | 342 task_draw->add_param(0xffffffff); |
343 } | 343 } |
344 | 344 |
345 for (int k = 0; k < rangey; k++) { | 345 for (int k = 0; k < rangey; k++) { |
346 task_draw->add_outData( | 346 task_draw->add_outData( |
347 &pixels[(startx-1)+this->width*(k+start_y-1)], | 347 &pixels[(startx-1)+this->width*(k+starty-1)], |
348 (endx - startx + 1)*sizeof(int)); | 348 (endx - startx + 1)*sizeof(int)); |
349 } | 349 } |
350 | 350 |
351 task_draw->add_param(startx); | 351 task_draw->add_param(startx); |
352 task_draw->add_param(endx); | 352 task_draw->add_param(endx); |