SBSPSS/source/level/layertile3d.h

67 lines
1.4 KiB
C
Raw Normal View History

2000-12-14 17:38:34 +01:00
/***************************/
/*** 3d Tile Layer Class ***/
/***************************/
2000-12-14 17:01:49 +01:00
2001-03-09 00:02:47 +01:00
#ifndef __LAYER_TILE_3D_Hx__
#define __LAYER_TILE_3D_Hx__
2000-12-14 17:01:49 +01:00
2001-06-28 23:01:28 +02:00
#define CMX_SetRotMatrixXY( r0 ) __asm__ ( \
"lw $12, 0( %0 );" \
"lw $13, 4( %0 );" \
"ctc2 $12, $0;" \
"ctc2 $13, $2;" \
: \
: "r"( r0 ) \
: "$12", "$13")
struct sFlipTable
{
s16 Mtx[4];
2001-07-18 18:45:39 +02:00
DVECTOR *DeltaTab[8];
2001-06-28 23:01:28 +02:00
s32 ClipCode;
};
extern sFlipTable FlipTable[];
2000-12-14 17:01:49 +01:00
/*****************************************************************************/
2001-03-09 00:12:02 +01:00
class FontBank;
2000-12-14 17:38:34 +01:00
class CLayerTile3d : public CLayerTile
2000-12-14 17:01:49 +01:00
{
public:
2001-07-28 18:45:46 +02:00
CLayerTile3d(sLevelHdr *LevelHdr,sLayerHdr *Hdr,u8 *_RGBMap,u8 *_RGBTable);
2000-12-14 17:38:34 +01:00
~CLayerTile3d();
2001-06-28 19:48:30 +02:00
2001-02-22 15:55:13 +01:00
void init(DVECTOR &MapPos,int Shift);
2001-01-04 22:53:14 +01:00
void shutdown();
2001-03-09 00:02:47 +01:00
void think(DVECTOR &MapPos);
2001-01-04 22:53:14 +01:00
void render();
2000-12-14 17:01:49 +01:00
protected:
2001-07-12 22:10:15 +02:00
void CacheElemVtx(sElem3d *Elem);
2001-07-18 18:45:39 +02:00
void CalcDelta();
2001-07-12 22:10:15 +02:00
2001-06-28 19:48:30 +02:00
sElem3d *ElemBank3d;
2001-03-08 00:20:09 +01:00
sTri *TriList;
sQuad *QuadList;
sVtx *VtxList;
2001-07-12 22:10:15 +02:00
u16 *VtxIdxList;
2001-03-12 16:24:37 +01:00
DVECTOR RenderOfs;
2001-07-28 18:45:46 +02:00
u8 *RGBMap;
u8 *RGBTable;
2001-07-18 18:45:39 +02:00
s16 *FTableX[16];
s16 *FTableY[16];
s16 *BTableX[16];
s16 *BTableY[16];
DVECTOR DeltaFOfs;
DVECTOR DeltaBOfs;
s16 DeltaF,DeltaB;
2000-12-14 17:01:49 +01:00
};
/*****************************************************************************/
#endif