Final fixes to windows version

git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@41 ea6a568a-9f4f-0410-981a-c910a81bb256
actorid
nkorslund 17 years ago
parent 1cf6cb106f
commit 1b7e1fb389

@ -12,11 +12,13 @@ g++ -c ogre\cpp_ogre.cpp -I..\ogre\include
copy ..\ogre\bin\debug\ogremain_d.dll .
copy ..\ogre\bin\debug\ois_d.dll .
copy ..\ogre\bin\debug\cg.dll .
copy ..\ffmpeg\libavcodec\cygavcodec-51.dll cygavcodec.dll
copy ..\ffmpeg\libavformat\cygavformat-52.dll cygavformat.dll
copy ..\ffmpeg\libavdevice\cygavdevice-52.dll cygavdevice.dll
copy ..\ffmpeg\libavutil\cygavutil-49.dll cygavutil.dll
copy ..\ogre\bin\debug\RenderSystem*.dll .
copy ..\ogre\bin\debug\Plugin*.dll .
copy ..\ffmpeg\libavcodec\avcodec-51.dll .
copy ..\ffmpeg\libavformat\avformat-52.dll .
copy ..\ffmpeg\libavdevice\avdevice-52.dll .
copy ..\ffmpeg\libavutil\avutil-49.dll .
copy \windows\system32\d3dx9_30.dll d3dx9d_30.dll
echo Compiling main program (openmw.exe)
gdc -Wall -g openmw.d bsa\*.d core\*.d esm\*.d input\*.d nif\*.d ogre\*.d scene\*.d sound\*.d util\*.d cpp_ogre.o cpp_avcodec.o monster\util\*.d cygavcodec.dll cygavformat.dll cygavdevice.dll cygavutil.dll openal32.dll ogremain_d.dll OIS_d.dll -lstdc++ -o openmw.exe
gdc -Wall -g openmw.d bsa\*.d core\*.d esm\*.d input\*.d nif\*.d ogre\*.d scene\*.d sound\*.d util\*.d cpp_ogre.o cpp_avcodec.o monster\util\*.d avcodec-51.dll avformat-52.dll avdevice-52.dll avutil-49.dll openal32.dll ogremain_d.dll OIS_d.dll -lstdc++ -o openmw.exe

@ -63,6 +63,7 @@ void main(char[][] args)
bool help = false;
bool resetKeys = false;
bool showOgreFlag = false;
bool noSound = false;
// Some examples to try:
//
@ -92,6 +93,7 @@ void main(char[][] args)
else if(a == "-h") help=true;
else if(a == "-rk") resetKeys = true;
else if(a == "-oc") showOgreFlag = true;
else if(a == "-ns") noSound = true;
else cells ~= a;
if(cells.length + eCells.length/2 > 1 )
@ -108,6 +110,7 @@ void main(char[][] args)
writefln(" -ex,y Load exterior cell (x,y)");
writefln(" -rk Reset key bindings to default");
writefln(" -oc Show the Ogre config dialogue");
writefln(" -ns Completely disable sound");
writefln(" -h Show this help");
writefln("");
writefln("Specifying more than one cell implies -n");
@ -155,7 +158,7 @@ void main(char[][] args)
return;
}
initializeSound();
if(!noSound) initializeSound();
resources.initResources();
// Load all ESM and ESP files
@ -244,12 +247,6 @@ void main(char[][] args)
cpp_makeSky();
}
// TODO: We get some strange lamp-shaped activators in some scenes,
// eg in Abebaal. These are sound activators (using scripts), but
// they still appear. Find out if they have some special flags
// somewhere (eg. only-show-in-editor), or if we just have to filter
// them by the "Sound_*" name. Deal with it later.
// Insert the meshes of statics into the scene
foreach(ref LiveStatic ls; cd.statics)
putObject(ls.m.model, &ls.base.pos, ls.base.scale);
@ -258,6 +255,8 @@ void main(char[][] args)
{
NodePtr n = putObject(ls.m.model, &ls.base.pos, ls.base.scale);
ls.lightNode = attachLight(n, ls.m.data.color, ls.m.data.radius);
if(!noSound)
{
Sound *s = ls.m.sound;
if(s)
{
@ -269,11 +268,14 @@ void main(char[][] args)
ls.base.pos.position[2]);
}
}
}
// Static lights
foreach(ref LiveLight ls; cd.statLights)
{
NodePtr n = putObject(ls.m.model, &ls.base.pos, ls.base.scale);
ls.lightNode = attachLight(n, ls.m.data.color, ls.m.data.radius);
if(!noSound)
{
Sound *s = ls.m.sound;
if(s)
{
@ -285,6 +287,7 @@ void main(char[][] args)
ls.base.pos.position[2]);
}
}
}
// Misc items
foreach(ref LiveMisc ls; cd.miscItems)
putObject(ls.m.model, &ls.base.pos, ls.base.scale);
@ -336,15 +339,18 @@ void main(char[][] args)
initializeInput();
// Start swangin'
jukebox.enableMusic();
if(!noSound) jukebox.enableMusic();
// Run it until the user tells us to quit
startRendering();
}
else debug(verbose) writefln("Skipping rendering");
if(!noSound)
{
soundScene.kill();
shutdownSound();
}
debug(verbose)
{

Loading…
Cancel
Save