comparison Renderer/test_render/Span.h @ 283:55ea4465b1a2

fix test_render
author e065746@localhost.localdomain
date Fri, 05 Jun 2009 16:49:12 +0900
parents
children
comparison
equal deleted inserted replaced
282:ef061be0baff 283:55ea4465b1a2
1 #ifndef INCLUDED_SPAN
2 #define INCLUDED_SPAN
3
4 #ifndef INCLUDED_TAPESTRY
5 # include "Tapestry.h"
6 #endif
7
8 #ifndef INCLUDED_TYPES
9 # include "types.h"
10 #endif
11
12 #define MAX_TILE_LIST 64
13
14 #if 0
15 typedef struct tile {
16 void *tile;
17 int tix, tiy;
18 //int padding; // 16バイト倍数にする用
19 } TileInfo, *TileInfoPtr;
20
21 typedef struct tile_list {
22 int size;
23 struct tile_list *next;
24 int pad[2];
25 TileInfo tileinfo[MAX_TILE_LIST];
26
27 void init(void) {
28 size = 0;
29 next = 0;
30 }
31 } TileInfoList, *TileInfoListPtr; // 4*4+64*sizeof(Tile) = 16+768
32 #endif
33
34 class Span {
35 public:
36 uint32 *tex_addr;
37 int tex_width;
38 int tex_height;
39 int x;
40 int y;
41 int length_x;
42 float start_z;
43 float end_z;
44 float tex_x1;
45 float tex_x2;
46 float tex_y1;
47 float tex_y2;
48
49 #if 0
50 TileInfoListPtr tilelist;
51 #endif
52
53 #if 0
54 void init(void) {
55 tilelist = 0;
56 }
57
58 void reinit(void) {
59 TileInfoListPtr tlist = this->tilelist;
60 TileInfoListPtr t;
61
62 while (tlist) {
63 t = tlist->next;
64 free(tlist);
65 tlist = t;
66 }
67
68 tilelist = 0;
69 }
70 #endif
71 };
72
73 typedef Span* SpanPtr;
74
75 #endif