- 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>
120 lines
4.3 KiB
C++
120 lines
4.3 KiB
C++
#include "classes.h"
|
|
|
|
// 0095fd70
|
|
void Cutscene::TemporaryPart::vfunc_1()
|
|
{
|
|
uint8_t *extraout_EAX;
|
|
uint8_t *extraout_EAX_00;
|
|
uint8_t *fontPath;
|
|
void *ptr;
|
|
char *pcVar1;
|
|
uint32_t uVar2;
|
|
char *terminusPath [4];
|
|
uint32_t terminusPathSize;
|
|
uint32_t terminusPathCapacity;
|
|
void *redirectedPath [4];
|
|
uint32_t redirectedPathSize;
|
|
uint32_t redirectedPathCapacity;
|
|
char *pathText [4];
|
|
uint32_t pathTextSize;
|
|
uint32_t pathTextCapacity;
|
|
uint32_t local_14;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
char *local_8;
|
|
Manager *manager;
|
|
|
|
manager = g_manager;
|
|
local_8 = GHIDRA_CAST<char *>(0xffffffff);
|
|
puStack_c = &LAB_00b0c7f5;
|
|
local_10 = ExceptionList;
|
|
local_14 = __security_cookie ^ GHIDRA_UINT((pathText + 10));
|
|
ExceptionList = &local_10;
|
|
pathText[0] = msvc::_Allocate(0x20);
|
|
pathTextSize = 0x1b;
|
|
pathTextCapacity = 0x1f;
|
|
builtin_strncpy(pathText[0],"font/TeamMeatFont20Bold.fnt",0x1c);
|
|
local_8 = GHIDRA_CAST<char *>(0x0);
|
|
ModManager::TryRedirectPath
|
|
(GHIDRA_CAST<ModManager *>(&manager->_modManager),GHIDRA_CAST<std_string *>(redirectedPath),GHIDRA_CAST<std_string *>(pathText)
|
|
);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 1;
|
|
fontPath = extraout_EAX;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((extraout_EAX + 0x14))) {
|
|
fontPath = *GHIDRA_CAST<uint8_t **>(extraout_EAX);
|
|
}
|
|
Font::Load(GHIDRA_CAST<Font *>((GHIDRA_INT(this) + 0x40)),fontPath,0);
|
|
local_8 = GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(local_8))) + 0x1))) << 8));
|
|
if (0xf < redirectedPathCapacity) {
|
|
uVar2 = redirectedPathCapacity + 1;
|
|
ptr = redirectedPath[0];
|
|
if (0xfff < uVar2) {
|
|
ptr = *(void **)(GHIDRA_INT(redirectedPath[0]) + -4);
|
|
uVar2 = redirectedPathCapacity + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(redirectedPath[0]) + (-4 - GHIDRA_INT(ptr))))) goto LAB_0095fe96;
|
|
}
|
|
operator_delete(ptr,uVar2);
|
|
}
|
|
local_8 = GHIDRA_CAST<char *>(0xffffffff);
|
|
redirectedPathSize = 0;
|
|
redirectedPathCapacity = 0xf;
|
|
redirectedPath[0] = (void *)(GHIDRA_UINT(redirectedPath[0]) & 0xffffff00);
|
|
if (0xf < pathTextCapacity) {
|
|
uVar2 = pathTextCapacity + 1;
|
|
pcVar1 = pathText[0];
|
|
if (0xfff < uVar2) {
|
|
pcVar1 = *GHIDRA_CAST<char **>((pathText[0] + -4));
|
|
uVar2 = pathTextCapacity + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < pathText[0] + (-4 - GHIDRA_INT(pcVar1))) {
|
|
LAB_0095fe96:
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(pcVar1,uVar2);
|
|
}
|
|
manager = g_manager;
|
|
terminusPath[0] = msvc::_Allocate(0x20);
|
|
terminusPathSize = 0x11;
|
|
terminusPathCapacity = 0x1f;
|
|
builtin_strncpy(terminusPath[0],"font/terminus.fnt",0x12);
|
|
local_8 = GHIDRA_CAST<char *>(0x2);
|
|
ModManager::TryRedirectPath
|
|
(GHIDRA_CAST<ModManager *>(&manager->_modManager),GHIDRA_CAST<std_string *>(pathText),GHIDRA_CAST<std_string *>(terminusPath));
|
|
local_8 = GHIDRA_CAST<char *>(CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),3));
|
|
fontPath = extraout_EAX_00;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((extraout_EAX_00 + 0x14))) {
|
|
fontPath = *GHIDRA_CAST<uint8_t **>(extraout_EAX_00);
|
|
}
|
|
Font::Load(GHIDRA_CAST<Font *>((GHIDRA_INT(this) + 0x8c)),fontPath,0);
|
|
if (0xf < pathTextCapacity) {
|
|
uVar2 = pathTextCapacity + 1;
|
|
pcVar1 = pathText[0];
|
|
if (0xfff < uVar2) {
|
|
pcVar1 = *GHIDRA_CAST<char **>((pathText[0] + -4));
|
|
uVar2 = pathTextCapacity + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < pathText[0] + (-4 - GHIDRA_INT(pcVar1))) goto LAB_0095ff7d;
|
|
}
|
|
operator_delete(pcVar1,uVar2);
|
|
}
|
|
pathTextSize = 0;
|
|
pathTextCapacity = 0xf;
|
|
pathText[0] = GHIDRA_CAST<char *>((GHIDRA_UINT(pathText[0]) & 0xffffff00));
|
|
if (0xf < terminusPathCapacity) {
|
|
uVar2 = terminusPathCapacity + 1;
|
|
pcVar1 = terminusPath[0];
|
|
if (0xfff < uVar2) {
|
|
pcVar1 = *GHIDRA_CAST<char **>((terminusPath[0] + -4));
|
|
uVar2 = terminusPathCapacity + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < terminusPath[0] + (-4 - GHIDRA_INT(pcVar1))) {
|
|
LAB_0095ff7d:
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(pcVar1,uVar2);
|
|
}
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|