This commit is contained in:
Paul 2001-07-23 18:41:23 +00:00
parent 788b0355bb
commit ca556e0aa8
39 changed files with 52 additions and 48 deletions

View file

@ -0,0 +1,2 @@
SitAsleep

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -1 +1,2 @@
Run Run
Stumble

View file

@ -230,6 +230,7 @@ actors/GARY.SBK
actors/SANDY.SBK actors/SANDY.SBK
actors/PATRICK.SBK actors/PATRICK.SBK
actors/MERMAIDMAN.SBK actors/MERMAIDMAN.SBK
actors/MERMAIDMAN_FMA_ITEMOFS.SBK
actors/PLANKTON.SBK actors/PLANKTON.SBK
actors/ANENOME.SBK actors/ANENOME.SBK

View file

@ -108,7 +108,7 @@ ACTOR_DIRS_TO_MAKE := $(ACTOR_MAKEFILE_DIR) $(ACTOR_OUT_DIR)
MKACTOR_OPTS:= -c:16 MKACTOR_OPTS:= -c:16
ACTOR_SPONGEBOB := SpongeBob SpongeBob_CoralBlower SpongeBob_JellyLauncher SpongeBob_Net SpongeBob_Glove SpongeBob_Wand SpongeBob_JellyFish SpongeBob_FMA SpongeBob_FMA_ITEMOFS ACTOR_SPONGEBOB := SpongeBob SpongeBob_CoralBlower SpongeBob_JellyLauncher SpongeBob_Net SpongeBob_Glove SpongeBob_Wand SpongeBob_JellyFish SpongeBob_FMA SpongeBob_FMA_ITEMOFS
ACTOR_NPC := BarnacleBoy Krusty Squidward Gary Sandy Patrick MermaidMan ACTOR_NPC := BarnacleBoy Krusty Squidward Gary Sandy Patrick MermaidMan MermaidMan_FMA_ITEMOFS
ACTOR_ENEMY := Anenome BabyOctopus Ballblob Caterpillar clam Dustdevil \ ACTOR_ENEMY := Anenome BabyOctopus Ballblob Caterpillar clam Dustdevil \
Flamingskull FlyingDutchman Ghost HermitCrab IronDogFish \ Flamingskull FlyingDutchman Ghost HermitCrab IronDogFish \

View file

@ -99,6 +99,7 @@ FX
#ifndef __ANIM_MERMAIDMAN_HEADER__ #ifndef __ANIM_MERMAIDMAN_HEADER__
#include "actor_mermaidman_anim.h" #include "actor_mermaidman_anim.h"
#endif #endif
#include "actor_mermaidman_fma_itemofs_anim.h"
#ifndef __ANIM_BARNACLEBOY_HEADER__ #ifndef __ANIM_BARNACLEBOY_HEADER__
#include "actor_barnacleboy_anim.h" #include "actor_barnacleboy_anim.h"
@ -261,7 +262,6 @@ struct sFMAAnim
typedef struct typedef struct
{ {
FileEquate m_file[3]; FileEquate m_file[3];
DVECTOR m_ItemOfs;
sFMAAnim m_anims[FMA_NUM_ANIMS]; sFMAAnim m_anims[FMA_NUM_ANIMS];
} ACTOR_GRAPHICS_DATA; } ACTOR_GRAPHICS_DATA;
@ -336,7 +336,7 @@ static CScene *s_nextGameSceneTable[FMA_NUM_NEXT_SCENES]=
static const ACTOR_GRAPHICS_DATA s_actorGraphicsData[FMA_NUM_ACTORS]= static const ACTOR_GRAPHICS_DATA s_actorGraphicsData[FMA_NUM_ACTORS]=
{ {
{ // SpongeBob { // SpongeBob
{ACTORS_SPONGEBOB_SBK,ACTORS_SPONGEBOB_FMA_SBK,ACTORS_SPONGEBOB_FMA_ITEMOFS_SBK},{-48,-48}, {ACTORS_SPONGEBOB_SBK,ACTORS_SPONGEBOB_FMA_SBK,ACTORS_SPONGEBOB_FMA_ITEMOFS_SBK},
{ {
/*FMA_ANIM_IDLE*/ {0,ANIM_SPONGEBOB_IDLEBREATH, 0,-1}, /*FMA_ANIM_IDLE*/ {0,ANIM_SPONGEBOB_IDLEBREATH, 0,-1},
/*FMA_ANIM_WALK*/ {0,ANIM_SPONGEBOB_RUN, 2,ANIM_SPONGEBOB_FMA_ITEMOFS_RUN}, /*FMA_ANIM_WALK*/ {0,ANIM_SPONGEBOB_RUN, 2,ANIM_SPONGEBOB_FMA_ITEMOFS_RUN},
@ -346,7 +346,7 @@ static const ACTOR_GRAPHICS_DATA s_actorGraphicsData[FMA_NUM_ACTORS]=
/*FMA_ANIM_IDEA*/ {1,ANIM_SPONGEBOB_FMA_IDEA, 0,-1}, /*FMA_ANIM_IDEA*/ {1,ANIM_SPONGEBOB_FMA_IDEA, 0,-1},
/*FMA_ANIM_QUICKEXIT*/ {1,ANIM_SPONGEBOB_FMA_QUICKEXIT, 0,-1}, /*FMA_ANIM_QUICKEXIT*/ {1,ANIM_SPONGEBOB_FMA_QUICKEXIT, 0,-1},
/*FMA_ANIM_SHOUT*/ {1,ANIM_SPONGEBOB_FMA_SHOUT, 0,-1}, /*FMA_ANIM_SHOUT*/ {1,ANIM_SPONGEBOB_FMA_SHOUT, 0,-1},
/*FMA_ANIM_STUMBLE*/ {1,ANIM_SPONGEBOB_FMA_STUMBLE, 0,-1}, /*FMA_ANIM_STUMBLE*/ {1,ANIM_SPONGEBOB_FMA_STUMBLE, 2,ANIM_SPONGEBOB_FMA_ITEMOFS_STUMBLE},
/*FMA_ANIM_THROW*/ {1,ANIM_SPONGEBOB_FMA_THROW, 0,-1}, /*FMA_ANIM_THROW*/ {1,ANIM_SPONGEBOB_FMA_THROW, 0,-1},
/*FMA_ANIM_HIDE*/ {0,-1, 0,-1}, /*FMA_ANIM_HIDE*/ {0,-1, 0,-1},
/*FMA_ANIM_UNHIDE*/ {0,-1, 0,-1}, /*FMA_ANIM_UNHIDE*/ {0,-1, 0,-1},
@ -358,7 +358,7 @@ static const ACTOR_GRAPHICS_DATA s_actorGraphicsData[FMA_NUM_ACTORS]=
}, },
}, },
{ // Barnicle Boy { // Barnicle Boy
{ACTORS_BARNACLEBOY_SBK, (FileEquate)0,(FileEquate)0},{-32,-48}, {ACTORS_BARNACLEBOY_SBK, (FileEquate)0,(FileEquate)0},
{ {
/*FMA_ANIM_IDLE*/ {0,ANIM_BARNACLEBOY_IDLE, 0,-1}, /*FMA_ANIM_IDLE*/ {0,ANIM_BARNACLEBOY_IDLE, 0,-1},
/*FMA_ANIM_WALK*/ {0,-1, 0,-1}, /*FMA_ANIM_WALK*/ {0,-1, 0,-1},
@ -380,7 +380,7 @@ static const ACTOR_GRAPHICS_DATA s_actorGraphicsData[FMA_NUM_ACTORS]=
}, },
}, },
{ // Mermaid Man { // Mermaid Man
{ACTORS_MERMAIDMAN_SBK, (FileEquate)0,(FileEquate)0},{-32,-64}, {ACTORS_MERMAIDMAN_SBK,ACTORS_MERMAIDMAN_FMA_ITEMOFS_SBK,(FileEquate)0},
{ {
/*FMA_ANIM_IDLE*/ {0,ANIM_MERMAIDMAN_IDLE, 0,-1}, /*FMA_ANIM_IDLE*/ {0,ANIM_MERMAIDMAN_IDLE, 0,-1},
/*FMA_ANIM_WALK*/ {0,-1, 0,-1}, /*FMA_ANIM_WALK*/ {0,-1, 0,-1},
@ -397,12 +397,12 @@ static const ACTOR_GRAPHICS_DATA s_actorGraphicsData[FMA_NUM_ACTORS]=
/*FMA_ANIM_UNHIDEIDLE*/ {0,-1, 0,-1}, /*FMA_ANIM_UNHIDEIDLE*/ {0,-1, 0,-1},
/*FMA_ANIM_SIT*/ {0,ANIM_MERMAIDMAN_SIT, 0,-1}, /*FMA_ANIM_SIT*/ {0,ANIM_MERMAIDMAN_SIT, 0,-1},
/*FMA_ANIM_SITLOOKLEFT*/ {0,-1, 0,-1}, /*FMA_ANIM_SITLOOKLEFT*/ {0,-1, 0,-1},
/*FMA_ANIM_SITASLEEP*/ {0,ANIM_MERMAIDMAN_SITASLEEP, 0,-1}, /*FMA_ANIM_SITASLEEP*/ {0,ANIM_MERMAIDMAN_SITASLEEP, 1,ANIM_MERMAIDMAN_FMA_ITEMOFS_SITASLEEP},
/*FMA_ANIM_RUBHEAD*/ {0,-1, 0,-1}, /*FMA_ANIM_RUBHEAD*/ {0,-1, 0,-1},
}, },
}, },
{ // Gary Da Snail { // Gary Da Snail
{ACTORS_GARY_SBK, (FileEquate)0,(FileEquate)0},{0,0}, {ACTORS_GARY_SBK, (FileEquate)0,(FileEquate)0},
{ {
/*FMA_ANIM_IDLE*/ {0,ANIM_GARY_IDLE, 0,-1}, /*FMA_ANIM_IDLE*/ {0,ANIM_GARY_IDLE, 0,-1},
/*FMA_ANIM_WALK*/ {0,ANIM_GARY_IDLE, 0,-1}, /*FMA_ANIM_WALK*/ {0,ANIM_GARY_IDLE, 0,-1},
@ -424,7 +424,7 @@ static const ACTOR_GRAPHICS_DATA s_actorGraphicsData[FMA_NUM_ACTORS]=
}, },
}, },
{ // Plankton { // Plankton
{ACTORS_PLANKTON_SBK, (FileEquate)0,(FileEquate)0},{0,0}, {ACTORS_PLANKTON_SBK, (FileEquate)0,(FileEquate)0},
{ {
/*FMA_ANIM_IDLE*/ {0,ANIM_PLANKTON_IDLE, 0,-1}, /*FMA_ANIM_IDLE*/ {0,ANIM_PLANKTON_IDLE, 0,-1},
/*FMA_ANIM_WALK*/ {0,-1, 0,-1}, /*FMA_ANIM_WALK*/ {0,-1, 0,-1},
@ -446,7 +446,7 @@ static const ACTOR_GRAPHICS_DATA s_actorGraphicsData[FMA_NUM_ACTORS]=
}, },
}, },
{ // Patrick { // Patrick
{ACTORS_PATRICK_SBK, (FileEquate)0,(FileEquate)0},{0,0}, {ACTORS_PATRICK_SBK, (FileEquate)0,(FileEquate)0},
{ {
/*FMA_ANIM_IDLE*/ {0,ANIM_PATRICK_IDLEBREATHE, 0,-1}, /*FMA_ANIM_IDLE*/ {0,ANIM_PATRICK_IDLEBREATHE, 0,-1},
/*FMA_ANIM_WALK*/ {0,-1, 0,-1}, /*FMA_ANIM_WALK*/ {0,-1, 0,-1},
@ -468,7 +468,7 @@ static const ACTOR_GRAPHICS_DATA s_actorGraphicsData[FMA_NUM_ACTORS]=
}, },
}, },
{ // Krusty { // Krusty
{ACTORS_KRUSTY_SBK, (FileEquate)0,(FileEquate)0},{0,0}, {ACTORS_KRUSTY_SBK, (FileEquate)0,(FileEquate)0},
{ {
/*FMA_ANIM_IDLE*/ {0,ANIM_KRUSTY_IDLEBREATHE, 0,-1}, /*FMA_ANIM_IDLE*/ {0,ANIM_KRUSTY_IDLEBREATHE, 0,-1},
/*FMA_ANIM_WALK*/ {0,-1, 0,-1}, /*FMA_ANIM_WALK*/ {0,-1, 0,-1},
@ -490,7 +490,7 @@ static const ACTOR_GRAPHICS_DATA s_actorGraphicsData[FMA_NUM_ACTORS]=
}, },
}, },
{ // Squidward { // Squidward
{ACTORS_SQUIDWARD_SBK, (FileEquate)0,(FileEquate)0},{0,0}, {ACTORS_SQUIDWARD_SBK, (FileEquate)0,(FileEquate)0},
{ {
/*FMA_ANIM_IDLE*/ {0,ANIM_SQUIDWARD_IDLEBREATHE, 0,-1}, /*FMA_ANIM_IDLE*/ {0,ANIM_SQUIDWARD_IDLEBREATHE, 0,-1},
/*FMA_ANIM_WALK*/ {0,-1, 0,-1}, /*FMA_ANIM_WALK*/ {0,-1, 0,-1},
@ -512,7 +512,7 @@ static const ACTOR_GRAPHICS_DATA s_actorGraphicsData[FMA_NUM_ACTORS]=
}, },
}, },
{ // Sandy { // Sandy
{ACTORS_SANDY_SBK, (FileEquate)0,(FileEquate)0},{0,0}, {ACTORS_SANDY_SBK, (FileEquate)0,(FileEquate)0},
{ {
/*FMA_ANIM_IDLE*/ {0,ANIM_SANDY_IDLE, 0,-1}, /*FMA_ANIM_IDLE*/ {0,ANIM_SANDY_IDLE, 0,-1},
/*FMA_ANIM_WALK*/ {0,-1, 0,-1}, /*FMA_ANIM_WALK*/ {0,-1, 0,-1},
@ -679,8 +679,8 @@ static const int s_FMAC1EndScript[]=
SC_WAIT_ON_CAMERA_STOP, SC_WAIT_ON_CAMERA_STOP,
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB, SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_STUMBLE,0, SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_STUMBLE,0,
SC_THROW_ITEM_TO_ACTOR, 0,FMA_ACTOR_MM,48,120,
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH2_01_DAT, SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH2_01_DAT,
SC_THROW_ITEM_TO_ACTOR, 0,FMA_ACTOR_MM,48,120,
// scene 6 - sarnie flys thru the air // scene 6 - sarnie flys thru the air
// SC_SPRITE_SHIT // SC_SPRITE_SHIT
@ -690,7 +690,6 @@ static const int s_FMAC1EndScript[]=
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,216*16,30*16,56, SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,216*16,30*16,56,
SC_WAIT_ON_CAMERA_STOP, SC_WAIT_ON_CAMERA_STOP,
SC_WAIT_ON_THROWN_ITEM, 0, SC_WAIT_ON_THROWN_ITEM, 0,
SC_CARRY_ITEM, 0,FMA_ACTOR_MM,
// Scene 7 - MM Eats sarnie // Scene 7 - MM Eats sarnie
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB, SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
@ -1290,6 +1289,7 @@ void CFmaScene::render()
{ {
int i; int i;
ACTOR_DATA *actor; ACTOR_DATA *actor;
sItemData *item;
CGameScene::setCameraMtx(); CGameScene::setCameraMtx();
@ -1315,37 +1315,33 @@ void CFmaScene::render()
pos.vx=actor->m_pos.vx-m_cameraPos.vx; pos.vx=actor->m_pos.vx-m_cameraPos.vx;
pos.vy=actor->m_pos.vy-m_cameraPos.vy; pos.vy=actor->m_pos.vy-m_cameraPos.vy;
int AnimNo,AnimBank; int AnimNo,AnimBank;
int facing;
ASSERT(s_actorGraphicsData[i].m_anims[actor->m_animState].Anim!=-1); ASSERT(s_actorGraphicsData[i].m_anims[actor->m_animState].Anim!=-1);
AnimNo=s_actorGraphicsData[i].m_anims[actor->m_animState].Anim; AnimNo=s_actorGraphicsData[i].m_anims[actor->m_animState].Anim;
AnimBank=s_actorGraphicsData[i].m_anims[actor->m_animState].Bank; AnimBank=s_actorGraphicsData[i].m_anims[actor->m_animState].Bank;
actor->m_gfx[AnimBank]->Render(pos,AnimNo,actor->m_animFrame,actor->m_facing); actor->m_gfx[AnimBank]->Render(pos,AnimNo,actor->m_animFrame,actor->m_facing);
// Is there an item anim for this anim?
AnimNo=s_actorGraphicsData[i].m_anims[actor->m_animState].itemAnim;
if(AnimNo!=-1)
{
// Yeah.. grab the item offsets and remember them
int x,y;
AnimBank=s_actorGraphicsData[i].m_anims[actor->m_animState].itemBank;
actor->m_gfx[AnimBank]->getFrameOffsets(AnimNo,actor->m_animFrame,&x,&y);
actor->m_ItemOfs.vx=x;
actor->m_ItemOfs.vy=y;
}
} }
actor++; actor++;
} }
item=m_itemData;
for (i=0; i<FMA_ITEM_MAX; i++) for (i=0; i<FMA_ITEM_MAX; i++)
{ {
sItemData *item=&m_itemData[i];
if(item->m_visible) if(item->m_visible)
{ {
SpriteBank *sb;
sFrameHdr *fh;
DVECTOR pos; DVECTOR pos;
pos.vx=item->m_Pos.vx-m_cameraPos.vx;
pos.vy=item->m_Pos.vy-m_cameraPos.vy; sb=CGameScene::getSpriteBank();
CGameScene::getSpriteBank()->printFT4(item->m_Frame,pos.vx,pos.vy,item->m_facing,0,OTPOS__PICKUP_POS-3); fh=sb->getFrameHeader(item->m_Frame);
pos.vx=item->m_Pos.vx-m_cameraPos.vx+(fh->W/2);
if(!item->m_facing)pos.vx-=fh->W;
pos.vy=item->m_Pos.vy-m_cameraPos.vy-fh->H;
sb->printFT4(fh,pos.vx,pos.vy,item->m_facing,0,OTPOS__PICKUP_POS-3);
} }
item++;
} }
CActorPool::CleanUpCache(); CActorPool::CleanUpCache();
@ -1450,7 +1446,18 @@ void CFmaScene::think(int _frames)
{ // hold on last frame { // hold on last frame
actor->m_animFrame=LastFrame; actor->m_animFrame=LastFrame;
} }
}
// Is there an item anim for this anim?
AnimNo=s_actorGraphicsData[i].m_anims[actor->m_animState].itemAnim;
if(AnimNo!=-1)
{
// Yeah.. grab the item offsets and remember them
int x,y;
AnimBank=s_actorGraphicsData[i].m_anims[actor->m_animState].itemBank;
actor->m_gfx[AnimBank]->getFrameOffsets(AnimNo,actor->m_animFrame,&x,&y);
actor->m_ItemOfs.vx=x;
actor->m_ItemOfs.vy=y;
} }
} }
@ -1516,15 +1523,8 @@ void CFmaScene::think(int _frames)
// Being carried by an actor // Being carried by an actor
item->m_Pos=actor->m_pos; item->m_Pos=actor->m_pos;
item->m_facing=actor->m_facing; item->m_facing=actor->m_facing;
if (item->m_facing) item->m_Pos.vx=item->m_facing?-actor->m_ItemOfs.vx:actor->m_ItemOfs.vx;
{ item->m_Pos.vy+=actor->m_ItemOfs.vy;
item->m_Pos.vx-=/*actorGraphics->m_ItemOfs.vx+*/actor->m_ItemOfs.vx;
}
else
{
item->m_Pos.vx+=/*actorGraphics->m_ItemOfs.vx+*/actor->m_ItemOfs.vx;
}
item->m_Pos.vy+=/*actorGraphics->m_ItemOfs.vy+*/actor->m_ItemOfs.vy;
} }
} }
@ -1811,17 +1811,17 @@ void CFmaScene::startNextScriptCommand()
item->m_endMoveFrame=m_frameCount+*m_pc++; item->m_endMoveFrame=m_frameCount+*m_pc++;
// Calc the positions // Calc the positions
const ACTOR_GRAPHICS_DATA *actorGraphics=&s_actorGraphicsData[item->m_TargetActor]; const ACTOR_DATA *actor=&m_actorData[item->m_TargetActor];
item->m_TargetPos=m_actorData[item->m_TargetActor].m_pos; item->m_TargetPos=actor->m_pos;
if(m_actorData[item->m_TargetActor].m_facing) if(actor->m_facing)
{ {
item->m_TargetPos.vx-=actorGraphics->m_ItemOfs.vx; item->m_TargetPos.vx-=actor->m_ItemOfs.vx;
} }
else else
{ {
item->m_TargetPos.vx+=actorGraphics->m_ItemOfs.vx; item->m_TargetPos.vx+=actor->m_ItemOfs.vx;
} }
item->m_TargetPos.vy+=actorGraphics->m_ItemOfs.vy; item->m_TargetPos.vy+=actor->m_ItemOfs.vy;
item->m_startPos=item->m_Pos; item->m_startPos=item->m_Pos;
} }
break; break;