Initial implementation of road waypoints
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "../ship.h"
|
||||
#include "../aircraft.h"
|
||||
#include "../object_map.h"
|
||||
#include "../waypoint_base.h"
|
||||
#include "../string_func_extra.h"
|
||||
|
||||
/* Helper for filling property tables */
|
||||
@@ -1269,6 +1270,27 @@ class NIHStationStruct : public NIHelper {
|
||||
seprintf(buffer, lastof(buffer), " Docking tiles: %X, %u x %u", st->docking_station.tile, st->docking_station.w, st->docking_station.h);
|
||||
output.print(buffer);
|
||||
}
|
||||
const Waypoint *wp = Waypoint::GetIfValid(index);
|
||||
if (wp) {
|
||||
output.register_next_line_click_flag_toggle(1);
|
||||
seprintf(buffer, lastof(buffer), " [%c] flags: 0x%X", output.flags & 1 ? '-' : '+', wp->waypoint_flags);
|
||||
output.print(buffer);
|
||||
if (output.flags & 1) {
|
||||
auto print = [&](const char *name) {
|
||||
seprintf(buffer, lastof(buffer), " %s", name);
|
||||
output.print(buffer);
|
||||
};
|
||||
auto check_flag = [&](WaypointFlags flag, const char *name) {
|
||||
if (HasBit(wp->waypoint_flags, flag)) print(name);
|
||||
};
|
||||
check_flag(WPF_HIDE_LABEL, "WPF_HIDE_LABEL");
|
||||
check_flag(WPF_ROAD, "WPF_ROAD");
|
||||
}
|
||||
|
||||
seprintf(buffer, lastof(buffer), " road_waypoint_area: tile: %X (%u x %u), width: %u, height: %u",
|
||||
wp->road_waypoint_area.tile, TileX(wp->road_waypoint_area.tile), TileY(wp->road_waypoint_area.tile), wp->road_waypoint_area.w, wp->road_waypoint_area.h);
|
||||
output.print(buffer);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -955,6 +955,15 @@ static const DrawTileSprites _station_display_datas_bus[] = {
|
||||
TILE_SPRITE_LINE(SPR_ROAD_PAVED_STRAIGHT_Y, _station_display_datas_0171)
|
||||
};
|
||||
|
||||
static const DrawTileSprites _station_display_datas_road_waypoint[] = {
|
||||
TILE_SPRITE_LINE(SPR_BUS_STOP_NE_GROUND | (1U << PALETTE_MODIFIER_COLOUR), _station_display_datas_71)
|
||||
TILE_SPRITE_LINE(SPR_BUS_STOP_SE_GROUND | (1U << PALETTE_MODIFIER_COLOUR), _station_display_datas_72)
|
||||
TILE_SPRITE_LINE(SPR_BUS_STOP_SW_GROUND | (1U << PALETTE_MODIFIER_COLOUR), _station_display_datas_73)
|
||||
TILE_SPRITE_LINE(SPR_BUS_STOP_NW_GROUND | (1U << PALETTE_MODIFIER_COLOUR), _station_display_datas_74)
|
||||
TILE_SPRITE_LINE(SPR_ROAD_PAVED_STRAIGHT_X, _station_display_datas_0170)
|
||||
TILE_SPRITE_LINE(SPR_ROAD_PAVED_STRAIGHT_Y, _station_display_datas_0171)
|
||||
};
|
||||
|
||||
static const DrawTileSprites _station_display_datas_oilrig[] = {
|
||||
TILE_SPRITE_LINE(SPR_FLAT_WATER_TILE, _station_display_nothing)
|
||||
};
|
||||
@@ -999,4 +1008,5 @@ static const DrawTileSprites * const _station_display_datas[] = {
|
||||
_station_display_datas_dock,
|
||||
_station_display_datas_buoy,
|
||||
_station_display_datas_waypoint,
|
||||
_station_display_datas_road_waypoint,
|
||||
};
|
||||
|
Reference in New Issue
Block a user