# newgrf_cargo.h

Go to the documentation of this file.

    00001 /* $Id: newgrf_cargo.h 15027 2009-01-12 17:11:45Z truebrain $ */
    00002
    00005 #ifndef NEWGRF_CARGO_H
    00006 #define NEWGRF_CARGO_H
    00007
    00008 #include "newgrf_callbacks.h"
    00009 #include "cargo_type.h"
    00010 #include "gfx_type.h"
    00011
    00012 enum CargoClass {
    00013   CC_NOAVAILABLE  = 0,
    00014   CC_PASSENGERS   = 1 <<  0,
    00015   CC_MAIL         = 1 <<  1,
    00016   CC_EXPRESS      = 1 <<  2,
    00017   CC_ARMOURED     = 1 <<  3,
    00018   CC_BULK         = 1 <<  4,
    00019   CC_PIECE_GOODS  = 1 <<  5,
    00020   CC_LIQUID       = 1 <<  6,
    00021   CC_REFRIGERATED = 1 <<  7,
    00022   CC_HAZARDOUS    = 1 <<  8,
    00023   CC_COVERED      = 1 <<  9,
    00024   CC_SPECIAL      = 1 << 15
    00025 };
    00026
    00027 static const CargoID CT_DEFAULT      = NUM_CARGO + 0;
    00028 static const CargoID CT_PURCHASE     = NUM_CARGO + 1;
    00029 static const CargoID CT_DEFAULT_NA   = NUM_CARGO + 2;
    00030
    00031 /* Forward declarations of structs used */
    00032 struct CargoSpec;
    00033 struct GRFFile;
    00034
    00035 SpriteID GetCustomCargoSprite(const CargoSpec *cs);
    00036 uint16 GetCargoCallback(CallbackID callback, uint32 param1, uint32 param2, const CargoSpec *cs);
    00037 CargoID GetCargoTranslation(uint8 cargo, const GRFFile *grffile, bool usebit = false);
    00038 uint8 GetReverseCargoTranslation(CargoID cargo, const GRFFile *grffile);
    00039
    00040 #endif /* NEWGRF_CARGO_H */