# newgrf_debug.h

Go to the documentation of this file.

    00001 /* $Id: newgrf_debug.h 25946 2013-11-07 18:17:21Z frosch $ */
    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
    00037 bool IsNewGRFInspectable(GrfSpecFeature feature, uint index);
    00038 void ShowNewGRFInspectWindow(GrfSpecFeature feature, uint index, const uint32 grfid = 0);
    00039 void InvalidateNewGRFInspectWindow(GrfSpecFeature feature, uint index);
    00040 void DeleteNewGRFInspectWindow(GrfSpecFeature feature, uint index);
    00041
    00042 GrfSpecFeature GetGrfSpecFeature(TileIndex tile);
    00043 GrfSpecFeature GetGrfSpecFeature(VehicleType type);
    00044
    00045 void ShowSpriteAlignerWindow();
    00046
    00047 #endif /* NEWGRF_DEBUG_H */