Files
isaac-port/generated-src/lobby_password_prompt.cpp
T
shweetandClaude Opus 5.5 780767f5e1 Curation round 2, wave A: anm2 (Anm2Ed JSON), text, config as idiomatic classes; SDL3 platform opens a window
- anm2.h/.cpp take over ANM2, AnimationState, LayerState, AnmCache and the frame data. They read Anm2Ed's JSON documents
  with simdjson and play them as the game does (interpolation baked at load). src/anm2/ and msvc.h are retired.
- font, formatted_text, string_table and rich_text take over the text classes. FormattedText::parse is still bit-exact
  against its assembly.
- options_config and challenge_params take over OptionsConfig, ChallengeParams and the .ini helpers. The tests include
  Save's exact bytes.
- platform.h/.cpp and main.cpp run IsaacMain on SDL3: the window and GL context open, and the run stops at the first
  built-in shader (FUN_00a13fa0).
- source_tree.py: a taken-over parent stays bytes, taken-over methods are not re-emitted as a namespace, and every
  address in a (a, b, c to d) list on a comment counts as taken over.
- log.h: reconstruction_missing() for a taken-over class's methods that are not written yet.
206 functions taken over, boot path 89/615. The full build waits for wave B: item_config, entity_config and mod_manager
still use the old APIs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 23:04:54 -05:00

234 lines
8.0 KiB
C++

#include "classes.h"
// 009c61e0
void LobbyPasswordPrompt::open(uint32_t param_1, uint8_t param_2, int *param_3)
{
char isLastRef;
uint32_t uVar1;
uint8_t *title;
int in_ECX;
uint8_t *passwordData;
uint32_t uVar2;
uint32_t uVar3;
void *local_10;
uint8_t *puStack_c;
uint32_t local_8;
puStack_c = &LAB_00b0ef7d;
local_10 = ExceptionList;
uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U;
ExceptionList = &local_10;
local_8 = 0;
if ((*GHIDRA_CAST<int *>((in_ECX + 0x34)) == 0) || (*GHIDRA_CAST<char *>((in_ECX + 0x44)) == '\0')) {
passwordData = GHIDRA_CAST<uint8_t *>((in_ECX + 0x134));
if (0xf < *GHIDRA_CAST<uint32_t *>((in_ECX + 0x148))) {
passwordData = *GHIDRA_CAST<uint8_t **>((in_ECX + 0x134));
}
*GHIDRA_CAST<uint32_t *>((in_ECX + 0x144)) = 0;
*passwordData = 0;
uVar2 = 0x9c6249;
(GHIDRA_CAST<msvc::shared_ptr *>(((void *)(in_ECX + 0x150))))->msvc::shared_ptr::assign(&param_2);
uVar3 = 0x9c6250;
FUN_00837510();
title = string_table_translate(&g_manager->_stringTable,GHIDRA_CAST<uint8_t *>("#Online/LOBBY_JOIN_PASS_CHECK"))
;
FUN_00837660(title,uVar2,uVar3);
}
local_8 = 1;
if (param_3 != GHIDRA_CAST<int *>(0x0)) {
isLastRef = (**(code **)(*param_3 + 0xc))(uVar1);
if ((isLastRef != '\0') && (g_lobbyReleaseFn != (void *)0x0)) {
(*g_lobbyReleaseFn)(&param_2);
}
}
ExceptionList = local_10;
return;
}
// 009c63a0
void LobbyPasswordPrompt::Update()
{
char isTriggered;
uint32_t uVar1;
uint8_t *wrongPassText;
uint32_t in_stack_fffffeac;
uint32_t in_stack_fffffeb0;
uint32_t uVar2;
uint8_t popup [84];
uint8_t local_d0 [12];
uint8_t local_c4 [12];
uint32_t local_b8;
uint32_t local_b4;
uint32_t local_b0;
uint32_t local_ac;
uint32_t local_a8;
uint32_t local_a4;
Vector local_7c;
uint32_t confirmAction;
int soundId [7];
char local_54 [24];
char local_3c [40];
uint32_t local_14;
void *local_10;
uint8_t *puStack_c;
uint32_t local_8;
Manager *manager;
local_8 = 0xffffffff;
puStack_c = &LAB_00b0efb8;
local_10 = ExceptionList;
uVar1 = __security_cookie ^ GHIDRA_UINT((local_3c + 0x38));
ExceptionList = &local_10;
if ((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x34)) != 0) && (*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(this) + 0x44)) != '\0')) {
local_14 = uVar1;
ANM2::update_appear_then_idle(this);
isTriggered = FUN_00837610(uVar1);
if (isTriggered != '\0') {
handle_direction_input();
confirmAction = 0xe;
uVar2 = 0x9c6423;
isTriggered = (**(code **)(PTR_vftable_00c57b18 + 0x74))
(0xffffffff,FUN_00a20940,&confirmAction,0,0);
manager = g_manager;
if (isTriggered != '\0') {
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x144)) == 8) {
KAGE::Network::Multiplayer::ConstLobby::ConstLobby<copy>((void *)(GHIDRA_INT(this) + 0x14c));
FUN_0085b160(in_stack_fffffeac,in_stack_fffffeb0,uVar2);
local_8 = 0;
isTriggered = FUN_0040c790();
if (isTriggered == '\0') {
FUN_009c62c0();
manager = g_manager;
soundId[0] = 0xbb;
seed_fart_sound_override(soundId);
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(soundId[0],1.0,2,0,1.0,0.0);
wrongPassText =
string_table_translate
(&g_manager->_stringTable,GHIDRA_CAST<uint8_t *>("#Online/LOBBY_JOIN_PASS_WRONG_PASS"));
FUN_009c62c0();
local_7c.x = (float)&DAT_bf800000;
local_7c.y = (float)&DAT_bf800000;
MessagePopup::MessagePopup
(popup,&g_manager->_font2_TeamMeatEx12,(void *)0x0,(void *)0x0,&local_7c);
local_8 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),1);
MessagePopup::add_ok_button(wrongPassText,popup);
(GHIDRA_CAST<PopupQueue *>((&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0xcf0))))))->PopupQueue::push(popup);
local_a8 = 0;
local_a4 = 0;
local_b0 = 0;
local_ac = 0;
local_b8 = 0;
local_b4 = 0;
FID_conflict__Tidy(local_c4);
FID_conflict__Tidy(local_d0);
}
else {
NetplayManager::join_pending_lobby
(GHIDRA_CAST<NetplayManager *>(&g_manager->_netplayManager),(void *)(GHIDRA_INT(this) + 0x14c));
FUN_009c62c0();
}
local_8 = 0xffffffff;
msvc::vector<Vector>::_Tidy();
(GHIDRA_CAST<msvc::string *>((local_3c)))->msvc::string::_Tidy_deallocate();
(GHIDRA_CAST<msvc::string *>((local_54)))->msvc::string::_Tidy_deallocate();
}
else {
soundId[0] = 0xbb;
seed_fart_sound_override(soundId);
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(soundId[0],1.0,2,0,1.0,0.0);
}
}
local_7c.y = 2.10195e-44;
isTriggered = (**(code **)(PTR_vftable_00c57b18 + 0x74))
(0xffffffff,FUN_00a209e0,&local_7c.y,0,0);
if (isTriggered != '\0') {
FUN_009c62c0();
}
}
}
ExceptionList = local_10;
return;
}
// 009c6650
void LobbyPasswordPrompt::handle_direction_input()
{
char isPressed;
int newLength;
int in_ECX;
uint32_t *passwordBuf;
uint8_t *text;
uint32_t keyCode;
if (*GHIDRA_CAST<uint32_t *>((in_ECX + 0x144)) < 8) {
keyCode = 0x57;
isPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&keyCode,0,0);
if (isPressed == '\0') {
keyCode = 0x41;
isPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&keyCode,0,0);
if (isPressed == '\0') {
keyCode = 0x53;
isPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&keyCode,0,0);
if (isPressed == '\0') {
keyCode = 0x44;
isPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&keyCode,0,0);
if (isPressed == '\0') {
keyCode = 0x109;
isPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&keyCode,0,0);
if (isPressed == '\0') {
keyCode = 0x107;
isPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&keyCode,0,0);
if (isPressed == '\0') {
keyCode = 0x108;
isPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&keyCode,0,0);
if (isPressed == '\0') {
keyCode = 0x106;
isPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))
(0,FUN_00a207d0,&keyCode,0,0);
if (isPressed == '\0') goto LAB_009c680c;
text = &DAT_00b6312c;
}
else {
text = &DAT_00b63160;
}
}
else {
text = &DAT_00b6315c;
}
}
else {
text = &DAT_00b75e80;
}
}
else {
text = &DAT_00b66140;
}
}
else {
text = &DAT_00b6614c;
}
}
else {
text = &DAT_00b656e8;
}
}
else {
text = &DAT_00b75e7c;
}
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>((in_ECX + 0x134)))))->msvc::string::append(text,1);
}
LAB_009c680c:
keyCode = 0x103;
isPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&keyCode,0,0);
if ((isPressed != '\0') && (*GHIDRA_CAST<int *>((in_ECX + 0x144)) != 0)) {
passwordBuf = GHIDRA_CAST<uint32_t *>((in_ECX + 0x134));
newLength = *GHIDRA_CAST<int *>((in_ECX + 0x144)) + -1;
if (0xf < *GHIDRA_CAST<uint32_t *>((in_ECX + 0x148))) {
passwordBuf = GHIDRA_CAST<uint32_t *>(*passwordBuf);
}
*GHIDRA_CAST<int *>((in_ECX + 0x144)) = newLength;
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(passwordBuf) + newLength)) = 0;
}
return;
}