-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.tscript
54 lines (41 loc) · 1.38 KB
/
main.tscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
$Core::windowIcon = "core/icon.png";
$Core::splashWindowImage = "core/splash.png";
$PMVersion = "1.0";
$pref::FirstTimeStartup = true;
// Console does something.
setLogMode(6);
// Disable script trace.
trace(false);
// Set the name of our application
$appName = "TorqueManager";
$pref::Video::deviceMode = 0;
$pref::Video::Resolution = "1024 768";
//-----------------------------------------------------------------------------
// Load up scripts to initialise subsystems.
ModuleDatabase.setModuleExtension("module");
ModuleDatabase.scanModules( "core", false );
ModuleDatabase.LoadExplicit( "CoreModule" );
// Display a splash window immediately to improve app responsiveness before
// engine is initialized and main window created.
if ($Server::Dedicated == false)
{
if ($platform $= "windows")
displaySplashWindow($Core::splashWindowImage);
}
else
{
$Video::forceDisplayAdapter = -1;
}
//load prefs
exec( "core/defaults." @ $TorqueScriptFileExtension );
$prefPath = getPrefpath();
if(!IsDirectory($prefPath))
createFolder($prefPath);
if ( isFile($prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension ) )
exec( $prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension );
callOnModules("initClient");
Canvas.setContent(MainMenuGui);
//testFormBuild();
if ( ($Server::Dedicated == false) && ($platform $= "windows") )
closeSplashWindow();
echo("Engine initialized...");