diff --git a/Graphics/characters/Motherjellyfish/AnimList.Txt b/Graphics/characters/Motherjellyfish/AnimList.Txt index e69de29bb..ecdef5b83 100644 --- a/Graphics/characters/Motherjellyfish/AnimList.Txt +++ b/Graphics/characters/Motherjellyfish/AnimList.Txt @@ -0,0 +1 @@ +static \ No newline at end of file diff --git a/data/DataCache.scr b/data/DataCache.scr index e37919d75..ae259707b 100644 --- a/data/DataCache.scr +++ b/data/DataCache.scr @@ -187,4 +187,5 @@ actors/SPIDERCRAB.SBK actors/SPIKEYANENOME.SBK actors/STOMPER.SBK -actors/SHARKSUB.SBK \ No newline at end of file +actors/SHARKSUB.SBK +actors/MOTHERJELLYFISH.SBK \ No newline at end of file diff --git a/makefile.gfx b/makefile.gfx index 5dd61690c..de8568971 100644 --- a/makefile.gfx +++ b/makefile.gfx @@ -113,7 +113,7 @@ ACTOR_NPC := BarnacleBoy Krusty Squidward Gary Sandy Patrick MermaidMan ACTOR_ENEMY := Anenome BabyOctopus Ballblob Caterpillar clam Dustdevil Eyeball \ Flamingskull FlyingDutchman Ghost HermitCrab IronDogFish Lrgjellyfish \ PuffaFish Sharkman Skeletalfish SpiderCrab SpikeyAnenome Stomper \ - SharkSub + SharkSub Motherjellyfish # Boogermonster GiantWorm Jellyfish2 Motherjellyfish Nautilus Neptune SeaSnake SharkSub diff --git a/source/enemy/nmjfish.cpp b/source/enemy/nmjfish.cpp index 289baaf1f..6d8827a18 100644 --- a/source/enemy/nmjfish.cpp +++ b/source/enemy/nmjfish.cpp @@ -223,7 +223,9 @@ void CNpcMotherJellyfishEnemy::processClose( int _frames ) } } -/*void CNpcMotherJellyfishEnemy::render() +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void CNpcMotherJellyfishEnemy::render() { SprFrame = NULL; @@ -233,59 +235,22 @@ void CNpcMotherJellyfishEnemy::processClose( int _frames ) // Render DVECTOR renderPos; - DVECTOR origRenderPos; DVECTOR offset = CLevel::getCameraPos(); - int spriteWidth = m_spriteBank->getFrameWidth( m_frame >> 8 ); - int spriteHeight = m_spriteBank->getFrameHeight( m_frame >> 8 ); renderPos.vx = Pos.vx - offset.vx; - origRenderPos.vx = renderPos.vx; - renderPos.vx += m_drawOffset.vx; - renderPos.vy = Pos.vy - offset.vy; - origRenderPos.vy = renderPos.vy; - renderPos.vy += m_drawOffset.vy - ( spriteHeight >> 1 ); if ( renderPos.vx >= 0 && renderPos.vx <= VidGetScrW() ) { if ( renderPos.vy >= 0 && renderPos.vy <= VidGetScrH() ) { - SprFrame = m_spriteBank->printRotatedScaledSprite( FRM_JELLYFISH1_SWIM1,renderPos.vx,renderPos.vy,4096,4096,0,10); - setRGB0( SprFrame, 255, 128, 255 ); + SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),m_reversed); + m_actorGfx->RotateScale( SprFrame, renderPos, m_drawRotation, 8192, 8192 ); - // get xmax, xmin, ymax, ymin - - s32 XMax; - s32 XMin; - - s32 YMax; - s32 YMin; - - XMin=SprFrame->x0; - if (XMin>SprFrame->x1) XMin=SprFrame->x1; - if (XMin>SprFrame->x2) XMin=SprFrame->x2; - if (XMin>SprFrame->x3) XMin=SprFrame->x3; - XMax=SprFrame->x0; - if (XMaxx1) XMax=SprFrame->x1; - if (XMaxx2) XMax=SprFrame->x2; - if (XMaxx3) XMax=SprFrame->x3; - YMin=SprFrame->y0; - if (YMin>SprFrame->y1) YMin=SprFrame->y1; - if (YMin>SprFrame->y2) YMin=SprFrame->y2; - if (YMin>SprFrame->y3) YMin=SprFrame->y3; - YMax=SprFrame->y0; - if (YMaxy1) YMax=SprFrame->y1; - if (YMaxy2) YMax=SprFrame->y2; - if (YMaxy3) YMax=SprFrame->y3; - - XMax -= origRenderPos.vx; - XMin -= origRenderPos.vx; - YMax -= origRenderPos.vy; - YMin -= origRenderPos.vy; - - setCollisionSize( ( XMax - XMin ), ( YMax - YMin ) ); - setCollisionCentreOffset( ( XMax + XMin ) >> 1, ( YMax + YMin ) >> 1 ); + sBBox boundingBox = m_actorGfx->GetBBox(); + setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) ); + setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( boundingBox.YMax + boundingBox.YMin ) >> 1 ); } } } -}*/ +} diff --git a/source/enemy/nmjfish.h b/source/enemy/nmjfish.h index 43475312d..65a87c336 100644 --- a/source/enemy/nmjfish.h +++ b/source/enemy/nmjfish.h @@ -18,7 +18,7 @@ class CNpcMotherJellyfishEnemy : public CNpcEnemy { public: virtual void postInit(); - //void render(); + void render(); protected: virtual void processClose( int _frames ); virtual void processMovement( int _frames ); diff --git a/source/enemy/npcdata.cpp b/source/enemy/npcdata.cpp index a356bb092..dbaa4e9bb 100644 --- a/source/enemy/npcdata.cpp +++ b/source/enemy/npcdata.cpp @@ -771,7 +771,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] = }, { // NPC_MOTHER_JELLYFISH - ACTORS_CLAM_SBK, + ACTORS_MOTHERJELLYFISH_SBK, ANIM_CLAM_SIDESNAP, NPC_SENSOR_NONE, NPC_MOVEMENT_STATIC, diff --git a/users/paul/spongebob project/spongebob project.dsp b/users/paul/spongebob project/spongebob project.dsp index 9ffc1960e..850aa7f6f 100644 --- a/users/paul/spongebob project/spongebob project.dsp +++ b/users/paul/spongebob project/spongebob project.dsp @@ -1904,6 +1904,10 @@ SOURCE=..\..\..\out\USA\include\ACTOR_LRGJELLYFISH_Anim.h # End Source File # Begin Source File +SOURCE=..\..\..\out\USA\include\ACTOR_MOTHERJELLYFISH_Anim.h +# End Source File +# Begin Source File + SOURCE=..\..\..\out\USA\include\ACTOR_PATRICK_Anim.h # End Source File # Begin Source File