mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 22:09:40 +00:00
Final fixes to windows version
git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@41 ea6a568a-9f4f-0410-981a-c910a81bb256
This commit is contained in:
parent
1cf6cb106f
commit
1b7e1fb389
2 changed files with 26 additions and 18 deletions
|
@ -12,11 +12,13 @@ g++ -c ogre\cpp_ogre.cpp -I..\ogre\include
|
||||||
copy ..\ogre\bin\debug\ogremain_d.dll .
|
copy ..\ogre\bin\debug\ogremain_d.dll .
|
||||||
copy ..\ogre\bin\debug\ois_d.dll .
|
copy ..\ogre\bin\debug\ois_d.dll .
|
||||||
copy ..\ogre\bin\debug\cg.dll .
|
copy ..\ogre\bin\debug\cg.dll .
|
||||||
copy ..\ffmpeg\libavcodec\cygavcodec-51.dll cygavcodec.dll
|
copy ..\ogre\bin\debug\RenderSystem*.dll .
|
||||||
copy ..\ffmpeg\libavformat\cygavformat-52.dll cygavformat.dll
|
copy ..\ogre\bin\debug\Plugin*.dll .
|
||||||
copy ..\ffmpeg\libavdevice\cygavdevice-52.dll cygavdevice.dll
|
copy ..\ffmpeg\libavcodec\avcodec-51.dll .
|
||||||
copy ..\ffmpeg\libavutil\cygavutil-49.dll cygavutil.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
|
copy \windows\system32\d3dx9_30.dll d3dx9d_30.dll
|
||||||
|
|
||||||
echo Compiling main program (openmw.exe)
|
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
|
||||||
|
|
22
openmw.d
22
openmw.d
|
@ -63,6 +63,7 @@ void main(char[][] args)
|
||||||
bool help = false;
|
bool help = false;
|
||||||
bool resetKeys = false;
|
bool resetKeys = false;
|
||||||
bool showOgreFlag = false;
|
bool showOgreFlag = false;
|
||||||
|
bool noSound = false;
|
||||||
|
|
||||||
// Some examples to try:
|
// Some examples to try:
|
||||||
//
|
//
|
||||||
|
@ -92,6 +93,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 cells ~= a;
|
else cells ~= a;
|
||||||
|
|
||||||
if(cells.length + eCells.length/2 > 1 )
|
if(cells.length + eCells.length/2 > 1 )
|
||||||
|
@ -108,6 +110,7 @@ void main(char[][] args)
|
||||||
writefln(" -ex,y Load exterior cell (x,y)");
|
writefln(" -ex,y Load exterior cell (x,y)");
|
||||||
writefln(" -rk Reset key bindings to default");
|
writefln(" -rk Reset key bindings to default");
|
||||||
writefln(" -oc Show the Ogre config dialogue");
|
writefln(" -oc Show the Ogre config dialogue");
|
||||||
|
writefln(" -ns Completely disable sound");
|
||||||
writefln(" -h Show this help");
|
writefln(" -h Show this help");
|
||||||
writefln("");
|
writefln("");
|
||||||
writefln("Specifying more than one cell implies -n");
|
writefln("Specifying more than one cell implies -n");
|
||||||
|
@ -155,7 +158,7 @@ void main(char[][] args)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
initializeSound();
|
if(!noSound) initializeSound();
|
||||||
resources.initResources();
|
resources.initResources();
|
||||||
|
|
||||||
// Load all ESM and ESP files
|
// Load all ESM and ESP files
|
||||||
|
@ -244,12 +247,6 @@ void main(char[][] args)
|
||||||
cpp_makeSky();
|
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
|
// Insert the meshes of statics into the scene
|
||||||
foreach(ref LiveStatic ls; cd.statics)
|
foreach(ref LiveStatic ls; cd.statics)
|
||||||
putObject(ls.m.model, &ls.base.pos, ls.base.scale);
|
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);
|
NodePtr n = putObject(ls.m.model, &ls.base.pos, ls.base.scale);
|
||||||
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)
|
||||||
|
{
|
||||||
Sound *s = ls.m.sound;
|
Sound *s = ls.m.sound;
|
||||||
if(s)
|
if(s)
|
||||||
{
|
{
|
||||||
|
@ -269,11 +268,14 @@ void main(char[][] args)
|
||||||
ls.base.pos.position[2]);
|
ls.base.pos.position[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Static lights
|
// Static lights
|
||||||
foreach(ref LiveLight ls; cd.statLights)
|
foreach(ref LiveLight ls; cd.statLights)
|
||||||
{
|
{
|
||||||
NodePtr n = putObject(ls.m.model, &ls.base.pos, ls.base.scale);
|
NodePtr n = putObject(ls.m.model, &ls.base.pos, ls.base.scale);
|
||||||
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)
|
||||||
|
{
|
||||||
Sound *s = ls.m.sound;
|
Sound *s = ls.m.sound;
|
||||||
if(s)
|
if(s)
|
||||||
{
|
{
|
||||||
|
@ -285,6 +287,7 @@ void main(char[][] args)
|
||||||
ls.base.pos.position[2]);
|
ls.base.pos.position[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Misc items
|
// Misc items
|
||||||
foreach(ref LiveMisc ls; cd.miscItems)
|
foreach(ref LiveMisc ls; cd.miscItems)
|
||||||
putObject(ls.m.model, &ls.base.pos, ls.base.scale);
|
putObject(ls.m.model, &ls.base.pos, ls.base.scale);
|
||||||
|
@ -336,15 +339,18 @@ void main(char[][] args)
|
||||||
initializeInput();
|
initializeInput();
|
||||||
|
|
||||||
// Start swangin'
|
// Start swangin'
|
||||||
jukebox.enableMusic();
|
if(!noSound) jukebox.enableMusic();
|
||||||
|
|
||||||
// Run it until the user tells us to quit
|
// Run it until the user tells us to quit
|
||||||
startRendering();
|
startRendering();
|
||||||
}
|
}
|
||||||
else debug(verbose) writefln("Skipping rendering");
|
else debug(verbose) writefln("Skipping rendering");
|
||||||
|
|
||||||
|
if(!noSound)
|
||||||
|
{
|
||||||
soundScene.kill();
|
soundScene.kill();
|
||||||
shutdownSound();
|
shutdownSound();
|
||||||
|
}
|
||||||
|
|
||||||
debug(verbose)
|
debug(verbose)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue