--- a/hedgewars/GSHandlers.inc Wed Nov 07 23:02:18 2012 +0400
+++ b/hedgewars/GSHandlers.inc Wed Nov 07 23:08:02 2012 +0400
@@ -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;
--- a/hedgewars/uGears.pas Wed Nov 07 23:02:18 2012 +0400
+++ b/hedgewars/uGears.pas Wed Nov 07 23:08:02 2012 +0400
@@ -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;
--- a/hedgewars/uGearsHedgehog.pas Wed Nov 07 23:02:18 2012 +0400
+++ b/hedgewars/uGearsHedgehog.pas Wed Nov 07 23:08:02 2012 +0400
@@ -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);
--- a/hedgewars/uGearsUtils.pas Wed Nov 07 23:02:18 2012 +0400
+++ b/hedgewars/uGearsUtils.pas Wed Nov 07 23:08:02 2012 +0400
@@ -286,7 +286,7 @@
procedure CheckHHDamage(Gear: PGear);
var
dmg: Longword;
- i: LongInt;
+ i: LongWord;
particle: PVisualGear;
begin
if _0_4 < Gear^.dY then
--- a/hedgewars/uIO.pas Wed Nov 07 23:02:18 2012 +0400
+++ b/hedgewars/uIO.pas Wed Nov 07 23:08:02 2012 +0400
@@ -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);
--- a/hedgewars/uLand.pas Wed Nov 07 23:02:18 2012 +0400
+++ b/hedgewars/uLand.pas Wed Nov 07 23:08:02 2012 +0400
@@ -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);
--- a/hedgewars/uVariables.pas Wed Nov 07 23:02:18 2012 +0400
+++ b/hedgewars/uVariables.pas Wed Nov 07 23:08:02 2012 +0400
@@ -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;