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-01 23:38:59 +02:00
|
|
|
FileEquate GetFilename() {return(Filename);}
|
2001-04-02 22:24:58 +02:00
|
|
|
|
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-02 20:25:09 +02:00
|
|
|
sSpriteFrame *GetFrame(int Anim,int Frame);
|
2001-04-01 23:38:59 +02:00
|
|
|
|
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,
|
2001-04-02 20:25:09 +02:00
|
|
|
MAX_ACTOR_SIZE=128*128,
|
2001-04-01 09:22:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
static void Init();
|
|
|
|
|
|
|
|
static void AddActor(FileEquate Filename) {GetActor(Filename);}
|
|
|
|
static CActorGfx *GetActor(FileEquate Filename);
|
2001-04-03 23:28:56 +02:00
|
|
|
static void DumpActors();
|
2001-04-01 09:22:30 +02:00
|
|
|
|
2001-04-02 20:25:09 +02:00
|
|
|
static u8 UnpackBuffer[MAX_ACTOR_SIZE];
|
|
|
|
|
2001-04-01 09:22:30 +02:00
|
|
|
private:
|
|
|
|
static int FindIdx(FileEquate Filename);
|
|
|
|
static int FindFreeIdx();
|
|
|
|
|
|
|
|
static CActorGfx *ActorList[MAX_ACTORS];
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
#endif
|