This commit is contained in:
Charles 2001-05-03 13:11:45 +00:00
parent a5722bd7e1
commit 504688e4cd
21 changed files with 242 additions and 133 deletions

View File

@ -13,6 +13,7 @@ scripts/ch2l1_01.dat
scripts/ch2l1_02.dat
scripts/ch2l2_01.dat
scripts/ch2l2_02.dat
scripts/ch3l1_01.dat
scripts/ch3l3_01.dat
scripts/ch3l3_02.dat
scripts/ch4l3_01.dat

View File

@ -6,32 +6,20 @@
#include data/scripts/defs/trans.scr
_setText(CHAR_SPONGEBOB,STR__INGAME__CH1__L1__SPONGEY1);
_setResponseOptions(QUESTION_OK);
do
{
_setText(CHAR_SPONGEBOB,STR__INGAME__CH1__L1__SPONGEY1);
_setResponseOptions(QUESTION_OK);
do
{
pause;
}
while(_getResponse()==ANSWER_NONE);
_setText(CHAR_SQUIDWARD,STR__INGAME__CH1__L1__SQUIDWARD1);
_setResponseOptions(QUESTION_OK);
do
{
pause;
}
while(_getResponse()==ANSWER_NONE);
_setText(CHAR_SPONGEBOB,STR__INGAME__GENERIC__CHECK1);
_setResponseOptions(QUESTION_YES_NO);
do
{
pause;
}
while(_getResponse()==ANSWER_NONE);
pause;
}
while(_getResponse()!=ANSWER_YES);
while(_getResponse()==ANSWER_NONE);
_setText(CHAR_SQUIDWARD,STR__INGAME__CH1__L1__SQUIDWARD1);
_setResponseOptions(QUESTION_OK);
do
{
pause;
}
while(_getResponse()==ANSWER_NONE);
stop;

View File

@ -186,6 +186,11 @@ Chapter 2 - Level 2 - 02
eng=Here best pal you can still use my balloon!!! Happy Birthday to me!
Chapter 3 - Level 1 - 01
[STR__INGAME__CH3__L1__PLANKTON1]
eng=Blast you SpongeBreath, you have found my secret time machine! Whatever you do make sure you fill it up before you bring it back!!!!
Chapter 3 - Level 3 - 01
[STR__INGAME__CH3__L3__PATRICK1]
eng=DA DA DA DA DA DUM DUM DUM DUM (The blue Danube) Here you go Spongebob! One bubblewand dipped and ready to go!!!! Up, down and all around! I don't know what that means.

View File

@ -87,7 +87,8 @@ friend_src := friend \
fsquid \
fsandy \
fkrusty \
fpatrick
fpatrick \
fplnkton
platform_src := platform \
platdata \

View File

@ -499,7 +499,7 @@ GFX_DATA_OUT += $(MUSIC_ALL_OUT)
# Script stuff..
#----------------------------------------------------------------------------
SCRIPTS_LIST := ch1l1_01 ch1l1_02 ch1l2_01 ch1l2_02 ch1l2_03 ch1l4_01 ch1l4_02 \
ch2l1_01 ch2l1_02 ch2l2_01 ch2l2_02 ch3l3_01 ch3l3_02 ch4l3_01 ch4l3_02
ch2l1_01 ch2l1_02 ch2l2_01 ch2l2_02 ch3l1_01 ch3l3_01 ch3l3_02 ch4l3_01 ch4l3_02
SCRIPTS_IN_DIR := $(GAME_DATA_DIR)/scripts

View File

@ -40,7 +40,7 @@ void CNpcSquidDartEnemy::render()
DVECTOR origRenderPos;
DVECTOR offset = CLevel::getCameraPos();
int frame = 6 + ( m_frame >> 8 );
int frame = FRM_SQUIDDART_SWIM0001 + ( m_frame >> 8 );
int spriteWidth = m_spriteBank->getFrameWidth( frame );
int spriteHeight = m_spriteBank->getFrameHeight( frame );

View File

@ -14,11 +14,15 @@
#ifndef __ENEMY_NSDART_H__
#define __ENEMY_NSDART_H__
#ifndef __SPR_SPRITES_H__
#include <sprites.h>
#endif
class CNpcSquidDartEnemy : public CNpcEnemy
{
public:
void render();
virtual int getFrameCount() {return( 4 );}
virtual int getFrameCount() {return( FRM_SQUIDDART_SWIM0004 - FRM_SQUIDDART_SWIM0001 + 1 );}
virtual u8 canCollideWithEnemy() {return( false );}
};

View File

@ -62,7 +62,7 @@ void CNpcSmallJellyfishEnemy::render()
{
if ( renderPos.vy >= 0 && renderPos.vy <= VidGetScrH() )
{
SprFrame = m_spriteBank->printRotatedScaledSprite( m_frame>>8,renderPos.vx,renderPos.vy,4096,4096,m_drawRotation,10);
SprFrame = m_spriteBank->printRotatedScaledSprite( FRM_JELLYFISH1_SWIM1 + ( m_frame >> 8 ),renderPos.vx,renderPos.vy,4096,4096,m_drawRotation,10);
setRGB0( SprFrame, 255, 128, 255 );
// get xmax, xmin, ymax, ymin

View File

@ -18,11 +18,15 @@
#include "enemy\npc.h"
#endif
#ifndef __SPR_SPRITES_H__
#include <sprites.h>
#endif
class CNpcSmallJellyfishEnemy : public CNpcEnemy
{
public:
void render();
virtual int getFrameCount() {return( 6 );}
virtual int getFrameCount() {return( FRM_JELLYFISH1_SWIM6 - FRM_JELLYFISH1_SWIM1 + 1 );}
virtual u8 canCollideWithEnemy() {return( false );}
protected:
virtual bool processSensor();

View File

@ -40,7 +40,6 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
{
{ // NPC_FRIEND_BARNACLE_BOY
ACTORS_CLAM_SBK,
true,
3,
128,
false,
@ -50,7 +49,6 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
{ // NPC_FRIEND_GARY
ACTORS_CLAM_SBK,
true,
3,
128,
false,
@ -60,7 +58,6 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
{ // NPC_FRIEND_KRUSTY
ACTORS_KRUSTY_SBK,
true,
3,
128,
false,
@ -70,7 +67,6 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
{ // NPC_FRIEND_MERMAID_MAN
ACTORS_CLAM_SBK,
true,
3,
128,
false,
@ -80,7 +76,6 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
{ // NPC_FRIEND_PATRICK
ACTORS_PATRICK_SBK,
true,
3,
128,
false,
@ -90,7 +85,6 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
{ // NPC_FRIEND_SANDY_CHEEKS
ACTORS_SANDY_SBK,
true,
3,
128,
false,
@ -100,7 +94,6 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
{ // NPC_FRIEND_SQUIDWARD
ACTORS_SQUIDWARD_SBK,
true,
3,
128,
false,
@ -118,5 +111,6 @@ CNpcFriend::NPC_FRIEND_UNIT_TYPE CNpcFriend::mapEditConvertTable[NPC_FRIEND_UNIT
NPC_FRIEND_PATRICK,
NPC_FRIEND_SANDY_CHEEKS,
NPC_FRIEND_SQUIDWARD,
NPC_FRIEND_PLANKTON,
};

View File

@ -62,43 +62,40 @@ void CNpcKrustyFriend::postInit()
void CNpcKrustyFriend::startConderversation()
{
if ( m_data[this->m_type].canTalk )
if( !CConversation::isActive() )
{
if( !CConversation::isActive() )
CConversation::trigger( m_conversation );
switch( CLevel::getCurrentChapter() )
{
CConversation::trigger( m_conversation );
switch( CLevel::getCurrentChapter() )
case 4:
{
case 4:
if ( m_conversation == SCRIPTS_CH4L3_01_DAT )
{
if ( m_conversation == SCRIPTS_CH4L3_01_DAT )
{
m_conversation = SCRIPTS_CH4L3_02_DAT;
}
break;
m_conversation = SCRIPTS_CH4L3_02_DAT;
}
case 2:
{
if ( m_conversation == SCRIPTS_CH2L1_01_DAT )
{
m_conversation = SCRIPTS_CH2L1_02_DAT;
}
break;
}
break;
case 2:
{
if ( m_conversation == SCRIPTS_CH2L1_01_DAT )
{
m_conversation = SCRIPTS_CH2L1_02_DAT;
}
default:
{
if ( m_conversation == SCRIPTS_CH1L4_01_DAT )
{
m_conversation = SCRIPTS_CH1L4_02_DAT;
}
break;
}
break;
default:
{
if ( m_conversation == SCRIPTS_CH1L4_01_DAT )
{
m_conversation = SCRIPTS_CH1L4_02_DAT;
}
break;
}
}
}

View File

@ -23,6 +23,10 @@
#include "game\convo.h"
#endif
#ifndef __LEVEL_LEVEL_H__
#include "level\level.h"
#endif
#ifndef __ANIM_PATRICK_HEADER__
#include <ACTOR_PATRICK_Anim.h>
#endif
@ -34,12 +38,12 @@ extern int s_globalLevelSelectThing;
void CNpcPatrickFriend::postInit()
{
/*switch( CLevel::getCurrentChapter() )
switch( CLevel::getCurrentChapter() )
{
case 3:
{*/
{
m_conversation = SCRIPTS_CH3L3_01_DAT;
/*break;
break;
}
default:
@ -47,41 +51,38 @@ void CNpcPatrickFriend::postInit()
m_conversation = SCRIPTS_CH2L2_01_DAT;
break;
}
}*/
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcPatrickFriend::startConderversation()
{
if ( m_data[this->m_type].canTalk )
if( !CConversation::isActive() )
{
if( !CConversation::isActive() )
CConversation::trigger( m_conversation );
switch( CLevel::getCurrentChapter() )
{
CConversation::trigger( m_conversation );
/*switch( CLevel::getCurrentChapter() )
case 3:
{
case 3:
{*/
if ( m_conversation == SCRIPTS_CH3L3_01_DAT )
{
m_conversation = SCRIPTS_CH3L3_02_DAT;
}
/*break;
}
default:
if ( m_conversation == SCRIPTS_CH3L3_01_DAT )
{
if ( m_conversation == SCRIPTS_CH2L2_01_DAT )
{
m_conversation = SCRIPTS_CH2L2_02_DAT;
}
break;
m_conversation = SCRIPTS_CH3L3_02_DAT;
}
}*/
break;
}
default:
{
if ( m_conversation == SCRIPTS_CH2L2_01_DAT )
{
m_conversation = SCRIPTS_CH2L2_02_DAT;
}
break;
}
}
}
}

View File

@ -31,6 +31,10 @@
#include <sprites.h>
#endif
#ifndef __GAME_CONVO_H__
#include "game\convo.h"
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -83,4 +87,14 @@ void CNpcPlanktonFriend::render()
void CNpcPlanktonFriend::think( int _frames )
{
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcPlanktonFriend::startConderversation()
{
if( !CConversation::isActive() )
{
CConversation::trigger( SCRIPTS_CH3L1_01_DAT );
}
}

View File

@ -26,6 +26,7 @@ public:
virtual void think(int _frames);
virtual void shutdown();
protected:
virtual void startConderversation();
SpriteBank *m_spriteBank;
};

View File

@ -55,6 +55,10 @@
#include "friend\fsquid.h"
#endif
#ifndef __FRIEND_FPLNKTON_H__
#include "friend\fplnkton.h"
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Friend NPCs
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -109,6 +113,12 @@ CNpcFriend *CNpcFriend::Create(sThingActor *ThisActor)
break;
}
case CNpcFriend::NPC_FRIEND_PLANKTON:
{
friendNpc = new ("plankton") CNpcPlanktonFriend;
break;
}
default:
{
printf("UNKNOWN %i\n",friendType);

View File

@ -34,15 +34,16 @@ public:
NPC_FRIEND_PATRICK,
NPC_FRIEND_SANDY_CHEEKS,
NPC_FRIEND_SQUIDWARD,
NPC_FRIEND_PLANKTON,
NPC_FRIEND_UNIT_TYPE_MAX,
};
void init();
virtual void init();
void init( DVECTOR initPos );
virtual void postInit();
void shutdown();
virtual void shutdown();
virtual void think(int _frames);
void render();
virtual void render();
void setLayerCollision( class CLayerCollision *_layer ) {m_layerCollision=_layer;}
void setType( NPC_FRIEND_UNIT_TYPE newType ) {m_type = newType;}
@ -56,7 +57,6 @@ protected:
typedef struct NPC_FRIEND_DATA_TYPE
{
int skelType;
bool canTalk;
u8 speed;
u16 turnSpeed;
bool detectCollision;

View File

@ -32,11 +32,8 @@
void CNpcSandyFriend::startConderversation()
{
if ( m_data[this->m_type].canTalk )
if( !CConversation::isActive() )
{
if( !CConversation::isActive() )
{
CConversation::trigger( SCRIPTS_CH1L2_03_DAT );
}
CConversation::trigger( SCRIPTS_CH1L2_03_DAT );
}
}

View File

@ -79,16 +79,13 @@ void CNpcSquidwardFriend::think( int _frames )
void CNpcSquidwardFriend::startConderversation()
{
if ( m_data[this->m_type].canTalk )
if( !CConversation::isActive() )
{
if( !CConversation::isActive() )
{
CConversation::trigger( m_conversation );
CConversation::trigger( m_conversation );
if ( m_conversation == SCRIPTS_CH1L1_01_DAT )
{
m_conversation = SCRIPTS_CH1L1_02_DAT;
}
if ( m_conversation == SCRIPTS_CH1L1_01_DAT )
{
m_conversation = SCRIPTS_CH1L1_02_DAT;
}
}
}

View File

@ -42,6 +42,10 @@
#include "pad\pads.h"
#endif
#ifndef __LEVEL_LEVEL_H__
#include "level\level.h"
#endif
/* Std Lib
------- */
@ -58,6 +62,7 @@
#endif
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
@ -453,27 +458,105 @@ void CConversation::dumpConversationScripts()
---------------------------------------------------------------------- */
void CConversation::registerConversationLevelScripts(int level)
{
switch( level )
switch( CLevel::getCurrentChapter() )
{
case 0:
case 1:
{
CConversation::registerConversationScript(SCRIPTS_CH1L1_01_DAT);
CConversation::registerConversationScript(SCRIPTS_CH1L1_02_DAT);
switch ( CLevel::getCurrentChapterLevel() )
{
case 1:
{
CConversation::registerConversationScript(SCRIPTS_CH1L1_01_DAT);
CConversation::registerConversationScript(SCRIPTS_CH1L1_02_DAT);
break;
}
case 2:
{
CConversation::registerConversationScript(SCRIPTS_CH1L2_01_DAT);
CConversation::registerConversationScript(SCRIPTS_CH1L2_02_DAT);
CConversation::registerConversationScript(SCRIPTS_CH1L2_03_DAT);
break;
}
case 4:
{
CConversation::registerConversationScript(SCRIPTS_CH1L4_01_DAT);
CConversation::registerConversationScript(SCRIPTS_CH1L4_02_DAT);
break;
}
default:
break;
}
break;
}
case 2:
{
switch ( CLevel::getCurrentChapterLevel() )
{
case 1:
{
CConversation::registerConversationScript(SCRIPTS_CH2L1_01_DAT);
CConversation::registerConversationScript(SCRIPTS_CH2L1_02_DAT);
break;
}
case 2:
{
CConversation::registerConversationScript(SCRIPTS_CH2L2_01_DAT);
CConversation::registerConversationScript(SCRIPTS_CH2L2_02_DAT);
break;
}
default:
break;
}
break;
}
case 3:
{
switch ( CLevel::getCurrentChapterLevel() )
{
case 1:
{
CConversation::registerConversationScript(SCRIPTS_CH3L1_01_DAT);
break;
}
case 3:
{
CConversation::registerConversationScript(SCRIPTS_CH3L3_01_DAT);
CConversation::registerConversationScript(SCRIPTS_CH3L3_02_DAT);
break;
}
default:
break;
}
break;
}
case 4:
{
switch ( CLevel::getCurrentChapterLevel() )
{
case 3:
{
CConversation::registerConversationScript(SCRIPTS_CH4L3_01_DAT);
CConversation::registerConversationScript(SCRIPTS_CH4L3_02_DAT);
break;
}
default:
break;
}
// temporary
//CConversation::registerConversationScript(SCRIPTS_CH1L2_01_DAT);
//CConversation::registerConversationScript(SCRIPTS_CH1L2_02_DAT);
//CConversation::registerConversationScript(SCRIPTS_CH1L2_03_DAT);
//CConversation::registerConversationScript(SCRIPTS_CH1L4_01_DAT);
//CConversation::registerConversationScript(SCRIPTS_CH1L4_02_DAT);
//CConversation::registerConversationScript(SCRIPTS_CH2L1_01_DAT);
//CConversation::registerConversationScript(SCRIPTS_CH2L1_02_DAT);
//CConversation::registerConversationScript(SCRIPTS_CH2L2_01_DAT);
//CConversation::registerConversationScript(SCRIPTS_CH2L2_02_DAT);
//CConversation::registerConversationScript(SCRIPTS_CH3L3_01_DAT);
//CConversation::registerConversationScript(SCRIPTS_CH3L3_02_DAT);
CConversation::registerConversationScript(SCRIPTS_CH4L3_01_DAT);
CConversation::registerConversationScript(SCRIPTS_CH4L3_02_DAT);
break;
}

View File

@ -84,14 +84,14 @@ Collision=0
Health=0
AttackStrength=0
#[Plankton]
#Gfx=..\..\graphics\characters\
#WayPoints=0
#Speed=0
#TurnRate=0
#Collision=0
#Health=0
#AttackStrength=0
[Plankton]
Gfx=..\..\graphics\characters\plankton\render\psx\plankton_static00.bmp
WayPoints=0
Speed=0
TurnRate=0
Collision=0
Health=0
AttackStrength=0
################################################
# Enemies

View File

@ -437,6 +437,14 @@ SOURCE=..\..\..\source\friend\fpatrick.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\friend\fplnkton.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\friend\fplnkton.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\friend\friend.cpp
# End Source File
# Begin Source File
@ -1757,6 +1765,10 @@ SOURCE=..\..\..\data\Scripts\ch2l2_02.scr
# End Source File
# Begin Source File
SOURCE=..\..\..\data\Scripts\ch3l1_01.scr
# End Source File
# Begin Source File
SOURCE=..\..\..\data\Scripts\ch3l3_01.scr
# End Source File
# Begin Source File