- Made ULandscape.GetID inline
- Removed some constraints on TileIDs and map coordinates - Removed another unnecessary typecast
This commit is contained in:
parent
dde886b051
commit
446e104031
|
@ -271,9 +271,9 @@ implementation
|
||||||
uses
|
uses
|
||||||
UGameResources, UdmNetwork, UPackets, UPacketHandlers, Logging;
|
UGameResources, UdmNetwork, UPackets, UPacketHandlers, Logging;
|
||||||
|
|
||||||
function GetID(AX, AY: Word): Integer;
|
function GetID(AX, AY: Word): Integer; inline;
|
||||||
begin
|
begin
|
||||||
Result := ((AX and $7FFF) shl 15) or (AY and $7FFF);
|
Result := (AX shl 16) or AY;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TLandTextureManager }
|
{ TLandTextureManager }
|
||||||
|
@ -321,7 +321,7 @@ begin
|
||||||
Result := GetArtMaterial(ATileID);
|
Result := GetArtMaterial(ATileID);
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
id := ATileID or ((AHue.ID and $3FFF) shl 15) or (Byte(APartialHue) shl 29);
|
id := ATileID or ((AHue.ID and $3FFF) shl 16) or (Byte(APartialHue) shl 30);
|
||||||
if not FArtCache.QueryID(id, Result) then
|
if not FArtCache.QueryID(id, Result) then
|
||||||
begin
|
begin
|
||||||
artEntry := ResMan.Art.GetArt(ATileID, 0, AHue, APartialHue);
|
artEntry := ResMan.Art.GetArt(ATileID, 0, AHue, APartialHue);
|
||||||
|
@ -511,7 +511,7 @@ begin
|
||||||
|
|
||||||
for i := 0 to FStaticBlock.Items.Count - 1 do
|
for i := 0 to FStaticBlock.Items.Count - 1 do
|
||||||
begin
|
begin
|
||||||
staticItem := TStaticItem(FStaticBlock.Items[i]);
|
staticItem := FStaticBlock.Items[i];
|
||||||
staticItem.CanBeEdited := ALandscape.CanWrite(staticItem.X,
|
staticItem.CanBeEdited := ALandscape.CanWrite(staticItem.X,
|
||||||
staticItem.Y);
|
staticItem.Y);
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue