src/newgrf_cargo.h
author skidd13
Tue, 20 Nov 2007 14:11:19 +0000
changeset 8428 f8300c908bd9
parent 8213 fc7a2b3164dd
child 6872 1c4a4a609f85
child 8517 80ef931323f5
child 9723 eee46cb39750
permissions -rw-r--r--
(svn r11485) -Codechange: Remove the doubled function ToggleBitT and rename the remaining to fit with the naming style
3866
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
     1
/* $Id$ */
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
     2
6674
64f4781b4653 (svn r9385) -Cleanup: doxygen changes. Today, we are exploring the letter N.
belugas
parents: 6474
diff changeset
     3
/** @file newgrf_cargo.h */
64f4781b4653 (svn r9385) -Cleanup: doxygen changes. Today, we are exploring the letter N.
belugas
parents: 6474
diff changeset
     4
3866
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
     5
#ifndef NEWGRF_CARGO_H
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
     6
#define NEWGRF_CARGO_H
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
     7
7823
cad4dec2b899 (svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer.
rubidium
parents: 7695
diff changeset
     8
#include "newgrf_callbacks.h"
cad4dec2b899 (svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer.
rubidium
parents: 7695
diff changeset
     9
3866
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    10
enum {
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    11
	CC_NOAVAILABLE  = 0,
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    12
	CC_PASSENGERS   = 1 << 0,
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    13
	CC_MAIL         = 1 << 1,
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    14
	CC_EXPRESS      = 1 << 2,
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    15
	CC_ARMOURED     = 1 << 3,
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    16
	CC_BULK         = 1 << 4,
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    17
	CC_PIECE_GOODS  = 1 << 5,
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    18
	CC_LIQUID       = 1 << 6,
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    19
	CC_REFRIGERATED = 1 << 7,
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    20
};
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    21
6474
24e7ceeb25f5 (svn r8891) -Codechange: Remove remains of global cargo scheme. All cargo mapping is now dealt with only in NewGRF code, on load where possible.
peter1138
parents: 6439
diff changeset
    22
static const CargoID CT_DEFAULT      = NUM_CARGO + 0;
24e7ceeb25f5 (svn r8891) -Codechange: Remove remains of global cargo scheme. All cargo mapping is now dealt with only in NewGRF code, on load where possible.
peter1138
parents: 6439
diff changeset
    23
static const CargoID CT_PURCHASE     = NUM_CARGO + 1;
24e7ceeb25f5 (svn r8891) -Codechange: Remove remains of global cargo scheme. All cargo mapping is now dealt with only in NewGRF code, on load where possible.
peter1138
parents: 6439
diff changeset
    24
static const CargoID CT_DEFAULT_NA   = NUM_CARGO + 2;
3866
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    25
6956
0d884da2fd1c (svn r9620) -Codechange: apply cargo translation table to newstation variables 0x60..0x65
peter1138
parents: 6697
diff changeset
    26
/* Forward declarations of structs used */
6697
a58fd5043165 (svn r9434) -Fix (r9418): remove typedef from forward declaration to appease MSVC or something
peter1138
parents: 6691
diff changeset
    27
struct CargoSpec;
6956
0d884da2fd1c (svn r9620) -Codechange: apply cargo translation table to newstation variables 0x60..0x65
peter1138
parents: 6697
diff changeset
    28
struct GRFFile;
6691
e8c27a509894 (svn r9418) -Codechange: Implement actions 1/2/3 for cargos, callback handler and custom icon sprites
peter1138
parents: 6674
diff changeset
    29
e8c27a509894 (svn r9418) -Codechange: Implement actions 1/2/3 for cargos, callback handler and custom icon sprites
peter1138
parents: 6674
diff changeset
    30
SpriteID GetCustomCargoSprite(const CargoSpec *cs);
7823
cad4dec2b899 (svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer.
rubidium
parents: 7695
diff changeset
    31
uint16 GetCargoCallback(CallbackID callback, uint32 param1, uint32 param2, const CargoSpec *cs);
8213
fc7a2b3164dd (svn r11252) -Revert r11239, Fix r9620: cargo translation was not done correctly
glx
parents: 7823
diff changeset
    32
CargoID GetCargoTranslation(uint8 cargo, const GRFFile *grffile, bool usebit = false);
7695
b15538ba7152 (svn r10477) -Codechange: add some callbacks to customise the acceptance of industries.
rubidium
parents: 6956
diff changeset
    33
uint8 GetReverseCargoTranslation(CargoID cargo, const GRFFile *grffile);
6691
e8c27a509894 (svn r9418) -Codechange: Implement actions 1/2/3 for cargos, callback handler and custom icon sprites
peter1138
parents: 6674
diff changeset
    34
3866
113de2b20059 (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
diff changeset
    35
#endif /* NEWGRF_CARGO_H */