This commit is contained in:
parent
1ffd20380b
commit
671cc18789
2 changed files with 62 additions and 0 deletions
|
@ -25,6 +25,10 @@
|
||||||
#include "gfx\otpos.h"
|
#include "gfx\otpos.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MATHTABLE_HEADER__
|
||||||
|
#include "utils\mathtab.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -145,6 +149,33 @@ void CSpatulaPickup::renderPickup(DVECTOR *_pos)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int bspat_height=30;
|
||||||
|
int bspat_r1=251;
|
||||||
|
int bspat_g1=207;
|
||||||
|
int bspat_b1=167;
|
||||||
|
int bspat_r2=147;
|
||||||
|
int bspat_g2=95;
|
||||||
|
int bspat_b2=75;
|
||||||
|
int bspat_speed=25;
|
||||||
|
int bspat_scale1=5;
|
||||||
|
int bspat_scale2=0;//2;
|
||||||
|
int bspat_phase=1024;
|
||||||
|
int bspat_vissize=40;
|
||||||
|
int bspat_stringx=-3;
|
||||||
|
int bspat_stringendxoff=3;
|
||||||
|
int bspat_stringendyoff=-6;
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
void CBalloonAndSpatulaPickup::init()
|
||||||
|
{
|
||||||
|
CSpatulaPickup::init();
|
||||||
|
m_sin=0;
|
||||||
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
Purpose:
|
Purpose:
|
||||||
|
@ -153,6 +184,8 @@ void CSpatulaPickup::renderPickup(DVECTOR *_pos)
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CBalloonAndSpatulaPickup::thinkPickup(int _frames)
|
void CBalloonAndSpatulaPickup::thinkPickup(int _frames)
|
||||||
{
|
{
|
||||||
|
CSpatulaPickup::thinkPickup(_frames);
|
||||||
|
m_sin=(m_sin+(_frames*bspat_speed))&4095;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
|
@ -163,6 +196,29 @@ void CBalloonAndSpatulaPickup::thinkPickup(int _frames)
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CBalloonAndSpatulaPickup::renderPickup(DVECTOR *_pos)
|
void CBalloonAndSpatulaPickup::renderPickup(DVECTOR *_pos)
|
||||||
{
|
{
|
||||||
|
CSpatulaPickup::renderPickup(_pos);
|
||||||
|
|
||||||
|
SpriteBank *sprites;
|
||||||
|
sFrameHdr *fh,*fhspat;
|
||||||
|
int xo1,xo2;
|
||||||
|
int x,y;
|
||||||
|
|
||||||
|
sprites=getSpriteBank();
|
||||||
|
fh=sprites->getFrameHeader(FRM__BALLOON);
|
||||||
|
fhspat=sprites->getFrameHeader(FRM__SPATULA);
|
||||||
|
|
||||||
|
xo1=((msin((m_sin+bspat_phase)&4095)*bspat_scale1)>>12);
|
||||||
|
xo2=((msin(m_sin)*bspat_scale2)>>12);
|
||||||
|
x=_pos->vx-(fh->W/2)+bspat_stringendxoff;
|
||||||
|
y=_pos->vy-(fh->H/2)-(fhspat->H/2)-bspat_height+bspat_stringendyoff;
|
||||||
|
sprites->printFT4(fh,x+xo1,y,0,0,OTPOS__PICKUP_POS);
|
||||||
|
//setCollisionCentreOffset(xo1,0);
|
||||||
|
|
||||||
|
x=_pos->vx+bspat_stringx+bspat_stringendxoff;
|
||||||
|
y=_pos->vy+(fh->H/2)-(fhspat->H/2)-bspat_height+bspat_stringendyoff;
|
||||||
|
DrawLine(x+xo1,y,x+xo2,y+bspat_height,bspat_r1,bspat_g1,bspat_b1,OTPOS__PICKUP_POS);
|
||||||
|
x++;
|
||||||
|
DrawLine(x+xo1,y,x+xo2,y+bspat_height,bspat_r2,bspat_g2,bspat_b2,OTPOS__PICKUP_POS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
|
|
@ -57,9 +57,15 @@ private:
|
||||||
|
|
||||||
class CBalloonAndSpatulaPickup : public CSpatulaPickup
|
class CBalloonAndSpatulaPickup : public CSpatulaPickup
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
virtual void init();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void thinkPickup(int _frames);
|
virtual void thinkPickup(int _frames);
|
||||||
virtual void renderPickup(DVECTOR *_pos);
|
virtual void renderPickup(DVECTOR *_pos);
|
||||||
|
|
||||||
|
private:
|
||||||
|
int m_sin;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue