Curation round 17: Theora and Vorbis cutscene videos, Ludovico, Epic and Dr. Fetus, Tractor Beam and Eye of the Occult, familiars and blue spiders, fortune teller and restock, the Bag of Crafting and four tainted characters, ten enemies, water and the ultra secret door, Isaac, ???, the Lamb and Hush
This commit is contained in:
1 parent
e9de039d0f
commit
024cb12016
133 files changed
+13325
-2520
No files matched your search
@@ -1,194 +1,5 @@
|
||||
#include "classes.h"
|
||||
|
||||
// 004830e0
|
||||
void NpcHelper::the_lamb_pattern(Entity_NPC *npc, int pattern, int frame)
|
||||
{
|
||||
Entity *target;
|
||||
uint32_t uVar1;
|
||||
int projectileCount;
|
||||
bool isEighthFrame;
|
||||
float fVar2;
|
||||
float pitch;
|
||||
Vector local_c8;
|
||||
float dirY;
|
||||
float dirX;
|
||||
float projectileSpeed;
|
||||
ProjectileParams params;
|
||||
float local_8;
|
||||
Manager *manager;
|
||||
|
||||
local_8 = (float)(__security_cookie ^ GHIDRA_UINT(&(¶ms)[1].CircleAngle));
|
||||
ProjectileParams::ProjectileParams(¶ms);
|
||||
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(params)) + 0x4))) = 0x40a00000;
|
||||
params.Scale = 1.8;
|
||||
params.FallingAccelModifier = -0.06;
|
||||
params.FallingSpeedModifier = -2.0;
|
||||
target = Entity_NPC::GetPlayerTarget(npc);
|
||||
dirX = (target->_pos).x - (npc->_pos).x;
|
||||
dirY = (target->_pos).y - (npc->_pos).y;
|
||||
fVar2 = sqrtf(dirX * dirX + dirY * dirY);
|
||||
pitch = 1.0;
|
||||
if (0.0 < fVar2) {
|
||||
dirY = (1.0 / fVar2) * dirY;
|
||||
dirX = (1.0 / fVar2) * dirX;
|
||||
}
|
||||
local_c8.y = atan2f(dirY,dirX);
|
||||
if (pattern < 4) {
|
||||
params.Color._colorize[0] = (float)0x3f333333;
|
||||
params.Color._colorize[1] = (float)0x3f333333;
|
||||
params.Color._colorize[2] = 1.0;
|
||||
params.Color._colorize[3] = 1.0;
|
||||
if (pattern == 0) {
|
||||
if (frame != (frame / 3) * 3) {
|
||||
return;
|
||||
}
|
||||
fVar2 = (float)frame * 0.125;
|
||||
}
|
||||
else {
|
||||
if (pattern != 1) {
|
||||
if (pattern == 2) {
|
||||
if (frame % 0x16 != 0) {
|
||||
return;
|
||||
}
|
||||
projectileCount = 3;
|
||||
projectileSpeed = 8.0;
|
||||
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(params.BulletFlags)) + 0x0))) = GHIDRA_UINT(params.BulletFlags) | 0x10000;
|
||||
params.FallingSpeedModifier = 0.0;
|
||||
params.FallingAccelModifier = 0.0;
|
||||
}
|
||||
else {
|
||||
if (pattern != 3) {
|
||||
return;
|
||||
}
|
||||
if (frame % 0x16 != 0) {
|
||||
return;
|
||||
}
|
||||
projectileSpeed = 9.0;
|
||||
projectileCount = 10;
|
||||
}
|
||||
goto LAB_00483620;
|
||||
}
|
||||
if (frame != (frame / 3) * 3) {
|
||||
return;
|
||||
}
|
||||
fVar2 = (float)frame * -0.125;
|
||||
}
|
||||
projectileSpeed = 12.0;
|
||||
projectileCount = 5;
|
||||
params.CircleAngle = (fVar2 / 30.0) * 6.2831855;
|
||||
}
|
||||
else {
|
||||
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(params.BulletFlags)) + 0x0))) = GHIDRA_UINT(params.BulletFlags) | 1;
|
||||
params.HomingStrength = 0.3;
|
||||
if (pattern == 4) {
|
||||
uVar1 = frame & 0x80000007;
|
||||
isEighthFrame = uVar1 == 0;
|
||||
if (GHIDRA_INT(uVar1) < 0) {
|
||||
isEighthFrame = (uVar1 - 1 | 0xfffffff8) == 0xffffffff;
|
||||
}
|
||||
if (!isEighthFrame) {
|
||||
return;
|
||||
}
|
||||
projectileSpeed = 9.0;
|
||||
projectileCount = 7;
|
||||
params.FireDirectionLimit.x = dirX;
|
||||
params.FireDirectionLimit.y = dirY;
|
||||
params.DotProductLimit = 0.4;
|
||||
params.CircleAngle = 0.0;
|
||||
}
|
||||
else if (pattern == 5) {
|
||||
uVar1 = frame & 0x80000007;
|
||||
isEighthFrame = uVar1 == 0;
|
||||
if (GHIDRA_INT(uVar1) < 0) {
|
||||
isEighthFrame = (uVar1 - 1 | 0xfffffff8) == 0xffffffff;
|
||||
}
|
||||
if (!isEighthFrame) {
|
||||
return;
|
||||
}
|
||||
projectileSpeed = 9.0;
|
||||
projectileCount = 7;
|
||||
params.FireDirectionLimit.x = dirX;
|
||||
params.FireDirectionLimit.y = dirY;
|
||||
params.DotProductLimit = 0.4;
|
||||
params.CircleAngle = local_c8.y;
|
||||
}
|
||||
else if (pattern == 6) {
|
||||
uVar1 = frame & 0x80000007;
|
||||
isEighthFrame = uVar1 == 0;
|
||||
if (GHIDRA_INT(uVar1) < 0) {
|
||||
isEighthFrame = (uVar1 - 1 | 0xfffffff8) == 0xffffffff;
|
||||
}
|
||||
if (!isEighthFrame) {
|
||||
return;
|
||||
}
|
||||
projectileSpeed = 9.0;
|
||||
projectileCount = 7;
|
||||
params.FireDirectionLimit.x = dirX;
|
||||
params.FireDirectionLimit.y = dirY;
|
||||
params.DotProductLimit = 0.4;
|
||||
uVar1 = Random();
|
||||
params.CircleAngle =
|
||||
((float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) *
|
||||
2.3283064e-10 - 0.5) * 3.1415927 * 0.1 + local_c8.y + 0.44879895;
|
||||
}
|
||||
else if (pattern == 7) {
|
||||
uVar1 = frame & 0x80000007;
|
||||
isEighthFrame = uVar1 == 0;
|
||||
if (GHIDRA_INT(uVar1) < 0) {
|
||||
isEighthFrame = (uVar1 - 1 | 0xfffffff8) == 0xffffffff;
|
||||
}
|
||||
if (!isEighthFrame) {
|
||||
return;
|
||||
}
|
||||
projectileSpeed = 9.0;
|
||||
projectileCount = 7;
|
||||
params.FireDirectionLimit.y = dirY;
|
||||
params.DotProductLimit = 0.4;
|
||||
params.FireDirectionLimit.x = dirX;
|
||||
fVar2 = sin(((float)frame + (float)frame) / 30.0);
|
||||
params.CircleAngle = fVar2 * 0.44879895 + local_c8.y + 0.44879895;
|
||||
}
|
||||
else if (pattern == 8) {
|
||||
if (frame % 0xd != 0) {
|
||||
return;
|
||||
}
|
||||
projectileSpeed = 9.0;
|
||||
projectileCount = 8;
|
||||
params.FireDirectionLimit.x = dirX;
|
||||
params.FireDirectionLimit.y = dirY;
|
||||
params.DotProductLimit = 0.0;
|
||||
}
|
||||
else {
|
||||
if (pattern != 9) {
|
||||
return;
|
||||
}
|
||||
if (frame % 10 != 0) {
|
||||
return;
|
||||
}
|
||||
projectileCount = 3;
|
||||
projectileSpeed = 9.0;
|
||||
params.HomingStrength = 0.65;
|
||||
params.CircleAngle = (((float)frame * -0.125) / 30.0) * 6.2831855;
|
||||
}
|
||||
}
|
||||
LAB_00483620:
|
||||
uVar1 = Random();
|
||||
manager = g_manager;
|
||||
if (npc->_championColorIdx == 0x12) {
|
||||
pitch = 1.5;
|
||||
}
|
||||
else if (npc->_championColorIdx == 0x13) {
|
||||
pitch = 0.5;
|
||||
}
|
||||
local_c8.y = 1.62551e-43;
|
||||
seed_fart_sound_override(GHIDRA_CAST<int *>(&local_c8.y));
|
||||
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_c8.y),0.6,uVar1 % 0x1e + 0x14,0,pitch,0.0);
|
||||
local_c8.x = projectileSpeed;
|
||||
local_c8.y = (float)projectileCount;
|
||||
Entity_NPC::FireProjectiles(npc,&npc->_pos,&local_c8,9,¶ms);
|
||||
return;
|
||||
}
|
||||
|
||||
// 00499a50
|
||||
int * NpcHelper::chub_nearest_segment(int *param_1, int param_2)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user