SBSPSS/source/fx/fxbaseanim.h

51 lines
968 B
C
Raw Normal View History

2001-05-23 21:28:42 +02:00
/***********************/
/*** Anim Base Class ***/
/***********************/
2001-05-23 22:00:25 +02:00
#ifndef __FX_FX_BASE_ANIM_HEADER__
#define __FX_FX_BASE_ANIM_HEADER__
2001-05-23 21:28:42 +02:00
#include "fx/fx.h"
/*****************************************************************************/
2001-05-23 22:00:25 +02:00
class CFXBaseAnim : public CFX
2001-05-23 21:28:42 +02:00
{
public:
2001-06-01 00:02:07 +02:00
struct sFXAnim
2001-05-31 22:07:48 +02:00
{
2001-06-01 00:02:07 +02:00
s16 Scale;
s16 StartFrame,EndFrame;
s16 FrameShift;
u8 R,G,B;
u8 Flags;
DVECTOR Velocity;
u16 EndFX;
};
enum FXAnim_Flags
{
FXANIM_FLAG_LOOP =1<<0,
FXANIM_FLAG_COLLIDE_KILL =1<<1,
FXANIM_FLAG_HAS_GRAVITY =1<<2,
2001-05-31 22:07:48 +02:00
};
2001-05-23 21:28:42 +02:00
virtual void init(DVECTOR const &Pos);
virtual void shutdown();
virtual void think(int _frames);
virtual void render();
2001-06-01 00:02:07 +02:00
virtual void killFX();
void setData(void *Data) {DataPtr=(sFXAnim*)Data;}
2001-05-31 22:07:48 +02:00
virtual void SetScale(int S) {CurrentScale=S;}
2001-05-23 21:28:42 +02:00
protected:
2001-06-01 00:02:07 +02:00
sFXAnim *DataPtr;
2001-06-01 17:10:05 +02:00
s16 VelY;
2001-06-01 00:02:07 +02:00
s16 MaxFrame;
2001-05-31 22:07:48 +02:00
s16 CurrentFrame;
2001-06-01 17:10:05 +02:00
u16 renderFrame;
2001-05-31 22:07:48 +02:00
s16 CurrentScale;
2001-05-23 21:28:42 +02:00
};
#endif