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:
1 parent
b85591bdf4
commit
69a354f843
140 files changed
+23561
-20206
No files matched your search
@@ -1,7 +1,171 @@
|
||||
#include "classes.h"
|
||||
|
||||
// 00a031b0
|
||||
void Weapon_Deathmatch::Fire(Vector *direction, uint8_t isShooting, uint8_t isInterpolated)
|
||||
{
|
||||
uint8_t bVar1;
|
||||
Vector *pVVar2;
|
||||
uint32_t rngResult;
|
||||
Vector *position;
|
||||
Entity_Bomb *bomb;
|
||||
int iVar3;
|
||||
uint32_t scaleRoll;
|
||||
int unused;
|
||||
int unused_00;
|
||||
long double maxCharge;
|
||||
float fVar4;
|
||||
float fVar5;
|
||||
float fVar6;
|
||||
float maxCharge;
|
||||
uint8_t auVar8 [12];
|
||||
float fVar9;
|
||||
uint8_t *charge;
|
||||
int ownerPlayer;
|
||||
Vector bombVelocity;
|
||||
Vector VStack_18;
|
||||
Vector VStack_10;
|
||||
|
||||
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x10)) = 0x41a00000;
|
||||
Weapon::Fire(this,direction,isShooting,isInterpolated);
|
||||
if (isInterpolated != 0) {
|
||||
return;
|
||||
}
|
||||
ownerPlayer = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4));
|
||||
if (ownerPlayer != 0) {
|
||||
if (*GHIDRA_CAST<int *>((ownerPlayer + 0x28)) == 1) goto LAB_00a03209;
|
||||
if (*GHIDRA_CAST<int *>((ownerPlayer + 0x28)) == 3) {
|
||||
ownerPlayer = *GHIDRA_CAST<int *>((ownerPlayer + 0x410));
|
||||
goto LAB_00a03209;
|
||||
}
|
||||
}
|
||||
ownerPlayer = 0;
|
||||
LAB_00a03209:
|
||||
fVar9 = 0.001;
|
||||
if (0.001 <= *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x10))) {
|
||||
fVar9 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x10));
|
||||
}
|
||||
maxCharge = (long double)this->GetMaxCharge();
|
||||
VStack_10.x = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x20));
|
||||
VStack_10.y = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x24));
|
||||
fVar4 = (float)maxCharge;
|
||||
bVar1 = Weapon::IsAxisAligned(this);
|
||||
fVar5 = 1.0;
|
||||
if (bVar1 == 0) {
|
||||
pVVar2 = Weapon::get_aim_direction(this,&VStack_18,&VStack_10);
|
||||
maxCharge = pVVar2->x;
|
||||
fVar6 = pVVar2->y;
|
||||
fVar5 = sqrtf(maxCharge * maxCharge + fVar6 * fVar6);
|
||||
if (0.0 < fVar5) {
|
||||
maxCharge = pVVar2->x * (1.0 / fVar5);
|
||||
fVar6 = pVVar2->y * (1.0 / fVar5);
|
||||
}
|
||||
fVar5 = 1.0;
|
||||
VStack_10.x = maxCharge;
|
||||
}
|
||||
else {
|
||||
pVVar2 = Vector::ToCardinal(&VStack_18,&VStack_10);
|
||||
fVar6 = pVVar2->y;
|
||||
VStack_10.x = pVVar2->x;
|
||||
}
|
||||
maxCharge = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x14));
|
||||
VStack_10.y = fVar6;
|
||||
if (isShooting == 0) {
|
||||
auVar8 = ZEXT812(0x3a83126f);
|
||||
if ((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar8)) + 0x0))) <= fVar9) {
|
||||
(*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(auVar8)) + 0x4))) = (*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(auVar8)) + 0x4)));
|
||||
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar8)) + 0x0))) = fVar9;
|
||||
}
|
||||
fVar9 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar8)) + 0x0)));
|
||||
if (fVar9 <= maxCharge) {
|
||||
Weapon::UpdateHeadChargeAnimation(this,0xe5,2,&VStack_10,-1.0);
|
||||
if (fVar4 <= *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x14))) {
|
||||
fVar4 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x14));
|
||||
}
|
||||
if (fVar9 <= fVar4) {
|
||||
fVar4 = fVar9;
|
||||
}
|
||||
unused = 7 - GHIDRA_INT((fVar4 * -0.45));
|
||||
iVar3 = 0xb;
|
||||
if (0xb < unused) {
|
||||
iVar3 = unused;
|
||||
}
|
||||
Weapon::SetBlinkTime(this,iVar3,unused);
|
||||
pVVar2 = Weapon::get_tear_movement_inheritance(this,&VStack_18,&VStack_10);
|
||||
bombVelocity.x = pVVar2->x;
|
||||
fVar9 = pVVar2->y;
|
||||
VStack_18.x = fVar9;
|
||||
FUN_009f3c40();
|
||||
rngResult = Random();
|
||||
fVar4 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) *
|
||||
2.3283064e-10 * 3.14;
|
||||
fVar4 = fVar4 + fVar4;
|
||||
rngResult = Random();
|
||||
fVar5 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) *
|
||||
2.3283064e-10;
|
||||
rngResult = Random();
|
||||
fVar6 = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) *
|
||||
2.3283064e-10 * 0.6 + 0.4;
|
||||
maxCharge = cos(fVar4);
|
||||
bombVelocity.x = (maxCharge * fVar5 * 3.5 + (VStack_10.x * 10.0 + bombVelocity.x) * fVar9) * fVar6
|
||||
;
|
||||
fVar4 = sin(fVar4);
|
||||
pVVar2 = &bombVelocity;
|
||||
bombVelocity.y = (fVar4 * fVar5 * 3.5 + (VStack_10.y * 10.0 + VStack_18.x) * fVar9) * fVar6;
|
||||
position = Weapon::get_owner_position(this,&VStack_10);
|
||||
bomb = Weapon::fire_bomb(this,position,pVVar2);
|
||||
if (ownerPlayer != 0) {
|
||||
bomb->_fallAcceleration = 0.8;
|
||||
rngResult = Random();
|
||||
bomb->_fallSpeed =
|
||||
-1.0 - (float)((double)GHIDRA_INT(rngResult) +
|
||||
__uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 8.0;
|
||||
rngResult = Random();
|
||||
iVar3 = bomb->_explosionCountdown1 - rngResult % 0xf;
|
||||
if (iVar3 < 0xf) {
|
||||
iVar3 = 0xf;
|
||||
}
|
||||
bomb->_explosionCountdown1 = iVar3;
|
||||
*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((bomb)) + 0x414)))) = iVar3;
|
||||
}
|
||||
rngResult = Random();
|
||||
scaleRoll = Random();
|
||||
bomb->_loadCostumes = 1;
|
||||
bomb->_explosionDamage = 25.0;
|
||||
fVar9 = (float)((double)GHIDRA_INT(scaleRoll) + __uint_to_double_fixup[-(GHIDRA_INT(scaleRoll) >> 0x1f)]) *
|
||||
2.3283064e-10 * 0.15 + ((float)(rngResult & 1) + 0.0) * 0.2 + 0.4;
|
||||
bomb->_radiusMultiplier = fVar9 * bomb->_radiusMultiplier;
|
||||
bomb->_scale = fVar9 * bomb->_scale;
|
||||
}
|
||||
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x14)) = 0;
|
||||
bVar1 = Weapon::IsItemAnimFinished(this,0xe5);
|
||||
if (bVar1 != 0) {
|
||||
FUN_009f4fc0();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (fVar4 <= maxCharge) {
|
||||
charge = &DAT_bf800000;
|
||||
iVar3 = 1;
|
||||
}
|
||||
else {
|
||||
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) != 0) {
|
||||
fVar5 = *GHIDRA_CAST<float *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) + 0x39c));
|
||||
}
|
||||
iVar3 = 0;
|
||||
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x14)) = fVar5 + maxCharge;
|
||||
charge = GHIDRA_CAST<uint8_t *>((((fVar5 + maxCharge) / fVar4) * 18.0));
|
||||
}
|
||||
Weapon::UpdateHeadChargeAnimation(this,0xe5,iVar3,direction,(float)charge);
|
||||
Weapon::SetBlinkTime(this,1,unused_00);
|
||||
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x20)) = direction->x;
|
||||
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x24)) = direction->y;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 00a036b0
|
||||
long double Weapon_Deathmatch::GetMaxCharge()
|
||||
float Weapon_Deathmatch::GetMaxCharge()
|
||||
{
|
||||
float maxCharge;
|
||||
|
||||
|
||||
Reference in new issue
Block a user