Curation round 1: 66 boot-path functions rewritten in src/; the game links into a Linux executable

Six agents took over ANM2/AnimationState/LayerState, ItemConfig, EntityConfig, StringTable/Font/FormattedText/RichText,
OptionsConfig/ChallengeParams and ModManager/ModEntry functions (FormattedText::parse checked against a transliteration
of its assembly on 200,000 random inputs). 174 field rows and 32 names from the round are merged into db/.
source_tree.py: a struct or class src/*.h defines is no longer emitted in classes.h (class takeover) and gets no stubs;
data labels get stub definitions. build/isaac links (64-bit ELF) and stops at the first function not reconstructed:
IsaacMain. Boot path 64/615 functions curated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-11-19 22:13:25 -05:00
1 parent 8c31c98a81
commit 837aa06518
63 files changed
+10557 -12054

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
#include "classes.h"
#include "log.h"
#include "msvc.h"
#include <cstdio>
// The font path buffer the game formats into (MAX_PATH + 1).
constexpr int FONT_PATH_SIZE = 0x104;
constexpr int LOG_MESSAGE_SIZE = 1024;
constexpr const char* TEXT_ICONS_PATH = "gfx/ui/text_icons.anm2";
// Icon id to its image, in RichTextIcon::_images.
using IconImageNode = MsvcTreeNode<int, TexturePtr>;
LAYOUT32(sizeof(IconImageNode) == 0x1c);
static char* string_text(std_string& text)
{
return (char*)((msvc::string*)&text)->c_str();
}
// 009efb60 Loads the font at fontPath and, the first time, the icons drawn inline with the text, which it then fits to
// the font's line height. A path too long for the buffer is cut short and terminated, which the game left unterminated.
void RichText::load_font(std_string* fontPath)
{
char path[FONT_PATH_SIZE];
if (fontPath != &_fontPath) ((msvc::string*)&_fontPath)->assign((uint8_t*)string_text(*fontPath), fontPath->_size);
snprintf(path, sizeof(path), "%s", string_text(_fontPath));
_font.Unload();
_font.Load((uint8_t*)path, false);
if (!_font._isLoaded)
{
char message[LOG_MESSAGE_SIZE];
snprintf(message, sizeof(message), "Failed to load font: %s \n", path);
KAGE_LogMessage(LOG_ASSERT, (uint8_t*)message);
}
if (!_icons)
{
std_string iconsPath;
_icons = (RichTextIcon*)operator_new(sizeof(RichTextIcon));
_icons->constructor();
_icons->_maxHeight = 0;
_icons->_iconType = 0;
_icons->_iconId = 0;
_icons->_images = tree_create<IconImageNode>();
((msvc::string*)&iconsPath)->string_from_cstr((uint8_t*)TEXT_ICONS_PATH);
_icons->Load(&iconsPath, true);
((msvc::string*)&iconsPath)->_Tidy_deallocate();
}
_icons->_maxHeight = _font._lineHeight;
}