MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / HandleNewGRFStringControlCodes

Function HandleNewGRFStringControlCodes

src/newgrf_text.cpp:961–968  ·  view source on GitHub ↗

* Handle control codes in a NewGRF string, processing the stack and filling parameters. * @param str String to process. * @param[in,out] stack Stack to use. * @param[out] params Parameters to fill. */

Source from the content-addressed store, hash-verified

959 * @param[out] params Parameters to fill.
960 */
961static void HandleNewGRFStringControlCodes(std::string_view str, TextRefStack &stack, std::vector<StringParameter> &params)
962{
963 StringConsumer consumer(str);
964 while (consumer.AnyBytesLeft()) {
965 char32_t scc = consumer.ReadUtf8();
966 ProcessNewGRFStringControlCode(scc, consumer, stack, params);
967 }
968}
969
970/**
971 * Process the text ref stack for a GRF String and return its parameters.

Callers 2

Calls 3

AnyBytesLeftMethod · 0.80
ReadUtf8Method · 0.80

Tested by

no test coverage detected