SBSPSS/source/gfx/actor.h

66 lines
1.5 KiB
C
Raw Normal View History

2001-04-01 22:22:49 +02:00
/*******************/
/*** Actor Stuff ***/
/*******************/
2001-04-01 09:22:30 +02:00
#ifndef __ACTOR_HEADER__
#define __ACTOR_HEADER__
#include "system\global.h"
#include <dstructs.h>
#ifndef __BigLump_H__
#include <biglump.h>
#endif
/*****************************************************************************/
class CActorGfx
{
public:
2001-04-02 00:55:15 +02:00
CActorGfx(FileEquate Filename,int No);
2001-04-01 22:22:49 +02:00
virtual ~CActorGfx();
2001-04-01 09:22:30 +02:00
2001-04-01 22:22:49 +02:00
void Init(FileEquate _Filename);
2001-04-01 23:38:59 +02:00
POLY_FT4 *Render(DVECTOR &Pos,int Anim,int Frame,bool FlipX=false,bool FlipY=false,bool Shadow=false);
2001-04-01 22:22:49 +02:00
void Dump();
2001-04-01 09:22:30 +02:00
2001-04-01 22:22:49 +02:00
int getFrameCount(int Anim) {return(SpriteBank->AnimList[Anim].FrameCount);}
2001-04-02 00:55:15 +02:00
int getFrameWidth(int Anim,int Frame);
int getFrameHeight(int Anim,int Frame);
2001-04-01 09:22:30 +02:00
2001-04-01 23:38:59 +02:00
FileEquate GetFilename() {return(Filename);}
2001-04-01 09:22:30 +02:00
private:
2001-04-01 23:38:59 +02:00
void SetUpFT4(POLY_FT4 *Ft4,sSpriteFrame *ThisFrame,int X,int Y,bool XFlip,bool YFlip);
2001-04-01 09:22:30 +02:00
FileEquate Filename;
2001-04-01 22:22:49 +02:00
sSpriteAnimBank *SpriteBank;
2001-04-02 00:55:15 +02:00
int ActorNo; // qwik bodge for mo :oP
int TexX,TexY;
int ClutX,ClutY;
2001-04-01 09:22:30 +02:00
};
/*****************************************************************************/
2001-04-01 22:22:49 +02:00
class CActorPool
2001-04-01 09:22:30 +02:00
{
public:
enum
{
MAX_ACTORS=8,
};
static void Init();
static void AddActor(FileEquate Filename) {GetActor(Filename);}
static CActorGfx *GetActor(FileEquate Filename);
static void DumpActor(FileEquate Filename);
private:
static int FindIdx(FileEquate Filename);
static int FindFreeIdx();
static CActorGfx *ActorList[MAX_ACTORS];
};
/*****************************************************************************/
#endif