SBSPSS/source/game/healthman.h

59 lines
991 B
C
Raw Normal View History

2001-06-14 23:08:42 +02:00
/******************************/
/*** Health throw out stuff ***/
/******************************/
2001-06-14 17:28:07 +02:00
2001-06-14 23:08:42 +02:00
#ifndef __GAME_HEALTH_MANAGER_H__
#define __GAME_HEALTH_MANAGER_H__
2001-06-14 17:28:07 +02:00
2001-06-14 23:08:42 +02:00
/*****************************************************************************/
class CPlayer;
class CHealthManager
2001-06-14 17:28:07 +02:00
{
public:
2001-06-14 23:08:42 +02:00
enum
{
2001-08-16 22:05:31 +02:00
SPAT_CLUMP = 5,
SPAT_MAX = (100/SPAT_CLUMP)+(SPAT_CLUMP-1),
SPAT_LIFE = 256,
2001-06-14 23:08:42 +02:00
};
struct sItemTable
{
2001-08-16 22:05:31 +02:00
u8 Count;
2001-06-14 23:08:42 +02:00
u8 R,G,B;
};
struct sItem
{
VECTOR Pos;
VECTOR Vel;
DVECTOR ScrPos;
u16 Life;
u16 Count;
2001-08-16 22:05:31 +02:00
TSPRT Sprite[2];
2001-06-14 23:08:42 +02:00
};
void init();
void shutdown();
2001-07-23 21:26:37 +02:00
void drop(DVECTOR const &Pos,int Amount,int Vel);
2001-06-14 23:08:42 +02:00
void checkPlayerCol(CPlayer *Thing);
void think(int frames);
void render();
protected:
2001-07-23 21:26:37 +02:00
void addItem(DVECTOR const &Pos,int TableIdx,int Angle,int Vel);
2001-06-14 23:08:42 +02:00
2001-08-16 22:05:31 +02:00
sItem ItemList[SPAT_MAX];
2001-06-14 23:08:42 +02:00
sFrameHdr *FrameHdr;
2001-08-16 22:05:31 +02:00
int Frame;
2001-06-14 23:08:42 +02:00
static sItemTable ItemTable[];
static const int ItemTableSize;
2001-06-14 17:28:07 +02:00
};
2001-06-14 23:08:42 +02:00
#endif