X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fscripting%2Fsquirrel_util.hpp;h=6658721e2226cc13f9f0b5859d866fc00ca42843;hb=59d76147a1b09fca2d2b4a1780ab47509c1e47ff;hp=2648b5f083a3ecf6200cb6de25f3ab15fff40eed;hpb=08813a74da6ac1fd045a105e4e8105f1d7f716f0;p=supertux.git diff --git a/src/scripting/squirrel_util.hpp b/src/scripting/squirrel_util.hpp index 2648b5f08..6658721e2 100644 --- a/src/scripting/squirrel_util.hpp +++ b/src/scripting/squirrel_util.hpp @@ -22,17 +22,13 @@ #include "scripting/squirrel_error.hpp" #include "scripting/wrapper.hpp" -namespace Scripting { - -extern HSQUIRRELVM global_vm; - -void init_squirrel(bool enable_debugger); -void exit_squirrel(); -void update_debugger(); +namespace scripting { std::string squirrel2string(HSQUIRRELVM vm, SQInteger i); void print_squirrel_stack(HSQUIRRELVM vm); +SQInteger squirrel_read_char(SQUserPointer file); + HSQOBJECT create_thread(HSQUIRRELVM vm); SQObject vm_to_object(HSQUIRRELVM vm); HSQUIRRELVM object_to_vm(HSQOBJECT object); @@ -47,7 +43,7 @@ void expose_object(HSQUIRRELVM v, SQInteger table_idx, T* object, const std::string& name, bool free = false) { sq_pushstring(v, name.c_str(), -1); - Scripting::create_squirrel_instance(v, object, free); + scripting::create_squirrel_instance(v, object, free); if(table_idx < 0) table_idx -= 2; @@ -56,7 +52,7 @@ void expose_object(HSQUIRRELVM v, SQInteger table_idx, T* object, if(SQ_FAILED(sq_createslot(v, table_idx))) { std::ostringstream msg; msg << "Couldn't register object '" << name << "' in squirrel table"; - throw Scripting::SquirrelError(v, msg.str()); + throw scripting::SquirrelError(v, msg.str()); } } @@ -71,7 +67,7 @@ static inline void unexpose_object(HSQUIRRELVM v, SQInteger table_idx, if(SQ_FAILED(sq_deleteslot(v, table_idx, SQFalse))) { std::ostringstream msg; msg << "Couldn't unregister object '" << name << "' in squirrel root table"; - throw Scripting::SquirrelError(v, msg.str()); + throw scripting::SquirrelError(v, msg.str()); } }