Merge sheepluva's changes
authorWuzzy <almikes@aol.com>
Sat, 30 Sep 2017 23:53:21 +0200
changeset 12628 c8edce7e5f18
parent 12627 07fdda8c13a2 (current diff)
parent 12626 d972b31f8881 (diff)
child 12629 705dde538519
Merge sheepluva's changes
--- a/hedgewars/PNGh.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/PNGh.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -79,6 +79,7 @@
 
 procedure PngFlushData(png_ptr: png_structp); cdecl;
 begin
+    png_ptr:= png_ptr;
 end;
 
 procedure png_init_pascal_io(png_ptr: png_structp; pf : PFile);
--- a/hedgewars/hwengine.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/hwengine.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -243,7 +243,8 @@
                 SDL_MOUSEWHEEL:
                     begin
                     wheelEvent:= true;
-                    ProcessMouseWheel(event.wheel.x, event.wheel.y);
+                    //ProcessMouseWheel(event.wheel.x, event.wheel.y);
+                    ProcessMouseWheel(event.wheel.y);
                     end;
 {$ENDIF}
 
--- a/hedgewars/uAIAmmoTests.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uAIAmmoTests.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -254,7 +254,7 @@
 function TestBee(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt;
 var i, j: LongInt;
     valueResult, v, a, p: LongInt;
-    mX, mY, dX: real;
+    mX, mY: real;
     eX, eY: LongInt;
 begin
     if Level > 1 then
--- a/hedgewars/uConsole.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uConsole.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -28,7 +28,7 @@
 var lastConsoleline : shortstring;
 
 implementation
-uses Types, uUtils {$IFDEF ANDROID}, log in 'log.pas'{$ENDIF};
+uses uUtils {$IFDEF ANDROID}, log in 'log.pas'{$ENDIF};
 
 
 procedure WriteToConsole(s: shortstring);
--- a/hedgewars/uGears.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uGears.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -53,7 +53,7 @@
 uses uStore, uSound, uTeams, uRandom, uIO, uLandGraphics,
     {$IFDEF USE_TOUCH_INTERFACE}uTouch,{$ENDIF}
     uLocale, uAmmos, uStats, uVisualGears, uScript, uVariables,
-    uCommands, uUtils, uTextures, uRenderUtils, uGearsRender, uCaptions, uDebug,
+    uCommands, uUtils, uTextures, uRenderUtils, uGearsRender, uCaptions,
     uGearsHedgehog, uGearsUtils, uGearsList, uGearsHandlersRope
     , uVisualGearsList, uGearsHandlersMess, uAI;
 
--- a/hedgewars/uGearsHandlersMess.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -2019,7 +2019,6 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepDynamite(Gear: PGear);
-var VGear: PVisualGear;
 begin
     doStepFallingGear(Gear);
     AllInactive := false;
@@ -2121,7 +2120,6 @@
     dX, dY: HWFloat;
     hog: PHedgehog;
     sparkles: PVisualGear;
-    gi: PGear;
 begin
     k := Gear^.Kind;
 
@@ -5311,7 +5309,7 @@
 procedure doStepHammer(Gear: PGear);
 var HHGear, tmp, tmp2: PGear;
          t: PGearArray;
- i, dmg, d: LongInt;
+    i, dmg: LongInt;
 begin
 HHGear:= Gear^.Hedgehog^.Gear;
 HHGear^.State:= HHGear^.State or gstNoDamage;
--- a/hedgewars/uGearsUtils.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uGearsUtils.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -742,7 +742,6 @@
 var tempTeam : PTeam;
     sparkles: PVisualGear;
     gX, gY: LongInt;
-    s: ansistring;
 begin
     if (Gear^.LastDamage <> nil) then
         uStats.HedgehogDamaged(Gear, Gear^.LastDamage, 0, true)
@@ -779,7 +778,6 @@
         AddVisualGear(hwRound(gear^.X), hwRound(gear^.Y), vgtExplosion);
         PlaySound(sndWarp);
         RenderHealth(gear^.Hedgehog^);
-        s:= ansistring(gear^.Hedgehog^.Name);
         ScriptCall('onGearResurrect', gear^.uid);
         gear^.State := gstWait;
         end;
--- a/hedgewars/uInputHandler.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uInputHandler.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -30,7 +30,8 @@
 //procedure MaskModifier(var code: LongInt; modifier: LongWord);
 procedure MaskModifier(Modifier: shortstring; var code: LongInt);
 procedure ProcessMouse(event: TSDL_MouseButtonEvent; ButtonDown: boolean);
-procedure ProcessMouseWheel(x, y: LongInt);
+//procedure ProcessMouseWheel(x, y: LongInt);
+procedure ProcessMouseWheel(y: LongInt);
 procedure ProcessKey(event: TSDL_KeyboardEvent); inline;
 procedure ProcessKey(code: LongInt; KeyDown: boolean);
 
@@ -232,8 +233,10 @@
 
 var mwheelupCode, mwheeldownCode: Integer;
 
-procedure ProcessMouseWheel(x, y: LongInt);
+//procedure ProcessMouseWheel(x, y: LongInt);
+procedure ProcessMouseWheel(y: LongInt);
 begin
+    // we don't use 
     //writelntoconsole('[MOUSEWHEEL] '+inttostr(x)+', '+inttostr(y));
     if y > 0 then
         begin
--- a/hedgewars/uMisc.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uMisc.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -164,6 +164,7 @@
 Rewrite(f, 1);
 if IOResult = 0 then
     begin
+    writeResult:= 0; // suppress fpc hint
     BlockWrite(f, head, sizeof(head), writeResult);
     BlockWrite(f, image^.buffer^, size, writeResult);
     Close(f);
--- a/hedgewars/uRender.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uRender.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -105,8 +105,8 @@
 
 
 implementation
-uses {$IFNDEF PAS2C} StrUtils, {$ENDIF}uVariables, uUtils, uConsts
-     {$IFDEF GL2}, uMatrix, uConsole{$ENDIF}, uPhysFSLayer, uDebug;
+uses {$IFNDEF PAS2C} StrUtils, {$ENDIF}uVariables, uUtils
+     {$IFDEF GL2}, uMatrix, uConsole{$ENDIF}, uConsts;
 
 {$IFDEF USE_TOUCH_INTERFACE}
 const
--- a/hedgewars/uScript.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uScript.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -2088,7 +2088,7 @@
 end;
 
 function lc_getteamstats(L : Plua_State) : LongInt; Cdecl;
-var i, h  : LongInt;
+var i: LongInt;
 begin
     if CheckLuaParamCount(L, 1, 'GetTeamStats', 'teamname') then
         begin
--- a/hedgewars/uSound.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uSound.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -110,7 +110,7 @@
 var Volume: LongInt;
     SoundTimerTicks: Longword;
 implementation
-uses uVariables, uConsole, uCommands, uChat, uUtils, uDebug, uPhysFSLayer;
+uses uVariables, uConsole, uCommands, uDebug, uPhysFSLayer;
 
 const chanTPU = 32;
 var cInitVolume: LongInt;
--- a/hedgewars/uStore.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uStore.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -370,9 +370,7 @@
 end;
 
 procedure StoreLoad(reload: boolean);
-var s: shortstring;
-    ii: TSprite;
-    fi: THWFont;
+var ii: TSprite;
     ai: TAmmoType;
     tmpsurf, tmpoverlay: PSDL_Surface;
     i, imflags: LongInt;
--- a/hedgewars/uUtils.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uUtils.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -536,6 +536,7 @@
 
 function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
 begin
+at:= at; dir:= dir; angle:= angle; // parameter hint suppression because code below is currently disabled
 GetLaunchX:= 0
 (*
     if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
@@ -546,6 +547,7 @@
 
 function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
 begin
+at:= at; angle:= angle; // parameter hint suppression because code below is currently disabled
 GetLaunchY:= 0
 (*
     if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
--- a/hedgewars/uVideoRec.pas	Sat Sep 30 23:52:08 2017 +0200
+++ b/hedgewars/uVideoRec.pas	Sat Sep 30 23:53:21 2017 +0200
@@ -67,8 +67,7 @@
                   zoom: single;
               end;
 
-var YCbCr_Planes: array[0..2] of PByte;
-    RGB_Buffer: PByte;
+var RGB_Buffer: PByte;
     cameraFile: File of TFrame;
     audioFile: File;
     numPixels: LongWord;