#include "classes.h" // 00694490 EntityConfig_Player::EntityConfig_Player() { this->_id = -1; (this->_name)._buf[0] = '\0'; (this->_name)._buf[1] = '\0'; (this->_name)._buf[2] = '\0'; (this->_name)._buf[3] = '\0'; (this->_name)._size = 0; (this->_name)._capacity = 0xf; (this->_skinPath)._buf[0] = '\0'; (this->_skinPath)._buf[1] = '\0'; (this->_skinPath)._buf[2] = '\0'; (this->_skinPath)._buf[3] = '\0'; (this->_skinPath)._size = 0; (this->_skinPath)._capacity = 0xf; (this->_nameImagePath)._buf[0] = '\0'; (this->_nameImagePath)._buf[1] = '\0'; (this->_nameImagePath)._buf[2] = '\0'; (this->_nameImagePath)._buf[3] = '\0'; (this->_nameImagePath)._size = 0; (this->_nameImagePath)._capacity = 0xf; (this->_portraitPath)._buf[0] = '\0'; (this->_portraitPath)._buf[1] = '\0'; (this->_portraitPath)._buf[2] = '\0'; (this->_portraitPath)._buf[3] = '\0'; (this->_portraitPath)._size = 0; (this->_portraitPath)._capacity = 0xf; (this->_unkString)._buf[0] = '\0'; (this->_unkString)._buf[1] = '\0'; (this->_unkString)._buf[2] = '\0'; (this->_unkString)._buf[3] = '\0'; (this->_unkString)._size = 0; (this->_unkString)._capacity = 0xf; (this->_extraPortraitPath)._buf[0] = '\0'; (this->_extraPortraitPath)._buf[1] = '\0'; (this->_extraPortraitPath)._buf[2] = '\0'; (this->_extraPortraitPath)._buf[3] = '\0'; (this->_extraPortraitPath)._size = 0; (this->_extraPortraitPath)._capacity = 0xf; (this->_costumeSuffixName)._buf[0] = '\0'; (this->_costumeSuffixName)._buf[1] = '\0'; (this->_costumeSuffixName)._buf[2] = '\0'; (this->_costumeSuffixName)._buf[3] = '\0'; (this->_costumeSuffixName)._size = 0; (this->_costumeSuffixName)._capacity = 0xf; this->_costumeID = -1; this->_heart = 0; this->_armor = 0; this->_blackHeart = 0; this->_coins = 0; this->_bombs = 0; this->_keys = 0; this->_card = 0; this->_pill = 0; this->_canShoot = 1; (this->_collectibles)._begin = (void *)0x0; (this->_collectibles)._end = (void *)0x0; (this->_collectibles)._capacity = (void *)0x0; this->_trinket = 0; this->_skinColor = 0; this->_achievement = -1; this->_brokenHeart = 0; this->_pocketActiveID = 0; (this->_birthrightDescription)._buf[0] = '\0'; (this->_birthrightDescription)._buf[1] = '\0'; (this->_birthrightDescription)._buf[2] = '\0'; (this->_birthrightDescription)._buf[3] = '\0'; (this->_birthrightDescription)._size = 0; (this->_birthrightDescription)._capacity = 0xf; (this->_bSkinParentName)._buf[0] = '\0'; (this->_bSkinParentName)._buf[1] = '\0'; (this->_bSkinParentName)._buf[2] = '\0'; (this->_bSkinParentName)._buf[3] = '\0'; (this->_bSkinParentName)._size = 0; (this->_bSkinParentName)._capacity = 0xf; this->_moddedTaintedPlayerID = -1; this->_hidden = 0; this->_modEntry = (void *)0x0; this->_renderCustomBackground = 0; this->_moddedMenuBackgroundANM2 = (void *)0x0; this->_moddedMenuPortraitANM2 = (void *)0x0; this->_moddedGameOverANM2 = (void *)0x0; this->_moddedCoopMenuANM2 = (void *)0x0; this->_moddedControlsANM2 = (void *)0x0; return this; } // 00694de0 std_string * EntityConfig_Player::GetDisplayName(std_string *outName, void *unused) { int language; std_string *textEnd; uint8_t *text; uint8_t isFound; Manager *manager; char *textChar; manager = g_manager; if ((this->_name)._size == 0) { text = &s_empty; } else { text = GHIDRA_CAST(&this->_name); if (0xf < (this->_name)._capacity) { text = *GHIDRA_CAST((GHIDRA_CAST(text))->_buf); } language = *GHIDRA_CAST(&g_manager->_stringTable); if ((GHIDRA_CAST(text))->_buf[0] == '#') { isFound = 0; StringTable::get_string (&g_manager->_stringTable,GHIDRA_CAST("Players"),language, GHIDRA_CAST(((GHIDRA_CAST(text))->_buf + 1)),&isFound); if (isFound == 0) { isFound = 0; text = StringTable::get_string (&manager->_stringTable,GHIDRA_CAST("Players"),language, GHIDRA_CAST(((GHIDRA_CAST(text))->_buf + 1)),&isFound); } } } 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(text); do { textChar = textEnd->_buf; textEnd = GHIDRA_CAST((textEnd->_buf + 1)); } while (*textChar != '\0'); (GHIDRA_CAST((outName->_buf)))->msvc::string::assign(text,GHIDRA_INT(textEnd) - GHIDRA_INT(((GHIDRA_CAST(text))->_buf + 1))); return outName; } // 0069b810 EntityConfig_Player * EntityConfig_Player::operator_assign(EntityConfig_Player *other) { void *pvVar1; undefined3 uVar2; EntityConfig_Player *pEVar3; size_t collectiblesBytes; std_string *srcText; std_vector *collectibles; void *gameOverAnm2; void *menuPortraitAnm2; pEVar3 = other; this->_id = other->_id; srcText = &other->_name; if (&this->_name != srcText) { if (0xf < (other->_name)._capacity) { srcText = *GHIDRA_CAST(srcText->_buf); } (GHIDRA_CAST(((this->_name)._buf)))->msvc::string::assign(GHIDRA_CAST(srcText),(other->_name)._size); } srcText = &other->_skinPath; if (&this->_skinPath != srcText) { if (0xf < (other->_skinPath)._capacity) { srcText = *GHIDRA_CAST(srcText->_buf); } (GHIDRA_CAST(((this->_skinPath)._buf)))->msvc::string::assign(GHIDRA_CAST(srcText),(other->_skinPath)._size); } srcText = &other->_nameImagePath; if (&this->_nameImagePath != srcText) { if (0xf < (other->_nameImagePath)._capacity) { srcText = *GHIDRA_CAST(srcText->_buf); } (GHIDRA_CAST(((this->_nameImagePath)._buf)))->msvc::string::assign(GHIDRA_CAST(srcText),(other->_nameImagePath)._size); } srcText = &other->_portraitPath; if (&this->_portraitPath != srcText) { if (0xf < (other->_portraitPath)._capacity) { srcText = *GHIDRA_CAST(srcText->_buf); } (GHIDRA_CAST(((this->_portraitPath)._buf)))->msvc::string::assign(GHIDRA_CAST(srcText),(other->_portraitPath)._size); } srcText = &other->_unkString; if (&this->_unkString != srcText) { if (0xf < (other->_unkString)._capacity) { srcText = *GHIDRA_CAST(srcText->_buf); } (GHIDRA_CAST(((this->_unkString)._buf)))->msvc::string::assign(GHIDRA_CAST(srcText),(other->_unkString)._size); } srcText = &other->_extraPortraitPath; if (&this->_extraPortraitPath != srcText) { if (0xf < (other->_extraPortraitPath)._capacity) { srcText = *GHIDRA_CAST(srcText->_buf); } (GHIDRA_CAST(((this->_extraPortraitPath)._buf)))->msvc::string::assign(GHIDRA_CAST(srcText), (other->_extraPortraitPath)._size); } srcText = &other->_costumeSuffixName; if (&this->_costumeSuffixName != srcText) { if (0xf < (other->_costumeSuffixName)._capacity) { srcText = *GHIDRA_CAST(srcText->_buf); } (GHIDRA_CAST(((this->_costumeSuffixName)._buf)))->msvc::string::assign(GHIDRA_CAST(srcText), (other->_costumeSuffixName)._size); } this->_costumeID = other->_costumeID; this->_heart = other->_heart; this->_armor = other->_armor; this->_blackHeart = other->_blackHeart; this->_coins = other->_coins; this->_bombs = other->_bombs; this->_keys = other->_keys; this->_card = other->_card; this->_pill = other->_pill; collectibles = &this->_collectibles; this->_canShoot = other->_canShoot; if (collectibles != &other->_collectibles) { pvVar1 = (other->_collectibles)._begin; collectiblesBytes = GHIDRA_INT((other->_collectibles)._end) - GHIDRA_INT(pvVar1); other = collectibles->_begin; if (GHIDRA_UINT((GHIDRA_INT((this->_collectibles)._capacity) - GHIDRA_INT(other) >> 2)) < GHIDRA_UINT((GHIDRA_INT(collectiblesBytes) >> 2))) { msvc::vector::reserve_clear(GHIDRA_INT(collectiblesBytes) >> 2); other = collectibles->_begin; } memmove(other,pvVar1,collectiblesBytes); (this->_collectibles)._end = (void *)(GHIDRA_INT(other) + collectiblesBytes); } this->_trinket = pEVar3->_trinket; this->_skinColor = pEVar3->_skinColor; this->_achievement = pEVar3->_achievement; this->_brokenHeart = pEVar3->_brokenHeart; this->_pocketActiveID = pEVar3->_pocketActiveID; srcText = &pEVar3->_birthrightDescription; if (&this->_birthrightDescription != srcText) { if (0xf < (pEVar3->_birthrightDescription)._capacity) { srcText = *GHIDRA_CAST(srcText->_buf); } (GHIDRA_CAST(((this->_birthrightDescription)._buf)))->msvc::string::assign(GHIDRA_CAST(srcText), (pEVar3->_birthrightDescription)._size); } srcText = &pEVar3->_bSkinParentName; if (&this->_bSkinParentName != srcText) { if (0xf < (pEVar3->_bSkinParentName)._capacity) { srcText = *GHIDRA_CAST(srcText->_buf); } (GHIDRA_CAST(((this->_bSkinParentName)._buf)))->msvc::string::assign(GHIDRA_CAST(srcText), (pEVar3->_bSkinParentName)._size); } this->_moddedTaintedPlayerID = pEVar3->_moddedTaintedPlayerID; this->_hidden = pEVar3->_hidden; this->_modEntry = pEVar3->_modEntry; uVar2 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((pEVar3)) + 0x131)))); pvVar1 = pEVar3->_moddedMenuBackgroundANM2; menuPortraitAnm2 = pEVar3->_moddedMenuPortraitANM2; gameOverAnm2 = pEVar3->_moddedGameOverANM2; this->_renderCustomBackground = pEVar3->_renderCustomBackground; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x131)))) = uVar2; this->_moddedMenuBackgroundANM2 = pvVar1; this->_moddedMenuPortraitANM2 = menuPortraitAnm2; this->_moddedGameOverANM2 = gameOverAnm2; pvVar1 = pEVar3->_moddedControlsANM2; this->_moddedCoopMenuANM2 = pEVar3->_moddedCoopMenuANM2; this->_moddedControlsANM2 = pvVar1; return this; } // 0069e6c0 void EntityConfig_Player::copy_constructor(EntityConfig_Player *dst, EntityConfig_Player *src) { undefined3 uVar1; void *local_10; uint8_t *puStack_c; uint32_t local_8; void *anm2Ptr; void *gameOverAnm2; void *menuPortraitAnm2; local_8 = 0xffffffff; puStack_c = &LAB_00af9ee1; local_10 = ExceptionList; ExceptionList = &local_10; dst->_id = src->_id; (GHIDRA_CAST(((dst->_name)._buf)))->msvc::string::string(&src->_name); local_8 = 0; (GHIDRA_CAST(((dst->_skinPath)._buf)))->msvc::string::string(&src->_skinPath); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 1; (GHIDRA_CAST(((dst->_nameImagePath)._buf)))->msvc::string::string(&src->_nameImagePath); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 2; (GHIDRA_CAST(((dst->_portraitPath)._buf)))->msvc::string::string(&src->_portraitPath); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 3; (GHIDRA_CAST(((dst->_unkString)._buf)))->msvc::string::string(&src->_unkString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 4; (GHIDRA_CAST(((dst->_extraPortraitPath)._buf)))->msvc::string::string(&src->_extraPortraitPath); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 5; (GHIDRA_CAST(((dst->_costumeSuffixName)._buf)))->msvc::string::string(&src->_costumeSuffixName); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 6; dst->_costumeID = src->_costumeID; dst->_heart = src->_heart; dst->_armor = src->_armor; dst->_blackHeart = src->_blackHeart; dst->_coins = src->_coins; dst->_bombs = src->_bombs; dst->_keys = src->_keys; dst->_card = src->_card; dst->_pill = src->_pill; dst->_canShoot = src->_canShoot; msvc::vector::copy_constructor(&src->_collectibles); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 7; dst->_trinket = src->_trinket; dst->_skinColor = src->_skinColor; dst->_achievement = src->_achievement; dst->_brokenHeart = src->_brokenHeart; dst->_pocketActiveID = src->_pocketActiveID; (GHIDRA_CAST(((dst->_birthrightDescription)._buf)))->msvc::string::string(&src->_birthrightDescription); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),8); (GHIDRA_CAST(((dst->_bSkinParentName)._buf)))->msvc::string::string(&src->_bSkinParentName); dst->_moddedTaintedPlayerID = src->_moddedTaintedPlayerID; dst->_hidden = src->_hidden; dst->_modEntry = src->_modEntry; uVar1 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((src)) + 0x131)))); anm2Ptr = src->_moddedMenuBackgroundANM2; menuPortraitAnm2 = src->_moddedMenuPortraitANM2; gameOverAnm2 = src->_moddedGameOverANM2; dst->_renderCustomBackground = src->_renderCustomBackground; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((dst)) + 0x131)))) = uVar1; dst->_moddedMenuBackgroundANM2 = anm2Ptr; dst->_moddedMenuPortraitANM2 = menuPortraitAnm2; dst->_moddedGameOverANM2 = gameOverAnm2; anm2Ptr = src->_moddedControlsANM2; dst->_moddedCoopMenuANM2 = src->_moddedCoopMenuANM2; dst->_moddedControlsANM2 = anm2Ptr; ExceptionList = local_10; return; }