Curation round 21: rock drops, Boss Rush and room setup, Dross, Ashpit and Gehenna enemies, Book of Virtues wisps and Dream Catcher, the last familiars and effects, player damage branches, a Corpse floor and Abyss crash fix, shared constants (186 duplicates)

This commit is contained in:
shweet committed 2026-11-22 11:00:43 -05:00
1 parent 8dbeb1bc4a
commit 6a11163842
184 files changed
+16980 -1419

No files matched your search

-199
View File
@@ -2844,63 +2844,6 @@ uint8_t NpcHelper::candler_is_free_cell(Vector *position)
return 0;
}
// 004e50d0
uint8_t NpcHelper::whipper_is_target(Entity_NPC *npc, Entity *entity)
{
int iVar1;
uint8_t bVar2;
bool isHostile;
isHostile = (npc->_flags & 0x20000100) == 0;
if (GHIDRA_CAST<Entity_NPC *>(entity) != npc) {
iVar1 = entity->_type;
if (iVar1 == 4) {
if (isHostile) {
return 1;
}
}
else if (isHostile) {
if (iVar1 == 1) {
return 1;
}
if (iVar1 != 3) {
return 0;
}
iVar1 = entity->_variant;
if (iVar1 == 0x3e) {
return 1;
}
if (iVar1 == 0x43) {
return 1;
}
if (iVar1 == 0xc9) {
return 1;
}
if (iVar1 == 0xe4) {
return 1;
}
if (iVar1 == 0xee) {
return 1;
}
if (iVar1 == 0xce) {
return 1;
}
if (iVar1 == 0xed) {
return 1;
}
if (iVar1 == 0xd3) {
return 1;
}
return 0;
}
bVar2 = Entity::IsVulnerableEnemy(entity,GHIDRA_CAST<Entity *>(0x0));
if (bVar2 != 0) {
return 1;
}
}
return 0;
}
// 00501e10
void NpcHelper::bouncer_death_gib(Entity_Effect *timer)
{
@@ -3506,122 +3449,6 @@ uint8_t NpcHelper::tarboy_is_creep_near(Entity_NPC *npc, Vector *position)
return 0;
}
// 0055a850
void NpcHelper::bubbles_death_geyser_tick(Entity *owner)
{
uint32_t projVariant;
uint32_t rngResult;
uint32_t rngFactor;
Entity_Projectile *projectile;
float originX;
float cosAngle;
float randScale;
int highShotsLeft;
int lowShotsLeft;
Vector local_18;
Vector local_10;
float originX;
float originY;
originX = (owner->_pos).x;
originY = (owner->_pos).y;
projVariant = Level::GetStageID();
if (projVariant == 0x1b) {
projVariant = 4;
}
else if (projVariant == 0x1c) {
projVariant = 3;
}
else {
projVariant = 0;
}
lowShotsLeft = 2;
do {
rngResult = Random();
originX = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) *
2.3283064e-10 * 3.14;
originX = originX + originX;
cosAngle = cos(originX);
originX = sin(originX);
rngResult = Random();
rngFactor = Random();
randScale = (float)((double)GHIDRA_INT(rngFactor) + __uint_to_double_fixup[-(GHIDRA_INT(rngFactor) >> 0x1f)])
* 2.3283064e-10;
local_18.y = randScale * originX * 2.8;
local_18.x = randScale * cosAngle * 2.8;
rngFactor = Random();
randScale = (float)((double)GHIDRA_INT(rngFactor) + __uint_to_double_fixup[-(GHIDRA_INT(rngFactor) >> 0x1f)])
* 2.3283064e-10;
local_10.x = cosAngle * 5.0 * randScale + originX;
local_10.y = originX * 5.0 * randScale + originY;
projectile = (Entity_Projectile *)
Game::SpawnEx(g_game,9,projVariant,&local_10,&local_18,GHIDRA_CAST<Entity *>(0x0),0,rngResult,0)
;
projectile->_spawnerType = 0x326;
rngResult = Random();
projectile->_fallingAccel = 2.0;
projectile->_scale =
(float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) *
2.3283064e-10 * 1.4;
rngResult = Random();
projectile->_fallingSpeed =
-15.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)])
* 2.3283064e-10 * 60.0;
rngResult = Random();
projectile->_height =
-23.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)])
* 2.3283064e-10 * 15.0;
Entity_Projectile::apply_spawn_flags
(projectile,*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(owner[1])) + 0x40)))),
*GHIDRA_CAST<float *>((owner[1]._sprite._animDefaultName._buf + 8)),owner->_flags,GHIDRA_CAST<Entity *>(0x0));
(**(code **)(*GHIDRA_CAST<int *>(projectile) + 0xc))();
lowShotsLeft = lowShotsLeft + -1;
} while (lowShotsLeft != 0);
highShotsLeft = 2;
do {
rngResult = Random();
originX = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) *
2.3283064e-10 * 3.14;
originX = originX + originX;
cosAngle = cos(originX);
originX = sin(originX);
rngResult = Random();
rngFactor = Random();
randScale = (float)((double)GHIDRA_INT(rngFactor) + __uint_to_double_fixup[-(GHIDRA_INT(rngFactor) >> 0x1f)])
* 2.3283064e-10;
local_10.y = randScale * originX * 2.8;
local_10.x = randScale * cosAngle * 2.8;
rngFactor = Random();
randScale = (float)((double)GHIDRA_INT(rngFactor) + __uint_to_double_fixup[-(GHIDRA_INT(rngFactor) >> 0x1f)])
* 2.3283064e-10;
local_18.x = cosAngle * 5.0 * randScale + originX;
local_18.y = originX * 5.0 * randScale + originY;
projectile = (Entity_Projectile *)
Game::SpawnEx(g_game,9,projVariant,&local_18,&local_10,GHIDRA_CAST<Entity *>(0x0),0,rngResult,0)
;
projectile->_spawnerType = 0x326;
rngResult = Random();
projectile->_fallingAccel = 2.0;
projectile->_scale =
(float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) *
2.3283064e-10 * 1.4;
rngResult = Random();
projectile->_fallingSpeed =
-15.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)])
* 2.3283064e-10 * 60.0;
rngResult = Random();
projectile->_height =
-23.0 - (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)])
* 2.3283064e-10 * 1000.0;
Entity_Projectile::apply_spawn_flags
(projectile,*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(owner[1])) + 0x40)))),
*GHIDRA_CAST<float *>((owner[1]._sprite._animDefaultName._buf + 8)),owner->_flags,GHIDRA_CAST<Entity *>(0x0));
(**(code **)(*GHIDRA_CAST<int *>(projectile) + 0xc))();
highShotsLeft = highShotsLeft + -1;
} while (highShotsLeft != 0);
return;
}
// 0055d070
uint8_t NpcHelper::polty_target_set(int gridIndex)
{
@@ -7210,32 +7037,6 @@ LAB_005adfbb:
return 1;
}
// 006be7e0
uint8_t NpcHelper::is_target_valid(Entity *target)
{
uint8_t bVar1;
bool isTargetable;
if ((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x168)) & 0x100) == 0) {
if (target->_type != 1) {
return 0;
}
bVar1 = Entity_Player::IsInvisible(GHIDRA_CAST<Entity_Player *>(target));
isTargetable = bVar1 == 0;
}
else {
bVar1 = Entity::IsVulnerableEnemy(target,GHIDRA_CAST<Entity *>(0x0));
if (bVar1 == 0) {
return 0;
}
isTargetable = (target->_flags & 0x20000000) == 0;
}
if (isTargetable) {
return 1;
}
return 0;
}
// 006d0ec0
void NpcHelper::fireplace_moveable_update(Entity_NPC *npc)
{