Files
isaac-port/generated-src/entity_config_entity.cpp
T
shweetandClaude Opus 5.5 837aa06518 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>
2026-11-19 22:13:25 -05:00

53 lines
1.9 KiB
C++

#include "classes.h"
// 00694d20
std_string * EntityConfig_Entity::GetName(std_string *outName, uint32_t language)
{
std_string *textEnd;
uint8_t *text;
uint32_t resolvedLanguage;
char *ch;
StringTable *stringTable;
if ((this->name)._size == 0) {
text = &s_empty;
}
else {
text = GHIDRA_CAST<uint8_t *>(&this->name);
if (0xf < (this->name)._capacity) {
text = *GHIDRA_CAST<uint8_t **>((GHIDRA_CAST<std_string *>(text))->_buf);
}
resolvedLanguage = language;
if (language == 0x14) {
resolvedLanguage = *GHIDRA_CAST<uint32_t *>(&g_manager->_stringTable);
}
stringTable = &g_manager->_stringTable;
if ((GHIDRA_CAST<std_string *>(text))->_buf[0] == '#') {
language = language & 0xffffff;
StringTable::get_string
(stringTable,GHIDRA_CAST<uint8_t *>("Entities"),resolvedLanguage,
GHIDRA_CAST<uint8_t *>(((GHIDRA_CAST<std_string *>(text))->_buf + 1)),GHIDRA_CAST<uint8_t *>((GHIDRA_INT(&language) + 3)));
if ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(language)) + 0x3))) == '\0') {
language = language & 0xffffff;
text = StringTable::get_string
(stringTable,GHIDRA_CAST<uint8_t *>("Entities"),resolvedLanguage,
GHIDRA_CAST<uint8_t *>(((GHIDRA_CAST<std_string *>(text))->_buf + 1)),GHIDRA_CAST<uint8_t *>((GHIDRA_INT(&language) + 3)));
}
}
}
outName->_buf[0] = '\0';
outName->_buf[1] = '\0';
outName->_buf[2] = '\0';
outName->_buf[3] = '\0';
outName->_size = 0;
outName->_capacity = 0xf;
outName->_buf[0] = '\0';
textEnd = GHIDRA_CAST<std_string *>(text);
do {
ch = textEnd->_buf;
textEnd = GHIDRA_CAST<std_string *>((textEnd->_buf + 1));
} while (*ch != '\0');
(GHIDRA_CAST<msvc::string *>((outName->_buf)))->msvc::string::assign(text,GHIDRA_INT(textEnd) - GHIDRA_INT(((GHIDRA_CAST<std_string *>(text))->_buf + 1)));
return outName;
}