newgrf_debug.h File Reference

Functions/types related to NewGRF debugging. More...

#include "newgrf.h"
#include "core/smallvec_type.hpp"
#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 { 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.
void ShowNewGRFInspectWindow (GrfSpecFeature feature, uint index)
 Show the inspect window for a given feature and index.
void DeleteNewGRFInspectWindow (GrfSpecFeature feature, uint index)
 Delete inspect window for a given feature and 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

Detailed Description

Functions/types related to NewGRF debugging.

Definition in file newgrf_debug.h.


Function Documentation

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.

Parameters:
feature The feature we want to delete the window for.
index The index/identifier of the feature to delete.

Definition at line 498 of file newgrf_debug_gui.cpp.

References DeleteWindowById(), FindWindowById(), GetInspectWindowNumber(), GSF_INVALID, and Window::ReInit().

Referenced by CmdRemoveSingleRail(), DoClearTownHouseHelper(), ReallyClearObjectTile(), RemoveAirport(), RemoveFromRailBaseStation(), RemoveRailStation(), Town::~Town(), and Vehicle::~Vehicle().

GrfSpecFeature GetGrfSpecFeature ( VehicleType  type  ) 

Get the GrfSpecFeature associated with the vehicle.

Returns:
the GrfSpecFeature.

Definition at line 536 of file newgrf_debug_gui.cpp.

References GSF_INVALID, VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, and VEH_TRAIN.

GrfSpecFeature GetGrfSpecFeature ( TileIndex  tile  ) 
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.

Parameters:
feature The feature we want to inspect.
index The index/identifier of the feature to inspect.
Returns:
true if there is something to show.

Definition at line 510 of file newgrf_debug_gui.cpp.

References GetFeature(), GetInspectWindowNumber(), NIFeature::helper, and NIHelper::IsInspectable().

Referenced by VehicleViewWindow::IsNewGRFInspectable(), and ShowNewGRFInspectWindow().

void ShowNewGRFInspectWindow ( GrfSpecFeature  feature,
uint  index 
)

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.

Parameters:
feature The feature we want to inspect.
index The index/identifier of the feature to inspect.

Definition at line 490 of file newgrf_debug_gui.cpp.

References GetInspectWindowNumber(), and IsNewGRFInspectable().

Referenced by VehicleViewWindow::ShowNewGRFInspectWindow().


Generated on Sun Jan 9 16:02:10 2011 for OpenTTD by  doxygen 1.6.1