This commit is contained in:
parent
a35c24d46e
commit
bb0e21d8d6
10 changed files with 132 additions and 35 deletions
|
@ -444,6 +444,7 @@ collision/colltab.dat
|
||||||
actors/SPONGEBOB.SBK
|
actors/SPONGEBOB.SBK
|
||||||
|
|
||||||
actors/ANENOMELVL1.SBK
|
actors/ANENOMELVL1.SBK
|
||||||
|
actors/ANENOMELVL3.SBK
|
||||||
actors/BABYOCTOPUS.SBK
|
actors/BABYOCTOPUS.SBK
|
||||||
actors/BALLBLOB.SBK
|
actors/BALLBLOB.SBK
|
||||||
actors/CATERPILLAR.SBK
|
actors/CATERPILLAR.SBK
|
||||||
|
|
|
@ -148,7 +148,7 @@ ACTORS_DIRS_TO_MAKE := $(ACTOR_OUT_DIR)
|
||||||
ACTOR_SPONGEBOB := SPONGEBOB
|
ACTOR_SPONGEBOB := SPONGEBOB
|
||||||
ACTOR_NPC :=
|
ACTOR_NPC :=
|
||||||
# BarnacleBoy Gary Krusty MermaidMan Patrick Plankton Sandy Squidward
|
# BarnacleBoy Gary Krusty MermaidMan Patrick Plankton Sandy Squidward
|
||||||
ACTOR_ENEMY := AnenomeLvl1 BabyOctopus Ballblob Caterpillar clam Dustdevil Eyeball \
|
ACTOR_ENEMY := AnenomeLvl1 AnenomeLvl3 BabyOctopus Ballblob Caterpillar clam Dustdevil Eyeball \
|
||||||
Flamingskull FlyingDutchman Ghost HermitCrab IronDogFish Jellyfish1 Lrgjellyfish \
|
Flamingskull FlyingDutchman Ghost HermitCrab IronDogFish Jellyfish1 Lrgjellyfish \
|
||||||
PuffaFish Sharkman Skeletalfish SpiderCrab SpikeyAnenome Squiddart Stomper
|
PuffaFish Sharkman Skeletalfish SpiderCrab SpikeyAnenome Squiddart Stomper
|
||||||
# Boogermonster GiantWorm Jellyfish2 Motherjellyfish Nautilus Neptune SeaSnake SharkSub
|
# Boogermonster GiantWorm Jellyfish2 Motherjellyfish Nautilus Neptune SeaSnake SharkSub
|
||||||
|
|
|
@ -35,6 +35,10 @@
|
||||||
#include <ACTOR_SPIKEYANENOME_ANIM.h>
|
#include <ACTOR_SPIKEYANENOME_ANIM.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_ANENOMELVL3_HEADER__
|
||||||
|
#include <ACTOR_ANENOMELVL3_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void CNpcEnemy::processCloseAnemone1Attack( int _frames )
|
void CNpcEnemy::processCloseAnemone1Attack( int _frames )
|
||||||
{
|
{
|
||||||
|
@ -156,13 +160,46 @@ void CNpcEnemy::processCloseAnemone2Attack( int _frames )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
CProjectile *projectile;
|
||||||
|
s16 heading;
|
||||||
|
|
||||||
|
// fire off attached spikes
|
||||||
|
|
||||||
|
CThing *nextThing = Next;
|
||||||
|
|
||||||
|
while ( nextThing )
|
||||||
|
{
|
||||||
|
CProjectile *projectile;
|
||||||
|
|
||||||
|
projectile = (CProjectile *) nextThing;
|
||||||
|
|
||||||
|
if ( projectile->getMovementType() == CProjectile::PROJECTILE_FIXED )
|
||||||
|
{
|
||||||
|
projectile->setMovementType( CProjectile::PROJECTILE_DUMBFIRE );
|
||||||
|
projectile->setLifeTime( CProjectile::PROJECTILE_FINITE_LIFE );
|
||||||
|
projectile->setState( CProjectile::PROJECTILE_ATTACK );
|
||||||
|
}
|
||||||
|
|
||||||
|
nextThing = nextThing->getNext();
|
||||||
|
}
|
||||||
|
|
||||||
|
// attach new spikes
|
||||||
|
|
||||||
for ( fireLoop = 0 ; fireLoop < 5 ; fireLoop++ )
|
for ( fireLoop = 0 ; fireLoop < 5 ; fireLoop++ )
|
||||||
{
|
{
|
||||||
|
DVECTOR spikePos;
|
||||||
|
|
||||||
heading = m_heading - 1024 + ( fireLoop * 512 );
|
heading = m_heading - 1024 + ( fireLoop * 512 );
|
||||||
heading %= 4096;
|
heading %= 4096;
|
||||||
|
|
||||||
projectile = new( "test projectile" ) CProjectile;
|
spikePos = Pos;
|
||||||
projectile->init( Pos, heading );
|
spikePos.vx += ( 10 * rcos( heading ) ) >> 12;
|
||||||
|
spikePos.vy += ( 10 * rsin( heading ) ) >> 12;
|
||||||
|
|
||||||
|
projectile = new( "anemone lev2 projectile" ) CProjectile;
|
||||||
|
projectile->init( spikePos, heading, CProjectile::PROJECTILE_FIXED, CProjectile::PROJECTILE_INFINITE_LIFE );
|
||||||
|
|
||||||
|
addChild( projectile );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||||
|
@ -174,6 +211,14 @@ void CNpcEnemy::processCloseAnemone2Attack( int _frames )
|
||||||
|
|
||||||
void CNpcEnemy::processCloseAnemone3Attack( int _frames )
|
void CNpcEnemy::processCloseAnemone3Attack( int _frames )
|
||||||
{
|
{
|
||||||
|
if ( m_animNo != ANIM_ANENOMELVL3_FIRE )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = ANIM_ANENOMELVL3_FIRE;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
else if ( !m_animPlaying )
|
||||||
|
{
|
||||||
CProjectile *projectile;
|
CProjectile *projectile;
|
||||||
u8 lifetime = 8;
|
u8 lifetime = 8;
|
||||||
|
|
||||||
|
@ -188,4 +233,9 @@ void CNpcEnemy::processCloseAnemone3Attack( int _frames )
|
||||||
m_timerFunc = NPC_TIMER_ATTACK_DONE;
|
m_timerFunc = NPC_TIMER_ATTACK_DONE;
|
||||||
m_timerTimer = ( lifetime + 4 ) * GameState::getOneSecondInFrames();
|
m_timerTimer = ( lifetime + 4 ) * GameState::getOneSecondInFrames();
|
||||||
m_sensorFunc = NPC_SENSOR_NONE;
|
m_sensorFunc = NPC_SENSOR_NONE;
|
||||||
|
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = ANIM_ANENOMELVL3_BEND;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -250,7 +250,7 @@ void CNpcEnemy::init()
|
||||||
m_animNo = m_data[m_type].initAnim;
|
m_animNo = m_data[m_type].initAnim;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
|
|
||||||
m_heading = m_fireHeading = 128;
|
m_heading = m_fireHeading = 0;
|
||||||
m_movementTimer = 0;
|
m_movementTimer = 0;
|
||||||
m_timerTimer = 0;
|
m_timerTimer = 0;
|
||||||
m_velocity = 0;
|
m_velocity = 0;
|
||||||
|
@ -273,9 +273,9 @@ void CNpcEnemy::init()
|
||||||
DVECTOR ofs = getCollisionSize();
|
DVECTOR ofs = getCollisionSize();
|
||||||
|
|
||||||
m_drawOffset.vx = 0;
|
m_drawOffset.vx = 0;
|
||||||
m_drawOffset.vy = -( ofs.vy >> 1 );
|
m_drawOffset.vy = 0;
|
||||||
|
|
||||||
setCollisionCentreOffset( m_drawOffset.vx, m_drawOffset.vy );
|
setCollisionCentreOffset( 0, -( ofs.vy >> 1 ) );
|
||||||
|
|
||||||
m_positionHistory = NULL;
|
m_positionHistory = NULL;
|
||||||
}
|
}
|
||||||
|
@ -293,6 +293,15 @@ void CNpcEnemy::postInit()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case NPC_INIT_BALL_BLOB:
|
||||||
|
{
|
||||||
|
m_heading = m_fireHeading = 128;
|
||||||
|
|
||||||
|
m_npcPath.setPathType( CNpcPath::PONG_PATH );
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case NPC_INIT_HERMIT_CRAB:
|
case NPC_INIT_HERMIT_CRAB:
|
||||||
{
|
{
|
||||||
m_npcPath.setPathType( CNpcPath::PONG_PATH );
|
m_npcPath.setPathType( CNpcPath::PONG_PATH );
|
||||||
|
@ -446,6 +455,31 @@ void CNpcEnemy::postInit()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case NPC_INIT_ANEMONE_2:
|
||||||
|
{
|
||||||
|
CProjectile *projectile;
|
||||||
|
s16 heading;
|
||||||
|
|
||||||
|
for ( int fireLoop = 0 ; fireLoop < 5 ; fireLoop++ )
|
||||||
|
{
|
||||||
|
DVECTOR spikePos;
|
||||||
|
|
||||||
|
heading = m_heading - 1024 + ( fireLoop * 512 );
|
||||||
|
heading %= 4096;
|
||||||
|
|
||||||
|
spikePos = Pos;
|
||||||
|
spikePos.vx += ( 10 * rcos( heading ) ) >> 12;
|
||||||
|
spikePos.vy += ( 10 * rsin( heading ) ) >> 12;
|
||||||
|
|
||||||
|
projectile = new( "anemone lev2 projectile" ) CProjectile;
|
||||||
|
projectile->init( spikePos, heading, CProjectile::PROJECTILE_FIXED, CProjectile::PROJECTILE_INFINITE_LIFE );
|
||||||
|
|
||||||
|
addChild( projectile );
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case NPC_INIT_CIRCULAR_PLATFORM:
|
case NPC_INIT_CIRCULAR_PLATFORM:
|
||||||
{
|
{
|
||||||
Pos.vx = 300;
|
Pos.vx = 300;
|
||||||
|
@ -1372,8 +1406,8 @@ void CNpcEnemy::render()
|
||||||
//renderPos.vx = ( Pos.vx + m_drawOffset.vx - offset.vx - ( VidGetScrW() >> 1 ) );// * 20;
|
//renderPos.vx = ( Pos.vx + m_drawOffset.vx - offset.vx - ( VidGetScrW() >> 1 ) );// * 20;
|
||||||
//renderPos.vy = ( Pos.vy + m_drawOffset.vy - offset.vy - ( VidGetScrH() >> 1 ) );// * 20;
|
//renderPos.vy = ( Pos.vy + m_drawOffset.vy - offset.vy - ( VidGetScrH() >> 1 ) );// * 20;
|
||||||
|
|
||||||
renderPos.vx = Pos.vx + m_drawOffset.vx - offset.vx;
|
renderPos.vx = Pos.vx - offset.vx;
|
||||||
renderPos.vy = Pos.vy + m_drawOffset.vy - offset.vy;
|
renderPos.vy = Pos.vy - offset.vy;
|
||||||
|
|
||||||
m_actorGfx->Render(renderPos,m_animNo,m_frame,m_reversed);
|
m_actorGfx->Render(renderPos,m_animNo,m_frame,m_reversed);
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,6 +202,8 @@ protected:
|
||||||
NPC_INIT_PARASITIC_WORM_SEGMENT,
|
NPC_INIT_PARASITIC_WORM_SEGMENT,
|
||||||
NPC_INIT_HERMIT_CRAB,
|
NPC_INIT_HERMIT_CRAB,
|
||||||
NPC_INIT_EYEBALL,
|
NPC_INIT_EYEBALL,
|
||||||
|
NPC_INIT_BALL_BLOB,
|
||||||
|
NPC_INIT_ANEMONE_2,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum NPC_CONTROL_FUNC
|
enum NPC_CONTROL_FUNC
|
||||||
|
|
|
@ -31,6 +31,10 @@
|
||||||
#include <ACTOR_ANENOMELVL1_ANIM.h>
|
#include <ACTOR_ANENOMELVL1_ANIM.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_ANENOMELVL3_HEADER__
|
||||||
|
#include <ACTOR_ANENOMELVL3_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __ANIM_BABYOCTOPUS_HEADER__
|
#ifndef __ANIM_BABYOCTOPUS_HEADER__
|
||||||
#include <ACTOR_BABYOCTOPUS_ANIM.h>
|
#include <ACTOR_BABYOCTOPUS_ANIM.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -346,9 +350,9 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
{ // NPC_ANEMONE_2
|
{ // NPC_ANEMONE_2
|
||||||
ACTORS_SPIKEYANENOME_SBK,
|
ACTORS_SPIKEYANENOME_SBK,
|
||||||
ANIM_SPIKEYANENOME_BODY,
|
ANIM_SPIKEYANENOME_BODY,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_ANEMONE_2,
|
||||||
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC_CYCLE_ANIM,
|
||||||
NPC_MOVEMENT_MODIFIER_NONE,
|
NPC_MOVEMENT_MODIFIER_NONE,
|
||||||
NPC_CLOSE_ANEMONE_2_ATTACK,
|
NPC_CLOSE_ANEMONE_2_ATTACK,
|
||||||
NPC_TIMER_NONE,
|
NPC_TIMER_NONE,
|
||||||
|
@ -362,11 +366,11 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANEMONE_3
|
{ // NPC_ANEMONE_3
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_ANENOMELVL3_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_ANENOMELVL3_BEND,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC_CYCLE_ANIM,
|
||||||
NPC_MOVEMENT_MODIFIER_NONE,
|
NPC_MOVEMENT_MODIFIER_NONE,
|
||||||
NPC_CLOSE_ANEMONE_3_ATTACK,
|
NPC_CLOSE_ANEMONE_3_ATTACK,
|
||||||
NPC_TIMER_NONE,
|
NPC_TIMER_NONE,
|
||||||
|
@ -904,7 +908,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
{ // NPC_BALL_BLOB
|
{ // NPC_BALL_BLOB
|
||||||
ACTORS_BALLBLOB_SBK,
|
ACTORS_BALLBLOB_SBK,
|
||||||
ANIM_BALLBLOB_WOBBLE,
|
ANIM_BALLBLOB_WOBBLE,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_BALL_BLOB,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_BALL_BLOB,
|
NPC_MOVEMENT_BALL_BLOB,
|
||||||
NPC_MOVEMENT_MODIFIER_NONE,
|
NPC_MOVEMENT_MODIFIER_NONE,
|
||||||
|
|
|
@ -210,6 +210,11 @@ void CProjectile::setPosition( DVECTOR newPos )
|
||||||
Pos = newPos;
|
Pos = newPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CProjectile::setLifeTime( PROJECTILE_LIFETIME_TYPE lifeType )
|
||||||
|
{
|
||||||
|
m_lifetimeType = lifeType;
|
||||||
|
}
|
||||||
|
|
||||||
void CProjectile::think(int _frames)
|
void CProjectile::think(int _frames)
|
||||||
{
|
{
|
||||||
CEnemyProjectileThing::think( _frames );
|
CEnemyProjectileThing::think( _frames );
|
||||||
|
|
|
@ -54,6 +54,7 @@ public:
|
||||||
void setMovementType( PROJECTILE_MOVEMENT_TYPE moveType );
|
void setMovementType( PROJECTILE_MOVEMENT_TYPE moveType );
|
||||||
PROJECTILE_MOVEMENT_TYPE getMovementType();
|
PROJECTILE_MOVEMENT_TYPE getMovementType();
|
||||||
void setState( PROJECTILE_STATE newState );
|
void setState( PROJECTILE_STATE newState );
|
||||||
|
void setLifeTime( PROJECTILE_LIFETIME_TYPE lifeType );
|
||||||
void setPosition( DVECTOR newPos );
|
void setPosition( DVECTOR newPos );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -20,7 +20,7 @@ SmallJellyfish-Level1=10
|
||||||
SmallJellyfish-Level2=11
|
SmallJellyfish-Level2=11
|
||||||
Motherjellyfish=12
|
Motherjellyfish=12
|
||||||
Anenome-Level1=13
|
Anenome-Level1=13
|
||||||
Anenome-Level2=14
|
SpikeyAnenome=14
|
||||||
Anenome-Level3=15
|
Anenome-Level3=15
|
||||||
BabyOctopus=16
|
BabyOctopus=16
|
||||||
Ballblob=17
|
Ballblob=17
|
||||||
|
|
|
@ -135,14 +135,14 @@ Collision=0
|
||||||
Health=16
|
Health=16
|
||||||
AttackStrength=20
|
AttackStrength=20
|
||||||
|
|
||||||
#[Anenome-Level2]
|
[SpikeyAnenome]
|
||||||
#Gfx=..\..\graphics\characters\
|
Gfx=..\..\graphics\characters\SpikeyAnenome\render\psx\spikeyanenome_body0001.bmp
|
||||||
#WayPoints=1
|
WayPoints=1
|
||||||
#Speed=0
|
Speed=5
|
||||||
#TurnRate=128
|
TurnRate=0
|
||||||
#Collision=0
|
Collision=0
|
||||||
#Health=32
|
Health=0
|
||||||
#AttackStrength=20
|
AttackStrength=20
|
||||||
|
|
||||||
[Anenome-Level3]
|
[Anenome-Level3]
|
||||||
Gfx=..\..\graphics\characters\AnenomeLvl3\Render\PSX\AnenomeLvl3_Fire0001.bmp
|
Gfx=..\..\graphics\characters\AnenomeLvl3\Render\PSX\AnenomeLvl3_Fire0001.bmp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue