Fix: Violation of strict weak ordering in engine name sorter
[openttd-github.git] / src / newgrf_debug.h
blob1679e17eeeb0c77ee716a32f7948135f71d13729
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 */
8 /** @file newgrf_debug.h Functions/types related to NewGRF debugging. */
10 #ifndef NEWGRF_DEBUG_H
11 #define NEWGRF_DEBUG_H
13 #include "newgrf.h"
14 #include "core/smallvec_type.hpp"
15 #include "tile_type.h"
16 #include "vehicle_type.h"
18 /** Current state of spritepicker */
19 enum NewGrfDebugSpritePickerMode {
20 SPM_NONE,
21 SPM_WAIT_CLICK,
22 SPM_REDRAW,
25 /** Spritepicker of SpriteAligner */
26 struct NewGrfDebugSpritePicker {
27 NewGrfDebugSpritePickerMode mode; ///< Current state
28 void *clicked_pixel; ///< Clicked pixel (pointer to blitter buffer)
29 uint32 click_time; ///< Realtime tick when clicked to detect next frame
30 std::vector<SpriteID> sprites; ///< Sprites found
33 extern NewGrfDebugSpritePicker _newgrf_debug_sprite_picker;
35 bool IsNewGRFInspectable(GrfSpecFeature feature, uint index);
36 void ShowNewGRFInspectWindow(GrfSpecFeature feature, uint index, const uint32 grfid = 0);
37 void InvalidateNewGRFInspectWindow(GrfSpecFeature feature, uint index);
38 void DeleteNewGRFInspectWindow(GrfSpecFeature feature, uint index);
40 GrfSpecFeature GetGrfSpecFeature(TileIndex tile);
41 GrfSpecFeature GetGrfSpecFeature(VehicleType type);
43 void ShowSpriteAlignerWindow();
45 #endif /* NEWGRF_DEBUG_H */