Six agents took over Game::Start, Level::SetNextStage, BossPool, save_game_state, level generation to the first room (place_special_rooms, RoomDescriptor, load_room), Room, Camera, Entity/EntityList/EntityRef with a curated skeleton of every Entity_* subclass, Entity_Player, Game::Render, Manager::Update's run branch, RoomTransition, ItemInfoHUD and StatHUD. Integration wrote FirstTrinketOwner and room_shape_get_door_grid_index (checked against the decompile for every shape and slot) and folded the duplicated constants. A run now generates its floor, loads the start room and draws the HUD (under gdb); Isaac renders correctly when drawn, the room itself waits for Room::Render. 2479 functions taken over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
#include "classes.h"
|
|
|
|
// 009fa190
|
|
uint32_t Weapon_Bombs::GetFocusEntity()
|
|
{
|
|
if ((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x34)) >> 4 & 1) == 0) {
|
|
return GHIDRA_CAST<Entity *>(0x0);
|
|
}
|
|
return *GHIDRA_CAST<Entity **>((GHIDRA_CAST<char *>(this) + 0x44));
|
|
}
|
|
|
|
// 009fa1b0
|
|
uint32_t Weapon_Bombs::GetMarkedTargetVariant()
|
|
{
|
|
void *player = this;
|
|
uint8_t isHasItem;
|
|
int targetVariant;
|
|
Entity_Player *player;
|
|
|
|
if ((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(player) + 0x34)) >> 4 & 1) != 0) {
|
|
return 0;
|
|
}
|
|
player = *GHIDRA_CAST<Entity_Player **>((GHIDRA_CAST<char *>(player) + 4));
|
|
if (player != GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
if (player->_type == 1) goto LAB_009fa1e0;
|
|
if (player->_type == 3) {
|
|
player = *GHIDRA_CAST<Entity_Player **>(&player->_isControlsEnabled);
|
|
goto LAB_009fa1e0;
|
|
}
|
|
}
|
|
player = GHIDRA_CAST<Entity_Player *>(0x0);
|
|
LAB_009fa1e0:
|
|
isHasItem = Entity_Player::HasCollectible(player,0x18a,0);
|
|
if (isHasItem == 0) {
|
|
return 0;
|
|
}
|
|
isHasItem = Entity_Player::HasCollectible(player,0x23c,0);
|
|
targetVariant = 0x1e;
|
|
if (isHasItem != 0) {
|
|
targetVariant = 0x99;
|
|
}
|
|
return targetVariant;
|
|
}
|