# zoom_type.h

Go to the documentation of this file.

    00001 /* $Id$ */
    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 ZOOM_TYPE_H
    00013 #define ZOOM_TYPE_H
    00014
    00015 #include "core/enum_type.hpp"
    00016
    00017 enum ZoomLevel {
    00018   /* Our possible zoom-levels */
    00019   ZOOM_LVL_BEGIN  = 0,
    00020   ZOOM_LVL_NORMAL = 0,
    00021   ZOOM_LVL_OUT_2X,
    00022   ZOOM_LVL_OUT_4X,
    00023   ZOOM_LVL_OUT_8X,
    00024   ZOOM_LVL_END,
    00025
    00026   /* Number of zoom levels */
    00027   ZOOM_LVL_COUNT = ZOOM_LVL_END - ZOOM_LVL_BEGIN,
    00028
    00029   /* Here we define in which zoom viewports are */
    00030   ZOOM_LVL_VIEWPORT = ZOOM_LVL_NORMAL,
    00031   ZOOM_LVL_NEWS     = ZOOM_LVL_NORMAL,
    00032   ZOOM_LVL_INDUSTRY = ZOOM_LVL_OUT_2X,
    00033   ZOOM_LVL_TOWN     = ZOOM_LVL_OUT_2X,
    00034   ZOOM_LVL_AIRCRAFT = ZOOM_LVL_NORMAL,
    00035   ZOOM_LVL_SHIP     = ZOOM_LVL_NORMAL,
    00036   ZOOM_LVL_TRAIN    = ZOOM_LVL_NORMAL,
    00037   ZOOM_LVL_ROADVEH  = ZOOM_LVL_NORMAL,
    00038   ZOOM_LVL_WORLD_SCREENSHOT = ZOOM_LVL_NORMAL,
    00039
    00040   ZOOM_LVL_DETAIL   = ZOOM_LVL_OUT_2X,
    00041
    00042   ZOOM_LVL_MIN      = ZOOM_LVL_NORMAL,
    00043   ZOOM_LVL_MAX      = ZOOM_LVL_OUT_8X,
    00044 };
    00045 DECLARE_POSTFIX_INCREMENT(ZoomLevel)
    00046
    00047 typedef SimpleTinyEnumT<ZoomLevel, byte> ZoomLevelByte;
    00048
    00049 #endif /* ZOOM_TYPE_H */