MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / aShowHUDMessage

Function aShowHUDMessage

scripts/DallasFuncs.cpp:1220–1233  ·  view source on GitHub ↗

$$ACTION Misc Show HUD message [s:Message] aShowHUDMessage Show HUD message Shows a HUD message for all players Parameters: Message: The message to show $$END */

Source from the content-addressed store, hash-verified

1218$$END
1219*/
1220void aShowHUDMessage(const char *format, ...) {
1221 msafe_struct mstruct;
1222 va_list args;
1223
1224 va_start(args, format);
1225 std::vsnprintf(mstruct.message, sizeof(mstruct.message) - 1, format, args);
1226 va_end(args);
1227 mstruct.message[sizeof(mstruct.message) - 1] = 0; // if message too long, vsnprintf() won't terminate
1228
1229 mstruct.state = 0; // means all players
1230 mstruct.color = GR_RGB(0, 255, 0);
1231
1232 MSafe_CallFunction(MSAFE_MISC_HUD_MESSAGE, &mstruct);
1233}
1234
1235/*
1236$$ACTION

Callers 15

CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
aMatCenPuzzleSwitchAFunction · 0.85
aMatCenPuzzleSwitchBFunction · 0.85
aMatCenPuzzleSwitchCFunction · 0.85
aMatCenPuzzleSwitchDFunction · 0.85

Calls 1

GR_RGBFunction · 0.70

Tested by

no test coverage detected