[Scummvm-cvs-logs] CVS: scummvm/bs2 anims.cpp,1.14,1.15 controls.cpp,1.13,1.14 function.cpp,1.9,1.10 mouse.cpp,1.13,1.14 resman.cpp,1.34,1.35 sound.cpp,1.12,1.13 speech.cpp,1.17,1.18 startup.cpp,1.9,1.10 sword2.cpp,1.28,1.29 sword2.h,1.11,1.12 tony_gsdk.cpp,1.7,1.8
Max Horn
fingolfin at users.sourceforge.net
Wed Sep 17 14:08:03 CEST 2003
Update of /cvsroot/scummvm/scummvm/bs2
In directory sc8-pr-cvs1:/tmp/cvs-serv17256/bs2
Modified Files:
anims.cpp controls.cpp function.cpp mouse.cpp resman.cpp
sound.cpp speech.cpp startup.cpp sword2.cpp sword2.h
tony_gsdk.cpp
Log Message:
added a static method setDefaultDirectory to class File; used this to simplify some code; added a global g_sound pointer in bs2, this cuts down on uses of g_sword2 (of course both should be removed on the long run); some other minor tweaks/fixes
Index: anims.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/anims.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- anims.cpp 13 Sep 2003 13:05:52 -0000 1.14
+++ anims.cpp 17 Sep 2003 21:06:13 -0000 1.15
@@ -582,12 +582,12 @@
File fp;
sprintf(speechFile, "speech%d.clu", res_man.WhichCd());
- if (fp.open(speechFile, g_sword2->getGameDataPath()))
+ if (fp.open(speechFile))
fp.close();
else
strcpy(speechFile, "speech.clu");
- wavSize = g_sword2->_sound->GetCompSpeechSize(speechFile, wavId); // returns size of decompressed wav, or 0 if wav not found
+ wavSize = g_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
@@ -595,7 +595,7 @@
if (sequence_text_list[line].speech_mem) // if mem allocated ok (should be fine, but worth checking)
{
- if (g_sword2->_sound->PreFetchCompSpeech(speechFile, wavId, sequence_text_list[line].speech_mem->ad) == RD_OK) // Load speech & decompress to our buffer
+ if (g_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!
@@ -708,7 +708,7 @@
//-----------------------------------------
leadIn += sizeof(_standardHeader);
- rv = g_sword2->_sound->PlayFx( 0, leadIn, 0, 0, RDSE_FXLEADIN ); // wav data gets copied to sound memory
+ rv = g_sound->PlayFx( 0, leadIn, 0, 0, RDSE_FXLEADIN ); // wav data gets copied to sound memory
//-----------------------------------------
#ifdef _SWORD2_DEBUG
@@ -826,7 +826,7 @@
// play the smacker
FN_stop_music(NULL); // don't want to carry on streaming game music when smacker starts!
- g_sword2->_sound->PauseFxForSequence(); // pause sfx during sequence, except the one used for lead-in music
+ g_sound->PauseFxForSequence(); // pause sfx during sequence, except the one used for lead-in music
if (sequenceTextLines && g_sword2->_gameId == GID_SWORD2) // if we have some text to accompany this sequence
rv = PlaySmacker(filename, sequenceSpeechArray, leadOut);
@@ -842,7 +842,7 @@
}
*/
- g_sword2->_sound->UnpauseFx(); // unpause sound fx again, in case we're staying in same location
+ g_sound->UnpauseFx(); // unpause sound fx again, in case we're staying in same location
//--------------------------------------
// close the lead-out music resource
Index: controls.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/controls.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- controls.cpp 9 Sep 2003 11:52:43 -0000 1.13
+++ controls.cpp 17 Sep 2003 21:06:13 -0000 1.14
@@ -794,12 +794,12 @@
_objectLabelsSwitch->setValue(pointerTextSelected != 0);
_subtitlesSwitch->setValue(subtitles != 0);
_reverseStereoSwitch->setValue(stereoReversed != 0);
- _musicSwitch->setValue(g_sword2->_sound->IsMusicMute() == 0);
- _speechSwitch->setValue(g_sword2->_sound->IsSpeechMute() == 0);
- _fxSwitch->setValue(g_sword2->_sound->IsFxMute() == 0);
- _musicSlider->setValue(g_sword2->_sound->GetMusicVolume());
- _speechSlider->setValue(g_sword2->_sound->GetSpeechVolume());
- _fxSlider->setValue(g_sword2->_sound->GetFxVolume());
+ _musicSwitch->setValue(g_sound->IsMusicMute() == 0);
+ _speechSwitch->setValue(g_sound->IsSpeechMute() == 0);
+ _fxSwitch->setValue(g_sound->IsFxMute() == 0);
+ _musicSlider->setValue(g_sound->GetMusicVolume());
+ _speechSlider->setValue(g_sound->GetSpeechVolume());
+ _fxSlider->setValue(g_sound->GetFxVolume());
_gfxSlider->setValue(GetRenderType());
_gfxPreview->setState(GetRenderType());
}
@@ -858,13 +858,13 @@
if (widget == _reverseStereoSwitch) {
if (result != stereoReversed)
- g_sword2->_sound->ReverseStereo();
+ g_sound->ReverseStereo();
stereoReversed = result;
} else if (widget == _musicSwitch) {
- g_sword2->_sound->MuteMusic(result);
+ g_sound->MuteMusic(result);
} else if (widget == _musicSlider) {
- g_sword2->_sound->SetMusicVolume(result);
- g_sword2->_sound->MuteMusic(result == 0);
+ g_sound->SetMusicVolume(result);
+ g_sound->MuteMusic(result == 0);
_musicSwitch->setValue(result != 0);
} else if (widget == _speechSlider) {
_speechSwitch->setValue(result != 0);
@@ -875,12 +875,12 @@
UpdateGraphicsLevel(result);
} else if (widget == _okButton) {
// Apply the changes
- g_sword2->_sound->MuteMusic(_musicSwitch->getValue() == 0);
- g_sword2->_sound->MuteSpeech(_speechSwitch->getValue() == 0);
- g_sword2->_sound->MuteFx(_fxSwitch->getValue() == 0);
- g_sword2->_sound->SetMusicVolume(_musicSlider->getValue());
- g_sword2->_sound->SetSpeechVolume(_speechSlider->getValue());
- g_sword2->_sound->SetFxVolume(_fxSlider->getValue());
+ g_sound->MuteMusic(_musicSwitch->getValue() == 0);
+ g_sound->MuteSpeech(_speechSwitch->getValue() == 0);
+ g_sound->MuteFx(_fxSwitch->getValue() == 0);
+ g_sound->SetMusicVolume(_musicSlider->getValue());
+ g_sound->SetSpeechVolume(_speechSlider->getValue());
+ g_sound->SetFxVolume(_fxSlider->getValue());
UpdateGraphicsLevel(_gfxSlider->getValue());
@@ -1472,12 +1472,12 @@
delete fp;
delete mgr;
- g_sword2->_sound->SetMusicVolume(buff[0]);
- g_sword2->_sound->SetSpeechVolume(buff[1]);
- g_sword2->_sound->SetFxVolume(buff[2]);
- g_sword2->_sound->MuteMusic(buff[3]);
- g_sword2->_sound->MuteSpeech(buff[4]);
- g_sword2->_sound->MuteFx(buff[5]);
+ g_sound->SetMusicVolume(buff[0]);
+ g_sound->SetSpeechVolume(buff[1]);
+ g_sound->SetFxVolume(buff[2]);
+ g_sound->MuteMusic(buff[3]);
+ g_sound->MuteSpeech(buff[4]);
+ g_sound->MuteFx(buff[5]);
UpdateGraphicsLevel(buff[6]); // (James13jun97)
@@ -1486,7 +1486,7 @@
pointerTextSelected = buff[8];
if (buff[9] != stereoReversed)
- g_sword2->_sound->ReverseStereo();
+ g_sound->ReverseStereo();
stereoReversed = buff[9];
return 0;
@@ -1500,12 +1500,12 @@
sprintf(filename, "%s-settings.dat", g_sword2->_game_name);
- buff[0] = g_sword2->_sound->GetMusicVolume();
- buff[1] = g_sword2->_sound->GetSpeechVolume();
- buff[2] = g_sword2->_sound->GetFxVolume();
- buff[3] = g_sword2->_sound->IsMusicMute();
- buff[4] = g_sword2->_sound->IsSpeechMute();
- buff[5] = g_sword2->_sound->IsFxMute();
+ buff[0] = g_sound->GetMusicVolume();
+ buff[1] = g_sound->GetSpeechVolume();
+ buff[2] = g_sound->GetFxVolume();
+ buff[3] = g_sound->IsMusicMute();
+ buff[4] = g_sound->IsSpeechMute();
+ buff[5] = g_sound->IsFxMute();
buff[6] = GetRenderType();
buff[7] = subtitles;
buff[8] = pointerTextSelected;
Index: function.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/function.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- function.cpp 17 Sep 2003 13:03:13 -0000 1.9
+++ function.cpp 17 Sep 2003 21:06:14 -0000 1.10
@@ -407,7 +407,7 @@
// And wait for it to die
for (int i = 0; i<16; i++) {
- g_sword2->_sound->UpdateCompSampleStreaming();
+ g_sound->UpdateCompSampleStreaming();
}
#endif
Index: mouse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/mouse.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- mouse.cpp 13 Sep 2003 12:03:29 -0000 1.13
+++ mouse.cpp 17 Sep 2003 21:06:14 -0000 1.14
@@ -235,7 +235,7 @@
}
//------------------------
- rv = g_sword2->_sound->PauseFx();
+ rv = g_sound->PauseFx();
if (rv != RD_OK)
Zdebug("ERROR: PauseFx() returned %.8x in SystemMenu()", rv);
//------------------------
@@ -307,7 +307,7 @@
this_screen.new_palette=1;
//------------------------
- rv = g_sword2->_sound->UnpauseFx();
+ rv = g_sound->UnpauseFx();
if (rv != RD_OK)
Zdebug("ERROR: UnpauseFx() returned %.8x in SystemMenu()", rv);
//------------------------
Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/resman.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- resman.cpp 17 Sep 2003 20:34:20 -0000 1.34
+++ resman.cpp 17 Sep 2003 21:06:14 -0000 1.35
@@ -104,7 +104,7 @@
total_clusters = 0;
- if (!file.open("resource.inf", g_sword2->getGameDataPath())) {
+ if (!file.open("resource.inf")) {
Zdebug("InitResMan cannot *OPEN* resource.inf");
ExitWithReport("InitResMan cannot *OPEN* resource.inf [file=%s line=%u]", __FILE__, __LINE__);
}
@@ -148,7 +148,7 @@
} while (j != end); // using this method the Gode generated resource.inf must have #0d0a on the last entry
// now load in the binary id to res conversion table
- if (!file.open("resource.tab", g_sword2->getGameDataPath())) {
+ if (!file.open("resource.tab")) {
Zdebug("InitResMan cannot *OPEN* resource.tab");
ExitWithReport("InitResMan cannot *OPEN* resource.tab [file=%s line=%u]", __FILE__, __LINE__);
}
@@ -172,7 +172,7 @@
file.close();
- if (!file.open("cd.inf", g_sword2->getGameDataPath())) {
+ if (!file.open("cd.inf")) {
Zdebug("InitResMan cannot *OPEN* cd.inf");
ExitWithReport("InitResMan cannot *OPEN* cd.inf [file=%s line=%u]", __FILE__, __LINE__);
}
@@ -228,7 +228,7 @@
// FIXME: Is this really needed?
- if (!file.open("revcd1.id", g_sword2->getGameDataPath())) {
+ if (!file.open("revcd1.id")) {
int index = 0;
/*
// Scan for CD drives.
@@ -527,7 +527,7 @@
}
// open the cluster file
- if (!file.open(resource_files[parent_res_file], g_sword2->getGameDataPath()))
+ if (!file.open(resource_files[parent_res_file]))
Con_fatal_error("Res_open cannot *OPEN* %s", resource_files[parent_res_file]);
@@ -683,7 +683,7 @@
// first we have to find the file via the res_conv_table
// open the cluster file
- if (!fh.open(resource_files[parent_res_file], g_sword2->getGameDataPath()))
+ if (!fh.open(resource_files[parent_res_file]))
Con_fatal_error("Res_fetch_len cannot *OPEN* %s", resource_files[parent_res_file]);
// 1st DWORD of a cluster is an offset to the look-up table
@@ -1165,8 +1165,8 @@
File inFile, outFile;
- inFile.open(buf, g_sword2->getGameDataPath());
- outFile.open(resource_files[newCluster], g_sword2->getGameDataPath(), File::kFileWriteMode);
+ inFile.open(buf);
+ outFile.open(resource_files[newCluster], NULL, File::kFileWriteMode);
if (!inFile.isOpen() || !outFile.isOpen()) {
Zdebug("Cache new cluster could not copy %s to %s", buf, resource_files[newCluster]);
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sound.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- sound.cpp 31 Aug 2003 18:09:21 -0000 1.12
+++ sound.cpp 17 Sep 2003 21:06:14 -0000 1.13
@@ -111,7 +111,7 @@
}
else if (fxq[j].type == FX_SPOT2)
{
- if (g_sword2->_sound->IsFxOpen(j+1))
+ if (g_sound->IsFxOpen(j+1))
fxq[j].resource = 0; // Once the Fx has finished remove it from the queue.
}
}
@@ -131,7 +131,7 @@
{
data = res_man.Res_open(fxq[j].resource); // load in the sample
data += sizeof(_standardHeader);
- rv = g_sword2->_sound->PlayFx( id, data, fxq[j].volume, fxq[j].pan, RDSE_FXSPOT ); // wav data gets copied to sound memory
+ rv = g_sound->PlayFx( id, data, fxq[j].volume, fxq[j].pan, RDSE_FXSPOT ); // wav data gets copied to sound memory
res_man.Res_close(fxq[j].resource); // release the sample
// fxq[j].resource = 0; // clear spot fx from queue
}
@@ -139,9 +139,9 @@
{ // - to be referenced by 'j', so pass NULL data
if (fxq[j].type == FX_RANDOM)
- rv = g_sword2->_sound->PlayFx( id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXSPOT ); // not looped
+ rv = g_sound->PlayFx( id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXSPOT ); // not looped
else // FX_LOOP
- rv = g_sword2->_sound->PlayFx( id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXLOOP ); // looped
+ rv = g_sound->PlayFx( id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXLOOP ); // looped
}
#ifdef _SWORD2_DEBUG
@@ -251,7 +251,7 @@
#endif
data += sizeof(_standardHeader);
- rv = g_sword2->_sound->OpenFx(id,data); // copy it to sound memory, using position in queue as 'id'
+ rv = g_sound->OpenFx(id,data); // copy it to sound memory, using position in queue as 'id'
#ifdef _SWORD2_DEBUG
if (rv)
@@ -289,7 +289,7 @@
// 2 new pan (-16..16)
// SetFxVolumePan(int32 id, uint8 vol, uint8 pan);
- g_sword2->_sound->SetFxVolumePan(1+params[0], params[1], params[2]); // driver fx_id is 1+<pos in queue>
+ g_sound->SetFxVolumePan(1+params[0], params[1], params[2]); // driver fx_id is 1+<pos in queue>
// Zdebug("%d",params[2]);
return (IR_CONT);
@@ -302,7 +302,7 @@
// 1 new volume (0..16)
// SetFxIdVolume(int32 id, uint8 vol);
- g_sword2->_sound->SetFxIdVolume(1+params[0], params[1]);
+ g_sound->SetFxIdVolume(1+params[0], params[1]);
return (IR_CONT);
}
@@ -321,7 +321,7 @@
if ((fxq[j].type == FX_RANDOM) || (fxq[j].type == FX_LOOP))
{
id = (uint32)j+1; // because 0 is not a valid id
- rv = g_sword2->_sound->CloseFx(id); // stop fx & remove sample from sound memory
+ rv = g_sound->CloseFx(id); // stop fx & remove sample from sound memory
#ifdef _SWORD2_DEBUG
if (rv)
@@ -350,7 +350,7 @@
void Clear_fx_queue(void)
{
- g_sword2->_sound->ClearAllFx(); // stop all fx & remove the samples from sound memory
+ g_sound->ClearAllFx(); // stop all fx & remove the samples from sound memory
Init_fx_queue(); // clean out the queue
}
@@ -419,13 +419,13 @@
File f;
sprintf(filename, "music%d.clu", res_man.WhichCd());
- if (f.open(filename, g_sword2->getGameDataPath()))
+ if (f.open(filename))
f.close();
else
strcpy(filename, "music.clu");
}
- rv = g_sword2->_sound->StreamCompMusic(filename, params[0], loopFlag);
+ rv = g_sound->StreamCompMusic(filename, params[0], loopFlag);
#ifdef _SWORD2_DEBUG
if (rv)
@@ -445,7 +445,7 @@
looping_music_id=0; // clear the 'looping' flag
- g_sword2->_sound->StopMusic();
+ g_sound->StopMusic();
if (params);
@@ -458,11 +458,11 @@
uint8 count;
looping_music_id=0; // clear the 'looping' flag
- g_sword2->_sound->StopMusic();
+ g_sound->StopMusic();
// THIS BIT CAUSES THE MUSIC TO STOP INSTANTLY!
for(count=0; count<16; count++)
- g_sword2->_sound->UpdateCompSampleStreaming();
+ g_sound->UpdateCompSampleStreaming();
}
//--------------------------------------------------------------------------------------
int32 FN_check_music_playing(int32 *params) // James (30july97)
@@ -472,7 +472,7 @@
// sets result to no. of seconds of current tune remaining
// or 0 if no music playing
- RESULT = g_sword2->_sound->MusicTimeRemaining(); // in seconds, rounded up to the nearest second
+ RESULT = g_sound->MusicTimeRemaining(); // in seconds, rounded up to the nearest second
return(IR_CONT); // continue script
}
@@ -481,15 +481,15 @@
{
uint32 rv; // for drivers return value
- rv = g_sword2->_sound->PauseMusic();
+ rv = g_sound->PauseMusic();
if (rv != RD_OK)
Zdebug("ERROR: PauseMusic() returned %.8x in PauseAllSound()", rv);
- rv = g_sword2->_sound->PauseSpeech();
+ rv = g_sound->PauseSpeech();
if (rv != RD_OK)
Zdebug("ERROR: PauseSpeech() returned %.8x in PauseAllSound()", rv);
- rv = g_sword2->_sound->PauseFx();
+ rv = g_sound->PauseFx();
if (rv != RD_OK)
Zdebug("ERROR: PauseFx() returned %.8x in PauseAllSound()", rv);
}
@@ -498,15 +498,15 @@
{
uint32 rv; // for drivers return value
- rv = g_sword2->_sound->UnpauseMusic();
+ rv = g_sound->UnpauseMusic();
if (rv != RD_OK)
Zdebug("ERROR: UnpauseMusic() returned %.8x in UnpauseAllSound()", rv);
- rv = g_sword2->_sound->UnpauseSpeech();
+ rv = g_sound->UnpauseSpeech();
if (rv != RD_OK)
Zdebug("ERROR: UnpauseSpeech() returned %.8x in UnpauseAllSound()", rv);
- rv = g_sword2->_sound->UnpauseFx();
+ rv = g_sound->UnpauseFx();
if (rv != RD_OK)
Zdebug("ERROR: UnpauseFx() returned %.8x in UnpauseAllSound()", rv);
}
Index: speech.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/speech.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- speech.cpp 13 Sep 2003 13:05:52 -0000 1.17
+++ speech.cpp 17 Sep 2003 21:06:14 -0000 1.18
@@ -1373,7 +1373,7 @@
// New fudge to wait for smacker samples to finish (James31july97)
// since they can over-run into the game
- if (g_sword2->_sound->GetSpeechStatus()!=RDSE_SAMPLEFINISHED) // has it finished?
+ if (g_sound->GetSpeechStatus()!=RDSE_SAMPLEFINISHED) // has it finished?
return (IR_REPEAT);
//-------------------------
@@ -1567,16 +1567,16 @@
File fp;
sprintf(speechFile, "speech%d.clu", res_man.WhichCd());
- if (fp.open(speechFile, g_sword2->getGameDataPath()))
+ if (fp.open(speechFile))
fp.close();
else
strcpy(speechFile, "speech.clu");
- rv = g_sword2->_sound->PlayCompSpeech(speechFile, params[S_WAV], SPEECH_VOLUME, speech_pan); // Load speech but don't start playing yet
+ rv = g_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_sword2->_sound->UnpauseSpeech(); // set it playing now (we might want to do this next cycle, don't know yet)
+ g_sound->UnpauseSpeech(); // set it playing now (we might want to do this next cycle, don't know yet)
}
#ifdef _SWORD2_DEBUG
else
@@ -1616,7 +1616,7 @@
else if (speechRunning) // if playing a sample
{
if (!unpause_zone)
- { if (g_sword2->_sound->AmISpeaking()==RDSE_QUIET) // if we're at a quiet bit
+ { if (g_sound->AmISpeaking()==RDSE_QUIET) // if we're at a quiet bit
ob_graphic->anim_pc=0; // restart from frame 0 ('closed mouth' frame)
}
}
@@ -1643,7 +1643,7 @@
if (speechRunning==1) // if playing a sample (note that value of '2' means about to play!)
{
if (!unpause_zone)
- { if (g_sword2->_sound->GetSpeechStatus()==RDSE_SAMPLEFINISHED) // has it finished?
+ { if (g_sound->GetSpeechStatus()==RDSE_SAMPLEFINISHED) // has it finished?
speechFinished=1; // James25feb97
}
else unpause_zone--;
@@ -1692,7 +1692,7 @@
if (speechRunning) // if speech sample playing
{
- g_sword2->_sound->StopSpeechSword2(); // halt the sample prematurely
+ g_sound->StopSpeechSword2(); // halt the sample prematurely
}
}
}
@@ -1904,7 +1904,7 @@
File fp;
uint8 cd; // 1, 2 or 0 (if speech on both cd's, ie. no need to change)
- if (fp.open("cd.bin",g_sword2->getGameDataPath()) == false)
+ if (fp.open("cd.bin") == false)
Con_fatal_error("Need cd.bin file for testing speech!");
fp.seek(wavId, SEEK_SET);
Index: startup.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/startup.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- startup.cpp 9 Sep 2003 12:45:33 -0000 1.9
+++ startup.cpp 17 Sep 2003 21:06:14 -0000 1.10
@@ -279,8 +279,8 @@
FN_stop_music(NULL); // fade out any music that is currently playing
//---------------------------------------------
- g_sword2->_sound->UnpauseSpeech();
- g_sword2->_sound->StopSpeechSword2(); // halt the sample prematurely
+ g_sound->UnpauseSpeech();
+ g_sound->StopSpeechSword2(); // halt the sample prematurely
//--------------------------------------------------------------
// clean out all resources & flags, ready for a total restart (James24mar97)
Index: sword2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sword2.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- sword2.cpp 14 Sep 2003 21:45:42 -0000 1.28
+++ sword2.cpp 17 Sep 2003 21:06:14 -0000 1.29
@@ -87,6 +87,7 @@
};
Sword2State *g_sword2 = NULL;
+Sword2Sound *g_sound = NULL;
const TargetSettings *Engine_SWORD2_targetList() {
return sword2_settings;
@@ -114,7 +115,9 @@
_mixer->setVolume(kDefaultSFXVolume * kDefaultMasterVolume / 255);
_mixer->setMusicVolume(kDefaultMusicVolume * kDefaultMasterVolume / 255);
- _sound = new Sword2Sound(_mixer);
+ g_sound = _sound = new Sword2Sound(_mixer);
+
+ File::setDefaultDirectory(_gameDataPath);
}
Index: sword2.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sword2.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- sword2.h 25 Aug 2003 06:13:28 -0000 1.11
+++ sword2.h 17 Sep 2003 21:06:14 -0000 1.12
@@ -50,24 +50,27 @@
// TODO move stuff into class
class Sword2State : public Engine {
- void errorString(const char *buf_input, char *buf_output);
- public:
- Sword2State(GameDetector *detector, OSystem *syst);
- void go(void);
- void parseEvents(void);
- void Start_game(void);
- int32 InitialiseGame(void);
- GameDetector *_detector;
- uint32 _features;
- byte _gameId;
- char *_game_name; // target name for saves
- Sword2Sound *_sound;
- private:
- bool _quit;
- uint32 _bootParam;
- int32 _saveSlot;
+public:
+ Sword2State(GameDetector *detector, OSystem *syst);
+ void go(void);
+ void parseEvents(void);
+ void Start_game(void);
+ int32 InitialiseGame(void);
+ GameDetector *_detector;
+ uint32 _features;
+ byte _gameId;
+ char *_game_name; // target name for saves
+ Sword2Sound *_sound;
+private:
+ bool _quit;
+ uint32 _bootParam;
+ int32 _saveSlot;
+
+public:
+ void errorString(const char *buf_input, char *buf_output);
};
extern Sword2State *g_sword2;
+extern Sword2Sound *g_sound;
#endif
Index: tony_gsdk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/tony_gsdk.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- tony_gsdk.cpp 17 Sep 2003 14:33:47 -0000 1.7
+++ tony_gsdk.cpp 17 Sep 2003 21:06:14 -0000 1.8
@@ -36,7 +36,7 @@
File fh;
uint32 size;
- if (!fh.open(name, g_sword2->getGameDataPath())) {
+ if (!fh.open(name)) {
Zdebug("Read_file cannot open %s", name);
return 0;
}
More information about the Scummvm-git-logs
mailing list