- Don't define NOCONSOLE
- Fix initialization with a pointer to stack (pas2c can't handle typed consts in functions) in uMisc.initModule
--- a/hedgewars/options.inc Sun Jan 05 13:08:50 2014 +0400
+++ b/hedgewars/options.inc Sun Jan 05 23:58:13 2014 +0400
@@ -73,7 +73,7 @@
{$ENDIF}
{$IFDEF PAS2C}
- {$DEFINE NOCONSOLE}
+ { $DEFINE NOCONSOLE}
{$DEFINE USE_SDLTHREADS}
{$ENDIF}
--- a/hedgewars/uConsole.pas Sun Jan 05 13:08:50 2014 +0400
+++ b/hedgewars/uConsole.pas Sun Jan 05 23:58:13 2014 +0400
@@ -49,11 +49,11 @@
begin
{$IFNDEF NOCONSOLE}
WriteToConsole(s);
- lastConsoleline:= s;
{$IFNDEF ANDROID}
WriteLn(stderr, '');
{$ENDIF}
{$ENDIF}
+ lastConsoleline:= s;
end;
function ShortStringAsPChar(s: shortstring) : PChar;
--- a/hedgewars/uMisc.pas Sun Jan 05 13:08:50 2014 +0400
+++ b/hedgewars/uMisc.pas Sun Jan 05 23:58:13 2014 +0400
@@ -301,7 +301,6 @@
GetTeamStatString:= s;
end;
-procedure initModule;
{$IFDEF SDL2}
const SDL_PIXELFORMAT_ABGR8888 = (1 shl 28) or (6 shl 24) or (7 shl 20) or (6 shl 16) or (32 shl 8) or 4;
{$ELSE}
@@ -312,6 +311,8 @@
RMask: RMask; GMask: GMask; BMask: BMask; AMask: AMask;
colorkey: 0; alpha: 255);
{$ENDIF}
+
+procedure initModule;
begin
{$IFDEF SDL2}
conversionFormat:= SDL_AllocFormat(SDL_PIXELFORMAT_ABGR8888);