/****************************************************************************** * File - wren_state.h * Author - Joey Pollack * Date - 2022/10/25 (y/m/d) * Mod Date - 2022/10/25 (y/m/d) * Description - Manages the wren vm, runs scripts. This is the main * interface for wren. ******************************************************************************/ #ifndef LUNARIUM_WREN_STATE_H_ #define LUNARIUM_WREN_STATE_H_ #include #include #include #include namespace lunarium { class WrenScript; class WrenState { public: ~WrenState(); OpRes Initialize(); void Shutdown(); u32 GetLogCat() const; void RunScript(WrenScript* script); void RunSnippet(std::string name, std::string code); // CALL BACKS static void WriteFN(WrenVM* vm, const char* text); static void ErrorFN(WrenVM* vm, WrenErrorType type, const char* module, int line, const char* message); private: static u32 mLogCat; WrenVM* mpVM; }; } #endif // LUNARIUM_WREN_STATE_H_