diff Renderer/Engine/Span.h @ 507:735f76483bb2

Reorganization..
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 12 Oct 2009 09:39:35 +0900
parents Renderer/test_render/Span.h@55ea4465b1a2
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Renderer/Engine/Span.h	Mon Oct 12 09:39:35 2009 +0900
@@ -0,0 +1,73 @@
+#ifndef INCLUDED_SPAN
+#define INCLUDED_SPAN
+
+#include "Tapestry.h"
+#include "types.h"
+
+#define MAX_TILE_LIST 64
+
+#if 0
+typedef struct tile {
+    void *tile;
+    int tix, tiy;
+     //int padding; // 16バイト倍数にする用
+} TileInfo, *TileInfoPtr;
+
+typedef struct tile_list {
+    int size;
+    struct tile_list *next;
+    int pad[2];
+    TileInfo tileinfo[MAX_TILE_LIST];
+
+    void init(void) {
+	size = 0;
+	next = 0;
+    }
+} TileInfoList, *TileInfoListPtr; // 4*4+64*sizeof(Tile) = 16+768
+#endif
+
+class Span {
+public:
+    uint32 *tex_addr;
+    int tex_width;
+    int tex_height;
+    int x;
+    int y;
+    int length_x;
+    float start_z;
+    float end_z;
+    float tex_x1;
+    float tex_x2;
+    float tex_y1;
+    float tex_y2;
+    float normal_x;
+    float normal_y;
+    float normal_z;
+
+#if 0
+    TileInfoListPtr tilelist;
+#endif
+
+#if 0
+    void init(void) {
+	tilelist = 0;
+    }
+    
+    void reinit(void) {
+	TileInfoListPtr tlist = this->tilelist;
+	TileInfoListPtr t;
+
+	while (tlist) {
+	    t = tlist->next;
+	    free(tlist);
+	    tlist = t;
+	}
+
+	tilelist = 0;
+    }
+#endif
+};
+
+typedef Span* SpanPtr;
+
+#endif