MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / get_global_variable

Function get_global_variable

src/builtin/module_builtin_debugger.cpp:1190–1196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1188 }
1189
1190 vec4f get_global_variable ( Context & context, SimNode_CallBase * node, vec4f * args ) {
1191 auto ctx = cast<Context *>::to(args[0]);
1192 if ( ctx==nullptr ) context.throw_error_at(node->debugInfo, "expecting context pointer");
1193 auto name = cast<char *>::to(args[1]);
1194 auto vidx = ctx->findVariable(name);
1195 return cast<void *>::from(ctx->getVariable(vidx));
1196 }
1197
1198 vec4f get_global_variable_by_index ( Context & context, SimNode_CallBase * node, vec4f * args ) {
1199 auto ctx = cast<Context *>::to(args[0]);

Callers

nothing calls this directly

Calls 3

toFunction · 0.85
throw_error_atMethod · 0.80
findVariableMethod · 0.45

Tested by

no test coverage detected