- Fixed CurrentTile to be updated on changes (fixes #47)
This commit is contained in:
parent
4da488a02b
commit
833c470cb7
|
@ -297,6 +297,7 @@ type
|
||||||
{ Methods }
|
{ Methods }
|
||||||
procedure BuildTileList;
|
procedure BuildTileList;
|
||||||
function ConfirmAction: Boolean;
|
function ConfirmAction: Boolean;
|
||||||
|
procedure ForceUpdateCurrentTile;
|
||||||
procedure GetDrawOffset(ARelativeX, ARelativeY: Integer; out DrawX,
|
procedure GetDrawOffset(ARelativeX, ARelativeY: Integer; out DrawX,
|
||||||
DrawY: Integer); inline;
|
DrawY: Integer); inline;
|
||||||
function GetInternalTileID(ATile: TWorldItem): Word;
|
function GetInternalTileID(ATile: TWorldItem): Word;
|
||||||
|
@ -2081,6 +2082,8 @@ begin
|
||||||
if north <> nil then PrepareScreenBlock(north);
|
if north <> nil then PrepareScreenBlock(north);
|
||||||
if east <> nil then PrepareScreenBlock(east);
|
if east <> nil then PrepareScreenBlock(east);
|
||||||
if west <> nil then PrepareScreenBlock(west);
|
if west <> nil then PrepareScreenBlock(west);
|
||||||
|
|
||||||
|
ForceUpdateCurrentTile;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.OnNewBlock(ABlock: TBlock);
|
procedure TfrmMain.OnNewBlock(ABlock: TBlock);
|
||||||
|
@ -2093,6 +2096,7 @@ begin
|
||||||
FScreenBuffer.Delete(AStaticItem);
|
FScreenBuffer.Delete(AStaticItem);
|
||||||
UpdateCurrentTile;
|
UpdateCurrentTile;
|
||||||
FRepaintNeeded := True;
|
FRepaintNeeded := True;
|
||||||
|
ForceUpdateCurrentTile;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.OnStaticElevated(AStaticItem: TStaticItem);
|
procedure TfrmMain.OnStaticElevated(AStaticItem: TStaticItem);
|
||||||
|
@ -2105,6 +2109,8 @@ begin
|
||||||
begin
|
begin
|
||||||
PrepareScreenBlock(blockInfo);
|
PrepareScreenBlock(blockInfo);
|
||||||
Exclude(FScreenBufferState, sbsIndexed);
|
Exclude(FScreenBufferState, sbsIndexed);
|
||||||
|
|
||||||
|
ForceUpdateCurrentTile;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -2133,8 +2139,8 @@ begin
|
||||||
begin
|
begin
|
||||||
AStaticItem.PrioritySolver := FScreenBuffer.GetSerial;
|
AStaticItem.PrioritySolver := FScreenBuffer.GetSerial;
|
||||||
PrepareScreenBlock(FScreenBuffer.Insert(AStaticItem));
|
PrepareScreenBlock(FScreenBuffer.Insert(AStaticItem));
|
||||||
UpdateCurrentTile;
|
|
||||||
FRepaintNeeded := True;
|
FRepaintNeeded := True;
|
||||||
|
ForceUpdateCurrentTile;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -2679,6 +2685,12 @@ begin
|
||||||
oglGameWindowMouseLeave(nil);
|
oglGameWindowMouseLeave(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmMain.ForceUpdateCurrentTile;
|
||||||
|
begin
|
||||||
|
CurrentTile := nil;
|
||||||
|
UpdateCurrentTile;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.GetDrawOffset(ARelativeX, ARelativeY: Integer; out DrawX,
|
procedure TfrmMain.GetDrawOffset(ARelativeX, ARelativeY: Integer; out DrawX,
|
||||||
DrawY: Integer); inline;
|
DrawY: Integer); inline;
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in New Issue