src/newgrf.h
author richk
Tue, 17 Jun 2008 13:41:57 +0000
branchNewGRF_ports
changeset 10995 311b38c7f9a7
parent 10991 d8811e327d12
permissions -rw-r--r--
(svn r13549) [NewGRF_ports] -Change: Make recolouring of groundtile (0x0f80) specific to NewGRF_ports only.
Also base groundsprite on airport_tile of station. This prevents mixed colour groundtiles in an airport.
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 1477
diff changeset
     1
/* $Id$ */
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 1477
diff changeset
     2
10724
68a692eacf22 (svn r13274) [NewGRF_ports] -Sync: with trunk r12806:13144.
richk
parents: 10184
diff changeset
     3
/** @file newgrf.h Base for the NewGRF implementation. */
6674
64f4781b4653 (svn r9385) -Cleanup: doxygen changes. Today, we are exploring the letter N.
belugas
parents: 6658
diff changeset
     4
455
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
     5
#ifndef NEWGRF_H
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
     6
#define NEWGRF_H
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
     7
6872
1c4a4a609f85 (svn r11950) [NewGRF_ports] -Sync with trunk r11566:11949.
rubidium
parents: 6871
diff changeset
     8
#include "town_type.h"
5228
c4a780348f66 (svn r7348) -Feature: Initial support for saving NewGRF settings with savegames. Back up your savegames...
peter1138
parents: 5225
diff changeset
     9
#include "newgrf_config.h"
6469
05a2e97144ec (svn r8886) -Codechange: (NewGRF) Add (partial) cargo translation table support, applied to action 3s only.
peter1138
parents: 5838
diff changeset
    10
#include "cargotype.h"
6872
1c4a4a609f85 (svn r11950) [NewGRF_ports] -Sync with trunk r11566:11949.
rubidium
parents: 6871
diff changeset
    11
#include "industry_type.h"
10184
fcf5fb2548eb (svn r12715) [NewGRF_ports] -Sync: with trunk r12351:12644.
richk
parents: 6878
diff changeset
    12
#include "station_type.h"
6722
72f280229ee1 (svn r10586) [NewGRF_ports] -Feature: Load an airport via a newgrf file. Currently, only graphics support provided.
richk
parents: 6720
diff changeset
    13
#include "newgrf_fsmports.h"
463
91bcad840bcd (svn r687) Export InitNewGRFFile() and DecodeSpecialSprite() properly.
pasky
parents: 455
diff changeset
    14
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6573
diff changeset
    15
enum GrfLoadingStage {
5228
c4a780348f66 (svn r7348) -Feature: Initial support for saving NewGRF settings with savegames. Back up your savegames...
peter1138
parents: 5225
diff changeset
    16
	GLS_FILESCAN,
5329
2b117d8652f0 (svn r7490) -Feature: Load a list of NewGRFs from the config (in the [newgrf-static] section) that should always be loaded. These will also be active during the intro screen, and in multiplayer games. Only "network-safe" NewGRFs are permitted, such as fonts and sprite replacement sets.
peter1138
parents: 5234
diff changeset
    17
	GLS_SAFETYSCAN,
5225
52ddcedcc6f7 (svn r7345) -Codechange: enumification of NewGRF loading stage, and move enum definition to header for future use.
peter1138
parents: 5210
diff changeset
    18
	GLS_LABELSCAN,
52ddcedcc6f7 (svn r7345) -Codechange: enumification of NewGRF loading stage, and move enum definition to header for future use.
peter1138
parents: 5210
diff changeset
    19
	GLS_INIT,
6685
410bba0abb67 (svn r9411) -Codechange: Add support for loading of newcargo data.
peter1138
parents: 6674
diff changeset
    20
	GLS_RESERVE,
5225
52ddcedcc6f7 (svn r7345) -Codechange: enumification of NewGRF loading stage, and move enum definition to header for future use.
peter1138
parents: 5210
diff changeset
    21
	GLS_ACTIVATION,
52ddcedcc6f7 (svn r7345) -Codechange: enumification of NewGRF loading stage, and move enum definition to header for future use.
peter1138
parents: 5210
diff changeset
    22
	GLS_END,
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6573
diff changeset
    23
};
5225
52ddcedcc6f7 (svn r7345) -Codechange: enumification of NewGRF loading stage, and move enum definition to header for future use.
peter1138
parents: 5210
diff changeset
    24
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    25
DECLARE_POSTFIX_INCREMENT(GrfLoadingStage);
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    26
6719
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
    27
enum GrfMiscBit {
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
    28
	GMB_DESERT_TREES_FIELDS    = 0, // Unsupported.
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
    29
	GMB_DESERT_PAVED_ROADS     = 1,
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
    30
	GMB_FIELD_BOUNDING_BOX     = 2, // Unsupported.
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
    31
	GMB_TRAIN_WIDTH_32_PIXELS  = 3,
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
    32
	GMB_AMBIENT_SOUND_CALLBACK = 4, // Unsupported.
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
    33
	GMB_CATENARY_ON_3RD_TRACK  = 5, // Unsupported.
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
    34
};
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    35
6878
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    36
enum GrfSpecFeature {
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    37
	GSF_TRAIN,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    38
	GSF_ROAD,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    39
	GSF_SHIP,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    40
	GSF_AIRCRAFT,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    41
	GSF_STATION,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    42
	GSF_CANAL,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    43
	GSF_BRIDGE,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    44
	GSF_TOWNHOUSE,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    45
	GSF_GLOBALVAR,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    46
	GSF_INDUSTRYTILES,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    47
	GSF_INDUSTRIES,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    48
	GSF_CARGOS,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    49
	GSF_SOUNDFX,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    50
	GSF_FSMPORTS,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    51
	GSF_END,
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    52
};
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
    53
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6573
diff changeset
    54
struct GRFLabel {
3561
29c95ab685c0 (svn r4439) - NewGRF: Add support for Action 0x10. This also required an extra pre-stage (before initialize and activation) to scan the GRF file for GOTO labels. Big thanks for peter1138 for the guidance and answers, as well as parts of the code.
Darkvater
parents: 3501
diff changeset
    55
	byte label;
29c95ab685c0 (svn r4439) - NewGRF: Add support for Action 0x10. This also required an extra pre-stage (before initialize and activation) to scan the GRF file for GOTO labels. Big thanks for peter1138 for the guidance and answers, as well as parts of the code.
Darkvater
parents: 3501
diff changeset
    56
	uint32 nfo_line;
10991
d8811e327d12 (svn r13545) [NewGRF_ports] -Sync: with trunk r13281:13411.
richk
parents: 10724
diff changeset
    57
	size_t pos;
3561
29c95ab685c0 (svn r4439) - NewGRF: Add support for Action 0x10. This also required an extra pre-stage (before initialize and activation) to scan the GRF file for GOTO labels. Big thanks for peter1138 for the guidance and answers, as well as parts of the code.
Darkvater
parents: 3501
diff changeset
    58
	struct GRFLabel *next;
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6573
diff changeset
    59
};
3561
29c95ab685c0 (svn r4439) - NewGRF: Add support for Action 0x10. This also required an extra pre-stage (before initialize and activation) to scan the GRF file for GOTO labels. Big thanks for peter1138 for the guidance and answers, as well as parts of the code.
Darkvater
parents: 3501
diff changeset
    60
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6573
diff changeset
    61
struct GRFFile {
455
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    62
	char *filename;
6872
1c4a4a609f85 (svn r11950) [NewGRF_ports] -Sync with trunk r11566:11949.
rubidium
parents: 6871
diff changeset
    63
	bool is_ottdfile;
455
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    64
	uint32 grfid;
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    65
	uint16 sprite_offset;
3640
b73687dd2b62 (svn r4549) - NewGRF: store the grf version from Action 0x08.
peter1138
parents: 3638
diff changeset
    66
	byte grf_version;
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6573
diff changeset
    67
	GRFFile *next;
455
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    68
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    69
	/* A sprite group contains all sprites of a given vehicle (or multiple
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    70
	 * vehicles) when carrying given cargo. It consists of several sprite
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    71
	 * sets.  Group ids are refered as "cargo id"s by TTDPatch
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    72
	 * documentation, contributing to the global confusion.
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    73
	 *
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    74
	 * A sprite set contains all sprites of a given vehicle carrying given
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    75
	 * cargo at a given *stage* - that is usually its load stage. Ie. you
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    76
	 * can have a spriteset for an empty wagon, wagon full of coal,
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    77
	 * half-filled wagon etc.  Each spriteset contains eight sprites (one
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    78
	 * per direction) or four sprites if the vehicle is symmetric. */
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    79
3707
2999a89e8abd (svn r4650) - NewGRF: use the correct type for _cur_spriteid
peter1138
parents: 3640
diff changeset
    80
	SpriteID spriteset_start;
455
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    81
	int spriteset_numsets;
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    82
	int spriteset_numents;
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    83
	int spriteset_feature;
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    84
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    85
	int spritegroups_count;
3865
a0bf688e6f85 (svn r4901) - Codechange: change 'SpriteGroup *' to 'struct SpriteGroup *' within StationSpec and GRFFile struct declarations. Now only code which actually references those pointers needs to know about the SpriteGroup struct. Remove some unnecessary lingering header dependencies.
peter1138
parents: 3775
diff changeset
    86
	struct SpriteGroup **spritegroups;
455
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
    87
4656
acffecd6f484 (svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported.
peter1138
parents: 3865
diff changeset
    88
	uint sound_offset;
acffecd6f484 (svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported.
peter1138
parents: 3865
diff changeset
    89
3768
46d328178509 (svn r4760) - Newstations: change the way custom stations are allocated when loading from GRF, as the current way was flawed (reallocing memory which is referenced elsewhere)
peter1138
parents: 3707
diff changeset
    90
	StationSpec **stations;
6658
59048224be55 (svn r9315) -Merge: The newhouses branch. With this merge comes almost complete support for
maedhros
parents: 6574
diff changeset
    91
	HouseSpec **housespec;
6719
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
    92
	IndustrySpec **industryspec;
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
    93
	IndustryTileSpec **indtspec;
6722
72f280229ee1 (svn r10586) [NewGRF_ports] -Feature: Load an airport via a newgrf file. Currently, only graphics support provided.
richk
parents: 6720
diff changeset
    94
	FSMportsSpec **fsmports;
2345
8a14ff5d4851 (svn r2871) -Feature/Fix: Per GRF parameter lists
tron
parents: 2342
diff changeset
    95
8a14ff5d4851 (svn r2871) -Feature/Fix: Per GRF parameter lists
tron
parents: 2342
diff changeset
    96
	uint32 param[0x80];
6674
64f4781b4653 (svn r9385) -Cleanup: doxygen changes. Today, we are exploring the letter N.
belugas
parents: 6658
diff changeset
    97
	uint param_end;  ///< one more than the highest set parameter
3561
29c95ab685c0 (svn r4439) - NewGRF: Add support for Action 0x10. This also required an extra pre-stage (before initialize and activation) to scan the GRF file for GOTO labels. Big thanks for peter1138 for the guidance and answers, as well as parts of the code.
Darkvater
parents: 3501
diff changeset
    98
29c95ab685c0 (svn r4439) - NewGRF: Add support for Action 0x10. This also required an extra pre-stage (before initialize and activation) to scan the GRF file for GOTO labels. Big thanks for peter1138 for the guidance and answers, as well as parts of the code.
Darkvater
parents: 3501
diff changeset
    99
	GRFLabel *label; ///< Pointer to the first label. This is a linked list, not an array.
6469
05a2e97144ec (svn r8886) -Codechange: (NewGRF) Add (partial) cargo translation table support, applied to action 3s only.
peter1138
parents: 5838
diff changeset
   100
05a2e97144ec (svn r8886) -Codechange: (NewGRF) Add (partial) cargo translation table support, applied to action 3s only.
peter1138
parents: 5838
diff changeset
   101
	uint8 cargo_max;
05a2e97144ec (svn r8886) -Codechange: (NewGRF) Add (partial) cargo translation table support, applied to action 3s only.
peter1138
parents: 5838
diff changeset
   102
	CargoLabel *cargo_list;
6473
03480a0f016e (svn r8890) -Codechange: (NewGRF) add cargo translation support to engine var 47
peter1138
parents: 6469
diff changeset
   103
	uint8 cargo_map[NUM_CARGO];
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6573
diff changeset
   104
};
455
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
   105
1477
2174a73b11c9 (svn r1981) Typedef some structs and enums
tron
parents: 463
diff changeset
   106
extern GRFFile *_first_grffile;
455
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
   107
6877
889301acc299 (svn r12053) [NewGRF_ports] -Sync: with trunk r11949:12050.
rubidium
parents: 6872
diff changeset
   108
enum ShoreReplacement {
889301acc299 (svn r12053) [NewGRF_ports] -Sync: with trunk r11949:12050.
rubidium
parents: 6872
diff changeset
   109
	SHORE_REPLACE_NONE,       ///< No shore sprites were replaced.
889301acc299 (svn r12053) [NewGRF_ports] -Sync: with trunk r11949:12050.
rubidium
parents: 6872
diff changeset
   110
	SHORE_REPLACE_ACTION_5,   ///< Shore sprites were replaced by Action5.
889301acc299 (svn r12053) [NewGRF_ports] -Sync: with trunk r11949:12050.
rubidium
parents: 6872
diff changeset
   111
	SHORE_REPLACE_ACTION_A,   ///< Shore sprites were replaced by ActionA (using grass tiles for the corner-shores).
889301acc299 (svn r12053) [NewGRF_ports] -Sync: with trunk r11949:12050.
rubidium
parents: 6872
diff changeset
   112
	SHORE_REPLACE_ONLY_NEW,   ///< Only corner-shores were loaded by Action5 (openttd(w/d).grf only).
889301acc299 (svn r12053) [NewGRF_ports] -Sync: with trunk r11949:12050.
rubidium
parents: 6872
diff changeset
   113
};
889301acc299 (svn r12053) [NewGRF_ports] -Sync: with trunk r11949:12050.
rubidium
parents: 6872
diff changeset
   114
6720
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents: 6719
diff changeset
   115
struct GRFLoadedFeatures {
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents: 6719
diff changeset
   116
	bool has_2CC;             ///< Set if any vehicle is loaded which uses 2cc (two company colours).
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents: 6719
diff changeset
   117
	bool has_newhouses;       ///< Set if there are any newhouses loaded.
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents: 6719
diff changeset
   118
	bool has_newindustries;   ///< Set if there are any newindustries loaded.
6877
889301acc299 (svn r12053) [NewGRF_ports] -Sync: with trunk r11949:12050.
rubidium
parents: 6872
diff changeset
   119
	ShoreReplacement shore;   ///< It which way shore sprites were replaced.
6719
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
   120
};
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
   121
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
   122
/* Indicates which are the newgrf features currently loaded ingame */
6720
35756db7e577 (svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents: 6719
diff changeset
   123
extern GRFLoadedFeatures _loaded_newgrf_features;
463
91bcad840bcd (svn r687) Export InitNewGRFFile() and DecodeSpecialSprite() properly.
pasky
parents: 455
diff changeset
   124
5228
c4a780348f66 (svn r7348) -Feature: Initial support for saving NewGRF settings with savegames. Back up your savegames...
peter1138
parents: 5225
diff changeset
   125
void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage);
2342
c19fb4f2df30 (svn r2868) Change the way NewGRFs are loaded: The loading process i no longer bolted onto the normal graphics loading.
tron
parents: 2186
diff changeset
   126
void LoadNewGRF(uint load_index, uint file_index);
6674
64f4781b4653 (svn r9385) -Cleanup: doxygen changes. Today, we are exploring the letter N.
belugas
parents: 6658
diff changeset
   127
void ReloadNewGRFData(); // in openttd.cpp
455
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
   128
5568
75f13d7bfaed (svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate debugging levels to
Darkvater
parents: 5352
diff changeset
   129
void CDECL grfmsg(int severity, const char *str, ...);
75f13d7bfaed (svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate debugging levels to
Darkvater
parents: 5352
diff changeset
   130
6719
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
   131
bool HasGrfMiscBit(GrfMiscBit bit);
6878
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
   132
bool GetGlobalVariable(byte param, uint32 *value);
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
   133
7d1ff2f621c7 (svn r12351) [NewGRF_ports] -Sync: with trunk r12051:12350.
richk
parents: 6877
diff changeset
   134
StringID MapGRFStringID(uint32 grfid, StringID str);
6719
4cc327ad39d5 (svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents: 6685
diff changeset
   135
455
e7ac799e1437 (svn r665) code fixes for newgrf.c/newgrf.h
dominik
parents: 453
diff changeset
   136
#endif /* NEWGRF_H */