# newgrf_airporttiles.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 NEWGRF_AIRPORTTILES_H
    00013 #define NEWGRF_AIRPORTTILES_H
    00014
    00015 #include "airport.h"
    00016 #include "station_map.h"
    00017 #include "newgrf_animation_type.h"
    00018 #include "newgrf_commons.h"
    00019
    00023 struct AirportTileSpec {
    00024   AnimationInfo animation;
    00025   StringID name;
    00026   uint8 callback_mask;
    00027   uint8 animation_special_flags;
    00028   bool enabled;
    00029   GRFFileProps grf_prop;
    00030
    00031   static const AirportTileSpec *Get(StationGfx gfx);
    00032   static const AirportTileSpec *GetByTile(TileIndex tile);
    00033
    00034   static void ResetAirportTiles();
    00035
    00036 private:
    00037   static AirportTileSpec tiles[NUM_AIRPORTTILES];
    00038
    00039   friend void AirportTileOverrideManager::SetEntitySpec(const AirportTileSpec *airpts);
    00040 };
    00041
    00042 StationGfx GetTranslatedAirportTileID(StationGfx gfx);
    00043 void AnimateAirportTile(TileIndex tile);
    00044 void AirportTileAnimationTrigger(Station *st, TileIndex tile, AirpAnimationTrigger trigger, CargoID cargo_type = CT_INVALID);
    00045 void AirportAnimationTrigger(Station *st, AirpAnimationTrigger trigger, CargoID cargo_type = CT_INVALID);
    00046 bool DrawNewAirportTile(TileInfo *ti, Station *st, StationGfx gfx, const AirportTileSpec *airts);
    00047
    00048 #endif /* NEWGRF_AIRPORTTILES_H */