Mercurial > hg > Members > kono > Cerium
comparison TaskManager/Test/test_render/Tapestry.h @ 173:56be4a6e5513
add scale
author | gongo@localhost.localdomain |
---|---|
date | Thu, 11 Dec 2008 20:17:01 +0900 |
parents | c8b868871dce |
children | 08e2bb36639b |
comparison
equal
deleted
inserted
replaced
171:dc68bc5c9e41 | 173:56be4a6e5513 |
---|---|
86 int pad[3]; | 86 int pad[3]; |
87 } Tile, *TilePtr; | 87 } Tile, *TilePtr; |
88 | 88 |
89 #define MAX_TILE 100 | 89 #define MAX_TILE 100 |
90 | 90 |
91 typedef struct { | 91 class TileList { |
92 int size; | 92 public: |
93 int curIndex; | |
93 int pad[3]; | 94 int pad[3]; |
94 Tile tile[MAX_TILE]; | 95 Tile tile[MAX_TILE]; |
95 | 96 |
96 void init(void) { | 97 TileList(void) { |
97 size = 0; | 98 curIndex = 0; |
98 } | 99 } |
99 } TileList, *TileListPtr; | 100 |
101 /** | |
102 * tile[] をリングバスっぽく扱うことで | |
103 * FIFO を実現することに。 | |
104 */ | |
105 TilePtr nextTile(void) { | |
106 TilePtr t = &tile[curIndex]; | |
107 curIndex = (curIndex + 1) % MAX_TILE; | |
108 return t; | |
109 } | |
110 | |
111 void clear(void) { | |
112 curIndex = 0; | |
113 } | |
114 }; | |
115 | |
116 typedef TileList* TileListPtr; | |
100 | 117 |
101 #endif | 118 #endif |