This commit is contained in:
Paul 2001-03-30 19:59:11 +00:00
parent 456e8ab7d5
commit f0dc295b9c
3 changed files with 157 additions and 0 deletions

View File

@ -0,0 +1,88 @@
/*=========================================================================
pblower.cpp
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
/*----------------------------------------------------------------------
Includes
-------- */
#ifndef __GFX_SPRBANK_H__
#include "gfx\sprbank.h" // Damnit.. include order! :( (pkg)
#endif
#include "pickups\pblower.h"
#ifndef __PLAYER_PLAYER_H__
#include "player\player.h"
#endif
/* Std Lib
------- */
/* Data
---- */
#ifndef __SPR_INGAMEFX_H__
#include <ingamefx.h>
#endif
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
/*----------------------------------------------------------------------
Function Prototypes
------------------- */
/*----------------------------------------------------------------------
Vars
---- */
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CCoralBlowerPickup::collect(class CPlayer *_player)
{
_player->setMode(PLAYER_MODE_CORALBLOWER);
CBasePickup::collect(_player);
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CCoralBlowerPickup::renderPickup(DVECTOR *_pos)
{
SpriteBank *sprites;
sFrameHdr *fh;
int x,y;
sprites=getSpriteBank();
fh=sprites->getFrameHeader(FRM__BLOWER);
x=_pos->vx-(fh->W/2);
y=_pos->vy-(fh->H/2);
sprites->printFT4(fh,x,y,0,0,PICKUPS_OT_POS);
}
/*===========================================================================
end */

61
source/pickups/pblower.h Normal file
View File

@ -0,0 +1,61 @@
/*=========================================================================
pblower.h
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __PICKUPS_PBLOWER_H__
#define __PICKUPS_PBLOWER_H__
/*----------------------------------------------------------------------
Includes
-------- */
#ifndef __PICKUPS_PICKUP_H__
#include "pickups/pickup.h"
#endif
/* Std Lib
------- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
class CCoralBlowerPickup : public CBasePickup
{
public:
virtual void collect(class CPlayer *_player);
protected:
virtual void renderPickup(DVECTOR *_pos);
};
/*----------------------------------------------------------------------
Globals
------- */
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __PICKUPS_PBLOWER_H__ */
/*===========================================================================
end */

View File

@ -681,6 +681,14 @@ SOURCE=..\..\..\source\pickups\pballoon.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\pickups\pblower.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\pickups\pblower.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\pickups\pbubmix.cpp
# End Source File
# Begin Source File