Mercurial > hg > Game > Cerium
view TaskManager/Test/test_render/polygon_pack.h @ 141:56db76a03294 draft
TileList を作ろうとしたがに動かない。
今はTileList 無しver
author | gongo@charles.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Sat, 29 Nov 2008 01:18:32 +0900 |
parents | 028ffc9c0375 |
children | dc7d10ae7460 |
line wrap: on
line source
#ifndef INCLUDED_POLYGON_PACK #define INCLUDED_POLYGON_PACK #define MAX_SIZE_TRIANGLE 128 typedef struct VertexPack { float x; float y; float z; float tex_x; float tex_y; }VertexPack, *VertexPackPtr; typedef struct TrianglePack { long *tex_addr, tex_width, tex_height; VertexPack ver1; VertexPack ver2; VertexPack ver3; } TrianglePack, *TrianglePackPtr; typedef struct PolygonPack { struct PORIGON_info { int size; int light_pos[3]; int light_rgb[3]; }info; TrianglePack tri[MAX_SIZE_TRIANGLE]; // Variable length array PolygonPack* next; void init(void) { info.size = 0; next = 0; } void clear(void) { PolygonPack *q = 0; PolygonPack *q1 = 0; q = this->next; while (q) { q1 = q->next; delete(q); q = q1; } this->init(); } } PolygonPack, *PolygonPackPtr; typedef struct PolygonPackList { int size; //PolygonPack *list[6]; PolygonPack *list; } PolygonPackList; #endif