diff 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
line wrap: on
line diff
--- a/TaskManager/Test/test_render/viewer.cpp	Fri Dec 19 14:21:29 2008 +0900
+++ b/TaskManager/Test/test_render/viewer.cpp	Mon Dec 22 16:09:57 2008 +0900
@@ -112,7 +112,7 @@
 extern void universe_init(void);
 
 void
-Viewer::run_init(char *xml, int sg_number)
+Viewer::run_init(const char *xml, int sg_number)
 {
     HTaskPtr task_next;
     HTaskPtr task_tex;
@@ -323,10 +323,10 @@
 	int startx = 1;
 	int endx = split_screen_w;
 
-	int start_y = spack->info.y_top - split_screen_h + 1;
-	//int end_y = spack->info.y_top;
-	int rangey = (start_y + split_screen_h - 1 > this->height)
-	    ? this->height - start_y + 1 : split_screen_h;
+	int starty = spack->info.y_top - split_screen_h + 1;
+	//int endy = spack->info.y_top;
+	int rangey = (starty + split_screen_h - 1 > this->height)
+	    ? this->height - starty + 1 : split_screen_h;
 
 	while (startx < this->width) {
 	    if (spack->info.size > 0) {
@@ -344,7 +344,7 @@
 	    
 	    for (int k = 0; k < rangey; k++) {
 		task_draw->add_outData(
-		    &pixels[(startx-1)+this->width*(k+start_y-1)],
+		    &pixels[(startx-1)+this->width*(k+starty-1)],
 		    (endx - startx + 1)*sizeof(int));
 	    }