newgrf_generic.h

Go to the documentation of this file.
00001 /* $Id: newgrf_generic.h 18809 2010-01-15 16:41:15Z 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_GENERIC_H
00013 #define NEWGRF_GENERIC_H
00014 
00015 #include "cargo_type.h"
00016 #include "industry_type.h"
00017 
00018 enum AIConstructionEvent {
00019   AICE_TRAIN_CHECK_RAIL_ENGINE     = 0x00, 
00020   AICE_TRAIN_CHECK_ELRAIL_ENGINE   = 0x01,
00021   AICE_TRAIN_CHECK_MONORAIL_ENGINE = 0x02,
00022   AICE_TRAIN_CHECK_MAGLEV_ENGINE   = 0x03,
00023   AICE_TRAIN_GET_RAIL_WAGON        = 0x08,
00024   AICE_TRAIN_GET_ELRAIL_WAGON      = 0x09,
00025   AICE_TRAIN_GET_MONORAIL_WAGON    = 0x0A,
00026   AICE_TRAIN_GET_MAGLEV_WAGON      = 0x0B,
00027   AICE_TRAIN_GET_RAILTYPE          = 0x0F,
00028 
00029   AICE_ROAD_CHECK_ENGINE           = 0x00, 
00030   AICE_ROAD_GET_FIRST_ENGINE       = 0x01, 
00031   AICE_ROAD_GET_NUMBER_ENGINES     = 0x02, 
00032 
00033   AICE_SHIP_CHECK_ENGINE           = 0x00, 
00034   AICE_SHIP_GET_FIRST_ENGINE       = 0x01, 
00035   AICE_SHIP_GET_NUMBER_ENGINES     = 0x02, 
00036 
00037   AICE_AIRCRAFT_CHECK_ENGINE       = 0x00, 
00038 
00039   AICE_STATION_GET_STATION_ID      = 0x00, 
00040 };
00041 
00042 void ResetGenericCallbacks();
00043 void AddGenericCallback(uint8 feature, const struct GRFFile *file, const struct SpriteGroup *group);
00044 
00045 uint16 GetAiPurchaseCallbackResult(uint8 feature, CargoID cargo_type, uint8 default_selection, IndustryType src_industry, IndustryType dst_industry, uint8 distance, AIConstructionEvent event, uint8 count, uint8 station_size, const struct GRFFile **file);
00046 
00047 #endif /* NEWGRF_GENERIC_H */

Generated on Sat Jul 17 18:43:20 2010 for OpenTTD by  doxygen 1.6.1