# newgrf_generic.h

    00001 /* $Id: newgrf_generic.h 12122 2008-02-12 13:23:57Z peter1138 $ */
    00002
    00003 #ifndef NEWGRF_GENERIC_H
    00004 #define NEWGRF_GENERIC_H
    00005
    00006 enum AIConstructionEvent {
    00007   AICE_TRAIN_CHECK_RAIL_ENGINE     = 0x00,
    00008   AICE_TRAIN_CHECK_ELRAIL_ENGINE   = 0x01,
    00009   AICE_TRAIN_CHECK_MONORAIL_ENGINE = 0x02,
    00010   AICE_TRAIN_CHECK_MAGLEV_ENGINE   = 0x03,
    00011   AICE_TRAIN_GET_RAIL_WAGON        = 0x08,
    00012   AICE_TRAIN_GET_ELRAIL_WAGON      = 0x09,
    00013   AICE_TRAIN_GET_MONORAIL_WAGON    = 0x0A,
    00014   AICE_TRAIN_GET_MAGLEV_WAGON      = 0x0B,
    00015   AICE_TRAIN_GET_RAILTYPE          = 0x0F,
    00016
    00017   AICE_ROAD_CHECK_ENGINE           = 0x00,
    00018   AICE_ROAD_GET_FIRST_ENGINE       = 0x01,
    00019   AICE_ROAD_GET_NUMBER_ENGINES     = 0x02,
    00020
    00021   AICE_SHIP_CHECK_ENGINE           = 0x00,
    00022   AICE_SHIP_GET_FIRST_ENGINE       = 0x01,
    00023   AICE_SHIP_GET_NUMBER_ENGINES     = 0x02,
    00024
    00025   AICE_AIRCRAFT_CHECK_ENGINE       = 0x00,
    00026
    00027   AICE_STATION_GET_STATION_ID      = 0x00,
    00028 };
    00029
    00030 void ResetGenericCallbacks();
    00031 void AddGenericCallback(uint8 feature, const struct GRFFile *file, const struct SpriteGroup *group);
    00032
    00033 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);
    00034
    00035 #endif /* NEWGRF_GENERIC_H */