Curation round 8: the first room plays: Isaac walks and shoots tears

Eight agents took over Room::Init's pieces, RailManager, Room::Render/render_lighting/Update, the GridEntity hierarchy
(walls, doors, rocks, pits, poop ...), Game::Update and interpolate_update, the run's save, update_ingame_input,
Game::Spawn with the entity factory and grid collision, the player's movement and tears through Weapon/Weapon_Tears,
PlayerManager's positions, the camera focus, MinimapConfig, PlayerHUD, mod shader rendering, Entity_Tear and
Entity_Effect. Integration wrote Level::get_secret_exit_kind, shared the secret-exit enum (four copies merged) and
fixed the generator's vtable-stub check (word boundary and namespace, not a substring).
Under gdb a run reaches the first room: doors, HUD with hearts and minimap, WASD movement with acceleration, arrow-key
tears that fly and splash. Floor and walls (Backdrop::RenderFloor/RenderWalls) and room transitions are next.
The official build/isaac reaches the start room and stops at Entity_NPC::Redirect. 2770 functions taken over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-11-20 06:43:01 -05:00
1 parent b85591bdf4
commit 69a354f843
140 files changed
+23561 -20206

No files matched your search

+482 -1
View File
@@ -1,11 +1,492 @@
#include "classes.h"
// 009f3170
uint32_t Weapon_UrnOfSouls::GetMainEntity()
Entity * Weapon_UrnOfSouls::GetMainEntity()
{
return *GHIDRA_CAST<Entity **>((GHIDRA_CAST<char *>(this) + 0x4c));
}
// 00a0e630
void Weapon_UrnOfSouls::Fire(Vector *direction, uint8_t isShooting, uint8_t isInterpolated)
{
Entity_Laser *pEVar1;
Entity_Player *pEVar2;
Entity *spawner;
uint8_t auVar3 [16];
uint8_t auVar4 [16];
uint8_t bVar5;
Vector *pVVar6;
uint32_t rngValue;
Entity_Player *ownerPlayer;
Entity_Tear *pEVar7;
Entity_Laser *laser;
int *extraout_EDX;
float twinDx;
float twinDx;
float twinDy;
uint8_t *puVar9;
uint8_t *aimX;
float fVar10;
uint8_t auVar11 [16];
uint8_t auVar12 [16];
Entity_Tear *local_90;
Entity_Tear *local_8c;
Vector aimDir;
uint8_t *local_80;
Entity_Player *player;
Vector ownerPos;
Vector local_70;
Vector VStack_68;
Entity_Laser *pEStack_60;
uint32_t uStack_5c;
uint32_t uStack_58;
uint32_t uStack_54;
Vector local_48;
ColorMod soulColor;
Entity_NPC *flameLaser;
Manager *manager;
int ownerEntity;
Entity_Tear *soulTear;
BitSet128 temp_7df6acc38b0;
int *urnEffect;
uint32_t urnPosY;
int urnState;
local_90 = GHIDRA_CAST<Entity_Tear *>(direction);
Weapon::Fire(this,direction,isShooting,isInterpolated);
pEVar2 = *GHIDRA_CAST<Entity_Player **>((GHIDRA_CAST<char *>(this) + 4));
player = pEVar2;
if (pEVar2 == GHIDRA_CAST<Entity_Player *>(0x0)) {
LAB_00a0e69d:
ownerPlayer = GHIDRA_CAST<Entity_Player *>(0x0);
if ((pEVar2 == GHIDRA_CAST<Entity_Player *>(0x0)) || (pEVar2->_type != 1)) {
LAB_00a0e6af:
player = GHIDRA_CAST<Entity_Player *>(0x0);
if (pEVar2 == GHIDRA_CAST<Entity_Player *>(0x0)) {
local_48.x = 1.0;
player = GHIDRA_CAST<Entity_Player *>(0x0);
goto LAB_00a0e6d5;
}
}
local_48.x = pEVar2->_speedMultiplier;
}
else {
if (pEVar2->_type != 1) {
if (pEVar2->_type != 3) goto LAB_00a0e69d;
ownerPlayer = *GHIDRA_CAST<Entity_Player **>(&pEVar2->_isControlsEnabled);
goto LAB_00a0e6af;
}
local_48.x = pEVar2->_speedMultiplier;
ownerPlayer = pEVar2;
}
LAB_00a0e6d5:
pEVar2 = player;
if (ownerPlayer != GHIDRA_CAST<Entity_Player *>(0x0)) {
Entity_Player::HasCollectible(ownerPlayer,0x18a,0);
}
ownerPlayer = *GHIDRA_CAST<Entity_Player **>((GHIDRA_CAST<char *>(this) + 4));
local_70.x = *GHIDRA_CAST<float *>(local_90);
local_80 = *GHIDRA_CAST<uint8_t **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_90)) + 0x4))));
if ((local_70.x == g_vectorZero.x) && ((float)local_80 == g_vectorZero.y)) {
local_70.x = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x20));
local_80 = *GHIDRA_CAST<uint8_t **>((GHIDRA_CAST<char *>(this) + 0x24));
}
aimDir.x = local_70.x;
aimDir.y = (float)local_80;
if ((local_70.x == g_vectorZero.x) && ((float)local_80 == g_vectorZero.y)) {
puVar9 = local_80;
aimX = GHIDRA_CAST<uint8_t *>(local_70.x);
if (pEVar2 == GHIDRA_CAST<Entity_Player *>(0x0)) {
if (ownerPlayer->_type == 3) {
switch(ownerPlayer->_chargeBarSprites[5]._scale.x) {
case 0.0:
goto LAB_00a0e785;
case 1.4013e-45:
goto LAB_00a0e7a6;
case 2.8026e-45:
goto LAB_00a0e798;
case 4.2039e-45:
goto LAB_00a0e7ce;
}
}
}
else {
switch(pEVar2->_headDirection) {
case 0:
LAB_00a0e785:
aimX = &DAT_bf800000;
aimDir.x = (float)&DAT_bf800000;
break;
case 1:
LAB_00a0e7a6:
aimDir.y = (float)&DAT_bf800000;
puVar9 = &DAT_bf800000;
break;
case 2:
LAB_00a0e798:
aimDir.x = 1.0;
aimX = GHIDRA_CAST<uint8_t *>(0x3f800000);
break;
case 3:
LAB_00a0e7ce:
aimDir.y = 1.0;
puVar9 = GHIDRA_CAST<uint8_t *>(0x3f800000);
}
}
}
else {
twinDx = sqrtf(local_70.x * local_70.x + (float)local_80 * (float)local_80);
ownerPlayer = *GHIDRA_CAST<Entity_Player **>((GHIDRA_CAST<char *>(this) + 4));
if (twinDx <= 0.0) {
puVar9 = local_80;
aimX = GHIDRA_CAST<uint8_t *>(local_70.x);
}
else {
aimDir.y = (1.0 / twinDx) * (float)local_80;
aimDir.x = (1.0 / twinDx) * local_70.x;
puVar9 = GHIDRA_CAST<uint8_t *>(aimDir.y);
aimX = GHIDRA_CAST<uint8_t *>(aimDir.x);
}
}
local_8c = GHIDRA_CAST<Entity_Tear *>(0x0);
if ((ownerPlayer != GHIDRA_CAST<Entity_Player *>(0x0)) && (ownerPlayer->_type == 1)) {
bVar5 = Entity_Player::HasCollectible(ownerPlayer,0x3b,0);
local_8c = GHIDRA_CAST<Entity_Tear *>(GHIDRA_UINT((bVar5 != 0)));
puVar9 = GHIDRA_CAST<uint8_t *>(aimDir.y);
aimX = GHIDRA_CAST<uint8_t *>(aimDir.x);
}
urnEffect = *GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(this) + 0x4c));
soulTear = GHIDRA_CAST<Entity_Tear *>((GHIDRA_INT(this) + 0x4c));
if (((urnEffect == GHIDRA_CAST<int *>(0x0)) ||
((GHIDRA_CAST<Entity_Tear *>(urnEffect[0xc]) != local_8c &&
((**(code **)(*urnEffect + 0x28))(), puVar9 = GHIDRA_CAST<uint8_t *>(aimDir.y),
aimX = GHIDRA_CAST<uint8_t *>(aimDir.x), *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x4c)) == 0)))) && (isInterpolated == 0))
{
local_90 = GHIDRA_CAST<Entity_Tear *>(Random());
spawner = *GHIDRA_CAST<Entity **>((GHIDRA_CAST<char *>(this) + 4));
if (spawner == GHIDRA_CAST<Entity *>(0x0)) {
ownerPos.x = g_vectorZero.x;
ownerPos.y = g_vectorZero.y;
}
else {
ownerPos.x = (spawner->_pos).x;
ownerPos.y = (spawner->_pos).y;
}
local_8c = (Entity_Tear *)
Game::SpawnEx(g_game,1000,0xb2,&ownerPos,&g_vectorZero,spawner,GHIDRA_UINT(local_8c),
GHIDRA_UINT(local_90),0);
pEVar7 = *GHIDRA_CAST<Entity_Tear **>(soulTear);
if (pEVar7 != local_8c) {
if (pEVar7 != GHIDRA_CAST<Entity_Tear *>(0x0)) {
local_90 = soulTear;
msvc::multiset<unsigned_int>::erase();
}
*GHIDRA_CAST<Entity_Tear **>(soulTear) = local_8c;
pEVar7 = GHIDRA_CAST<Entity_Tear *>(0x0);
if (local_8c != GHIDRA_CAST<Entity_Tear *>(0x0)) {
msvc::multiset<unsigned_int>::insert();
pEVar7 = *GHIDRA_CAST<Entity_Tear **>((GHIDRA_CAST<char *>(this) + 0x4c));
}
}
local_70.x = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 4));
local_8c = GHIDRA_CAST<Entity_Tear *>(&pEVar7->_parent);
if (*GHIDRA_CAST<int *>(local_8c) != 0) {
local_90 = local_8c;
msvc::multiset<unsigned_int>::erase();
}
*GHIDRA_CAST<float *>(local_8c) = local_70.x;
if (GHIDRA_CAST<uint8_t *>(local_70.x) != GHIDRA_CAST<uint8_t *>(0x0)) {
msvc::multiset<unsigned_int>::insert();
}
*GHIDRA_CAST<uint32_t *>((*GHIDRA_CAST<int *>(soulTear) + 0x450)) = 0xfffffffc;
ownerEntity = *GHIDRA_CAST<int *>(soulTear);
*GHIDRA_CAST<uint32_t *>((ownerEntity + 0x34c)) = 0;
*GHIDRA_CAST<uint32_t *>((ownerEntity + 0x350)) = 0xc1700000;
ownerEntity = __RTDynamicCast(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)));
if (((ownerEntity != 0) && (g_manager->_netplayManager != *GHIDRA_CAST<int *>((g_manager + 1)))) &&
(bVar5 = NetplayManager::IsIdxLocalPlayer
(GHIDRA_CAST<NetplayManager *>(&g_manager->_netplayManager),
*GHIDRA_CAST<uint32_t *>((ownerEntity + 0x1618))), bVar5 == 0)) {
ownerEntity = *GHIDRA_CAST<int *>(soulTear);
soulColor._tint[0] = *GHIDRA_CAST<float *>((ownerEntity + 0xf0));
soulColor._tint[1] = *GHIDRA_CAST<float *>((ownerEntity + 0xf4));
soulColor._tint[2] = *GHIDRA_CAST<float *>((ownerEntity + 0xf8));
fVar10 = *GHIDRA_CAST<float *>((ownerEntity + 0xfc));
soulColor._colorize[0] = *GHIDRA_CAST<float *>((ownerEntity + 0x100));
soulColor._colorize[1] = *GHIDRA_CAST<float *>((ownerEntity + 0x104));
soulColor._colorize[2] = *GHIDRA_CAST<float *>((ownerEntity + 0x108));
soulColor._colorize[3] = *GHIDRA_CAST<float *>((ownerEntity + 0x10c));
twinDx = *GHIDRA_CAST<float *>((ownerEntity + 0x110));
soulColor._offset[1] = *GHIDRA_CAST<float *>((ownerEntity + 0x114));
soulColor._offset[2] = *GHIDRA_CAST<float *>((ownerEntity + 0x118));
soulColor._tint[3] = fVar10;
soulColor._offset[0] = twinDx;
FUN_00925df0();
soulColor._tint[3] = twinDx * fVar10;
(**(code **)(*extraout_EDX + 0x3c))(&soulColor);
}
twinDx = atan2f(aimDir.y,aimDir.x);
twinDx = twinDx * 57.295776;
if (0.0 < twinDx) {
twinDx = twinDx + 90.0;
}
else {
twinDx = twinDx - 90.0;
}
*GHIDRA_CAST<float *>((*GHIDRA_CAST<int *>(soulTear) + 0xec)) = twinDx;
(**(code **)(**GHIDRA_CAST<int **>(soulTear) + 0xc))();
puVar9 = GHIDRA_CAST<uint8_t *>(aimDir.y);
aimX = GHIDRA_CAST<uint8_t *>(aimDir.x);
}
if (*GHIDRA_CAST<int *>(soulTear) == 0) {
return;
}
twinDx = atan2f((float)puVar9,(float)aimX);
*GHIDRA_CAST<float *>((*GHIDRA_CAST<int *>(soulTear) + 0x474)) = twinDx * 57.295776;
ownerEntity = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x50));
if (ownerEntity != 0) {
urnPosY = *GHIDRA_CAST<uint32_t *>((*GHIDRA_CAST<int *>(soulTear) + 0x340));
*GHIDRA_CAST<uint32_t *>((ownerEntity + 0x33c)) = *GHIDRA_CAST<uint32_t *>((*GHIDRA_CAST<int *>(soulTear) + 0x33c));
*GHIDRA_CAST<uint32_t *>((ownerEntity + 0x340)) = urnPosY;
ownerEntity = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x50));
local_90 = *GHIDRA_CAST<Entity_Tear **>((ownerEntity + 0x41c));
twinDx = LerpAngleDeg((float)local_90,*GHIDRA_CAST<float *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x4c)) + 0xec)),0.15);
*GHIDRA_CAST<float *>((ownerEntity + 0x418)) = twinDx;
*GHIDRA_CAST<float *>((ownerEntity + 0x41c)) = twinDx;
*GHIDRA_CAST<Entity_Tear **>((ownerEntity + 0x420)) = local_90;
*GHIDRA_CAST<float *>((ownerEntity + 0xec)) = twinDx - 90.0;
}
if (isInterpolated != 0) {
return;
}
ownerEntity = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x4c));
urnState = *GHIDRA_CAST<int *>((ownerEntity + 0x450));
if (urnState < 0) goto LAB_00a0f3a4;
if (((isShooting != 0) && (*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x44)) <= 0.0)) &&
((player != GHIDRA_CAST<Entity_Player *>(0x0) &&
((0 < player->_urnSouls || (0 < player->_effectiveSoulCharge)))))) {
if ((urnState == 3) || (urnState == 4)) {
*GHIDRA_CAST<uint32_t *>((ownerEntity + 0x450)) = 3;
}
else if (urnState == 0) {
*GHIDRA_CAST<uint32_t *>((ownerEntity + 0x450)) = 1;
Weapon::get_owner_position(this,&ownerPos);
manager = g_manager;
local_8c = GHIDRA_CAST<Entity_Tear *>(0x216);
seed_fart_sound_override(GHIDRA_CAST<int *>(&local_8c));
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_8c),1.6,1,0,1.0,0.0);
}
pEVar2 = player;
ownerEntity = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x4c)) + 0x450));
if ((ownerEntity == 2) || (ownerEntity == 3)) {
if (player->_urnSouls < 1) {
if (0 < player->_effectiveSoulCharge) {
Entity_Player::AddSoulCharge(player,-1);
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x44)) = 0x41c80000;
}
}
else {
Entity_Player::AddUrnSouls(player,0xffffffff);
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x44)) = 0x41700000;
}
if ((0.0 < *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x44))) &&
(bVar5 = Entity_Player::HasCollectible(pEVar2,0x248,0), bVar5 != 0)) {
(*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(auVar11)) + 0x8))) = 0;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar11)) + 0x4))) = &ownerPos;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar11)) + 0x0))) = 0xa0ec9d;
pVVar6 = Weapon::get_owner_position(this,&ownerPos);
Entity_Player::AddWisp(pEVar2,0x280,pVVar6,auVar11[8],auVar11[0xc]);
}
}
}
ownerEntity = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x4c));
urnState = *GHIDRA_CAST<int *>((ownerEntity + 0x450));
if (*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x44)) <= 0.0) {
if ((urnState == 2) || (urnState == 3)) {
Weapon::get_owner_position(this,&ownerPos);
manager = g_manager;
local_90 = GHIDRA_CAST<Entity_Tear *>(0x218);
seed_fart_sound_override(GHIDRA_CAST<int *>(&local_90));
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_90),1.6,1,0,1.0,0.0);
manager = g_manager;
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x48)) = 0;
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x20)) = g_vectorZero.x;
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x24)) = g_vectorZero.y;
SFXManager::Stop(&manager->_sfxManager,0x216);
*GHIDRA_CAST<uint32_t *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x4c)) + 0x450)) = 4;
}
goto LAB_00a0f3a4;
}
if ((urnState != 2) && (urnState != 3)) goto LAB_00a0f3a4;
twinDx = local_48.x / 90.0 + *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x48));
local_70.x = 1.0;
if (twinDx <= 1.0) {
local_70.x = twinDx;
}
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x48)) = local_70.x;
Weapon::get_owner_position(this,&ownerPos);
local_90 = GHIDRA_CAST<Entity_Tear *>((*GHIDRA_CAST<float *>((ownerEntity + 0xec)) * 0.017453292));
local_8c = GHIDRA_CAST<Entity_Tear *>(cos((float)local_90));
local_90 = GHIDRA_CAST<Entity_Tear *>(sin((float)local_90));
twinDx = local_70.x * 6.0 + 6.0;
local_70.x = twinDx * (float)local_90;
pEStack_60 = GHIDRA_CAST<Entity_Laser *>((twinDx * (float)local_8c));
rngValue = Random();
VStack_68.x = ((float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) *
2.3283064e-10 * 16.0 - 8.0) * 0.017453292;
local_80 = GHIDRA_CAST<uint8_t *>(cos(VStack_68.x));
twinDx = sin(VStack_68.x);
pEVar2 = player;
ownerEntity = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4));
fVar10 = (float)local_80 * (float)pEStack_60;
local_80 = GHIDRA_CAST<uint8_t *>(((float)local_80 * local_70.x + twinDx * (float)pEStack_60));
VStack_68.x = fVar10 - twinDx * local_70.x;
fVar10 = (float)local_8c * -0.4 * local_48.x;
ownerPos.x = (float)local_8c + (float)local_8c + ownerPos.x;
twinDx = (float)local_90 * -0.4 * local_48.x;
ownerPos.y = (float)local_90 + (float)local_90 + ownerPos.y;
*GHIDRA_CAST<float *>((ownerEntity + 0x364)) =
*GHIDRA_CAST<float *>((ownerEntity + 0x39c)) * twinDx + *GHIDRA_CAST<float *>((ownerEntity + 0x364));
*GHIDRA_CAST<float *>((ownerEntity + 0x360)) =
*GHIDRA_CAST<float *>((ownerEntity + 0x39c)) * fVar10 + *GHIDRA_CAST<float *>((ownerEntity + 0x360));
if (((player != GHIDRA_CAST<Entity_Player *>(0x0)) && (ownerEntity = player->_twinPlayer, ownerEntity != 0)) &&
(twinDx = *GHIDRA_CAST<float *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) + 0x33c)) - *GHIDRA_CAST<float *>((ownerEntity + 0x33c)),
twinDy = *GHIDRA_CAST<float *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) + 0x340)) - *GHIDRA_CAST<float *>((ownerEntity + 0x340)),
twinDy * twinDy + twinDx * twinDx < 6400.0)) {
*GHIDRA_CAST<float *>((ownerEntity + 0x364)) =
twinDx * *GHIDRA_CAST<float *>((ownerEntity + 0x39c)) + *GHIDRA_CAST<float *>((ownerEntity + 0x364));
*GHIDRA_CAST<float *>((ownerEntity + 0x360)) =
*GHIDRA_CAST<float *>((ownerEntity + 0x39c)) * fVar10 + *GHIDRA_CAST<float *>((ownerEntity + 0x360));
}
VStack_68.y = (float)local_80;
pEStack_60 = GHIDRA_CAST<Entity_Laser *>(VStack_68.x);
pVVar6 = Weapon::get_tear_movement_inheritance(this,&local_48,&VStack_68);
VStack_68.x = (float)pEStack_60 + pVVar6->x;
VStack_68.y = (float)local_80 + pVVar6->y;
if (*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x4c)) + 0x30)) == 1) {
twinDx = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x48));
ownerEntity = _get_index_plus_one_if_kind_4_5();
pEVar1 = GHIDRA_CAST<Entity_Laser *>((GHIDRA_INT(this) + 0x50));
laser = *GHIDRA_CAST<Entity_Laser **>(pEVar1);
local_48.x = ((float)ownerEntity * 0.3 + 2.8) * 1.5 * (twinDx * 0.19999999 + 0.8);
if (laser == GHIDRA_CAST<Entity_Laser *>(0x0)) {
ownerEntity = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x4c));
local_70.x = *GHIDRA_CAST<float *>((ownerEntity + 0x33c));
local_70.y = *GHIDRA_CAST<float *>((ownerEntity + 0x340));
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar12)) + 0x8))) = ownerEntity;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar12)) + 0x4))) = &pEStack_60;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar12)) + 0xc))) = 0;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar12)) + 0x0))) = 8;
uStack_5c = 0xc1700000;
pEStack_60 = laser;
twinDx = atan2f((float)local_90,(float)local_8c);
VStack_68.x = (float)Entity_Laser::ShootAngle
(1,&local_70,twinDx * 57.295776,(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar12)) + 0x0))),(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar12)) + 0x4))),
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar12)) + 0x8))),auVar12[0xc]);
laser = *GHIDRA_CAST<Entity_Laser **>(pEVar1);
if (laser != GHIDRA_CAST<Entity_Laser *>(VStack_68.x)) {
if (laser != GHIDRA_CAST<Entity_Laser *>(0x0)) {
pEStack_60 = pEVar1;
msvc::multiset<unsigned_int>::erase();
}
*GHIDRA_CAST<float *>(pEVar1) = VStack_68.x;
laser = GHIDRA_CAST<Entity_Laser *>(0x0);
if (GHIDRA_CAST<Entity_Laser *>(VStack_68.x) != GHIDRA_CAST<Entity_Laser *>(0x0)) {
msvc::multiset<unsigned_int>::insert();
laser = *GHIDRA_CAST<Entity_Laser **>((GHIDRA_CAST<char *>(this) + 0x50));
}
}
laser->_spawnerType = 1;
*GHIDRA_CAST<uint32_t *>((*GHIDRA_CAST<int *>(pEVar1) + 0x38)) = 0;
(**(code **)(**GHIDRA_CAST<int **>(pEVar1) + 0x40))();
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar3)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagShielded._l)) + 0x4)));
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar3)) + 0x0))) = GHIDRA_UINT(g_tearFlagShielded._l);
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar3)) + 0x8))) = GHIDRA_UINT(g_tearFlagShielded._h);
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar3)) + 0xc))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagShielded._h)) + 0x4)));
*(uint8_t (*) [16])(*GHIDRA_CAST<int *>(pEVar1) + 0x428) = auVar3;
(**(code **)(**GHIDRA_CAST<int **>(pEVar1) + 0xc))();
laser = *GHIDRA_CAST<Entity_Laser **>(pEVar1);
if (laser == GHIDRA_CAST<Entity_Laser *>(0x0)) goto LAB_00a0f2ba;
}
(**(code **)(*GHIDRA_CAST<int *>(laser) + 0x40))();
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar4)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagShielded._l)) + 0x4)));
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar4)) + 0x0))) = GHIDRA_UINT(g_tearFlagShielded._l);
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar4)) + 0x8))) = GHIDRA_UINT(g_tearFlagShielded._h);
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar4)) + 0xc))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagShielded._h)) + 0x4)));
*(uint8_t (*) [16])(*GHIDRA_CAST<int *>(pEVar1) + 0x428) = auVar4;
*GHIDRA_CAST<uint32_t *>((*GHIDRA_CAST<int *>(pEVar1) + 0x458)) = 8;
flameLaser = *GHIDRA_CAST<Entity_NPC **>(pEVar1);
twinDx = LerpAngleDeg((flameLaser->_pathfinder)._movementTarget.y,
*GHIDRA_CAST<float *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x4c)) + 0xec)),0.3);
Entity_NPC::SetAimAngle(flameLaser,twinDx);
ownerEntity = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x50));
twinDx = sin(*GHIDRA_CAST<float *>((ownerEntity + 0x41c)) * 0.017453292);
if (twinDx <= -0.5) {
*GHIDRA_CAST<uint32_t *>((ownerEntity + 0x358)) = 0xc1200000;
}
else {
*GHIDRA_CAST<uint32_t *>((ownerEntity + 0x358)) = 0x453b8000;
}
}
else {
rngValue = Random();
local_90 = (Entity_Tear *)
Game::SpawnEx(g_game,2,0x2e,&ownerPos,&VStack_68,GHIDRA_CAST<Entity *>(pEVar2),0,rngValue,0);
VStack_68.x = (float)&local_90->_parent;
if (local_90->_parent != 0) {
pEStack_60 = GHIDRA_CAST<Entity_Laser *>(VStack_68.x);
msvc::multiset<unsigned_int>::erase();
}
*GHIDRA_CAST<Entity_Player **>(VStack_68.x) = pEVar2;
if (pEVar2 != GHIDRA_CAST<Entity_Player *>(0x0)) {
msvc::multiset<unsigned_int>::insert();
}
soulTear = local_90;
Entity_Tear::SetTearFlags(local_90,g_tearFlagPiercing);
soulTear->_tearRange = 160.0;
rngValue = (GHIDRA_CAST<RNG *>((&soulTear->_dropRNG)))->RNG::RandomInt(8);
if (rngValue == 0) {
pEStack_60 = GHIDRA_CAST<Entity_Laser *>((GHIDRA_UINT((soulTear->_tearFlags)._l) | GHIDRA_UINT(g_tearFlagShielded._l)));
uStack_5c = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(soulTear->_tearFlags)._l) + 4)) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagShielded._l)) + 0x4)));
uStack_58 = GHIDRA_UINT((soulTear->_tearFlags)._h) | GHIDRA_UINT(g_tearFlagShielded._h);
uStack_54 = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(soulTear->_tearFlags)._h) + 4)) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagShielded._h)) + 0x4)));
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(temp_7df6acc38b0._l)) + 0x4))) = uStack_5c;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(temp_7df6acc38b0._l)) + 0x0))) = pEStack_60;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(temp_7df6acc38b0._h)) + 0x0))) = uStack_58;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(temp_7df6acc38b0._h)) + 0x4))) = uStack_54;
Entity_Tear::SetTearFlags(soulTear,temp_7df6acc38b0);
}
twinDx = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x48));
ownerEntity = _get_index_plus_one_if_kind_4_5();
soulTear->_mass = 0.0;
pEStack_60 = GHIDRA_CAST<Entity_Laser *>((((float)ownerEntity * 0.3 + 2.3) * (twinDx * 0.19999999 + 0.8)));
twinDx = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x48)) * 0.40000004 + 0.7;
if (twinDx <= 0.01) {
twinDx = 0.01;
}
soulTear->_baseScale = twinDx;
soulTear->_fScale = twinDx;
Entity_Tear::ResetSpriteScale(soulTear);
(**(code **)(*GHIDRA_CAST<int *>(soulTear) + 0x40))();
soulTear->_fallingAccel = 0.1;
(**(code **)(*GHIDRA_CAST<int *>(soulTear) + 0xc))();
}
LAB_00a0f2ba:
Game::ShakeScreen(g_game,3);
Weapon::TriggerTearEffects(this,&aimDir,1);
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x44)) = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x44)) - 1.0;
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x20)) = aimDir.x;
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x24)) = aimDir.y;
LAB_00a0f3a4:
ownerEntity = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x4c));
*GHIDRA_CAST<uint32_t *>((ownerEntity + 0x478)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x48));
urnState = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x4c)) + 0x450));
if (((urnState == 2) || (urnState == 3)) || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x50)) != 0)) {
Weapon::SetBlinkTime(this,4,ownerEntity);
}
return;
}
// 00a0f410
void Weapon_UrnOfSouls::Reset()
{