diff -r 46a9fde631f4 -r 75db7bb8dce8 hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Wed Jan 02 11:11:49 2013 +0100 +++ b/hedgewars/uVariables.pas Sun Jan 27 00:28:57 2013 +0100 @@ -27,10 +27,12 @@ /////// init flags /////// cMinScreenWidth : LongInt; cMinScreenHeight : LongInt; + cFullscreenWidth : LongInt; + cFullscreenHeight : LongInt; + cWindowedWidth : LongInt; + cWindowedHeight : LongInt; cScreenWidth : LongInt; cScreenHeight : LongInt; - cOrigScreenWidth : LongInt; - cOrigScreenHeight : LongInt; cNewScreenWidth : LongInt; cNewScreenHeight : LongInt; cScreenResizeDelay : LongWord; @@ -175,8 +177,9 @@ SDWaterColorArray : array[0..3] of HwColor4f; SDTint : LongInt; - CursorPoint : TPoint; - TargetPoint : TPoint; + TargetCursorPoint : TPoint; + CursorPoint : TPoint; + TargetPoint : TPoint; ScreenFade : TScreenFade; ScreenFadeValue : LongInt; @@ -2344,8 +2347,13 @@ begin // initialisation flags - they are going to be overwritten by program args - cScreenWidth := 1024; - cScreenHeight := 768; + cFullscreenWidth := 0; + cFullscreenHeight := 0; + cWindowedWidth := 1024; + cWindowedHeight := 768; + cScreenWidth := cWindowedWidth; + cScreenHeight := cWindowedHeight; + cShowFPS := false; cAltDamage := true; cTimerInterval := 8; @@ -2526,15 +2534,20 @@ vobSDVelocity:= 15; vobSDFallSpeed:= 250; - cMinScreenWidth:= min(cScreenWidth, 640); - cMinScreenHeight:= min(cScreenHeight, 480); - cOrigScreenWidth:= cScreenWidth; - cOrigScreenHeight:= cScreenHeight; + cMinScreenWidth := min(cScreenWidth, 640); + cMinScreenHeight := min(cScreenHeight, 480); cNewScreenWidth := cScreenWidth; cNewScreenHeight := cScreenHeight; cScreenResizeDelay := 0; + // make sure fullscreen resolution is always initialised somehow + if cFullscreenWidth = 0 then + cFullscreenWidth:= min(cWindowedWidth, 640); + if cFullscreenHeight = 0 then + cFullscreenHeight:= min(cWindowedHeight, 480); + + LuaGoals:= ''; cMapName:= '';