SBSPSS/source/friend/fpatrick.cpp

88 lines
1.5 KiB
C++
Raw Normal View History

2001-05-03 00:34:53 +02:00
/*=========================================================================
fpatrick.cpp
Author: CRB
Created:
Project: Spongebob
Purpose:
Copyright (c) 2000 Climax Development Ltd
===========================================================================*/
#ifndef __FRIEND_FPATRICK_H__
#include "friend\fpatrick.h"
#endif
#ifndef __UTILS_HEADER__
#include "utils\utils.h"
#endif
#ifndef __GAME_CONVO_H__
#include "game\convo.h"
#endif
2001-05-03 15:11:45 +02:00
#ifndef __LEVEL_LEVEL_H__
#include "level\level.h"
#endif
2001-05-03 00:34:53 +02:00
#ifndef __ANIM_PATRICK_HEADER__
#include <ACTOR_PATRICK_Anim.h>
#endif
extern int s_globalLevelSelectThing;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcPatrickFriend::postInit()
{
2001-05-03 15:11:45 +02:00
switch( CLevel::getCurrentChapter() )
2001-05-03 00:34:53 +02:00
{
2001-05-03 00:49:59 +02:00
case 3:
2001-05-03 15:11:45 +02:00
{
2001-05-03 00:49:59 +02:00
m_conversation = SCRIPTS_CH3L3_01_DAT;
2001-05-03 15:11:45 +02:00
break;
2001-05-03 00:49:59 +02:00
}
2001-05-03 00:34:53 +02:00
default:
{
m_conversation = SCRIPTS_CH2L2_01_DAT;
break;
}
2001-05-03 15:11:45 +02:00
}
2001-05-03 00:34:53 +02:00
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcPatrickFriend::startConderversation()
{
2001-05-03 15:11:45 +02:00
if( !CConversation::isActive() )
2001-05-03 00:34:53 +02:00
{
2001-05-03 15:11:45 +02:00
CConversation::trigger( m_conversation );
2001-05-03 00:34:53 +02:00
2001-05-03 15:11:45 +02:00
switch( CLevel::getCurrentChapter() )
{
case 3:
2001-05-03 00:34:53 +02:00
{
2001-05-03 15:11:45 +02:00
if ( m_conversation == SCRIPTS_CH3L3_01_DAT )
{
m_conversation = SCRIPTS_CH3L3_02_DAT;
2001-05-03 00:49:59 +02:00
}
2001-05-03 00:34:53 +02:00
2001-05-03 15:11:45 +02:00
break;
}
2001-05-03 00:34:53 +02:00
2001-05-03 15:11:45 +02:00
default:
{
if ( m_conversation == SCRIPTS_CH2L2_01_DAT )
{
m_conversation = SCRIPTS_CH2L2_02_DAT;
2001-05-03 00:34:53 +02:00
}
2001-05-03 15:11:45 +02:00
break;
}
2001-05-03 00:34:53 +02:00
}
}
}