Mercurial > hg > Game > Cerium
annotate TaskManager/Test/test_render/Span.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 | 80d93fe0601d |
children | a98dbb81db5c |
rev | line source |
---|---|
109 | 1 #ifndef INCLUDED_SPAN |
2 #define INCLUDED_SPAN | |
3 | |
113
80d93fe0601d
Define New Texture Data Structure
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
4 #ifndef INCLUDED_TAPESTRY |
80d93fe0601d
Define New Texture Data Structure
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
5 # include "Tapestry.h" |
80d93fe0601d
Define New Texture Data Structure
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
6 #endif |
80d93fe0601d
Define New Texture Data Structure
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
7 |
141 | 8 #define MAX_TILE_LIST 30 |
9 | |
10 typedef struct tile { | |
11 void *tile; | |
12 int tix, tiy; | |
13 int padding; // 16バイト倍数にする用 | |
14 } TileInfo, *TileInfoPtr; | |
15 | |
16 typedef struct tile_list { | |
17 int size; | |
18 struct tile_list *next; | |
19 int pad[2]; | |
20 TileInfo tileinfo[MAX_TILE_LIST]; | |
21 | |
22 void init(void) { | |
23 size = 0; | |
24 next = 0; | |
25 } | |
26 } TileInfoList, *TileInfoListPtr; // 4*4+63*sizeof(Tile) = 1008+16 | |
27 | |
109 | 28 class Span { |
29 public: | |
30 long *tex_addr; | |
31 long tex_width; | |
32 long tex_height; | |
33 int x; | |
34 int y; | |
35 int length_x; | |
36 float start_z; | |
37 float end_z; | |
38 float tex_x1; | |
39 float tex_x2; | |
40 float tex_y1; | |
41 float tex_y2; | |
113
80d93fe0601d
Define New Texture Data Structure
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
42 |
141 | 43 TileInfoListPtr tilelist; |
44 int pad[3]; | |
109 | 45 }; |
46 | |
141 | 47 typedef Span* SpanPtr; |
48 | |
109 | 49 #endif |