2001-02-20 23:53:35 +01:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
pickup.h
|
|
|
|
|
|
|
|
Author: PKG
|
|
|
|
Created:
|
|
|
|
Project: Spongebob
|
|
|
|
Purpose:
|
|
|
|
|
|
|
|
Copyright (c) 2001 Climax Development Ltd
|
|
|
|
|
|
|
|
===========================================================================*/
|
|
|
|
|
|
|
|
#ifndef __PICKUPS_PICKUP_H__
|
|
|
|
#define __PICKUPS_PICKUP_H__
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Includes
|
|
|
|
-------- */
|
|
|
|
|
2001-02-26 21:42:25 +01:00
|
|
|
#ifndef __GAME_TPICKUP_H__
|
|
|
|
#include "thing/tpickup.h"
|
2001-02-20 23:53:35 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/* Std Lib
|
|
|
|
------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Tyepdefs && Defines
|
|
|
|
------------------- */
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
PICKUP__100_PERCENT_LIFE,
|
|
|
|
PICKUP__50_PERCENT_LIFE,
|
|
|
|
PICKUP__25_PERCENT_LIFE,
|
|
|
|
PICKUP__LIFE,
|
|
|
|
PICKUP__SPATULA,
|
2001-02-21 18:13:37 +01:00
|
|
|
PICKUP__JELLY_LAUNCHER_AMMO,
|
|
|
|
PICKUP__BUBBLE_MIXTURE,
|
|
|
|
PICKUP__GLASSES,
|
|
|
|
PICKUP__SQUEAKY_SHOES,
|
2001-02-21 23:33:17 +01:00
|
|
|
PICKUP__BALLOON,
|
|
|
|
PICKUP__HELMET,
|
2001-02-21 18:13:37 +01:00
|
|
|
PICKUP__QUEST_ITEM__TEST, // Needs to be one of these for each quest item ( I think )
|
2001-02-20 23:53:35 +01:00
|
|
|
}
|
|
|
|
PICKUP_TYPE;
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Structure defintions
|
|
|
|
-------------------- */
|
|
|
|
|
2001-02-26 21:42:25 +01:00
|
|
|
class CBasePickup : public CPickupThing
|
2001-02-20 23:53:35 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void init();
|
|
|
|
virtual void shutdown();
|
|
|
|
virtual void think(int _frames);
|
|
|
|
virtual void render();
|
|
|
|
|
|
|
|
void setPos(const struct DVECTOR *_pos);
|
|
|
|
virtual void collect(class CPlayer *_player);
|
|
|
|
|
|
|
|
protected:
|
2001-02-21 18:13:37 +01:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
PICKUPS_OT_POS=15,
|
2001-02-21 23:33:17 +01:00
|
|
|
DEFAULT_VISIBILITY_RADIUS=32,
|
2001-02-21 18:13:37 +01:00
|
|
|
};
|
|
|
|
|
2001-02-20 23:53:35 +01:00
|
|
|
class SpriteBank *getSpriteBank() {return m_spriteBank;}
|
2001-02-21 23:33:17 +01:00
|
|
|
virtual int getVisibilityRadius() {return DEFAULT_VISIBILITY_RADIUS;}
|
|
|
|
|
|
|
|
virtual void thinkPickup(int _Frames) {;}
|
|
|
|
virtual void renderPickup(DVECTOR *_pos)=0;
|
2001-02-20 23:53:35 +01:00
|
|
|
|
2001-02-26 21:42:25 +01:00
|
|
|
virtual void collidedWith(CThing *_thisThing);
|
|
|
|
|
2001-02-20 23:53:35 +01:00
|
|
|
private:
|
|
|
|
class SpriteBank *m_spriteBank;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-02-21 23:33:17 +01:00
|
|
|
class CBaseRespawningPickup : public CBasePickup
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void init();
|
|
|
|
virtual void think(int _frames);
|
|
|
|
virtual void render();
|
|
|
|
|
|
|
|
virtual void collect(class CPlayer *_player);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual int getRespawnTime()=0;
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_respawnTime;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2001-02-20 23:53:35 +01:00
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Globals
|
|
|
|
------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Functions
|
|
|
|
--------- */
|
|
|
|
|
|
|
|
CBasePickup *createPickup(const PICKUP_TYPE _type,const DVECTOR *_pos);
|
|
|
|
|
|
|
|
|
|
|
|
/*---------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
#endif /* __PICKUPS_PICKUP_H__ */
|
|
|
|
|
|
|
|
/*===========================================================================
|
|
|
|
end */
|