aboutsummaryrefslogtreecommitdiff
path: root/sword2/anims.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/anims.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/anims.cpp')
-rw-r--r--sword2/anims.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/sword2/anims.cpp b/sword2/anims.cpp
index cd31e429fd..7850af0af7 100644
--- a/sword2/anims.cpp
+++ b/sword2/anims.cpp
@@ -107,7 +107,7 @@ int32 Animate(int32 *params, uint8 reverse_flag)
_animHeader *anim_head;
int32 res = params[2];
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
_standardHeader *head; // for animation testing & checking for correct file type
#endif
@@ -123,7 +123,7 @@ int32 Animate(int32 *params, uint8 reverse_flag)
if (ob_logic->looping==0)
{
//-----------------------------------------------------------
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
// For testing all anims! (James18apr97)
// A script loop can send every resource number to the anim function
// & it will only run the valid ones
@@ -153,7 +153,7 @@ int32 Animate(int32 *params, uint8 reverse_flag)
//-----------------------------------------------------------
//---------------------
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
// check that we haven't been passed a zero resource number
if (res==0)
Con_fatal_error("Animate: %s (id %d) passed zero anim resource (%s line %u)", FetchObjectName(ID), ID, __FILE__, __LINE__);
@@ -163,7 +163,7 @@ int32 Animate(int32 *params, uint8 reverse_flag)
anim_file = res_man.Res_open(res); // open anim file
//---------------------
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
// check this this resource is actually an animation file!
head = (_standardHeader*) anim_file;
if (head->fileType!=ANIMATION_FILE) // if it's not an animation file
@@ -175,7 +175,7 @@ int32 Animate(int32 *params, uint8 reverse_flag)
//---------------------
/*
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
// check there's at least one frame
if (anim_head->noAnimFrames==0)
Con_fatal_error("Animate: %s (%d) has zero frame count! (%s line %u)", FetchObjectName(res), res, __FILE__, __LINE__);
@@ -289,12 +289,12 @@ int32 FN_set_frame(int32 *params)
_animHeader *anim_head;
int32 res = params[1];
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
_standardHeader *head; // for checking for correct file type
#endif
//---------------------
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
// check that we haven't been passed a zero resource number
if (res==0)
Con_fatal_error("FN_set_frame: %s (id %d) passed zero anim resource (%s line %u)", FetchObjectName(ID), ID, __FILE__, __LINE__);
@@ -307,7 +307,7 @@ int32 FN_set_frame(int32 *params)
anim_file = res_man.Res_open(res); // open anim file
//---------------------
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
// check this this resource is actually an animation file!
head = (_standardHeader*) anim_file;
if (head->fileType!=ANIMATION_FILE) // if it's not an animation file
@@ -319,7 +319,7 @@ int32 FN_set_frame(int32 *params)
//---------------------
/*
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
// check there's at least one frame
if (anim_head->noAnimFrames==0)
Con_fatal_error("FN_set_frame: %s (%d) has zero frame count! (%s line %u)", FetchObjectName(res), res, __FILE__, __LINE__);
@@ -515,7 +515,7 @@ int32 FN_add_sequence_text(int32 *params) // (James22may97)
// 1 frame number to start the text displaying
// 2 frame number to stop the text dispalying
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
if (sequenceTextLines == MAX_SEQUENCE_TEXT_LINES)
Con_fatal_error("FN_add_sequence_text ran out of lines (%s line %u)",__FILE__,__LINE__);
#endif
@@ -563,7 +563,7 @@ void CreateSequenceSpeech(_movieTextObject *sequenceText[]) // (James23may97)
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
Zdebug(0,"(%d) SEQUENCE TEXT: %s", *(uint16*)text, text+2); // 1st word of text line is the official line number
#endif
//--------------------------------------
@@ -579,11 +579,11 @@ void CreateSequenceSpeech(_movieTextObject *sequenceText[]) // (James23may97)
// 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");
@@ -593,7 +593,7 @@ void CreateSequenceSpeech(_movieTextObject *sequenceText[]) // (James23may97)
strcpy(speechFile,"speech2.clu");
}
else
- #endif // _BS2_DEBUG
+ #endif // _SWORD2_DEBUG
{
strcpy(speechFile,res_man.GetCdPath());
strcat(speechFile,"CLUSTERS\\SPEECH.CLU");
@@ -601,7 +601,7 @@ void CreateSequenceSpeech(_movieTextObject *sequenceText[]) // (James23may97)
}
//------------------------------
- wavSize = g_bs2->_sound->GetCompSpeechSize(speechFile, wavId); // returns size of decompressed wav, or 0 if wav not found
+ wavSize = g_sword2->_sound->GetCompSpeechSize(speechFile, wavId); // returns size of decompressed wav, or 0 if wav not found
if (wavSize) // if we've got the wav
{
// allocate memory for speech buffer
@@ -609,7 +609,7 @@ void CreateSequenceSpeech(_movieTextObject *sequenceText[]) // (James23may97)
if (sequence_text_list[line].speech_mem) // if mem allocated ok (should be fine, but worth checking)
{
- if (g_bs2->_sound->PreFetchCompSpeech(speechFile, wavId, sequence_text_list[line].speech_mem->ad) == RD_OK) // Load speech & decompress to our buffer
+ if (g_sword2->_sound->PreFetchCompSpeech(speechFile, wavId, sequence_text_list[line].speech_mem->ad) == RD_OK) // Load speech & decompress to our buffer
{
Float_mem (sequence_text_list[line].speech_mem); // now float this buffer so we can make space for the next text sprites and/or speech samples
speechRunning=1; // ok, we've got speech!
@@ -706,7 +706,7 @@ int32 FN_smacker_lead_in(int32 *params) // James(21july97)
{
uint8 *leadIn;
uint32 rv;
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
_standardHeader *header;
#endif
@@ -714,7 +714,7 @@ int32 FN_smacker_lead_in(int32 *params) // James(21july97)
leadIn = res_man.Res_open(params[0]);
//-----------------------------------------
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
header = (_standardHeader*)leadIn;
if (header->fileType != WAV_FILE)
Con_fatal_error("FN_smacker_lead_in() given invalid resource (%s line %u)",__FILE__,__LINE__);
@@ -722,10 +722,10 @@ int32 FN_smacker_lead_in(int32 *params) // James(21july97)
//-----------------------------------------
leadIn += sizeof(_standardHeader);
- rv = g_bs2->_sound->PlayFx( 0, leadIn, 0, 0, RDSE_FXLEADIN ); // wav data gets copied to sound memory
+ rv = g_sword2->_sound->PlayFx( 0, leadIn, 0, 0, RDSE_FXLEADIN ); // wav data gets copied to sound memory
//-----------------------------------------
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
if (rv)
Zdebug("SFX ERROR: PlayFx() returned %.8x (%s line %u)", rv, __FILE__, __LINE__);
#endif
@@ -755,7 +755,7 @@ int32 FN_play_sequence(int32 *params) // James(09apr97)
uint32 rv; // drivers return value
_movieTextObject *sequenceSpeechArray[MAX_SEQUENCE_TEXT_LINES+1];
uint8 *leadOut = NULL;
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
_standardHeader *header;
#endif
@@ -794,14 +794,14 @@ int32 FN_play_sequence(int32 *params) // James(09apr97)
//--------------------------------------------------
// check that the name paseed from script is 8 chars or less
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
if (strlen((char *)params[0]) > 8)
Con_fatal_error("Sequence filename too long (%s line %u)",__FILE__,__LINE__);
#endif
//--------------------------------------------------
// add the appropriate file extension & play it
- if (g_bs2->_gameId == GID_BS2_DEMO)
+ if (g_sword2->_gameId == GID_SWORD2_DEMO)
sprintf(filename,"%s.smk", (char *)params[0]);
else
sprintf(filename,"%sSMACKS\\%s.smk", res_man.GetCdPath(), (char *)params[0]);
@@ -809,7 +809,7 @@ int32 FN_play_sequence(int32 *params) // James(09apr97)
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
Zdebug(0,"PLAYING SEQUENCE \"%s\"", filename);
#endif
//--------------------------------------
@@ -826,7 +826,7 @@ int32 FN_play_sequence(int32 *params) // James(09apr97)
leadOut = res_man.Res_open(smackerLeadOut);
//---------------------------
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
header = (_standardHeader*)leadOut;
if (header->fileType != WAV_FILE)
Con_fatal_error("FN_smacker_lead_out() given invalid resource (%s line %u)",__FILE__,__LINE__);
@@ -840,7 +840,7 @@ int32 FN_play_sequence(int32 *params) // James(09apr97)
// play the smacker
FN_stop_music(NULL); // don't want to carry on streaming game music when smacker starts!
- g_bs2->_sound->PauseFxForSequence(); // pause sfx during sequence, except the one used for lead-in music
+ g_sword2->_sound->PauseFxForSequence(); // pause sfx during sequence, except the one used for lead-in music
if (sequenceTextLines) // if we have some text to accompany this sequence
rv = PlaySmacker(filename, sequenceSpeechArray, leadOut);
@@ -857,7 +857,7 @@ int32 FN_play_sequence(int32 *params) // James(09apr97)
}
*/
- g_bs2->_sound->UnpauseFx(); // unpause sound fx again, in case we're staying in same location
+ g_sword2->_sound->UnpauseFx(); // unpause sound fx again, in case we're staying in same location
//--------------------------------------
// close the lead-out music resource
@@ -869,7 +869,7 @@ int32 FN_play_sequence(int32 *params) // James(09apr97)
}
//--------------------------
// check the error return-value
- #ifdef _BS2_DEBUG
+ #ifdef _SWORD2_DEBUG
if (rv)
Zdebug("PlaySmacker(\"%s\") returned 0x%.8x", filename, rv);
#endif