summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-10-20 16:49:30 +0000
committeryexo <yexo@openttd.org>2011-10-20 16:49:30 +0000
commitd8a80adf0eb7f28dff1cdd4d8a76ec00584cb7c1 (patch)
treee46621594cf99030396132c6ec2b0f4a34d5dc41 /src
parente3b99e34158fa58107077931378b3379a26db2d0 (diff)
downloadopenttd-d8a80adf0eb7f28dff1cdd4d8a76ec00584cb7c1.tar.xz
(svn r23040) -Add: [NewGRF] allow use of newgrf textstack during callback 23
Diffstat (limited to 'src')
-rw-r--r--src/build_vehicle_gui.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index e696b8a5b..a7883067e 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -755,10 +755,8 @@ static uint ShowAdditionalText(int left, int right, int y, EngineID engine)
uint16 callback = GetVehicleCallback(CBID_VEHICLE_ADDITIONAL_TEXT, 0, 0, engine, NULL);
if (callback == CALLBACK_FAILED) return y;
- /* STR_BLACK_STRING is used to start the string with {BLACK} */
- SetDParam(0, GetGRFStringID(GetEngineGRFID(engine), 0xD000 + callback));
- StartTextRefStackUsage(0);
- uint result = DrawStringMultiLine(left, right, y, INT32_MAX, STR_BLACK_STRING);
+ StartTextRefStackUsage(4);
+ uint result = DrawStringMultiLine(left, right, y, INT32_MAX, GetGRFStringID(GetEngineGRFID(engine), 0xD000 + callback), TC_BLACK);
StopTextRefStackUsage();
return result;
}