This commit is contained in:
Paul 2001-04-30 23:01:55 +00:00
parent 34d6b36867
commit 3b945b9a17
2 changed files with 22 additions and 8 deletions

View file

@ -33,6 +33,9 @@
#include "game\game.h" #include "game\game.h"
#endif #endif
#ifndef __UTILS_HEADER__
#include "utils\utils.h"
#endif
/* Std Lib /* Std Lib
@ -66,6 +69,11 @@
Vars Vars
---- */ ---- */
// Net pulse
int npspeed=150;
int npsize=40;
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
Function: Function:
Purpose: Purpose:
@ -84,7 +92,6 @@ void CPlayerModeNet::enter()
Params: Params:
Returns: Returns:
---------------------------------------------------------------------- */ ---------------------------------------------------------------------- */
int netstate;
DVECTOR netLaunchPos={-10,-70}; DVECTOR netLaunchPos={-10,-70};
void CPlayerModeNet::think() void CPlayerModeNet::think()
{ {
@ -133,6 +140,7 @@ void CPlayerModeNet::think()
((CNpcEnemy*)thing)->caughtWithNet(); ((CNpcEnemy*)thing)->caughtWithNet();
m_netState=NET_STATE__JUST_CAUGHT_SOMETHING; m_netState=NET_STATE__JUST_CAUGHT_SOMETHING;
thing=NULL; thing=NULL;
m_netSin=0;
} }
else else
{ {
@ -197,7 +205,11 @@ void CPlayerModeNet::think()
} }
} }
} }
netstate=m_netState;
if(m_netState==NET_STATE__FULL)
{
m_netSin=(m_netSin+npspeed)&4095;
}
} }
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
@ -213,15 +225,16 @@ void CPlayerModeNet::renderModeUi()
sb=m_player->getSpriteBank(); sb=m_player->getSpriteBank();
fh=sb->getFrameHeader(FRM__NET); fh=sb->getFrameHeader(FRM__NET);
if(m_netState==NET_STATE__FULL) // if(m_netState==NET_STATE__FULL)
{ {
// Net has a jellyfish inside // Net has a jellyfish inside
sb->printFT4Scaled(fh,CPlayer::POWERUPUI_ICONX-(fh->W/2),CPlayer::POWERUPUI_ICONY-(fh->H/2),0,0,CPlayer::POWERUPUI_OT,256+128); int size=256+128+((msin(m_netSin)*npsize)>>12);
} sb->printFT4Scaled(fh,CPlayer::POWERUPUI_ICONX-(fh->W/2),CPlayer::POWERUPUI_ICONY-(fh->H/2),0,0,CPlayer::POWERUPUI_OT,size);
else
{
sb->printFT4(fh,CPlayer::POWERUPUI_ICONX-(fh->W/2),CPlayer::POWERUPUI_ICONY-(fh->H/2),0,0,CPlayer::POWERUPUI_OT);
} }
// else
// {
// sb->printFT4(fh,CPlayer::POWERUPUI_ICONX-(fh->W/2),CPlayer::POWERUPUI_ICONY-(fh->H/2),0,0,CPlayer::POWERUPUI_OT);
// }
} }
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------

View file

@ -59,6 +59,7 @@ private:
int m_netFrame; int m_netFrame;
int m_netting; int m_netting;
NetState m_netState; NetState m_netState;
int m_netSin;
}; };