🚧 Preview design placement

This commit is contained in:
2022-07-20 18:54:00 +02:00
parent cd983844fa
commit 1753c38eea
3 changed files with 166 additions and 38 deletions
+8 -1
View File
@@ -320,6 +320,8 @@ type
Hue: Word;
end;
TGhostTile = class(TStaticItem);
operator enumerator(AScreenBuffer: TScreenBuffer): TScreenBufferItemEnumerator;
implementation
@@ -996,6 +998,7 @@ var
i, x, y: Integer;
tempDrawList: TWorldItemList;
staticTileData: TStaticTiledata;
blockInfo: PBlockInfo;
begin
ADrawList.Clear;
tempDrawList := TWorldItemList.Create(False);;
@@ -1042,7 +1045,11 @@ begin
tempDrawList.Sort(@CompareWorldItems);
for i := 0 to tempDrawList.Count - 1 do
ADrawList.Add(TWorldItem(tempDrawList[i]));
begin
blockInfo := ADrawList.Add(TWorldItem(tempDrawList[i]));
if tempDrawList[i] is TGhostTile then
blockInfo^.State := ssGhost;
end;
tempDrawList.Free;
end;