ref: 8c92d67b5cca0acaee68803945af24633b140c9f
parent: 2cce6cb19836c9072fb76703c98cb3c4378a9e00
author: Iliyas Jorio <iliyas@jor.io>
date: Tue Jul 28 18:36:52 EDT 2020
Remove fmod calls
--- a/music.cpp
+++ b/music.cpp
@@ -11,8 +11,10 @@
#include "soundfx.h"
#include "graphics.h"
+#if 0
#include "fmod.hpp"
#include "fmod_errors.h"
+#endif
const int k_noMusic = -1;
const int k_songs = 14;
@@ -22,20 +24,25 @@
static MBoolean s_musicFast = false;
int s_musicPaused = 0;
+#if 0
static FMOD::Channel* s_musicChannel = NULL;
static FMOD::Sound* s_musicModule = NULL;
+#endif
void EnableMusic( MBoolean on )
{
+#if 0
if (s_musicChannel)
{
FMOD_RESULT result = s_musicChannel->setVolume(on? 0.75f: 0.0f);
FMOD_ERRCHECK(result);
}
+#endif
}
void FastMusic( void )
{
+#if 0
if (s_musicModule && !s_musicFast)
{
FMOD_RESULT result = s_musicModule->setMusicSpeed(1.3f);
@@ -43,10 +50,12 @@
s_musicFast = true;
}
+#endif
}
void SlowMusic( void )
{
+#if 0
if (s_musicModule && s_musicFast)
{
FMOD_RESULT result = s_musicModule->setMusicSpeed(1.0f);
@@ -54,10 +63,12 @@
s_musicFast = false;
}
+#endif
}
void PauseMusic( void )
{
+#if 0
if (s_musicChannel)
{
FMOD_RESULT result = s_musicChannel->setPaused(true);
@@ -65,10 +76,12 @@
s_musicPaused++;
}
+#endif
}
void ResumeMusic( void )
{
+#if 0
if (s_musicChannel)
{
FMOD_RESULT result = s_musicChannel->setPaused(false);
@@ -76,10 +89,12 @@
s_musicPaused--;
}
+#endif
}
void ChooseMusic( short which )
{
+#if 0
if (s_musicChannel != NULL)
{
s_musicChannel->stop();
@@ -116,4 +131,5 @@
musicSelection = which;
s_musicPaused = 0;
}
+#endif
}
--- a/soundfx.cpp
+++ b/soundfx.cpp
@@ -5,14 +5,19 @@
#include "soundfx.h"
#include "music.h"
+#if 0
#include "fmod.hpp"
#include "fmod_errors.h"
+#endif
#include <stdio.h>
+#if 0
FMOD::System *g_fmod;
static FMOD::Sound *s_sound[kNumSounds];
+#endif
MBoolean soundOn = true;
+#if 0
void FMOD_ERRCHECK(int result)
{
if (result != FMOD_OK)
@@ -21,9 +26,11 @@
abort();
}
}
+#endif
void InitSound( void )
{
+#if 0
FMOD_RESULT result = FMOD::System_Create(&g_fmod);
FMOD_ERRCHECK(result);
@@ -46,6 +53,7 @@
result = g_fmod->createSound(QuickResourceName("snd", index+128, ".wav"), FMOD_LOOP_OFF | FMOD_2D | FMOD_HARDWARE, 0, &s_sound[index]);
FMOD_ERRCHECK(result);
}
+#endif
}
@@ -77,6 +85,7 @@
if (soundOn)
{
+#if 0
FMOD::Channel* channel = NULL;
FMOD_RESULT result = g_fmod->playSound(FMOD_CHANNEL_FREE, s_sound[which], true, &channel);
FMOD_ERRCHECK(result);
@@ -94,6 +103,7 @@
result = channel->setPaused(false);
FMOD_ERRCHECK(result);
+#endif
UpdateSound();
}
}
@@ -100,5 +110,7 @@
void UpdateSound()
{
+#if 0
g_fmod->update();
+#endif
}