X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fengine%2Fe_msg.pas;h=f5711ec3079d6b46f7aa38d9a2b5b28b2ebe164c;hb=refs%2Fheads%2Fmob;hp=7e976e87d38b00fecd761ba2b1175b39a32833f0;hpb=1213aecb7e95da674a8c7032457f109a4db2e1c8;p=d2df-sdl.git diff --git a/src/engine/e_msg.pas b/src/engine/e_msg.pas index 7e976e8..f5711ec 100644 --- a/src/engine/e_msg.pas +++ b/src/engine/e_msg.pas @@ -2,8 +2,7 @@ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * the Free Software Foundation, version 3 of the License ONLY. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -178,31 +177,37 @@ end; procedure TMsg.Write(V: Word); overload; begin + V := NtoLE(V); WriteData(@V, 2); end; procedure TMsg.Write(V: LongWord); overload; begin + V := NtoLE(V); WriteData(@V, 4); end; procedure TMsg.Write(V: ShortInt); overload; begin + V := NtoLE(V); WriteData(@V, 1); end; procedure TMsg.Write(V: SmallInt); overload; begin + V := NtoLE(V); WriteData(@V, 2); end; procedure TMsg.Write(V: LongInt); overload; begin + V := NtoLE(V); WriteData(@V, 4); end; procedure TMsg.Write(V: Int64); overload; begin + V := NtoLE(V); WriteData(@V, 8); end; @@ -280,36 +285,42 @@ function TMsg.ReadWord(): Word; begin Result := 0; ReadData(@Result, 2); + Result := LEtoN(Result); end; function TMsg.ReadLongWord(): LongWord; begin Result := 0; ReadData(@Result, 4); + Result := LEtoN(Result); end; function TMsg.ReadShortInt(): ShortInt; begin Result := 0; ReadData(@Result, 1); + Result := LEtoN(Result); end; function TMsg.ReadSmallInt(): SmallInt; begin Result := 0; ReadData(@Result, 2); + Result := LEtoN(Result); end; function TMsg.ReadLongInt(): LongInt; begin Result := 0; ReadData(@Result, 4); + Result := LEtoN(Result); end; function TMsg.ReadInt64(): Int64; begin Result := 0; ReadData(@Result, 8); + Result := LEtoN(Result); end; function TMsg.ReadString(): string;