summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e694e6)
raw | patch | inline | side by side (parent: 8e694e6)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 6 Oct 2019 20:41:59 +0000 (23:41 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 13 Oct 2019 14:19:20 +0000 (17:19 +0300) |
src/engine/e_msg.pas | patch | blob | history |
diff --git a/src/engine/e_msg.pas b/src/engine/e_msg.pas
index 6a6ca61fe14037c63fc488a3b202b1a7275724b5..f5711ec3079d6b46f7aa38d9a2b5b28b2ebe164c 100644 (file)
--- a/src/engine/e_msg.pas
+++ b/src/engine/e_msg.pas
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;
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;