Lines 47-52
Link Here
|
47 |
|
47 |
|
48 |
#if PLATFORM_UNIX |
48 |
#if PLATFORM_UNIX |
49 |
#include "SDL.h" |
49 |
#include "SDL.h" |
|
|
50 |
#include <limits.h> |
50 |
#endif |
51 |
#endif |
51 |
|
52 |
|
52 |
// this version string can be referenced from outside the engine |
53 |
// this version string can be referenced from outside the engine |
Lines 57-62
Link Here
|
57 |
ENGINE_API BOOL _bDedicatedServer = FALSE; |
58 |
ENGINE_API BOOL _bDedicatedServer = FALSE; |
58 |
ENGINE_API BOOL _bWorldEditorApp = FALSE; |
59 |
ENGINE_API BOOL _bWorldEditorApp = FALSE; |
59 |
ENGINE_API CTString _strLogFile = ""; |
60 |
ENGINE_API CTString _strLogFile = ""; |
|
|
61 |
ENGINE_API CTFileName _fnmModLibPath; |
60 |
|
62 |
|
61 |
// global handle for application windows |
63 |
// global handle for application windows |
62 |
// !!! FIXME rcg10072001 this needs to be abstracted. |
64 |
// !!! FIXME rcg10072001 this needs to be abstracted. |
Lines 103-108
Link Here
|
103 |
static CTString sys_strModName = ""; |
105 |
static CTString sys_strModName = ""; |
104 |
static CTString sys_strModExt = ""; |
106 |
static CTString sys_strModExt = ""; |
105 |
|
107 |
|
|
|
108 |
// Path vars |
109 |
static INDEX sys_iGameBits = 0; |
110 |
ENGINE_API INDEX sys_iSysPath = 0; |
111 |
|
106 |
// enables paranoia checks for allocation array |
112 |
// enables paranoia checks for allocation array |
107 |
BOOL _bAllocationArrayParanoiaCheck = FALSE; |
113 |
BOOL _bAllocationArrayParanoiaCheck = FALSE; |
108 |
|
114 |
|
Lines 594-602
Link Here
|
594 |
CPrintF(TRANSV("--- Serious Engine Startup ---\n")); |
600 |
CPrintF(TRANSV("--- Serious Engine Startup ---\n")); |
595 |
CPrintF(" %s\n\n", (const char *) _strEngineBuild); |
601 |
CPrintF(" %s\n\n", (const char *) _strEngineBuild); |
596 |
|
602 |
|
|
|
603 |
// Path vars |
604 |
sys_iGameBits = (int)(CHAR_BIT * sizeof(void *)); |
605 |
CPrintF(TRANSV("Running %d version\n"), sys_iGameBits); |
606 |
|
607 |
int _isystempath = strncmp((const char *)strExePath, (const char *) "/usr/bin/", (size_t) 9 ); |
608 |
if( _isystempath == 0 ) { |
609 |
sys_iSysPath = 1; // using system path |
610 |
} else { |
611 |
sys_iSysPath = 0; // using standarted path |
612 |
} |
613 |
|
614 |
// get library path for mods |
615 |
_fnmModLibPath = ""; |
616 |
if( sys_iSysPath == 1 && sys_iGameBits == 64 && _pFileSystem->IsDirectory((const char *) "/usr/lib/x86_64-linux-gnu")) { |
617 |
_fnmModLibPath = "/usr/lib/x86_64-linux-gnu/" + strGameID + "/"; |
618 |
} else if( sys_iSysPath == 1 && sys_iGameBits == 32 && _pFileSystem->IsDirectory((const char *) "/usr/lib/i386-linux-gnu")) { |
619 |
_fnmModLibPath = "/usr/lib/i386-linux-gnu/" + strGameID + "/"; |
620 |
} else if( sys_iSysPath == 1 && sys_iGameBits == 64 && _pFileSystem->IsDirectory((const char *) "/usr/lib64")) { |
621 |
_fnmModLibPath = "/usr/lib64/" + strGameID + "/"; |
622 |
} else if( sys_iSysPath == 1 && sys_iGameBits == 32 && _pFileSystem->IsDirectory((const char *) "/usr/lib")) { |
623 |
_fnmModLibPath = "/usr/lib/" + strGameID + "/"; |
624 |
} else { |
625 |
_fnmModLibPath = _fnmApplicationPath; |
626 |
} |
627 |
|
628 |
if( sys_iSysPath == 1 ) { |
629 |
_fnmApplicationPath = "/usr/share/" + strGameID + "/"; // all game data |
630 |
} |
631 |
|
597 |
// print info on the started application |
632 |
// print info on the started application |
598 |
CPrintF(TRANSV("Executable: %s\n"), strExePath); |
633 |
CPrintF(TRANSV("Executable: %s\n"), (const char *) strExePath); |
599 |
CPrintF(TRANSV("Assumed engine directory: %s\n"), (const char *) _fnmApplicationPath); |
634 |
CPrintF(TRANSV("Assumed engine data directory: %s\n"), (const char *) _fnmApplicationPath); |
|
|
635 |
CPrintF(TRANSV("Assumed mods library directory: %s\n"), (const char *) _fnmModLibPath); |
600 |
|
636 |
|
601 |
CPrintF("\n"); |
637 |
CPrintF("\n"); |
602 |
|
638 |
|
Lines 661-666
Link Here
|
661 |
// MOD info |
697 |
// MOD info |
662 |
_pShell->DeclareSymbol("user const CTString sys_strModName;", (void *) &sys_strModName); |
698 |
_pShell->DeclareSymbol("user const CTString sys_strModName;", (void *) &sys_strModName); |
663 |
_pShell->DeclareSymbol("user const CTString sys_strModExt;", (void *) &sys_strModExt); |
699 |
_pShell->DeclareSymbol("user const CTString sys_strModExt;", (void *) &sys_strModExt); |
|
|
700 |
// Path vars |
701 |
_pShell->DeclareSymbol("user const INDEX sys_iGameBits ;", (void *) &sys_iGameBits); |
702 |
_pShell->DeclareSymbol("user const INDEX sys_iSysPath ;", (void *) &sys_iSysPath); |
664 |
|
703 |
|
665 |
// Stock clearing |
704 |
// Stock clearing |
666 |
extern void FreeUnusedStock(void); |
705 |
extern void FreeUnusedStock(void); |