#include "strings_type.h"
Go to the source code of this file.
Data Structures | |
struct | GRFIdentifier |
Basic data to distinguish a GRF. More... | |
struct | GRFError |
Information about why GRF had problems during initialisation. More... | |
struct | GRFConfig |
Information about GRF, used in the game and (part of it) in savegames. More... | |
Enumerations | |
enum | GCF_Flags { GCF_SYSTEM, GCF_UNSAFE, GCF_STATIC, GCF_COMPATIBLE, GCF_COPY, GCF_INIT_ONLY, GCF_RESERVED } |
GRF config bit flags. More... | |
enum | GRFStatus { GCS_UNKNOWN, GCS_DISABLED, GCS_NOT_FOUND, GCS_INITIALISED, GCS_ACTIVATED } |
Status of GRF. More... | |
enum | GRFBugs { GBUG_VEH_LENGTH, GBUG_VEH_REFIT } |
Encountered GRF bugs. More... | |
enum | GRFListCompatibility { GLC_ALL_GOOD, GLC_COMPATIBLE, GLC_NOT_FOUND } |
Status of post-gameload GRF compatibility check. More... | |
Functions | |
void | ScanNewGRFFiles () |
const GRFConfig * | FindGRFConfig (uint32 grfid, const uint8 *md5sum=NULL) |
GRFConfig * | GetGRFConfig (uint32 grfid, uint32 mask=0xFFFFFFFF) |
GRFConfig ** | CopyGRFConfigList (GRFConfig **dst, const GRFConfig *src, bool init_only) |
Copy a GRF Config list. | |
void | AppendStaticGRFConfigs (GRFConfig **dst) |
Appends the static GRFs to a list of GRFs. | |
void | AppendToGRFConfigList (GRFConfig **dst, GRFConfig *el) |
Appends an element to a list of GRFs. | |
void | ClearGRFConfig (GRFConfig **config) |
void | ClearGRFConfigList (GRFConfig **config) |
void | ResetGRFConfig (bool defaults) |
GRFListCompatibility | IsGoodGRFConfigList () |
Check if all GRFs in the GRF config from a savegame can be loaded. | |
bool | FillGRFDetails (GRFConfig *config, bool is_static) |
char * | GRFBuildParamList (char *dst, const GRFConfig *c, const char *last) |
void | ShowNewGRFSettings (bool editable, bool show_params, bool exec_changes, GRFConfig **config) |
Setup the NewGRF gui. | |
Variables | |
GRFConfig * | _all_grfs |
First item in list of all scanned NewGRFs. | |
GRFConfig * | _grfconfig |
First item in list of current GRF set up. | |
GRFConfig * | _grfconfig_newgame |
First item in list of default GRF set up. | |
GRFConfig * | _grfconfig_static |
First item in list of static GRF set up. |
Definition in file newgrf_config.h.
enum GCF_Flags |
GRF config bit flags.
Definition at line 18 of file newgrf_config.h.
enum GRFBugs |
Encountered GRF bugs.
GBUG_VEH_LENGTH | Length of rail vehicle changes when not inside a depot. |
GBUG_VEH_REFIT | Articulated vehicles carry different cargos resp. are differently refittable than specified in purchase list. |
Definition at line 39 of file newgrf_config.h.
enum GRFListCompatibility |
Status of post-gameload GRF compatibility check.
Definition at line 45 of file newgrf_config.h.
enum GRFStatus |
Status of GRF.
Definition at line 30 of file newgrf_config.h.
void AppendStaticGRFConfigs | ( | GRFConfig ** | dst | ) |
Appends the static GRFs to a list of GRFs.
dst | the head of the list to add to |
Definition at line 197 of file newgrf_config.cpp.
References CopyGRFConfigList(), GRFConfig::next, and RemoveDuplicatesFromGRFConfigList().
Appends an element to a list of GRFs.
dst | the head of the list to add to | |
el | the new tail to be |
Definition at line 209 of file newgrf_config.cpp.
References GRFConfig::next, and RemoveDuplicatesFromGRFConfigList().
Copy a GRF Config list.
dst | pointer to destination list | |
src | pointer to source list values | |
init_only | the copied GRF will be processed up to GLS_INIT |
Definition at line 133 of file newgrf_config.cpp.
References ClrBit(), GRFError::custom_message, GRFError::data, GRFConfig::error, GRFConfig::filename, GCF_COPY, GCF_INIT_ONLY, GRFConfig::info, GRFConfig::name, GRFConfig::next, and SetBit().
Referenced by AppendStaticGRFConfigs(), NewGRFConfirmationCallback(), and NewGRFWindow::OnClick().
GRFListCompatibility IsGoodGRFConfigList | ( | ) |
Check if all GRFs in the GRF config from a savegame can be loaded.
Definition at line 235 of file newgrf_config.cpp.
References BSWAP32(), GRFConfig::error, GRFConfig::filename, GRFConfig::flags, GamelogGRFCompatible(), GamelogGRFRemove(), GCF_COMPATIBLE, GCF_COPY, GCS_NOT_FOUND, GLC_ALL_GOOD, GLC_COMPATIBLE, GLC_NOT_FOUND, GRFIdentifier::grfid, HasBit(), GRFConfig::info, lastof, GRFIdentifier::md5sum, md5sumToString(), GRFConfig::name, GRFConfig::next, SetBit(), and GRFConfig::status.
void ShowNewGRFSettings | ( | bool | editable, | |
bool | show_params, | |||
bool | exec_changes, | |||
GRFConfig ** | config | |||
) |
Setup the NewGRF gui.
editable | allow the user to make changes to the grfconfig in the window | |
show_params | show information about what parameters are set for the grf files | |
exec_changes | if changes are made to the list (editable is true), apply these changes immediately or only update the list | |
config | pointer to a linked-list of grfconfig's that will be shown |
Definition at line 1110 of file newgrf_gui.cpp.
References DeleteWindowByClass().