Mercurial > hg > Members > kono > Cerium
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TaskManager/Test/test_render/SpanPack.h Wed Nov 12 17:39:33 2008 +0900 @@ -0,0 +1,44 @@ +#ifndef INCLUDED_SPAN_PACK +#define INCLUDED_SPAN_PACK + +#ifndef INCLUDED_SPAN +# include "Span.h" +#endif + +#define MAX_SIZE_SPAN 70 + +class SpanPack { +public: /* fields */ + struct SpanInfo { + int size; // 4 + int y_top; // 4 + int light_pos[3]; // 4*3 + int light_rgb[3]; // 4*3 + } info; // 32 + + Span span[MAX_SIZE_SPAN]; // 48*MAX_SIZE_SPAN = 3360 + SpanPack *next; // 4 + + int pad[3]; // 12 + + void init(int ytop) { + SpanPack* top = this; + SpanPack* p; + SpanPack* p1; + + p = top->next; + while (p != NULL) { + p1 = p->next; + free(p); + p = p1; + } + + this->info.size = 0; + this->info.y_top = ytop; + this->next = NULL; + } +}; + +typedef SpanPack* SpanPackPtr; + +#endif