29 program hwengine; |
29 program hwengine; |
30 {$ENDIF} |
30 {$ENDIF} |
31 |
31 |
32 uses SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uKeys, uSound, |
32 uses SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uKeys, uSound, |
33 uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uRandom, uLandTexture, uCollisions, |
33 uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uRandom, uLandTexture, uCollisions, |
34 sysutils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted,uTouch {$IFDEF ANDROID}, GLUnit {$ENDIF}; |
34 sysutils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted |
|
35 {$IFDEF SDL13}, uTouch{$ENDIF}{$IFDEF ANDROID}, GLUnit{$ENDIF}; |
35 |
36 |
36 {$IFDEF HWLIBRARY} |
37 {$IFDEF HWLIBRARY} |
37 procedure initEverything(complete:boolean); |
38 procedure initEverything(complete:boolean); |
38 procedure freeEverything(complete:boolean); |
39 procedure freeEverything(complete:boolean); |
39 procedure Game(gameArgs: PPChar); cdecl; export; |
40 procedure Game(gameArgs: PPChar); cdecl; export; |
256 begin |
257 begin |
257 {$IFDEF HWLIBRARY} |
258 {$IFDEF HWLIBRARY} |
258 cBits:= 32; |
259 cBits:= 32; |
259 cFullScreen:= false; |
260 cFullScreen:= false; |
260 cTimerInterval:= 8; |
261 cTimerInterval:= 8; |
261 PathPrefix:= 'Data'; |
|
262 UserPathPrefix:= '../Documents'; |
|
263 cShowFPS:= {$IFDEF DEBUGFILE}true{$ELSE}false{$ENDIF}; |
262 cShowFPS:= {$IFDEF DEBUGFILE}true{$ELSE}false{$ENDIF}; |
264 val(gameArgs[0], ipcPort); |
263 val(gameArgs[0], ipcPort); |
265 val(gameArgs[1], cScreenWidth); |
264 val(gameArgs[1], cScreenWidth); |
266 val(gameArgs[2], cScreenHeight); |
265 val(gameArgs[2], cScreenHeight); |
267 val(gameArgs[3], cReducedQuality); |
266 val(gameArgs[3], cReducedQuality); |
271 UserNick:= gameArgs[5]; |
270 UserNick:= gameArgs[5]; |
272 isSoundEnabled:= gameArgs[6] = '1'; |
271 isSoundEnabled:= gameArgs[6] = '1'; |
273 isMusicEnabled:= gameArgs[7] = '1'; |
272 isMusicEnabled:= gameArgs[7] = '1'; |
274 cAltDamage:= gameArgs[8] = '1'; |
273 cAltDamage:= gameArgs[8] = '1'; |
275 PathPrefix:= gameArgs[9]; |
274 PathPrefix:= gameArgs[9]; |
276 UserPathPrefix:= PathPrefix; |
275 UserPathPrefix:= '../Documents'; |
277 recordFileName:= gameArgs[10]; |
276 recordFileName:= gameArgs[10]; |
278 cStereoMode:= smNone; |
277 cStereoMode:= smNone; |
279 {$ENDIF} |
278 {$ENDIF} |
280 cMinScreenWidth:= min(cScreenWidth, cMinScreenWidth); |
279 cMinScreenWidth:= min(cScreenWidth, cMinScreenWidth); |
281 cMinScreenHeight:= min(cScreenHeight, cMinScreenHeight); |
280 cMinScreenHeight:= min(cScreenHeight, cMinScreenHeight); |