Codechange: Make GetRegister return a signed integer, matching the underlying TemporaryStorageArray.

This commit is contained in:
frosch
2025-05-05 19:39:39 +02:00
committed by frosch
parent 74030a63e6
commit 99d7a775ad
8 changed files with 17 additions and 17 deletions

View File

@@ -655,7 +655,7 @@ SpriteID GetCustomStationFoundationRelocation(const StationSpec *statspec, BaseS
const auto *group = object.Resolve<ResultSpriteGroup>();
/* Note: SpriteGroup::Resolve zeroes all registers, so register 0x100 is initialised to 0. (compatibility) */
auto offset = GetRegister(0x100);
uint32_t offset = static_cast<uint32_t>(GetRegister(0x100));
if (group == nullptr || group->num_sprites <= offset) return 0;
return group->sprite + offset;