Files
isaac-port/generated-src/emote_wheel.cpp
T
shweetandClaude Opus 5.5 fd8b965350 Curation round 4: popups, Seeds/Random, Game, KeyConfigs, offline NetplayManager, Console, TextureCache, render passes
Six agents took over PopupButtons/PopupQueue/AchievementOverlay, Seeds with the global Random (now seeded from the
clock as in the original), Game (g_game exists from Manager::Init on), KeyConfigs, an offline NetplayManager, Console's
output and printing, TextureCache, the color-mod and sprite shader passes, mod shaders and reload_resource_paths. An
integration pass moved callers to the new APIs (0 errors, 0 warnings with -Wall -Wextra). build/isaac loads the 34
installed mods and stops at ScoreSheet::ScoreSheet in Game's constructor; with the remaining stubs skipped under gdb the
intro cutscene plays through and the main menu's frame loop runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 01:32:19 -05:00

258 lines
12 KiB
C++

#include "classes.h"
// 008d1f20
void EmoteWheel::Update()
{
int *piVar1;
char cVar2;
uint32_t uVar3;
int iVar4;
float *stickInput;
float openProgress;
float fVar5;
float local_24;
float local_20;
int local_1c [3];
void *local_10;
uint8_t *puStack_c;
int local_8;
local_8 = 0xffffffff;
puStack_c = &LAB_00b05cad;
local_10 = ExceptionList;
uVar3 = __security_cookie ^ GHIDRA_UINT((local_1c + 6));
ExceptionList = &local_10;
iVar4 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4));
if (iVar4 == 1) {
iVar4 = 1;
fVar5 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x844));
openProgress = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x840)) + 12.0;
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x840)) = openProgress;
if (fVar5 <= openProgress) {
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 2;
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x840)) = fVar5;
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x834)) = GHIDRA_INT((270.0 / *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x838))));
iVar4 = 2;
openProgress = fVar5;
}
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x804)) = openProgress;
}
if (iVar4 == 3) {
fVar5 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x840)) - 12.0;
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x840)) = fVar5;
if (fVar5 <= 0.0) {
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x840)) = 0;
fVar5 = 0.0;
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 0;
}
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x804)) = fVar5;
}
iVar4 = FUN_0090b070(uVar3);
if ((((((iVar4 == 0) || ((g_game->_pauseScreen)._state != 0)) || (*GHIDRA_CAST<int *>(&g_game->_gameOver) != 0)
) || (((g_game->_genericPrompt)._sprite._animState._animData != (void *)0x0 &&
((g_game->_genericPrompt)._sprite._animState._isPlaying != 0)))) ||
((*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((g_game->_leaderboard))) + 0x4)))) != 0 || (*GHIDRA_CAST<int *>(&g_game->_stageTransition) != 0)))
) || ((*GHIDRA_CAST<int *>(&g_game->_roomTransition) != 0 &&
(cVar2 = Game::IsRoomTransitionActive(), cVar2 != '\0')))) {
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) == 2) {
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x834)) = 0;
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 3;
}
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x840)) = 0;
}
else {
FUN_0090b070(uVar3);
iVar4 = FUN_00423970();
local_1c[2] = 0x1e;
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(iVar4,FUN_00a209e0,local_1c + 2,0,0);
if ((cVar2 != '\0') && (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) == 0)) {
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x834)) = 0;
FUN_008d26c0(0,0);
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 1;
}
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) == 2) {
if (iVar4 == 0) {
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x834)) < 0) {
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x834)) = 0;
}
local_1c[2] = 0x14;
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a209e0,local_1c + 2,0,0);
if (cVar2 == '\0') {
local_1c[2] = 0x15;
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a209e0,local_1c + 2,0,0);
if (cVar2 != '\0') {
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x834)) =
(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x834)) + 1U) %
GHIDRA_UINT((*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7cc)) + 4 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7d8)) * 0xc
)) -
*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7cc)) + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7d8)) * 0xc)) >>
2));
}
}
else {
piVar1 = GHIDRA_CAST<int *>((GHIDRA_INT(this) + 0x834));
*piVar1 = *piVar1 + -1;
if (*piVar1 < 0) {
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x834)) =
(*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7cc)) + 4 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7d8)) * 0xc)) -
*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7cc)) + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7d8)) * 0xc)) >> 2) +
-1;
}
}
}
else {
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x834)) = 0xffffffff;
(GHIDRA_CAST<InputManager *>((&PTR_vftable_00c57b18)))->InputManager::get_device(local_1c,iVar4);
local_8 = 0;
if (local_1c[0] == 0) {
stickInput = &local_24;
local_24 = g_vectorZero.x;
local_20 = g_vectorZero.y;
}
else {
stickInput = GHIDRA_CAST<float *>(FUN_00a1eed0(&local_24,0));
}
fVar5 = sqrtf(*stickInput * *stickInput + stickInput[1] * stickInput[1]);
if (0.5 < fVar5) {
fVar5 = atan2f(stickInput[1],*stickInput);
fVar5 = fVar5 * 57.295776;
if (fVar5 < 0.0) {
fVar5 = fVar5 + 360.0;
}
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x834)) = GHIDRA_INT((fVar5 / *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x838))));
}
local_8 = 0xffffffff;
FUN_004242b0();
}
local_1c[2] = 0xe;
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(iVar4,FUN_00a209e0,local_1c + 2,0,0);
if (cVar2 == '\0') {
local_1c[1] = 0x1e;
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(iVar4,FUN_00a209e0,local_1c + 1,0,0);
if (cVar2 == '\0') {
local_1c[1] = 0x1c;
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))
(0xffffffff,FUN_00a209e0,local_1c + 1,0,0);
if (cVar2 != '\0') {
FUN_008d26c0((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7d8)) + 1U) %
GHIDRA_UINT(((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 2000)) - *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7cc))) / 0xc)),0)
;
ExceptionList = local_10;
return;
}
local_20 = 2.10195e-44;
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(iVar4,FUN_00a209e0,&local_20,0,0);
if (cVar2 == '\0') {
ExceptionList = local_10;
return;
}
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) == 2) {
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x834)) = 0;
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 3;
ExceptionList = local_10;
return;
}
ExceptionList = local_10;
return;
}
}
if (-1 < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x834))) {
iVar4 = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7cc)) + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7d8)) * 0xc)) +
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x834)) * 4));
if (iVar4 == 0x12) {
iVar4 = rand();
*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0x92c)))) = iVar4 % 6 + 0x16;
}
else if (iVar4 == 0x13) {
iVar4 = rand();
*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0x92c)))) = iVar4 % 0x14 + 0x1c;
}
else {
*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0x92c)))) = iVar4;
}
}
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) == 2) {
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x834)) = 0;
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 3;
ExceptionList = local_10;
return;
}
}
}
ExceptionList = local_10;
return;
}
// 008d2450
void EmoteWheel::Render()
{
uint32_t extraout_ECX;
int emotes;
uint32_t emoteIdx;
float fVar1;
float fVar2;
float local_34;
float local_30;
float centerX;
float centerY;
Vector emotePos;
KColor wheelColor;
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) != 0) {
local_34 = g_screenWidth * 0.5;
wheelColor._unk = 0;
local_30 = g_screenHeight * 0.5;
centerX = local_34;
centerY = local_30;
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) == 2) {
wheelColor._red = 0.78431374;
wheelColor._green = 0.7176471;
wheelColor._blue = 0.6392157;
wheelColor._alpha = 0.33333334;
FUN_00424d70(&local_34,&wheelColor,0x43b40000,*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x848)));
if (-1 < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x834))) {
fVar1 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x838));
fVar2 = (float)*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x834)) * fVar1;
(GHIDRA_CAST<KColor *>((&wheelColor)))->KColor::set_from_argb_signed(0x6599ff99);
FUN_00424d70(&local_34,extraout_ECX,fVar1 + fVar2,*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x848)));
}
emoteIdx = 0;
emotes = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7cc)) + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7d8)) * 0xc));
if (*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7cc)) + 4 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7d8)) * 0xc)) - emotes >>
2 != 0) {
do {
FUN_00430750(*GHIDRA_CAST<uint32_t *>((emotes + emoteIdx * 4)),0);
ItemUseAnim::update();
local_34 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x804)) - 20.0;
fVar1 = ((float)((double)GHIDRA_INT(emoteIdx) + __uint_to_double_fixup[-(GHIDRA_INT(emoteIdx) >> 0x1f)])
* *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x838)) + *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x838)) * 0.5) *
0.017453292;
fVar2 = cos(fVar1);
fVar1 = sin(fVar1);
emotePos.x = (fVar2 * local_34 - fVar1 * 0.0) + centerX;
emotePos.y = fVar1 * local_34 + fVar2 * 0.0 + centerY;
Game::Update(GHIDRA_CAST<Game *>((GHIDRA_INT(this) + 8)),&emotePos);
emoteIdx = emoteIdx + 1;
emotes = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7cc)) + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7d8)) * 0xc));
} while (emoteIdx <
GHIDRA_UINT((*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7cc)) + 4 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x7d8)) * 0xc
)) - emotes >> 2)));
return;
}
}
else {
fVar1 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x840)) -
(*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x844)) - *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x848)));
wheelColor._red = 0.78431374;
wheelColor._green = 0.7176471;
wheelColor._blue = 0.6392157;
wheelColor._alpha = 0.33333334;
if (fVar1 <= 0.0) {
fVar1 = 0.0;
}
FUN_00424d70(&local_34,&wheelColor,0x43b40000,fVar1);
}
}
return;
}