1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 00:19:09 +00:00

(svn r23040) -Add: [NewGRF] allow use of newgrf textstack during callback 23

This commit is contained in:
yexo
2011-10-20 16:49:30 +00:00
parent e3b99e3415
commit d8a80adf0e

View File

@@ -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;
}