1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 08:52:40 +01:00

Codechange: Remove global GetRegister(), instead return 100+ registers directly from GetXxxCallback().

This commit is contained in:
frosch
2025-05-05 21:33:18 +02:00
committed by frosch
parent f59cf73b88
commit 6faa667644
28 changed files with 84 additions and 72 deletions

View File

@@ -278,7 +278,7 @@ CommandCost CmdBuildObject(DoCommandFlags flags, TileIndex tile, ObjectType type
uint16_t callback = CALLBACK_FAILED;
if (spec->callback_mask.Test(ObjectCallbackMask::SlopeCheck)) {
TileIndex diff = t - tile;
callback = GetObjectCallback(CBID_OBJECT_LAND_SLOPE_CHECK, GetTileSlope(t), TileY(diff) << 4 | TileX(diff), spec, nullptr, t, view);
callback = GetObjectCallback(CBID_OBJECT_LAND_SLOPE_CHECK, GetTileSlope(t), TileY(diff) << 4 | TileX(diff), spec, nullptr, t, {}, view);
}
if (callback == CALLBACK_FAILED) {