This commit is contained in:
parent
4489d03842
commit
c8249893fb
8 changed files with 44 additions and 54 deletions
|
@ -0,0 +1 @@
|
||||||
|
Idle
|
|
@ -0,0 +1,2 @@
|
||||||
|
IdleBreathe
|
||||||
|
idleJig
|
|
@ -146,6 +146,8 @@ actors/SPONGEBOB_CORALBLOWER.SBK
|
||||||
actors/SPONGEBOB_JELLYLAUNCHER.SBK
|
actors/SPONGEBOB_JELLYLAUNCHER.SBK
|
||||||
actors/SPONGEBOB_NET.SBK
|
actors/SPONGEBOB_NET.SBK
|
||||||
|
|
||||||
|
actors/BARNACLEBOY.SBK
|
||||||
|
actors/KRUSTY.SBK
|
||||||
actors/SQUIDWARD.SBK
|
actors/SQUIDWARD.SBK
|
||||||
|
|
||||||
actors/ANENOME.SBK
|
actors/ANENOME.SBK
|
||||||
|
|
|
@ -108,7 +108,7 @@ ACTOR_MAKEFILE_DIR := $(TEMP_BUILD_DIR)/actor
|
||||||
ACTOR_DIRS_TO_MAKE := $(ACTOR_MAKEFILE_DIR) $(ACTOR_OUT_DIR)
|
ACTOR_DIRS_TO_MAKE := $(ACTOR_MAKEFILE_DIR) $(ACTOR_OUT_DIR)
|
||||||
|
|
||||||
ACTOR_SPONGEBOB := SpongeBob SpongeBob_CoralBlower SpongeBob_JellyLauncher SpongeBob_Net
|
ACTOR_SPONGEBOB := SpongeBob SpongeBob_CoralBlower SpongeBob_JellyLauncher SpongeBob_Net
|
||||||
ACTOR_NPC := Squidward
|
ACTOR_NPC := BarnacleBoy Krusty Squidward
|
||||||
# BarnacleBoy Gary Krusty MermaidMan Patrick Plankton Sandy Squidward
|
# BarnacleBoy Gary Krusty MermaidMan Patrick Plankton Sandy Squidward
|
||||||
|
|
||||||
ACTOR_ENEMY := Anenome BabyOctopus Ballblob Caterpillar clam Dustdevil Eyeball \
|
ACTOR_ENEMY := Anenome BabyOctopus Ballblob Caterpillar clam Dustdevil Eyeball \
|
||||||
|
|
|
@ -15,6 +15,14 @@
|
||||||
#include "friend\friend.h"
|
#include "friend\friend.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_BARNACLEBOY_HEADER__
|
||||||
|
#include <ACTOR_BARNACLEBOY_Anim.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_KRUSTY_HEADER__
|
||||||
|
#include <ACTOR_KRUSTY_Anim.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __ANIM_SQUIDWARD_HEADER__
|
#ifndef __ANIM_SQUIDWARD_HEADER__
|
||||||
#include <ACTOR_SQUIDWARD_Anim.h>
|
#include <ACTOR_SQUIDWARD_Anim.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -28,7 +36,7 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
0,
|
ANIM_BARNACLEBOY_IDLE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FRIEND_GARY
|
{ // NPC_FRIEND_GARY
|
||||||
|
@ -48,7 +56,7 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
0,
|
ANIM_KRUSTY_IDLEJIG,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FRIEND_MERMAID_MAN
|
{ // NPC_FRIEND_MERMAID_MAN
|
||||||
|
|
|
@ -137,7 +137,7 @@ CNpcFriend *CNpcFriend::Create(sThingActor *ThisActor)
|
||||||
|
|
||||||
DVECTOR startPos;
|
DVECTOR startPos;
|
||||||
startPos.vx = newXPos << 4;
|
startPos.vx = newXPos << 4;
|
||||||
startPos.vy = newYPos << 4;
|
startPos.vy = ( newYPos + 1 ) << 4;
|
||||||
|
|
||||||
friendNpc->init( startPos );
|
friendNpc->init( startPos );
|
||||||
|
|
||||||
|
@ -194,13 +194,6 @@ void CNpcFriend::shutdown()
|
||||||
|
|
||||||
void CNpcFriend::think(int _frames)
|
void CNpcFriend::think(int _frames)
|
||||||
{
|
{
|
||||||
if ( _frames > 2 )
|
|
||||||
{
|
|
||||||
// make sure enemies don't go berserk if too many frames are dropped
|
|
||||||
|
|
||||||
_frames = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
CNpcThing::think(_frames);
|
CNpcThing::think(_frames);
|
||||||
|
|
||||||
if ( m_animPlaying )
|
if ( m_animPlaying )
|
||||||
|
@ -221,35 +214,11 @@ void CNpcFriend::think(int _frames)
|
||||||
m_animPlaying = false;
|
m_animPlaying = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 fallSpeed = 3;
|
|
||||||
s8 yMovement = fallSpeed * _frames;
|
|
||||||
s8 groundHeight;
|
|
||||||
|
|
||||||
// check vertical collision
|
|
||||||
|
|
||||||
groundHeight = m_layerCollision->getHeightFromGround( Pos.vx, Pos.vy, yMovement + 16 );
|
|
||||||
|
|
||||||
if ( groundHeight <= 0 )
|
|
||||||
{
|
|
||||||
// make sure we are on the ground, not below it
|
|
||||||
|
|
||||||
Pos.vy += groundHeight;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// above ground
|
m_animNo = m_data[m_type].idleAnim;
|
||||||
|
m_animPlaying = true;
|
||||||
if ( groundHeight < yMovement )
|
m_frame = 0;
|
||||||
{
|
|
||||||
// colliding with ground
|
|
||||||
|
|
||||||
Pos.vy += groundHeight;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Pos.vy += yMovement;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,14 @@ Player=1
|
||||||
################################################
|
################################################
|
||||||
# Friends
|
# Friends
|
||||||
################################################
|
################################################
|
||||||
#[BarnacleBoy]
|
[BarnacleBoy]
|
||||||
#Gfx=..\..\graphics\characters\
|
Gfx=..\..\graphics\characters\BarnacleBoy\render\psx\BarnacleBoy_Idle0000.bmp
|
||||||
#WayPoints=0
|
WayPoints=0
|
||||||
#Speed=0
|
Speed=0
|
||||||
#TurnRate=0
|
TurnRate=0
|
||||||
#Collision=0
|
Collision=0
|
||||||
#Health=0
|
Health=0
|
||||||
#AttackStrength=0
|
AttackStrength=0
|
||||||
|
|
||||||
#[Gary]
|
#[Gary]
|
||||||
#Gfx=..\..\graphics\characters\
|
#Gfx=..\..\graphics\characters\
|
||||||
|
@ -39,14 +39,14 @@ Player=1
|
||||||
#Health=0
|
#Health=0
|
||||||
#AttackStrength=0
|
#AttackStrength=0
|
||||||
|
|
||||||
#[Krusty]
|
[Krusty]
|
||||||
#Gfx=..\..\graphics\characters\
|
Gfx=..\..\graphics\characters\Krusty\render\psx\Krusty_IdleBreathe0000.bmp
|
||||||
#WayPoints=0
|
WayPoints=0
|
||||||
#Speed=0
|
Speed=0
|
||||||
#TurnRate=0
|
TurnRate=0
|
||||||
#Collision=0
|
Collision=0
|
||||||
#Health=0
|
Health=0
|
||||||
#AttackStrength=0
|
AttackStrength=0
|
||||||
|
|
||||||
#[MermaidMan]
|
#[MermaidMan]
|
||||||
#Gfx=..\..\graphics\characters\
|
#Gfx=..\..\graphics\characters\
|
||||||
|
|
|
@ -1680,6 +1680,10 @@ SOURCE=..\..\..\out\USA\include\ACTOR_BALLBLOB_Anim.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\out\USA\include\ACTOR_BARNACLEBOY_Anim.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\out\USA\include\ACTOR_CATERPILLAR_Anim.h
|
SOURCE=..\..\..\out\USA\include\ACTOR_CATERPILLAR_Anim.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -1720,6 +1724,10 @@ SOURCE=..\..\..\out\USA\include\ACTOR_JELLYFISH1_Anim.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\out\USA\include\ACTOR_KRUSTY_Anim.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\out\USA\include\ACTOR_LRGJELLYFISH_Anim.h
|
SOURCE=..\..\..\out\USA\include\ACTOR_LRGJELLYFISH_Anim.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
Loading…
Add table
Reference in a new issue