diff options
author | Darkvater <darkvater@openttd.org> | 2006-04-22 13:17:13 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-04-22 13:17:13 +0000 |
commit | e3280971b12c15cbe077f59cf28f8a6e4977d51d (patch) | |
tree | a4d01abf72144eb6b67a3c809d3072f51de5a63e /newgrf.h | |
parent | 28213ea9dcb911c0cc30471e68661de6be6593b8 (diff) | |
download | openttd-e3280971b12c15cbe077f59cf28f8a6e4977d51d.tar.xz |
(svn r4527) - Feature [NewGRF]: Add support for specifying parameters to GRF files. Usage: "mygrf = 1". You can pass up to 128 parameters, each one seperated by a comma or a space-character. Big thanks to peter1138 for the inspiration and examples.
Diffstat (limited to 'newgrf.h')
-rw-r--r-- | newgrf.h | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -13,14 +13,13 @@ typedef struct GRFLabel { struct GRFLabel *next; } GRFLabel; -typedef struct GRFFile GRFFile; -struct GRFFile { +typedef struct GRFFile { char *filename; uint32 grfid; uint16 flags; uint16 sprite_offset; SpriteID first_spriteset; ///< Holds the first spriteset's sprite offset. - GRFFile *next; + struct GRFFile *next; /* A sprite group contains all sprites of a given vehicle (or multiple * vehicles) when carrying given cargo. It consists of several sprite @@ -48,10 +47,19 @@ struct GRFFile { uint param_end; /// one more than the highest set parameter GRFLabel *label; ///< Pointer to the first label. This is a linked list, not an array. -}; +} GRFFile; extern GRFFile *_first_grffile; +typedef struct GRFConfig { + const char *filename; + uint32 param[0x80]; + byte num_params; + + struct GRFConfig *next; +} GRFConfig; + +extern GRFConfig *_first_grfconfig; void LoadNewGRF(uint load_index, uint file_index); |