summaryrefslogtreecommitdiff
path: root/newgrf.h
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-04-22 13:17:13 +0000
committerDarkvater <darkvater@openttd.org>2006-04-22 13:17:13 +0000
commite3280971b12c15cbe077f59cf28f8a6e4977d51d (patch)
treea4d01abf72144eb6b67a3c809d3072f51de5a63e /newgrf.h
parent28213ea9dcb911c0cc30471e68661de6be6593b8 (diff)
downloadopenttd-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.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/newgrf.h b/newgrf.h
index f3abac6e6..904d44419 100644
--- a/newgrf.h
+++ b/newgrf.h
@@ -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);