snprintf
? Prefer functions from src/base/system.h
in teeworldsstr_format
does not suit you?const char*
?enum
for colors and concatenate them with spaces if you want - as long as it's readable, it's your choice str_format
in a function looks a bit ugly, it's strange that you have to resort to thatenum
is not handled by the preprocessor btwstr_format(str, sizeof(str), "%s%s%s%s%c%s%s%s", ...)
? TextLen += snprintf(aBuf + TextLen, sizeof(aBuf), "%s%s%s%s%c%s%s%s "
, GetBroadcastOpen(i, MarkerPos) // Opening Parenthesis
, GetBroadcastLine(i, MarkerPos)
, GetBroadcastLine(i, MarkerPos)
, GetTeamBroadcastColor(m_apDominationSpots[i]->GetTeam()), GetSpotName(i)[0]
, GetBroadcastLine(i, MarkerPos)
, GetBroadcastLine(i, MarkerPos)
, GetBroadcastClose(i, MarkerPos)); // Closing Parenthesis
str_format(str, sizeof(str), "%s%s%s%s%c%s%s%s",
Colorize(...),
Colorize(...),
Colorize(...)
);
const char* colors[];
str_concat(colors[i], char)
Colorize
takes 20 cycles or 500 :Dstr_format(str, sizeof(str), "%s%s%s%s%c%s%s%s",
Colorize(...),
Colorize(...),
Colorize(...)
);
Colorize()
is called abstractionGetBroadcastLine
that thing look scary to me (edited)enum
works