OpenTTD Source
20241120-master-g6d3adc6169
|
Functions/types related to NewGRF debugging. More...
Go to the source code of this file.
Data Structures | |
struct | NewGrfDebugSpritePicker |
Spritepicker of SpriteAligner. More... | |
Enumerations | |
enum | NewGrfDebugSpritePickerMode { SPM_NONE , SPM_WAIT_CLICK , SPM_REDRAW } |
Current state of spritepicker. | |
Functions | |
bool | IsNewGRFInspectable (GrfSpecFeature feature, uint index) |
Can we inspect the data given a certain feature and index. More... | |
void | ShowNewGRFInspectWindow (GrfSpecFeature feature, uint index, const uint32_t grfid=0) |
Show the inspect window for a given feature and index. More... | |
void | InvalidateNewGRFInspectWindow (GrfSpecFeature feature, uint index) |
Invalidate the inspect window for a given feature and index. More... | |
void | DeleteNewGRFInspectWindow (GrfSpecFeature feature, uint index) |
Delete inspect window for a given feature and index. More... | |
GrfSpecFeature | GetGrfSpecFeature (TileIndex tile) |
Get the GrfSpecFeature associated with the tile. More... | |
GrfSpecFeature | GetGrfSpecFeature (VehicleType type) |
Get the GrfSpecFeature associated with the vehicle. More... | |
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.
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 729 of file newgrf_debug_gui.cpp.
References CloseWindowById(), GetInspectWindowNumber(), GSF_INVALID, InvalidateWindowData(), WC_LAND_INFO, and WC_NEWGRF_INSPECT.
Referenced by ReallyClearObjectTile(), and Town::~Town().
GrfSpecFeature GetGrfSpecFeature | ( | TileIndex | tile | ) |
Get the GrfSpecFeature associated with the tile.
tile | The tile to get the feature from. |
Definition at line 763 of file newgrf_debug_gui.cpp.
References GetTileType(), GSF_INVALID, and MP_RAILWAY.
Referenced by NIHVehicle::GetParent(), LandInfoWindow::IsNewGRFInspectable(), VehicleViewWindow::IsNewGRFInspectable(), LandInfoWindow::ShowNewGRFInspectWindow(), and VehicleViewWindow::ShowNewGRFInspectWindow().
GrfSpecFeature GetGrfSpecFeature | ( | VehicleType | type | ) |
Get the GrfSpecFeature associated with the vehicle.
type | The vehicle type to get the feature from. |
Definition at line 789 of file newgrf_debug_gui.cpp.
References VEH_TRAIN.
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 713 of file newgrf_debug_gui.cpp.
References GetInspectWindowNumber(), GSF_INVALID, InvalidateWindowData(), and WC_NEWGRF_INSPECT.
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 751 of file newgrf_debug_gui.cpp.
References GetFeature(), GetInspectWindowNumber(), NIFeature::helper, and NIHelper::IsInspectable().
Referenced by IndustryViewWindow::IsNewGRFInspectable(), LandInfoWindow::IsNewGRFInspectable(), VehicleViewWindow::IsNewGRFInspectable(), and 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 695 of file newgrf_debug_gui.cpp.
References GetInspectWindowNumber(), and IsNewGRFInspectable().