Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Test/test_render/SpanPack.h @ 180:5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
author | gongo@localhost.localdomain |
---|---|
date | Mon, 22 Dec 2008 16:09:57 +0900 |
parents | 2284efc89f63 |
children | 25c820b6060e |
rev | line source |
---|---|
109 | 1 #ifndef INCLUDED_SPAN_PACK |
2 #define INCLUDED_SPAN_PACK | |
3 | |
4 #ifndef INCLUDED_SPAN | |
5 # include "Span.h" | |
6 #endif | |
7 | |
180
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
146
diff
changeset
|
8 #define MAX_SIZE_SPAN 64 |
109 | 9 |
10 class SpanPack { | |
11 public: /* fields */ | |
12 struct SpanInfo { | |
180
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
146
diff
changeset
|
13 int start; |
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
146
diff
changeset
|
14 int size; |
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
146
diff
changeset
|
15 int y_top; |
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
146
diff
changeset
|
16 int light_pos[3]; |
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
146
diff
changeset
|
17 int light_rgb[3]; |
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
146
diff
changeset
|
18 } info; // 36 |
109 | 19 |
180
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
146
diff
changeset
|
20 Span span[MAX_SIZE_SPAN]; // 48*MAX_SIZE_SPAN = 3072 |
109 | 21 SpanPack *next; // 4 |
22 | |
180
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
146
diff
changeset
|
23 int pad[2]; // 8 |
109 | 24 |
25 void init(int ytop) { | |
180
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
146
diff
changeset
|
26 this->info.start = 0; |
126
7635f223fc7d
fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
27 this->info.size = 0; |
7635f223fc7d
fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
28 this->info.y_top = ytop; |
7635f223fc7d
fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
29 this->next = NULL; |
7635f223fc7d
fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
30 } |
7635f223fc7d
fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
31 |
7635f223fc7d
fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
32 void reinit(int ytop) { |
109 | 33 SpanPack* top = this; |
34 SpanPack* p; | |
35 SpanPack* p1; | |
36 | |
37 p = top->next; | |
38 while (p != NULL) { | |
39 p1 = p->next; | |
40 free(p); | |
41 p = p1; | |
42 } | |
43 | |
180
5cde66c926b4
いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents:
146
diff
changeset
|
44 this->info.start = 0; |
109 | 45 this->info.size = 0; |
46 this->info.y_top = ytop; | |
47 this->next = NULL; | |
48 } | |
49 }; | |
50 | |
51 typedef SpanPack* SpanPackPtr; | |
52 | |
53 #endif |