#ifndef LUA_MISC_H #define LUA_MISC_H #include #include #include #include "luamain.h" #include "OutFile.h" #include "bit.h" namespace lua { typedef std::map mapPlugs; class PlugManager { public: mapPlugs GetList(){return plugs;}; uint32_t AddNewPlug(std::string name,uint32_t size,uint32_t loc=0); uint32_t FindPlugin(std::string name); static PlugManager &GetInst() { void *p; p=DFHack::Core::getInstance().GetData("dfusion_manager"); if(p==0) { p=new PlugManager; DFHack::Core::getInstance().RegisterData(p,"dfusion_manager"); } return *static_cast(p); }; protected: private: PlugManager(){}; mapPlugs plugs; }; void RegisterMisc(lua::state &st); } #endif