Curation round 5: Game construction, FXLayers, PlayerManager, the menus; the main menu renders

Eight agents took over ScoreSheet, DeathmatchManager, giantbook and boss overlays, FXLayers, PlayerManager, the menu
manager with the save and prompt flow, twelve menus (character wheel, options, challenges, daily (offline), special
seeds, leaderboard (local), collection, bestiary, stats, controller select, key config, cutscenes), console text input
and gamepad hot-plug through platform listeners. Integration moved input to device ids.
KAGE's projection matrix now reaches the 'ProjectionMatrix' uniform the basic shaders from afterbirthp.a declare, as
well as the exe's 'Transform', which takes the color-mod and HQ4X passes from black to correct output.
Under gdb with stubs skipped, the intro, title, file select, main menu and character wheel render as in the game.
1330 functions taken over, boot path 261/615. build/isaac stops at OnlineEmotes::init in Game::LoadConfigXmls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-11-20 02:59:23 -05:00
1 parent fd8b965350
commit 233d5123e8
128 files changed
+10194 -36967

No files matched your search

+3 -205
View File
@@ -715,7 +715,7 @@ void Camera::update_focus_position(uint8_t isSkipFocusBuffer)
local_1c = ExceptionList;
ExceptionList = &local_1c;
local_34 = this;
local_EAX_76 = (GHIDRA_CAST<PlayerManager *>((&g_game->_playerManager)))->PlayerManager::get_first_local_main_player();
local_EAX_76 = PlayerManager::get_first_local_main_player(&g_game->_playerManager);
if (local_EAX_76 == GHIDRA_CAST<Entity_Player *>(0x0)) {
KAGE_LogMessage(8,GHIDRA_CAST<uint8_t *>("No main player detected when trying to update camera \n"));
ExceptionList = local_1c;
@@ -871,7 +871,7 @@ void Camera::update_focus_position(uint8_t isSkipFocusBuffer)
do {
pvVar5 = (playerManager->_playerList)._end;
if (GHIDRA_INT(pvVar5) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) {
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("(GHIDRA_CAST<PlayerManager *>(()))->PlayerManager::GetPlayer() : There are no players! \n"));
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("PlayerManager::GetPlayer() : There are no players! \n"));
pvVar5 = (playerManager->_playerList)._end;
game = g_game;
}
@@ -1323,7 +1323,7 @@ uint8_t Camera::IsPosVisible(Vector *Pos)
do {
pvVar1 = (playerManager->_playerList)._end;
if (GHIDRA_INT(pvVar1) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) {
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("(GHIDRA_CAST<PlayerManager *>(()))->PlayerManager::GetPlayer() : There are no players! \n"));
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("PlayerManager::GetPlayer() : There are no players! \n"));
pvVar1 = (playerManager->_playerList)._end;
}
playerSlot = (playerManager->_playerList)._begin;
@@ -1567,205 +1567,3 @@ void Camera::SnapToPosition(Vector *pos)
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(room) + 0x1208)) = (this->_position).y;
return;
}
// 00993a70
void Camera::Update(uint8_t isSnap)
{
int iVar1;
uint32_t entityIndex;
int iVar2;
float *pfVar3;
uint8_t *fxSprite;
float fVar4;
float fVar5;
float veinScale;
double dVar6;
float local_2c;
int local_28;
uint32_t local_24;
int particleIndex;
float *local_1c;
Vector scratchVec;
uint32_t entityCount;
Game *game;
char layerMode;
if (this->_aimOffsetBuffer[8] != 0) {
local_1c = *GHIDRA_CAST<float **>((this->_velocityOffsetBuffer + 8));
iVar2 = *GHIDRA_CAST<int *>((this->_velocityOffsetBuffer + 0xc)) - GHIDRA_INT(local_1c);
local_24 = 0;
iVar1 = iVar2 >> 0x1f;
if (iVar2 / 0x4c + iVar1 != iVar1) {
local_2c = 0.0;
do {
pfVar3 = local_1c;
layerMode = *GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(local_1c) + 0x39 + GHIDRA_INT(local_2c)));
if (layerMode == '\0') {
particleIndex = 0;
if (0 < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_1c) + 0x18 + GHIDRA_INT(local_2c)))) {
local_28 = 0;
do {
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_1c) + 0xc + GHIDRA_INT(local_2c)));
iVar2 = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_1c) + 4 + GHIDRA_INT(local_2c))) + 0x10));
fVar4 = fmodf(*GHIDRA_CAST<float *>((local_28 + iVar1)) - *GHIDRA_CAST<float *>((local_28 + 8 + iVar1)),
(float)((double)iVar2 + __uint_to_double_fixup[-(iVar2 >> 0x1f)]));
*GHIDRA_CAST<float *>((local_28 + iVar1)) = fVar4;
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_1c) + 0xc + GHIDRA_INT(local_2c)));
iVar2 = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_1c) + 4 + GHIDRA_INT(local_2c))) + 0x14));
fVar4 = fmodf(*GHIDRA_CAST<float *>((local_28 + 0xc + iVar1)) + *GHIDRA_CAST<float *>((local_28 + 4 + iVar1)),
(float)((double)iVar2 + __uint_to_double_fixup[-(iVar2 >> 0x1f)]));
particleIndex = particleIndex + 1;
*GHIDRA_CAST<float *>((local_28 + 4 + iVar1)) = fVar4;
local_28 = local_28 + 0x14;
} while (particleIndex < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_1c) + 0x18 + GHIDRA_INT(local_2c))));
}
}
else if ((layerMode == '\x01') &&
(local_28 = 0, 0 < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_1c) + 0x18 + GHIDRA_INT(local_2c))))) {
local_1c = GHIDRA_CAST<float *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_1c) + 0xc + GHIDRA_INT(local_2c))) + 8));
do {
fVar5 = g_displayPixelRatio * g_screenPointScale;
dVar6 = floor((double)(((g_screenWidth - 338.0) * 0.5 +
(*GHIDRA_CAST<float *>(this->_aimOffsetBuffer) - 60.0) * 0.65) * fVar5 + 0.5))
;
scratchVec.x = (float)dVar6 / fVar5;
dVar6 = floor((double)(((g_screenHeight - 182.0) * 0.5 +
(*GHIDRA_CAST<float *>((this->_aimOffsetBuffer + 4)) - 140.0) * 0.65) * fVar5
+ 0.5));
local_28 = local_28 + 1;
fVar4 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pfVar3) + 0x3c + GHIDRA_INT(local_2c)));
local_1c[-2] = scratchVec.x * *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pfVar3) + 0x3c + GHIDRA_INT(local_2c))) + *local_1c
;
local_1c[-1] = ((float)dVar6 / fVar5) * fVar4 + local_1c[1];
local_1c = local_1c + 5;
} while (local_28 < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pfVar3) + 0x18 + GHIDRA_INT(local_2c))));
}
local_1c = *GHIDRA_CAST<float **>((this->_velocityOffsetBuffer + 8));
local_2c = (float)(GHIDRA_INT(local_2c) + 0x4c);
local_24 = local_24 + 1;
} while (local_24 <
GHIDRA_UINT(((*GHIDRA_CAST<int *>((this->_velocityOffsetBuffer + 0xc)) - GHIDRA_INT(local_1c)) / 0x4c)));
}
if (0 < *GHIDRA_CAST<int *>((this->_playerSpreadBuffer + 4))) {
local_1c = GHIDRA_CAST<float *>(0x0);
iVar1 = *GHIDRA_CAST<int *>(this->_focusPositionBuffer);
*GHIDRA_CAST<int *>((this->_playerSpreadBuffer + 4)) = *GHIDRA_CAST<int *>((this->_playerSpreadBuffer + 4)) + -1;
if (0 < iVar1) {
local_24 = 0;
do {
iVar1 = *GHIDRA_CAST<int *>((this->_shakeOffsetBuffer + 4));
iVar2 = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((this->_playerSpreadBuffer + 0xc)) + 0x10));
fVar4 = fmodf(*GHIDRA_CAST<float *>((iVar1 + local_24)) - *GHIDRA_CAST<float *>((iVar1 + 8 + local_24)),
(float)((double)iVar2 + __uint_to_double_fixup[-(iVar2 >> 0x1f)]));
*GHIDRA_CAST<float *>((iVar1 + local_24)) = fVar4;
iVar1 = *GHIDRA_CAST<int *>((this->_shakeOffsetBuffer + 4));
iVar2 = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((this->_playerSpreadBuffer + 0xc)) + 0x14));
fVar4 = fmodf(*GHIDRA_CAST<float *>((iVar1 + 0xc + local_24)) + *GHIDRA_CAST<float *>((iVar1 + 4 + local_24)),
(float)((double)iVar2 + __uint_to_double_fixup[-(iVar2 >> 0x1f)]));
local_1c = GHIDRA_CAST<float *>((GHIDRA_INT(local_1c) + 1));
*GHIDRA_CAST<float *>((iVar1 + 4 + local_24)) = fVar4;
local_24 = local_24 + 0x14;
} while (GHIDRA_INT(local_1c) < *GHIDRA_CAST<int *>(this->_focusPositionBuffer));
}
}
game = g_game;
if (*GHIDRA_CAST<int *>(this[1]._playerSpreadBuffer) != 0) {
fVar4 = *GHIDRA_CAST<float *>(this[8]._focusPositionBuffer);
fVar5 = *GHIDRA_CAST<float *>(this->_aimOffsetBuffer);
local_2c = 0.0;
*GHIDRA_CAST<float *>((this[8]._focusPositionBuffer + 4)) =
(*GHIDRA_CAST<float *>((this->_aimOffsetBuffer + 4)) - *GHIDRA_CAST<float *>((this[8]._focusPositionBuffer + 4))) *
0.03 + *GHIDRA_CAST<float *>((this[8]._focusPositionBuffer + 4));
*GHIDRA_CAST<float *>(this[8]._focusPositionBuffer) = (fVar5 - fVar4) * 0.03 + fVar4;
entityIndex = 0;
entityCount = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(game->_room) + 0x1264));
if (entityCount != 0) {
do {
iVar1 = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(game->_room) + 0x125c)) + entityIndex * 4));
if ((*GHIDRA_CAST<int *>((iVar1 + 0x28)) == 0x197) && (*GHIDRA_CAST<int *>((iVar1 + 0x2c)) == 0)) {
local_2c = 1.0 - *GHIDRA_CAST<float *>((iVar1 + 0x380)) / *GHIDRA_CAST<float *>((iVar1 + 900));
if (local_2c <= 0.0) {
local_2c = 0.0;
}
if (1.0 <= local_2c) {
local_2c = 1.0;
}
break;
}
entityIndex = entityIndex + 1;
} while (entityIndex < entityCount);
}
local_1c = GHIDRA_CAST<float *>(0xa);
pfVar3 = GHIDRA_CAST<float *>((this[1]._focusPositionBuffer + 4));
do {
fVar5 = *GHIDRA_CAST<float *>((this[8]._focusPositionBuffer + 4)) - pfVar3[1];
scratchVec.x = *GHIDRA_CAST<float *>(this[8]._focusPositionBuffer) - *pfVar3;
fVar4 = sqrtf(fVar5 * fVar5 + scratchVec.x * scratchVec.x);
veinScale = fVar4 * 0.004;
if (veinScale <= 1.0) {
veinScale = 1.0;
}
if (10.0 <= veinScale) {
veinScale = 10.0;
}
pfVar3[-4] = veinScale;
fVar5 = atan2f(fVar5,scratchVec.x);
fVar5 = fVar5 * 57.295776 + 90.0;
if (360.0 < ABS(fVar5)) {
fVar5 = fmodf(fVar5,360.0);
}
if (fVar5 <= 180.0) {
if (fVar5 < -180.0) {
fVar5 = fVar5 + 360.0;
}
}
else {
fVar5 = fVar5 - 360.0;
}
fVar5 = LerpAngleDeg(pfVar3[-6],fVar5,0.3);
pfVar3[-5] = fVar5;
pfVar3[-3] = 1.0;
fVar4 = (fVar4 - 5.0) * 0.002;
if (fVar4 <= 0.2) {
fVar4 = 0.2;
}
if (2.0 <= fVar4) {
fVar4 = 2.0;
}
pfVar3[-2] = fVar4 * local_2c * local_2c;
FXLayers::update_vein_branch();
pfVar3 = pfVar3 + 0xd;
local_1c = GHIDRA_CAST<float *>((GHIDRA_INT(local_1c) + -1));
} while (local_1c != GHIDRA_CAST<float *>(0x0));
fxSprite = this[6]._focusPositionBuffer + 9;
if (local_2c <= 0.25) {
local_2c = 0.25;
}
local_1c = GHIDRA_CAST<float *>(0x2);
do {
*GHIDRA_CAST<float *>((fxSprite + -5)) = local_2c;
if (*fxSprite != 0) {
AnimationState::Update(GHIDRA_CAST<AnimationState *>((fxSprite + -0xd9)));
AnimationState::Update(GHIDRA_CAST<AnimationState *>((fxSprite + -0xb9)));
}
fxSprite = fxSprite + 0x114;
local_1c = GHIDRA_CAST<float *>((GHIDRA_INT(local_1c) + -1));
} while (local_1c != GHIDRA_CAST<float *>(0x0));
}
if (((*GHIDRA_CAST<float *>(this->_aimOffsetBuffer) != g_vectorZero.x) ||
(*GHIDRA_CAST<float *>((this->_aimOffsetBuffer + 4)) != g_vectorZero.y)) && (isSnap == 0)) {
players_center_position(&g_game->_playerManager,&scratchVec,1);
*GHIDRA_CAST<float *>(this->_aimOffsetBuffer) =
(scratchVec.x - *GHIDRA_CAST<float *>(this->_aimOffsetBuffer)) * 0.1 +
*GHIDRA_CAST<float *>(this->_aimOffsetBuffer);
*GHIDRA_CAST<float *>((this->_aimOffsetBuffer + 4)) =
(scratchVec.y - *GHIDRA_CAST<float *>((this->_aimOffsetBuffer + 4))) * 0.1 +
*GHIDRA_CAST<float *>((this->_aimOffsetBuffer + 4));
return;
}
players_center_position(&g_game->_playerManager,&scratchVec,0);
*GHIDRA_CAST<float *>(this->_aimOffsetBuffer) = scratchVec.x;
*GHIDRA_CAST<float *>((this->_aimOffsetBuffer + 4)) = scratchVec.y;
}
return;
}