MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / GetGlobalVars

Method GetGlobalVars

Source/Scripting/angelscript/asmodule.cpp:1302–1318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1300}
1301
1302void ASModule::GetGlobalVars(std::list<VarStorage>& storage, std::list<ScriptObjectInstance>& handle_var_list) {
1303 int c = module_->GetGlobalVarCount();
1304 for (int n = 0; n < c; n++) {
1305 const char* name;
1306 const char** name_hdl = &name;
1307 int type_id;
1308 bool is_const;
1309 module_->GetGlobalVar(n, name_hdl, 0, &type_id, &is_const);
1310 if (is_const) {
1311 continue;
1312 }
1313 void* ptr = module_->GetAddressOfGlobalVar(n);
1314 VarStorage new_var;
1315 FillVar(new_var, name, type_id, ptr, handle_var_list, module_);
1316 storage.push_back(new_var);
1317 }
1318}
1319
1320void ASModule::SaveGlobalVars() {
1321 GetGlobalVars(saved_vars_, saved_handle_vars_);

Callers

nothing calls this directly

Calls 5

FillVarFunction · 0.85
GetGlobalVarCountMethod · 0.80
GetGlobalVarMethod · 0.80
GetAddressOfGlobalVarMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected