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
|
|
|
|
2001-06-04 21:01:17 +02:00
|
|
|
virtual void SetScale(int S) {CurrentScaleX=CurrentScaleY=S;}
|
|
|
|
virtual void SetScaleX(int S) {CurrentScaleX=S;}
|
|
|
|
virtual void SetScaleY(int S) {CurrentScaleY=S;}
|
|
|
|
virtual void SetHeading(int H) {CurrentHeading=H;}
|
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-06-04 21:01:17 +02:00
|
|
|
s32 CurrentScaleX;
|
|
|
|
s32 CurrentScaleY;
|
|
|
|
s16 CurrentHeading;
|
2001-05-23 21:28:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|