MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / getFunctionArgs

Method getFunctionArgs

engine/source/console/compiledEval.cc:216–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214//------------------------------------------------------------
215
216void CodeBlock::getFunctionArgs(char buffer[1024], U32 ip)
217{
218 U32 fnArgc = code[ip + 5];
219 buffer[0] = 0;
220 for(U32 i = 0; i < fnArgc; i++)
221 {
222 StringTableEntry var = CodeToSTE(code, ip + (i*2) + 6);
223
224 // Add a comma so it looks nice!
225 if(i != 0)
226 dStrcat(buffer, ", ");
227
228 dStrcat(buffer, "var ");
229
230 // Try to capture junked parameters
231 if(var[0])
232 dStrcat(buffer, var+1);
233 else
234 dStrcat(buffer, "JUNK");
235 }
236}
237
238// Returns, in 'val', the specified component of a string.
239static void getUnit(const char *string, U32 index, const char *set, char val[], S32 len)

Callers 1

printNamespaceEntriesMethod · 0.80

Calls 2

CodeToSTEFunction · 0.85
dStrcatFunction · 0.50

Tested by

no test coverage detected