This commit is contained in:
parent
8406981d2e
commit
ee0c76b3f2
2 changed files with 205 additions and 0 deletions
137
source/pickups/pkelp.cpp
Normal file
137
source/pickups/pkelp.cpp
Normal file
|
@ -0,0 +1,137 @@
|
|||
/*=========================================================================
|
||||
|
||||
pkelp.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\pkelp.h"
|
||||
|
||||
#ifndef __GFX_OTPOS_H__
|
||||
#include "gfx\otpos.h"
|
||||
#endif
|
||||
|
||||
#ifndef __MATHTABLE_HEADER__
|
||||
#include "utils\mathtab.h"
|
||||
#endif
|
||||
|
||||
#ifndef __GAME_GAMESLOT_H__
|
||||
#include "game\gameslot.h"
|
||||
#endif
|
||||
|
||||
#ifndef __GAME_GAME_H__
|
||||
#include "game\game.h"
|
||||
#endif
|
||||
|
||||
#include "game/game.h"
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
|
||||
/* Data
|
||||
---- */
|
||||
|
||||
#ifndef __SPR_SPRITES_H__
|
||||
#include <sprites.h>
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Tyepdefs && Defines
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Structure defintions
|
||||
-------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function Prototypes
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Vars
|
||||
---- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CKelpPickup::init()
|
||||
{
|
||||
sFrameHdr *fh;
|
||||
|
||||
CBasePickup::init();
|
||||
m_glint=0;
|
||||
m_glintRot=0;
|
||||
|
||||
fh=CGameScene::getSpriteBank()->getFrameHeader(FRM__TOKEN);
|
||||
setCollisionSize(fh->W,fh->H);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
DVECTOR CKelpPickup::getSizeForPlacement()
|
||||
{
|
||||
DVECTOR size;
|
||||
sFrameHdr *fh;
|
||||
|
||||
fh=CGameScene::getSpriteBank()->getFrameHeader(FRM__TOKEN);
|
||||
size.vx=fh->W;
|
||||
size.vy=fh->H;
|
||||
return size;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CKelpPickup::collect(class CPlayer *_player)
|
||||
{
|
||||
CBasePickup::collect(_player);
|
||||
// CGameSlotManager::getSlotData()->collectSpatula(GameScene.getChapterNumber(),GameScene.getLevelNumber(),m_spatulaNumber);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CKelpPickup::renderPickup(DVECTOR *_pos)
|
||||
{
|
||||
SpriteBank *sprites;
|
||||
sFrameHdr *fh;
|
||||
int x,y;
|
||||
|
||||
sprites=CGameScene::getSpriteBank();
|
||||
fh=sprites->getFrameHeader(FRM__TOKEN);
|
||||
x=_pos->vx-(fh->W/2);
|
||||
y=_pos->vy-(fh->H/2);
|
||||
sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS);
|
||||
}
|
||||
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
Loading…
Add table
Add a link
Reference in a new issue