OpenTTD / nml

NewGRF Meta Language
GNU General Public License v2.0
43 stars 36 forks source link

Change: Reduce D0xx usage where possible #326

Closed glx22 closed 6 months ago

glx22 commented 6 months ago

D0xx range is very small, and must be used for CB results.

Some CB allow use of {STRING} and text stack in the returned D0xx, and {STRING} supports DCxx in text stack. But filling the text stack will still allocate D0xx when a DCxx is desired.

Try to detect when we might be filling text stack and use DCxx range in this case.

PeterN commented 6 months ago

Sounds reasonable. Do we need a unit-test for this?