view TaskManager/Test/test_render/Span.h @ 145:a5138d6e8996 draft

fix
author gongo@gendarme.cr.ie.u-ryukyu.ac.jp
date Tue, 02 Dec 2008 12:46:54 +0900
parents 56db76a03294
children a98dbb81db5c
line wrap: on
line source

#ifndef INCLUDED_SPAN
#define INCLUDED_SPAN

#ifndef INCLUDED_TAPESTRY
#  include "Tapestry.h"
#endif

#define MAX_TILE_LIST 30

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+63*sizeof(Tile) = 1008+16

class Span {
public:
    long *tex_addr;
    long tex_width;
    long 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;

    TileInfoListPtr tilelist;
    int pad[3];
};

typedef Span* SpanPtr;

#endif