This commit is contained in:
parent
17a4463ac2
commit
38b97c7111
13 changed files with 185 additions and 3 deletions
|
@ -618,6 +618,15 @@ void CNpcIronDogfishEnemy::render()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcIronDogfishEnemy::renderOnMapScreen( DVECTOR drawPos )
|
||||
{
|
||||
SprFrame = NULL;
|
||||
|
||||
SprFrame = m_actorGfx->Render(drawPos,0,0,false);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcIronDogfishEnemy::processCollision()
|
||||
{
|
||||
CPlayer *player = GameScene.getPlayer();
|
||||
|
|
|
@ -27,6 +27,7 @@ class CNpcIronDogfishEnemy : public CNpcBossEnemy
|
|||
public:
|
||||
void postInit();
|
||||
void render();
|
||||
void renderOnMapScreen( DVECTOR drawPos );
|
||||
void shutdown();
|
||||
protected:
|
||||
void processTimer( int _frames );
|
||||
|
|
|
@ -710,6 +710,20 @@ void CNpcFlyingDutchmanEnemy::render()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcFlyingDutchmanEnemy::renderOnMapScreen( DVECTOR drawPos )
|
||||
{
|
||||
SprFrame = NULL;
|
||||
|
||||
SprFrame = m_actorGfx->Render(drawPos,0,0,false);
|
||||
//setShadeTex(SprFrame,0);
|
||||
//setSemiTrans( SprFrame, true );
|
||||
//SprFrame->tpage|=1<<5;
|
||||
m_actorGfx->RotateScale( SprFrame, drawPos, 0, 5120, 5120 );
|
||||
//setRGB0( SprFrame, m_fadeVal, m_fadeVal, m_fadeVal );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcFlyingDutchmanEnemy::collidedWith(CThing *_thisThing)
|
||||
{
|
||||
if ( m_isActive && !m_isCaught && !m_isDying )
|
||||
|
|
|
@ -25,6 +25,7 @@ public:
|
|||
void think( int _frames );
|
||||
void postInit();
|
||||
void render();
|
||||
void renderOnMapScreen( DVECTOR drawPos );
|
||||
void shutdown();
|
||||
u8 hasBeenAttacked();
|
||||
protected:
|
||||
|
|
|
@ -755,6 +755,21 @@ void CNpcMotherJellyfishEnemy::render()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcMotherJellyfishEnemy::renderOnMapScreen( DVECTOR drawPos )
|
||||
{
|
||||
SprFrame = NULL;
|
||||
|
||||
SprFrame = m_actorGfx->Render(drawPos,0,0,false);
|
||||
m_actorGfx->RotateScale( SprFrame, drawPos, 0, ONE, ONE );
|
||||
for ( int i = 0 ; i < 4 ; i++ )
|
||||
{
|
||||
legs[i]->renderOnMapScreen( drawPos );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*void CNpcMotherJellyfishEnemy::processUserCollision( CThing *thisThing )
|
||||
{
|
||||
}*/
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "fx\fx.h"
|
||||
#include "fx\fxjfish.h"
|
||||
|
||||
#define MJ_PINK ( 255 + ( 128 << 8 ) + ( 255 << 16 ) )
|
||||
#define MJ_PINK ( 127 + ( 127 << 8 ) + ( 127 << 16 ) )
|
||||
#define MJ_WHITE ( 255 + ( 255 << 8 ) + ( 255 << 16 ) )
|
||||
|
||||
class CNpcMotherJellyfishEnemy : public CNpcBossEnemy
|
||||
|
@ -29,6 +29,7 @@ class CNpcMotherJellyfishEnemy : public CNpcBossEnemy
|
|||
public:
|
||||
void postInit();
|
||||
void render();
|
||||
void renderOnMapScreen( DVECTOR drawPos );
|
||||
void shutdown();
|
||||
void setupWaypoints( sThingActor *ThisActor );
|
||||
protected:
|
||||
|
|
|
@ -205,6 +205,8 @@ s32 CNpcEnemy::playerYDist;
|
|||
s32 CNpcEnemy::playerXDistSqr;
|
||||
s32 CNpcEnemy::playerYDistSqr;
|
||||
|
||||
extern CThing *g_bossThing;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CNpcEnemy::NPC_UNIT_TYPE CNpcEnemy::getTypeFromMapEdit( u16 newType )
|
||||
|
@ -362,12 +364,14 @@ CNpcEnemy *CNpcEnemy::Create(int enemyType)
|
|||
case CNpcEnemy::NPC_MOTHER_JELLYFISH:
|
||||
{
|
||||
enemy = new ("mother jellyfish") CNpcMotherJellyfishEnemy;
|
||||
g_bossThing = (CThing *) enemy;
|
||||
break;
|
||||
}
|
||||
|
||||
case CNpcEnemy::NPC_SUB_SHARK:
|
||||
{
|
||||
enemy = new ("sub shark") CNpcSubSharkEnemy;
|
||||
g_bossThing = (CThing *) enemy;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -380,12 +384,14 @@ CNpcEnemy *CNpcEnemy::Create(int enemyType)
|
|||
case CNpcEnemy::NPC_FLYING_DUTCHMAN:
|
||||
{
|
||||
enemy = new ("flying dutchman") CNpcFlyingDutchmanEnemy;
|
||||
g_bossThing = (CThing *) enemy;
|
||||
break;
|
||||
}
|
||||
|
||||
case CNpcEnemy::NPC_IRON_DOGFISH:
|
||||
{
|
||||
enemy = new ("iron dogfish") CNpcIronDogfishEnemy;
|
||||
g_bossThing = (CThing *) enemy;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -410,6 +416,7 @@ CNpcEnemy *CNpcEnemy::Create(int enemyType)
|
|||
case CNpcEnemy::NPC_SEA_SNAKE:
|
||||
{
|
||||
enemy = new ("sea snake") CNpcSeaSnakeEnemy;
|
||||
g_bossThing = (CThing *) enemy;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -769,6 +769,16 @@ void CNpcSubSharkEnemy::render()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcSubSharkEnemy::renderOnMapScreen( DVECTOR drawPos )
|
||||
{
|
||||
SprFrame = NULL;
|
||||
|
||||
SprFrame = m_actorGfx->Render(drawPos,3,0,false);
|
||||
//m_actorGfx->RotateScale( SprFrame, renderPos, 0, 4096, 4096 );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcSubSharkEnemy::collidedWith(CThing *_thisThing)
|
||||
{
|
||||
if ( m_isActive && !m_isCaught && !m_isDying )
|
||||
|
|
|
@ -28,6 +28,7 @@ class CNpcSubSharkEnemy : public CNpcBossEnemy
|
|||
public:
|
||||
void postInit();
|
||||
void render();
|
||||
void renderOnMapScreen( DVECTOR drawPos );
|
||||
void shutdown();
|
||||
protected:
|
||||
//virtual void processClose( int _frames );
|
||||
|
|
|
@ -998,6 +998,72 @@ void CNpcSeaSnakeEnemy::render()
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcSeaSnakeEnemy::renderOnMapScreen( DVECTOR drawPos )
|
||||
{
|
||||
drawPos.vx += 300;
|
||||
|
||||
POLY_FT4 *headSprFrame;
|
||||
|
||||
headSprFrame = m_actorGfx->Render(drawPos,ANIM_SEASNAKE_HEADSNAP,0,0);
|
||||
m_actorGfx->RotateScale( headSprFrame, drawPos, 0, 4096, 4096 );
|
||||
|
||||
int segmentCount;
|
||||
int segmentType;
|
||||
u16 segScale;
|
||||
int initLength = NPC_SEA_SNAKE_LENGTH / 3;
|
||||
int remLength = NPC_SEA_SNAKE_LENGTH - initLength;
|
||||
|
||||
for ( segmentCount = 0 ; segmentCount < NPC_SEA_SNAKE_LENGTH ; segmentCount++ )
|
||||
{
|
||||
drawPos.vx -= 30;
|
||||
|
||||
if ( segmentCount > 3 )
|
||||
{
|
||||
if ( segmentCount == m_segmentCount - 1 )
|
||||
{
|
||||
segmentType = ANIM_SEASNAKE_TAILSTATIC;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( segmentCount % 2 )
|
||||
{
|
||||
segmentType = ANIM_SEASNAKE_BODY2STATIC;
|
||||
}
|
||||
else
|
||||
{
|
||||
segmentType = ANIM_SEASNAKE_BODY3STATIC;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
segmentType = ANIM_SEASNAKE_BODY1STATIC;
|
||||
}
|
||||
|
||||
if ( segmentCount < initLength )
|
||||
{
|
||||
u16 sum = ONE << 1;
|
||||
u16 start = ONE;
|
||||
u16 end = sum - start;
|
||||
|
||||
segScale = start + ( ( end * segmentCount ) / initLength );
|
||||
}
|
||||
else
|
||||
{
|
||||
u16 sum = ONE << 1;
|
||||
u16 start = ONE >> 1;
|
||||
u16 end = sum - start;
|
||||
|
||||
segScale = start + ( ( end * ( NPC_SEA_SNAKE_LENGTH - segmentCount ) ) / remLength );
|
||||
}
|
||||
|
||||
POLY_FT4 *Ft4= m_actorGfx->Render(drawPos,segmentType,0,0);
|
||||
m_actorGfx->RotateScale( Ft4, drawPos, 0, 4096, segScale );
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int CNpcSeaSnakeEnemy::checkCollisionAgainst( CThing *_thisThing, int _frames )
|
||||
{
|
||||
// DVECTOR pos,thisThingPos;
|
||||
|
|
|
@ -59,6 +59,7 @@ public:
|
|||
void postInit();
|
||||
void shutdown();
|
||||
void render();
|
||||
void renderOnMapScreen( DVECTOR drawPos );
|
||||
int checkCollisionAgainst(CThing *_thisThing, int _frames);
|
||||
protected:
|
||||
s32 getFrameShift( int _frames );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue