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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 #ifndef INCLUDED_SPAN_PACK
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 #define INCLUDED_SPAN_PACK
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4 #ifndef INCLUDED_SPAN
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5 # include "Span.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
7
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 146
diff changeset
8 #define MAX_SIZE_SPAN 64
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
9
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 class SpanPack {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 public: /* fields */
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
21 SpanPack *next; // 4
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 146
diff changeset
23 int pad[2]; // 8
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
24
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
33 SpanPack* top = this;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
34 SpanPack* p;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
35 SpanPack* p1;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
36
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
37 p = top->next;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
38 while (p != NULL) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
39 p1 = p->next;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
40 free(p);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
41 p = p1;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
42 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
43
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 146
diff changeset
44 this->info.start = 0;
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
45 this->info.size = 0;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
46 this->info.y_top = ytop;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
47 this->next = NULL;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
48 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
49 };
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
50
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
51 typedef SpanPack* SpanPackPtr;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
52
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
53 #endif