- 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>
2471 lines
99 KiB
C++
2471 lines
99 KiB
C++
#include "classes.h"
|
|
|
|
// 008d6b30
|
|
void Menu_Collection::render_item_pool_icons(int collectibleId, Vector *position)
|
|
{
|
|
Menu_Collection *topAnimState = this;
|
|
uint8_t bVar1;
|
|
int iVar2;
|
|
Vector *pVVar3;
|
|
uint8_t *strCursor;
|
|
uint32_t cmpResult;
|
|
char *iconAnimName;
|
|
AnimationState *topAnimState;
|
|
void *pools;
|
|
void *ptr;
|
|
uint8_t *curAnimation;
|
|
bool isLess;
|
|
float fVar4;
|
|
void *poolsBegin;
|
|
int poolsEnd;
|
|
int poolsCapacity;
|
|
Vector iconPos;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00b05f4d;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
fVar4 = position->x;
|
|
iconPos.y = position->y;
|
|
iconPos.x = fVar4;
|
|
iVar2 = FUN_008d69d0(collectibleId);
|
|
if (1 < iVar2) {
|
|
iconPos.x = fVar4 - ((float)iVar2 - 1.0) * 16.0 * 0.5;
|
|
}
|
|
poolsBegin = (void *)0x0;
|
|
poolsEnd = 0;
|
|
poolsCapacity = 0;
|
|
local_8 = 0;
|
|
(GHIDRA_CAST<ItemPool *>((&g_game->_itemPool)))->ItemPool::GetItemPoolsForCollectible(collectibleId,&poolsBegin);
|
|
pVVar3 = GHIDRA_CAST<Vector *>((poolsEnd - GHIDRA_INT(poolsBegin) >> 2));
|
|
position = GHIDRA_CAST<Vector *>(0x0);
|
|
pools = poolsBegin;
|
|
if (pVVar3 == GHIDRA_CAST<Vector *>(0x0)) {
|
|
LAB_008d7c66:
|
|
if (pools != (void *)0x0) {
|
|
cmpResult = poolsCapacity - GHIDRA_INT(pools) & 0xfffffffc;
|
|
ptr = pools;
|
|
if (0xfff < cmpResult) {
|
|
ptr = *(void **)(GHIDRA_CAST<char *>(pools) + -4);
|
|
cmpResult = cmpResult + 0x23;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(pools) + (-4 - GHIDRA_INT(ptr))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(ptr,cmpResult);
|
|
}
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
LAB_008d6c00:
|
|
if ((g_game->_difficulty != 2) && (g_game->_difficulty != 3)) {
|
|
iVar2 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pools) + GHIDRA_INT(position) * 4));
|
|
if (iVar2 == 0) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d7371;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconTreasureRoom";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7353;
|
|
if (bVar1 == 0) goto LAB_008d734f;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7353;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d7358;
|
|
}
|
|
if (iVar2 == 1) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconShop";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7448;
|
|
if (bVar1 == 0) goto LAB_008d7444;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7448;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d744d;
|
|
}
|
|
goto LAB_008d7466;
|
|
}
|
|
if (iVar2 == 2) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBoss";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d74b0;
|
|
if (bVar1 == 0) goto LAB_008d74ac;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d74b0;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d74b5;
|
|
}
|
|
goto LAB_008d74ce;
|
|
}
|
|
if (iVar2 == 4) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconAngelRoom";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7520;
|
|
if (bVar1 == 0) goto LAB_008d751c;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7520;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d7525;
|
|
}
|
|
goto LAB_008d753e;
|
|
}
|
|
if (iVar2 == 3) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconDevilRoom";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7588;
|
|
if (bVar1 == 0) goto LAB_008d7584;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7588;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d758d;
|
|
}
|
|
goto LAB_008d75a6;
|
|
}
|
|
if (iVar2 == 5) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconSecretRoom";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d75f4;
|
|
if (bVar1 == 0) goto LAB_008d75f0;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d75f4;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d75f9;
|
|
}
|
|
goto LAB_008d7612;
|
|
}
|
|
if (iVar2 != 6) {
|
|
if (iVar2 != 0xc) {
|
|
if (iVar2 == 0x1a) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconPlanetarium";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) {
|
|
LAB_008d6f00:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
goto LAB_008d6f05;
|
|
}
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d6f00;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
LAB_008d6f05:
|
|
if ((cmpResult == 0) &&
|
|
((curAnimation[0x34] == 0 ||
|
|
((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0')))) goto LAB_008d7bea;
|
|
}
|
|
iconAnimName = "IconPlanetarium";
|
|
goto LAB_008d7378;
|
|
}
|
|
if (iVar2 != 8) {
|
|
if (iVar2 != 9) {
|
|
if (iVar2 != 0x1d) {
|
|
if (iVar2 != 10) {
|
|
if (iVar2 != 0xb) {
|
|
if (iVar2 != 0xd) {
|
|
if (iVar2 != 0xe) {
|
|
if (iVar2 != 0x19) {
|
|
if (iVar2 != 0x1e) {
|
|
if (iVar2 != 0x18) {
|
|
if (iVar2 != 0x17) goto LAB_008d7c59;
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset)
|
|
[2];
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconSlot";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7b90;
|
|
if (bVar1 == 0) goto LAB_008d7b8c;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7b90;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d7b95;
|
|
}
|
|
goto LAB_008d7ba6;
|
|
}
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2])
|
|
;
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconUltraSecretRoom";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7b20;
|
|
if (bVar1 == 0) goto LAB_008d7b1c;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7b20;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d7b25;
|
|
}
|
|
goto LAB_008d7b3e;
|
|
}
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBeggar";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7a80;
|
|
if (bVar1 == 0) goto LAB_008d7a7c;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7a80;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d7a85;
|
|
}
|
|
goto LAB_008d7a96;
|
|
}
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBeggar";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d79e1;
|
|
if (bVar1 == 0) goto LAB_008d79dd;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d79e1;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d79e6;
|
|
}
|
|
goto LAB_008d79f7;
|
|
}
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBeggar";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7193;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7193;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d718f:
|
|
cmpResult = 0;
|
|
goto LAB_008d7198;
|
|
}
|
|
goto LAB_008d71b1;
|
|
}
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBeggar";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d78f2;
|
|
if (bVar1 == 0) goto LAB_008d78ee;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d78f2;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d78f7;
|
|
}
|
|
goto LAB_008d7908;
|
|
}
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBeggar";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7858;
|
|
if (bVar1 == 0) goto LAB_008d7854;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7858;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d785d;
|
|
}
|
|
goto LAB_008d786e;
|
|
}
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBeggar";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d77c3;
|
|
if (bVar1 == 0) goto LAB_008d77bf;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d77c3;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d77c8;
|
|
}
|
|
goto LAB_008d77d9;
|
|
}
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "ItemPoolChests";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7038;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7038;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d7034:
|
|
cmpResult = 0;
|
|
goto LAB_008d703d;
|
|
}
|
|
goto LAB_008d7056;
|
|
}
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "ItemPoolChests";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d6fd0;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d6fd0;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d6fcc:
|
|
cmpResult = 0;
|
|
goto LAB_008d6fd5;
|
|
}
|
|
goto LAB_008d6fee;
|
|
}
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "ItemPoolChests";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d6f68;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d6f68;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d6f64:
|
|
cmpResult = 0;
|
|
goto LAB_008d6f6d;
|
|
}
|
|
goto LAB_008d6f86;
|
|
}
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d767e;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconCurseRoom";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7660;
|
|
if (bVar1 == 0) goto LAB_008d765c;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7660;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d7665;
|
|
}
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
LAB_008d6e61:
|
|
iconAnimName = "IconLibrary";
|
|
goto LAB_008d7378;
|
|
}
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconLibrary";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) {
|
|
LAB_008d6e43:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
goto LAB_008d6e48;
|
|
}
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d6e43;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
LAB_008d6e48:
|
|
if ((cmpResult != 0) ||
|
|
((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0'))))
|
|
goto LAB_008d6e61;
|
|
goto LAB_008d7bea;
|
|
}
|
|
iVar2 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pools) + GHIDRA_INT(position) * 4));
|
|
if (iVar2 == 0) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconTreasureRoom";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7353;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7353;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d734f:
|
|
cmpResult = 0;
|
|
goto LAB_008d7358;
|
|
}
|
|
goto LAB_008d7371;
|
|
}
|
|
if (iVar2 == 0x10) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconTreasureRoomGreed";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) {
|
|
LAB_008d73e0:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
goto LAB_008d73e5;
|
|
}
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d73e0;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
LAB_008d73e5:
|
|
if ((cmpResult == 0) &&
|
|
((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0'))))
|
|
goto LAB_008d7bea;
|
|
}
|
|
iconAnimName = "IconTreasureRoomGreed";
|
|
goto LAB_008d7378;
|
|
}
|
|
if (iVar2 == 0x12) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconShop";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7448;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7448;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d7444:
|
|
cmpResult = 0;
|
|
goto LAB_008d744d;
|
|
}
|
|
goto LAB_008d7466;
|
|
}
|
|
if (iVar2 == 0x11) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBoss";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d74b0;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d74b0;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d74ac:
|
|
cmpResult = 0;
|
|
goto LAB_008d74b5;
|
|
}
|
|
goto LAB_008d74ce;
|
|
}
|
|
if (iVar2 == 0x14) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconAngelRoom";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7520;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7520;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d751c:
|
|
cmpResult = 0;
|
|
goto LAB_008d7525;
|
|
}
|
|
goto LAB_008d753e;
|
|
}
|
|
if (iVar2 == 0x13) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconDevilRoom";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7588;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7588;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d7584:
|
|
cmpResult = 0;
|
|
goto LAB_008d758d;
|
|
}
|
|
goto LAB_008d75a6;
|
|
}
|
|
if (iVar2 == 0x16) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconSecretRoom";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d75f4;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d75f4;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d75f0:
|
|
cmpResult = 0;
|
|
goto LAB_008d75f9;
|
|
}
|
|
goto LAB_008d7612;
|
|
}
|
|
if (iVar2 == 0x15) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconCurseRoom";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7660;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7660;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d765c:
|
|
cmpResult = 0;
|
|
goto LAB_008d7665;
|
|
}
|
|
goto LAB_008d767e;
|
|
}
|
|
if (iVar2 == 8) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d6f86;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "ItemPoolChests";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d6f68;
|
|
if (bVar1 == 0) goto LAB_008d6f64;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d6f68;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d6f6d;
|
|
}
|
|
if (iVar2 == 9) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d6fee;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "ItemPoolChests";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d6fd0;
|
|
if (bVar1 == 0) goto LAB_008d6fcc;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d6fd0;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d6fd5;
|
|
}
|
|
if (iVar2 == 0x1d) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d7056;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "ItemPoolChests";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7038;
|
|
if (bVar1 == 0) goto LAB_008d7034;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7038;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d703d;
|
|
}
|
|
if (iVar2 == 10) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d77d9;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBeggar";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d77c3;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d77c3;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d77bf:
|
|
cmpResult = 0;
|
|
goto LAB_008d77c8;
|
|
}
|
|
if (iVar2 == 0xb) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d786e;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBeggar";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7858;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7858;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d7854:
|
|
cmpResult = 0;
|
|
goto LAB_008d785d;
|
|
}
|
|
if (iVar2 == 0xd) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d7908;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBeggar";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d78f2;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d78f2;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d78ee:
|
|
cmpResult = 0;
|
|
goto LAB_008d78f7;
|
|
}
|
|
if (iVar2 == 0xe) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d71b1;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBeggar";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7193;
|
|
if (bVar1 == 0) goto LAB_008d718f;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7193;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
goto LAB_008d7198;
|
|
}
|
|
if (iVar2 == 0x19) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d79f7;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBeggar";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d79e1;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d79e1;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d79dd:
|
|
cmpResult = 0;
|
|
goto LAB_008d79e6;
|
|
}
|
|
if (iVar2 == 0x1e) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d7a96;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconBeggar";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7a80;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7a80;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d7a7c:
|
|
cmpResult = 0;
|
|
goto LAB_008d7a85;
|
|
}
|
|
if (iVar2 == 0x18) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d7b3e;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconUltraSecretRoom";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7b20;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7b20;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d7b1c:
|
|
cmpResult = 0;
|
|
goto LAB_008d7b25;
|
|
}
|
|
if (iVar2 == 0x17) {
|
|
curAnimation = GHIDRA_CAST<uint8_t *>((topAnimState->DeathScreenSprite)._championColor._offset[2]);
|
|
if (curAnimation == GHIDRA_CAST<uint8_t *>(0x0)) goto LAB_008d7ba6;
|
|
strCursor = curAnimation;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((curAnimation + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(curAnimation);
|
|
}
|
|
iconAnimName = "IconSlot";
|
|
do {
|
|
bVar1 = *strCursor;
|
|
isLess = bVar1 < (uint8_t)*iconAnimName;
|
|
if (bVar1 != *iconAnimName) goto LAB_008d7b90;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = strCursor[1];
|
|
isLess = bVar1 < (uint8_t)iconAnimName[1];
|
|
if (bVar1 != iconAnimName[1]) goto LAB_008d7b90;
|
|
strCursor = strCursor + 2;
|
|
iconAnimName = iconAnimName + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_008d7b8c:
|
|
cmpResult = 0;
|
|
goto LAB_008d7b95;
|
|
}
|
|
goto LAB_008d7c59;
|
|
LAB_008d7b90:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d7b95:
|
|
if ((cmpResult != 0) ||
|
|
((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) {
|
|
LAB_008d7ba6:
|
|
iconAnimName = "IconSlot";
|
|
goto LAB_008d7bad;
|
|
}
|
|
goto LAB_008d7bce;
|
|
LAB_008d7b20:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d7b25:
|
|
if ((cmpResult == 0) &&
|
|
((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0'))))
|
|
goto LAB_008d7bea;
|
|
LAB_008d7b3e:
|
|
iconAnimName = "IconUltraSecretRoom";
|
|
goto LAB_008d7378;
|
|
LAB_008d7a80:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d7a85:
|
|
if ((cmpResult != 0) ||
|
|
((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) {
|
|
LAB_008d7a96:
|
|
iconAnimName = "IconBeggar";
|
|
goto LAB_008d7a9d;
|
|
}
|
|
goto LAB_008d7abe;
|
|
LAB_008d79e1:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d79e6:
|
|
if ((cmpResult != 0) ||
|
|
((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) {
|
|
LAB_008d79f7:
|
|
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((topAnimState->DeathScreenSprite)._color._offset),GHIDRA_CAST<uint8_t *>("IconBeggar")
|
|
,1);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind
|
|
(GHIDRA_CAST<AnimationState *>(((topAnimState->DeathScreenSprite)._championColor._offset + 1)));
|
|
*GHIDRA_CAST<uint8_t *>(&(topAnimState->DeathScreenSprite)._shadowLayerIndex) = 1;
|
|
}
|
|
}
|
|
if ((topAnimState->DeathScreenSprite)._championColor._offset[2] == 0.0) goto LAB_008d7bea;
|
|
fVar4 = 4.0;
|
|
goto LAB_008d7bdf;
|
|
LAB_008d7193:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d7198:
|
|
if ((cmpResult != 0) ||
|
|
((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) {
|
|
LAB_008d71b1:
|
|
iconAnimName = "IconBeggar";
|
|
LAB_008d7bad:
|
|
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((topAnimState->DeathScreenSprite)._color._offset),GHIDRA_CAST<uint8_t *>(iconAnimName)
|
|
,1);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind
|
|
(GHIDRA_CAST<AnimationState *>(((topAnimState->DeathScreenSprite)._championColor._offset + 1)));
|
|
*GHIDRA_CAST<uint8_t *>(&(topAnimState->DeathScreenSprite)._shadowLayerIndex) = 1;
|
|
}
|
|
}
|
|
LAB_008d7bce:
|
|
if ((topAnimState->DeathScreenSprite)._championColor._offset[2] == 0.0) goto LAB_008d7bea;
|
|
fVar4 = 5.0;
|
|
goto LAB_008d7bdf;
|
|
LAB_008d78f2:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d78f7:
|
|
if ((cmpResult != 0) ||
|
|
((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) {
|
|
LAB_008d7908:
|
|
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((topAnimState->DeathScreenSprite)._color._offset),GHIDRA_CAST<uint8_t *>("IconBeggar")
|
|
,1);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind
|
|
(GHIDRA_CAST<AnimationState *>(((topAnimState->DeathScreenSprite)._championColor._offset + 1)));
|
|
*GHIDRA_CAST<uint8_t *>(&(topAnimState->DeathScreenSprite)._shadowLayerIndex) = 1;
|
|
}
|
|
}
|
|
if ((topAnimState->DeathScreenSprite)._championColor._offset[2] == 0.0) goto LAB_008d7bea;
|
|
fVar4 = 3.0;
|
|
goto LAB_008d7bdf;
|
|
LAB_008d7858:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d785d:
|
|
if ((cmpResult != 0) ||
|
|
((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) {
|
|
LAB_008d786e:
|
|
iconAnimName = "IconBeggar";
|
|
goto LAB_008d7875;
|
|
}
|
|
goto LAB_008d7896;
|
|
LAB_008d77c3:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d77c8:
|
|
if ((cmpResult != 0) ||
|
|
((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) {
|
|
LAB_008d77d9:
|
|
iconAnimName = "IconBeggar";
|
|
goto LAB_008d77e0;
|
|
}
|
|
goto LAB_008d7801;
|
|
LAB_008d7038:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d703d:
|
|
if ((cmpResult != 0) ||
|
|
((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) {
|
|
LAB_008d7056:
|
|
iconAnimName = "ItemPoolChests";
|
|
LAB_008d7875:
|
|
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((topAnimState->DeathScreenSprite)._color._offset),GHIDRA_CAST<uint8_t *>(iconAnimName)
|
|
,1);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind
|
|
(GHIDRA_CAST<AnimationState *>(((topAnimState->DeathScreenSprite)._championColor._offset + 1)));
|
|
*GHIDRA_CAST<uint8_t *>(&(topAnimState->DeathScreenSprite)._shadowLayerIndex) = 1;
|
|
}
|
|
}
|
|
LAB_008d7896:
|
|
if ((topAnimState->DeathScreenSprite)._championColor._offset[2] == 0.0) goto LAB_008d7bea;
|
|
fVar4 = 2.0;
|
|
goto LAB_008d7bdf;
|
|
LAB_008d6fd0:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d6fd5:
|
|
if ((cmpResult != 0) ||
|
|
((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) {
|
|
LAB_008d6fee:
|
|
iconAnimName = "ItemPoolChests";
|
|
LAB_008d7a9d:
|
|
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((topAnimState->DeathScreenSprite)._color._offset),GHIDRA_CAST<uint8_t *>(iconAnimName)
|
|
,1);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind
|
|
(GHIDRA_CAST<AnimationState *>(((topAnimState->DeathScreenSprite)._championColor._offset + 1)));
|
|
*GHIDRA_CAST<uint8_t *>(&(topAnimState->DeathScreenSprite)._shadowLayerIndex) = 1;
|
|
}
|
|
}
|
|
LAB_008d7abe:
|
|
if ((topAnimState->DeathScreenSprite)._championColor._offset[2] == 0.0) goto LAB_008d7bea;
|
|
fVar4 = 1.0;
|
|
goto LAB_008d7bdf;
|
|
LAB_008d6f68:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d6f6d:
|
|
if ((cmpResult != 0) ||
|
|
((curAnimation[0x34] != 0 && ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex == '\0')))) {
|
|
LAB_008d6f86:
|
|
iconAnimName = "ItemPoolChests";
|
|
LAB_008d77e0:
|
|
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((topAnimState->DeathScreenSprite)._color._offset),GHIDRA_CAST<uint8_t *>(iconAnimName)
|
|
,1);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind
|
|
(GHIDRA_CAST<AnimationState *>(((topAnimState->DeathScreenSprite)._championColor._offset + 1)));
|
|
*GHIDRA_CAST<uint8_t *>(&(topAnimState->DeathScreenSprite)._shadowLayerIndex) = 1;
|
|
}
|
|
}
|
|
LAB_008d7801:
|
|
if ((topAnimState->DeathScreenSprite)._championColor._offset[2] == 0.0) goto LAB_008d7bea;
|
|
fVar4 = 0.0;
|
|
LAB_008d7bdf:
|
|
AnimationState::SetFrameFloat
|
|
(GHIDRA_CAST<AnimationState *>(((topAnimState->DeathScreenSprite)._championColor._offset + 1)),fVar4);
|
|
goto LAB_008d7bea;
|
|
LAB_008d7660:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d7665:
|
|
if ((cmpResult == 0) &&
|
|
((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0'))))
|
|
goto LAB_008d7bea;
|
|
LAB_008d767e:
|
|
iconAnimName = "IconCurseRoom";
|
|
goto LAB_008d7378;
|
|
LAB_008d75f4:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d75f9:
|
|
if ((cmpResult == 0) &&
|
|
((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0'))))
|
|
goto LAB_008d7bea;
|
|
LAB_008d7612:
|
|
iconAnimName = "IconSecretRoom";
|
|
goto LAB_008d7378;
|
|
LAB_008d7588:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d758d:
|
|
if ((cmpResult == 0) &&
|
|
((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0'))))
|
|
goto LAB_008d7bea;
|
|
LAB_008d75a6:
|
|
iconAnimName = "IconDevilRoom";
|
|
goto LAB_008d7378;
|
|
LAB_008d7520:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d7525:
|
|
if ((cmpResult == 0) &&
|
|
((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0'))))
|
|
goto LAB_008d7bea;
|
|
LAB_008d753e:
|
|
iconAnimName = "IconAngelRoom";
|
|
goto LAB_008d7378;
|
|
LAB_008d74b0:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d74b5:
|
|
if ((cmpResult == 0) &&
|
|
((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0'))))
|
|
goto LAB_008d7bea;
|
|
LAB_008d74ce:
|
|
iconAnimName = "IconBoss";
|
|
goto LAB_008d7378;
|
|
LAB_008d7448:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d744d:
|
|
if ((cmpResult == 0) &&
|
|
((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0'))))
|
|
goto LAB_008d7bea;
|
|
LAB_008d7466:
|
|
iconAnimName = "IconShop";
|
|
goto LAB_008d7378;
|
|
LAB_008d7353:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
LAB_008d7358:
|
|
if ((cmpResult == 0) &&
|
|
((curAnimation[0x34] == 0 || ((char)(topAnimState->DeathScreenSprite)._shadowLayerIndex != '\0'))))
|
|
goto LAB_008d7bea;
|
|
LAB_008d7371:
|
|
iconAnimName = "IconTreasureRoom";
|
|
LAB_008d7378:
|
|
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((topAnimState->DeathScreenSprite)._color._offset),GHIDRA_CAST<uint8_t *>(iconAnimName),1
|
|
);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind(GHIDRA_CAST<AnimationState *>(((topAnimState->DeathScreenSprite)._championColor._offset + 1)))
|
|
;
|
|
*GHIDRA_CAST<uint8_t *>(&(topAnimState->DeathScreenSprite)._shadowLayerIndex) = 1;
|
|
}
|
|
LAB_008d7bea:
|
|
if (*GHIDRA_CAST<char *>((GHIDRA_INT(&topAnimState[1].CollectionMenuSprite._nullLayerNames) + 1)) != '\0') {
|
|
if ((char)topAnimState[1].HoldInputTimer == '\0') {
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>(((topAnimState->DeathScreenSprite)._championColor._offset + 1)),&iconPos,
|
|
&g_vectorZero,&g_vectorZero);
|
|
topAnimState = GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((topAnimState)) + 0x240))));
|
|
}
|
|
else {
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((topAnimState)) + 0x240)))),&iconPos,&g_vectorZero,&g_vectorZero);
|
|
topAnimState = GHIDRA_CAST<AnimationState *>(((topAnimState->DeathScreenSprite)._championColor._offset + 1));
|
|
}
|
|
AnimationState::Render(topAnimState,&iconPos,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
iconPos.x = iconPos.x + 16.0;
|
|
pools = poolsBegin;
|
|
LAB_008d7c59:
|
|
position = GHIDRA_CAST<Vector *>((GHIDRA_INT(&position->x) + 1));
|
|
if (pVVar3 <= position) goto LAB_008d7c66;
|
|
goto LAB_008d6c00;
|
|
}
|
|
|
|
// 0094e800
|
|
void Menu_Collection::destructor()
|
|
{
|
|
char isLastImageRef;
|
|
uint32_t uVar1;
|
|
int in_ECX;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00afb440;
|
|
local_10 = ExceptionList;
|
|
uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U;
|
|
ExceptionList = &local_10;
|
|
if (GHIDRA_UINT((*GHIDRA_CAST<int *>((in_ECX + 600)) - *GHIDRA_CAST<int *>((in_ECX + 0x250)) >> 2)) < 0x2dd) {
|
|
msvc::vector<unsigned_int>::_Reallocate(0x2dd);
|
|
}
|
|
FID_conflict__Tidy((void *)(in_ECX + 0x250));
|
|
local_8 = 0;
|
|
if (*GHIDRA_CAST<int **>((in_ECX + 0x244)) != GHIDRA_CAST<int *>(0x0)) {
|
|
isLastImageRef = (**(code **)(**GHIDRA_CAST<int **>((in_ECX + 0x244)) + 0xc))(uVar1);
|
|
if ((isLastImageRef != '\0') && (g_imageReleaseFn != (void *)0x0)) {
|
|
(*g_imageReleaseFn)(in_ECX + 0x240);
|
|
}
|
|
}
|
|
local_8 = 1;
|
|
ANM2::Reset(GHIDRA_CAST<ANM2 *>((in_ECX + 0x128)));
|
|
AnimationState::~AnimationState(GHIDRA_CAST<AnimationState *>((in_ECX + 0x178)));
|
|
AnimationState::~AnimationState(GHIDRA_CAST<AnimationState *>((in_ECX + 0x158)));
|
|
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>((in_ECX + 0x140)))))->msvc::string::_Tidy_deallocate();
|
|
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>((in_ECX + 0x128)))))->msvc::string::_Tidy_deallocate();
|
|
local_8 = 2;
|
|
ANM2::Reset(GHIDRA_CAST<ANM2 *>((in_ECX + 0x14)));
|
|
AnimationState::~AnimationState(GHIDRA_CAST<AnimationState *>((in_ECX + 100)));
|
|
AnimationState::~AnimationState(GHIDRA_CAST<AnimationState *>((in_ECX + 0x44)));
|
|
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>((in_ECX + 0x2c)))))->msvc::string::_Tidy_deallocate();
|
|
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>((in_ECX + 0x14)))))->msvc::string::_Tidy_deallocate();
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 0094e910
|
|
void Menu_Collection::Update()
|
|
{
|
|
uint8_t *page;
|
|
char cVar2;
|
|
uint32_t uVar3;
|
|
uint32_t newSlot;
|
|
int *clampedSlot;
|
|
ItemConfig_Item *collectible;
|
|
std_string *gfxPath;
|
|
LayerState *arrowLayer;
|
|
uint32_t *in_ECX;
|
|
int lastSlot;
|
|
void *pvVar4;
|
|
bool isRepeatTick;
|
|
uint8_t loadedImage [4];
|
|
int *local_3c;
|
|
uint32_t backAction;
|
|
uint32_t inputAction;
|
|
uint32_t lastPage;
|
|
float inputY;
|
|
float inputX;
|
|
uint8_t isArrowVisible;
|
|
uint8_t *puStack_20;
|
|
void *local_1c;
|
|
uint8_t *puStack_18;
|
|
uint32_t local_14;
|
|
MenuManager *menuManager;
|
|
uint32_t *page;
|
|
|
|
puStack_20 = loadedImage + 0x3c;
|
|
local_14 = 0xffffffff;
|
|
puStack_18 = &LAB_00b0b99d;
|
|
local_1c = ExceptionList;
|
|
uVar3 = __security_cookie ^ GHIDRA_UINT((loadedImage + 0x30));
|
|
ExceptionList = &local_1c;
|
|
lastPage = in_ECX[0x97] / 0x78;
|
|
lastSlot = (in_ECX[0x97] - 1) % 0x78;
|
|
page = loadedImage + 0x3c;
|
|
if (((g_manager->_framecount & 1) == 0) &&
|
|
(page = loadedImage + 0x3c, *GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(in_ECX) + 0x11d)) != '\0')) {
|
|
AnimationState::Update(GHIDRA_CAST<AnimationState *>((in_ECX + 0x11)));
|
|
AnimationState::Update(GHIDRA_CAST<AnimationState *>((in_ECX + 0x19)));
|
|
page = puStack_20;
|
|
}
|
|
puStack_20 = page;
|
|
inputX = g_vectorZero.x;
|
|
inputY = g_vectorZero.y;
|
|
inputAction = 0x14;
|
|
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20940,&inputAction,0,0,uVar3)
|
|
;
|
|
if (cVar2 != '\0') {
|
|
inputX = inputX - 1.0;
|
|
}
|
|
inputAction = 0x15;
|
|
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20940,&inputAction,0,0);
|
|
if (cVar2 != '\0') {
|
|
inputX = inputX + 1.0;
|
|
}
|
|
inputAction = 0x16;
|
|
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20940,&inputAction,0,0);
|
|
if (cVar2 != '\0') {
|
|
inputY = inputY - 1.0;
|
|
}
|
|
inputAction = 0x17;
|
|
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20940,&inputAction,0,0);
|
|
if (cVar2 != '\0') {
|
|
inputY = inputY + 1.0;
|
|
}
|
|
if ((inputX != g_vectorZero.x) || (inputY != g_vectorZero.y)) {
|
|
if (ABS(inputX) <= ABS(inputY)) {
|
|
if (0.0 <= inputY) {
|
|
inputY = 1.0;
|
|
}
|
|
else {
|
|
inputY = (float)&DAT_bf800000;
|
|
}
|
|
inputX = 0.0;
|
|
}
|
|
else {
|
|
inputY = 0.0;
|
|
if (0.0 <= inputX) {
|
|
inputY = 0.0;
|
|
inputX = 1.0;
|
|
}
|
|
else {
|
|
inputX = (float)&DAT_bf800000;
|
|
}
|
|
}
|
|
}
|
|
backAction = 0xf;
|
|
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&backAction,0,0);
|
|
menuManager = g_menuManager;
|
|
if (cVar2 != '\0') {
|
|
pvVar4 = (g_menuManager->_menuStateHistory)._end;
|
|
if (1 < GHIDRA_UINT((GHIDRA_INT(pvVar4) - GHIDRA_INT((g_menuManager->_menuStateHistory)._begin) >> 2))) {
|
|
pvVar4 = (void *)(GHIDRA_INT(pvVar4) + -4);
|
|
(g_menuManager->_menuStateHistory)._end = pvVar4;
|
|
}
|
|
(GHIDRA_CAST<MenuManager *>((menuManager)))->MenuManager::SetState(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar4) + -4)),0);
|
|
goto LAB_0094ed66;
|
|
}
|
|
if (inputX < -0.5) {
|
|
uVar3 = *in_ECX;
|
|
if (uVar3 == 0) {
|
|
LAB_0094eba6:
|
|
uVar3 = in_ECX[4];
|
|
newSlot = uVar3 - 1;
|
|
in_ECX[4] = newSlot;
|
|
if (GHIDRA_INT(newSlot) < 0) {
|
|
page = in_ECX + 1;
|
|
*page = *page - 1;
|
|
in_ECX[4] = uVar3 + 0x77;
|
|
if (GHIDRA_INT(*page) < 0) {
|
|
in_ECX[1] = lastPage;
|
|
in_ECX[4] = lastSlot;
|
|
}
|
|
}
|
|
*GHIDRA_CAST<uint8_t *>((in_ECX + 0x8f)) = 1;
|
|
}
|
|
else if (0x13 < GHIDRA_INT(uVar3)) {
|
|
uVar3 = uVar3 & 0x80000003;
|
|
isRepeatTick = uVar3 == 0;
|
|
if (GHIDRA_INT(uVar3) < 0) {
|
|
isRepeatTick = (uVar3 - 1 | 0xfffffffc) == 0xffffffff;
|
|
}
|
|
if (isRepeatTick) goto LAB_0094eba6;
|
|
}
|
|
}
|
|
if (0.5 < inputX) {
|
|
uVar3 = *in_ECX;
|
|
if (uVar3 == 0) {
|
|
LAB_0094ebf5:
|
|
uVar3 = in_ECX[4];
|
|
newSlot = uVar3 + 1;
|
|
in_ECX[4] = newSlot;
|
|
if ((0x77 < GHIDRA_INT(newSlot)) || ((in_ECX[1] == lastPage && (lastSlot < GHIDRA_INT(newSlot))))) {
|
|
in_ECX[4] = uVar3 - 0x77;
|
|
uVar3 = in_ECX[1];
|
|
in_ECX[1] = uVar3 + 1;
|
|
if (GHIDRA_INT(lastPage) < GHIDRA_INT((uVar3 + 1))) {
|
|
in_ECX[1] = 0;
|
|
in_ECX[4] = 0;
|
|
}
|
|
}
|
|
*GHIDRA_CAST<uint8_t *>((in_ECX + 0x8f)) = 1;
|
|
}
|
|
else if (0x13 < GHIDRA_INT(uVar3)) {
|
|
uVar3 = uVar3 & 0x80000003;
|
|
isRepeatTick = uVar3 == 0;
|
|
if (GHIDRA_INT(uVar3) < 0) {
|
|
isRepeatTick = (uVar3 - 1 | 0xfffffffc) == 0xffffffff;
|
|
}
|
|
if (isRepeatTick) goto LAB_0094ebf5;
|
|
}
|
|
}
|
|
inputAction = 0x14;
|
|
if (inputY < -0.5) {
|
|
uVar3 = *in_ECX;
|
|
if (uVar3 == 0) {
|
|
LAB_0094ec64:
|
|
local_3c = GHIDRA_CAST<int *>(in_ECX[4]);
|
|
in_ECX[4] = GHIDRA_UINT((local_3c + -5));
|
|
if (GHIDRA_INT((local_3c + -5)) < 0) {
|
|
page = in_ECX + 1;
|
|
*page = *page - 1;
|
|
if (GHIDRA_INT(*page) < 0) {
|
|
in_ECX[1] = lastPage;
|
|
clampedSlot = GHIDRA_CAST<int *>((GHIDRA_INT(local_3c) % 0x14 + (GHIDRA_UINT(lastSlot) / 0x14) * 0x14));
|
|
if (lastSlot < GHIDRA_INT(clampedSlot)) {
|
|
clampedSlot = GHIDRA_CAST<int *>(lastSlot);
|
|
}
|
|
}
|
|
else {
|
|
clampedSlot = local_3c + 0x19;
|
|
}
|
|
in_ECX[4] = GHIDRA_UINT(clampedSlot);
|
|
}
|
|
*GHIDRA_CAST<uint8_t *>((in_ECX + 0x8f)) = 1;
|
|
}
|
|
else if (0x13 < GHIDRA_INT(uVar3)) {
|
|
uVar3 = uVar3 & 0x80000003;
|
|
isRepeatTick = uVar3 == 0;
|
|
if (GHIDRA_INT(uVar3) < 0) {
|
|
isRepeatTick = (uVar3 - 1 | 0xfffffffc) == 0xffffffff;
|
|
}
|
|
if (isRepeatTick) goto LAB_0094ec64;
|
|
}
|
|
}
|
|
if (inputY <= 0.5) goto LAB_0094ed66;
|
|
uVar3 = *in_ECX;
|
|
if (uVar3 != 0) {
|
|
if (GHIDRA_INT(uVar3) < 0x14) goto LAB_0094ed66;
|
|
uVar3 = uVar3 & 0x80000003;
|
|
isRepeatTick = uVar3 == 0;
|
|
if (GHIDRA_INT(uVar3) < 0) {
|
|
isRepeatTick = (uVar3 - 1 | 0xfffffffc) == 0xffffffff;
|
|
}
|
|
if (!isRepeatTick) goto LAB_0094ed66;
|
|
}
|
|
local_3c = GHIDRA_CAST<int *>((in_ECX[4] + 0x14));
|
|
in_ECX[4] = GHIDRA_UINT(local_3c);
|
|
if ((in_ECX[1] == lastPage) && (lastSlot < GHIDRA_INT(local_3c))) {
|
|
if (GHIDRA_CAST<int *>((GHIDRA_INT(local_3c) / 0x14)) != GHIDRA_CAST<int *>((GHIDRA_UINT(lastSlot) / 0x14))) {
|
|
in_ECX[1] = 0;
|
|
lastSlot = GHIDRA_INT(local_3c) % 0x14;
|
|
}
|
|
in_ECX[4] = lastSlot;
|
|
local_3c = GHIDRA_CAST<int *>((GHIDRA_INT(local_3c) / 0x14));
|
|
}
|
|
else if (0x77 < GHIDRA_INT(local_3c)) {
|
|
uVar3 = in_ECX[1] + 1;
|
|
in_ECX[1] = uVar3;
|
|
in_ECX[4] = GHIDRA_INT(local_3c) % 0x14;
|
|
if (uVar3 == lastPage) {
|
|
uVar3 = in_ECX[4];
|
|
if ((GHIDRA_INT(local_3c) % 0x14) / lastSlot != 0) {
|
|
uVar3 = lastSlot;
|
|
}
|
|
in_ECX[4] = uVar3;
|
|
}
|
|
}
|
|
*GHIDRA_CAST<uint8_t *>((in_ECX + 0x8f)) = 1;
|
|
LAB_0094ed66:
|
|
if ((char)in_ECX[0x8f] != '\0') {
|
|
local_3c = *GHIDRA_CAST<int **>((in_ECX[0x94] + (in_ECX[4] + (in_ECX[1] * 0x10 - in_ECX[1]) * 8) * 4));
|
|
if ((0x2dc < GHIDRA_INT(local_3c)) ||
|
|
((&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((g_manager->_persistentGameData))) + 0xae8))))[GHIDRA_INT(local_3c)] != '\0')) {
|
|
if (in_ECX[0x90] != 0) {
|
|
(GHIDRA_CAST<KAGE::SmartPointer *>((in_ECX + 0x90)))->KAGE::SmartPointer::reset((void *)0x0);
|
|
}
|
|
collectible = (GHIDRA_CAST<ItemConfig *>((&g_manager->_itemConfig)))->ItemConfig::GetCollectible(GHIDRA_INT(local_3c));
|
|
if (collectible != GHIDRA_CAST<ItemConfig_Item *>(0x0)) {
|
|
gfxPath = &collectible->gfxFilename;
|
|
if (0xf < (collectible->gfxFilename)._capacity) {
|
|
gfxPath = *GHIDRA_CAST<std_string **>(gfxPath->_buf);
|
|
}
|
|
pvVar4 = Manager::LoadImage(loadedImage,GHIDRA_CAST<uint8_t *>(gfxPath));
|
|
local_14 = 0;
|
|
(GHIDRA_CAST<KAGE::SmartPointer *>((in_ECX + 0x90)))->KAGE::SmartPointer::operator_assign(pvVar4);
|
|
local_14 = 1;
|
|
if (((local_3c != GHIDRA_CAST<int *>(0x0)) && (cVar2 = (**(code **)(*local_3c + 0xc))(), cVar2 != '\0'))
|
|
&& (g_imageReleaseFn != (void *)0x0)) {
|
|
(*g_imageReleaseFn)(loadedImage);
|
|
}
|
|
local_14 = 0xffffffff;
|
|
}
|
|
}
|
|
*GHIDRA_CAST<uint8_t *>((in_ECX + 0x8f)) = 0;
|
|
}
|
|
if (((inputX == g_vectorZero.x) && (inputY == g_vectorZero.y)) ||
|
|
(((inputX != (float)in_ECX[0x92] || (inputY != (float)in_ECX[0x93])) &&
|
|
(((float)in_ECX[0x92] != g_vectorZero.x || ((float)in_ECX[0x93] != g_vectorZero.y)))))) {
|
|
*in_ECX = 0;
|
|
}
|
|
else {
|
|
*in_ECX = *in_ECX + 1;
|
|
}
|
|
in_ECX[0x92] = GHIDRA_UINT(inputX);
|
|
in_ECX[0x93] = GHIDRA_UINT(inputY);
|
|
isArrowVisible = in_ECX[1] != 0;
|
|
arrowLayer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>((in_ECX + 5)),&DAT_00000004);
|
|
arrowLayer->_visible = isArrowVisible;
|
|
isArrowVisible = in_ECX[1] != lastPage;
|
|
arrowLayer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>((in_ECX + 5)),GHIDRA_CAST<uint8_t *>(0x3));
|
|
arrowLayer->_visible = isArrowVisible;
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
|
|
// 0094ef10
|
|
void Menu_Collection::Render()
|
|
{
|
|
Menu_Collection *font = this;
|
|
uint8_t *other;
|
|
KColor color;
|
|
uint8_t *pbVar1;
|
|
char isLastReference;
|
|
void *pvVar2;
|
|
void *pvVar3;
|
|
LayerState *layer;
|
|
uint32_t uVar4;
|
|
uint8_t *savedShader;
|
|
uint32_t *texture;
|
|
int *piVar5;
|
|
AnimationState *pageAnim;
|
|
AnimationLayer *animLayer;
|
|
std_string *extraout_ECX;
|
|
std_string *extraout_ECX_00;
|
|
std_string *lineString;
|
|
std_string *text;
|
|
uint8_t lowerChar;
|
|
uint32_t allocSize;
|
|
std_string *textCursor;
|
|
int iVar6;
|
|
ANM2 *pageAnm;
|
|
char *charCursor;
|
|
float fVar7;
|
|
float fVar8;
|
|
float pageMarkersTop;
|
|
uint8_t auStack_40a [2];
|
|
uint8_t destQuad [116];
|
|
float srcCorner0X;
|
|
float srcCorner0Y;
|
|
float srcCorner1X;
|
|
float srcCorner1Y;
|
|
float srcCorner2X;
|
|
float srcCorner2Y;
|
|
float srcCorner3X;
|
|
float srcCorner3Y;
|
|
uint8_t local_36c;
|
|
Vector iconPos;
|
|
Font *local_360;
|
|
uint8_t glyphRun [8];
|
|
Vector local_354;
|
|
Vector local_34c;
|
|
float local_344;
|
|
int local_340;
|
|
Menu_Collection *local_33c;
|
|
uint32_t local_338;
|
|
uint32_t local_334;
|
|
float local_330;
|
|
float *local_32c;
|
|
float originY;
|
|
Vector local_324;
|
|
float originX;
|
|
char isLayerTextured;
|
|
Menu_Collection *local_314;
|
|
float local_310;
|
|
float frameCropY;
|
|
Vector frameSize;
|
|
float local_300;
|
|
float fStack_2fc;
|
|
float fStack_2f8;
|
|
float fStack_2f4;
|
|
float framePivotX;
|
|
float framePivotY;
|
|
float local_2e8;
|
|
uint8_t local_2e4;
|
|
float local_2e0;
|
|
float fStack_2dc;
|
|
float fStack_2d8;
|
|
float fStack_2d4;
|
|
float local_2d0;
|
|
float fStack_2cc;
|
|
float fStack_2c8;
|
|
float fStack_2c4;
|
|
uint64_t local_2c0;
|
|
float local_2b8;
|
|
float local_2b4;
|
|
uint8_t local_2b0;
|
|
float local_2ac;
|
|
float local_2a8;
|
|
ColorMod renderColor;
|
|
uint32_t layoutParams;
|
|
void *tmpString;
|
|
KColor local_26c;
|
|
std_string nameStrings;
|
|
std_string descriptionString;
|
|
uint8_t textBuffer [516];
|
|
uint32_t local_24;
|
|
uint8_t *puStack_20;
|
|
void *local_1c;
|
|
uint8_t *puStack_18;
|
|
uint32_t local_14;
|
|
code *drawFn;
|
|
Font *font;
|
|
float *frameData;
|
|
uint8_t shaderNameChar;
|
|
|
|
puStack_20 = textBuffer + 0x224;
|
|
local_14 = 0xffffffff;
|
|
puStack_18 = &LAB_00b0b9fc;
|
|
local_1c = ExceptionList;
|
|
local_24 = __security_cookie ^ GHIDRA_UINT((textBuffer + 0x218));
|
|
ExceptionList = &local_1c;
|
|
local_338 = 0;
|
|
local_324.x = (g_menuManager->_ViewPosition).x + font->PositionX;
|
|
originY = (g_menuManager->_ViewPosition).y + font->PositionY;
|
|
local_33c = font;
|
|
local_324.y = originY;
|
|
originX = local_324.x;
|
|
pbVar1 = textBuffer + 0x224;
|
|
if ((font->CollectionMenuSprite)._loaded != 0) {
|
|
if ((font->CollectionMenuSprite)._overlayRenderFirst == 0) {
|
|
AnimationState::Render
|
|
(&(font->CollectionMenuSprite)._animState,&local_324,&g_vectorZero,&g_vectorZero);
|
|
pageAnim = &(font->CollectionMenuSprite)._overlayAnimState;
|
|
}
|
|
else {
|
|
puStack_20 = textBuffer + 0x224;
|
|
AnimationState::Render
|
|
(&(font->CollectionMenuSprite)._overlayAnimState,&local_324,&g_vectorZero,
|
|
&g_vectorZero);
|
|
pageAnim = &(font->CollectionMenuSprite)._animState;
|
|
}
|
|
AnimationState::Render(pageAnim,&local_324,&g_vectorZero,&g_vectorZero);
|
|
originX = local_324.x;
|
|
pbVar1 = puStack_20;
|
|
}
|
|
puStack_20 = pbVar1;
|
|
fVar7 = local_324.y;
|
|
fVar8 = originX;
|
|
originY = local_324.y;
|
|
local_324.x = originX;
|
|
pvVar2 = ANM2::GetAnimationData(&font->CollectionMenuSprite,s_Idle);
|
|
pvVar3 = ANM2::GetAnimationData(&font->DeathScreenSprite,GHIDRA_CAST<uint8_t *>("Diary"));
|
|
local_32c = *GHIDRA_CAST<float **>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x18)) + 4 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x4c)) * 0x10));
|
|
iVar6 = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar3) + 0x18)) + 4 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar3) + 0x50)) * 0x10));
|
|
local_360 = GHIDRA_CAST<Font *>((local_32c[4] - *GHIDRA_CAST<float *>((iVar6 + 0x10))));
|
|
local_314 = GHIDRA_CAST<Menu_Collection *>(((font->SelectedPage * 0x10 - font->SelectedPage) * 8));
|
|
local_324.y = local_32c[5] - *GHIDRA_CAST<float *>((iVar6 + 0x14));
|
|
if (GHIDRA_INT(local_314) < font->NumItems) {
|
|
while (iVar6 = font->SelectedPage * 0x10 - font->SelectedPage, GHIDRA_INT(local_314) < iVar6 * 8 + 0x78
|
|
) {
|
|
local_334 = *GHIDRA_CAST<uint32_t *>((*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((font)) + 0x250)))) + GHIDRA_INT(local_314) * 4));
|
|
if ((GHIDRA_INT(local_334) < 0x2dd) &&
|
|
(*GHIDRA_CAST<char *>((GHIDRA_INT((g_manager->_persistentGameData)._eventCounters) + local_334 + 0x82c)) ==
|
|
'\0')) {
|
|
layer = ANM2::GetLayer(&font->CollectionMenuSprite,&DAT_00000005);
|
|
layer->_visible = 1;
|
|
if (((font->CollectionMenuSprite)._animState._animData != (void *)0x0) &&
|
|
((5 < *GHIDRA_CAST<int *>((GHIDRA_INT((font->CollectionMenuSprite)._animState._animation) + 0x80)) ||
|
|
(KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("LayerId out of bounds\n")),
|
|
5 < *GHIDRA_CAST<int *>((GHIDRA_INT((font->CollectionMenuSprite)._animState._animation) + 0x80)))))) {
|
|
pvVar2 = (font->CollectionMenuSprite)._animState._animData;
|
|
local_340 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x4c));
|
|
if ((pvVar2 == (void *)0x0) ||
|
|
((local_340 < 0 || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x1c)) <= local_340)))) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("id out of bounds\n"));
|
|
}
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT((font->CollectionMenuSprite)._animState._layerFrames) + local_340 * 4))
|
|
= 0;
|
|
AnimationState::AdvanceLayerPosition
|
|
(&(font->CollectionMenuSprite)._animState,local_340,2.0);
|
|
}
|
|
iconPos.y = (float)((GHIDRA_INT(local_314) + (font->SelectedPage * 0x10 - font->SelectedPage) * -8)
|
|
/ 0x14) * 16.0 + originY;
|
|
iconPos.x = (float)(GHIDRA_INT(local_314) % 0x14) * 16.0 + originX;
|
|
if ((font->CollectionMenuSprite)._loaded != 0) {
|
|
if ((font->CollectionMenuSprite)._overlayRenderFirst == 0) {
|
|
pvVar2 = (font->CollectionMenuSprite)._animState._animData;
|
|
if (((pvVar2 != (void *)0x0) &&
|
|
(pageAnm = (font->CollectionMenuSprite)._animState._animation,
|
|
5 < pageAnm->_layerCount)) && (iVar6 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x4c)), -1 < iVar6)) {
|
|
AnimationLayer::RenderFrame
|
|
(GHIDRA_CAST<AnimationLayer *>((iVar6 * 0x10 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x18)))),&iconPos,
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT((font->CollectionMenuSprite)._animState._layerFrames) +
|
|
iVar6 * 4)),&g_vectorZero,&g_vectorZero,pageAnm);
|
|
}
|
|
pvVar2 = (font->CollectionMenuSprite)._overlayAnimState._animData;
|
|
if (((pvVar2 != (void *)0x0) &&
|
|
(pageAnm = (font->CollectionMenuSprite)._overlayAnimState._animation,
|
|
5 < pageAnm->_layerCount)) && (iVar6 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x4c)), -1 < iVar6)) {
|
|
animLayer = GHIDRA_CAST<AnimationLayer *>((iVar6 * 0x10 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x18))));
|
|
pvVar2 = (font->CollectionMenuSprite)._overlayAnimState._layerFrames;
|
|
goto LAB_0094f2e6;
|
|
}
|
|
}
|
|
else {
|
|
pvVar2 = (font->CollectionMenuSprite)._overlayAnimState._animData;
|
|
if (((pvVar2 != (void *)0x0) &&
|
|
(pageAnm = (font->CollectionMenuSprite)._overlayAnimState._animation,
|
|
5 < pageAnm->_layerCount)) && (iVar6 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x4c)), -1 < iVar6)) {
|
|
AnimationLayer::RenderFrame
|
|
(GHIDRA_CAST<AnimationLayer *>((iVar6 * 0x10 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x18)))),&iconPos,
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT((font->CollectionMenuSprite)._overlayAnimState._layerFrames) +
|
|
iVar6 * 4)),&g_vectorZero,&g_vectorZero,pageAnm);
|
|
}
|
|
pvVar2 = (font->CollectionMenuSprite)._animState._animData;
|
|
if (((pvVar2 != (void *)0x0) &&
|
|
(pageAnm = (font->CollectionMenuSprite)._animState._animation,
|
|
5 < pageAnm->_layerCount)) && (iVar6 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x4c)), -1 < iVar6)) {
|
|
animLayer = GHIDRA_CAST<AnimationLayer *>((iVar6 * 0x10 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x18))));
|
|
pvVar2 = (font->CollectionMenuSprite)._animState._layerFrames;
|
|
LAB_0094f2e6:
|
|
AnimationLayer::RenderFrame
|
|
(animLayer,&iconPos,*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + iVar6 * 4)),&g_vectorZero,
|
|
&g_vectorZero,pageAnm);
|
|
}
|
|
}
|
|
}
|
|
layer = ANM2::GetLayer(&font->CollectionMenuSprite,&DAT_00000005);
|
|
layer->_visible = 0;
|
|
}
|
|
else {
|
|
local_330 = (float)(GHIDRA_INT(local_314) % 0x14);
|
|
local_340 = (GHIDRA_INT(local_314) + iVar6 * -8) / 0x14;
|
|
if (GHIDRA_INT(local_334) < 0x2dd) {
|
|
if (((font->DeathScreenSprite)._animState._animData != (void *)0x0) &&
|
|
((6 < *GHIDRA_CAST<int *>((GHIDRA_INT((font->DeathScreenSprite)._animState._animation) + 0x80)) ||
|
|
(KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("LayerId out of bounds\n")),
|
|
6 < *GHIDRA_CAST<int *>((GHIDRA_INT((font->DeathScreenSprite)._animState._animation) + 0x80)))))) {
|
|
pvVar2 = (font->DeathScreenSprite)._animState._animData;
|
|
local_344 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar2) + 0x50));
|
|
if ((pvVar2 == (void *)0x0) ||
|
|
((GHIDRA_INT(local_344) < 0 || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x1c)) <= GHIDRA_INT(local_344))))) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("id out of bounds\n"));
|
|
}
|
|
*(uint32_t *)
|
|
(GHIDRA_INT((font->DeathScreenSprite)._animState._layerFrames) + GHIDRA_INT(local_344) * 4) = 0;
|
|
AnimationState::AdvanceLayerPosition
|
|
(&(font->DeathScreenSprite)._animState,GHIDRA_INT(local_344),
|
|
(float)GHIDRA_INT((local_334 - 1)));
|
|
}
|
|
local_34c.x = (float)GHIDRA_INT(local_330) * 16.0 + (float)local_360 + originX;
|
|
local_34c.y = (float)local_340 * 16.0 + local_324.y + originY;
|
|
if ((font->DeathScreenSprite)._loaded != 0) {
|
|
if ((font->DeathScreenSprite)._overlayRenderFirst == 0) {
|
|
pvVar2 = (font->DeathScreenSprite)._animState._animData;
|
|
if (((pvVar2 != (void *)0x0) &&
|
|
(pageAnm = (font->DeathScreenSprite)._animState._animation,
|
|
6 < pageAnm->_layerCount)) && (iVar6 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x50)), -1 < iVar6))
|
|
{
|
|
AnimationLayer::RenderFrame
|
|
(GHIDRA_CAST<AnimationLayer *>((iVar6 * 0x10 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x18)))),
|
|
&local_34c,
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT((font->DeathScreenSprite)._animState._layerFrames) +
|
|
iVar6 * 4)),&g_vectorZero,&g_vectorZero,pageAnm);
|
|
}
|
|
pvVar2 = (font->DeathScreenSprite)._overlayAnimState._animData;
|
|
if (((pvVar2 != (void *)0x0) &&
|
|
(pageAnm = (font->DeathScreenSprite)._overlayAnimState._animation,
|
|
6 < pageAnm->_layerCount)) && (iVar6 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x50)), -1 < iVar6))
|
|
{
|
|
animLayer = GHIDRA_CAST<AnimationLayer *>((iVar6 * 0x10 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x18))));
|
|
pvVar2 = (font->DeathScreenSprite)._overlayAnimState._layerFrames;
|
|
goto LAB_0094f63c;
|
|
}
|
|
}
|
|
else {
|
|
pvVar2 = (font->DeathScreenSprite)._overlayAnimState._animData;
|
|
if (((pvVar2 != (void *)0x0) &&
|
|
(pageAnm = (font->DeathScreenSprite)._overlayAnimState._animation,
|
|
6 < pageAnm->_layerCount)) && (iVar6 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x50)), -1 < iVar6))
|
|
{
|
|
AnimationLayer::RenderFrame
|
|
(GHIDRA_CAST<AnimationLayer *>((iVar6 * 0x10 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x18)))),
|
|
&local_34c,
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT((font->DeathScreenSprite)._overlayAnimState._layerFrames) +
|
|
iVar6 * 4)),&g_vectorZero,&g_vectorZero,pageAnm);
|
|
}
|
|
pvVar2 = (font->DeathScreenSprite)._animState._animData;
|
|
if (((pvVar2 != (void *)0x0) &&
|
|
(pageAnm = (font->DeathScreenSprite)._animState._animation,
|
|
6 < pageAnm->_layerCount)) && (iVar6 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x50)), -1 < iVar6))
|
|
{
|
|
animLayer = GHIDRA_CAST<AnimationLayer *>((iVar6 * 0x10 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x18))));
|
|
pvVar2 = (font->DeathScreenSprite)._animState._layerFrames;
|
|
LAB_0094f63c:
|
|
AnimationLayer::RenderFrame
|
|
(animLayer,&local_34c,*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + iVar6 * 4)),&g_vectorZero,
|
|
&g_vectorZero,pageAnm);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
local_26c._unk = 7;
|
|
if (((uint8_t)g_graphicsManager_flags & 4) == 0) {
|
|
local_26c._green = 8.40779e-45;
|
|
}
|
|
else {
|
|
local_26c._green = 1.4013e-45;
|
|
}
|
|
local_26c._red = 0.0;
|
|
local_26c._blue = 9.80909e-45;
|
|
local_26c._alpha = 1.4013e-45;
|
|
renderColor._offset[0] = 0.0;
|
|
renderColor._tint[0] = 1.0;
|
|
renderColor._tint[1] = 1.0;
|
|
renderColor._tint[2] = 1.0;
|
|
renderColor._tint[3] = 1.0;
|
|
renderColor._offset[1] = 0.0;
|
|
renderColor._offset[2] = 0.0;
|
|
renderColor._colorize[0] = 0.0;
|
|
renderColor._colorize[1] = 0.0;
|
|
renderColor._colorize[2] = 0.0;
|
|
renderColor._colorize[3] = 0.0;
|
|
local_354.x = (float)GHIDRA_INT(local_330) * 16.0 + fVar8 + local_32c[4];
|
|
local_354.y = (float)local_340 * 16.0 + fVar7 + local_32c[5];
|
|
ModManager::RenderCustomCollectionItem
|
|
(GHIDRA_CAST<ModManager *>(&g_manager->_modManager),local_334,&local_354,&g_vectorOne,
|
|
&renderColor,&local_26c);
|
|
}
|
|
}
|
|
local_314 = GHIDRA_CAST<Menu_Collection *>((GHIDRA_INT(&local_314->HoldInputTimer) + 1));
|
|
if (font->NumItems <= GHIDRA_INT(local_314)) break;
|
|
fVar7 = originY;
|
|
fVar8 = originX;
|
|
}
|
|
}
|
|
local_26c._unk = 0;
|
|
fVar8 = ((originX + local_32c[4]) - 8.0) + (float)(font->SelectedElement % 0x14) * 16.0;
|
|
fVar7 = ((originY + local_32c[5]) - 8.0) + (float)(font->SelectedElement / 0x14) * 16.0;
|
|
local_26c._red = 0.21176471;
|
|
local_26c._green = 0.18431373;
|
|
local_26c._blue = 0.1764706;
|
|
local_26c._alpha = 1.0;
|
|
render_quad_set_uniform_color(&local_310,fVar8,fVar7,fVar8 + 16.0,fVar7 + 16.0,&local_26c);
|
|
render_quad_draw_color_shader(&local_310,2.0);
|
|
uVar4 = *GHIDRA_CAST<uint32_t *>((*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((font)) + 0x250)))) +
|
|
(font->SelectedElement + (font->SelectedPage * 0x10 - font->SelectedPage) * 8) *
|
|
4));
|
|
if ((0x2dc < GHIDRA_INT(uVar4)) ||
|
|
(*GHIDRA_CAST<char *>((GHIDRA_INT((g_manager->_persistentGameData)._eventCounters) + uVar4 + 0x82c)) != '\0')) {
|
|
local_360 = &g_manager->_font2_TeamMeatEx12;
|
|
_eh_vector_constructor_iterator_(&nameStrings,0x18,2,FUN_0040c380,msvc::string::_Tidy_deallocate)
|
|
;
|
|
local_14 = 0;
|
|
if (g_game == GHIDRA_CAST<Game *>(0x0)) {
|
|
if (-1 < GHIDRA_INT(uVar4)) goto LAB_0094f7c9;
|
|
}
|
|
else {
|
|
if (GHIDRA_INT(uVar4) < 0) {
|
|
if ((GHIDRA_INT(uVar4) < 0) &&
|
|
(pvVar2 = (g_game->_proceduralItemManager)._proceduralItems._begin,
|
|
GHIDRA_INT(~uVar4) <
|
|
GHIDRA_INT((g_game->_proceduralItemManager)._proceduralItems._end) - GHIDRA_INT(pvVar2) >> 2)) {
|
|
local_314 = GHIDRA_CAST<Menu_Collection *>(**GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(pvVar2) + ~uVar4 * 4)));
|
|
}
|
|
else {
|
|
local_314 = GHIDRA_CAST<Menu_Collection *>(0x0);
|
|
}
|
|
}
|
|
else {
|
|
LAB_0094f7c9:
|
|
pvVar2 = (g_manager->_itemConfig)._collectibles._begin;
|
|
if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) - GHIDRA_INT(pvVar2) >> 2 <= GHIDRA_INT(uVar4))
|
|
goto LAB_0094f92f;
|
|
local_314 = *GHIDRA_CAST<Menu_Collection **>((GHIDRA_CAST<char *>(pvVar2) + uVar4 * 4));
|
|
}
|
|
if (local_314 != GHIDRA_CAST<Menu_Collection *>(0x0)) {
|
|
local_324.y = (float)ItemConfig_Item::GetLocalizedName
|
|
(GHIDRA_CAST<ItemConfig_Item *>(local_314),GHIDRA_CAST<std_string *>(&tmpString),0x14);
|
|
lineString = &nameStrings;
|
|
if (lineString != GHIDRA_CAST<std_string *>(local_324.y)) {
|
|
(GHIDRA_CAST<msvc::string *>((lineString->_buf)))->msvc::string::_Tidy_deallocate();
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(nameStrings._buf)) + 0x0))) = *GHIDRA_CAST<uint32_t *>(GHIDRA_CAST<char *>(local_324.y));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(nameStrings._buf)) + 0x4))) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_324.y) + 4));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(nameStrings._buf)) + 0x8))) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_324.y) + 8));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(nameStrings._buf)) + 0xc))) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_324.y) + 0xc));
|
|
(*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(nameStrings)) + 0x10))) = *GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(local_324.y) + 0x10));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_324.y) + 0x10)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_324.y) + 0x14)) = 0xf;
|
|
*GHIDRA_CAST<char *>(local_324.y) = '\0';
|
|
lineString = extraout_ECX;
|
|
}
|
|
if (0xf < GHIDRA_UINT(local_26c._unk)) {
|
|
allocSize = local_26c._unk + 1;
|
|
pvVar2 = tmpString;
|
|
if (0xfff < allocSize) {
|
|
pvVar2 = *(void **)(GHIDRA_CAST<char *>(tmpString) + -4);
|
|
allocSize = local_26c._unk + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString) + (-4 - GHIDRA_INT(pvVar2))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(pvVar2,allocSize);
|
|
lineString = extraout_ECX_00;
|
|
}
|
|
local_324.y = (float)ItemConfig_Item::get_localized_description
|
|
(GHIDRA_CAST<ItemConfig_Item *>(local_314),GHIDRA_CAST<std_string *>(&tmpString),
|
|
GHIDRA_INT(lineString));
|
|
if (&descriptionString != GHIDRA_CAST<std_string *>(local_324.y)) {
|
|
(GHIDRA_CAST<msvc::string *>((descriptionString._buf)))->msvc::string::_Tidy_deallocate();
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(descriptionString._buf)) + 0x0))) = *GHIDRA_CAST<uint32_t *>(GHIDRA_CAST<char *>(local_324.y));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(descriptionString._buf)) + 0x4))) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_324.y) + 4));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(descriptionString._buf)) + 0x8))) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_324.y) + 8));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(descriptionString._buf)) + 0xc))) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_324.y) + 0xc));
|
|
(*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(descriptionString)) + 0x10))) = *GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(local_324.y) + 0x10));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_324.y) + 0x10)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_324.y) + 0x14)) = 0xf;
|
|
*GHIDRA_CAST<char *>(local_324.y) = '\0';
|
|
}
|
|
if (0xf < GHIDRA_UINT(local_26c._unk)) {
|
|
allocSize = local_26c._unk + 1;
|
|
pvVar2 = tmpString;
|
|
if (0xfff < allocSize) {
|
|
pvVar2 = *(void **)(GHIDRA_CAST<char *>(tmpString) + -4);
|
|
allocSize = local_26c._unk + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(tmpString) + (-4 - GHIDRA_INT(pvVar2))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(pvVar2,allocSize);
|
|
}
|
|
local_26c._alpha = 0.0;
|
|
local_26c._unk = 0xf;
|
|
tmpString = (void *)(GHIDRA_UINT(tmpString) & 0xffffff00);
|
|
}
|
|
}
|
|
LAB_0094f92f:
|
|
if ((font->CollectionMenuSprite)._animState._animData != (void *)0x0) {
|
|
pvVar3 = (void *)0x1;
|
|
pvVar2 = (void *)0x94f943;
|
|
local_32c = AnimationState::GetNullFrameById(&(font->CollectionMenuSprite)._animState,1);
|
|
other = &(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((font)) + 0x240)));
|
|
local_324.y = (float)other;
|
|
if (local_32c != GHIDRA_CAST<float *>(0x0)) {
|
|
if (*GHIDRA_CAST<int *>(other) != 0) {
|
|
iVar6 = 0;
|
|
srcCorner2X = g_vectorZero.x;
|
|
srcCorner1Y = g_vectorZero.y;
|
|
if (uVar4 == 0x279) {
|
|
iVar6 = 0xa0;
|
|
}
|
|
srcCorner0X = g_vectorZero.x;
|
|
srcCorner0Y = g_vectorZero.y;
|
|
local_36c = 1;
|
|
srcCorner1X = g_vectorZero.x + 32.0;
|
|
srcCorner2Y = g_vectorZero.y + 32.0;
|
|
if ((&g_shaders + iVar6 != GHIDRA_CAST<uint8_t *>(0x0)) && (((&DAT_00c7911c)[iVar6] & 1) != 0)) {
|
|
g_currentShader = &g_shaders + iVar6;
|
|
}
|
|
renderColor._offset[0] = 0.0;
|
|
renderColor._offset[1] = 0.0;
|
|
renderColor._offset[2] = 0.0;
|
|
renderColor._tint[0] = 1.0;
|
|
renderColor._tint[1] = 1.0;
|
|
renderColor._tint[2] = 1.0;
|
|
renderColor._tint[3] = 1.0;
|
|
renderColor._colorize[0] = 0.0;
|
|
renderColor._colorize[1] = 0.0;
|
|
renderColor._colorize[2] = 0.0;
|
|
renderColor._colorize[3] = 0.0;
|
|
if (uVar4 == 0x279) {
|
|
uVar4 = g_manager->_framecount / 2 & 0x800000ff;
|
|
if (GHIDRA_INT(uVar4) < 0) {
|
|
uVar4 = (uVar4 - 1 | 0xffffff00) + 1;
|
|
}
|
|
renderColor._colorize[3] = (float)GHIDRA_INT(uVar4) * 0.00390625;
|
|
}
|
|
srcCorner3X = srcCorner1X;
|
|
srcCorner3Y = srcCorner2Y;
|
|
(GHIDRA_CAST<KAGE::SmartPointer *>((auStack_40a + -10)))->KAGE::SmartPointer::operator_assign(other);
|
|
apply_sprite_shader_params(&renderColor,1,pvVar2,pvVar3);
|
|
drawFn = *(code **)(**GHIDRA_CAST<int **>(other) + 0x18);
|
|
(GHIDRA_CAST<KColor *>((&local_26c)))->KColor::SetFromARGB(0xffffffff);
|
|
local_354.x = (originX + *local_32c) - 16.0;
|
|
local_354.y = (originY + local_32c[1]) - 16.0;
|
|
(*drawFn)(&srcCorner0X);
|
|
}
|
|
font = local_360;
|
|
lineString = &nameStrings;
|
|
fVar7 = *local_32c;
|
|
frameData = local_32c + 1;
|
|
local_32c = GHIDRA_CAST<float *>(0x2);
|
|
local_344 = originX + fVar7 + 18.0;
|
|
local_314 = GHIDRA_CAST<Menu_Collection *>(((originY + *frameData) - 16.0));
|
|
do {
|
|
if (lineString->_size != 0) {
|
|
text = lineString;
|
|
if (0xf < lineString->_capacity) {
|
|
text = *GHIDRA_CAST<std_string **>(lineString->_buf);
|
|
}
|
|
if (text == GHIDRA_CAST<std_string *>(0x0)) {
|
|
iVar6 = 0;
|
|
}
|
|
else {
|
|
local_324.y = (float)(text->_buf + 1);
|
|
textCursor = text;
|
|
do {
|
|
charCursor = textCursor->_buf;
|
|
textCursor = GHIDRA_CAST<std_string *>((textCursor->_buf + 1));
|
|
} while (*charCursor != 0);
|
|
iVar6 = GHIDRA_INT(textCursor) - GHIDRA_INT(local_324.y);
|
|
}
|
|
text_convert_encoding(GHIDRA_CAST<uint8_t *>(text),iVar6,0,textBuffer,0x100,1);
|
|
layoutParams = 0;
|
|
tmpString = (void *)0xffff;
|
|
local_26c._red = 0.0;
|
|
local_26c._green = 1.0;
|
|
local_26c._blue = -NAN;
|
|
local_26c._alpha = 0.0;
|
|
local_26c._unk = 0;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 1;
|
|
pvVar2 = Font::layout_glyphs(font,glyphRun,textBuffer,&layoutParams,&g_vectorOne);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 2;
|
|
color._blue = 0.38039216;
|
|
color._red = 0.47058824;
|
|
color._green = 0.44705883;
|
|
color._alpha = 1.0;
|
|
color._unk = 0;
|
|
Font::draw_glyph_run(font,local_344,(float)local_314,pvVar2,1.0,1.0,color,&layoutParams)
|
|
;
|
|
msvc::vector<12byte>::clear();
|
|
msvc::vector<12byte>::_Tidy();
|
|
local_14 = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(local_14))) + 0x1))) << 8;
|
|
}
|
|
local_314 = GHIDRA_CAST<Menu_Collection *>(((float)local_314 + 15.0));
|
|
lineString = lineString + 1;
|
|
local_32c = GHIDRA_CAST<float *>((GHIDRA_INT(local_32c) + -1));
|
|
} while (local_32c != GHIDRA_CAST<float *>(0x0));
|
|
local_32c = GHIDRA_CAST<float *>(0x0);
|
|
font = local_33c;
|
|
}
|
|
}
|
|
local_14 = 0xffffffff;
|
|
_eh_vector_destructor_iterator_(&nameStrings,0x18,2,msvc::string::_Tidy_deallocate);
|
|
}
|
|
uVar4 = GHIDRA_UINT(font->NumItems) / 0x78;
|
|
local_334 = uVar4;
|
|
if ((font->CollectionMenuSprite)._animState._animData == (void *)0x0) {
|
|
local_314 = GHIDRA_CAST<Menu_Collection *>(0x0);
|
|
local_330 = 100.0 / (float)(uVar4 + 3);
|
|
}
|
|
else {
|
|
local_33c = AnimationState::GetNullFrameById(&(font->CollectionMenuSprite)._animState,0);
|
|
local_330 = 100.0 / (float)(uVar4 + 3);
|
|
local_314 = local_33c;
|
|
if (local_33c != GHIDRA_CAST<Menu_Collection *>(0x0)) {
|
|
layer = ANM2::GetLayer(&font->CollectionMenuSprite,GHIDRA_CAST<uint8_t *>(0x0));
|
|
piVar5 = LayerState::GetTexture(layer,&local_354);
|
|
local_338 = 1;
|
|
local_314 = local_33c;
|
|
if (*piVar5 != 0) {
|
|
isLayerTextured = '\x01';
|
|
goto LAB_0094fd15;
|
|
}
|
|
}
|
|
}
|
|
isLayerTextured = '\0';
|
|
LAB_0094fd15:
|
|
if ((local_338 & 1) != 0) {
|
|
local_14 = 3;
|
|
if (((GHIDRA_CAST<int *>(local_354.y) != GHIDRA_CAST<int *>(0x0)) &&
|
|
(isLastReference = (**(code **)(*GHIDRA_CAST<int *>(local_354.y) + 0xc))(), isLastReference != '\0')) &&
|
|
(g_imageReleaseFn != (void *)0x0)) {
|
|
(*g_imageReleaseFn)();
|
|
}
|
|
local_14 = 0xffffffff;
|
|
}
|
|
if (isLayerTextured != '\0') {
|
|
iVar6 = 0;
|
|
originX = originX + (float)local_314->HoldInputTimer + 0.0;
|
|
local_33c = (Menu_Collection *)
|
|
(-local_330 * (float)uVar4 * 0.5 + originY + (float)local_314->SelectedPage);
|
|
if (-1 < GHIDRA_INT(local_334)) {
|
|
do {
|
|
pageMarkersTop = (float)local_33c;
|
|
pvVar2 = ANM2::GetAnimationData(&font->CollectionMenuSprite,s_Idle);
|
|
frameData = *(float **)
|
|
(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x18)) + 4 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar2) + 0x50)) * 0x10);
|
|
local_300 = frameData[0x1f];
|
|
fStack_2fc = frameData[0x20];
|
|
fStack_2f8 = frameData[0x21];
|
|
fStack_2f4 = frameData[0x22];
|
|
local_2e8 = frameData[0x25];
|
|
local_310 = frameData[0x1b];
|
|
frameCropY = frameData[0x1c];
|
|
frameSize.x = frameData[0x1d];
|
|
frameSize.y = frameData[0x1e];
|
|
framePivotX = frameData[0x23];
|
|
framePivotY = frameData[0x24];
|
|
local_2e0 = frameData[0x27];
|
|
fStack_2dc = frameData[0x28];
|
|
fStack_2d8 = frameData[0x29];
|
|
fStack_2d4 = frameData[0x2a];
|
|
local_2e4 = *GHIDRA_CAST<uint8_t *>((frameData + 0x26));
|
|
local_2b8 = frameData[0x31];
|
|
local_2d0 = frameData[0x2b];
|
|
fStack_2cc = frameData[0x2c];
|
|
fStack_2c8 = frameData[0x2d];
|
|
fStack_2c4 = frameData[0x2e];
|
|
local_2b0 = *GHIDRA_CAST<uint8_t *>((frameData + 0x33));
|
|
local_2ac = frameData[0x34];
|
|
local_2c0 = *GHIDRA_CAST<uint64_t *>((frameData + 0x2f));
|
|
local_2a8 = frameData[0x35];
|
|
local_2b4 = frameData[0x32];
|
|
if (iVar6 == font->SelectedPage) {
|
|
local_2e8 = frameData[10];
|
|
local_300 = frameData[4];
|
|
fStack_2fc = frameData[5];
|
|
fStack_2f8 = frameData[6];
|
|
fStack_2f4 = frameData[7];
|
|
local_2e4 = *GHIDRA_CAST<uint8_t *>((frameData + 0xb));
|
|
local_310 = *frameData;
|
|
frameCropY = frameData[1];
|
|
frameSize.x = frameData[2];
|
|
frameSize.y = frameData[3];
|
|
framePivotX = frameData[8];
|
|
framePivotY = frameData[9];
|
|
if (&local_2e0 != frameData + 0xc) {
|
|
local_2e0 = frameData[0xc];
|
|
fStack_2dc = frameData[0xd];
|
|
fStack_2d8 = frameData[0xe];
|
|
fStack_2d4 = frameData[0xf];
|
|
local_2d0 = frameData[0x10];
|
|
fStack_2cc = frameData[0x11];
|
|
fStack_2c8 = frameData[0x12];
|
|
fStack_2c4 = frameData[0x13];
|
|
local_2c0 = *GHIDRA_CAST<uint64_t *>((frameData + 0x14));
|
|
local_2b8 = frameData[0x16];
|
|
}
|
|
local_2b0 = *GHIDRA_CAST<uint8_t *>((frameData + 0x18));
|
|
local_2b4 = frameData[0x17];
|
|
local_2ac = frameData[0x19];
|
|
local_2a8 = frameData[0x1a];
|
|
}
|
|
srcCorner1X = frameSize.x + local_310;
|
|
srcCorner2Y = frameSize.y + frameCropY;
|
|
local_36c = 1;
|
|
local_26c._unk = 0;
|
|
local_354.y = (((float)iVar6 * local_330 + pageMarkersTop) - framePivotY) +
|
|
((float)iVar6 * -1.0) / (float)GHIDRA_INT(local_334);
|
|
local_354.x = originX - framePivotX;
|
|
local_26c._red = 1.0;
|
|
local_26c._green = 1.0;
|
|
local_26c._blue = 1.0;
|
|
local_26c._alpha = 1.0;
|
|
srcCorner0X = local_310;
|
|
srcCorner0Y = frameCropY;
|
|
srcCorner1Y = frameCropY;
|
|
srcCorner2X = local_310;
|
|
srcCorner3X = srcCorner1X;
|
|
srcCorner3Y = srcCorner2Y;
|
|
render_quad_set_rect(destQuad,&local_354,&frameSize,&local_26c);
|
|
renderColor._tint[0] = 1.0;
|
|
renderColor._tint[1] = 1.0;
|
|
renderColor._tint[2] = 1.0;
|
|
renderColor._tint[3] = 1.0;
|
|
savedShader = &g_shaders;
|
|
if ((DAT_00c7911c & 1) == 0) {
|
|
savedShader = g_currentShader;
|
|
}
|
|
pvVar3 = (void *)0x0;
|
|
renderColor._colorize[0] = 0.0;
|
|
renderColor._colorize[1] = 0.0;
|
|
renderColor._colorize[2] = 0.0;
|
|
renderColor._colorize[3] = 0.0;
|
|
renderColor._offset[0] = 0.0;
|
|
renderColor._offset[1] = 0.0;
|
|
renderColor._offset[2] = 0.0;
|
|
pvVar2 = (void *)0x9500cf;
|
|
g_currentShader = savedShader;
|
|
layer = ANM2::GetLayer(&font->CollectionMenuSprite,GHIDRA_CAST<uint8_t *>(0x0));
|
|
LayerState::GetTexture(layer,auStack_40a + -10);
|
|
apply_sprite_shader_params(&renderColor,1,pvVar2,pvVar3);
|
|
layer = ANM2::GetLayer(&font->CollectionMenuSprite,GHIDRA_CAST<uint8_t *>(0x0));
|
|
texture = LayerState::GetTexture(layer,&local_34c);
|
|
local_14 = 4;
|
|
(**(code **)(*GHIDRA_CAST<int *>(*texture) + 0x14))(&srcCorner0X);
|
|
local_14 = 5;
|
|
if (((GHIDRA_CAST<int *>(local_34c.y) != GHIDRA_CAST<int *>(0x0)) &&
|
|
(isLastReference = (**(code **)(*GHIDRA_CAST<int *>(local_34c.y) + 0xc))(), isLastReference != '\0'))
|
|
&& (g_imageReleaseFn != (void *)0x0)) {
|
|
(*g_imageReleaseFn)();
|
|
}
|
|
iVar6 = iVar6 + 1;
|
|
local_14 = 0xffffffff;
|
|
} while (iVar6 <= GHIDRA_INT(local_334));
|
|
}
|
|
}
|
|
uVar4 = 0x1505;
|
|
charCursor = "KAGE_ColorTextureShader";
|
|
shaderNameChar = 0x4b;
|
|
do {
|
|
charCursor = charCursor + 1;
|
|
lowerChar = shaderNameChar + 0x20;
|
|
if (0x19 < (uint8_t)(shaderNameChar + 0xbf)) {
|
|
lowerChar = shaderNameChar;
|
|
}
|
|
allocSize = GHIDRA_UINT(lowerChar);
|
|
if (lowerChar == 0x5c) {
|
|
allocSize = 0x2f;
|
|
}
|
|
uVar4 = uVar4 * 0x21 + allocSize;
|
|
shaderNameChar = *charCursor;
|
|
} while (shaderNameChar != 0);
|
|
local_338 = uVar4;
|
|
_Find_lower_bound<>();
|
|
if (((*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(local_354.y) + 0xd)) == '\0') && (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_354.y) + 0x10)) <= uVar4))
|
|
&& (GHIDRA_CAST<int *>(local_354.y) != DAT_00c379bc)) {
|
|
piVar5 = GHIDRA_CAST<int *>(std)::map<unsigned_int_4byte>::operator_index();
|
|
pvVar2 = (void *)*piVar5;
|
|
if ((pvVar2 != (void *)0x0) && ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(pvVar2) + 4)) & 1) != 0)) {
|
|
g_currentShader = pvVar2;
|
|
}
|
|
}
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
|
|
// 009502c0
|
|
void Menu_Collection::reset()
|
|
{
|
|
uint8_t bVar1;
|
|
uint8_t *curAnimName;
|
|
uint32_t uVar2;
|
|
LayerState *layer;
|
|
int itemConfig;
|
|
uint32_t *in_ECX;
|
|
uint8_t *idleName;
|
|
char *diaryName;
|
|
Manager *manager;
|
|
Game *game;
|
|
uint8_t *pbVar3;
|
|
bool bVar4;
|
|
uint32_t collectibleId;
|
|
void *collectibleConfigs;
|
|
ANM2 *diarySprite;
|
|
uint32_t *idListEnd;
|
|
|
|
in_ECX[1] = 0;
|
|
pbVar3 = GHIDRA_CAST<uint8_t *>(in_ECX[0x12]);
|
|
if (pbVar3 == GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
LAB_00950319:
|
|
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((in_ECX + 5)),s_Idle,1);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind(GHIDRA_CAST<AnimationState *>((in_ECX + 0x11)));
|
|
*GHIDRA_CAST<uint8_t *>((in_ECX + 0x16)) = 1;
|
|
}
|
|
}
|
|
else {
|
|
curAnimName = pbVar3;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((pbVar3 + 0x14))) {
|
|
curAnimName = *GHIDRA_CAST<uint8_t **>(pbVar3);
|
|
}
|
|
idleName = s_Idle;
|
|
do {
|
|
bVar1 = *curAnimName;
|
|
bVar4 = bVar1 < *idleName;
|
|
if (bVar1 != *idleName) {
|
|
LAB_00950306:
|
|
uVar2 = -GHIDRA_UINT(bVar4) | 1;
|
|
goto LAB_0095030b;
|
|
}
|
|
if (bVar1 == 0) break;
|
|
bVar1 = curAnimName[1];
|
|
bVar4 = bVar1 < idleName[1];
|
|
if (bVar1 != idleName[1]) goto LAB_00950306;
|
|
curAnimName = curAnimName + 2;
|
|
idleName = idleName + 2;
|
|
} while (bVar1 != 0);
|
|
uVar2 = 0;
|
|
LAB_0095030b:
|
|
if ((uVar2 != 0) || ((pbVar3[0x34] != 0 && (*GHIDRA_CAST<char *>((in_ECX + 0x16)) == '\0'))))
|
|
goto LAB_00950319;
|
|
}
|
|
layer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>((in_ECX + 5)),&DAT_00000005);
|
|
diarySprite = GHIDRA_CAST<ANM2 *>((in_ECX + 0x4a));
|
|
layer->_visible = 0;
|
|
pbVar3 = GHIDRA_CAST<uint8_t *>(in_ECX[0x57]);
|
|
if (pbVar3 != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
curAnimName = pbVar3;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((pbVar3 + 0x14))) {
|
|
curAnimName = *GHIDRA_CAST<uint8_t **>(pbVar3);
|
|
}
|
|
diaryName = "Diary";
|
|
do {
|
|
bVar1 = *curAnimName;
|
|
bVar4 = bVar1 < (uint8_t)*diaryName;
|
|
if (bVar1 != *diaryName) {
|
|
LAB_00950382:
|
|
uVar2 = -GHIDRA_UINT(bVar4) | 1;
|
|
goto LAB_00950387;
|
|
}
|
|
if (bVar1 == 0) break;
|
|
bVar1 = curAnimName[1];
|
|
bVar4 = bVar1 < (uint8_t)diaryName[1];
|
|
if (bVar1 != diaryName[1]) goto LAB_00950382;
|
|
curAnimName = curAnimName + 2;
|
|
diaryName = diaryName + 2;
|
|
} while (bVar1 != 0);
|
|
uVar2 = 0;
|
|
LAB_00950387:
|
|
if ((uVar2 == 0) && ((pbVar3[0x34] == 0 || (*GHIDRA_CAST<char *>((in_ECX + 0x5b)) != '\0'))))
|
|
goto LAB_009503b3;
|
|
}
|
|
bVar1 = ANM2::SetAnimation(diarySprite,GHIDRA_CAST<uint8_t *>("Diary"),1);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind(GHIDRA_CAST<AnimationState *>((in_ECX + 0x56)));
|
|
*GHIDRA_CAST<uint8_t *>((in_ECX + 0x5b)) = 1;
|
|
}
|
|
LAB_009503b3:
|
|
pbVar3 = GHIDRA_CAST<uint8_t *>(0x0);
|
|
do {
|
|
layer = ANM2::GetLayer(diarySprite,pbVar3);
|
|
pbVar3 = pbVar3 + 1;
|
|
layer->_visible = 0;
|
|
} while (GHIDRA_INT(pbVar3) < 7);
|
|
layer = ANM2::GetLayer(diarySprite,&DAT_00000006);
|
|
manager = g_manager;
|
|
uVar2 = 0;
|
|
layer->_visible = 1;
|
|
in_ECX[4] = 0;
|
|
*in_ECX = 0;
|
|
in_ECX[0x92] = g_vectorZero.x;
|
|
in_ECX[0x93] = g_vectorZero.y;
|
|
in_ECX[0x97] = 0;
|
|
in_ECX[0x95] = in_ECX[0x94];
|
|
*GHIDRA_CAST<uint8_t *>((in_ECX + 0x8f)) = 1;
|
|
if (GHIDRA_INT((manager->_itemConfig)._collectibles._end) -
|
|
GHIDRA_INT((manager->_itemConfig)._collectibles._begin) >> 2 != 0) {
|
|
game = g_game;
|
|
do {
|
|
if (game == GHIDRA_CAST<Game *>(0x0)) {
|
|
if (-1 < GHIDRA_INT(uVar2)) goto LAB_0095047b;
|
|
}
|
|
else {
|
|
if (GHIDRA_INT(uVar2) < 0) {
|
|
if ((GHIDRA_INT(uVar2) < 0) &&
|
|
(GHIDRA_INT(~uVar2) <
|
|
GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) -
|
|
GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._begin) >> 2)) {
|
|
itemConfig = **GHIDRA_CAST<int **>((GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._begin) +
|
|
~uVar2 * 4));
|
|
}
|
|
else {
|
|
itemConfig = 0;
|
|
}
|
|
}
|
|
else {
|
|
LAB_0095047b:
|
|
collectibleConfigs = (manager->_itemConfig)._collectibles._begin;
|
|
if (GHIDRA_INT((manager->_itemConfig)._collectibles._end) - GHIDRA_INT(collectibleConfigs) >> 2 <=
|
|
GHIDRA_INT(uVar2)) goto LAB_009504e4;
|
|
itemConfig = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(collectibleConfigs) + uVar2 * 4));
|
|
}
|
|
if (((itemConfig != 0) && (*GHIDRA_CAST<int *>((itemConfig + 0x48)) != 0)) &&
|
|
(*GHIDRA_CAST<char *>((itemConfig + 0xb3)) == '\0')) {
|
|
idListEnd = GHIDRA_CAST<uint32_t *>(in_ECX[0x95]);
|
|
if (idListEnd == GHIDRA_CAST<uint32_t *>(in_ECX[0x96])) {
|
|
collectibleId = uVar2;
|
|
msvc::vector<unsigned_int>::_Emplace_reallocate(idListEnd,&collectibleId);
|
|
manager = g_manager;
|
|
game = g_game;
|
|
}
|
|
else {
|
|
*idListEnd = uVar2;
|
|
in_ECX[0x95] = in_ECX[0x95] + 4;
|
|
}
|
|
in_ECX[0x97] = in_ECX[0x97] + 1;
|
|
}
|
|
}
|
|
LAB_009504e4:
|
|
uVar2 = uVar2 + 1;
|
|
} while (uVar2 < GHIDRA_UINT((GHIDRA_INT((manager->_itemConfig)._collectibles._end) -
|
|
GHIDRA_INT((manager->_itemConfig)._collectibles._begin) >> 2)));
|
|
}
|
|
return;
|
|
}
|