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

+29 -116
View File
@@ -162,39 +162,6 @@ void Font::SetMissingCharacterOverride(uint32_t param_2)
return;
}
// 00a1a640
Font::Font()
{
void *mapHead;
void *local_10;
uint8_t *puStack_c;
uint32_t local_8;
puStack_c = &LAB_00b111a0;
local_10 = ExceptionList;
ExceptionList = &local_10;
*GHIDRA_CAST<uint8_t *>(this) = 0;
this->_numChars = 0;
this->_chars = (void *)0x0;
(this->_kerningPairs)._begin = (void *)0x0;
(this->_kerningPairs)._end = (void *)0x0;
(this->_kerningPairs)._capacity = (void *)0x0;
local_8 = 0;
this->_numPages = 0;
this->_pageTextures = (void *)0x0;
(this->_charsBlock)._head = (void *)0x0;
(this->_charsBlock)._size = 0;
mapHead = operator_new(0x18);
*(void **)mapHead = mapHead;
*(void **)(GHIDRA_CAST<char *>(mapHead) + 4) = mapHead;
*(void **)(GHIDRA_CAST<char *>(mapHead) + 8) = mapHead;
*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(mapHead) + 0xc)) = 0x101;
(this->_charsBlock)._head = mapHead;
this->_missingCharacter = -1;
ExceptionList = local_10;
return this;
}
// 00a1a730
void Font::Load(uint8_t *path, uint8_t unusedIsLoading)
{
@@ -318,7 +285,7 @@ LAB_00a1a835:
pageTextures = pageTextures + 1;
*pageTextures = uVar7;
_eh_vector_constructor_iterator_
(pageTextures,8,uVar7,GHIDRA_CAST<_func_void_void_ptr *>(&LAB_0040c5b0),FUN_0040c440);
(pageTextures,8,uVar7,GHIDRA_CAST<_func_void_void_ptr *>(&LAB_0040c5b0),TexturePtr::release);
}
local_42c = 0;
local_424->_pageTextures = pageTextures;
@@ -513,7 +480,7 @@ void Font::Unload()
if (pvVar1 != (void *)0x0) {
pageTexturesHeader = GHIDRA_CAST<uint32_t *>((GHIDRA_INT(pvVar1) + -4));
local_8 = 1;
_eh_vector_destructor_iterator_(pvVar1,8,*pageTexturesHeader,FUN_0040c440);
_eh_vector_destructor_iterator_(pvVar1,8,*pageTexturesHeader,TexturePtr::release);
operator_delete(pageTexturesHeader,*pageTexturesHeader * 8 + 4);
this->_pageTextures = (void *)0x0;
}
@@ -724,32 +691,36 @@ void Font::SetMissingCharacter(uint32_t character)
return;
}
// 00a1b4a0
int Font::get_kerning(uint32_t second, uint32_t first)
// 00a1b410
uint32_t Font::get_glyph_index(uint32_t param_1, uint32_t param_2)
{
uint32_t count;
uint32_t half;
uint32_t *pair;
uint32_t *pairsEnd;
uint32_t uVar1;
int in_ECX;
int iVar2;
uint8_t local_14 [8];
int local_c;
int local_8;
pairsEnd = (this->_kerningPairs)._end;
pair = (this->_kerningPairs)._begin;
count = GHIDRA_INT(pairsEnd) - GHIDRA_INT(pair) >> 4;
if (0 < GHIDRA_INT(count)) {
do {
half = count >> 1;
if ((pair[half * 4 + 1] <= second) &&
((pair[half * 4 + 1] < second || (pair[half * 4] < first)))) {
pair = pair + half * 4 + 4;
half = count + (-1 - half);
}
count = half;
} while (0 < GHIDRA_INT(half));
local_8 = in_ECX;
_Find_lower_bound<>(local_14,&param_1);
uVar1 = param_2;
if ((*GHIDRA_CAST<char *>((local_c + 0xd)) == '\0') && (*GHIDRA_CAST<uint32_t *>((local_c + 0x10)) <= param_1)) {
iVar2 = *GHIDRA_CAST<int *>((in_ECX + 0x40));
if (local_c != iVar2) {
return *GHIDRA_CAST<uint32_t *>((local_c + 0x14));
}
}
if (((pair == pairsEnd) || (*pair != first)) || (pair[1] != second)) {
return 0;
else {
iVar2 = *GHIDRA_CAST<int *>((in_ECX + 0x40));
}
return GHIDRA_INT((short)pair[2]);
if (param_2 != 0xffffffff) {
_Find_lower_bound<>(local_14,&param_2);
if (((*GHIDRA_CAST<char *>((local_c + 0xd)) == '\0') && (*GHIDRA_CAST<uint32_t *>((local_c + 0x10)) <= uVar1)) &&
(local_c != iVar2)) {
return *GHIDRA_CAST<uint32_t *>((local_c + 0x14));
}
}
return *GHIDRA_CAST<uint32_t *>((local_8 + 0x48));
}
// 00a1b580
@@ -795,7 +766,7 @@ void Font::render_glyph(uint32_t ch, uint8_t unknown, uint32_t *prevChar, float
void *glyphs;
local_20.y = (float)this;
glyphIndex = FUN_00a1b410(ch,*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(glyphContext) + 0x10)));
glyphIndex = Font::get_glyph_index(ch,*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(glyphContext) + 0x10)));
if (glyphIndex == -1) {
return;
}
@@ -873,64 +844,6 @@ void Font::render_glyph(uint32_t ch, uint8_t unknown, uint32_t *prevChar, float
return;
}
// 00a1b8e0
int Font::get_string_width_n(uint8_t *str, int length)
{
int kerning;
uint32_t width;
uint32_t ch;
int glyphIndex;
uint32_t local_30;
uint32_t prevChar;
uint8_t *cursor;
uint32_t nextChar [2];
uint8_t *textBegin;
uint8_t *textEnd;
uint8_t findResult [8];
void *charNode;
if ((*GHIDRA_CAST<char *>(this) == '\0') || (str == GHIDRA_CAST<uint8_t *>(0x0))) {
return 0;
}
FUN_00a55a50(str,length);
if (textEnd <= textBegin) {
return 0;
}
local_30 = 0;
cursor = utf8_decode_next(textBegin,&local_30,textEnd);
ch = local_30;
prevChar = 0;
local_30 = 0;
width = 0;
if (ch != 0) {
do {
nextChar[0] = ch;
_Find_lower_bound<>(findResult,nextChar);
if (((*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(charNode) + 0xd)) == '\0') && (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(charNode) + 0x10)) <= ch)) &&
(charNode != (this->_charsBlock)._head)) {
glyphIndex = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(charNode) + 0x14));
}
else {
glyphIndex = this->_missingCharacter;
}
if (glyphIndex != -1) {
kerning = get_kerning(this,prevChar,ch);
local_30 = local_30 + (*GHIDRA_CAST<short *>((GHIDRA_CAST<char *>(this->_chars) + glyphIndex * 0x14 + 0x10)) - kerning);
prevChar = ch;
}
if (textEnd <= cursor) break;
nextChar[0] = 0;
cursor = utf8_decode_next(cursor,nextChar,textEnd);
ch = nextChar[0];
} while (nextChar[0] != 0);
width = local_30;
}
if (GHIDRA_INT(width) < 0) {
width = 0;
}
return width;
}
// 00a1ba10
int Font::get_string_width_utf16(short *text, int length)
{