2001-06-04 16:54:48 +02:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
gameover.cpp
|
|
|
|
|
|
|
|
Author: PKG
|
|
|
|
Created:
|
|
|
|
Project: Spongebob
|
|
|
|
Purpose:
|
|
|
|
|
|
|
|
Copyright (c) 2001 Climax Development Ltd
|
|
|
|
|
|
|
|
===========================================================================*/
|
2001-06-22 20:00:09 +02:00
|
|
|
/*
|
|
|
|
Sprite/object control - Thrown objects, so need curved path, :o(
|
|
|
|
FX
|
2001-07-03 02:02:20 +02:00
|
|
|
1 Sandwich
|
|
|
|
2 makeup bag
|
|
|
|
3 uniform
|
|
|
|
4 kelp bar
|
|
|
|
5 fix tv
|
2001-06-04 16:54:48 +02:00
|
|
|
|
2001-06-22 20:00:09 +02:00
|
|
|
*/
|
2001-06-04 16:54:48 +02:00
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Includes
|
|
|
|
-------- */
|
|
|
|
|
|
|
|
#include "fma\fma.h"
|
|
|
|
|
2001-06-04 18:10:06 +02:00
|
|
|
#ifndef __LEVEL_LEVEL_H__
|
|
|
|
#include "level\level.h"
|
|
|
|
#endif
|
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
#ifndef __BACKEND_PARTY_H__
|
|
|
|
#include "backend\party.h"
|
|
|
|
#endif
|
|
|
|
|
2001-06-04 18:10:06 +02:00
|
|
|
#ifndef __THING_THING_H__
|
|
|
|
#include "thing\thing.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __GAME_CONVO_H__
|
|
|
|
#include "game\convo.h"
|
|
|
|
#endif
|
|
|
|
|
2001-06-11 20:24:32 +02:00
|
|
|
#ifndef __SOUND_SOUND_H__
|
|
|
|
#include "sound\sound.h"
|
|
|
|
#endif
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
#ifndef __ACTOR_HEADER__
|
|
|
|
#include "gfx\actor.h"
|
|
|
|
#endif
|
|
|
|
|
2001-06-22 22:06:39 +02:00
|
|
|
#ifndef __GFX_FADER_H__
|
|
|
|
#include "gfx\fader.h"
|
|
|
|
#endif
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
#include "game\game.h"
|
|
|
|
#include "utils\utils.h"
|
|
|
|
#include "pad\pads.h"
|
|
|
|
#include "gfx\font.h"
|
2001-07-03 02:02:20 +02:00
|
|
|
#include "gfx\otpos.h"
|
|
|
|
#include <sprites.h>
|
|
|
|
|
|
|
|
#include "fx\fx.h"
|
|
|
|
#include "fx\FXTvExplode.h"
|
2001-06-04 16:54:48 +02:00
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
#ifndef __MATHTABLE_HEADER__
|
|
|
|
#include "utils\mathtab.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Game scenes..
|
|
|
|
#ifndef __MAP_MAP_H__
|
|
|
|
#include "map\map.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __FRONTEND_CREDITS_H__
|
|
|
|
#include "backend\credits.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __GAME_GAME_H__
|
|
|
|
#include "game\game.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-06-04 16:54:48 +02:00
|
|
|
/* Std Lib
|
|
|
|
------- */
|
|
|
|
|
|
|
|
/* Data
|
|
|
|
---- */
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
#ifndef __ANIM_SPONGEBOB_HEADER__
|
|
|
|
#include "actor_spongebob_anim.h"
|
|
|
|
#endif
|
2001-07-02 17:42:35 +02:00
|
|
|
#include "actor_spongebob_fma_anim.h"
|
2001-06-16 00:48:16 +02:00
|
|
|
|
|
|
|
#ifndef __ANIM_MERMAIDMAN_HEADER__
|
|
|
|
#include "actor_mermaidman_anim.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __ANIM_BARNACLEBOY_HEADER__
|
|
|
|
#include "actor_barnacleboy_anim.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __ANIM_GARY_HEADER__
|
|
|
|
#include "actor_gary_anim.h"
|
|
|
|
#endif
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
#ifndef __ANIM_PLANKTON_HEADER__
|
|
|
|
#include "actor_plankton_anim.h"
|
|
|
|
#endif
|
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
#ifndef __ANIM_PATRICK_HEADER__
|
|
|
|
#include "actor_patrick_anim.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __ANIM_KRUSTY_HEADER__
|
|
|
|
#include "actor_krusty_anim.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __ANIM_squidward_HEADER__
|
|
|
|
#include "actor_squidward_anim.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __ANIM_SANDY_HEADER__
|
|
|
|
#include "actor_sandy_anim.h"
|
|
|
|
#endif
|
2001-06-16 00:48:16 +02:00
|
|
|
|
2001-07-03 02:02:20 +02:00
|
|
|
#define FRM__KELP_BAR FRM__C4_QUEST_ITEM_2
|
|
|
|
|
2001-06-04 16:54:48 +02:00
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Tyepdefs && Defines
|
|
|
|
------------------- */
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
// Available actors
|
|
|
|
enum
|
|
|
|
{
|
2001-06-22 20:00:09 +02:00
|
|
|
FMA_ACTOR_SPONGEBOB,
|
|
|
|
FMA_ACTOR_BB,
|
2001-07-06 01:00:06 +02:00
|
|
|
FMA_ACTOR_MM,
|
2001-06-22 20:00:09 +02:00
|
|
|
FMA_ACTOR_GARY,
|
2001-07-02 17:42:35 +02:00
|
|
|
FMA_ACTOR_PLANKTON,
|
2001-07-05 23:26:39 +02:00
|
|
|
FMA_ACTOR_PATRICK,
|
|
|
|
FMA_ACTOR_KRABS,
|
|
|
|
FMA_ACTOR_SQUIDWARD,
|
|
|
|
FMA_ACTOR_SANDY,
|
2001-06-16 00:48:16 +02:00
|
|
|
|
2001-06-22 20:00:09 +02:00
|
|
|
FMA_NUM_ACTORS
|
2001-06-16 00:48:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
// Actor animation types
|
2001-07-02 17:42:35 +02:00
|
|
|
enum
|
2001-06-16 00:48:16 +02:00
|
|
|
{
|
2001-06-22 20:00:09 +02:00
|
|
|
FMA_ANIM_IDLE,
|
|
|
|
FMA_ANIM_WALK,
|
2001-07-02 17:42:35 +02:00
|
|
|
|
|
|
|
FMA_ANIM_FIXTV,
|
|
|
|
FMA_ANIM_GIVEEND,
|
|
|
|
FMA_ANIM_GIVESTART,
|
|
|
|
FMA_ANIM_IDEA,
|
|
|
|
FMA_ANIM_QUICKEXIT,
|
|
|
|
FMA_ANIM_SHOUT,
|
|
|
|
FMA_ANIM_STUMBLE,
|
|
|
|
FMA_ANIM_THROW,
|
|
|
|
|
|
|
|
FMA_ANIM_HIDE,
|
|
|
|
FMA_ANIM_UNHIDE,
|
|
|
|
FMA_ANIM_UNHIDEIDLE,
|
|
|
|
FMA_ANIM_SIT,
|
|
|
|
FMA_ANIM_SITLOOKLEFT,
|
2001-07-04 22:42:42 +02:00
|
|
|
FMA_ANIM_SITASLEEP,
|
|
|
|
FMA_ANIM_RUBHEAD,
|
2001-06-16 00:48:16 +02:00
|
|
|
|
2001-06-22 20:00:09 +02:00
|
|
|
FMA_NUM_ANIMS,
|
2001-06-16 00:48:16 +02:00
|
|
|
};
|
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
// Next scene types
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
FMA_NEXT_SCENE_MAP,
|
|
|
|
FMA_NEXT_SCENE_GAME,
|
|
|
|
FMA_NEXT_SCENE_CREDITS,
|
|
|
|
|
|
|
|
FMA_NUM_NEXT_SCENES
|
|
|
|
};
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
// Available script commands
|
|
|
|
typedef enum
|
|
|
|
{
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_USE_LEVEL, // levelNumber
|
|
|
|
SC_USE_PARTY, //
|
|
|
|
SC_SET_NEXT_SCENE, // nextScene
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
SC_SNAP_CAMERA_TO, // x,y
|
|
|
|
SC_MOVE_CAMERA_TO, // x,y,frames
|
|
|
|
|
|
|
|
SC_REGISTER_CONVERSATION, // scriptId
|
|
|
|
|
|
|
|
SC_WAIT_ON_TIMER, // frames (nonblocking)
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, // actor (nonblocking)
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_WAIT_ON_ACTOR_ANIM, // actor (nonblocking)
|
2001-06-16 00:48:16 +02:00
|
|
|
SC_WAIT_ON_CAMERA_STOP, // (nonblocking)
|
|
|
|
SC_WAIT_ON_CONVERSATION, // scriptId (nonblocking)
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_WAIT_ON_THROWN_ITEM, // item
|
2001-06-16 00:48:16 +02:00
|
|
|
|
|
|
|
SC_SET_ACTOR_VISIBILITY, // actor,on/off
|
|
|
|
SC_SET_ACTOR_POSITION, // actor,x,y
|
|
|
|
SC_SET_ACTOR_FACING, // actor,facing
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, // actor,state,loop
|
2001-06-16 00:48:16 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, // actor,x,y,frames
|
2001-07-06 01:16:09 +02:00
|
|
|
SC_SET_GLOBAL_ANIMATION, // on/off
|
2001-06-16 00:48:16 +02:00
|
|
|
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_CREATE_FX, // FxNo, X,Y, FXType
|
|
|
|
SC_KILL_FX, // FxNo
|
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_SET_ITEM, // item,frame
|
|
|
|
SC_CARRY_ITEM, // item,actor
|
|
|
|
SC_HIDE_ITEM, // item
|
|
|
|
SC_THROW_ITEM_TO_ACTOR, // item,targetActor,arcHeight,frames
|
2001-07-03 02:02:20 +02:00
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_START, //
|
|
|
|
SC_STOP, //
|
2001-06-16 00:48:16 +02:00
|
|
|
} SCRIPT_COMMAND;
|
|
|
|
|
2001-07-03 02:02:20 +02:00
|
|
|
/*
|
|
|
|
struct sFMAItemTable
|
|
|
|
{
|
|
|
|
u16 Frame;
|
|
|
|
DVECTOR SprOfs;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum FMA_ITEM
|
|
|
|
{
|
|
|
|
FMA_ITEM_C1,
|
|
|
|
FMA_ITEM_C2,
|
|
|
|
FMA_ITEM_C3,
|
|
|
|
FMA_ITEM_C4,
|
|
|
|
FMA_ITEM_C5,
|
|
|
|
FMA_ITEM_MAX
|
|
|
|
}
|
2001-06-16 00:48:16 +02:00
|
|
|
|
2001-07-03 02:02:20 +02:00
|
|
|
sFMAItemTable FMAItemTable[FMA_ITEM_MAX]
|
|
|
|
{
|
|
|
|
};
|
|
|
|
*/
|
2001-06-04 16:54:48 +02:00
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Structure defintions
|
|
|
|
-------------------- */
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
// Data for an actors graphics
|
2001-07-02 17:42:35 +02:00
|
|
|
struct sFMAAnim
|
|
|
|
{
|
|
|
|
s16 Bank;
|
|
|
|
s16 Anim;
|
|
|
|
};
|
2001-06-16 00:48:16 +02:00
|
|
|
typedef struct
|
|
|
|
{
|
2001-07-02 17:42:35 +02:00
|
|
|
FileEquate m_file[2];
|
2001-07-03 02:02:20 +02:00
|
|
|
DVECTOR m_ItemOfs;
|
2001-07-02 17:42:35 +02:00
|
|
|
sFMAAnim m_anims[FMA_NUM_ANIMS];
|
2001-06-16 00:48:16 +02:00
|
|
|
|
|
|
|
} ACTOR_GRAPHICS_DATA;
|
|
|
|
|
|
|
|
// Actor data
|
|
|
|
typedef struct
|
|
|
|
{
|
2001-07-02 17:42:35 +02:00
|
|
|
CActorGfx *m_gfx[2];
|
2001-06-16 00:48:16 +02:00
|
|
|
u8 m_active;
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
s8 m_animState,m_animFrame;
|
|
|
|
s8 m_animLoop;
|
2001-06-16 00:48:16 +02:00
|
|
|
|
|
|
|
DVECTOR m_pos;
|
|
|
|
|
|
|
|
u16 m_startMoveFrame;
|
|
|
|
DVECTOR m_startMovePos;
|
|
|
|
u16 m_endMoveFrame;
|
|
|
|
DVECTOR m_endMovePos;
|
|
|
|
u8 m_moving;
|
|
|
|
|
|
|
|
u8 m_facing;
|
|
|
|
} ACTOR_DATA;
|
|
|
|
|
2001-07-03 02:02:20 +02:00
|
|
|
struct sItemData
|
|
|
|
{
|
2001-07-05 23:26:39 +02:00
|
|
|
s8 m_visible;
|
|
|
|
|
2001-07-03 02:02:20 +02:00
|
|
|
DVECTOR m_Pos;
|
|
|
|
s8 m_Actor;
|
|
|
|
u8 m_facing;
|
|
|
|
u16 m_Frame;
|
2001-07-05 23:26:39 +02:00
|
|
|
|
2001-07-03 02:02:20 +02:00
|
|
|
s8 m_TargetActor;
|
2001-07-05 23:26:39 +02:00
|
|
|
DVECTOR m_startPos;
|
2001-07-03 02:02:20 +02:00
|
|
|
DVECTOR m_TargetPos;
|
2001-07-05 23:26:39 +02:00
|
|
|
u16 m_startMoveFrame;
|
|
|
|
u16 m_endMoveFrame;
|
|
|
|
s8 m_throwArcHeight;
|
2001-07-03 02:02:20 +02:00
|
|
|
};
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
|
2001-06-04 16:54:48 +02:00
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Function Prototypes
|
|
|
|
------------------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Vars
|
|
|
|
---- */
|
2001-07-03 02:02:20 +02:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
FMA_FX_COUNT=4,
|
|
|
|
FMA_ITEM_MAX=4,
|
|
|
|
};
|
2001-06-04 16:54:48 +02:00
|
|
|
|
|
|
|
CFmaScene FmaScene;
|
2001-07-03 02:02:20 +02:00
|
|
|
CFX *m_FXTable[FMA_FX_COUNT];
|
|
|
|
sItemData m_itemData[FMA_ITEM_MAX];
|
2001-06-04 16:54:48 +02:00
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
/*****************************************************************************/
|
|
|
|
static CScene *s_nextGameSceneTable[FMA_NUM_NEXT_SCENES]=
|
|
|
|
{
|
|
|
|
&MapScene, // FMA_NEXT_SCENE_MAP
|
|
|
|
&GameScene, // FMA_NEXT_SCENE_GAME
|
|
|
|
&CreditsScene, // FMA_NEXT_SCENE_CREDITS
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
/*****************************************************************************/
|
|
|
|
// Actor graphics data
|
|
|
|
static const ACTOR_GRAPHICS_DATA s_actorGraphicsData[FMA_NUM_ACTORS]=
|
|
|
|
{
|
|
|
|
{ // SpongeBob
|
2001-07-03 02:02:20 +02:00
|
|
|
{ACTORS_SPONGEBOB_SBK,ACTORS_SPONGEBOB_FMA_SBK},{-48,-48},
|
2001-07-02 17:42:35 +02:00
|
|
|
{
|
|
|
|
/*FMA_ANIM_IDLE*/ {0,ANIM_SPONGEBOB_IDLEBREATH},
|
|
|
|
/*FMA_ANIM_WALK*/ {0,ANIM_SPONGEBOB_RUN},
|
|
|
|
/*FMA_ANIM_FIXTV*/ {1,ANIM_SPONGEBOB_FMA_FIXTV},
|
|
|
|
/*FMA_ANIM_GIVEEND*/ {1,ANIM_SPONGEBOB_FMA_GIVEEND},
|
|
|
|
/*FMA_ANIM_GIVESTART*/ {1,ANIM_SPONGEBOB_FMA_GIVESTART},
|
|
|
|
/*FMA_ANIM_IDEA*/ {1,ANIM_SPONGEBOB_FMA_IDEA},
|
|
|
|
/*FMA_ANIM_QUICKEXIT*/ {1,ANIM_SPONGEBOB_FMA_QUICKEXIT},
|
|
|
|
/*FMA_ANIM_SHOUT*/ {1,ANIM_SPONGEBOB_FMA_SHOUT},
|
|
|
|
/*FMA_ANIM_STUMBLE*/ {1,ANIM_SPONGEBOB_FMA_STUMBLE},
|
|
|
|
/*FMA_ANIM_THROW*/ {1,ANIM_SPONGEBOB_FMA_THROW},
|
|
|
|
/*FMA_ANIM_HIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDEIDLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SITLOOKLEFT*/ {0,-1},
|
2001-07-04 22:42:42 +02:00
|
|
|
/*FMA_ANIM_SITASLEEP*/ {0,-1},
|
|
|
|
/*FMA_ANIM_RUBHEAD*/ {0,-1},
|
2001-07-02 17:42:35 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ // Barnicle Boy
|
2001-07-03 02:02:20 +02:00
|
|
|
{ACTORS_BARNACLEBOY_SBK, (FileEquate)0},{-32,-48},
|
2001-07-02 17:42:35 +02:00
|
|
|
{
|
|
|
|
/*FMA_ANIM_IDLE*/ {0,ANIM_BARNACLEBOY_IDLE},
|
|
|
|
/*FMA_ANIM_WALK*/ {0,-1},
|
|
|
|
/*FMA_ANIM_FIXTV*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVEEND*/ {0,ANIM_BARNACLEBOY_GIVEEND},
|
|
|
|
/*FMA_ANIM_GIVESTART*/ {0,ANIM_BARNACLEBOY_GIVESTART},
|
|
|
|
/*FMA_ANIM_IDEA*/ {0,-1},
|
|
|
|
/*FMA_ANIM_QUICKEXIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SHOUT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_STUMBLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_THROW*/ {0,-1},
|
|
|
|
/*FMA_ANIM_HIDE*/ {0,ANIM_BARNACLEBOY_HIDE},
|
|
|
|
/*FMA_ANIM_UNHIDE*/ {0,ANIM_BARNACLEBOY_UNHIDE},
|
|
|
|
/*FMA_ANIM_UNHIDEIDLE*/ {0,ANIM_BARNACLEBOY_UNHIDEIDLE},
|
|
|
|
/*FMA_ANIM_SIT*/ {0,ANIM_BARNACLEBOY_SIT},
|
|
|
|
/*FMA_ANIM_SITLOOKLEFT*/ {0,ANIM_BARNACLEBOY_SITLOOKLEFT},
|
2001-07-04 22:42:42 +02:00
|
|
|
/*FMA_ANIM_SITASLEEP*/ {0,ANIM_BARNACLEBOY_SITASLEEP},
|
|
|
|
/*FMA_ANIM_RUBHEAD*/ {0,ANIM_BARNACLEBOY_RUBHEAD},
|
2001-07-02 17:42:35 +02:00
|
|
|
},
|
|
|
|
},
|
2001-07-06 01:00:06 +02:00
|
|
|
{ // Mermaid Man
|
|
|
|
{ACTORS_MERMAIDMAN_SBK, (FileEquate)0},{-32,-64},
|
|
|
|
{
|
|
|
|
/*FMA_ANIM_IDLE*/ {0,ANIM_MERMAIDMAN_IDLE},
|
|
|
|
/*FMA_ANIM_WALK*/ {0,-1},
|
|
|
|
/*FMA_ANIM_FIXTV*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVEEND*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVESTART*/ {0,-1},
|
|
|
|
/*FMA_ANIM_IDEA*/ {0,-1},
|
|
|
|
/*FMA_ANIM_QUICKEXIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SHOUT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_STUMBLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_THROW*/ {0,-1},
|
|
|
|
/*FMA_ANIM_HIDE*/ {0,ANIM_MERMAIDMAN_HIDE},
|
|
|
|
/*FMA_ANIM_UNHIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDEIDLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SIT*/ {0,ANIM_MERMAIDMAN_SIT},
|
|
|
|
/*FMA_ANIM_SITLOOKLEFT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SITASLEEP*/ {0,ANIM_MERMAIDMAN_SITASLEEP},
|
|
|
|
/*FMA_ANIM_RUBHEAD*/ {0,-1},
|
|
|
|
},
|
|
|
|
},
|
2001-07-02 17:42:35 +02:00
|
|
|
{ // Gary Da Snail
|
2001-07-03 02:02:20 +02:00
|
|
|
{ACTORS_GARY_SBK, (FileEquate)0},{0,0},
|
2001-07-02 17:42:35 +02:00
|
|
|
{
|
|
|
|
/*FMA_ANIM_IDLE*/ {0,ANIM_GARY_IDLE},
|
|
|
|
/*FMA_ANIM_WALK*/ {0,ANIM_GARY_IDLE},
|
|
|
|
/*FMA_ANIM_FIXTV*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVEEND*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVESTART*/ {0,-1},
|
|
|
|
/*FMA_ANIM_IDEA*/ {0,-1},
|
|
|
|
/*FMA_ANIM_QUICKEXIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SHOUT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_STUMBLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_THROW*/ {0,-1},
|
|
|
|
/*FMA_ANIM_HIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDEIDLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SITLOOKLEFT*/ {0,-1},
|
2001-07-04 22:42:42 +02:00
|
|
|
/*FMA_ANIM_SITASLEEP*/ {0,-1},
|
|
|
|
/*FMA_ANIM_RUBHEAD*/ {0,-1},
|
2001-07-02 17:42:35 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{ // Plankton
|
2001-07-03 02:02:20 +02:00
|
|
|
{ACTORS_PLANKTON_SBK, (FileEquate)0},{0,0},
|
2001-07-02 17:42:35 +02:00
|
|
|
{
|
|
|
|
/*FMA_ANIM_IDLE*/ {0,ANIM_PLANKTON_IDLE},
|
|
|
|
/*FMA_ANIM_WALK*/ {0,-1},
|
|
|
|
/*FMA_ANIM_FIXTV*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVEEND*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVESTART*/ {0,-1},
|
|
|
|
/*FMA_ANIM_IDEA*/ {0,-1},
|
|
|
|
/*FMA_ANIM_QUICKEXIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SHOUT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_STUMBLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_THROW*/ {0,-1},
|
|
|
|
/*FMA_ANIM_HIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDEIDLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SITLOOKLEFT*/ {0,-1},
|
2001-07-04 22:42:42 +02:00
|
|
|
/*FMA_ANIM_SITASLEEP*/ {0,-1},
|
2001-07-05 23:26:39 +02:00
|
|
|
/*FMA_ANIM_RUBHEAD*/ {0,-1},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ // Patrick
|
|
|
|
{ACTORS_PATRICK_SBK, (FileEquate)0},{0,0},
|
|
|
|
{
|
|
|
|
/*FMA_ANIM_IDLE*/ {0,ANIM_PATRICK_IDLEBREATHE},
|
|
|
|
/*FMA_ANIM_WALK*/ {0,-1},
|
|
|
|
/*FMA_ANIM_FIXTV*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVEEND*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVESTART*/ {0,-1},
|
|
|
|
/*FMA_ANIM_IDEA*/ {0,-1},
|
|
|
|
/*FMA_ANIM_QUICKEXIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SHOUT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_STUMBLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_THROW*/ {0,-1},
|
|
|
|
/*FMA_ANIM_HIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDEIDLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SITLOOKLEFT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SITASLEEP*/ {0,-1},
|
|
|
|
/*FMA_ANIM_RUBHEAD*/ {0,-1},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ // Krusty
|
|
|
|
{ACTORS_KRUSTY_SBK, (FileEquate)0},{0,0},
|
|
|
|
{
|
|
|
|
/*FMA_ANIM_IDLE*/ {0,ANIM_KRUSTY_IDLEBREATHE},
|
|
|
|
/*FMA_ANIM_WALK*/ {0,-1},
|
|
|
|
/*FMA_ANIM_FIXTV*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVEEND*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVESTART*/ {0,-1},
|
|
|
|
/*FMA_ANIM_IDEA*/ {0,-1},
|
|
|
|
/*FMA_ANIM_QUICKEXIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SHOUT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_STUMBLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_THROW*/ {0,-1},
|
|
|
|
/*FMA_ANIM_HIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDEIDLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SITLOOKLEFT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SITASLEEP*/ {0,-1},
|
|
|
|
/*FMA_ANIM_RUBHEAD*/ {0,-1},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ // Squidward
|
|
|
|
{ACTORS_SQUIDWARD_SBK, (FileEquate)0},{0,0},
|
|
|
|
{
|
|
|
|
/*FMA_ANIM_IDLE*/ {0,ANIM_SQUIDWARD_IDLEBREATHE},
|
|
|
|
/*FMA_ANIM_WALK*/ {0,-1},
|
|
|
|
/*FMA_ANIM_FIXTV*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVEEND*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVESTART*/ {0,-1},
|
|
|
|
/*FMA_ANIM_IDEA*/ {0,-1},
|
|
|
|
/*FMA_ANIM_QUICKEXIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SHOUT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_STUMBLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_THROW*/ {0,-1},
|
|
|
|
/*FMA_ANIM_HIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDEIDLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SITLOOKLEFT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SITASLEEP*/ {0,-1},
|
|
|
|
/*FMA_ANIM_RUBHEAD*/ {0,-1},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ // Sandy
|
|
|
|
{ACTORS_SANDY_SBK, (FileEquate)0},{0,0},
|
|
|
|
{
|
|
|
|
/*FMA_ANIM_IDLE*/ {0,ANIM_SANDY_IDLE},
|
|
|
|
/*FMA_ANIM_WALK*/ {0,-1},
|
|
|
|
/*FMA_ANIM_FIXTV*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVEEND*/ {0,-1},
|
|
|
|
/*FMA_ANIM_GIVESTART*/ {0,-1},
|
|
|
|
/*FMA_ANIM_IDEA*/ {0,-1},
|
|
|
|
/*FMA_ANIM_QUICKEXIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SHOUT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_STUMBLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_THROW*/ {0,-1},
|
|
|
|
/*FMA_ANIM_HIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_UNHIDEIDLE*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SIT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SITLOOKLEFT*/ {0,-1},
|
|
|
|
/*FMA_ANIM_SITASLEEP*/ {0,-1},
|
2001-07-04 22:42:42 +02:00
|
|
|
/*FMA_ANIM_RUBHEAD*/ {0,-1},
|
2001-07-02 17:42:35 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
ACTOR_DATA m_actorData[FMA_NUM_ACTORS];
|
2001-06-04 16:54:48 +02:00
|
|
|
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*** Intro FMA ***************************************************************/
|
|
|
|
/*****************************************************************************/
|
2001-06-22 22:06:39 +02:00
|
|
|
static const int s_FMAIntroScript[]=
|
2001-06-22 20:00:09 +02:00
|
|
|
{
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH1_00_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH1_01_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH1_02_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH1_03_DAT,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_USE_LEVEL, 25,
|
|
|
|
SC_SET_NEXT_SCENE, FMA_NEXT_SCENE_MAP,
|
|
|
|
SC_START,
|
|
|
|
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 1 - SB & Gary outside house
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,80*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,1,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_SPONGEBOB,true,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_GARY,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_GARY,84*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_GARY,1,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_GARY,true,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 67*16,18*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
SC_WAIT_ON_TIMER, 60,
|
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH1_00_DAT,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,60*16,30*16,60*2,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_GARY,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_GARY,64*16,30*16,60*3,
|
|
|
|
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
// SC_WAIT_ON_TIMER, 60*2,
|
|
|
|
|
|
|
|
// Scene 2 - Shady shoals with BB & MM
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_MM,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_MM,11*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_MM,0,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_MM,true,
|
|
|
|
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,60*16,30*16,60*2,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_BB,17*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_BB,0,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_BB,true,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 4*16,18*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_TIMER, 60,
|
|
|
|
|
|
|
|
// Scene 3 - SB Arives
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,40*16,30*16,
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,24*16,30*16,60*2,
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_GARY,44*16,30*16,
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_GARY,28*16,30*16,60*3,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_GARY,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_GARY,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 4 - SB talks to em
|
|
|
|
// Scene 5 - MM gives task
|
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH1_01_DAT,
|
|
|
|
|
|
|
|
// Scene 7 - SB Leaves
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH1_02_DAT,
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_QUICKEXIT,0,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,0,
|
|
|
|
SC_WAIT_ON_ACTOR_ANIM, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-07-04 22:42:42 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_RUBHEAD,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,40*16,30*16,30,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
|
|
|
|
// Scene 8 - Back to Gary, for non funny end
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_GARY,0,
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_GARY,30*16,30*16,60,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_GARY,
|
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH1_03_DAT,
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_GARY,44*16,30*16,60*2,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_GARY,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
SC_STOP
|
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*** C1 End FMA **************************************************************/
|
|
|
|
/*****************************************************************************/
|
2001-06-22 22:06:39 +02:00
|
|
|
static const int s_FMAC1EndScript[]=
|
2001-06-22 20:00:09 +02:00
|
|
|
{
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH2_00_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH2_01_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH2_02_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH2_03_DAT,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_USE_LEVEL, 25,
|
|
|
|
SC_SET_NEXT_SCENE, FMA_NEXT_SCENE_MAP,
|
|
|
|
SC_START,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 1 - Shade Shoals
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 4*16,18*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_TIMER, 60*2,
|
2001-07-03 02:02:20 +02:00
|
|
|
|
2001-06-22 20:00:09 +02:00
|
|
|
// Scene 2 - inside Shady Shoals
|
2001-07-04 22:42:42 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_MM,FMA_ANIM_SITASLEEP,1,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_MM,208*16,(30*16)+8,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_MM,0,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_MM,true,
|
|
|
|
|
2001-07-04 22:42:42 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_SITASLEEP,1,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_BB,211*16,(30*16)+8,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_BB,1,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_BB,true,
|
2001-07-06 00:26:42 +02:00
|
|
|
SC_CREATE_FX, 0,207*16,(26*16),CFX::FX_TYPE_ZZZZ,
|
|
|
|
SC_CREATE_FX, 1,211*16,(26*16),CFX::FX_TYPE_ZZZZ,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 197*16,18*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_TIMER, 30,
|
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH2_00_DAT,
|
|
|
|
SC_WAIT_ON_TIMER, 30,
|
|
|
|
|
|
|
|
// Scene 3 - SB enter by door
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_MOVE_CAMERA_TO, 235*16,18*16,60,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CAMERA_STOP,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,270*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,1,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_SPONGEBOB,true,
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_SET_ITEM, 0,FRM__SANDWICH,
|
|
|
|
SC_CARRY_ITEM, 0,FMA_ACTOR_SPONGEBOB,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,260*16,30*16,40,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,230*16,30*16,120,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_MOVE_CAMERA_TO, 210*16,18*16,120,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CAMERA_STOP,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
2001-07-06 00:26:42 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_STUMBLE,0,
|
|
|
|
SC_THROW_ITEM_TO_ACTOR, 0,FMA_ACTOR_MM,48,120,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH2_01_DAT,
|
|
|
|
|
|
|
|
// scene 6 - sarnie flys thru the air
|
|
|
|
// SC_SPRITE_SHIT
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_MOVE_CAMERA_TO, 197*16,18*16,120,
|
2001-07-06 00:26:42 +02:00
|
|
|
SC_WAIT_ON_ACTOR_ANIM, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,216*16,30*16,56,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CAMERA_STOP,
|
2001-07-06 00:26:42 +02:00
|
|
|
SC_WAIT_ON_THROWN_ITEM, 0,
|
|
|
|
SC_CARRY_ITEM, 0,FMA_ACTOR_MM,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 7 - MM Eats sarnie
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_IDLE,1,
|
2001-07-06 00:26:42 +02:00
|
|
|
SC_KILL_FX, 1,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_SITLOOKLEFT,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_BB,0,
|
|
|
|
SC_WAIT_ON_TIMER, 30,
|
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH2_02_DAT,
|
|
|
|
|
|
|
|
|
|
|
|
// Scene 8 - SB Leaves
|
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH2_03_DAT,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_QUICKEXIT,0,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,0,
|
|
|
|
SC_WAIT_ON_ACTOR_ANIM, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,240*16,30*16,40,
|
2001-07-06 00:26:42 +02:00
|
|
|
// SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_RUBHEAD,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_STOP
|
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*** C2 End FMA **************************************************************/
|
|
|
|
/*****************************************************************************/
|
2001-06-22 22:06:39 +02:00
|
|
|
static const int s_FMAC2EndScript[]=
|
2001-06-22 20:00:09 +02:00
|
|
|
{
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH3_00_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH3_01_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH3_02_DAT,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_USE_LEVEL, 25,
|
|
|
|
SC_SET_NEXT_SCENE, FMA_NEXT_SCENE_MAP,
|
|
|
|
SC_START,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 1 - Shade Shoals
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 4*16,18*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_TIMER, 60*2,
|
|
|
|
|
|
|
|
// Scene 2 - inside Shady Shoals
|
2001-07-06 00:26:42 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_MM,FMA_ANIM_SITASLEEP,1,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_MM,208*16,(30*16)+8,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_MM,0,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_MM,true,
|
|
|
|
|
2001-07-06 00:26:42 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_SITASLEEP,1,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_BB,211*16,(30*16)+8,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_BB,0,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_BB,true,
|
2001-07-06 00:26:42 +02:00
|
|
|
SC_CREATE_FX, 0,207*16,(26*16),CFX::FX_TYPE_ZZZZ,
|
|
|
|
SC_CREATE_FX, 1,211*16,(26*16),CFX::FX_TYPE_ZZZZ,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 197*16,18*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_TIMER, 60,
|
|
|
|
|
|
|
|
// Scene 3 - SB enter by door
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_MOVE_CAMERA_TO, 235*16,18*16,60,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CAMERA_STOP,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,270*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,1,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_SPONGEBOB,true,
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_SET_ITEM, 0,FRM__MAKEUPBAG,
|
|
|
|
SC_CARRY_ITEM, 0,FMA_ACTOR_SPONGEBOB,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,260*16,30*16,40,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH3_00_DAT,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,216*16,30*16,216,
|
|
|
|
SC_MOVE_CAMERA_TO, 197*16,18*16,200,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CAMERA_STOP,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_IDLE,1,
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_CARRY_ITEM, 0,FMA_ACTOR_BB,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 7 - BB gives new task
|
2001-07-06 00:26:42 +02:00
|
|
|
SC_KILL_FX, 1,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_SITLOOKLEFT,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_TIMER, 30,
|
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH3_01_DAT,
|
|
|
|
|
|
|
|
|
|
|
|
// Scene 8 - SB Leaves
|
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH3_02_DAT,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_QUICKEXIT,0,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,0,
|
|
|
|
SC_WAIT_ON_ACTOR_ANIM, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,240*16,30*16,40,
|
2001-07-06 22:52:47 +02:00
|
|
|
// SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_RUBHEAD,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_STOP
|
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*** C3 End FMA **************************************************************/
|
|
|
|
/*****************************************************************************/
|
2001-06-22 22:06:39 +02:00
|
|
|
static const int s_FMAC3EndScript[]=
|
2001-06-22 20:00:09 +02:00
|
|
|
{
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH4_00_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH4_01_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH4_02_DAT,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_USE_LEVEL, 25,
|
|
|
|
SC_SET_NEXT_SCENE, FMA_NEXT_SCENE_MAP,
|
|
|
|
SC_START,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 1 - Shade Shoals
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 4*16,18*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_TIMER, 30,
|
|
|
|
|
|
|
|
// Scene 2 - SB arrives outside Shady Shoals
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,40*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,1,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_SPONGEBOB,true,
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_SET_ITEM, 0,FRM__UNIFORM,
|
|
|
|
SC_CARRY_ITEM, 0,FMA_ACTOR_SPONGEBOB,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,14*16,30*16,104,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH4_00_DAT,
|
|
|
|
|
|
|
|
// Scene 3 - inside Shady Shoals
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_MM,FMA_ANIM_SIT,1,
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_MM,208*16,(30*16)+8,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_MM,0,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_MM,true,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_SIT,1,
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_BB,211*16,(30*16)+8,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_BB,0,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_BB,true,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 197*16,18*16,
|
|
|
|
SC_WAIT_ON_TIMER, 5,
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_SITLOOKLEFT,1,
|
|
|
|
SC_WAIT_ON_TIMER, 5,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH4_01_DAT,
|
|
|
|
SC_WAIT_ON_TIMER, 30,
|
|
|
|
|
|
|
|
// Scene 4 - SB enter by door, and runs over to them
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_MOVE_CAMERA_TO, 235*16,18*16,60,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CAMERA_STOP,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_MM,FMA_ANIM_HIDE,1,
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_MM,220*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_MM,1,
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_HIDE,1,
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_BB,204*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_BB,0,
|
|
|
|
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,270*16,30*16,
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,260*16,30*16,40,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,208*16,30*16,248,
|
|
|
|
SC_MOVE_CAMERA_TO, 197*16,18*16,200,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CAMERA_STOP,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
// BB removes shade
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_UNHIDE,0,
|
|
|
|
SC_WAIT_ON_ACTOR_ANIM, FMA_ACTOR_BB,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_TIMER, 30,
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_CARRY_ITEM, 0,FMA_ACTOR_BB,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH4_02_DAT,
|
|
|
|
|
|
|
|
// Scene 8 - SB Leaves
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_QUICKEXIT,0,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,0,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_WAIT_ON_ACTOR_ANIM, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,240*16,30*16,40,
|
2001-07-04 22:42:42 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_RUBHEAD,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
|
|
|
|
SC_STOP
|
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*** C4 End FMA **************************************************************/
|
|
|
|
/*****************************************************************************/
|
2001-07-02 17:42:35 +02:00
|
|
|
|
2001-06-22 22:06:39 +02:00
|
|
|
static const int s_FMAC4EndScript[]=
|
2001-06-22 20:00:09 +02:00
|
|
|
{
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH5_00_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH5_01_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH5_02_DAT,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_USE_LEVEL, 25,
|
|
|
|
SC_SET_NEXT_SCENE, FMA_NEXT_SCENE_MAP,
|
|
|
|
SC_START,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 1 - Shade Shoals
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 369*16,18*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_TIMER, 30,
|
|
|
|
|
|
|
|
// Scene 2 - SB arrives outside Shady Shoals
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,405*16,30*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,1,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_SPONGEBOB,true,
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_SET_ITEM, 0,FRM__KELP_BAR,
|
|
|
|
SC_CARRY_ITEM, 0,FMA_ACTOR_SPONGEBOB,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_IDLE,1,
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_BB,370*16,30*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_BB,0,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_BB,true,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,382*16,30*16,92,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH5_00_DAT,
|
|
|
|
// SB throws bar thru window
|
2001-07-06 00:26:42 +02:00
|
|
|
SC_THROW_ITEM_TO_ACTOR, 0,FMA_ACTOR_BB,64,120,
|
|
|
|
SC_WAIT_ON_THROWN_ITEM, 0,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
// BB comes to Porthole
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_BB,374*16,30*16,60,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_BB,
|
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH5_01_DAT,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 8 - SB Leaves
|
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH5_02_DAT,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_QUICKEXIT,0,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,0,
|
|
|
|
SC_WAIT_ON_ACTOR_ANIM, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,420*16,30*16,40,
|
2001-07-04 22:42:42 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_RUBHEAD,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
|
|
|
|
SC_STOP
|
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*** C5 End FMA **************************************************************/
|
|
|
|
/*****************************************************************************/
|
2001-06-22 22:06:39 +02:00
|
|
|
static const int s_FMAC5EndScript[]=
|
2001-06-22 20:00:09 +02:00
|
|
|
{
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH6_00_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH6_01_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH6_02_DAT,
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_CH6_03_DAT,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_USE_LEVEL, 25,
|
|
|
|
SC_SET_NEXT_SCENE, FMA_NEXT_SCENE_MAP,
|
|
|
|
SC_START,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 1 - Shade Shoals
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 4*16,18*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_TIMER, 30,
|
|
|
|
|
|
|
|
// Scene 2 - SB arrives outside Shady Shoals
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,40*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,1,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_SPONGEBOB,true,
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_SET_ITEM, 0,FRM__TOOLBOX,
|
|
|
|
SC_CARRY_ITEM, 0,FMA_ACTOR_SPONGEBOB,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,16*16,30*16,96,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH6_00_DAT,
|
|
|
|
|
|
|
|
// Scene 3 - SB Fixing TV
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_MM,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_MM,224*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_MM,1,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_MM,true,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_BB,220*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_BB,1,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_BB,true,
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_SET_ITEM, 0,FRM__AUTOGRAPH,
|
|
|
|
SC_CARRY_ITEM, 0,FMA_ACTOR_BB,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,206*16,30*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 197*16,18*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_FIXTV,1,
|
|
|
|
SC_WAIT_ON_TIMER, 60,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH6_01_DAT,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_WAIT_ON_TIMER, 60,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 4 - Goes to BB, and collects his prize
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,216*16,30*16,44,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,0,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_IDLE,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH6_02_DAT,
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_CARRY_ITEM, 0,FMA_ACTOR_SPONGEBOB,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_QUICKEXIT,0,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,0,
|
|
|
|
SC_WAIT_ON_ACTOR_ANIM, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,240*16,30*16,40,
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
|
|
|
|
// Scene 5 - SB leaves Shady Shoals
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 4*16,18*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_TIMER, 30,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,4*16,30*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,0,
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,40*16,30*16,72,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
|
|
|
|
// Scene 6 - Back in shady
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_MM,FMA_ANIM_SIT,1,
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_MM,208*16,(30*16)+8,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_MM,0,
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_SIT,1,
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_BB,211*16,(30*16)+8,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_BB,0,
|
|
|
|
SC_SNAP_CAMERA_TO, 197*16,18*16,
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_WAIT_ON_TIMER, 60,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 7 - TV goes pop
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_CREATE_FX, 0,207*16,28*16,CFX::FX_TYPE_TV_EXPLODE,
|
|
|
|
SC_WAIT_ON_TIMER, 60*3,
|
2001-06-22 20:00:09 +02:00
|
|
|
|
|
|
|
// Scene 8 - Outside, MM & BB SCREEEEEEEEEEEEEEEAM
|
2001-07-02 17:42:35 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 4*16,18*16,
|
2001-06-22 20:00:09 +02:00
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_CH6_03_DAT,
|
|
|
|
|
|
|
|
SC_STOP
|
|
|
|
};
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
/*****************************************************************************/
|
|
|
|
/*** Plankton FMA ************************************************************/
|
|
|
|
/*****************************************************************************/
|
2001-06-16 00:48:16 +02:00
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
static const int s_FMAPlanktonScript[]=
|
2001-06-16 00:48:16 +02:00
|
|
|
{
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_PLANKTON_DAT,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_USE_LEVEL, 26,
|
|
|
|
SC_SET_NEXT_SCENE, FMA_NEXT_SCENE_GAME,
|
|
|
|
SC_START,
|
|
|
|
|
|
|
|
|
2001-07-03 02:02:20 +02:00
|
|
|
SC_SNAP_CAMERA_TO, 0*16,5*16,
|
|
|
|
|
|
|
|
SC_WAIT_ON_TIMER, 60*2,
|
|
|
|
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,0*16,18*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,0,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_SPONGEBOB,true,
|
|
|
|
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,18*16,18*16,72,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,32*16,18*16,56,
|
|
|
|
SC_MOVE_CAMERA_TO, 21*16,5*16,84,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_IDLE,1,
|
|
|
|
SC_WAIT_ON_CAMERA_STOP,
|
|
|
|
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_PLANKTON,FMA_ANIM_IDLE,1,
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_PLANKTON,42*16,18*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_PLANKTON,0,
|
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_PLANKTON,true,
|
|
|
|
|
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_PLANKTON_DAT,
|
|
|
|
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_WALK,1,
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,80*16,18*16,192,
|
|
|
|
SC_MOVE_CAMERA_TO, 44*16,5*16,92,
|
|
|
|
SC_WAIT_ON_CAMERA_STOP,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
|
|
|
|
SC_SNAP_CAMERA_TO, 94*16,5*16,
|
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,114*16,18*16,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,1,
|
|
|
|
SC_WALK_ACTOR_TO_POSITION, FMA_ACTOR_SPONGEBOB,108*16,18*16,24,
|
|
|
|
SC_WAIT_ON_ACTOR_STOP, FMA_ACTOR_SPONGEBOB,
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_IDLE,1,
|
|
|
|
|
|
|
|
SC_WAIT_ON_TIMER, 60,
|
2001-07-02 17:42:35 +02:00
|
|
|
|
|
|
|
SC_STOP
|
|
|
|
};
|
2001-06-16 00:48:16 +02:00
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
/*****************************************************************************/
|
|
|
|
/*** Part FMA ****************************************************************/
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
static const int s_FMAPartyScript[]=
|
|
|
|
{
|
|
|
|
// Init
|
|
|
|
SC_REGISTER_CONVERSATION, SCRIPTS_FMA_PARTY_DAT,
|
|
|
|
SC_USE_PARTY,
|
|
|
|
SC_SET_NEXT_SCENE, FMA_NEXT_SCENE_CREDITS,
|
|
|
|
SC_SNAP_CAMERA_TO, 0,0,
|
|
|
|
SC_START,
|
|
|
|
|
|
|
|
// Party scene
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SPONGEBOB,FMA_ANIM_IDLE,1,
|
2001-07-06 01:00:06 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SPONGEBOB,262,203,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SPONGEBOB,0,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_SPONGEBOB,true,
|
|
|
|
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_MM,FMA_ANIM_IDLE,1,
|
2001-07-06 01:00:06 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_MM,188,216,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_MM,0,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_MM,true,
|
|
|
|
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_BB,FMA_ANIM_IDLE,1,
|
2001-07-06 01:00:06 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_BB,155,218,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_BB,0,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_BB,true,
|
|
|
|
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_GARY,FMA_ANIM_IDLE,1,
|
2001-07-06 01:00:06 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_GARY,88,233,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_GARY,0,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_GARY,true,
|
|
|
|
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_PLANKTON,FMA_ANIM_IDLE,1,
|
2001-07-06 01:00:06 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_PLANKTON,415,230,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_PLANKTON,0,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_PLANKTON,true,
|
|
|
|
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_PATRICK,FMA_ANIM_IDLE,1,
|
2001-07-06 01:00:06 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_PATRICK,312,201,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_PATRICK,0,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_PATRICK,true,
|
|
|
|
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_KRABS,FMA_ANIM_IDLE,1,
|
2001-07-06 01:00:06 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_KRABS,460,224,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_KRABS,0,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_KRABS,true,
|
|
|
|
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SQUIDWARD,FMA_ANIM_IDLE,1,
|
2001-07-06 01:00:06 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SQUIDWARD,390,220,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SQUIDWARD,0,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_SQUIDWARD,true,
|
|
|
|
|
|
|
|
SC_SET_ACTOR_ANIM_STATE, FMA_ACTOR_SANDY,FMA_ANIM_IDLE,1,
|
2001-07-06 01:00:06 +02:00
|
|
|
SC_SET_ACTOR_POSITION, FMA_ACTOR_SANDY,250,180,
|
|
|
|
SC_SET_ACTOR_FACING, FMA_ACTOR_SANDY,0,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_SET_ACTOR_VISIBILITY, FMA_ACTOR_SANDY,true,
|
|
|
|
|
2001-07-06 01:00:06 +02:00
|
|
|
SC_WAIT_ON_TIMER, 60*2,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_WAIT_ON_CONVERSATION, SCRIPTS_FMA_PARTY_DAT,
|
2001-07-06 01:16:09 +02:00
|
|
|
SC_SET_GLOBAL_ANIMATION, false,
|
2001-07-06 01:00:06 +02:00
|
|
|
SC_WAIT_ON_TIMER, 60*10,
|
2001-07-05 23:26:39 +02:00
|
|
|
SC_STOP
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-06-22 22:06:39 +02:00
|
|
|
static const int *s_fmaScripts[CFmaScene::NUM_FMA_SCRIPTS]=
|
|
|
|
{
|
|
|
|
s_FMAIntroScript,
|
|
|
|
s_FMAC1EndScript,
|
|
|
|
s_FMAC2EndScript,
|
|
|
|
s_FMAC3EndScript,
|
|
|
|
s_FMAC4EndScript,
|
|
|
|
s_FMAC5EndScript,
|
2001-07-02 17:42:35 +02:00
|
|
|
s_FMAPlanktonScript,
|
2001-07-05 23:26:39 +02:00
|
|
|
s_FMAPartyScript,
|
2001-06-22 22:06:39 +02:00
|
|
|
};
|
|
|
|
|
2001-07-10 21:18:47 +02:00
|
|
|
static CFmaScene::FMA_SCRIPT_NUMBER s_chosenScript=CFmaScene::FMA_SCRIPT__PARTY;//FMA_SCRIPT__INTRO;
|
2001-06-22 22:06:39 +02:00
|
|
|
|
2001-06-04 16:54:48 +02:00
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Function:
|
|
|
|
Purpose:
|
|
|
|
Params:
|
|
|
|
Returns:
|
|
|
|
---------------------------------------------------------------------- */
|
2001-06-04 18:10:06 +02:00
|
|
|
void CFmaScene::init()
|
2001-06-04 16:54:48 +02:00
|
|
|
{
|
2001-06-16 00:48:16 +02:00
|
|
|
int i;
|
|
|
|
ACTOR_DATA *actor;
|
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
m_level=NULL;
|
2001-07-13 17:06:37 +02:00
|
|
|
m_party=NULL;
|
2001-06-16 00:48:16 +02:00
|
|
|
|
2001-06-04 18:10:06 +02:00
|
|
|
CThingManager::init();
|
|
|
|
CConversation::init();
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
m_cameraPos.vx=30;
|
2001-06-11 20:24:32 +02:00
|
|
|
m_cameraPos.vy=280;
|
2001-06-16 00:48:16 +02:00
|
|
|
m_cameraMoving=false;
|
2001-06-04 18:10:06 +02:00
|
|
|
m_readyToShutdown=false;
|
2001-06-16 00:48:16 +02:00
|
|
|
|
|
|
|
CActorPool::Reset();
|
|
|
|
actor=m_actorData;
|
2001-06-22 20:00:09 +02:00
|
|
|
for(i=0;i<FMA_NUM_ACTORS;i++)
|
2001-06-16 00:48:16 +02:00
|
|
|
{
|
2001-07-02 17:42:35 +02:00
|
|
|
for (int b=0; b<2; b++)
|
|
|
|
{ // Load banks
|
|
|
|
actor->m_gfx[b]=0;
|
|
|
|
if (s_actorGraphicsData[i].m_file[b])
|
|
|
|
{
|
|
|
|
actor->m_gfx[b]=CActorPool::GetActor(s_actorGraphicsData[i].m_file[b]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
actor->m_active=false;
|
2001-06-22 20:00:09 +02:00
|
|
|
actor->m_animState=FMA_ANIM_IDLE;
|
2001-07-02 17:42:35 +02:00
|
|
|
actor->m_animLoop=0;
|
2001-06-16 00:48:16 +02:00
|
|
|
actor->m_animFrame=0;
|
|
|
|
actor->m_pos.vx=0;
|
|
|
|
actor->m_pos.vy=0;
|
|
|
|
actor->m_moving=false;
|
|
|
|
actor->m_facing=0;
|
|
|
|
actor++;
|
|
|
|
}
|
2001-07-03 02:02:20 +02:00
|
|
|
|
|
|
|
for (i=0; i<FMA_FX_COUNT; i++)
|
|
|
|
{
|
|
|
|
m_FXTable[i]=0;
|
|
|
|
}
|
|
|
|
for (i=0; i<FMA_ITEM_MAX; i++)
|
|
|
|
{
|
2001-07-05 23:26:39 +02:00
|
|
|
m_itemData[i].m_visible=false;
|
2001-07-03 02:02:20 +02:00
|
|
|
m_itemData[i].m_Actor=-1;
|
2001-07-05 23:26:39 +02:00
|
|
|
m_itemData[i].m_TargetActor=-1;
|
2001-07-03 02:02:20 +02:00
|
|
|
}
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
CActorPool::SetUpCache();
|
|
|
|
CActorPool::CleanUpCache();
|
|
|
|
|
|
|
|
m_frameCount=0;
|
|
|
|
|
|
|
|
m_scriptRunning=true;
|
2001-06-22 22:06:39 +02:00
|
|
|
m_pc=s_fmaScripts[s_chosenScript];
|
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
m_musicPlaying=false;
|
|
|
|
m_tuneLoaded=false;
|
2001-07-06 01:16:09 +02:00
|
|
|
|
|
|
|
m_globalAnimationFlag=true;
|
2001-07-06 20:06:03 +02:00
|
|
|
|
|
|
|
m_stillProcessingCommand=false;
|
|
|
|
m_doOtherProcessing=false;
|
2001-06-04 18:10:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Function:
|
|
|
|
Purpose:
|
|
|
|
Params:
|
|
|
|
Returns:
|
|
|
|
---------------------------------------------------------------------- */
|
|
|
|
void CFmaScene::shutdown()
|
|
|
|
{
|
2001-06-22 20:00:09 +02:00
|
|
|
for(int i=0;i<FMA_NUM_ACTORS;i++)
|
2001-06-16 00:48:16 +02:00
|
|
|
{
|
2001-07-02 17:42:35 +02:00
|
|
|
for (int b=0; b<2; b++)
|
|
|
|
{
|
|
|
|
if (m_actorData[i].m_gfx[b]) delete m_actorData[i].m_gfx[b];
|
|
|
|
}
|
2001-06-16 00:48:16 +02:00
|
|
|
}
|
|
|
|
CActorPool::Reset();
|
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
if(m_level)
|
|
|
|
{
|
|
|
|
m_level->shutdown();
|
|
|
|
delete m_level;
|
|
|
|
}
|
|
|
|
if(m_party)
|
|
|
|
{
|
|
|
|
m_party->shutdown();
|
|
|
|
delete m_party;
|
|
|
|
}
|
|
|
|
|
2001-06-11 20:24:32 +02:00
|
|
|
CSoundMediator::dumpSong();
|
2001-06-04 18:10:06 +02:00
|
|
|
|
|
|
|
CConversation::shutdown();
|
|
|
|
CThingManager::shutdown();
|
2001-06-04 16:54:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Function:
|
|
|
|
Purpose:
|
|
|
|
Params:
|
|
|
|
Returns:
|
|
|
|
---------------------------------------------------------------------- */
|
2001-06-04 18:10:06 +02:00
|
|
|
void CFmaScene::render()
|
2001-06-04 16:54:48 +02:00
|
|
|
{
|
2001-06-16 00:48:16 +02:00
|
|
|
int i;
|
|
|
|
ACTOR_DATA *actor;
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
CGameScene::setCameraMtx();
|
|
|
|
|
2001-06-04 18:10:06 +02:00
|
|
|
CThingManager::renderAllThings();
|
|
|
|
CConversation::render();
|
2001-07-05 23:26:39 +02:00
|
|
|
|
|
|
|
if(m_level)
|
|
|
|
{
|
|
|
|
m_level->render();
|
|
|
|
}
|
|
|
|
else if(m_party)
|
|
|
|
{
|
|
|
|
m_party->render();
|
|
|
|
}
|
2001-06-16 00:48:16 +02:00
|
|
|
|
|
|
|
actor=m_actorData;
|
2001-06-22 20:00:09 +02:00
|
|
|
for(i=0;i<FMA_NUM_ACTORS;i++)
|
2001-06-16 00:48:16 +02:00
|
|
|
{
|
|
|
|
if(actor->m_active)
|
|
|
|
{
|
2001-06-22 20:00:09 +02:00
|
|
|
// need clipping here
|
2001-06-16 00:48:16 +02:00
|
|
|
DVECTOR pos;
|
|
|
|
pos.vx=actor->m_pos.vx-m_cameraPos.vx;
|
|
|
|
pos.vy=actor->m_pos.vy-m_cameraPos.vy;
|
2001-07-02 17:42:35 +02:00
|
|
|
int AnimBank=s_actorGraphicsData[i].m_anims[actor->m_animState].Bank;
|
|
|
|
int AnimNo=s_actorGraphicsData[i].m_anims[actor->m_animState].Anim;
|
|
|
|
actor->m_gfx[AnimBank]->Render(pos,AnimNo,actor->m_animFrame,actor->m_facing);
|
2001-06-16 00:48:16 +02:00
|
|
|
}
|
|
|
|
actor++;
|
|
|
|
}
|
|
|
|
|
2001-07-03 02:02:20 +02:00
|
|
|
for (i=0; i<FMA_ITEM_MAX; i++)
|
|
|
|
{
|
|
|
|
sItemData *item=&m_itemData[i];
|
2001-07-05 23:26:39 +02:00
|
|
|
if(item->m_visible)
|
2001-07-03 02:02:20 +02:00
|
|
|
{
|
|
|
|
DVECTOR pos;
|
2001-07-06 01:00:06 +02:00
|
|
|
pos.vx=item->m_Pos.vx-m_cameraPos.vx;
|
|
|
|
pos.vy=item->m_Pos.vy-m_cameraPos.vy;
|
2001-07-06 00:26:42 +02:00
|
|
|
CGameScene::getSpriteBank()->printFT4(item->m_Frame,pos.vx,pos.vy,item->m_facing,0,OTPOS__PICKUP_POS-3);
|
2001-07-03 02:02:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
CActorPool::CleanUpCache();
|
|
|
|
|
|
|
|
#if defined (__USER_paul__) || defined (__USER_daveo__)
|
|
|
|
FontBank *font;
|
|
|
|
char buf[20];
|
|
|
|
font=new ("Font") FontBank();
|
|
|
|
font->initialise(&standardFont);
|
|
|
|
sprintf(buf,"%d,%d",m_cameraPos.vx,m_cameraPos.vy);
|
|
|
|
font->print(400,30,buf);
|
|
|
|
font->dump();
|
|
|
|
delete font;
|
|
|
|
#endif
|
2001-06-04 16:54:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Function:
|
|
|
|
Purpose:
|
|
|
|
Params:
|
|
|
|
Returns:
|
|
|
|
---------------------------------------------------------------------- */
|
2001-06-04 18:10:06 +02:00
|
|
|
void CFmaScene::think(int _frames)
|
2001-06-04 16:54:48 +02:00
|
|
|
{
|
2001-06-16 00:48:16 +02:00
|
|
|
#if defined (__USER_paul__) || defined (__USER_daveo__)
|
2001-07-02 17:42:35 +02:00
|
|
|
if (PadGetHeld(0)&PAD_L1)
|
2001-06-04 18:10:06 +02:00
|
|
|
{
|
2001-07-02 17:42:35 +02:00
|
|
|
if(PadGetHeld(0)&PAD_UP) m_cameraPos.vy-=16;
|
|
|
|
if(PadGetHeld(0)&PAD_DOWN) m_cameraPos.vy+=16;
|
|
|
|
if(PadGetHeld(0)&PAD_LEFT) m_cameraPos.vx-=16;
|
|
|
|
if(PadGetHeld(0)&PAD_RIGHT) m_cameraPos.vx+=16;
|
2001-06-04 18:10:06 +02:00
|
|
|
}
|
2001-06-11 20:24:32 +02:00
|
|
|
#endif
|
2001-07-02 17:42:35 +02:00
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
if(!CFader::isFading()&&m_tuneLoaded&&!m_musicPlaying)
|
|
|
|
{
|
|
|
|
CSoundMediator::playSong();
|
|
|
|
m_musicPlaying=true;
|
|
|
|
}
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
if(PadGetHeld(0) & PAD_START)
|
|
|
|
{ // Give player an exit option!!
|
|
|
|
m_scriptRunning=false;
|
|
|
|
m_doOtherProcessing=true;
|
|
|
|
}
|
|
|
|
|
2001-06-22 22:06:39 +02:00
|
|
|
if(m_scriptRunning==false&&!m_readyToShutdown)
|
2001-06-04 18:10:06 +02:00
|
|
|
{
|
|
|
|
startShutdown();
|
|
|
|
}
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
for(int i=0;i<_frames;i++)
|
|
|
|
{
|
|
|
|
if(m_scriptRunning)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
ACTOR_DATA *actor;
|
|
|
|
|
|
|
|
actor=m_actorData;
|
2001-06-22 20:00:09 +02:00
|
|
|
for(i=0;i<FMA_NUM_ACTORS;i++)
|
2001-06-16 00:48:16 +02:00
|
|
|
{
|
|
|
|
if(actor->m_active)
|
|
|
|
{
|
|
|
|
// Move actor?
|
|
|
|
if(actor->m_moving)
|
|
|
|
{
|
|
|
|
int totalFrames,currentFrame;
|
|
|
|
totalFrames=actor->m_endMoveFrame-actor->m_startMoveFrame;
|
|
|
|
currentFrame=totalFrames-(actor->m_endMoveFrame-m_frameCount);
|
|
|
|
if(currentFrame==0)
|
|
|
|
{
|
|
|
|
actor->m_pos=actor->m_startMovePos;
|
|
|
|
}
|
|
|
|
else if(currentFrame==totalFrames)
|
|
|
|
{
|
|
|
|
actor->m_pos=actor->m_endMovePos;
|
|
|
|
actor->m_moving=false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
actor->m_pos.vx=actor->m_startMovePos.vx+(((actor->m_endMovePos.vx-actor->m_startMovePos.vx)*currentFrame)/totalFrames);
|
|
|
|
actor->m_pos.vy=actor->m_startMovePos.vy+(((actor->m_endMovePos.vy-actor->m_startMovePos.vy)*currentFrame)/totalFrames);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Anim
|
2001-07-06 01:16:09 +02:00
|
|
|
if(m_globalAnimationFlag)
|
2001-06-16 00:48:16 +02:00
|
|
|
{
|
2001-07-06 01:16:09 +02:00
|
|
|
actor->m_animFrame++;
|
|
|
|
int AnimBank=s_actorGraphicsData[i].m_anims[actor->m_animState].Bank;
|
|
|
|
int AnimNo=s_actorGraphicsData[i].m_anims[actor->m_animState].Anim;
|
|
|
|
int LastFrame=actor->m_gfx[AnimBank]->getFrameCount(AnimNo)-1;
|
|
|
|
if(actor->m_animFrame>=LastFrame)
|
|
|
|
{
|
|
|
|
if (actor->m_animLoop)
|
|
|
|
{ // Loop anim
|
|
|
|
actor->m_animFrame=0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // hold on last frame
|
|
|
|
actor->m_animFrame=LastFrame;
|
|
|
|
}
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
}
|
2001-06-16 00:48:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
actor++;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Move Camera
|
|
|
|
if(m_cameraMoving)
|
|
|
|
{
|
|
|
|
int totalFrames,currentFrame;
|
|
|
|
totalFrames=m_endCameraFrame-m_startCameraFrame;
|
|
|
|
currentFrame=totalFrames-(m_endCameraFrame-m_frameCount);
|
|
|
|
if(currentFrame==0)
|
|
|
|
{
|
|
|
|
m_cameraPos=m_startCameraPos;
|
|
|
|
}
|
|
|
|
else if(currentFrame==totalFrames)
|
|
|
|
{
|
|
|
|
m_cameraPos=m_endCameraPos;
|
|
|
|
m_cameraMoving=false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_cameraPos.vx=m_startCameraPos.vx+(((m_endCameraPos.vx-m_startCameraPos.vx)*currentFrame)/totalFrames);
|
|
|
|
m_cameraPos.vy=m_startCameraPos.vy+(((m_endCameraPos.vy-m_startCameraPos.vy)*currentFrame)/totalFrames);
|
|
|
|
}
|
|
|
|
}
|
2001-07-03 02:02:20 +02:00
|
|
|
// Handle Item
|
|
|
|
for (i=0; i<FMA_ITEM_MAX; i++)
|
|
|
|
{
|
|
|
|
sItemData *item=&m_itemData[i];
|
2001-07-05 23:26:39 +02:00
|
|
|
if(item->m_TargetActor!=-1)
|
2001-07-03 02:02:20 +02:00
|
|
|
{
|
2001-07-05 23:26:39 +02:00
|
|
|
// Being thrown to an actor
|
|
|
|
int totalFrames,currentFrame;
|
|
|
|
totalFrames=item->m_endMoveFrame-item->m_startMoveFrame;
|
|
|
|
currentFrame=totalFrames-(item->m_endMoveFrame-m_frameCount);
|
|
|
|
if(currentFrame==0)
|
|
|
|
{
|
|
|
|
item->m_Pos=item->m_startPos;
|
|
|
|
}
|
|
|
|
else if(currentFrame>=totalFrames)
|
|
|
|
{
|
|
|
|
item->m_Pos=item->m_TargetPos;
|
|
|
|
item->m_Actor=item->m_TargetActor;
|
|
|
|
item->m_TargetActor=-1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int sin,yoff;
|
|
|
|
item->m_Pos.vx=item->m_startPos.vx+(((item->m_TargetPos.vx-item->m_startPos.vx)*currentFrame)/totalFrames);
|
|
|
|
item->m_Pos.vy=item->m_startPos.vy+(((item->m_TargetPos.vy-item->m_startPos.vy)*currentFrame)/totalFrames);
|
|
|
|
sin=((currentFrame*2048)/totalFrames);
|
|
|
|
yoff=-(msin(sin)*item->m_throwArcHeight)>>12;
|
|
|
|
item->m_Pos.vy+=yoff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (item->m_Actor!=-1)
|
|
|
|
{
|
2001-07-06 21:50:33 +02:00
|
|
|
ACTOR_DATA *actor=&m_actorData[item->m_Actor];
|
|
|
|
const ACTOR_GRAPHICS_DATA *actorGraphics=&s_actorGraphicsData[item->m_Actor];
|
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
// Being carried by an actor
|
2001-07-06 21:50:33 +02:00
|
|
|
item->m_Pos=actor->m_pos;
|
|
|
|
item->m_facing=actor->m_facing;
|
2001-07-06 01:00:06 +02:00
|
|
|
if (item->m_facing)
|
|
|
|
{
|
2001-07-06 21:50:33 +02:00
|
|
|
item->m_Pos.vx-=actorGraphics->m_ItemOfs.vx;
|
2001-07-06 01:00:06 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-07-06 21:50:33 +02:00
|
|
|
item->m_Pos.vx+=actorGraphics->m_ItemOfs.vx;
|
2001-07-06 01:00:06 +02:00
|
|
|
}
|
2001-07-06 21:50:33 +02:00
|
|
|
item->m_Pos.vy+=actorGraphics->m_ItemOfs.vy;
|
2001-07-03 02:02:20 +02:00
|
|
|
}
|
|
|
|
}
|
2001-06-16 00:48:16 +02:00
|
|
|
|
|
|
|
// Process script
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if(!m_stillProcessingCommand)
|
|
|
|
{
|
|
|
|
startNextScriptCommand();
|
|
|
|
}
|
|
|
|
if(m_stillProcessingCommand)
|
|
|
|
{
|
|
|
|
processCurrentScriptCommand();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
while(!m_doOtherProcessing);
|
|
|
|
}
|
|
|
|
|
|
|
|
m_frameCount++;
|
|
|
|
}
|
|
|
|
|
2001-06-04 18:10:06 +02:00
|
|
|
CThingManager::thinkAllThings(_frames);
|
|
|
|
CConversation::think(_frames);
|
2001-07-05 23:26:39 +02:00
|
|
|
|
|
|
|
if(m_level)
|
|
|
|
{
|
|
|
|
m_level->setCameraCentre(m_cameraPos);
|
|
|
|
m_level->think(_frames);
|
|
|
|
}
|
|
|
|
else if(m_party)
|
|
|
|
{
|
|
|
|
m_party->think(_frames);
|
|
|
|
}
|
2001-06-04 16:54:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Function:
|
|
|
|
Purpose:
|
|
|
|
Params:
|
|
|
|
Returns:
|
|
|
|
---------------------------------------------------------------------- */
|
2001-06-04 18:10:06 +02:00
|
|
|
int CFmaScene::readyToShutdown()
|
2001-06-04 16:54:48 +02:00
|
|
|
{
|
2001-06-22 22:06:39 +02:00
|
|
|
return m_readyToShutdown&&!CFader::isFading();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Function:
|
|
|
|
Purpose:
|
|
|
|
Params:
|
|
|
|
Returns:
|
|
|
|
---------------------------------------------------------------------- */
|
|
|
|
void CFmaScene::selectFma(FMA_SCRIPT_NUMBER _fma)
|
|
|
|
{
|
|
|
|
s_chosenScript=_fma;
|
2001-06-04 16:54:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Function:
|
|
|
|
Purpose:
|
|
|
|
Params:
|
|
|
|
Returns:
|
|
|
|
---------------------------------------------------------------------- */
|
2001-06-04 18:10:06 +02:00
|
|
|
void CFmaScene::startShutdown()
|
2001-06-04 16:54:48 +02:00
|
|
|
{
|
2001-06-22 22:06:39 +02:00
|
|
|
CFader::setFadingOut();
|
2001-06-04 18:10:06 +02:00
|
|
|
m_readyToShutdown=true;
|
2001-06-04 16:54:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Function:
|
|
|
|
Purpose:
|
|
|
|
Params:
|
|
|
|
Returns:
|
|
|
|
---------------------------------------------------------------------- */
|
|
|
|
void CFmaScene::startNextScriptCommand()
|
|
|
|
{
|
|
|
|
m_stillProcessingCommand=false;
|
|
|
|
m_doOtherProcessing=false;
|
|
|
|
|
|
|
|
switch(*m_pc)
|
|
|
|
{
|
2001-07-05 23:26:39 +02:00
|
|
|
case SC_USE_LEVEL:
|
|
|
|
ASSERT(!m_level);
|
|
|
|
ASSERT(!m_party);
|
|
|
|
m_pc++;
|
|
|
|
m_level=new ("FMALevel") CLevel();
|
|
|
|
m_level->init(*(m_pc++));
|
|
|
|
m_tuneLoaded=true;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_USE_PARTY: //
|
|
|
|
ASSERT(!m_level);
|
|
|
|
ASSERT(!m_party);
|
|
|
|
m_pc++;
|
|
|
|
m_party=new ("FMAParty") CPartyScene();
|
|
|
|
m_party->init();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_SET_NEXT_SCENE: // nextScene
|
|
|
|
m_pc++;
|
|
|
|
GameState::setNextScene(s_nextGameSceneTable[*(m_pc++)]);
|
|
|
|
break;
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
case SC_SNAP_CAMERA_TO: // x,y
|
|
|
|
m_pc++;
|
|
|
|
m_cameraPos.vx=*m_pc++;
|
|
|
|
m_cameraPos.vy=*m_pc++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_MOVE_CAMERA_TO: // x,y,frames
|
|
|
|
m_pc++;
|
|
|
|
m_cameraMoving=true;
|
|
|
|
m_startCameraPos=m_cameraPos;
|
|
|
|
m_startCameraFrame=m_frameCount;
|
|
|
|
m_endCameraPos.vx=*m_pc++;
|
|
|
|
m_endCameraPos.vy=*m_pc++;
|
|
|
|
m_endCameraFrame=m_frameCount+*m_pc++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_REGISTER_CONVERSATION: // scriptId
|
|
|
|
m_pc++;
|
|
|
|
CConversation::registerConversationScript((FileEquate)*(m_pc++));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_WAIT_ON_TIMER: // frames
|
|
|
|
m_timer=*(m_pc+1);
|
|
|
|
m_stillProcessingCommand=true;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_WAIT_ON_ACTOR_STOP: // actor
|
|
|
|
m_stillProcessingCommand=true;
|
|
|
|
break;
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
case SC_WAIT_ON_ACTOR_ANIM: // actor
|
|
|
|
m_stillProcessingCommand=true;
|
|
|
|
break;
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
case SC_WAIT_ON_CAMERA_STOP: //
|
|
|
|
m_stillProcessingCommand=true;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_WAIT_ON_CONVERSATION: // scriptId
|
|
|
|
CConversation::trigger((FileEquate)*(m_pc+1));
|
|
|
|
m_stillProcessingCommand=true;
|
|
|
|
break;
|
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
case SC_WAIT_ON_THROWN_ITEM: // item
|
|
|
|
m_stillProcessingCommand=true;
|
|
|
|
break;
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
case SC_SET_ACTOR_VISIBILITY: // actor,on/off
|
|
|
|
{
|
|
|
|
ACTOR_DATA *actor;
|
|
|
|
m_pc++;
|
|
|
|
actor=&m_actorData[*m_pc++];
|
|
|
|
actor->m_active=*m_pc++;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_SET_ACTOR_POSITION: // actor,x,y
|
|
|
|
{
|
|
|
|
ACTOR_DATA *actor;
|
|
|
|
m_pc++;
|
|
|
|
actor=&m_actorData[*m_pc++];
|
|
|
|
actor->m_pos.vx=*m_pc++;
|
|
|
|
actor->m_pos.vy=*m_pc++;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_SET_ACTOR_FACING: // actor,facing
|
|
|
|
{
|
|
|
|
ACTOR_DATA *actor;
|
|
|
|
m_pc++;
|
|
|
|
actor=&m_actorData[*m_pc++];
|
|
|
|
actor->m_facing=*m_pc++;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_SET_ACTOR_ANIM_STATE: // actor,state
|
|
|
|
{
|
|
|
|
ACTOR_DATA *actor;
|
|
|
|
m_pc++;
|
|
|
|
actor=&m_actorData[*m_pc++];
|
|
|
|
actor->m_animState=*m_pc++;
|
2001-07-02 17:42:35 +02:00
|
|
|
actor->m_animLoop=*m_pc++;
|
|
|
|
actor->m_animFrame=0;
|
2001-06-16 00:48:16 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_WALK_ACTOR_TO_POSITION: // actor,x,y,frames
|
|
|
|
{
|
|
|
|
ACTOR_DATA *actor;
|
|
|
|
m_pc++;
|
|
|
|
actor=&m_actorData[*m_pc++];
|
|
|
|
actor->m_startMoveFrame=m_frameCount;
|
|
|
|
actor->m_startMovePos=actor->m_pos;
|
|
|
|
actor->m_endMovePos.vx=*m_pc++;
|
|
|
|
actor->m_endMovePos.vy=*m_pc++;
|
|
|
|
actor->m_endMoveFrame=m_frameCount+*m_pc++;
|
|
|
|
actor->m_moving=true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-07-06 01:16:09 +02:00
|
|
|
case SC_SET_GLOBAL_ANIMATION: // on/off
|
|
|
|
{
|
|
|
|
int flag;
|
|
|
|
m_pc++;
|
|
|
|
flag=*(m_pc++);
|
|
|
|
m_globalAnimationFlag=flag;
|
|
|
|
if(m_party)m_party->setAnimation(flag);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-07-03 02:02:20 +02:00
|
|
|
case SC_CREATE_FX:
|
|
|
|
{
|
|
|
|
int FXNo;
|
|
|
|
int FXType;
|
|
|
|
DVECTOR Pos;
|
|
|
|
m_pc++;
|
|
|
|
|
|
|
|
FXNo=*m_pc++;
|
|
|
|
Pos.vx=*m_pc++;
|
|
|
|
Pos.vy=*m_pc++;
|
|
|
|
FXType=*m_pc++;
|
|
|
|
|
|
|
|
m_FXTable[FXNo]=CFX::Create((CFX::FX_TYPE)FXType,Pos);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_KILL_FX:
|
|
|
|
{
|
|
|
|
int FXNo;
|
|
|
|
m_pc++;
|
|
|
|
|
|
|
|
FXNo=*m_pc++;
|
|
|
|
m_FXTable[FXNo]->killFX();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
case SC_SET_ITEM: // item, Frame
|
2001-07-03 02:02:20 +02:00
|
|
|
{
|
|
|
|
sItemData *item;
|
|
|
|
m_pc++;
|
|
|
|
item=&m_itemData[*m_pc++];
|
|
|
|
item->m_Frame=*m_pc++;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
case SC_CARRY_ITEM: // item, actor
|
2001-07-03 02:02:20 +02:00
|
|
|
{
|
|
|
|
sItemData *item;
|
|
|
|
m_pc++;
|
|
|
|
item=&m_itemData[*m_pc++];
|
|
|
|
item->m_Actor=*m_pc++;
|
2001-07-05 23:26:39 +02:00
|
|
|
item->m_visible=true;
|
2001-07-03 02:02:20 +02:00
|
|
|
}
|
|
|
|
break;
|
2001-07-05 23:26:39 +02:00
|
|
|
|
|
|
|
case SC_HIDE_ITEM: // item
|
|
|
|
m_pc++;
|
|
|
|
m_itemData[*m_pc++].m_visible=false;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_THROW_ITEM_TO_ACTOR: // item,targetActor,arcHeight,frames
|
|
|
|
{
|
|
|
|
sItemData *item;
|
|
|
|
m_pc++;
|
|
|
|
item=&m_itemData[*m_pc++];
|
|
|
|
ASSERT(item->m_Actor!=-1);
|
|
|
|
item->m_TargetActor=*m_pc++;
|
|
|
|
ASSERT(item->m_Actor!=item->m_TargetActor);
|
|
|
|
item->m_throwArcHeight=*(m_pc++);
|
|
|
|
item->m_startMoveFrame=m_frameCount;
|
|
|
|
item->m_endMoveFrame=m_frameCount+*m_pc++;
|
|
|
|
|
|
|
|
// Calc the positions
|
2001-07-06 21:50:33 +02:00
|
|
|
const ACTOR_GRAPHICS_DATA *actorGraphics=&s_actorGraphicsData[item->m_TargetActor];
|
2001-07-05 23:26:39 +02:00
|
|
|
item->m_TargetPos=m_actorData[item->m_TargetActor].m_pos;
|
|
|
|
if(m_actorData[item->m_TargetActor].m_facing)
|
|
|
|
{
|
2001-07-06 21:50:33 +02:00
|
|
|
item->m_TargetPos.vx-=actorGraphics->m_ItemOfs.vx;
|
2001-07-05 23:26:39 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-07-06 21:50:33 +02:00
|
|
|
item->m_TargetPos.vx+=actorGraphics->m_ItemOfs.vx;
|
2001-07-05 23:26:39 +02:00
|
|
|
}
|
2001-07-06 21:50:33 +02:00
|
|
|
item->m_TargetPos.vy+=actorGraphics->m_ItemOfs.vy;
|
2001-07-05 23:26:39 +02:00
|
|
|
item->m_startPos=item->m_Pos;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_START: //
|
|
|
|
m_pc++;
|
|
|
|
CFader::setFadingIn();
|
|
|
|
m_doOtherProcessing=true;
|
|
|
|
break;
|
|
|
|
|
2001-07-06 17:29:49 +02:00
|
|
|
case SC_STOP: //
|
2001-06-16 00:48:16 +02:00
|
|
|
m_scriptRunning=false;
|
|
|
|
m_doOtherProcessing=true;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
ASSERT(!"Bad script command");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Function:
|
|
|
|
Purpose:
|
|
|
|
Params:
|
|
|
|
Returns:
|
|
|
|
---------------------------------------------------------------------- */
|
|
|
|
void CFmaScene::processCurrentScriptCommand()
|
|
|
|
{
|
|
|
|
switch(*m_pc)
|
|
|
|
{
|
2001-07-05 23:26:39 +02:00
|
|
|
case SC_USE_LEVEL: // levelNumber
|
|
|
|
case SC_USE_PARTY: //
|
|
|
|
case SC_SET_NEXT_SCENE: // nextScene
|
2001-06-16 00:48:16 +02:00
|
|
|
case SC_SNAP_CAMERA_TO: // x,y
|
|
|
|
case SC_MOVE_CAMERA_TO: // x,y,frames
|
|
|
|
case SC_REGISTER_CONVERSATION: // scriptId
|
|
|
|
case SC_SET_ACTOR_VISIBILITY: // actor,on/off
|
|
|
|
case SC_SET_ACTOR_POSITION: // actor,x,y
|
|
|
|
case SC_SET_ACTOR_FACING: // actor,facing
|
|
|
|
case SC_SET_ACTOR_ANIM_STATE: // actor,state
|
|
|
|
case SC_WALK_ACTOR_TO_POSITION: // actor,x,y,frames
|
2001-07-06 01:16:09 +02:00
|
|
|
case SC_SET_GLOBAL_ANIMATION: // on/off
|
2001-07-05 23:26:39 +02:00
|
|
|
case SC_START: //
|
2001-07-06 17:29:49 +02:00
|
|
|
case SC_STOP: //
|
2001-07-06 20:06:03 +02:00
|
|
|
ASSERT(!"Shouldn't be here..");
|
2001-06-16 00:48:16 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_WAIT_ON_TIMER: // frames
|
|
|
|
if(m_timer--==0)
|
|
|
|
{
|
|
|
|
m_pc+=2;
|
|
|
|
m_stillProcessingCommand=false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_doOtherProcessing=true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SC_WAIT_ON_ACTOR_STOP: // actor
|
|
|
|
if(!m_actorData[*(m_pc+1)].m_moving)
|
|
|
|
{
|
|
|
|
m_pc+=2;
|
|
|
|
m_stillProcessingCommand=false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_doOtherProcessing=true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-07-02 17:42:35 +02:00
|
|
|
case SC_WAIT_ON_ACTOR_ANIM: // actor
|
|
|
|
{
|
2001-07-06 21:50:33 +02:00
|
|
|
int ThisActor=*(m_pc+1);
|
|
|
|
ACTOR_DATA *actor=&m_actorData[ThisActor];
|
|
|
|
const ACTOR_GRAPHICS_DATA *actorGraphics=&s_actorGraphicsData[ThisActor];
|
|
|
|
int AnimBank=actorGraphics->m_anims[actor->m_animState].Bank;
|
|
|
|
int AnimNo=actorGraphics->m_anims[actor->m_animState].Anim;
|
2001-07-02 17:42:35 +02:00
|
|
|
int LastFrame=actor->m_gfx[AnimBank]->getFrameCount(AnimNo)-1;
|
|
|
|
if(actor->m_animFrame>=LastFrame)
|
|
|
|
{
|
|
|
|
m_pc+=2;
|
|
|
|
m_stillProcessingCommand=false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_doOtherProcessing=true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
case SC_WAIT_ON_CAMERA_STOP: //
|
|
|
|
if(!m_cameraMoving)
|
|
|
|
{
|
|
|
|
m_pc++;
|
|
|
|
m_stillProcessingCommand=false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_doOtherProcessing=true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case SC_WAIT_ON_CONVERSATION: // scriptId
|
|
|
|
if(!CConversation::isActive())
|
|
|
|
{
|
|
|
|
m_pc+=2;
|
|
|
|
m_stillProcessingCommand=false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_doOtherProcessing=true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-07-05 23:26:39 +02:00
|
|
|
case SC_WAIT_ON_THROWN_ITEM: // item
|
|
|
|
if(m_itemData[*(m_pc+1)].m_TargetActor==-1)
|
|
|
|
{
|
|
|
|
m_pc+=2;
|
|
|
|
m_stillProcessingCommand=false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_doOtherProcessing=true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-06-16 00:48:16 +02:00
|
|
|
default:
|
|
|
|
ASSERT(!"Bad script command");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-04 16:54:48 +02:00
|
|
|
/*===========================================================================
|
|
|
|
end */
|