Translations update
[openttd/fttd.git] / src / newgrf_debug.h
blob49bc77d89d2590eb4c3dee4ea5fa427d5a19bac8
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
10 /** @file newgrf_debug.h Functions/types related to NewGRF debugging. */
12 #ifndef NEWGRF_DEBUG_H
13 #define NEWGRF_DEBUG_H
15 #include "newgrf.h"
16 #include "core/smallvec_type.hpp"
17 #include "map/coord.h"
18 #include "vehicle_type.h"
20 /** Current state of spritepicker */
21 enum NewGrfDebugSpritePickerMode {
22 SPM_NONE,
23 SPM_WAIT_CLICK,
24 SPM_REDRAW,
27 /** Spritepicker of SpriteAligner */
28 struct NewGrfDebugSpritePicker {
29 NewGrfDebugSpritePickerMode mode; ///< Current state
30 void *clicked_pixel; ///< Clicked pixel (pointer to blitter buffer)
31 uint32 click_time; ///< Realtime tick when clicked to detect next frame
32 SmallVector<SpriteID, 256> sprites; ///< Sprites found
35 extern NewGrfDebugSpritePicker _newgrf_debug_sprite_picker;
37 bool IsNewGRFInspectable(GrfSpecFeature feature, uint index);
38 void ShowNewGRFInspectWindow(GrfSpecFeature feature, uint index, const uint32 grfid = 0);
39 void InvalidateNewGRFInspectWindow(GrfSpecFeature feature, uint index);
40 void DeleteNewGRFInspectWindow(GrfSpecFeature feature, uint index);
42 GrfSpecFeature GetGrfSpecFeature(TileIndex tile);
43 GrfSpecFeature GetGrfSpecFeature(VehicleType type);
45 void ShowSpriteAlignerWindow();
47 #endif /* NEWGRF_DEBUG_H */