diff options
author | alberth <alberth@openttd.org> | 2009-12-05 21:39:28 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-12-05 21:39:28 +0000 |
commit | 41d2214e7e5a72be58e1b97a7f5f04a1b4b6660b (patch) | |
tree | 91d859e91169cf51c32960784114923f3bc6bccf /src/cargotype.cpp | |
parent | 29606c0de66de3c40074eb086410ef39951e0d86 (diff) | |
download | openttd-41d2214e7e5a72be58e1b97a7f5f04a1b4b6660b.tar.xz |
(svn r18413) -Doc: Added doxygen strings for cargo-type related enums, structs, and functions.
Diffstat (limited to 'src/cargotype.cpp')
-rw-r--r-- | src/cargotype.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/cargotype.cpp b/src/cargotype.cpp index 6920cf17f..3e2e742d0 100644 --- a/src/cargotype.cpp +++ b/src/cargotype.cpp @@ -20,10 +20,14 @@ CargoSpec CargoSpec::array[NUM_CARGO]; -/* Bitmask of cargo types available */ +/** Bitmask of cargo types available. + * Initialized during a call to #SetupCargoForClimate. + */ uint32 _cargo_mask; - +/** Set up the default cargo types for the given landscape type. + * @param l Landscape + */ void SetupCargoForClimate(LandscapeID l) { assert(l < lengthof(_default_climate_cargo)); @@ -60,7 +64,10 @@ void SetupCargoForClimate(LandscapeID l) } } - +/** Get the cargo ID by cargo label. + * @param cl Cargo type to get. + * @return ID number if the cargo exists, else #CT_INVALID + */ CargoID GetCargoIDByLabel(CargoLabel cl) { const CargoSpec *cs; @@ -75,7 +82,7 @@ CargoID GetCargoIDByLabel(CargoLabel cl) /** Find the CargoID of a 'bitnum' value. * @param bitnum 'bitnum' to find. - * @return First CargoID with the given bitnum, or CT_INVALID if not found. + * @return First CargoID with the given bitnum, or #CT_INVALID if not found or if the provided \a bitnum is invalid. */ CargoID GetCargoIDByBitnum(uint8 bitnum) { |