MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / SplitTitleLines

Function SplitTitleLines

engine/Poseidon/Game/TitEffects.cpp:233–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 SetTimes(DefaultIn, time, DefaultOut);
232}
233
234void SplitTitleLines(RString text, AutoArray<RString>& out)
235{
236 out.Clear();
237 if (text.GetLength() > 0)
238 {
239 const char* start = text;
240 const char* ptr = strstr(start, "\\n");
241 while (ptr)
242 {
243 out.Add(text.Substring(start - text, ptr - text));
244 start = ptr + 2;
245 ptr = strstr(start, "\\n");
246 }
247 out.Add(text.Substring(start - text, INT_MAX));
248 }
249}
250
251TitleShadowOffset SubtitleShadowOffset(int width2D, int height2D)

Callers 2

InitMethod · 0.85

Calls 4

SubstringMethod · 0.80
ClearMethod · 0.45
GetLengthMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected