Beta matching MxVariableTable (#811)

This commit is contained in:
MS
2024-04-17 05:31:48 -04:00
committed by GitHub
parent 2600b1b421
commit 536c4336f3
7 changed files with 115 additions and 54 deletions

View File

@@ -3,9 +3,11 @@
#include <assert.h>
// GLOBAL: LEGO1 0x1010141c
// GLOBAL: BETA10 0x10201f88
MxU32 MxCore::g_nextCoreId = 0;
// FUNCTION: LEGO1 0x100ae1a0
// FUNCTION: BETA10 0x1012c020
MxCore::MxCore()
{
m_id = g_nextCoreId++;
@@ -13,11 +15,13 @@ MxCore::MxCore()
}
// FUNCTION: LEGO1 0x100ae1e0
// FUNCTION: BETA10 0x1012c077
MxCore::~MxCore()
{
}
// FUNCTION: LEGO1 0x100ae1f0
// FUNCTION: BETA10 0x1012c096
MxLong MxCore::Notify(MxParam& p_param)
{
assert(0);

View File

@@ -1,18 +1,20 @@
#include "mxvariabletable.h"
// FUNCTION: LEGO1 0x100b7330
// FUNCTION: BETA10 0x1012a470
MxS8 MxVariableTable::Compare(MxVariable* p_var0, MxVariable* p_var1)
{
return p_var0->GetKey()->Compare(*p_var1->GetKey());
}
// FUNCTION: LEGO1 0x100b7370
// FUNCTION: BETA10 0x1012a4a0
MxU32 MxVariableTable::Hash(MxVariable* p_var)
{
const char* str = p_var->GetKey()->GetData();
MxU32 value = 0;
for (int i = 0; str[i]; i++) {
for (MxS32 i = 0; str[i]; i++) {
value += str[i];
}
@@ -20,6 +22,7 @@ MxU32 MxVariableTable::Hash(MxVariable* p_var)
}
// FUNCTION: LEGO1 0x100b73a0
// FUNCTION: BETA10 0x1012a507
void MxVariableTable::SetVariable(const char* p_key, const char* p_value)
{
MxHashTableCursor<MxVariable*> cursor(this);
@@ -36,12 +39,12 @@ void MxVariableTable::SetVariable(const char* p_key, const char* p_value)
}
// FUNCTION: LEGO1 0x100b7740
// FUNCTION: BETA10 0x1012a629
void MxVariableTable::SetVariable(MxVariable* p_var)
{
MxHashTableCursor<MxVariable*> cursor(this);
MxBool found = cursor.Find(p_var);
if (found) {
if (cursor.Find(p_var)) {
cursor.DeleteMatch();
}
@@ -49,6 +52,7 @@ void MxVariableTable::SetVariable(MxVariable* p_var)
}
// FUNCTION: LEGO1 0x100b78f0
// FUNCTION: BETA10 0x1012a6bd
const char* MxVariableTable::GetVariable(const char* p_key)
{
// STRING: ISLE 0x41008c

View File

@@ -77,6 +77,7 @@ void MxOmni::SetInstance(MxOmni* p_instance)
}
// FUNCTION: LEGO1 0x100af0c0
// FUNCTION: BETA10 0x1012f3ff
MxResult MxOmni::Create(MxOmniCreateParam& p_param)
{
MxResult result = FAILURE;