# HG changeset patch # User nemo # Date 1352314930 18000 # Node ID 7d8bce524dafccae352b42d2e655ff08923b6dff # Parent cd007c1780e712a7b80a0275e1ad2871418cd63c LongInt Land width/height, mouse coords diff -r cd007c1780e7 -r 7d8bce524daf hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Wed Nov 07 13:24:01 2012 -0500 +++ b/hedgewars/GSHandlers.inc Wed Nov 07 14:02:10 2012 -0500 @@ -722,7 +722,7 @@ end; Gear^.Pos:= 0; Gear^.X:= int2hwFloat(LongInt(GetRandom(snowRight - snowLeft)) + snowLeft); - Gear^.Y:= int2hwFloat(LongInt(LAND_HEIGHT + GetRandom(50)) - 1325); + Gear^.Y:= int2hwFloat(LAND_HEIGHT + LongInt(GetRandom(50)) - 1325); Gear^.State:= Gear^.State or gstInvisible; end end; diff -r cd007c1780e7 -r 7d8bce524daf hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Nov 07 13:24:01 2012 -0500 +++ b/hedgewars/uGears.pas Wed Nov 07 14:02:10 2012 -0500 @@ -658,7 +658,7 @@ if (not hasBorder) and ((Theme = 'Snow') or (Theme = 'Christmas')) then for i:= vobCount * Longword(max(LAND_WIDTH,4096)) div 2048 downto 1 do - AddGear(LongInt(GetRandom(snowRight - snowLeft)) + snowLeft, LongInt(LAND_HEIGHT + GetRandom(750)) - 1300, gtFlake, 0, _0, _0, 0); + AddGear(LongInt(GetRandom(snowRight - snowLeft)) + snowLeft, LAND_HEIGHT + LongInt(GetRandom(750)) - 1300, gtFlake, 0, _0, _0, 0); end; diff -r cd007c1780e7 -r 7d8bce524daf hedgewars/uGearsHedgehog.pas --- a/hedgewars/uGearsHedgehog.pas Wed Nov 07 13:24:01 2012 -0500 +++ b/hedgewars/uGearsHedgehog.pas Wed Nov 07 14:02:10 2012 -0500 @@ -971,7 +971,7 @@ if (not isZero(Gear^.dY)) and (Gear^.FlightTime > 0) and ((GameFlags and gfLowGravity) = 0) then begin inc(Gear^.FlightTime); - if (Gear^.FlightTime > 1500) and ((hwRound(Gear^.X) < leftX-250) or (hwRound(Gear^.X) > rightX+250)) then + if (Gear^.FlightTime > 1500) and ((hwRound(Gear^.X) < LongInt(leftX)-250) or (hwRound(Gear^.X) > LongInt(rightX)+250)) then begin Gear^.FlightTime:= 0; AddCaption(GetEventString(eidHomerun), cWhiteColor, capgrpMessage); diff -r cd007c1780e7 -r 7d8bce524daf hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Wed Nov 07 13:24:01 2012 -0500 +++ b/hedgewars/uGearsUtils.pas Wed Nov 07 14:02:10 2012 -0500 @@ -286,7 +286,7 @@ procedure CheckHHDamage(Gear: PGear); var dmg: Longword; - i: LongInt; + i: LongWord; particle: PVisualGear; begin if _0_4 < Gear^.dY then diff -r cd007c1780e7 -r 7d8bce524daf hedgewars/uIO.pas --- a/hedgewars/uIO.pas Wed Nov 07 13:24:01 2012 -0500 +++ b/hedgewars/uIO.pas Wed Nov 07 14:02:10 2012 -0500 @@ -27,7 +27,7 @@ procedure InitIPC; procedure SendIPC(s: shortstring); -procedure SendIPCXY(cmd: char; X, Y: SmallInt); +procedure SendIPCXY(cmd: char; X, Y: LongInt); procedure SendIPCRaw(p: pointer; len: Longword); procedure SendIPCAndWaitReply(s: shortstring); procedure SendKeepAliveMessage(Lag: Longword); @@ -48,7 +48,7 @@ case byte of 1: (len: byte; cmd: Char; - X, Y: SmallInt); + X, Y: LongInt); 2: (str: shortstring); end; @@ -234,13 +234,13 @@ end end; -procedure SendIPCXY(cmd: char; X, Y: SmallInt); +procedure SendIPCXY(cmd: char; X, Y: LongInt); var s: shortstring; begin s[0]:= #5; s[1]:= cmd; -SDLNet_Write16(X, @s[2]); -SDLNet_Write16(Y, @s[4]); +SDLNet_Write32(X, @s[2]); +SDLNet_Write32(Y, @s[4]); SendIPC(s) end; @@ -270,7 +270,7 @@ procedure NetGetNextCmd; var tmpflag: boolean; s: shortstring; - x16, y16: SmallInt; + x32, y32: LongInt; begin tmpflag:= true; @@ -327,9 +327,9 @@ AddFileLog('got cmd "N": time '+IntToStr(hiTicks shl 16 + headcmd^.loTime)) end; 'p': begin - x16:= SDLNet_Read16(@(headcmd^.X)); - y16:= SDLNet_Read16(@(headcmd^.Y)); - doPut(x16, y16, false) + x32:= SDLNet_Read32(@(headcmd^.X)); + y32:= SDLNet_Read32(@(headcmd^.Y)); + doPut(x32, y32, false) end; 'P': begin // these are equations solved for CursorPoint @@ -337,8 +337,8 @@ // SDLNet_Read16(@(headcmd^.Y)) == cScreenHeight - CursorPoint.Y - WorldDy; if not (CurrentTeam^.ExtDriven and bShowAmmoMenu) then begin - CursorPoint.X:= SmallInt(SDLNet_Read16(@(headcmd^.X))) + WorldDx; - CursorPoint.Y:= cScreenHeight - SmallInt(SDLNet_Read16(@(headcmd^.Y))) - WorldDy + CursorPoint.X:= LongInt(SDLNet_Read32(@(headcmd^.X))) + WorldDx; + CursorPoint.Y:= cScreenHeight - LongInt(SDLNet_Read32(@(headcmd^.Y))) - WorldDy end end; 'w': ParseCommand('setweap ' + headcmd^.str[2], true); diff -r cd007c1780e7 -r 7d8bce524daf hedgewars/uLand.pas --- a/hedgewars/uLand.pas Wed Nov 07 13:24:01 2012 -0500 +++ b/hedgewars/uLand.pas Wed Nov 07 14:02:10 2012 -0500 @@ -36,7 +36,7 @@ var digest: shortstring; procedure ResizeLand(width, height: LongWord); -var potW, potH: LongWord; +var potW, potH: LongInt; begin potW:= toPowerOf2(width); potH:= toPowerOf2(height); diff -r cd007c1780e7 -r 7d8bce524daf hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Wed Nov 07 13:24:01 2012 -0500 +++ b/hedgewars/uVariables.pas Wed Nov 07 14:02:10 2012 -0500 @@ -108,7 +108,7 @@ zoom : GLfloat; ZoomValue : GLfloat; - cWaterLine : LongWord; + cWaterLine : LongInt; cGearScrEdgesDist: LongInt; isAudioMuted : boolean; @@ -122,8 +122,8 @@ Pathz: array[TPathType] of shortstring; UserPathz: array[TPathType] of shortstring; CountTexz: array[0..Pred(AMMO_INFINITE)] of PTexture; - LAND_WIDTH : LongWord; - LAND_HEIGHT : LongWord; + LAND_WIDTH : LongInt; + LAND_HEIGHT : LongInt; LAND_WIDTH_MASK : LongWord; LAND_HEIGHT_MASK : LongWord;