283
|
1 #ifndef INCLUDED_SPAN
|
|
2 #define INCLUDED_SPAN
|
|
3
|
539
|
4 #include "Tapestry.h"
|
|
5 #include "types.h"
|
283
|
6
|
|
7 #define MAX_TILE_LIST 64
|
|
8
|
|
9 #if 0
|
|
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+64*sizeof(Tile) = 16+768
|
|
27 #endif
|
|
28
|
|
29 class Span {
|
|
30 public:
|
|
31 uint32 *tex_addr;
|
|
32 int tex_width;
|
|
33 int tex_height;
|
|
34 int x;
|
|
35 int y;
|
|
36 int length_x;
|
|
37 float start_z;
|
|
38 float end_z;
|
|
39 float tex_x1;
|
|
40 float tex_x2;
|
|
41 float tex_y1;
|
|
42 float tex_y2;
|
539
|
43 float normal_x;
|
|
44 float normal_y;
|
|
45 float normal_z;
|
283
|
46
|
|
47 #if 0
|
|
48 TileInfoListPtr tilelist;
|
|
49 #endif
|
|
50
|
|
51 #if 0
|
|
52 void init(void) {
|
|
53 tilelist = 0;
|
|
54 }
|
|
55
|
|
56 void reinit(void) {
|
|
57 TileInfoListPtr tlist = this->tilelist;
|
|
58 TileInfoListPtr t;
|
|
59
|
|
60 while (tlist) {
|
|
61 t = tlist->next;
|
|
62 free(tlist);
|
|
63 tlist = t;
|
|
64 }
|
|
65
|
|
66 tilelist = 0;
|
|
67 }
|
|
68 #endif
|
|
69 };
|
|
70
|
|
71 typedef Span* SpanPtr;
|
|
72
|
|
73 #endif
|