Decompile fn_20939 (TreeSubMap::Clear)
Batch #3592 by bigodeira: 0 byte-identical, 1 confirmed by peer review. - fn_20939 TreeSubMap::Clear: logic confirmed by peer review Peer-reviewed-by: eAthena, meitogi, Lumen Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
daf42a19d4
commit
29de3b1d3f
1 changed files with 41 additions and 0 deletions
|
|
@ -5,6 +5,47 @@ extern "C" {
|
|||
#include <lua.h>
|
||||
}
|
||||
|
||||
// GLOBAL: gl_24849
|
||||
void* g_entryQueueMgr = nullptr;
|
||||
|
||||
struct TreeSubNode {
|
||||
TreeSubNode* left;
|
||||
TreeSubNode* parent;
|
||||
TreeSubNode* right;
|
||||
char color;
|
||||
char isnil;
|
||||
};
|
||||
|
||||
struct TreeSubMap {
|
||||
TreeSubNode* head;
|
||||
unsigned int size;
|
||||
|
||||
void Clear();
|
||||
void EraseSubtree(TreeSubMap& al, TreeSubNode* node);
|
||||
};
|
||||
|
||||
// OFFSET: 0x00CA4AE0
|
||||
// FUNCTION: fn_20939
|
||||
void TreeSubMap::Clear() {
|
||||
TreeSubNode* cur = this->head->parent;
|
||||
while (cur->isnil == 0) {
|
||||
this->EraseSubtree(*this, cur->right);
|
||||
TreeSubNode* next = cur->left;
|
||||
::operator delete(cur, 0x18);
|
||||
cur = next;
|
||||
}
|
||||
this->head->parent = this->head;
|
||||
this->head->left = this->head;
|
||||
this->head->right = this->head;
|
||||
this->size = 0;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CA4B60
|
||||
// FUNCTION: fn_20940
|
||||
void* sub_CA4B60() {
|
||||
return g_entryQueueMgr;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CA4CF0
|
||||
// FUNCTION: fn_20941
|
||||
NLuaState::NLuaState() : m_state(nullptr), m_isValid(false) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue