Mercurial > hg > Game > Cerium
view TaskManager/Test/test_render/Span.h @ 176:be90197f90d4 draft
fix
author | gongo@localhost.localdomain |
---|---|
date | Tue, 16 Dec 2008 17:01:24 +0900 |
parents | dc7d10ae7460 |
children | e3b7776b1420 |
line wrap: on
line source
#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 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 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; TileInfoListPtr tilelist; int pad[3]; 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; } }; typedef Span* SpanPtr; #endif