Mercurial > hg > Game > Cerium
diff Renderer/test_render/Span.h @ 283:15bfacccde99 draft
fix test_render
author | e065746@localhost.localdomain |
---|---|
date | Fri, 05 Jun 2009 16:49:12 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Renderer/test_render/Span.h Fri Jun 05 16:49:12 2009 +0900 @@ -0,0 +1,75 @@ +#ifndef INCLUDED_SPAN +#define INCLUDED_SPAN + +#ifndef INCLUDED_TAPESTRY +# include "Tapestry.h" +#endif + +#ifndef INCLUDED_TYPES +# include "types.h" +#endif + +#define MAX_TILE_LIST 64 + +#if 0 +typedef struct tile { + void *tile; + int tix, tiy; + //int padding; // 16バイト倍数にする用 +} TileInfo, *TileInfoPtr; + +typedef struct tile_list { + int size; + struct tile_list *next; + int pad[2]; + TileInfo tileinfo[MAX_TILE_LIST]; + + void init(void) { + size = 0; + next = 0; + } +} TileInfoList, *TileInfoListPtr; // 4*4+64*sizeof(Tile) = 16+768 +#endif + +class Span { +public: + uint32 *tex_addr; + int tex_width; + int tex_height; + int x; + int y; + int length_x; + float start_z; + float end_z; + float tex_x1; + float tex_x2; + float tex_y1; + float tex_y2; + +#if 0 + TileInfoListPtr tilelist; +#endif + +#if 0 + void init(void) { + tilelist = 0; + } + + void reinit(void) { + TileInfoListPtr tlist = this->tilelist; + TileInfoListPtr t; + + while (tlist) { + t = tlist->next; + free(tlist); + tlist = t; + } + + tilelist = 0; + } +#endif +}; + +typedef Span* SpanPtr; + +#endif