This commit is contained in:
parent
456e8ab7d5
commit
f0dc295b9c
3 changed files with 157 additions and 0 deletions
88
source/pickups/pblower.cpp
Normal file
88
source/pickups/pblower.cpp
Normal 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
61
source/pickups/pblower.h
Normal 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 */
|
|
@ -681,6 +681,14 @@ SOURCE=..\..\..\source\pickups\pballoon.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin 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
|
SOURCE=..\..\..\source\pickups\pbubmix.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue