(svn r10324) -Codechange: reference engine names by index

This commit is contained in:
peter1138
2007-06-25 14:46:32 +00:00
parent 8ee9e8bf1e
commit 76874f34bf
11 changed files with 37 additions and 20 deletions

View File

@@ -31,6 +31,7 @@
#include "newgrf_townname.h"
#include "signs.h"
#include "vehicle.h"
#include "newgrf_engine.h"
/* for opendir/readdir/closedir */
# include "fios.h"
@@ -864,6 +865,13 @@ static char* FormatString(char* buff, const char* str, const int64* argv, uint c
break;
}
case SCC_ENGINE_NAME: { // {ENGINE}
EngineID engine = (EngineID)GetInt32(&argv);
buff = GetString(buff, GetCustomEngineName(engine), last);
break;
}
case SCC_VEHICLE_NAME: { // {VEHICLE}
const Vehicle *v = GetVehicle(GetInt32(&argv));