aboutsummaryrefslogtreecommitdiff
path: root/sword2/speech.cpp
diff options
context:
space:
mode:
authorOliver Kiehl2003-07-30 19:25:31 +0000
committerOliver Kiehl2003-07-30 19:25:31 +0000
commit0f85cc306137e866adbe17ff7498e20d61a7938d (patch)
tree52729ad8ac05c3b48aab7fda2aaf0b1da827fb43 /sword2/speech.cpp
parent26d05c0190c9cca1444cc7a004c1149b3358ab10 (diff)
downloadscummvm-rg350-0f85cc306137e866adbe17ff7498e20d61a7938d.tar.gz
scummvm-rg350-0f85cc306137e866adbe17ff7498e20d61a7938d.tar.bz2
scummvm-rg350-0f85cc306137e866adbe17ff7498e20d61a7938d.zip
rename bs2 to sword2 to have the same name as the original engine.
besides this way all our engines start with an "s" ;) svn-id: r9301
Diffstat (limited to 'sword2/speech.cpp')
-rw-r--r--sword2/speech.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/sword2/speech.cpp b/sword2/speech.cpp
index b2196bcede..b79d426f95 100644
--- a/sword2/speech.cpp
+++ b/sword2/speech.cpp
@@ -94,7 +94,7 @@ void Form_text(int32 *params); //Tony18Oct96
BOOL Is_anim_boxed(uint32 res); //Tony20Oct96
uint8 WantSpeechForLine(uint32 wavId); // James (29july97)
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
void GetCorrectCdForSpeech(int32 wavId); // for testing speech & text
#endif
@@ -257,7 +257,7 @@ int32 FN_choose(int32 *params) //Tony19Nov96
{
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
Zdebug(0,"----------------------");
Zdebug(0,"Icons available:");
#endif
@@ -267,7 +267,7 @@ int32 FN_choose(int32 *params) //Tony19Nov96
{
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
Zdebug(0,"%s", FetchObjectName(subject_list[j].res));
#endif
//--------------------------------------
@@ -282,7 +282,7 @@ int32 FN_choose(int32 *params) //Tony19Nov96
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
Zdebug(0,"Selected: %s", FetchObjectName(subject_list[hit].res));
Zdebug(0,"----------------------");
#endif
@@ -1350,7 +1350,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
char speechFile[256];
static uint8 cycle_skip=0;
- #ifdef _BS2_DEBUG // (James26jun97)
+ #ifdef _SWORD2_DEBUG // (James26jun97)
_standardHeader *head; // for text/speech testing & checking for correct file type
static uint32 currentTextResource=0; // for text/speech testing - keeping track of text resource currently being tested
#endif
@@ -1373,7 +1373,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
// New fudge to wait for smacker samples to finish (James31july97)
// since they can over-run into the game
- if (g_bs2->_sound->GetSpeechStatus()!=RDSE_SAMPLEFINISHED) // has it finished?
+ if (g_sword2->_sound->GetSpeechStatus()!=RDSE_SAMPLEFINISHED) // has it finished?
return (IR_REPEAT);
//-------------------------
@@ -1396,7 +1396,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
//-------------------------
//-----------------------------------------------------------
- #ifdef _BS2_DEBUG // (James26jun97)
+ #ifdef _SWORD2_DEBUG // (James26jun97)
textNumber = params[S_TEXT]; // for debug info
@@ -1437,10 +1437,10 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
}
}
- #endif // _BS2_DEBUG
+ #endif // _SWORD2_DEBUG
//-----------------------------------------------------------
// pull out the text line to get the official text number (for wav id)
- // Once the wav id's go into all script text commands, we'll only need this for _BS2_DEBUG
+ // Once the wav id's go into all script text commands, we'll only need this for _SWORD2_DEBUG
text_res = params[S_TEXT]/SIZE;
local_text = params[S_TEXT]&0xffff;
@@ -1452,7 +1452,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
res_man.Res_close(text_res); // now ok to close the text file
//--------------------------------------
- #ifdef _BS2_DEBUG // (James09jul97)
+ #ifdef _SWORD2_DEBUG // (James09jul97)
// prevent dud lines from appearing while testing text & speech
// since these will not occur in the game anyway
@@ -1466,7 +1466,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
}
}
- #endif // _BS2_DEBUG
+ #endif // _SWORD2_DEBUG
//--------------------------------------
// set the 'looping_flag' & the text-click-delay
@@ -1477,7 +1477,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
//----------------------------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
if (PLAYER_ID!=CUR_PLAYER_ID) // if (player_id != george), then player is controlling Nico
Zdebug(0,"(%d) Nico: %s", officialTextNumber, text+2); // so write 'Nico' instead of George
else // ok, it's George anyway
@@ -1547,7 +1547,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
else if (speech_pan>16)
speech_pan=16;
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
if (SYSTEM_TESTING_TEXT) // if we're testing text & speech
{
// if we've moved onto a new text resource, we will want to check
@@ -1565,17 +1565,17 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
// set up path to speech cluster
// first checking if we have speech1.clu or speech2.clu in current directory (for translators to test)
- if (g_bs2->_gameId == GID_BS2_DEMO)
+ if (g_sword2->_gameId == GID_SWORD2_DEMO)
strcpy(speechFile,"SPEECH.CLU");
else {
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
if ((res_man.WhichCd()==1) && (!access("speech1.clu",0))) { // if 0 ie. if it's there
strcpy(speechFile,"speech1.clu");
} else if ((res_man.WhichCd()==2) && (!access("speech2.clu",0))) { // if 0 ie. if it's there
strcpy(speechFile,"speech2.clu");
} else
-#endif // _BS2_DEBUG
+#endif // _SWORD2_DEBUG
{
strcpy(speechFile,res_man.GetCdPath());
strcat(speechFile,"CLUSTERS\\SPEECH.CLU");
@@ -1584,13 +1584,13 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
//------------------------------
- rv = g_bs2->_sound->PlayCompSpeech(speechFile, params[S_WAV], SPEECH_VOLUME, speech_pan); // Load speech but don't start playing yet
+ rv = g_sword2->_sound->PlayCompSpeech(speechFile, params[S_WAV], SPEECH_VOLUME, speech_pan); // Load speech but don't start playing yet
if (rv == RD_OK)
{
speechRunning=1; // ok, we've got something to play (2 means not playing yet - see below)
- g_bs2->_sound->UnpauseSpeech(); // set it playing now (we might want to do this next cycle, don't know yet)
+ g_sword2->_sound->UnpauseSpeech(); // set it playing now (we might want to do this next cycle, don't know yet)
}
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
else
{
Zdebug("ERROR: PlayCompSpeech(speechFile=\"%s\", wav=%d (res=%d pos=%d)) returned %.8x", speechFile, params[S_WAV], text_res, local_text, rv);
@@ -1628,7 +1628,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
else if (speechRunning) // if playing a sample
{
if (!unpause_zone)
- { if (g_bs2->_sound->AmISpeaking()==RDSE_QUIET) // if we're at a quiet bit
+ { if (g_sword2->_sound->AmISpeaking()==RDSE_QUIET) // if we're at a quiet bit
ob_graphic->anim_pc=0; // restart from frame 0 ('closed mouth' frame)
}
}
@@ -1655,7 +1655,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
if (speechRunning==1) // if playing a sample (note that value of '2' means about to play!)
{
if (!unpause_zone)
- { if (g_bs2->_sound->GetSpeechStatus()==RDSE_SAMPLEFINISHED) // has it finished?
+ { if (g_sword2->_sound->GetSpeechStatus()==RDSE_SAMPLEFINISHED) // has it finished?
speechFinished=1; // James25feb97
}
else unpause_zone--;
@@ -1672,7 +1672,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
//-----------------------------------------------------------------------
// ok, all is running along smoothly - but a click means stop unnaturally
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
if ((SYSTEM_TESTING_TEXT==0)||(mousey>0)) // so that we can go to the options panel while text & speech is being tested
#endif
{
@@ -1685,7 +1685,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
// we ignore mouse releases
//-----------------------------------------------------------
- #ifdef _BS2_DEBUG // (James26jun97)
+ #ifdef _SWORD2_DEBUG // (James26jun97)
if (SYSTEM_TESTING_TEXT) // if testing text & speech
{
if (me->buttons&RD_RIGHTBUTTONDOWN) // and RB used to click past text
@@ -1704,7 +1704,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
if (speechRunning) // if speech sample playing
{
- g_bs2->_sound->StopSpeechBS2(); // halt the sample prematurely
+ g_sword2->_sound->StopSpeechSword2(); // halt the sample prematurely
}
}
}
@@ -1730,9 +1730,9 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
ob_logic->looping=0; // no longer in a script function loop
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
textNumber = 0; // reset for debug info
-#endif // _BS2_DEBUG
+#endif // _SWORD2_DEBUG
officialTextNumber = 0; // reset to zero, in case text line not even extracted (since this number comes from the text line)
RESULT=0; // ok (James09july97)
@@ -1909,7 +1909,7 @@ void Form_text(int32 *params) //Tony18Oct96
}
}
//------------------------------------------------------------------------------------
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
void GetCorrectCdForSpeech(int32 wavId)
{