mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 19:32:11 +00:00
SAGA2: Kill graphics/audio init in towerfta.cpp
This commit is contained in:
parent
354713cb36
commit
18a51673a2
@ -29,6 +29,14 @@
|
||||
|
||||
namespace Saga2 {
|
||||
|
||||
void initAudio() {
|
||||
warning("STUB: initAudio()");
|
||||
}
|
||||
|
||||
void cleanupAudio() {
|
||||
warning("STUB: cleanupAudio()");
|
||||
}
|
||||
|
||||
void *audioAlloc(size_t s, char desc[])
|
||||
{
|
||||
warning("STUB: audioAlloc()");
|
||||
|
@ -219,50 +219,6 @@ static ATTENUATOR(volumeFromDist) {
|
||||
Module code
|
||||
* ===================================================================== */
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// init - this allocates timers, but no audio
|
||||
|
||||
bool initAudio(void) {
|
||||
// read audio INI file settings
|
||||
#if DEBUG
|
||||
debugStatuses = GetPrivateProfileInt("Debug", "Status", 0, iniFile);
|
||||
debugResource = GetPrivateProfileInt("Debug", "Resource", 0, iniFile);
|
||||
randomAudioTesting = GetPrivateProfileInt("Debug", "AudioStress", 0, iniFile);
|
||||
debugAudioThemes = GetPrivateProfileInt("Debug", "AudioThemes", 0, iniFile);
|
||||
#endif
|
||||
|
||||
|
||||
voiceRes = NULL;
|
||||
musicRes = NULL;
|
||||
soundRes = NULL;
|
||||
loopRes = NULL;
|
||||
longRes = NULL;
|
||||
|
||||
//allocate primary audio interface
|
||||
audio = new audioInterface;
|
||||
if (audio == NULL) return FALSE;
|
||||
|
||||
|
||||
// check for missing drivers
|
||||
#ifndef REQUIRE_AUDIO
|
||||
if (audio->dig == NULL && !retryConfigError(cpNoDIGAudioCheck, "Digital sound driver not loaded"))
|
||||
return FALSE;
|
||||
|
||||
if (audio->mid == NULL && !retryConfigError(cpNoMDIAudioCheck, "MIDI music driver not loaded"))
|
||||
return FALSE;
|
||||
#else
|
||||
#ifndef _WIN32
|
||||
REQUIRE(audio->dig, cpNoDIGAudio);
|
||||
REQUIRE(audio->mid, cpNoMDIAudio);
|
||||
//if ( audio->dig==NULL )
|
||||
// return FALSE;
|
||||
//if ( audio->mid==NULL )
|
||||
// return FALSE;
|
||||
#endif
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// after system initialization - startup code
|
||||
|
||||
@ -381,34 +337,6 @@ void startAudio(void) {
|
||||
audio->disable(volSound);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// cleanup
|
||||
|
||||
|
||||
void cleanupAudio(void) {
|
||||
if (audio) {
|
||||
audio->cleanupAudioInterface();
|
||||
|
||||
delete audio;
|
||||
audio = NULL;
|
||||
|
||||
killIt(clickData[1]);
|
||||
killIt(clickData[2]);
|
||||
|
||||
killIt(voiceDec);
|
||||
killIt(musicDec);
|
||||
killIt(soundDec);
|
||||
killIt(longSoundDec);
|
||||
killIt(loopDec);
|
||||
killIt(memDec);
|
||||
killIt(musicRes);
|
||||
killIt(soundRes);
|
||||
killIt(longRes);
|
||||
killIt(loopRes);
|
||||
killIt(voiceRes);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// audio event loop
|
||||
|
||||
|
@ -70,8 +70,6 @@ TowerLayer tower[fullyInitialized] = {
|
||||
{ videoInitialized, &initVideoPlayer, &termVideoPlayer, cpInternal },
|
||||
{ introInitialized, &initPlayIntro, &termPlayOutro, cpInternal },
|
||||
{ timerInitialized, &initSystemTimer, &termSystemTimer, cpDTimerInitFail },
|
||||
{ audioInitialized, &initAudio, &termAudio, cpDSoundInitFail },
|
||||
{ SVGAInitialized, &initGraphics, &termGraphics, cpInternal },
|
||||
{ resourcesInitialized, &initResourceFiles, &termResourceFiles, cpResFileMissing },
|
||||
{ serversInitialized, &initResourceServers, &termResourceServers, cpInternal },
|
||||
{ pathFinderInitialized, &initPathFinders, &termPathFinders, cpInternal },
|
||||
@ -232,24 +230,6 @@ TERMINATOR(termSystemTimer) {
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
extern INITIALIZER(initAudio);
|
||||
|
||||
TERMINATOR(termAudio) {
|
||||
cleanupAudio();
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
extern INITIALIZER(initGraphics);
|
||||
|
||||
TERMINATOR(termGraphics) {
|
||||
cleanupGraphics();
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
INITIALIZER(initResourceFiles) {
|
||||
|
@ -58,12 +58,6 @@ TERMINATOR(termPlayOutro);
|
||||
INITIALIZER(initSystemTimer);
|
||||
TERMINATOR(termSystemTimer);
|
||||
|
||||
INITIALIZER(initAudio);
|
||||
TERMINATOR(termAudio);
|
||||
|
||||
INITIALIZER(initGraphics);
|
||||
TERMINATOR(termGraphics);
|
||||
|
||||
INITIALIZER(initResourceFiles);
|
||||
TERMINATOR(termResourceFiles);
|
||||
|
||||
|
@ -40,9 +40,7 @@ enum initializationStates {
|
||||
graphicsSystemInitialized,
|
||||
procResEnabled,
|
||||
memoryInitialized,
|
||||
audioInitialized,
|
||||
videoInitialized,
|
||||
SVGAInitialized,
|
||||
resourcesInitialized,
|
||||
serversInitialized,
|
||||
pathFinderInitialized,
|
||||
|
Loading…
Reference in New Issue
Block a user