From 8a1398c99b11dc7c31f580e5118e412b992a8c8b Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 20 Jun 2001 22:02:19 +0000 Subject: [PATCH] --- Graphics/characters/GiantWorm/AnimList.Txt | 4 +++- data/DataCache.scr | 2 +- makefile.gfx | 2 +- source/enemy/npcdata.cpp | 10 ++++----- source/enemy/nshrkman.cpp | 26 +++++++++++++--------- source/enemy/nworm.cpp | 11 ++++++++- source/enemy/nworm.h | 2 ++ 7 files changed, 37 insertions(+), 20 deletions(-) diff --git a/Graphics/characters/GiantWorm/AnimList.Txt b/Graphics/characters/GiantWorm/AnimList.Txt index 8a29b5cbd..68374efaa 100644 --- a/Graphics/characters/GiantWorm/AnimList.Txt +++ b/Graphics/characters/GiantWorm/AnimList.Txt @@ -1,2 +1,4 @@ bodystatic -headstatic \ No newline at end of file +headstatic +arms +tail \ No newline at end of file diff --git a/data/DataCache.scr b/data/DataCache.scr index 3413c63bd..6ac46cef2 100644 --- a/data/DataCache.scr +++ b/data/DataCache.scr @@ -181,7 +181,7 @@ actors/GHOST.SBK actors/HERMITCRAB.SBK actors/IRONDOGFISH.SBK actors/PUFFAFISH.SBK -actors/SHARKMAN.SBK +actors/MANRAY.SBK actors/SKELETALFISH.SBK actors/SPIDERCRAB.SBK actors/SPIKEYANENOME.SBK diff --git a/makefile.gfx b/makefile.gfx index b05999fb1..5d806edfe 100644 --- a/makefile.gfx +++ b/makefile.gfx @@ -112,7 +112,7 @@ ACTOR_NPC := BarnacleBoy Krusty Squidward Gary Sandy Patrick MermaidMan ACTOR_ENEMY := Anenome BabyOctopus Ballblob Caterpillar clam Dustdevil \ Flamingskull FlyingDutchman Ghost HermitCrab IronDogFish \ - PuffaFish Sharkman Skeletalfish SpiderCrab SpikeyAnenome Stomper \ + PuffaFish Manray Skeletalfish SpiderCrab SpikeyAnenome Stomper \ SharkSub Motherjellyfish SeaSnake GiantWorm # Boogermonster Nautilus Neptune diff --git a/source/enemy/npcdata.cpp b/source/enemy/npcdata.cpp index b75a5fe11..ab83e7ded 100644 --- a/source/enemy/npcdata.cpp +++ b/source/enemy/npcdata.cpp @@ -71,8 +71,8 @@ #include #endif -#ifndef __ANIM_SHARKMAN_HEADER__ -#include +#ifndef __ANIM_MANRAY_HEADER__ +#include #endif #ifndef __ANIM_SKELETALFISH_HEADER__ @@ -817,8 +817,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] = }, { // NPC_SHARK_MAN - ACTORS_SHARKMAN_SBK, - ANIM_SHARKMAN_IDLE1_, + ACTORS_MANRAY_SBK, + ANIM_MANRAY_WALK, NPC_SENSOR_GENERIC_USER_VISIBLE, NPC_MOVEMENT_STATIC, NPC_CLOSE_NONE, @@ -829,7 +829,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] = DETECT_ALL_COLLISION, DAMAGE__BITE_ENEMY, 1, - ANIM_SHARKMAN_RUN, + ANIM_MANRAY_WALK, NPC_SHOT_GENERIC, 0, 0, diff --git a/source/enemy/nshrkman.cpp b/source/enemy/nshrkman.cpp index 76eea54d7..e50cca92c 100644 --- a/source/enemy/nshrkman.cpp +++ b/source/enemy/nshrkman.cpp @@ -39,22 +39,26 @@ #include #endif -#ifndef __ANIM_SHARKMAN_HEADER__ -#include +#ifndef __ANIM_MANRAY_HEADER__ +#include #endif -#define ANIM_SHARKMAN_IDLE2_ ANIM_SHARKMAN_IDLE1_ -#define ANIM_SHARKMAN_KICK_SAND ANIM_SHARKMAN_IDLE1_ -#define ANIM_SHARKMAN_PUSHUPS ANIM_SHARKMAN_IDLE1_ - - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void CNpcSharkManEnemy::processMovement( int _frames ) { s32 moveX = 0, moveY = 0; - if ( m_movementTimer > 0 ) + if ( !m_animPlaying ) + { + m_animPlaying = true; + m_frame = 0; + m_animNo = m_data[m_type].moveAnim; + } + + processGenericFixedPathWalk( _frames, &moveX, &moveY ); + + /*if ( m_movementTimer > 0 ) { m_movementTimer -= _frames; @@ -130,7 +134,7 @@ void CNpcSharkManEnemy::processMovement( int _frames ) m_animPlaying = true; m_frame = 0; - } + }*/ processMovementModifier( _frames, moveX, moveY, 0, 0 ); } @@ -139,10 +143,10 @@ void CNpcSharkManEnemy::processMovement( int _frames ) void CNpcSharkManEnemy::processClose( int _frames ) { - if ( m_animNo != ANIM_SHARKMAN_RUN ) + if ( m_animNo != ANIM_MANRAY_ATTACK ) { m_animPlaying = true; - m_animNo = ANIM_SHARKMAN_RUN; + m_animNo = ANIM_MANRAY_ATTACK; m_frame = 0; } else if ( !m_animPlaying ) diff --git a/source/enemy/nworm.cpp b/source/enemy/nworm.cpp index f95625d44..3a6541360 100644 --- a/source/enemy/nworm.cpp +++ b/source/enemy/nworm.cpp @@ -134,6 +134,15 @@ void CNpcParasiticWormEnemy::postInit() m_segmentArray[segCount].setScale( segScale ); + if ( segCount == NPC_PARASITIC_WORM_LENGTH - 1 ) + { + m_segmentArray[segCount].setAnim( ANIM_GIANTWORM_TAIL ); + } + else + { + m_segmentArray[segCount].setAnim( ANIM_GIANTWORM_BODYSTATIC ); + } + // attach snake segment if ( segCount < NPC_PARASITIC_WORM_LENGTH - 1 ) @@ -517,7 +526,7 @@ void CNpcParasiticWormSegment::render() if ( renderFlag ) { - SprFrame = m_actorGfx->Render(renderPos,ANIM_GIANTWORM_BODYSTATIC,0,0); + SprFrame = m_actorGfx->Render(renderPos,m_animNo,0,0); m_actorGfx->RotateScale( SprFrame, renderPos, m_heading, 4096, m_scale ); sBBox boundingBox = m_actorGfx->GetBBox(); diff --git a/source/enemy/nworm.h b/source/enemy/nworm.h index 9ca609d31..c447f8b07 100644 --- a/source/enemy/nworm.h +++ b/source/enemy/nworm.h @@ -33,6 +33,7 @@ public: virtual CRECT const &getCollisionArea() {return m_collisionArea;} DVECTOR const &getCollisionCentre() {return m_collisionCentre;} int getCollisionRadius() {return m_collisionRadius;} + void setAnim( int newAnim ) {m_animNo = newAnim;} protected: u16 m_scale; @@ -44,6 +45,7 @@ protected: DVECTOR m_collisionCentreOffset; DVECTOR m_collisionSize; int m_collisionRadius; + int m_animNo; }; class CNpcParasiticWormEnemy : public CNpcEnemy