MCPcopy Create free account
hub / github.com/Svxy/The-Simpsons-Hit-and-Run / AddFunction

Method AddFunction

game/code/console/console.cpp:1092–1109  ·  view source on GitHub ↗

============================================================================== Console::AddFunction ============================================================================== Description: Parameters: Return: ==============================================================================

Source from the content-addressed store, hash-verified

1090//
1091//==============================================================================
1092bool Console::AddFunction
1093(
1094 const char* name,
1095 CONSOLE_FUNCTION funcPtr,
1096 const char* helpString,
1097 int minArgs,
1098 int maxArgs
1099)
1100{
1101 //make sure we've initialized the global console
1102 if (!spInstance)
1103 {
1104 rDebugString("Error - Console::AddFunction(): Console::Initialize() hasn't been called yet.");
1105 return (false);
1106 }
1107
1108 return (spInstance->AddFunc(name, funcPtr, 0, helpString, minArgs, maxArgs));
1109}
1110
1111
1112//==============================================================================

Callers 7

OnBootupStartMethod · 0.80
InitializeMethod · 0.80
ActionButtonManagerMethod · 0.80
SetupConsoleFunctionsMethod · 0.80
CharacterManagerMethod · 0.80
RegisterMethod · 0.80

Calls 1

AddFuncMethod · 0.80

Tested by

no test coverage detected