diff --git a/src/client/game/ui_scripting/types.cpp b/src/client/game/ui_scripting/types.cpp index db012e0b..125bf380 100644 --- a/src/client/game/ui_scripting/types.cpp +++ b/src/client/game/ui_scripting/types.cpp @@ -352,37 +352,4 @@ namespace ui_scripting { return this->call({}); } - - /*************************************************************** - * Stack - **************************************************************/ - - stack::stack() - { - this->state = *game::hks::lua_state; - } - - void stack::save(int num_args) - { - this->num_args_ = num_args; - this->num_calls_ = state->m_numberOfCCalls; - this->base_bottom_ = state->m_apistack.base - state->m_apistack.bottom; - this->top_bottom_ = state->m_apistack.top - state->m_apistack.bottom; - this->callstack_ = state->m_callStack.m_current - state->m_callStack.m_records; - } - - void stack::fix() - { - this->state->m_numberOfCCalls = this->num_calls_; - - game::hks::closePendingUpvalues(this->state, &this->state->m_apistack.bottom[this->top_bottom_ - this->num_args_]); - this->state->m_callStack.m_current = &this->state->m_callStack.m_records[this->callstack_]; - - this->state->m_apistack.base = &this->state->m_apistack.bottom[this->base_bottom_]; - this->state->m_apistack.top = &this->state->m_apistack.bottom[this->top_bottom_ - static_cast(this->num_args_ + 1)]; - - this->state->m_apistack.bottom[this->top_bottom_].t = this->state->m_apistack.top[-1].t; - this->state->m_apistack.bottom[this->top_bottom_].v.ptr = this->state->m_apistack.top[-1].v.ptr; - this->state->m_apistack.top = &this->state->m_apistack.bottom[this->top_bottom_ + 1]; - } -} \ No newline at end of file +} diff --git a/src/client/game/ui_scripting/types.hpp b/src/client/game/ui_scripting/types.hpp index 3dd23be6..d5e94b4b 100644 --- a/src/client/game/ui_scripting/types.hpp +++ b/src/client/game/ui_scripting/types.hpp @@ -137,28 +137,4 @@ namespace ui_scripting int ref{}; }; - - class stack final - { - public: - stack(); - - void save(int num_args); - void fix(); - - stack(stack&&) = delete; - stack(const stack&) = delete; - stack& operator=(stack&&) = delete; - stack& operator=(const stack&) = delete; - - private: - game::hks::lua_State* state; - - int num_args_; - int num_calls_; - - uint64_t base_bottom_; - uint64_t top_bottom_; - uint64_t callstack_; - }; -} \ No newline at end of file +}