Mercurial > hg > Members > kono > Cerium
view TaskManager/Test/test_render/Span.h @ 164:38cbb7aecc70
TilePtr は SPE で計算した方がいいと判断して変更。
author | gongo@gendarme.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 09 Dec 2008 10:48:49 +0900 |
parents | 1f4c3f3238e6 |
children | 5cde66c926b4 |
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