1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-02 03:19:10 +00:00

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

This commit is contained in:
2007-06-25 14:46:32 +00:00
parent eb6594caa8
commit d69589b3c2
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));