This commit is contained in:
parent
5b944146d8
commit
337d6965ba
12 changed files with 133 additions and 24 deletions
|
@ -77,7 +77,7 @@ void CBubbleMixturePickup::init()
|
|||
---------------------------------------------------------------------- */
|
||||
void CBubbleMixturePickup::collect(class CPlayer *_player)
|
||||
{
|
||||
_player->setMode(PLAYER_MODE_BUBBLE_MIXTURE);
|
||||
_player->giveBubbleAmmo();
|
||||
CBaseRespawningPickup::collect(_player);
|
||||
}
|
||||
|
||||
|
@ -124,5 +124,61 @@ void CBubbleMixturePickup::renderPickup(DVECTOR *_pos)
|
|||
sprites->printFT4(fh,x,y,0,0,PICKUPS_OT_POS);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CBubbleWandPickup::init()
|
||||
{
|
||||
CBaseRespawningPickup::init();
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CBubbleWandPickup::collect(class CPlayer *_player)
|
||||
{
|
||||
_player->setMode(PLAYER_MODE_BUBBLE_MIXTURE);
|
||||
CBaseRespawningPickup::collect(_player);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
int CBubbleWandPickup::getRespawnTime()
|
||||
{
|
||||
return 60*10;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CBubbleWandPickup::renderPickup(DVECTOR *_pos)
|
||||
{
|
||||
SpriteBank *sprites;
|
||||
sFrameHdr *fh;
|
||||
int x,y;
|
||||
|
||||
sprites=getSpriteBank();
|
||||
fh=sprites->getFrameHeader(FRM__BUBBLEWAND);
|
||||
x=_pos->vx-(fh->W/2);
|
||||
y=_pos->vy-(fh->H/2);
|
||||
sprites->printFT4(fh,x,y,0,0,PICKUPS_OT_POS);
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
||||
|
|
|
@ -53,6 +53,21 @@ private:
|
|||
};
|
||||
|
||||
|
||||
class CBubbleWandPickup : public CBaseRespawningPickup
|
||||
{
|
||||
public:
|
||||
virtual void init();
|
||||
|
||||
virtual void collect(class CPlayer *_player);
|
||||
|
||||
protected:
|
||||
virtual int getRespawnTime();
|
||||
|
||||
virtual void renderPickup(DVECTOR *_pos);
|
||||
|
||||
};
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Globals
|
||||
------- */
|
||||
|
|
|
@ -67,6 +67,10 @@
|
|||
#include "pickups\phelmet.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PICKUPS_PNET_H__
|
||||
#include "pickups\pnet.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PICKUPS_PQUEST_H__
|
||||
#include "pickups\pquest.h"
|
||||
#endif
|
||||
|
@ -311,6 +315,14 @@ CBasePickup *createPickup(const PICKUP_TYPE _type,const DVECTOR *_pos)
|
|||
pickup=new ("BubbleAmmoPickup") CBubbleMixturePickup();
|
||||
break;
|
||||
|
||||
case PICKUP__BUBBLE_WAND:
|
||||
pickup=new ("BubbleWandPickup") CBubbleWandPickup();
|
||||
break;
|
||||
|
||||
case PICKUP__NET:
|
||||
pickup=new ("NetPickup") CNetPickup();
|
||||
break;
|
||||
|
||||
case PICKUP__GLASSES:
|
||||
pickup=new ("GlassesPickup") CGlassesPickup();
|
||||
break;
|
||||
|
|
|
@ -39,6 +39,8 @@ typedef enum
|
|||
PICKUP__SPATULA,
|
||||
PICKUP__JELLY_LAUNCHER_AMMO,
|
||||
PICKUP__BUBBLE_MIXTURE,
|
||||
PICKUP__BUBBLE_WAND,
|
||||
PICKUP__NET,
|
||||
PICKUP__GLASSES,
|
||||
PICKUP__SQUEAKY_SHOES,
|
||||
PICKUP__BALLOON,
|
||||
|
|
|
@ -79,12 +79,12 @@ void CSpatulaPickup::collect(class CPlayer *_player)
|
|||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
int spat_glintspeed=3;
|
||||
int spat_glintspeed=1;
|
||||
int spat_maxglint=100;
|
||||
int spat_glintrotspeed=50;
|
||||
int spat_glintgrowspeed=5;
|
||||
DVECTOR spat_gxy1={0,28};
|
||||
DVECTOR spat_gxy2={20,0};
|
||||
DVECTOR spat_gxy2={50,-35};
|
||||
static const int spat_glintFrames[]={FRM__GLINT1,FRM__GLINT2,FRM__GLINT3,FRM__GLINT4,FRM__GLINT4,FRM__GLINT3,FRM__GLINT2,FRM__GLINT1};
|
||||
void CSpatulaPickup::thinkPickup(int _frames)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue