# HG changeset patch # User unc0rr # Date 1388951893 -14400 # Node ID 5a222923c8f85214d377baa44484bd38f6b5e74b # Parent 0c6286c67b8de43527d300533d1033941bc9498b - Don't define NOCONSOLE - Fix initialization with a pointer to stack (pas2c can't handle typed consts in functions) in uMisc.initModule diff -r 0c6286c67b8d -r 5a222923c8f8 hedgewars/options.inc --- 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} diff -r 0c6286c67b8d -r 5a222923c8f8 hedgewars/uConsole.pas --- 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; diff -r 0c6286c67b8d -r 5a222923c8f8 hedgewars/uMisc.pas --- 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);