Changeset - r2769:7af28d3240b2
[Not reviewed]
master
0 4 0
peter1138 - 18 years ago 2005-12-18 14:03:28
peter1138@openttd.org
(svn r3316) - NewGRF: Unload engine names before loading grf files. This fixes names in climates where the engines don't get loaded. Renamed function to reflect its purpose.
4 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
engine.c
Show inline comments
 
@@ -811,7 +811,7 @@ void SetCustomEngineName(EngineID engine
 
	_engine_custom_names[engine] = strdup(name);
 
}
 

	
 
void UnInitNewgrEngines(void)
 
void UnloadCustomEngineNames(void)
 
{
 
	char **i;
 
	for (i = _engine_custom_names; i != endof(_engine_custom_names); i++) {
engine.h
Show inline comments
 
@@ -212,7 +212,6 @@ void LoadCustomEngineNames(void);
 
void DeleteCustomEngineNames(void);
 

	
 
bool IsEngineBuildable(uint engine, byte type);
 
void UnInitNewgrEngines(void);
 

	
 
enum {
 
	NUM_NORMAL_RAIL_ENGINES = 54,
 
@@ -283,5 +282,6 @@ static inline const RoadVehicleInfo* Roa
 

	
 
void UnloadWagonOverrides(void);
 
void UnloadCustomEngineSprites(void);
 
void UnloadCustomEngineNames(void);
 

	
 
#endif /* ENGINE_H */
newgrf.c
Show inline comments
 
@@ -2455,6 +2455,7 @@ static void ResetNewGRFData(void)
 
	// Unload sprite group data
 
	UnloadWagonOverrides();
 
	UnloadCustomEngineSprites();
 
	UnloadCustomEngineNames();
 

	
 
	// Reset price base data
 
	ResetPriceBaseMultipliers();
openttd.c
Show inline comments
 
@@ -255,7 +255,6 @@ static void UnInitializeDynamicVariables
 
static void UnInitializeGame(void)
 
{
 
	UnInitWindowSystem();
 
	UnInitNewgrEngines();
 

	
 
	free(_config_file);
 
}
0 comments (0 inline, 0 general)