diff --git a/src/newgrf_callbacks.h b/src/newgrf_callbacks.h index 4a3bd814fc..947c161129 100644 --- a/src/newgrf_callbacks.h +++ b/src/newgrf_callbacks.h @@ -38,8 +38,8 @@ enum CallbackID { /** Determine whether a newstation should be made available to build. */ CBID_STATION_AVAILABILITY = 0x13, // 8 bit callback - /** Choose a sprite layout to draw, instead of the standard 0-7 range. */ - CBID_STATION_SPRITE_LAYOUT = 0x14, + /** Choose a tile layout to draw, instead of the standard 0-7 range. */ + CBID_STATION_DRAW_TILE_LAYOUT = 0x14, /** * Refit capacity, the passed vehicle needs to have its ->cargo_type set to @@ -93,7 +93,7 @@ enum CallbackID { CBID_VEHICLE_ADDITIONAL_TEXT = 0x23, /** Called when building a station to customize the tile layout */ - CBID_STATION_TILE_LAYOUT = 0x24, // 15 bit callback + CBID_STATION_BUILD_TILE_LAYOUT = 0x24, // 15 bit callback /** Called for periodically starting or stopping the animation. */ CBID_INDTILE_ANIM_START_STOP = 0x25, // 15 bit callback @@ -316,7 +316,7 @@ enum VehicleCallbackMask { */ enum StationCallbackMask { CBM_STATION_AVAIL = 0, ///< Availability of station in construction window - CBM_STATION_SPRITE_LAYOUT = 1, ///< Use callback to select a sprite layout to use + CBM_STATION_DRAW_TILE_LAYOUT = 1, ///< Use callback to select a tile layout to use when drawing. CBM_STATION_ANIMATION_NEXT_FRAME = 2, ///< Use a custom next frame callback CBM_STATION_ANIMATION_SPEED = 3, ///< Customize the animation speed of the station CBM_STATION_SLOPE_CHECK = 4, ///< Check slope of new station tiles diff --git a/src/newgrf_debug_gui.cpp b/src/newgrf_debug_gui.cpp index 59ef2eb173..8b3570ea2c 100644 --- a/src/newgrf_debug_gui.cpp +++ b/src/newgrf_debug_gui.cpp @@ -1824,7 +1824,7 @@ const char *GetNewGRFCallbackName(CallbackID cbid) CBID(CBID_VEHICLE_LENGTH) CBID(CBID_VEHICLE_LOAD_AMOUNT) CBID(CBID_STATION_AVAILABILITY) - CBID(CBID_STATION_SPRITE_LAYOUT) + CBID(CBID_STATION_DRAW_TILE_LAYOUT) CBID(CBID_VEHICLE_REFIT_CAPACITY) CBID(CBID_VEHICLE_ARTIC_ENGINE) CBID(CBID_HOUSE_ALLOW_CONSTRUCTION) @@ -1840,7 +1840,7 @@ const char *GetNewGRFCallbackName(CallbackID cbid) CBID(CBID_HOUSE_DESTRUCTION) CBID(CBID_INDUSTRY_PROBABILITY) CBID(CBID_VEHICLE_ADDITIONAL_TEXT) - CBID(CBID_STATION_TILE_LAYOUT) + CBID(CBID_STATION_BUILD_TILE_LAYOUT) CBID(CBID_INDTILE_ANIM_START_STOP) CBID(CBID_INDTILE_ANIM_NEXT_FRAME) CBID(CBID_INDTILE_ANIMATION_SPEED) diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 4821776dfa..307d6bf7d7 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -812,8 +812,8 @@ bool DrawStationTile(int x, int y, RailType railtype, Axis axis, StationClassID const StationSpec *statspec = StationClass::Get(sclass)->GetSpec(station); if (statspec == nullptr) return false; - if (HasBit(statspec->callback_mask, CBM_STATION_SPRITE_LAYOUT)) { - uint16_t callback = GetStationCallback(CBID_STATION_SPRITE_LAYOUT, 0, 0, statspec, nullptr, INVALID_TILE, railtype); + if (HasBit(statspec->callback_mask, CBM_STATION_DRAW_TILE_LAYOUT)) { + uint16_t callback = GetStationCallback(CBID_STATION_DRAW_TILE_LAYOUT, 0, 0, statspec, nullptr, INVALID_TILE, railtype); if (callback != CALLBACK_FAILED) tile = callback & ~1; } diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 76ad5580fa..a688595d3b 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1666,12 +1666,12 @@ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32_ uint32_t platinfo = GetPlatformInfo(AXIS_X, GetStationGfx(tile), plat_len, numtracks_orig, plat_len - w, numtracks_orig - numtracks, false); /* As the station is not yet completely finished, the station does not yet exist. */ - uint16_t callback = GetStationCallback(CBID_STATION_TILE_LAYOUT, platinfo, 0, statspec, nullptr, tile, rt); + uint16_t callback = GetStationCallback(CBID_STATION_BUILD_TILE_LAYOUT, platinfo, 0, statspec, nullptr, tile, rt); if (callback != CALLBACK_FAILED) { if (callback < 8) { SetStationGfx(tile, (callback & ~1) + axis); } else { - ErrorUnknownCallbackResult(statspec->grf_prop.grffile->grfid, CBID_STATION_TILE_LAYOUT, callback); + ErrorUnknownCallbackResult(statspec->grf_prop.grffile->grfid, CBID_STATION_BUILD_TILE_LAYOUT, callback); } } @@ -3370,8 +3370,8 @@ static void DrawTile_Station(TileInfo *ti, DrawTileProcParams params) if (statspec != nullptr) { tile_layout = GetStationGfx(ti->tile); - if (HasBit(statspec->callback_mask, CBM_STATION_SPRITE_LAYOUT)) { - uint16_t callback = GetStationCallback(CBID_STATION_SPRITE_LAYOUT, 0, 0, statspec, st, ti->tile, INVALID_RAILTYPE); + if (HasBit(statspec->callback_mask, CBM_STATION_DRAW_TILE_LAYOUT)) { + uint16_t callback = GetStationCallback(CBID_STATION_DRAW_TILE_LAYOUT, 0, 0, statspec, st, ti->tile, INVALID_RAILTYPE); if (callback != CALLBACK_FAILED) tile_layout = (callback & ~1) + GetRailStationAxis(ti->tile); } diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h index 4bbbb8afb1..8562b2d941 100644 --- a/src/table/newgrf_debug_data.h +++ b/src/table/newgrf_debug_data.h @@ -750,8 +750,8 @@ static const NIFeature _nif_vehicle = { #define NICS(cb_id, bit) NIC(cb_id, StationSpec, callback_mask, bit) static const NICallback _nic_stations[] = { NICS(CBID_STATION_AVAILABILITY, CBM_STATION_AVAIL), - NICS(CBID_STATION_SPRITE_LAYOUT, CBM_STATION_SPRITE_LAYOUT), - NICS(CBID_STATION_TILE_LAYOUT, CBM_NO_BIT), + NICS(CBID_STATION_DRAW_TILE_LAYOUT, CBM_STATION_DRAW_TILE_LAYOUT), + NICS(CBID_STATION_BUILD_TILE_LAYOUT,CBM_NO_BIT), NICS(CBID_STATION_ANIM_START_STOP, CBM_NO_BIT), NICS(CBID_STATION_ANIM_NEXT_FRAME, CBM_STATION_ANIMATION_NEXT_FRAME), NICS(CBID_STATION_ANIMATION_SPEED, CBM_STATION_ANIMATION_SPEED),