The decompiled C++ tree moves to generated-src/ (classes.h, C++20); src/ is for code written by hand. A curated function defines the generated declaration and starts its comment with its address, and source_tree.py stops emitting that body. src/rng.cpp takes over RNG (SetSeed, the constructor, Next, RandomInt, RandomFloat, Shuffle) with the shift table read from the exe as a constexpr array; src/log.h names KAGE_LogMessage's levels (1 INFO, 2 NET, 4 WARN, 8 ERROR, 16 ASSERT, from its prefix jump table). CMakeLists.txt builds src/*.cpp against generated-src/classes.h (clean with -Wall -Wextra). structs.hpp and headers.py are retired: scripts/merge_fields.py writes the merged field list, classes.h checks the layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
60 lines
1.9 KiB
C++
60 lines
1.9 KiB
C++
#include "classes.h"
|
|
|
|
// 0085b050
|
|
void LobbySettings::reset()
|
|
{
|
|
std_string *passwordData;
|
|
std_string *seedData;
|
|
void *local_10;
|
|
undefined1 *puStack_c;
|
|
undefined4 local_8;
|
|
MenuManager *menuManager;
|
|
|
|
puStack_c = &LAB_00b03826;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
(this->_seed)._buf[0] = '\0';
|
|
(this->_seed)._buf[1] = '\0';
|
|
(this->_seed)._buf[2] = '\0';
|
|
(this->_seed)._buf[3] = '\0';
|
|
(this->_seed)._size = 0;
|
|
(this->_seed)._capacity = 0xf;
|
|
(this->_seed)._buf[0] = '\0';
|
|
(this->_password)._buf[0] = '\0';
|
|
(this->_password)._buf[1] = '\0';
|
|
(this->_password)._buf[2] = '\0';
|
|
(this->_password)._buf[3] = '\0';
|
|
(this->_password)._size = 0;
|
|
(this->_password)._capacity = 0xf;
|
|
(this->_password)._buf[0] = '\0';
|
|
*GHIDRA_CAST<undefined4 *>((this + 1)) = 0;
|
|
this[1]._gameMode = 0;
|
|
this[1]._challenge = 0;
|
|
local_8 = 2;
|
|
seedData = &this->_seed;
|
|
*GHIDRA_CAST<undefined4 *>(this) = 0;
|
|
this->_gameMode = 0;
|
|
this->_challenge = 0;
|
|
this->_maxPlayers = 4;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x10))) = 1;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x14)))) = 0;
|
|
if (0xf < (this->_seed)._capacity) {
|
|
seedData = *GHIDRA_CAST<std_string **>((this->_seed)._buf);
|
|
}
|
|
(this->_seed)._size = 0;
|
|
passwordData = &this->_password;
|
|
seedData->_buf[0] = '\0';
|
|
if (0xf < (this->_password)._capacity) {
|
|
passwordData = *GHIDRA_CAST<std_string **>((this->_password)._buf);
|
|
}
|
|
(this->_password)._size = 0;
|
|
passwordData->_buf[0] = '\0';
|
|
menuManager = g_menuManager;
|
|
this[1]._gameMode = *GHIDRA_CAST<int *>((this + 1));
|
|
if ((menuManager != GHIDRA_CAST<MenuManager *>(0x0)) && (this == &g_manager->_lobbySettings)) {
|
|
(GHIDRA_CAST<Menu_OnlineLobby *>((&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((menuManager)) + 0xdce8))))))->Menu_OnlineLobby::init_lobby_view();
|
|
}
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|