mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r23040) -Add: [NewGRF] allow use of newgrf textstack during callback 23
This commit is contained in:
parent
e3b99e3415
commit
d8a80adf0e
@ -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);
|
uint16 callback = GetVehicleCallback(CBID_VEHICLE_ADDITIONAL_TEXT, 0, 0, engine, NULL);
|
||||||
if (callback == CALLBACK_FAILED) return y;
|
if (callback == CALLBACK_FAILED) return y;
|
||||||
|
|
||||||
/* STR_BLACK_STRING is used to start the string with {BLACK} */
|
StartTextRefStackUsage(4);
|
||||||
SetDParam(0, GetGRFStringID(GetEngineGRFID(engine), 0xD000 + callback));
|
uint result = DrawStringMultiLine(left, right, y, INT32_MAX, GetGRFStringID(GetEngineGRFID(engine), 0xD000 + callback), TC_BLACK);
|
||||||
StartTextRefStackUsage(0);
|
|
||||||
uint result = DrawStringMultiLine(left, right, y, INT32_MAX, STR_BLACK_STRING);
|
|
||||||
StopTextRefStackUsage();
|
StopTextRefStackUsage();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user