You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#include "globals.h"
|
|
|
|
|
|
|
|
// Variables definitions
|
|
|
|
std::map<std::string,ObjectBase*> G_vars;
|
|
|
|
|
|
|
|
// Functions addresses
|
|
|
|
std::multimap<std::string,Func> G_funcs;
|
|
|
|
|
|
|
|
// List of objects to save
|
|
|
|
std::vector<ObjectList*> G_tosave;
|
|
|
|
|
|
|
|
// List of objects to print
|
|
|
|
std::vector<ObjectList*> G_toprint;
|
|
|
|
|
|
|
|
void ClearGlobals()
|
|
|
|
{
|
|
|
|
for(auto& it:G_vars) delete it.second;
|
|
|
|
for(auto& it:G_tosave) delete it;
|
|
|
|
for(auto& it:G_toprint) delete it;
|
|
|
|
|
|
|
|
G_vars.clear();
|
|
|
|
G_tosave.clear();
|
|
|
|
G_toprint.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
void RegisterFunction(const std::string& name, Func func)
|
|
|
|
{
|
|
|
|
G_funcs.emplace(name,func);
|
|
|
|
}
|