--- a/hedgewars/hwengine.pas Wed Nov 23 20:12:16 2011 +0300
+++ b/hedgewars/hwengine.pas Thu Nov 24 16:18:45 2011 +0100
@@ -31,12 +31,14 @@
uses SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uKeys, uSound,
uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uRandom, uLandTexture, uCollisions,
- sysutils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted;
+ sysutils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted
+ {$IFDEF SDL13}, uTouch{$ENDIF}{$IFDEF ANDROID}, GLUnit{$ENDIF};
{$IFDEF HWLIBRARY}
procedure initEverything(complete:boolean);
procedure freeEverything(complete:boolean);
procedure Game(gameArgs: PPChar); cdecl; export;
+procedure GenLandPreview(port: Longint); cdecl; export;
implementation
{$ELSE}
@@ -187,6 +189,9 @@
cScreenResizeDelay:= RealTicks+500;
*)
end;
+ SDL_FINGERMOTION: onTouchMotion(event.tfinger.x, event.tfinger.y,event.tfinger.dx, event.tfinger.dy, event.tfinger.fingerId);
+ SDL_FINGERDOWN: onTouchDown(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
+ SDL_FINGERUP: onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
{$ELSE}
SDL_KEYDOWN: if GameState = gsChat then
KeyPressChat(event.key.keysym.unicode);
@@ -254,8 +259,6 @@
cBits:= 32;
cFullScreen:= false;
cTimerInterval:= 8;
- PathPrefix:= 'Data';
- UserPathPrefix:= '../Documents';
cShowFPS:= {$IFDEF DEBUGFILE}true{$ELSE}false{$ENDIF};
val(gameArgs[0], ipcPort);
val(gameArgs[1], cScreenWidth);
@@ -268,7 +271,8 @@
isSoundEnabled:= gameArgs[6] = '1';
isMusicEnabled:= gameArgs[7] = '1';
cAltDamage:= gameArgs[8] = '1';
- val(gameArgs[9], rotationQt);
+ PathPrefix:= gameArgs[9];
+ UserPathPrefix:= '../Documents';
recordFileName:= gameArgs[10];
cStereoMode:= smNone;
{$ENDIF}
@@ -278,7 +282,6 @@
cOrigScreenHeight:= cScreenHeight;
initEverything(true);
-
WriteLnToConsole('Hedgewars ' + cVersionString + ' engine (network protocol: ' + inttostr(cNetProtoVersion) + ')');
AddFileLog('Prefix: "' + PathPrefix +'"');
AddFileLog('UserPrefix: "' + UserPathPrefix +'"');
@@ -384,6 +387,8 @@
if complete then
begin
+{$IFDEF ANDROID}GLUnit.init;{$ENDIF}
+{$IFDEF SDL13}uTouch.initModule;{$ENDIF}
uAI.initModule;
//uAIActions does not need initialization
//uAIAmmoTests does not need initialization