00001 /* $Id: newgrf_debug.h 20409 2010-08-08 09:07:40Z rubidium $ */ 00002 00003 /* 00004 * This file is part of OpenTTD. 00005 * 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. 00006 * 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. 00007 * 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/>. 00008 */ 00009 00012 #ifndef NEWGRF_DEBUG_H 00013 #define NEWGRF_DEBUG_H 00014 00015 #include "newgrf.h" 00016 #include "core/smallvec_type.hpp" 00017 #include "tile_type.h" 00018 #include "vehicle_type.h" 00019 00021 enum NewGrfDebugSpritePickerMode { 00022 SPM_NONE, 00023 SPM_WAIT_CLICK, 00024 SPM_REDRAW, 00025 }; 00026 00028 struct NewGrfDebugSpritePicker { 00029 NewGrfDebugSpritePickerMode mode; 00030 void *clicked_pixel; 00031 uint32 click_time; 00032 SmallVector<SpriteID, 256> sprites; 00033 }; 00034 00035 extern NewGrfDebugSpritePicker _newgrf_debug_sprite_picker; 00036 00046 bool IsNewGRFInspectable(GrfSpecFeature feature, uint index); 00047 00056 void ShowNewGRFInspectWindow(GrfSpecFeature feature, uint index); 00057 00066 void DeleteNewGRFInspectWindow(GrfSpecFeature feature, uint index); 00067 00072 GrfSpecFeature GetGrfSpecFeature(TileIndex tile); 00073 00078 GrfSpecFeature GetGrfSpecFeature(VehicleType type); 00079 00083 void ShowSpriteAlignerWindow(); 00084 00085 #endif /* NEWGRF_DEBUG_H */