Mercurial > hg > Members > kono > Cerium
comparison TaskManager/Test/test_render/SpanPack.h @ 109:5c194c71eca8
Cerium cvs version
author | gongo@gendarme.local |
---|---|
date | Wed, 12 Nov 2008 17:39:33 +0900 |
parents | |
children | 7635f223fc7d |
comparison
equal
deleted
inserted
replaced
108:6f3b3dd3c095 | 109:5c194c71eca8 |
---|---|
1 #ifndef INCLUDED_SPAN_PACK | |
2 #define INCLUDED_SPAN_PACK | |
3 | |
4 #ifndef INCLUDED_SPAN | |
5 # include "Span.h" | |
6 #endif | |
7 | |
8 #define MAX_SIZE_SPAN 70 | |
9 | |
10 class SpanPack { | |
11 public: /* fields */ | |
12 struct SpanInfo { | |
13 int size; // 4 | |
14 int y_top; // 4 | |
15 int light_pos[3]; // 4*3 | |
16 int light_rgb[3]; // 4*3 | |
17 } info; // 32 | |
18 | |
19 Span span[MAX_SIZE_SPAN]; // 48*MAX_SIZE_SPAN = 3360 | |
20 SpanPack *next; // 4 | |
21 | |
22 int pad[3]; // 12 | |
23 | |
24 void init(int ytop) { | |
25 SpanPack* top = this; | |
26 SpanPack* p; | |
27 SpanPack* p1; | |
28 | |
29 p = top->next; | |
30 while (p != NULL) { | |
31 p1 = p->next; | |
32 free(p); | |
33 p = p1; | |
34 } | |
35 | |
36 this->info.size = 0; | |
37 this->info.y_top = ytop; | |
38 this->next = NULL; | |
39 } | |
40 }; | |
41 | |
42 typedef SpanPack* SpanPackPtr; | |
43 | |
44 #endif |