mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-30 00:11:33 +00:00
fixed 'noSound' linker error
git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@135 ea6a568a-9f4f-0410-981a-c910a81bb256
This commit is contained in:
parent
a8c594ac8b
commit
9ff29461f9
3 changed files with 10 additions and 11 deletions
|
@ -72,6 +72,9 @@ struct ConfigManager
|
||||||
// Other settings
|
// Other settings
|
||||||
bool firstRun;
|
bool firstRun;
|
||||||
|
|
||||||
|
// Set to true if sound is completely disabled
|
||||||
|
bool noSound = false;
|
||||||
|
|
||||||
// Number of current screen shot. Saved upon exit, so that shots
|
// Number of current screen shot. Saved upon exit, so that shots
|
||||||
// from separate sessions don't overwrite each other.
|
// from separate sessions don't overwrite each other.
|
||||||
int screenShotNum;
|
int screenShotNum;
|
||||||
|
|
|
@ -45,8 +45,6 @@ import gui.gui;
|
||||||
import input.keys;
|
import input.keys;
|
||||||
import input.ois;
|
import input.ois;
|
||||||
|
|
||||||
import openmw;
|
|
||||||
|
|
||||||
// Debug output
|
// Debug output
|
||||||
//debug=printMouse; // Mouse button events
|
//debug=printMouse; // Mouse button events
|
||||||
//debug=printMouseMove; // Mouse movement events
|
//debug=printMouseMove; // Mouse movement events
|
||||||
|
@ -345,7 +343,7 @@ extern(C) int d_frameStarted(float time)
|
||||||
playerData.position.position[1] = y;
|
playerData.position.position[1] = y;
|
||||||
playerData.position.position[2] = z;
|
playerData.position.position[2] = z;
|
||||||
|
|
||||||
if(!noSound)
|
if(!config.noSound)
|
||||||
{
|
{
|
||||||
// Tell the sound scene that the player has moved
|
// Tell the sound scene that the player has moved
|
||||||
sndCumTime += time;
|
sndCumTime += time;
|
||||||
|
|
14
openmw.d
14
openmw.d
|
@ -81,8 +81,6 @@ void poolSize()
|
||||||
}
|
}
|
||||||
//*/
|
//*/
|
||||||
|
|
||||||
bool noSound = false;
|
|
||||||
|
|
||||||
void main(char[][] args)
|
void main(char[][] args)
|
||||||
{
|
{
|
||||||
bool render = true;
|
bool render = true;
|
||||||
|
@ -116,7 +114,7 @@ void main(char[][] args)
|
||||||
else if(a == "-h") help=true;
|
else if(a == "-h") help=true;
|
||||||
else if(a == "-rk") resetKeys = true;
|
else if(a == "-rk") resetKeys = true;
|
||||||
else if(a == "-oc") showOgreFlag = true;
|
else if(a == "-oc") showOgreFlag = true;
|
||||||
else if(a == "-ns") noSound = true;
|
else if(a == "-ns") config.noSound = true;
|
||||||
else if(a == "-debug")
|
else if(a == "-debug")
|
||||||
{
|
{
|
||||||
// Enable Monster debug output
|
// Enable Monster debug output
|
||||||
|
@ -192,7 +190,7 @@ void main(char[][] args)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!noSound) initializeSound();
|
if(!config.noSound) initializeSound();
|
||||||
resources.initResources();
|
resources.initResources();
|
||||||
|
|
||||||
// Load all ESM and ESP files
|
// Load all ESM and ESP files
|
||||||
|
@ -300,7 +298,7 @@ Try specifying another cell name on the command line, or edit openmw.ini.");
|
||||||
{
|
{
|
||||||
NodePtr n = putObject(ls.m.model, ls.getPos(), ls.getScale());
|
NodePtr n = putObject(ls.m.model, ls.getPos(), ls.getScale());
|
||||||
ls.lightNode = attachLight(n, ls.m.data.color, ls.m.data.radius);
|
ls.lightNode = attachLight(n, ls.m.data.color, ls.m.data.radius);
|
||||||
if(!noSound)
|
if(!config.noSound)
|
||||||
{
|
{
|
||||||
Sound *s = ls.m.sound;
|
Sound *s = ls.m.sound;
|
||||||
if(s)
|
if(s)
|
||||||
|
@ -321,7 +319,7 @@ Try specifying another cell name on the command line, or edit openmw.ini.");
|
||||||
{
|
{
|
||||||
NodePtr n = putObject(ls.m.model, ls.getPos(), ls.getScale(), true);
|
NodePtr n = putObject(ls.m.model, ls.getPos(), ls.getScale(), true);
|
||||||
ls.lightNode = attachLight(n, ls.m.data.color, ls.m.data.radius);
|
ls.lightNode = attachLight(n, ls.m.data.color, ls.m.data.radius);
|
||||||
if(!noSound)
|
if(!config.noSound)
|
||||||
{
|
{
|
||||||
Sound *s = ls.m.sound;
|
Sound *s = ls.m.sound;
|
||||||
if(s)
|
if(s)
|
||||||
|
@ -389,7 +387,7 @@ Try specifying another cell name on the command line, or edit openmw.ini.");
|
||||||
startGUI();
|
startGUI();
|
||||||
|
|
||||||
// Play some old tunes
|
// Play some old tunes
|
||||||
if(!noSound)
|
if(!config.noSound)
|
||||||
Music.play();
|
Music.play();
|
||||||
|
|
||||||
// Run it until the user tells us to quit
|
// Run it until the user tells us to quit
|
||||||
|
@ -397,7 +395,7 @@ Try specifying another cell name on the command line, or edit openmw.ini.");
|
||||||
}
|
}
|
||||||
else if(debugOut) writefln("Skipping rendering");
|
else if(debugOut) writefln("Skipping rendering");
|
||||||
|
|
||||||
if(!noSound)
|
if(!config.noSound)
|
||||||
{
|
{
|
||||||
soundScene.kill();
|
soundScene.kill();
|
||||||
shutdownSound();
|
shutdownSound();
|
||||||
|
|
Loading…
Reference in a new issue