SBSPSS/source/level/layerback.h

93 lines
1.5 KiB
C
Raw Normal View History

2001-01-13 18:04:56 +01:00
/************************/
/*** Back Layer Class ***/
/************************/
#ifndef __LAYER_BACK_H__
#define __LAYER_BACK_H__
/*****************************************************************************/
2001-03-09 23:10:53 +01:00
struct sBackSpriteInfo
{
int Frame;
int Flags;
u16 Trans;
};
enum BackSpriteFlag
{
};
2001-03-09 22:17:14 +01:00
struct sBackSprite
{
2001-03-09 23:10:53 +01:00
int Type;
2001-03-09 22:17:14 +01:00
POLY_GT4 Poly;
DVECTOR Pos,PosInc;
DVECTOR Scale,ScaleInc;
int W,H;
s16 Angle,AngleInc;
};
2001-03-09 23:10:53 +01:00
struct sBackRGBTable
{
u8 R,G,B,P;
};
2001-03-09 22:17:14 +01:00
/*****************************************************************************/
class SpriteBank;
2001-01-13 18:04:56 +01:00
class CLayerBack : public CLayerTile
{
public:
2001-03-09 22:17:14 +01:00
enum
{
MOVE_SHIFT=4,
SPRITE_MAX=16,
2001-03-09 23:10:53 +01:00
NO_SPIN=1<<0,
NO_SCALE=1<<1,
NO_MOVE=1<<2,
NO_COLOR=1<<3,
};
enum BackSpriteType
{
FLOWER=0,
GHOST,
PUMPKIN,
BUBBLE,
BUBBLESMALL,
2001-03-12 20:23:41 +01:00
FISHBONE,
2001-03-09 22:17:14 +01:00
};
2001-03-08 00:20:09 +01:00
CLayerBack(sLayerHdr *Hdr,sTile *TileBank);
2001-01-13 18:04:56 +01:00
~CLayerBack();
2001-02-22 15:55:13 +01:00
void init(DVECTOR &MapPos,int Shift);
2001-03-09 23:10:53 +01:00
void SetFrames(int Spr0,int Spr1);
2001-01-13 18:04:56 +01:00
void shutdown();
void think(DVECTOR &MapPos);
void render();
protected:
2001-03-09 22:17:14 +01:00
void InitSprite(sBackSprite *SpritePtr);
2001-02-20 20:17:03 +01:00
2001-02-20 16:56:16 +01:00
sLayerShadeHdr *Data;
2001-03-09 22:17:14 +01:00
int XOfs,YOfs;
int PosDx,PosDy;
2001-02-20 20:17:03 +01:00
int BandCount,BandHeight;
POLY_G4 Band[LAYER_SHADE_RGB_MAX-1];
2001-01-13 18:04:56 +01:00
2001-03-09 22:17:14 +01:00
SpriteBank *Sprites;
sBackSprite SpriteList[SPRITE_MAX];
2001-03-09 23:10:53 +01:00
static sBackRGBTable BackRGBTable[];
static sBackSpriteInfo InfoTab[];
2001-01-13 18:04:56 +01:00
};
/*****************************************************************************/
#endif