This commit is contained in:
Charles 2001-05-02 22:49:59 +00:00
parent 6f6b54fd0f
commit f37209b515
22 changed files with 403 additions and 71 deletions

View file

@ -27,6 +27,15 @@
#include <ACTOR_SQUIDWARD_Anim.h>
#endif
#ifndef __ANIM_SANDY_HEADER__
#include <ACTOR_SANDY_Anim.h>
#endif
#ifndef __ANIM_PATRICK_HEADER__
#include <ACTOR_PATRICK_Anim.h>
#endif
CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
{
{ // NPC_FRIEND_BARNACLE_BOY
@ -50,7 +59,7 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
},
{ // NPC_FRIEND_KRUSTY
ACTORS_CLAM_SBK,
ACTORS_KRUSTY_SBK,
true,
3,
128,
@ -70,7 +79,7 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
},
{ // NPC_FRIEND_PATRICK
ACTORS_CLAM_SBK,
ACTORS_PATRICK_SBK,
true,
3,
128,
@ -80,7 +89,7 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
},
{ // NPC_FRIEND_SANDY_CHEEKS
ACTORS_CLAM_SBK,
ACTORS_SANDY_SBK,
true,
3,
128,

View file

@ -19,6 +19,10 @@
#include "utils\utils.h"
#endif
#ifndef __LEVEL_LEVEL_H__
#include "level\level.h"
#endif
#ifndef __GAME_CONVO_H__
#include "game\convo.h"
#endif
@ -32,7 +36,26 @@
void CNpcKrustyFriend::postInit()
{
m_conversation = SCRIPTS_CH1L4_01_DAT;
switch( CLevel::getCurrentChapter() )
{
case 4:
{
m_conversation = SCRIPTS_CH4L3_01_DAT;
break;
}
case 2:
{
m_conversation = SCRIPTS_CH2L1_01_DAT;
break;
}
default:
{
m_conversation = SCRIPTS_CH1L4_01_DAT;
break;
}
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -45,9 +68,37 @@ void CNpcKrustyFriend::startConderversation()
{
CConversation::trigger( m_conversation );
if ( m_conversation == SCRIPTS_CH1L4_01_DAT )
switch( CLevel::getCurrentChapter() )
{
m_conversation = SCRIPTS_CH1L4_02_DAT;
case 4:
{
if ( m_conversation == SCRIPTS_CH4L3_01_DAT )
{
m_conversation = SCRIPTS_CH4L3_02_DAT;
}
break;
}
case 2:
{
if ( m_conversation == SCRIPTS_CH2L1_01_DAT )
{
m_conversation = SCRIPTS_CH2L1_02_DAT;
}
break;
}
default:
{
if ( m_conversation == SCRIPTS_CH1L4_01_DAT )
{
m_conversation = SCRIPTS_CH1L4_02_DAT;
}
break;
}
}
}
}

View file

@ -20,6 +20,12 @@
class CNpcKrustyFriend : public CNpcFriend
{
public:
virtual void postInit();
protected:
virtual void startConderversation();
FileEquate m_conversation;
};
#endif

View file

@ -34,20 +34,20 @@ extern int s_globalLevelSelectThing;
void CNpcPatrickFriend::postInit()
{
switch( s_globalLevelSelectThing )
/*switch( CLevel::getCurrentChapter() )
{
/*case 5:
{
m_conversation = SCRIPTS_CH2L1_01_DAT;
break;
}*/
case 3:
{*/
m_conversation = SCRIPTS_CH3L3_01_DAT;
/*break;
}
default:
{
m_conversation = SCRIPTS_CH2L2_01_DAT;
break;
}
}
}*/
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -60,17 +60,17 @@ void CNpcPatrickFriend::startConderversation()
{
CConversation::trigger( m_conversation );
switch( s_globalLevelSelectThing )
/*switch( CLevel::getCurrentChapter() )
{
/*case 5:
{
if ( m_conversation == SCRIPTS_CH2L1_01_DAT )
case 3:
{*/
if ( m_conversation == SCRIPTS_CH3L3_01_DAT )
{
m_conversation = SCRIPTS_CH2L1_02_DAT;
m_conversation = SCRIPTS_CH3L3_02_DAT;
}
break;
}*/
/*break;
}
default:
{
@ -81,7 +81,7 @@ void CNpcPatrickFriend::startConderversation()
break;
}
}
}*/
}
}
}

View file

@ -20,6 +20,12 @@
class CNpcPatrickFriend : public CNpcFriend
{
public:
virtual void postInit();
protected:
virtual void startConderversation();
FileEquate m_conversation;
};
#endif

View file

@ -23,10 +23,6 @@
#include "system\vid.h"
#endif
#ifndef __GAME_CONVO_H__
#include "game\convo.h"
#endif
#ifndef __UTILS_HEADER__
#include "utils\utils.h"
#endif
@ -182,6 +178,12 @@ void CNpcFriend::init( DVECTOR initPos )
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcFriend::postInit()
{
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcFriend::shutdown()
{
//m_spriteBank->dump(); delete m_spriteBank;
@ -277,12 +279,4 @@ void CNpcFriend::collidedWith( CThing *_thisThing )
void CNpcFriend::startConderversation()
{
// I am 'avin a fayg
if ( m_data[this->m_type].canTalk )
{
if( !CConversation::isActive() )
{
CConversation::trigger( SCRIPTS_SPEECHTEST_DAT );
}
}
}

View file

@ -39,6 +39,7 @@ public:
void init();
void init( DVECTOR initPos );
virtual void postInit();
void shutdown();
virtual void think(int _frames);
void render();
@ -74,7 +75,7 @@ protected:
static NPC_FRIEND_UNIT_TYPE mapEditConvertTable[NPC_FRIEND_UNIT_TYPE_MAX];
void startConderversation();
virtual void startConderversation();
virtual void collidedWith(CThing *_thisThing);

View file

@ -20,6 +20,8 @@
class CNpcSandyFriend : public CNpcFriend
{
protected:
virtual void startConderversation();
};
#endif

View file

@ -19,11 +19,24 @@
#include "utils\utils.h"
#endif
#ifndef __GAME_CONVO_H__
#include "game\convo.h"
#endif
#ifndef __ANIM_SQUIDWARD_HEADER__
#include <ACTOR_SQUIDWARD_Anim.h>
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcSquidwardFriend::postInit()
{
m_conversation = SCRIPTS_CH1L1_01_DAT;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcSquidwardFriend::think( int _frames )
{
CNpcThing::think(_frames);
@ -60,4 +73,22 @@ void CNpcSquidwardFriend::think( int _frames )
m_animPlaying = true;
m_frame = 0;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcSquidwardFriend::startConderversation()
{
if ( m_data[this->m_type].canTalk )
{
if( !CConversation::isActive() )
{
CConversation::trigger( m_conversation );
if ( m_conversation == SCRIPTS_CH1L1_01_DAT )
{
m_conversation = SCRIPTS_CH1L1_02_DAT;
}
}
}
}

View file

@ -22,6 +22,11 @@ class CNpcSquidwardFriend : public CNpcFriend
{
public:
virtual void think(int _frames);
virtual void postInit();
protected:
virtual void startConderversation();
FileEquate m_conversation;
};
#endif