|
|
|
@ -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)
|
|
|
|
|
{
|
|
|
|
|