From e7fd19cdf37a64c5bebeb596490d5bec03d82e1f Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 19 Apr 2024 13:14:35 +0200 Subject: [PATCH] VScript: fix method order More logical order of newly added methods. --- .../languages/squirrel_re/vsquirrel.cpp | 20 +++++++++---------- src/vscript/languages/squirrel_re/vsquirrel.h | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/vscript/languages/squirrel_re/vsquirrel.cpp b/src/vscript/languages/squirrel_re/vsquirrel.cpp index 6c3f729c..89452193 100644 --- a/src/vscript/languages/squirrel_re/vsquirrel.cpp +++ b/src/vscript/languages/squirrel_re/vsquirrel.cpp @@ -130,16 +130,6 @@ bool CSquirrelVM::Run(const SQChar* const script) return success; } -//--------------------------------------------------------------------------------- -// Purpose: executes a code callback -// Input : *name - -// Output : true on success, false otherwise -//--------------------------------------------------------------------------------- -bool CSquirrelVM::ExecuteCodeCallback(const SQChar* const name) -{ - return CSquirrelVM__ExecuteCodeCallback(this, name); -} - //--------------------------------------------------------------------------------- // Purpose: executes a function by handle // Input : hFunction - @@ -155,6 +145,16 @@ ScriptStatus_t CSquirrelVM::ExecuteFunction(HSCRIPT hFunction, void** pArgs, uns return CSquirrelVM__ExecuteFunction(this, hFunction, pArgs, nArgs, pReturn, hScope); } +//--------------------------------------------------------------------------------- +// Purpose: executes a code callback +// Input : *name - +// Output : true on success, false otherwise +//--------------------------------------------------------------------------------- +bool CSquirrelVM::ExecuteCodeCallback(const SQChar* const name) +{ + return CSquirrelVM__ExecuteCodeCallback(this, name); +} + //--------------------------------------------------------------------------------- // Purpose: registers a code function // Input : *s - diff --git a/src/vscript/languages/squirrel_re/vsquirrel.h b/src/vscript/languages/squirrel_re/vsquirrel.h index d70c0828..212d075b 100644 --- a/src/vscript/languages/squirrel_re/vsquirrel.h +++ b/src/vscript/languages/squirrel_re/vsquirrel.h @@ -25,14 +25,14 @@ public: SQRESULT RegisterFunction(const SQChar* scriptname, const SQChar* nativename, const SQChar* helpstring, const SQChar* returntype, const SQChar* parameters, void* functor); SQRESULT RegisterConstant(const SQChar* name, SQInteger value); - bool ExecuteCodeCallback(const SQChar* const name); - FORCEINLINE HSQUIRRELVM GetVM() const { return m_hVM; } FORCEINLINE SQCONTEXT GetContext() const { return m_iContext; } FORCEINLINE eDLL_T GetNativeContext() const { return (eDLL_T)GetContext(); } bool Run(const SQChar* const script); + ScriptStatus_t ExecuteFunction(HSCRIPT hFunction, void** pArgs, unsigned int nArgs, void* pReturn, HSCRIPT hScope); + bool ExecuteCodeCallback(const SQChar* const name); private: bool unk_00;