Changeset - r26365:18991bea098a
[Not reviewed]
master
0 1 0
frosch - 2 years ago 2022-09-10 20:53:02
frosch@openttd.org
Cleanup: [NewGRF] Callback 14 used a weird value for var10 in the GUI.
The value 0x2110000 probably originated from a mixup between callback 14 (sprite layout) and 24 (tile layout).
The latter does indeed use a var10 value like that.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf_station.cpp
Show inline comments
 
@@ -785,13 +785,13 @@ bool DrawStationTile(int x, int y, RailT
 
	uint tile = 2;
 

	
 
	const StationSpec *statspec = StationClass::Get(sclass)->GetSpec(station);
 
	if (statspec == nullptr) return false;
 

	
 
	if (HasBit(statspec->callback_mask, CBM_STATION_SPRITE_LAYOUT)) {
 
		uint16 callback = GetStationCallback(CBID_STATION_SPRITE_LAYOUT, 0x2110000, 0, statspec, nullptr, INVALID_TILE);
 
		uint16 callback = GetStationCallback(CBID_STATION_SPRITE_LAYOUT, 0, 0, statspec, nullptr, INVALID_TILE);
 
		if (callback != CALLBACK_FAILED) tile = callback;
 
	}
 

	
 
	uint32 total_offset = rti->GetRailtypeSpriteOffset();
 
	uint32 relocation = 0;
 
	uint32 ground_relocation = 0;
0 comments (0 inline, 0 general)