2001-07-13 20:27:16 +02:00
|
|
|
/*=========================================================================
|
|
|
|
|
2001-08-17 01:10:53 +02:00
|
|
|
tspeech.cpp
|
2001-07-13 20:27:16 +02:00
|
|
|
|
|
|
|
Author: CRB
|
|
|
|
Created:
|
|
|
|
Project: Spongebob
|
|
|
|
Purpose:
|
|
|
|
|
|
|
|
Copyright (c) 2001 Climax Development Ltd
|
|
|
|
|
|
|
|
===========================================================================*/
|
|
|
|
|
|
|
|
#ifndef __TRIGGERS_TSPEECH_H__
|
|
|
|
#include "triggers\tspeech.h"
|
|
|
|
#endif
|
|
|
|
|
2001-07-13 21:38:13 +02:00
|
|
|
#ifndef __SOUND_SOUND_H__
|
|
|
|
#include "sound\sound.h"
|
|
|
|
#endif
|
|
|
|
|
2001-08-17 01:10:53 +02:00
|
|
|
#ifndef __GAME_CONVO_H__
|
|
|
|
#include "game\convo.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Makes the speech triggers you proper conversation boxes
|
|
|
|
#define __SPEECH_TRIGGERS_AS_CONVERSATIONS__
|
|
|
|
|
|
|
|
|
2001-07-13 20:27:16 +02:00
|
|
|
|
2001-08-17 01:10:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __SPEECH_TRIGGERS_AS_CONVERSATIONS__
|
|
|
|
int CSpeechTrigger::s_speechRef[9] =
|
|
|
|
{
|
2001-08-17 16:46:40 +02:00
|
|
|
SCRIPTS_TRIGGERSPEECH_151_DAT,
|
|
|
|
SCRIPTS_TRIGGERSPEECH_152_DAT,
|
|
|
|
SCRIPTS_TRIGGERSPEECH_153_DAT,
|
|
|
|
SCRIPTS_TRIGGERSPEECH_154_DAT,
|
|
|
|
SCRIPTS_TRIGGERSPEECH_155_DAT,
|
|
|
|
SCRIPTS_TRIGGERSPEECH_156_DAT,
|
|
|
|
SCRIPTS_TRIGGERSPEECH_157_DAT,
|
|
|
|
SCRIPTS_TRIGGERSPEECH_158_DAT,
|
|
|
|
SCRIPTS_TRIGGERSPEECH_159_DAT,
|
2001-08-17 01:10:53 +02:00
|
|
|
};
|
|
|
|
#else
|
|
|
|
int CSpeechTrigger::s_speechRef[9] =
|
2001-07-13 21:38:13 +02:00
|
|
|
{
|
|
|
|
SPEECH_151,
|
|
|
|
SPEECH_152,
|
|
|
|
SPEECH_153,
|
|
|
|
SPEECH_154,
|
|
|
|
SPEECH_155,
|
|
|
|
SPEECH_156,
|
|
|
|
SPEECH_157,
|
|
|
|
SPEECH_158,
|
|
|
|
SPEECH_159,
|
|
|
|
};
|
2001-08-17 01:10:53 +02:00
|
|
|
#endif
|
2001-07-13 20:27:16 +02:00
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Function:
|
|
|
|
Purpose:
|
|
|
|
Params:
|
|
|
|
Returns:
|
|
|
|
---------------------------------------------------------------------- */
|
|
|
|
void CSpeechTrigger::collidedWith(CThing *_thisThing)
|
|
|
|
{
|
|
|
|
switch( _thisThing->getThingType() )
|
|
|
|
{
|
|
|
|
case TYPE_PLAYER:
|
|
|
|
{
|
2001-08-17 01:10:53 +02:00
|
|
|
|
|
|
|
#ifdef __SPEECH_TRIGGERS_AS_CONVERSATIONS__
|
|
|
|
CConversation::trigger((FileEquate)s_speechRef[m_data]);
|
|
|
|
#else
|
|
|
|
CSoundMediator::playSpeech( s_speechRef[m_data] );
|
|
|
|
#endif
|
2001-07-13 20:27:16 +02:00
|
|
|
setToShutdown();
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*===========================================================================
|
|
|
|
end */
|