annotate TaskManager/Test/test_render/SpanPack.h @ 126:7635f223fc7d

fix RGBA mask (bgr -> rgba)
author gongo@charles.cr.ie.u-ryukyu.ac.jp
date Tue, 25 Nov 2008 11:37:57 +0900
parents 5c194c71eca8
children fc314f28b66e
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
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8 #define MAX_SIZE_SPAN 70
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 {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13 int size; // 4
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14 int y_top; // 4
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15 int light_pos[3]; // 4*3
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
16 int light_rgb[3]; // 4*3
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
17 } info; // 32
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
18
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
19 Span span[MAX_SIZE_SPAN]; // 48*MAX_SIZE_SPAN = 3360
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
20 SpanPack *next; // 4
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
21
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22 int pad[3]; // 12
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
23
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
24 void init(int ytop) {
126
7635f223fc7d fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
25 this->info.size = 0;
7635f223fc7d fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
26 this->info.y_top = ytop;
7635f223fc7d fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
27 this->next = NULL;
7635f223fc7d fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
28 }
7635f223fc7d fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
29
7635f223fc7d fix RGBA mask (bgr -> rgba)
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
30 void reinit(int ytop) {
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
31 SpanPack* top = this;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
32 SpanPack* p;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
33 SpanPack* p1;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
34
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
35 p = top->next;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
36 while (p != NULL) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
37 p1 = p->next;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
38 free(p);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
39 p = p1;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
40 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
41
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
42 this->info.size = 0;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
43 this->info.y_top = ytop;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
44 this->next = NULL;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
45 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
46 };
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
47
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
48 typedef SpanPack* SpanPackPtr;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
49
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
50 #endif