Curation round 14: console and Lua API, effects, lasers, enemies, eleven bosses, the Depths and Mom, status effects, the playable characters

This commit is contained in:
shweet committed 2026-11-20 19:04:41 -05:00
1 parent 8ae02a8422
commit 6e3da161fc
138 files changed
+16754 -6825

No files matched your search

-165
View File
@@ -7458,171 +7458,6 @@ LAB_00548a4b:
return;
}
// 0054ccc0
void NpcHelper::bulb_player_collision(Entity_NPC *npc, Entity *collider)
{
EntityRef *sourceRef;
uint32_t uVar1;
int chargeChange;
Entity *effect;
uint32_t uVar2;
float proceduralIdx;
float fVar3;
Game *game;
bool bVar4;
float fVar5;
int itemConfig;
Vector local_3c;
Entity_NPC *npcLocal;
EntityRef damageSource;
Manager *manager;
npcLocal = npc;
if (npc->_variant == 6) {
if ((collider->_type == 1) || (collider->_type == 3)) {
damageSource._position.x = (npc->_pos).x;
damageSource._position.y = (npc->_pos).y;
damageSource._type = npc->_type;
damageSource._spawnerType = npc->_spawnerType;
damageSource._spawnerVariant = npc->_spawnerVariant;
damageSource._velocity.x = (npc->_velocity).x;
damageSource._velocity.y = (npc->_velocity).y;
damageSource._variant = 6;
local_3c.x = (float)GHIDRA_UINT(((npc->_flags & 0x100) != 0));
if ((npc->_flags & 0x20000000) == 0) {
uVar2 = 0;
}
else {
uVar2 = 2;
}
if ((npc->_flags & 0x40000000000000) == 0) {
uVar1 = 0;
}
else {
uVar1 = 4;
}
damageSource._flags = uVar1 | uVar2 | GHIDRA_UINT(local_3c.x);
damageSource._entity = npc;
(**(code **)(*GHIDRA_CAST<int *>(collider) + 0x20))(0x3f800000,0,0,&damageSource,0x1e);
}
else {
sourceRef = EntityRef::EntityRef(&damageSource);
(**(code **)(*GHIDRA_CAST<int *>(collider) + 0x20))(0x41200000,0,0,sourceRef,0x1e);
}
npc->_state = 6;
fVar5 = -(npc->_v1).x;
proceduralIdx = -(npc->_v1).y;
(npc->_v1).x = fVar5;
(npc->_v1).y = proceduralIdx;
npc->_stateFrame = 4;
fVar3 = (npc->_pos).y;
(npc->_targetPosition).x = fVar5 * 80.0 + (npc->_pos).x;
(npc->_targetPosition).y = proceduralIdx * 80.0 + fVar3;
fVar3 = (npc->_v1).y;
proceduralIdx = npc->_speedMultiplier;
(npc->_velocity).x = (npc->_v1).x * 16.0 * proceduralIdx + (npc->_velocity).x;
(npc->_velocity).y = fVar3 * 16.0 * proceduralIdx + (npc->_velocity).y;
return;
}
if ((collider == GHIDRA_CAST<Entity *>(0x0)) || (collider->_type != 1)) {
return;
}
npc->_state = 6;
proceduralIdx = -(npc->_v1).x;
fVar5 = -(npc->_v1).y;
npc->_stateFrame = 4;
(npc->_v1).x = proceduralIdx;
(npc->_v1).y = fVar5;
fVar3 = (npc->_pos).x;
(npc->_targetPosition).y = fVar5 * 80.0 + (npc->_pos).y;
(npc->_targetPosition).x = proceduralIdx * 80.0 + fVar3;
fVar3 = npc->_speedMultiplier;
(npc->_velocity).x = proceduralIdx * 16.0 * fVar3 + (npc->_velocity).x;
(npc->_velocity).y = fVar5 * 16.0 * fVar3 + (npc->_velocity).y;
Entity_Player::PlayExtraAnimation(GHIDRA_CAST<Entity_Player *>(collider),&DAT_00b1d3b0);
Entity_Player::ResetItemState(GHIDRA_CAST<Entity_Player *>(collider));
uVar2 = 0;
game = g_game;
do {
fVar3 = collider[5]._sprite._championColor._colorize[uVar2 * 8 + 1];
if (game == GHIDRA_CAST<Game *>(0x0)) {
if (-1 < GHIDRA_INT(fVar3)) goto LAB_0054cfd6;
LAB_0054d012:
itemConfig = 0;
}
else if (GHIDRA_INT(fVar3) < 0) {
proceduralIdx = (float)~GHIDRA_UINT(fVar3);
bVar4 = -1 < GHIDRA_INT(fVar3);
fVar3 = proceduralIdx;
if ((bVar4) ||
(GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._end) -
GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._begin) >> 2 <= GHIDRA_INT(proceduralIdx)))
goto LAB_0054d012;
itemConfig = **GHIDRA_CAST<int **>((GHIDRA_INT((game->_proceduralItemManager)._proceduralItems._begin) +
GHIDRA_INT(proceduralIdx) * 4));
}
else {
LAB_0054cfd6:
if (GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) -
GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2 <= GHIDRA_INT(fVar3)) goto LAB_0054d012;
itemConfig = *GHIDRA_CAST<int *>((GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) + GHIDRA_INT(fVar3) * 4));
game = g_game;
}
if (uVar2 == 3) {
local_3c.x = 0.0;
}
else if (((uVar2 == 2) &&
((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(chargeChange)) + 0x0))) = collider[5]._valid, (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(chargeChange)) + 0x1))) = collider[5]._visible,
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(chargeChange)) + 0x2))) = collider[5]._exists, (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(chargeChange)) + 0x3))) = collider[5]._dead,
chargeChange == 0x244)) && (game->_challenge == 0x2c)) {
local_3c.x = 0.0;
}
else {
local_3c.x = (float)Entity_Player::GetCollectibleMaxCharge
(GHIDRA_CAST<Entity_Player *>(collider),
GHIDRA_INT(collider[5]._sprite._championColor._colorize)
[uVar2 * 8 + 1],
*GHIDRA_CAST<int *>((GHIDRA_INT((&collider[5]._sprite._championColor + 1)) +
uVar2 * 0x20 + 4)),GHIDRA_INT(fVar3));
game = g_game;
}
if (((itemConfig != 0) && (0 < GHIDRA_INT(local_3c.x))) &&
((uVar2 < 4 && (0 < GHIDRA_INT(collider[5]._sprite._championColor._colorize[uVar2 * 8 + 3]))))) {
chargeChange = Entity_Player::GetActiveMaxCharge(GHIDRA_CAST<Entity_Player *>(collider),uVar2);
if (chargeChange == 1) {
chargeChange = -1000;
}
else if (GHIDRA_INT(local_3c.x) < 0xd) {
chargeChange = -2;
}
else {
chargeChange = GHIDRA_INT(((uint64_t)((int64_t)GHIDRA_INT(local_3c.x) * 0x55555555) >> 0x20)) -
GHIDRA_INT(local_3c.x);
chargeChange = (chargeChange >> 1) - (chargeChange >> 0x1f);
}
Entity_Player::AddActiveCharge(GHIDRA_CAST<Entity_Player *>(collider),chargeChange,uVar2,0,0,0);
HUD::FlashChargeBar(&g_game->_hud,GHIDRA_CAST<Entity_Player *>(collider),uVar2);
manager = g_manager;
local_3c.x = 6.9084e-43;
seed_fart_sound_override(GHIDRA_CAST<int *>(&local_3c));
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_3c.x),1.0,2,0,1.0,0.0);
uVar2 = Random();
local_3c.x = (collider->_pos).x;
local_3c.y = (collider->_pos).y;
effect = Game::SpawnEx(g_game,1000,0x31,&local_3c,&g_vectorZero,GHIDRA_CAST<Entity *>(0x0),3,uVar2,0);
(effect->_sprite)._offset.x = 0.0;
(effect->_sprite)._offset.y = -24.0;
effect->_renderDepthOffset = 1.0;
npcLocal->_projectileCooldown = npcLocal->_projectileCooldown + 1;
return;
}
uVar2 = uVar2 + 1;
if (3 < uVar2) {
return;
}
} while( true );
}
// 0054f670
void NpcHelper::needle_render(Entity_NPC *npc)
{