Simple game engine with complete export to scripting language
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.
 
 
 

41 lines
891 B

  1. #ifndef BLUECORE_SCRIPT_SYSTEM_H
  2. #define BLUECORE_SCRIPT_SYSTEM_H
  3. // system includes
  4. #include <vector>
  5. #include <string>
  6. // library includes
  7. #include "squirrel.h"
  8. // project includes
  9. #include "Utilities/Referenced.h"
  10. namespace BlueCore{
  11. class ScriptSystem : public Referenced
  12. {
  13. HSQUIRRELVM _VM;
  14. std::vector<std::string> _LoadedScripts;
  15. public:
  16. ScriptSystem();
  17. ~ScriptSystem();
  18. HSQUIRRELVM getVM();
  19. bool executeScript(const std::string &filename);
  20. bool loadScript(const std::string &filename);
  21. void callFunction(const std::string &name);
  22. void callFunction(const std::string &name, double value);
  23. void callFunction(const std::string &name, double value1, double value2);
  24. void callFunction(const std::string &name, double value1, double value2, double value3);
  25. };
  26. } // namespace BlueCore
  27. #endif