--- a/hedgewars/uVariables.pas Sun Oct 28 03:12:49 2012 +0100
+++ b/hedgewars/uVariables.pas Sun Oct 28 03:48:37 2012 +0100
@@ -25,45 +25,44 @@
var
/////// init flags ///////
- cMinScreenWidth : LongInt = 640;
- cMinScreenHeight : LongInt = 480;
- cScreenWidth : LongInt = 1024;
- cScreenHeight : LongInt = 768;
- cOrigScreenWidth : LongInt = 1024;
- cOrigScreenHeight : LongInt = 768;
- cNewScreenWidth : LongInt = 1024;
- cNewScreenHeight : LongInt = 768;
- cScreenResizeDelay : LongWord = 0;
- cBits : LongInt = 32;
- ipcPort : Word = 0;
- cFullScreen : boolean = false;
- cLocaleFName : shortstring = 'en.txt';
- cLocale : shortstring = 'en';
- cTimerInterval : LongInt = 8;
- PathPrefix : shortstring = './';
- UserPathPrefix : shortstring = './';
- cShowFPS : boolean = false;
- cFlattenFlakes : boolean = false;
- cFlattenClouds : boolean = false;
- cAltDamage : boolean = true;
- cReducedQuality : LongWord = rqNone;
- UserNick : shortstring = '';
- recordFileName : shortstring = '';
- cReadyDelay : Longword = 5000;
- cStereoMode : TStereoMode = smNone;
- cOnlyStats : boolean = False;
+ cMinScreenWidth : LongInt;
+ cMinScreenHeight : LongInt;
+ cScreenWidth : LongInt;
+ cScreenHeight : LongInt;
+ cOrigScreenWidth : LongInt;
+ cOrigScreenHeight : LongInt;
+ cNewScreenWidth : LongInt;
+ cNewScreenHeight : LongInt;
+ cScreenResizeDelay : LongWord;
+ cBits : LongInt;
+ ipcPort : Word;
+ cFullScreen : boolean;
+ cLocaleFName : shortstring;
+ cLocale : shortstring;
+ cTimerInterval : LongInt;
+ PathPrefix : shortstring;
+ UserPathPrefix : shortstring;
+ cShowFPS : boolean;
+ cFlattenFlakes : boolean;
+ cFlattenClouds : boolean;
+ cAltDamage : boolean;
+ cReducedQuality : LongWord;
+ UserNick : shortstring;
+ recordFileName : shortstring;
+ cReadyDelay : Longword;
+ cStereoMode : TStereoMode;
+ cOnlyStats : boolean;
{$IFDEF USE_VIDEO_RECORDING}
- RecPrefix : shortstring;
- cAVFormat : shortstring;
- cVideoCodec : shortstring;
+ RecPrefix : shortstring;
+ cAVFormat : shortstring;
+ cVideoCodec : shortstring;
cVideoFramerateNum : LongInt;
cVideoFramerateDen : LongInt;
cVideoQuality : LongInt;
- cAudioCodec : shortstring;
+ cAudioCodec : shortstring;
{$ENDIF}
//////////////////////////
- cMapName : shortstring = '';
-
+ cMapName : shortstring;
isCursorVisible : boolean;
isInLag : boolean;
isPaused : boolean;
@@ -111,7 +110,7 @@
cWaterLine : Word;
cGearScrEdgesDist: LongInt;
- isAudioMuted : boolean;
+ isAudioMuted : boolean;
// originally typed consts
ExplosionBorderColor: LongWord;
@@ -2511,8 +2510,6 @@
vobSDVelocity, vobSDFallSpeed: LongInt;
hideAmmoMenu: boolean;
- wheelUp: boolean;
- wheelDown: boolean;
ControllerNumControllers: Integer;
ControllerEnabled: Integer;
@@ -2543,6 +2540,32 @@
procedure initModule;
begin
+ // initialisation flags - they are going to be overwritten by args or by msgs
+ cScreenWidth := 1024;
+ cScreenHeight := 768;
+ cBits := 32;
+ ipcPort := 0;
+ cFullScreen := false;
+ cLocaleFName := 'en.txt';
+ cLocale := 'en';
+ cTimerInterval := 8;
+ PathPrefix := './';
+ UserPathPrefix := './';
+ cShowFPS := false;
+ cFlattenFlakes := false;
+ cFlattenClouds := false;
+ cAltDamage := true;
+ cReducedQuality := rqNone;
+ UserNick := '';
+ recordFileName := '';
+ cScriptName := '';
+ cReadyDelay := 5000;
+ cStereoMode := smNone;
+ GrayScale := false;
+
+ cFlattenFlakes := false;
+ cFlattenClouds := false;
+ cOnlyStats := False;
lastVisualGearByUID:= nil;
lastGearByUID:= nil;
@@ -2577,8 +2600,10 @@
SDWaterColorArray[2].a := 255;
SDWaterColorArray[1]:= SDWaterColorArray[0];
SDWaterColorArray[3]:= SDWaterColorArray[2];
-
+ SDWaterOpacity:= $80;
SDTint:= $80;
+ ExplosionBorderColor:= $FF808080;
+ WaterOpacity:= $80;
cDrownSpeed.QWordValue := 257698038; // 0.06
cDrownSpeedf := 0.06;
@@ -2628,7 +2653,6 @@
cExplosives := 2;
GameState := Low(TGameState);
-// GameType := gmtLocal;
zoom := cDefaultZoomLevel;
ZoomValue := cDefaultZoomLevel;
WeaponTooltipTex:= nil;
@@ -2675,11 +2699,18 @@
vobSDVelocity:= 15;
vobSDFallSpeed:= 250;
- ExplosionBorderColor:= $FF808080;
- WaterOpacity:= $80;
- SDWaterOpacity:= $80;
+ cMinScreenWidth := 640;
+ cMinScreenHeight := 480;
+ cScreenWidth := 1024;
+ cScreenHeight := 768;
+ cOrigScreenWidth := 1024;
+ cOrigScreenHeight := 768;
+ cNewScreenWidth := 1024;
+ cNewScreenHeight := 768;
+ cScreenResizeDelay := 0;
LuaGoals:= '';
+ cMapName:= '';
LuaTemplateNumber:= 0;
hiddenHedgehogsNumber:=0;
@@ -2687,27 +2718,6 @@
procedure freeModule;
begin
- // re-init flags so they will always contain safe values
- cScreenWidth := 1024;
- cScreenHeight := 768;
- cBits := 32;
- ipcPort := 0;
- cFullScreen := false;
- cLocaleFName := 'en.txt';
- cTimerInterval := 8;
- PathPrefix := './';
- UserPathPrefix := './';
- cShowFPS := false;
- cFlattenFlakes := false;
- cFlattenClouds := false;
- cAltDamage := true;
- cReducedQuality := rqNone;
- UserNick := '';
- recordFileName := '';
- cScriptName := '';
- cReadyDelay := 5000;
- cStereoMode := smNone;
- GrayScale := false;
end;
end.