comparison TaskManager/Test/test_render/SpanPack.h @ 146:2284efc89f63

TileList の生成の修正
author gongo@gendarme.cr.ie.u-ryukyu.ac.jp
date Tue, 02 Dec 2008 14:12:01 +0900
parents fc314f28b66e
children 5cde66c926b4
comparison
equal deleted inserted replaced
145:a8805e484c46 146:2284efc89f63
38 p = top->next; 38 p = top->next;
39 while (p != NULL) { 39 while (p != NULL) {
40 p1 = p->next; 40 p1 = p->next;
41 for (int i = 0; i < p->info.size; i++) { 41 for (int i = 0; i < p->info.size; i++) {
42 Span* span = &p->span[i]; 42 Span* span = &p->span[i];
43 TileInfoListPtr tlist = span->tilelist; 43 span->reinit();
44 TileInfoListPtr t;
45
46 while (tlist) {
47 t = tlist->next;
48 free(tlist);
49 tlist = t;
50 }
51 } 44 }
52
53 free(p); 45 free(p);
54 p = p1; 46 p = p1;
55 } 47 }
56 48
57 for (int i = 0; i < this->info.size; i++) { 49 for (int i = 0; i < this->info.size; i++) {
58 Span* span = &this->span[i]; 50 Span* span = &this->span[i];
59 TileInfoListPtr tlist = span->tilelist; 51 span->reinit();
60 TileInfoListPtr t;
61
62 while (tlist) {
63 t = tlist->next;
64 free(tlist);
65 tlist = t;
66 }
67 } 52 }
68 53
69 this->info.size = 0; 54 this->info.size = 0;
70 this->info.y_top = ytop; 55 this->info.y_top = ytop;
71 this->next = NULL; 56 this->next = NULL;