|
OpenTTD Source 20251117-master-g7398d2e290
|
Functions/types related to NewGRF debugging. More...
#include "core/flatset_type.hpp"#include "newgrf.h"#include "tile_type.h"#include "vehicle_type.h"Go to the source code of this file.
Data Structures | |
| struct | NewGrfDebugSpritePicker |
| Spritepicker of SpriteAligner. More... | |
Enumerations | |
| enum | NewGrfDebugSpritePickerMode : uint8_t { SPM_NONE , SPM_WAIT_CLICK , SPM_REDRAW } |
| Current state of spritepicker. More... | |
Functions | |
| bool | IsNewGRFInspectable (GrfSpecFeature feature, uint index) |
| Can we inspect the data given a certain feature and index. | |
| void | ShowNewGRFInspectWindow (GrfSpecFeature feature, uint index, const uint32_t grfid=0) |
| Show the inspect window for a given feature and index. | |
| void | InvalidateNewGRFInspectWindow (GrfSpecFeature feature, uint index) |
| Invalidate the inspect window for a given feature and index. | |
| void | InvalidateNewGRFInspectWindow (GrfSpecFeature feature, ConvertibleThroughBase auto index) |
| void | DeleteNewGRFInspectWindow (GrfSpecFeature feature, uint index) |
| Delete inspect window for a given feature and index. | |
| void | DeleteNewGRFInspectWindow (GrfSpecFeature feature, ConvertibleThroughBase auto index) |
| GrfSpecFeature | GetGrfSpecFeature (TileIndex tile) |
| Get the GrfSpecFeature associated with the tile. | |
| GrfSpecFeature | GetGrfSpecFeature (VehicleType type) |
| Get the GrfSpecFeature associated with the vehicle. | |
| void | ShowSpriteAlignerWindow () |
| Show the window for aligning sprites. | |
Variables | |
| NewGrfDebugSpritePicker | _newgrf_debug_sprite_picker |
| The sprite picker. | |
Functions/types related to NewGRF debugging.
Definition in file newgrf_debug.h.
| enum NewGrfDebugSpritePickerMode : uint8_t |
Current state of spritepicker.
Definition at line 19 of file newgrf_debug.h.
| void DeleteNewGRFInspectWindow | ( | GrfSpecFeature | feature, |
| ConvertibleThroughBase auto | index | ||
| ) |
Definition at line 39 of file newgrf_debug.h.
| void DeleteNewGRFInspectWindow | ( | GrfSpecFeature | feature, |
| uint | index | ||
| ) |
Delete inspect window for a given feature and index.
The index is normally an in-game location/identifier, such as a TileIndex or an IndustryID depending on the feature we want to inspect.
| feature | The feature we want to delete the window for. |
| index | The index/identifier of the feature to delete. |
Definition at line 726 of file newgrf_debug_gui.cpp.
References CloseWindowById(), GetInspectWindowNumber(), GSF_INVALID, InvalidateWindowData(), WC_LAND_INFO, and WC_NEWGRF_INSPECT.
Referenced by CmdMoveRailVehicle(), CmdRemoveSingleRail(), DoClearTownHouseHelper(), ReallyClearObjectTile(), RemoveAirport(), RemoveFromRailBaseStation(), RemoveRoadStop(), RemoveRoadWaypointStop(), Town::~Town(), and Vehicle::~Vehicle().
| GrfSpecFeature GetGrfSpecFeature | ( | TileIndex | tile | ) |
Get the GrfSpecFeature associated with the tile.
| tile | The tile to get the feature from. |
Definition at line 760 of file newgrf_debug_gui.cpp.
References GetStationType(), GetTileType(), GSF_INVALID, IsLevelCrossing(), MP_HOUSE, MP_INDUSTRY, MP_OBJECT, MP_RAILWAY, MP_ROAD, and MP_STATION.
Referenced by NIHVehicle::GetParent(), LandInfoWindow::IsNewGRFInspectable(), VehicleViewWindow::IsNewGRFInspectable(), LandInfoWindow::ShowNewGRFInspectWindow(), VehicleViewWindow::ShowNewGRFInspectWindow(), and Vehicle::~Vehicle().
| GrfSpecFeature GetGrfSpecFeature | ( | VehicleType | type | ) |
Get the GrfSpecFeature associated with the vehicle.
| type | The vehicle type to get the feature from. |
Definition at line 786 of file newgrf_debug_gui.cpp.
References GSF_INVALID, VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, and VEH_TRAIN.
| void InvalidateNewGRFInspectWindow | ( | GrfSpecFeature | feature, |
| ConvertibleThroughBase auto | index | ||
| ) |
Definition at line 37 of file newgrf_debug.h.
| void InvalidateNewGRFInspectWindow | ( | GrfSpecFeature | feature, |
| uint | index | ||
| ) |
Invalidate the inspect window for a given feature and index.
The index is normally an in-game location/identifier, such as a TileIndex or an IndustryID depending on the feature we want to inspect.
| feature | The feature we want to invalidate the window for. |
| index | The index/identifier of the feature to invalidate. |
Definition at line 710 of file newgrf_debug_gui.cpp.
References GetInspectWindowNumber(), GSF_INVALID, InvalidateWindowData(), and WC_NEWGRF_INSPECT.
Referenced by Train::ConsistChanged().
| bool IsNewGRFInspectable | ( | GrfSpecFeature | feature, |
| uint | index | ||
| ) |
Can we inspect the data given a certain feature and index.
The index is normally an in-game location/identifier, such as a TileIndex or an IndustryID depending on the feature we want to inspect.
| feature | The feature we want to inspect. |
| index | The index/identifier of the feature to inspect. |
Definition at line 748 of file newgrf_debug_gui.cpp.
References GetFeature(), GetInspectWindowNumber(), and NIFeature::helper.
Referenced by ShowNewGRFInspectWindow().
| void ShowNewGRFInspectWindow | ( | GrfSpecFeature | feature, |
| uint | index, | ||
| const uint32_t | grfid | ||
| ) |
Show the inspect window for a given feature and index.
The index is normally an in-game location/identifier, such as a TileIndex or an IndustryID depending on the feature we want to inspect.
| feature | The feature we want to inspect. |
| index | The index/identifier of the feature to inspect. |
| grfid | GRFID of the item opening this window, or 0 if not opened by other window. |
Definition at line 692 of file newgrf_debug_gui.cpp.
References GetInspectWindowNumber(), IsNewGRFInspectable(), and NewGRFInspectWindow::SetCallerGRFID().
| void ShowSpriteAlignerWindow | ( | ) |
Show the window for aligning sprites.
Definition at line 1202 of file newgrf_debug_gui.cpp.
Referenced by MenuClickHelp().
|
extern |
The sprite picker.
Definition at line 53 of file newgrf_debug_gui.cpp.
Referenced by SpriteAlignerWindow::DrawWidget(), GfxBlitter(), HandleMouseEvents(), SpriteAlignerWindow::OnClick(), SpriteAlignerWindow::OnInvalidateData(), and UpdateWindows().