OpenTTD Source: src/newgrf_debug.h Source File

OpenTTD Source 14.0-beta1

newgrf_debug.h
Go to the documentation of this file.
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
7
10 #ifndef NEWGRF_DEBUG_H
11 #define NEWGRF_DEBUG_H
12
13 #include "newgrf.h"
14 #include "tile_type.h"
15 #include "vehicle_type.h"
16
18 enum NewGrfDebugSpritePickerMode {
19 SPM_NONE,
20 SPM_WAIT_CLICK,
21 SPM_REDRAW,
22 };
23
25 struct NewGrfDebugSpritePicker {
26 NewGrfDebugSpritePickerMode mode;
27 void *clicked_pixel;
28 std::vector<SpriteID> sprites;
29 };
30
31 extern NewGrfDebugSpritePicker _newgrf_debug_sprite_picker;
32
33 bool IsNewGRFInspectable(GrfSpecFeature feature, uint index);
34 void ShowNewGRFInspectWindow(GrfSpecFeature feature, uint index, const uint32_t grfid = 0);
35 void InvalidateNewGRFInspectWindow(GrfSpecFeature feature, uint index);
36 void DeleteNewGRFInspectWindow(GrfSpecFeature feature, uint index);
37
38 GrfSpecFeature GetGrfSpecFeature(TileIndex tile);
39 GrfSpecFeature GetGrfSpecFeature(VehicleType type);
40
41 void ShowSpriteAlignerWindow();
42
43 #endif /* NEWGRF_DEBUG_H */
NewGrfDebugSpritePicker::clicked_pixel
void * clicked_pixel
Clicked pixel (pointer to blitter buffer)
Definition: newgrf_debug.h:27
ShowSpriteAlignerWindow
void ShowSpriteAlignerWindow()
Show the window for aligning sprites.
Definition: newgrf_debug_gui.cpp:1173
DeleteNewGRFInspectWindow
void DeleteNewGRFInspectWindow(GrfSpecFeature feature, uint index)
Delete inspect window for a given feature and index.
Definition: newgrf_debug_gui.cpp:739
NewGrfDebugSpritePickerMode
NewGrfDebugSpritePickerMode
Current state of spritepicker.
Definition: newgrf_debug.h:18
_newgrf_debug_sprite_picker
NewGrfDebugSpritePicker _newgrf_debug_sprite_picker
The sprite picker.
Definition: newgrf_debug_gui.cpp:49
NewGrfDebugSpritePicker::sprites
std::vector< SpriteID > sprites
Sprites found.
Definition: newgrf_debug.h:28
NewGrfDebugSpritePicker::mode
NewGrfDebugSpritePickerMode mode
Current state.
Definition: newgrf_debug.h:26
InvalidateNewGRFInspectWindow
void InvalidateNewGRFInspectWindow(GrfSpecFeature feature, uint index)
Invalidate the inspect window for a given feature and index.
Definition: newgrf_debug_gui.cpp:723
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > >
ShowNewGRFInspectWindow
void ShowNewGRFInspectWindow(GrfSpecFeature feature, uint index, const uint32_t grfid=0)
Show the inspect window for a given feature and index.
Definition: newgrf_debug_gui.cpp:705
GetGrfSpecFeature
GrfSpecFeature GetGrfSpecFeature(TileIndex tile)
Get the GrfSpecFeature associated with the tile.
Definition: newgrf_debug_gui.cpp:773
VehicleType
VehicleType
Available vehicle types.
Definition: vehicle_type.h:21
GrfSpecFeature
GrfSpecFeature
Definition: newgrf.h:66
NewGrfDebugSpritePicker
Spritepicker of SpriteAligner.
Definition: newgrf_debug.h:25
vehicle_type.h
tile_type.h
newgrf.h
IsNewGRFInspectable
bool IsNewGRFInspectable(GrfSpecFeature feature, uint index)
Can we inspect the data given a certain feature and index.
Definition: newgrf_debug_gui.cpp:761