Eight agents took over ScoreSheet, DeathmatchManager, giantbook and boss overlays, FXLayers, PlayerManager, the menu manager with the save and prompt flow, twelve menus (character wheel, options, challenges, daily (offline), special seeds, leaderboard (local), collection, bestiary, stats, controller select, key config, cutscenes), console text input and gamepad hot-plug through platform listeners. Integration moved input to device ids. KAGE's projection matrix now reaches the 'ProjectionMatrix' uniform the basic shaders from afterbirthp.a declare, as well as the exe's 'Transform', which takes the color-mod and HQ4X passes from black to correct output. Under gdb with stubs skipped, the intro, title, file select, main menu and character wheel render as in the game. 1330 functions taken over, boot path 261/615. build/isaac stops at OnlineEmotes::init in Game::LoadConfigXmls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9657 lines
475 KiB
C++
9657 lines
475 KiB
C++
#include "classes.h"
|
|
|
|
// 004177c0
|
|
BitSet128 * Entity_Tear::TearFlags(BitSet128 *outFlags)
|
|
{
|
|
uint32_t uVar1;
|
|
uint32_t uVar2;
|
|
uint64_t qVar3;
|
|
|
|
uVar1 = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4));
|
|
qVar3 = (this->_tearFlags)._h;
|
|
uVar2 = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4));
|
|
*GHIDRA_CAST<int *>(&outFlags->_l) = GHIDRA_INT((this->_tearFlags)._l);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&outFlags->_l) + 4)) = uVar1;
|
|
*GHIDRA_CAST<int *>(&outFlags->_h) = GHIDRA_INT(qVar3);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&outFlags->_h) + 4)) = uVar2;
|
|
return outFlags;
|
|
}
|
|
|
|
// 00431750
|
|
long double Entity_Tear::Height()
|
|
{
|
|
return (long double)this->_height;
|
|
}
|
|
|
|
// 00435e50
|
|
long double Entity_Tear::FallingAcceleration()
|
|
{
|
|
return (long double)this->_fallingAccel;
|
|
}
|
|
|
|
// 00456440
|
|
long double Entity_Tear::FallingSpeed()
|
|
{
|
|
return (long double)this->_fallingSpeed;
|
|
}
|
|
|
|
// 004aade0
|
|
int Entity_Tear::TearIndex()
|
|
{
|
|
return this->_tearIdx;
|
|
}
|
|
|
|
// 00557cd0
|
|
long double Entity_Tear::Scale()
|
|
{
|
|
return (long double)this->_fScale;
|
|
}
|
|
|
|
// 0060ccb0
|
|
long double Entity_Tear::BaseScale()
|
|
{
|
|
return (long double)this->_baseScale;
|
|
}
|
|
|
|
// 0060ccc0
|
|
long double Entity_Tear::Rotation()
|
|
{
|
|
return (long double)this->_rotation;
|
|
}
|
|
|
|
// 0060ccd0
|
|
void Entity_Tear::SetKnockbackMultiplier(float param_2)
|
|
{
|
|
this->_knockbackMultiplier = param_2;
|
|
return;
|
|
}
|
|
|
|
// 0060cd00
|
|
void Entity_Tear::SetWaitFrames(int param_2)
|
|
{
|
|
this->_waitFrames = param_2;
|
|
return;
|
|
}
|
|
|
|
// 00665b00
|
|
Entity_Player * Entity_Tear::GetRootPlayer()
|
|
{
|
|
Entity_Player *nextSpawner;
|
|
Entity_Player *spawner;
|
|
|
|
nextSpawner = GHIDRA_CAST<Entity_Player *>(this->_spawnerEntity);
|
|
while (spawner = nextSpawner, spawner != GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
this = GHIDRA_CAST<Entity_Tear *>(spawner);
|
|
nextSpawner = GHIDRA_CAST<Entity_Player *>(spawner->_spawnerEntity);
|
|
}
|
|
if ((GHIDRA_CAST<Entity_Player *>(this))->_type != 1) {
|
|
this = GHIDRA_CAST<Entity_Tear *>(0x0);
|
|
}
|
|
return GHIDRA_CAST<Entity_Player *>(this);
|
|
}
|
|
|
|
// 00665cf0
|
|
void Entity_Tear::Constructor()
|
|
{
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00af776d;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::constructor();
|
|
*GHIDRA_CAST<uint8_t ***>(this) = IsaacRepentancePlus::Entity_Tear::vftable;
|
|
*GHIDRA_CAST<uint32_t *>(&(this->_tearFlags)._l) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(this->_tearFlags)._h) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) = 0;
|
|
(this->_continueVelocity).y = 0.0;
|
|
(this->_continueVelocity).x = 0.0;
|
|
(this->_hitList)._begin = (void *)0x0;
|
|
(this->_hitList)._end = (void *)0x0;
|
|
(this->_hitList)._capacity = (void *)0x0;
|
|
(this->_stickDiff).y = 0.0;
|
|
(this->_stickDiff).x = 0.0;
|
|
this->_linkPrev = 0;
|
|
this->_linkNext = 0;
|
|
this->_attachedEffect = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4a0)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4a4)))) = 0;
|
|
local_8 = 6;
|
|
ANM2::constructor(&this->_tearHaloANM2);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 7;
|
|
ANM2::constructor(&this->_tearEffectANM2);
|
|
local_8 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),8);
|
|
ANM2::constructor(&this->_deadEyeANM2);
|
|
(this->_posDisplacement).y = 0.0;
|
|
(this->_posDisplacement).x = 0.0;
|
|
(this->_parentOffset).y = 0.0;
|
|
(this->_parentOffset).x = 0.0;
|
|
(this->_holdOffset).y = 0.0;
|
|
(this->_holdOffset).x = 0.0;
|
|
(this->_holdVelocity).y = 0.0;
|
|
(this->_holdVelocity).x = 0.0;
|
|
(this->_orbitVelocity).y = 0.0;
|
|
(this->_orbitVelocity).x = 0.0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x828)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x82c)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x830)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x834)))) = 0;
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 006660a0
|
|
void Entity_Tear::Init(int type, int variant, int subType, uint32_t initSeed)
|
|
{
|
|
uint32_t uVar1;
|
|
LayerState *layer;
|
|
int iVar2;
|
|
char *pcVar3;
|
|
float heightOffsetY;
|
|
int *local_48;
|
|
std_string bulletAnm2Path;
|
|
std_string local_2c;
|
|
uint32_t local_14;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
Game *game;
|
|
uint8_t *layerIndex;
|
|
uint32_t *linkPrevSlot;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00af77c5;
|
|
local_10 = ExceptionList;
|
|
local_14 = __security_cookie ^ GHIDRA_UINT(&(&local_2c)[1]._size);
|
|
ExceptionList = &local_10;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::Init(type,variant,subType,initSeed);
|
|
if (this->_config != (void *)0x0) {
|
|
ANM2::Load(&this->_sprite,GHIDRA_CAST<std_string *>((GHIDRA_INT(this->_config) + 0x74)),1);
|
|
}
|
|
this->_entityGridCollisionClass = 4;
|
|
this->_collisionDamage = 3.5;
|
|
this->_baseDamage = 3.5;
|
|
uVar1 = Random();
|
|
this->_fallingAccel = 0.0;
|
|
this->_height = -23.0;
|
|
this->_fallingSpeed =
|
|
((float)((double)GHIDRA_INT(uVar1) + __uint_to_double_fixup[-(GHIDRA_INT(uVar1) >> 0x1f)]) * 2.3283064e-10
|
|
- 0.5) * 0.2;
|
|
heightOffsetY = get_height_offset_y(this,-23.0);
|
|
game = g_game;
|
|
(this->_posOffset).y = heightOffsetY;
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(game->_room) + 8)) == 0x10) {
|
|
(this->_posOffset).y = -18.0;
|
|
}
|
|
this->_homingFriction = 0.85;
|
|
linkPrevSlot = &this->_linkPrev;
|
|
this->_fScale = 1.0;
|
|
this->_baseScale = 1.0;
|
|
this->_rotation = 0.0;
|
|
this->_scaleAnimNum = -1;
|
|
this->_knockbackMultiplier = 1.7;
|
|
this->_maxHitPoints = 0.0;
|
|
*GHIDRA_CAST<uint32_t *>(&(this->_tearFlags)._l) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(this->_tearFlags)._h) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) = 0;
|
|
this->_waitFrames = 0;
|
|
(this->_continueVelocity).x = g_vectorZero.x;
|
|
(this->_continueVelocity).y = g_vectorZero.y;
|
|
(this->_hitList)._end = (this->_hitList)._begin;
|
|
(this->_posDisplacement).x = g_vectorZero.x;
|
|
(this->_posDisplacement).y = g_vectorZero.y;
|
|
(this->_parentOffset).x = g_vectorZero.x;
|
|
(this->_parentOffset).y = g_vectorZero.y;
|
|
this->_stickTarget = (void *)0x0;
|
|
(this->_stickDiff).x = g_vectorZero.x;
|
|
(this->_stickDiff).y = g_vectorZero.y;
|
|
this->_techZeroLaser = 0;
|
|
this->_techZeroTarget = 0;
|
|
this->_laserShotLaser = 0;
|
|
if (*linkPrevSlot != 0) {
|
|
local_48 = linkPrevSlot;
|
|
msvc::multiset<unsigned_int>::erase(&local_48);
|
|
*linkPrevSlot = 0;
|
|
}
|
|
if (this->_linkNext != 0) {
|
|
local_48 = &this->_linkNext;
|
|
msvc::multiset<unsigned_int>::erase(&local_48);
|
|
this->_linkNext = 0;
|
|
}
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4a8)))) = 0;
|
|
this->_deadEyeIntensity = 0.0;
|
|
this->_multidimensionalTouched = 0;
|
|
this->_prismTouched = 0;
|
|
this->_isFireSoundPending = 1;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x46b))) = 0;
|
|
this->_canTriggerStreakEnd = 1;
|
|
this->_isHovering = 0;
|
|
this->_isFireSoundMuted = 0;
|
|
(this->_holdOffset).x = g_vectorZero.x;
|
|
(this->_holdOffset).y = g_vectorZero.y;
|
|
this->_holdTimer = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&this->_popBounceCount) = 0;
|
|
this->_hitCount = 0;
|
|
this->_deathFlags = 0;
|
|
uVar1 = g_graphicsManager_flags;
|
|
if (this->_variant == 0x25) {
|
|
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x1));
|
|
iVar2 = 1;
|
|
if ((uVar1 & 4) == 0) {
|
|
iVar2 = 6;
|
|
}
|
|
layer->_blendMode[0] = 0;
|
|
layer->_blendMode[1] = iVar2;
|
|
layer->_blendMode[2] = 1;
|
|
layer->_blendMode[3] = 1;
|
|
layer->_blendMode[4] = 1;
|
|
}
|
|
this->_orbitAngle = 0.0;
|
|
this->_orbitRadius = 0.0;
|
|
(this->_orbitVelocity).x = g_vectorZero.x;
|
|
(this->_orbitVelocity).y = g_vectorZero.y;
|
|
this->_tearRange = 260.0;
|
|
this->_tearIdx = -1;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x828)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x82c)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x830)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x834)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x838)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x83c)))) = 0x1e;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x840)))) = 0x3c75c28f;
|
|
game = g_game;
|
|
if (this->_variant == 0xd) {
|
|
local_48 = GHIDRA_CAST<int *>(&DAT_0000004f);
|
|
msvc::set<int>::find_node(local_2c._buf + 0xc,&local_48);
|
|
if (((*GHIDRA_CAST<char *>((local_2c._capacity + 0xd)) != '\0') ||
|
|
(0x4f < *GHIDRA_CAST<int *>((local_2c._capacity + 0x10)))) ||
|
|
((void *)local_2c._capacity == (game->_seedEffects)._seedEffects)) goto LAB_0066669b;
|
|
bulletAnm2Path._size = 0;
|
|
bulletAnm2Path._capacity = 0xf;
|
|
bulletAnm2Path._buf[0] = '\0';
|
|
bulletAnm2Path._buf[1] = '\0';
|
|
bulletAnm2Path._buf[2] = '\0';
|
|
bulletAnm2Path._buf[3] = '\0';
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bulletAnm2Path._buf)) + 0x0))) = msvc::_Allocate(0x30);
|
|
bulletAnm2Path._size = 0x20;
|
|
bulletAnm2Path._capacity = 0x2f;
|
|
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(bulletAnm2Path._buf))) + 0x0))),"gfx/promo/gfuel/bullet tear.anm2",0x21);
|
|
local_8 = 0;
|
|
ANM2::Load(&this->_sprite,&bulletAnm2Path,1);
|
|
local_8 = 0xffffffff;
|
|
if (0xf < bulletAnm2Path._capacity) {
|
|
uVar1 = bulletAnm2Path._capacity + 1;
|
|
pcVar3 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(bulletAnm2Path._buf))) + 0x0)));
|
|
if (0xfff < uVar1) {
|
|
pcVar3 = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bulletAnm2Path._buf)) + 0x0))) + -4));
|
|
uVar1 = bulletAnm2Path._capacity + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bulletAnm2Path._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar3))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(pcVar3,uVar1);
|
|
}
|
|
layerIndex = GHIDRA_CAST<uint8_t *>(0x0);
|
|
}
|
|
else {
|
|
if (this->_variant != 0x17) goto LAB_0066669b;
|
|
local_48 = GHIDRA_CAST<int *>(&DAT_0000004f);
|
|
msvc::set<int>::find_node(local_2c._buf + 0xc,&local_48);
|
|
if (((*GHIDRA_CAST<char *>((local_2c._capacity + 0xd)) != '\0') ||
|
|
(0x4f < *GHIDRA_CAST<int *>((local_2c._capacity + 0x10)))) ||
|
|
((void *)local_2c._capacity == (game->_seedEffects)._seedEffects)) goto LAB_0066669b;
|
|
local_2c._size = 0;
|
|
local_2c._capacity = 0xf;
|
|
local_2c._buf[0] = '\0';
|
|
local_2c._buf[1] = '\0';
|
|
local_2c._buf[2] = '\0';
|
|
local_2c._buf[3] = '\0';
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x0))) = msvc::_Allocate(0x20);
|
|
local_2c._size = 0x1c;
|
|
local_2c._capacity = 0x1f;
|
|
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_2c._buf))) + 0x0))),"gfx/promo/gfuel/missile.anm2",0x1d);
|
|
local_8 = 1;
|
|
ANM2::Load(&this->_sprite,&local_2c,1);
|
|
local_8 = 0xffffffff;
|
|
if (0xf < local_2c._capacity) {
|
|
uVar1 = local_2c._capacity + 1;
|
|
pcVar3 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_2c._buf))) + 0x0)));
|
|
if (0xfff < uVar1) {
|
|
pcVar3 = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x0))) + -4));
|
|
uVar1 = local_2c._capacity + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar3))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(pcVar3,uVar1);
|
|
}
|
|
local_2c._size = 0;
|
|
local_2c._capacity = GHIDRA_UINT(&DAT_0000000f);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x0))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x0))) & 0xffffff00;
|
|
layerIndex = GHIDRA_CAST<uint8_t *>(0x1);
|
|
}
|
|
uVar1 = g_graphicsManager_flags;
|
|
layer = ANM2::GetLayer(&this->_sprite,layerIndex);
|
|
iVar2 = 1;
|
|
if ((uVar1 & 4) == 0) {
|
|
iVar2 = 6;
|
|
}
|
|
layer->_blendMode[4] = 1;
|
|
layer->_blendMode[3] = 1;
|
|
layer->_blendMode[2] = 1;
|
|
layer->_blendMode[1] = iVar2;
|
|
layer->_blendMode[0] = 0;
|
|
LAB_0066669b:
|
|
FUN_008629c0(this);
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 006666c0
|
|
void Entity_Tear::ClearReferences()
|
|
{
|
|
int *piVar1;
|
|
Entity_Tear *apEStack_c [2];
|
|
int childType;
|
|
uint32_t *laserShotSlot;
|
|
uint32_t *refSlot;
|
|
|
|
refSlot = &this->_techZeroLaser;
|
|
apEStack_c[0] = this;
|
|
if (GHIDRA_CAST<int *>(this->_techZeroLaser) != GHIDRA_CAST<int *>(0x0)) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(this->_techZeroLaser) + 0x28))();
|
|
}
|
|
laserShotSlot = &this->_laserShotLaser;
|
|
if (GHIDRA_CAST<int *>(this->_laserShotLaser) != GHIDRA_CAST<int *>(0x0)) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(this->_laserShotLaser) + 0x28))();
|
|
}
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::ClearReferences();
|
|
ANM2::Reset(&this->_tearHaloANM2);
|
|
ANM2::Reset(&this->_tearEffectANM2);
|
|
ANM2::Reset(&this->_deadEyeANM2);
|
|
if (this->_stickTarget != (void *)0x0) {
|
|
apEStack_c[0] = GHIDRA_CAST<Entity_Tear *>(&this->_stickTarget);
|
|
msvc::multiset<unsigned_int>::erase(apEStack_c);
|
|
}
|
|
this->_stickTarget = (void *)0x0;
|
|
if (*refSlot != 0) {
|
|
apEStack_c[0] = GHIDRA_CAST<Entity_Tear *>(refSlot);
|
|
msvc::multiset<unsigned_int>::erase(apEStack_c);
|
|
}
|
|
*refSlot = 0;
|
|
refSlot = &this->_techZeroTarget;
|
|
if (*refSlot != 0) {
|
|
apEStack_c[0] = GHIDRA_CAST<Entity_Tear *>(refSlot);
|
|
msvc::multiset<unsigned_int>::erase(apEStack_c);
|
|
}
|
|
*refSlot = 0;
|
|
if (*laserShotSlot != 0) {
|
|
apEStack_c[0] = GHIDRA_CAST<Entity_Tear *>(laserShotSlot);
|
|
msvc::multiset<unsigned_int>::erase(apEStack_c);
|
|
}
|
|
*laserShotSlot = 0;
|
|
refSlot = &this->_linkPrev;
|
|
if (*refSlot != 0) {
|
|
childType = this->_linkNext;
|
|
if (childType != 0) {
|
|
if (*GHIDRA_CAST<int *>((*refSlot + 0x28)) == 2) {
|
|
FUN_0067dac0(&this->_linkNext);
|
|
childType = this->_linkNext;
|
|
}
|
|
if (*GHIDRA_CAST<int *>((childType + 0x28)) == 2) {
|
|
FUN_0067dac0(refSlot);
|
|
}
|
|
}
|
|
}
|
|
if (*refSlot != 0) {
|
|
apEStack_c[0] = GHIDRA_CAST<Entity_Tear *>(refSlot);
|
|
msvc::multiset<unsigned_int>::erase(apEStack_c);
|
|
*refSlot = 0;
|
|
}
|
|
if (this->_linkNext != 0) {
|
|
apEStack_c[0] = GHIDRA_CAST<Entity_Tear *>(&this->_linkNext);
|
|
msvc::multiset<unsigned_int>::erase(apEStack_c);
|
|
this->_linkNext = 0;
|
|
}
|
|
if (GHIDRA_CAST<int *>(this->_attachedEffect) != GHIDRA_CAST<int *>(0x0)) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(this->_attachedEffect) + 0x28))();
|
|
}
|
|
if ((((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagLudovico._l)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLudovico._l)) + 0x4)))) != 0) ||
|
|
((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagLudovico._h)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLudovico._h)) + 0x4)))) != 0)) &&
|
|
(piVar1 = GHIDRA_CAST<int *>(this->_child), piVar1 != GHIDRA_CAST<int *>(0x0))) {
|
|
childType = piVar1[10];
|
|
while (childType == 2) {
|
|
(**(code **)(*piVar1 + 0x28))();
|
|
piVar1 = GHIDRA_CAST<int *>(piVar1[0xf0]);
|
|
if (piVar1 == GHIDRA_CAST<int *>(0x0)) {
|
|
return;
|
|
}
|
|
childType = piVar1[10];
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 006668c0
|
|
void Entity_Tear::apply_wiggle(float strength)
|
|
{
|
|
float fVar1;
|
|
float fVar2;
|
|
Vector wiggleDir;
|
|
|
|
wiggleDir.x = (this->_velocity).y;
|
|
wiggleDir.y = -(this->_velocity).x;
|
|
fVar2 = wiggleDir.x * wiggleDir.x;
|
|
fVar1 = sqrtf(wiggleDir.y * wiggleDir.y + fVar2);
|
|
if (0.0 < fVar1) {
|
|
wiggleDir.x = (1.0 / fVar1) * wiggleDir.x;
|
|
wiggleDir.y = wiggleDir.y * (1.0 / fVar1);
|
|
}
|
|
fVar1 = (this->_velocity).x;
|
|
fVar1 = sqrtf(fVar1 * fVar1 + fVar2);
|
|
fVar1 = fVar1 * 0.5;
|
|
if (5.0 <= fVar1) {
|
|
fVar1 = 5.0;
|
|
}
|
|
if ((this->_tearIdx & 1) == 0) {
|
|
fVar2 = 0.0;
|
|
}
|
|
else {
|
|
fVar2 = 3.1415927;
|
|
}
|
|
fVar2 = cos(((float)(g_game->_frameCount - this->_spawnFrame) + 0.5) * 0.7 + fVar2);
|
|
fVar2 = fVar2 * fVar1 * strength;
|
|
(this->_pos).x = wiggleDir.x * fVar2 + (this->_pos).x;
|
|
(this->_pos).y = wiggleDir.y * fVar2 + (this->_pos).y;
|
|
return;
|
|
}
|
|
|
|
// 00666ba0
|
|
void Entity_Tear::update_wiggle()
|
|
{
|
|
uint32_t frameParity;
|
|
float cosPhase;
|
|
float speed;
|
|
float in_XMM1_Da;
|
|
float dirX;
|
|
float fVar1;
|
|
float dirY;
|
|
|
|
frameParity = g_manager->_framecount & 0x80000001;
|
|
if (GHIDRA_INT(frameParity) < 0) {
|
|
frameParity = (frameParity - 1 | 0xfffffffe) + 1;
|
|
}
|
|
dirY = (this->_velocity).y;
|
|
fVar1 = (float)(g_game->_frameCount - this->_spawnFrame) + (float)GHIDRA_INT(frameParity) * 0.5;
|
|
dirX = (this->_velocity).x;
|
|
if (ABS(dirX) <= ABS(dirY)) {
|
|
fVar1 = fVar1 * 0.2;
|
|
}
|
|
else {
|
|
fVar1 = -fVar1 * 0.2 + 1.5707964;
|
|
}
|
|
cosPhase = cos(fVar1);
|
|
fVar1 = sin(fVar1);
|
|
speed = sqrtf(dirX * dirX + dirY * dirY);
|
|
if (0.0 < speed) {
|
|
dirX = dirX * (1.0 / speed);
|
|
dirY = dirY * (1.0 / speed);
|
|
}
|
|
(this->_pos).x = cosPhase * dirY * 15.0 * in_XMM1_Da + cosPhase * dirX * 15.0 + (this->_pos).x;
|
|
(this->_pos).y = -dirX * fVar1 * 15.0 * in_XMM1_Da + fVar1 * dirY * 15.0 + (this->_pos).y;
|
|
return;
|
|
}
|
|
|
|
// 00666d40
|
|
void Entity_Tear::play_fire_sound()
|
|
{
|
|
int iVar1;
|
|
uint8_t isSeedEffectActive;
|
|
uint32_t tearFlagsWord2;
|
|
Manager *manager;
|
|
float fVar2;
|
|
int soundId;
|
|
uint32_t local_10;
|
|
float dirY;
|
|
|
|
iVar1 = this->_variant;
|
|
this->_isFireSoundPending = 0;
|
|
manager = g_manager;
|
|
if ((((iVar1 != 9) && (iVar1 != 0x2e)) && (this->_isFireSoundMuted == 0)) && (iVar1 != 0x28)) {
|
|
if (iVar1 == 0x32) {
|
|
soundId = 0xed;
|
|
seed_fart_sound_override(&soundId);
|
|
fVar2 = 1.2;
|
|
}
|
|
else {
|
|
if (((iVar1 == 0xd) || (iVar1 == 0x17)) &&
|
|
(isSeedEffectActive = Seeds::HasSeedEffect(&g_game->_seedEffects,0x4f),
|
|
isSeedEffectActive != 0)) goto LAB_00666e14;
|
|
manager = g_manager;
|
|
soundId = 0x99;
|
|
seed_fart_sound_override(&soundId);
|
|
fVar2 = 1.0;
|
|
}
|
|
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(soundId,1.0,2,0,fVar2,0.0);
|
|
}
|
|
LAB_00666e14:
|
|
manager = g_manager;
|
|
local_10 = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHorn._h)) + 0x4)));
|
|
tearFlagsWord2 = GHIDRA_UINT((this->_tearFlags)._h);
|
|
if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagHorn._l)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHorn._l)) + 0x4)))) != 0) ||
|
|
((tearFlagsWord2 & GHIDRA_UINT(g_tearFlagHorn._h)) != 0 || local_10 != 0)) {
|
|
soundId = 0x364;
|
|
seed_fart_sound_override(&soundId);
|
|
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(soundId,1.0,2,0,1.0,0.0);
|
|
tearFlagsWord2 = GHIDRA_UINT((this->_tearFlags)._h);
|
|
}
|
|
local_10 = GHIDRA_UINT((this->_tearFlags)._l);
|
|
if (((local_10 & GHIDRA_UINT(g_tearFlagOrbit._l)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagOrbit._l)) + 0x4)))) != 0) ||
|
|
((tearFlagsWord2 & GHIDRA_UINT(g_tearFlagOrbit._h)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagOrbit._h)) + 0x4)))) != 0)) {
|
|
if (this->_fallingSpeed < 0.0) {
|
|
this->_fallingSpeed = this->_fallingSpeed * 3.0;
|
|
}
|
|
this->_isHovering = 1;
|
|
}
|
|
tearFlagsWord2 = GHIDRA_UINT((this->_tearFlags)._h);
|
|
if (((local_10 & GHIDRA_UINT(g_tearFlagHydrobounce._l)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHydrobounce._l)) + 0x4)))) == 0) &&
|
|
((tearFlagsWord2 & GHIDRA_UINT(g_tearFlagHydrobounce._h)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHydrobounce._h)) + 0x4)))) == 0)) {
|
|
if (((local_10 & GHIDRA_UINT(g_tearFlagBoomerang._l)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBoomerang._l)) + 0x4)))) != 0) ||
|
|
((tearFlagsWord2 & GHIDRA_UINT(g_tearFlagBoomerang._h)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBoomerang._h)) + 0x4)))) != 0)) {
|
|
this->_fallingSpeed = this->_fallingSpeed * 0.5;
|
|
this->_fallingAccel = (this->_fallingAccel + 0.08) * 0.25 - 0.08;
|
|
}
|
|
}
|
|
else {
|
|
this->_isHovering = 0;
|
|
this->_fallingSpeed = this->_fallingSpeed - 15.0;
|
|
this->_fallingAccel = this->_fallingAccel + 3.0;
|
|
}
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + 8)) == 0x10) {
|
|
(this->_pos).y = (this->_pos).y - 4.0;
|
|
if ((0.0 < this->_fallingAccel) &&
|
|
(fVar2 = (this->_velocity).y, fVar2 < ABS((this->_velocity).x))) {
|
|
(this->_velocity).y = this->_fallingSpeed * 0.5 + fVar2;
|
|
}
|
|
fVar2 = (this->_velocity).x;
|
|
if (ABS((this->_velocity).y) < ABS(fVar2)) {
|
|
dirY = (this->_velocity).y;
|
|
fVar2 = sqrtf(dirY * dirY + fVar2 * fVar2);
|
|
if (0.0 < fVar2) {
|
|
dirY = (this->_velocity).y * (1.0 / fVar2);
|
|
}
|
|
if ((0.0 < dirY) && (dirY < 0.05)) {
|
|
(this->_velocity).y = 0.0;
|
|
}
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 006670f0
|
|
void Entity_Tear::Update()
|
|
{
|
|
code *pcVar1;
|
|
void *pvVar2;
|
|
BitSet128 flags;
|
|
BitSet128 flags_00;
|
|
BitSet128 flags_01;
|
|
BitSet128 flags_02;
|
|
BitSet128 tearFlags;
|
|
BitSet128 flags_03;
|
|
Vector pos;
|
|
uint64_t qVar3;
|
|
uint8_t bVar4;
|
|
char cVar5;
|
|
BitSet128 *pBVar6;
|
|
int iVar7;
|
|
BitSet128 *pBVar8;
|
|
TemporaryEffects *playerEffects;
|
|
Room *room;
|
|
Seeds *seeds;
|
|
Entity_Familiar *familiar;
|
|
Vector *pVVar9;
|
|
uint32_t uVar10;
|
|
Entity *pEVar11;
|
|
EntityList *entityList;
|
|
int *piVar12;
|
|
uint32_t *puVar13;
|
|
Vector *pVVar14;
|
|
Entity_Laser *laser;
|
|
float *pfVar15;
|
|
void **ppvVar16;
|
|
Entity_Player *pEVar17;
|
|
uint32_t uVar18;
|
|
Entity_Knife *knife;
|
|
char *_Str1;
|
|
AnimationState *animState;
|
|
Color *playerEffects;
|
|
uint8_t *puVar19;
|
|
void *pvVar20;
|
|
LayerState *layer;
|
|
uint8_t *layerCount;
|
|
Entity_Effect *effect;
|
|
Sprite *sprite;
|
|
int tintedRockIdx;
|
|
PersistentGameData *persistentGameData;
|
|
GridEntity *gridEntity;
|
|
std_string *psVar21;
|
|
PlayerManager *playerManager;
|
|
RNG *laser;
|
|
TearParams *other;
|
|
TearParams *extraout_EAX;
|
|
Entity_Tear *spawnedTear;
|
|
Font *effect;
|
|
ANM2 *pAVar22;
|
|
uint8_t *puVar23;
|
|
uint8_t *layerIndex;
|
|
void *pvVar24;
|
|
Vector *pVVar25;
|
|
bool bVar26;
|
|
long double fVar27;
|
|
Room *pRVar28;
|
|
Room *pRVar29;
|
|
Entity_Projectile *pEVar30;
|
|
uint8_t extraout_var [12];
|
|
uint8_t auVar31 [16];
|
|
uint8_t extraout_var_00 [12];
|
|
uint8_t extraout_var_01 [12];
|
|
uint8_t extraout_var_02 [12];
|
|
uint8_t extraout_var_03 [12];
|
|
uint8_t extraout_var_04 [12];
|
|
uint8_t extraout_var_05 [12];
|
|
uint8_t extraout_var_06 [12];
|
|
uint8_t extraout_var_07 [12];
|
|
uint8_t extraout_var_08 [12];
|
|
uint8_t extraout_var_09 [12];
|
|
uint8_t extraout_var_10 [12];
|
|
uint8_t auVar33 [12];
|
|
uint8_t extraout_var_11 [12];
|
|
uint8_t auVar32 [16];
|
|
uint8_t extraout_var_12 [12];
|
|
uint8_t extraout_var_13 [12];
|
|
uint8_t extraout_var_14 [12];
|
|
uint8_t extraout_var_15 [12];
|
|
uint8_t extraout_var_16 [12];
|
|
uint8_t extraout_var_17 [12];
|
|
uint8_t extraout_var_18 [12];
|
|
uint8_t extraout_var_19 [12];
|
|
uint8_t extraout_var_20 [12];
|
|
uint8_t extraout_var_21 [12];
|
|
uint8_t extraout_var_22 [12];
|
|
uint8_t extraout_var_23 [12];
|
|
uint8_t extraout_var_24 [12];
|
|
uint8_t extraout_var_25 [12];
|
|
uint8_t extraout_var_26 [12];
|
|
uint8_t extraout_var_27 [12];
|
|
Color aCStackY_3c4c [128];
|
|
BitSet128 *pBVar34;
|
|
BitSet128 *pBVar35;
|
|
int variant;
|
|
Vector *in_stack_ffffd9fc;
|
|
float fVar36;
|
|
TypeDescriptor *outResult;
|
|
uint8_t uVar37;
|
|
uint8_t uVar38;
|
|
uint16_t uVar39;
|
|
size_t _MaxCount;
|
|
uint32_t uVar40;
|
|
EntityRef local_25e8;
|
|
EntityRef local_25c0;
|
|
EntityRef local_2598;
|
|
EntityRef local_2570;
|
|
BitSet128 notBounce;
|
|
BitSet128 notSplit;
|
|
BitSet128 notLudovico;
|
|
BitSet128 notBone;
|
|
BitSet128 notAbsorb;
|
|
BitSet128 notHydrobounce;
|
|
BitSet128 notFetus;
|
|
BitSet128 hydrobounceMask3;
|
|
BitSet128 quadsplitMask;
|
|
BitSet128 lasershotMask2;
|
|
BitSet128 poisonMask;
|
|
BitSet128 ludovicoMask6;
|
|
BitSet128 explosiveMask4;
|
|
BitSet128 andResult2;
|
|
BitSet128 orResult4;
|
|
BitSet128 withQuadsplit;
|
|
BitSet128 ludovicoMask5;
|
|
BitSet128 hydrobounceMask2;
|
|
BitSet128 hydrobounceMask;
|
|
BitSet128 ludovicoMask4;
|
|
BitSet128 notLasershot2;
|
|
BitSet128 explosiveMask3;
|
|
BitSet128 andResult;
|
|
BitSet128 tearFlagsCopy;
|
|
BitSet128 notResult;
|
|
BitSet128 orResult3;
|
|
BitSet128 orResult2;
|
|
BitSet128 orResult;
|
|
BitSet128 withOrbit;
|
|
BitSet128 lasershotMask;
|
|
BitSet128 notLaser;
|
|
BitSet128 laserMask;
|
|
BitSet128 explosiveMask2;
|
|
BitSet128 bit76Mask;
|
|
BitSet128 explosiveMask;
|
|
BitSet128 ludovicoMask3;
|
|
BitSet128 mysteriousLiquidCreepMask;
|
|
BitSet128 notWait;
|
|
BitSet128 waitMask;
|
|
BitSet128 notLasershot;
|
|
BitSet128 ludovicoMask2;
|
|
BitSet128 notDetonate;
|
|
BitSet128 detonateMask;
|
|
BitSet128 ludovicoMask25;
|
|
BitSet128 tractorBeamMask3;
|
|
BitSet128 ludovicoMask24;
|
|
BitSet128 continuumMask2;
|
|
BitSet128 explosiveMask6;
|
|
BitSet128 fetusMask5;
|
|
BitSet128 fetusMask4;
|
|
BitSet128 popMask2;
|
|
BitSet128 chainMask2;
|
|
BitSet128 ludovicoMask23;
|
|
BitSet128 bit125Mask2;
|
|
BitSet128 andResult33;
|
|
BitSet128 notBit126;
|
|
BitSet128 andResult32;
|
|
BitSet128 andResult31;
|
|
BitSet128 bit126Mask;
|
|
BitSet128 continuumMask;
|
|
BitSet128 ludovicoMask22;
|
|
BitSet128 boogerMask3;
|
|
BitSet128 orResult14;
|
|
BitSet128 withSpectral;
|
|
BitSet128 andResult30;
|
|
BitSet128 andResult29;
|
|
BitSet128 andResult28;
|
|
BitSet128 andResult27;
|
|
BitSet128 andResult26;
|
|
BitSet128 notQuadsplit2;
|
|
BitSet128 notSplit2;
|
|
BitSet128 notLudovico2;
|
|
BitSet128 notBone2;
|
|
BitSet128 notAbsorb3;
|
|
BitSet128 notHydrobounce2;
|
|
BitSet128 sporeMask4;
|
|
BitSet128 stickyMask4;
|
|
BitSet128 sporeMask3;
|
|
BitSet128 boogerMask2;
|
|
BitSet128 stickyMask3;
|
|
BitSet128 homingMask5;
|
|
BitSet128 notTurnHorizontal;
|
|
BitSet128 turnHorizontalMask2;
|
|
BitSet128 bit125Mask;
|
|
BitSet128 bit127Mask;
|
|
BitSet128 flatMask3;
|
|
BitSet128 ludovicoMask21;
|
|
BitSet128 andResult25;
|
|
BitSet128 notExplosive2;
|
|
BitSet128 occultMask2;
|
|
BitSet128 shrinkMask2;
|
|
BitSet128 growMask2;
|
|
BitSet128 orResult13;
|
|
BitSet128 andResult24;
|
|
BitSet128 notBounce2;
|
|
BitSet128 flatMask2;
|
|
BitSet128 ludovicoMask20;
|
|
BitSet128 withShrink3;
|
|
BitSet128 notTractorBeam;
|
|
BitSet128 spectralMask3;
|
|
BitSet128 sporeMask2;
|
|
BitSet128 boogerMask;
|
|
BitSet128 stickyMask2;
|
|
BitSet128 spectralMask2;
|
|
BitSet128 ludovicoMask19;
|
|
BitSet128 notRerollRockWisp;
|
|
BitSet128 rerollRockWispMask;
|
|
BitSet128 ludovicoMask18;
|
|
BitSet128 andResult23;
|
|
BitSet128 withBounceWallsonly;
|
|
BitSet128 hydrobounceMask6;
|
|
BitSet128 ludovicoMask17;
|
|
BitSet128 hydrobounceMask7;
|
|
BitSet128 ludovicoMask16;
|
|
BitSet128 popMask;
|
|
BitSet128 boomerangMask6;
|
|
BitSet128 ludovicoMask15;
|
|
BitSet128 tractorBeamMask2;
|
|
BitSet128 notChain;
|
|
BitSet128 chainMask;
|
|
BitSet128 andResult22;
|
|
BitSet128 tearFlagsCopy5;
|
|
BitSet128 andResult21;
|
|
BitSet128 tearFlagsCopy4;
|
|
BitSet128 notAbsorb2;
|
|
BitSet128 hydrobounceMask5;
|
|
BitSet128 notResult9;
|
|
BitSet128 orResult12;
|
|
BitSet128 orResult11;
|
|
BitSet128 orResult10;
|
|
BitSet128 withQuadsplit2;
|
|
BitSet128 quadsplitMask2;
|
|
BitSet128 splitMask;
|
|
BitSet128 andResult20;
|
|
BitSet128 withOrbitAdvanced2;
|
|
BitSet128 ludovicoMask14;
|
|
BitSet128 absorbMask;
|
|
BitSet128 andResult19;
|
|
BitSet128 orResult9;
|
|
BitSet128 withLudovico2;
|
|
BitSet128 accelerateMask;
|
|
BitSet128 andResult18;
|
|
BitSet128 orResult8;
|
|
BitSet128 withLudovico;
|
|
BitSet128 decelerateMask;
|
|
BitSet128 glowMask;
|
|
BitSet128 hydrobounceMask4;
|
|
BitSet128 ludovicoMask13;
|
|
BitSet128 boomerangMask5;
|
|
BitSet128 flatMask;
|
|
BitSet128 sporeMask;
|
|
BitSet128 stickyMask;
|
|
BitSet128 ludovicoMask12;
|
|
BitSet128 pulseMask;
|
|
BitSet128 attractorMask2;
|
|
BitSet128 bigSpiralMask;
|
|
BitSet128 spiralMask;
|
|
BitSet128 wiggleMask;
|
|
BitSet128 andResult17;
|
|
BitSet128 orResult7;
|
|
BitSet128 withOrbit2;
|
|
BitSet128 boomerangMask4;
|
|
BitSet128 ludovicoMask11;
|
|
BitSet128 spectralMask;
|
|
BitSet128 fetusMask3;
|
|
BitSet128 ludovicoMask10;
|
|
BitSet128 shrinkMask;
|
|
BitSet128 ludovicoMask9;
|
|
BitSet128 growMask;
|
|
BitSet128 homingMask4;
|
|
BitSet128 boomerangMask3;
|
|
BitSet128 boomerangMask2;
|
|
BitSet128 fetusMask2;
|
|
BitSet128 ludovicoMask8;
|
|
BitSet128 occultMask;
|
|
BitSet128 homingMask2;
|
|
BitSet128 turnHorizontalMask;
|
|
BitSet128 homingMask;
|
|
BitSet128 homingMask3;
|
|
BitSet128 andResult16;
|
|
BitSet128 tearFlagsCopy3;
|
|
BitSet128 notResult8;
|
|
BitSet128 withAbsorb;
|
|
BitSet128 andResult15;
|
|
BitSet128 tearFlagsCopy2;
|
|
BitSet128 notResult7;
|
|
BitSet128 orResult6;
|
|
BitSet128 withBooger;
|
|
BitSet128 andResult14;
|
|
BitSet128 notResult6;
|
|
BitSet128 withShrink5;
|
|
BitSet128 fetusTechMask2;
|
|
BitSet128 andResult11;
|
|
BitSet128 notResult3;
|
|
BitSet128 withShrink2;
|
|
BitSet128 fetusBoneMask;
|
|
BitSet128 andResult12;
|
|
BitSet128 notResult4;
|
|
BitSet128 ludovicoMask;
|
|
BitSet128 fetusKnifeMask;
|
|
BitSet128 andResult13;
|
|
BitSet128 notResult5;
|
|
BitSet128 withShrink4;
|
|
BitSet128 fetusTechMask;
|
|
BitSet128 fetusSwordMask;
|
|
BitSet128 notFetusTechx;
|
|
BitSet128 andResult10;
|
|
BitSet128 notResult2;
|
|
BitSet128 orResult5;
|
|
BitSet128 withShrink;
|
|
BitSet128 fetusTechxMask;
|
|
BitSet128 fetusMask;
|
|
BitSet128 explosiveMask5;
|
|
BitSet128 boomerangMask;
|
|
BitSet128 orbitAdvancedMask;
|
|
BitSet128 tractorBeamMask;
|
|
BitSet128 ludovicoMask7;
|
|
BitSet128 andResult9;
|
|
BitSet128 withOrbitAdvanced;
|
|
BitSet128 squareMask;
|
|
BitSet128 attractorMask;
|
|
BitSet128 laserMask2;
|
|
BitSet128 burstsplitMask;
|
|
BitSet128 notExplosive;
|
|
BitSet128 andResult8;
|
|
BitSet128 andResult7;
|
|
BitSet128 andResult6;
|
|
BitSet128 andResult5;
|
|
BitSet128 andResult4;
|
|
BitSet128 andResult3;
|
|
BitSet128 notQuadsplit;
|
|
Vector local_16d8;
|
|
Vector local_16d0;
|
|
Vector local_16c8;
|
|
Vector local_16c0;
|
|
Vector nextPos3;
|
|
Vector entityVel;
|
|
Vector local_16a8 [2];
|
|
Vector nextPos4;
|
|
Vector local_1690;
|
|
Vector local_1688;
|
|
Vector local_1680;
|
|
Vector entityPos5;
|
|
Vector local_1670;
|
|
Vector velPerpRight;
|
|
Vector VStack_1660;
|
|
Vector velPerpRight3;
|
|
Vector VStack_1650;
|
|
Vector velPerpRight2;
|
|
Vector VStack_1640;
|
|
Vector velPerpLeft2;
|
|
Vector VStack_1630;
|
|
Vector velPerpLeft;
|
|
Vector uniformScale4;
|
|
Vector local_1618;
|
|
Vector local_1610;
|
|
Vector randomDir;
|
|
Vector local_1600;
|
|
Vector local_15f8;
|
|
Vector local_15f0;
|
|
Vector local_15e8;
|
|
Vector uniformScale3;
|
|
Vector local_15d8;
|
|
Vector negated;
|
|
Vector local_15c8;
|
|
Vector local_15c0;
|
|
Vector local_15b8;
|
|
Vector VStack_15b0;
|
|
Vector VStack_15a8;
|
|
Vector VStack_15a0;
|
|
Vector local_1598;
|
|
Vector local_1590;
|
|
Vector local_1588;
|
|
uint32_t local_1580;
|
|
uint32_t uStack_157c;
|
|
uint32_t uStack_1578;
|
|
uint32_t uStack_1574;
|
|
BitSet128 bit126Flags;
|
|
BitSet128 bit125Flags;
|
|
Vector local_1550;
|
|
BitSet128 inheritedFlags;
|
|
Vector local_1538;
|
|
Vector nextPos2;
|
|
Vector local_1528;
|
|
Vector entityPos3;
|
|
Vector local_1518;
|
|
Vector local_1510;
|
|
Vector nextPos;
|
|
Vector local_1500;
|
|
Vector entityPos2;
|
|
Vector entityPos;
|
|
Vector local_14e8;
|
|
Vector uniformScale2;
|
|
Vector clampedPos2;
|
|
Vector local_14d0;
|
|
Vector uniformScale;
|
|
Vector clampedPos;
|
|
Vector local_14b8;
|
|
Vector entityPos25;
|
|
Vector parentPos10;
|
|
Vector local_14a0;
|
|
Vector clampedPos3;
|
|
Vector local_1490;
|
|
Vector local_1488;
|
|
Vector direction15;
|
|
Vector local_1478 [2];
|
|
Vector entityPos24;
|
|
Vector local_1460;
|
|
Vector local_1458;
|
|
Vector local_1450;
|
|
Vector stickTargetPos;
|
|
Vector stickTargetVel;
|
|
Vector local_1438;
|
|
Vector perpDir2;
|
|
Vector local_1428;
|
|
Vector local_1420;
|
|
Vector targetPos6;
|
|
Vector local_1410;
|
|
Vector local_1408;
|
|
Vector targetPos5;
|
|
Vector local_13f8;
|
|
Vector angleDir8;
|
|
Vector parentVel2;
|
|
Vector local_13e0;
|
|
Vector parentVel;
|
|
Vector lerped;
|
|
Vector local_13c8 [2];
|
|
Vector local_13b8;
|
|
Vector uniformScale13;
|
|
Vector spawnerPos;
|
|
Vector negated3;
|
|
Vector entityPos23;
|
|
Vector rotatedDir;
|
|
Vector local_1388;
|
|
Vector resized2;
|
|
Vector parentPos7;
|
|
Vector local_1370;
|
|
Vector direction14;
|
|
Vector local_1360;
|
|
Vector parentPos9;
|
|
Vector parentPos8;
|
|
Vector local_1348;
|
|
Vector direction13;
|
|
Vector randomDir5;
|
|
Vector entityPos22;
|
|
Vector local_1328;
|
|
Vector entityPos21;
|
|
Vector local_1318;
|
|
Vector local_1310;
|
|
Vector angleDir7;
|
|
Vector local_1300;
|
|
Vector randomDir4;
|
|
Vector parentPos6;
|
|
Vector parentPos5;
|
|
Vector local_12e0;
|
|
Vector local_12d8;
|
|
Vector local_12d0;
|
|
Vector cardinalDir;
|
|
Vector local_12c0;
|
|
Vector local_12b8;
|
|
Vector direction12;
|
|
Vector local_12a8;
|
|
Vector local_12a0;
|
|
Vector entityPos20;
|
|
Vector local_1290;
|
|
Vector local_1288;
|
|
Vector local_1280;
|
|
Vector entityVel4;
|
|
Vector local_1270;
|
|
Vector local_1268;
|
|
Vector entityVel3;
|
|
Vector entityPos19;
|
|
Vector local_1250;
|
|
Vector local_1248;
|
|
Vector entityPos18;
|
|
Vector local_1238;
|
|
Vector resized;
|
|
Vector entityPos17;
|
|
Vector parentPos4;
|
|
Vector entityPos16;
|
|
Vector local_1210;
|
|
Vector local_1208;
|
|
Vector angleDir6;
|
|
Vector entityPos15;
|
|
Vector local_11f0;
|
|
Vector local_11e8;
|
|
Vector uniformScale12;
|
|
Vector local_11d8;
|
|
Vector local_11d0;
|
|
Vector local_11c8;
|
|
Vector local_11c0;
|
|
Vector randomDir3;
|
|
Vector local_11b0;
|
|
Vector local_11a8;
|
|
Vector local_11a0;
|
|
Vector uniformScale11;
|
|
Vector local_1190;
|
|
Vector local_1188;
|
|
Vector local_1180;
|
|
Vector local_1178;
|
|
Vector randomDir2;
|
|
Vector local_1168;
|
|
Vector uniformScale10;
|
|
Vector local_1158;
|
|
Vector local_1150;
|
|
Vector local_1148;
|
|
Vector angleDir5;
|
|
Vector local_1138;
|
|
Vector local_1130;
|
|
Vector local_1128;
|
|
Vector local_1120;
|
|
Vector local_1118;
|
|
Vector local_1110;
|
|
Vector local_1108;
|
|
Vector direction11;
|
|
Vector local_10f8;
|
|
Vector local_10f0;
|
|
Vector local_10e8;
|
|
Vector local_10e0;
|
|
Vector local_10d8;
|
|
Vector parentPos3;
|
|
Vector parentPos2;
|
|
Vector parentPos;
|
|
Vector local_10b8 [2];
|
|
Vector local_10a8;
|
|
Vector local_10a0;
|
|
Vector entityPos14;
|
|
Vector local_1090;
|
|
Vector local_1088;
|
|
Vector direction4;
|
|
Vector targetPos;
|
|
Vector entityPos8;
|
|
Vector local_1068;
|
|
Vector local_1060;
|
|
Vector entityPos7;
|
|
Vector local_1050;
|
|
Vector local_1048;
|
|
Vector entityPos6;
|
|
Vector local_1038;
|
|
Vector local_1030;
|
|
Vector local_1028;
|
|
Vector local_1020;
|
|
Vector angleDir4;
|
|
Vector local_1010;
|
|
Vector angleDir3;
|
|
Vector negated2;
|
|
Vector local_ff8;
|
|
Vector local_ff0;
|
|
Vector direction10;
|
|
Vector direction9;
|
|
Vector direction8;
|
|
Vector direction7;
|
|
Vector targetPos4;
|
|
Vector entityPos13;
|
|
Vector local_fb8;
|
|
Vector local_fb0;
|
|
Vector entityPos12;
|
|
Vector local_fa0;
|
|
Vector local_f98;
|
|
Vector local_f90;
|
|
Vector entityPos11;
|
|
Vector direction6;
|
|
Vector local_f78;
|
|
Vector entityPos10;
|
|
Vector entityPos9;
|
|
Vector targetPos3;
|
|
Vector direction5;
|
|
Vector local_f50;
|
|
Vector targetPos2;
|
|
Vector local_f40;
|
|
Vector local_f38;
|
|
Vector local_f30;
|
|
Vector uniformScale5;
|
|
Vector local_f20;
|
|
Vector local_f18;
|
|
Vector local_f10;
|
|
Vector uniformScale7;
|
|
Vector uniformScale6;
|
|
Vector angleDir2;
|
|
Vector local_ef0;
|
|
Vector local_ee8;
|
|
Vector local_ee0;
|
|
Vector uniformScale9;
|
|
Vector uniformScale8;
|
|
Vector local_ec8;
|
|
Vector angleDir;
|
|
Vector local_eb8;
|
|
Vector local_eb0;
|
|
Vector local_ea8;
|
|
Vector local_ea0;
|
|
Vector local_e98;
|
|
Vector orbitDir;
|
|
Vector perpDir;
|
|
Vector direction3;
|
|
Vector direction2;
|
|
Vector local_e70;
|
|
Vector entityVel2;
|
|
Vector entityPos4;
|
|
Vector local_e58;
|
|
Vector local_e50;
|
|
Vector direction;
|
|
Vector local_e40;
|
|
BitSet128 inheritedFlags3;
|
|
BitSet128 inheritedFlags2;
|
|
GridEntityDesc local_e18;
|
|
Vector particlePos;
|
|
Vector otherPushedPos;
|
|
Vector pushedPos;
|
|
Vector otherBouncedVel;
|
|
Vector bouncedVel;
|
|
Vector fromTarget;
|
|
Vector local_dc8;
|
|
Vector fetusTechFacing;
|
|
Vector facingDir;
|
|
Vector nullOffset;
|
|
Vector local_da8;
|
|
Vector local_da0;
|
|
Vector toTechZeroTarget;
|
|
Vector wrapDelta;
|
|
Vector local_d88;
|
|
Vector roomClampedPos;
|
|
uint8_t radiusQuery200 [16];
|
|
uint8_t local_d68 [32];
|
|
uint8_t popTearQuery [16];
|
|
uint8_t radiusQuery [16];
|
|
uint8_t aheadQuery2 [16];
|
|
uint8_t fetusTechQuery [16];
|
|
uint8_t local_d08 [32];
|
|
Vector local_ce8;
|
|
Vector laserToTarget;
|
|
Vector local_cd8;
|
|
Vector particleDir;
|
|
Vector local_cc8;
|
|
Vector gridPos;
|
|
Vector local_cb8;
|
|
Vector local_cb0;
|
|
Vector local_ca8;
|
|
Vector local_ca0;
|
|
Vector local_c98;
|
|
Vector local_c90;
|
|
Vector local_c88;
|
|
uint8_t local_c80 [12];
|
|
uint8_t aheadQuery [16];
|
|
uint8_t deathmatchFamiliarQuery [16];
|
|
uint8_t techZeroQuery [16];
|
|
void *local_c44;
|
|
void *timescaleFactor;
|
|
void *local_c3c;
|
|
void *local_c38;
|
|
void *fromTargetLenSq;
|
|
void *local_c30;
|
|
void *local_c2c;
|
|
void *local_c28;
|
|
void *local_c24;
|
|
void *local_c20;
|
|
void *local_c1c;
|
|
void *local_c18;
|
|
void *local_c14;
|
|
void *local_c10;
|
|
void *local_c0c;
|
|
void *local_c08;
|
|
void *local_c04;
|
|
void *local_c00;
|
|
void *local_bfc;
|
|
void *local_bf8;
|
|
void *local_bf4;
|
|
void *local_bf0;
|
|
void *local_bec;
|
|
void *local_be8;
|
|
void *local_be4;
|
|
void *local_be0;
|
|
void *local_bdc;
|
|
void *local_bd8;
|
|
void *local_bd4;
|
|
void *local_bd0;
|
|
void *local_bcc;
|
|
void *local_bc8;
|
|
void *local_bc4;
|
|
void *local_bc0;
|
|
void *local_bbc;
|
|
void *local_bb8;
|
|
void *local_bb4;
|
|
void *local_bb0;
|
|
void *local_bac;
|
|
void *local_ba8;
|
|
void *local_ba4;
|
|
void *local_ba0;
|
|
void *pvStack_b9c;
|
|
void *local_b98;
|
|
Vector prevPos;
|
|
Vector local_b8c;
|
|
Vector fetusTechAimDir;
|
|
Vector local_b7c;
|
|
Vector local_b74;
|
|
Vector local_b6c;
|
|
Vector local_b64;
|
|
Vector local_b5c;
|
|
Vector shotVelocity;
|
|
void *redCreepTearScale;
|
|
void *redCreepBaseScale;
|
|
void *local_b44;
|
|
void *greenCreepTearScale;
|
|
void *greenCreepBaseScale;
|
|
void *relSpeed;
|
|
void *local_b34;
|
|
void *local_b30;
|
|
void *local_b2c;
|
|
void *local_b28;
|
|
void *local_b24;
|
|
void *local_b20;
|
|
void *local_b1c;
|
|
void *local_b18;
|
|
void *local_b14;
|
|
void *local_b10;
|
|
uint8_t *local_b0c;
|
|
void *local_b08;
|
|
void *local_b04;
|
|
void *local_b00;
|
|
void *local_afc;
|
|
Room *local_af8;
|
|
void *local_af4;
|
|
void *local_af0;
|
|
void *otherRelSpeed;
|
|
void *local_ae8;
|
|
void *local_ae4;
|
|
void *local_ae0;
|
|
void *local_adc;
|
|
void *local_ad8;
|
|
void *local_ad4;
|
|
void *local_ad0;
|
|
void *local_acc;
|
|
void *local_ac8;
|
|
void *local_ac4;
|
|
void *local_ac0;
|
|
void *local_abc;
|
|
void *local_ab8;
|
|
void *local_ab4;
|
|
void *local_ab0;
|
|
void *local_aac;
|
|
uint8_t *local_aa8;
|
|
void *local_aa4;
|
|
void *local_aa0;
|
|
void *local_a9c;
|
|
void *local_a98;
|
|
void *local_a94;
|
|
void *local_a90;
|
|
void *local_a8c;
|
|
void *local_a88;
|
|
void *local_a84;
|
|
void *local_a80;
|
|
Room *local_a7c;
|
|
void *local_a78;
|
|
Room *local_a74;
|
|
void *local_a70;
|
|
void *local_a6c;
|
|
void *local_a68;
|
|
void *local_a64;
|
|
void *local_a60;
|
|
void *local_a5c;
|
|
void *local_a58;
|
|
void *local_a54;
|
|
void *local_a50;
|
|
void *local_a4c;
|
|
void *local_a48;
|
|
void *local_a44;
|
|
void *local_a40;
|
|
void *local_a3c;
|
|
void *local_a38;
|
|
void *local_a34;
|
|
void *local_a30;
|
|
void *local_a2c;
|
|
void *local_a28;
|
|
uint8_t *local_a24;
|
|
void *bloodParticleScale;
|
|
void *bloodParticleDist;
|
|
void *minBloodParticles;
|
|
void *poofScaleSmall;
|
|
void *poofScaleLarge;
|
|
void *poofSizeScale;
|
|
void *tearSpeed;
|
|
void *defaultSplitSpeed;
|
|
void *local_a00;
|
|
void *local_9fc;
|
|
void *local_9f8;
|
|
void *local_9f4;
|
|
void *particleSpeed;
|
|
void *particleDist;
|
|
void *pvStack_9e8;
|
|
void *particleCount;
|
|
uint8_t local_9e0 [12];
|
|
Vector wrappedPos;
|
|
Vector local_9cc;
|
|
Vector local_9c4;
|
|
Vector local_9bc;
|
|
Vector separation;
|
|
Vector quadsplitVel;
|
|
Vector splitVel;
|
|
Vector redCreepPos;
|
|
Vector greenCreepPos;
|
|
Vector local_98c;
|
|
Vector local_984;
|
|
void *local_97c;
|
|
Room *local_978;
|
|
void *halfOverlap;
|
|
void *bounceFactor;
|
|
uint8_t *local_96c;
|
|
void *local_968;
|
|
Vector separationDir;
|
|
void *local_95c;
|
|
Vector velDir;
|
|
Vector local_950;
|
|
void *local_948;
|
|
Entity *chainChild;
|
|
void *local_940;
|
|
void *local_93c;
|
|
void *local_938;
|
|
Vector fromTarget2;
|
|
void *local_92c;
|
|
void *local_928;
|
|
void *local_924;
|
|
void *bloodParticleCount;
|
|
Vector aimDir;
|
|
void *local_914;
|
|
void *local_910;
|
|
void *squareSpeedScale;
|
|
BitSet128 *tearFlagsPtr;
|
|
Room *local_904;
|
|
void *local_900;
|
|
Room *local_8fc;
|
|
Room *local_8f8;
|
|
Entity_Player *local_8f4;
|
|
void *pointSixConst;
|
|
void *local_8ec;
|
|
Vector *tearPos;
|
|
Room *local_8e4;
|
|
Entity_Player *local_8e0;
|
|
void *local_8dc;
|
|
Room *local_8d8;
|
|
float pointThreeConst;
|
|
Room *local_8d0;
|
|
Room *local_8cc;
|
|
ANM2 *local_8c8;
|
|
BitSet128 *local_8c4;
|
|
Room *local_8c0;
|
|
char local_8b9;
|
|
float halfConst;
|
|
Room *local_8b4;
|
|
Room *local_8b0;
|
|
Entity_Projectile *local_8ac;
|
|
float oneConst;
|
|
uint8_t local_8a1;
|
|
Room *local_8a0;
|
|
Room *local_89c;
|
|
Room *local_898;
|
|
float zeroConst;
|
|
Room *local_890;
|
|
Room *local_88c;
|
|
Room *local_888;
|
|
Entity_Tear *tear;
|
|
void *local_880;
|
|
Room *local_87c;
|
|
TearParams local_878;
|
|
TearParams local_810 [9];
|
|
ColorMod local_514;
|
|
Color local_4e8 [4];
|
|
Color local_438 [4];
|
|
Color aCStack_388 [4];
|
|
TearParams tearHitParams;
|
|
TearParams TStack_270;
|
|
uint8_t local_1d8 [68];
|
|
std_string curAnimName;
|
|
Color splashColor;
|
|
uint8_t local_150 [44];
|
|
Color CStack_124;
|
|
TearParams local_f8;
|
|
RNG local_8c;
|
|
uint8_t local_7c [88];
|
|
uint32_t stackCookie;
|
|
uint8_t *puStack_20;
|
|
void *prevExceptionList;
|
|
uint8_t *puStack_18;
|
|
uint32_t ehState;
|
|
ColorMod *color;
|
|
float decayFactor;
|
|
Game *game;
|
|
|
|
puStack_20 = local_7c + 0x78;
|
|
ehState = -1;
|
|
puStack_18 = &LAB_00af78c4;
|
|
prevExceptionList = ExceptionList;
|
|
stackCookie = __security_cookie ^ GHIDRA_UINT((local_7c + 0x6c));
|
|
ExceptionList = &prevExceptionList;
|
|
local_87c = GHIDRA_CAST<Room *>(0x0);
|
|
local_8f8 = GHIDRA_CAST<Room *>(0x0);
|
|
tear = this;
|
|
puVar19 = local_7c + 0x78;
|
|
if (this->_isFireSoundPending != 0) {
|
|
play_fire_sound();
|
|
this->_isFireSoundPending = 0;
|
|
puVar19 = puStack_20;
|
|
}
|
|
puStack_20 = puVar19;
|
|
tearFlagsPtr = &this->_tearFlags;
|
|
pBVar6 = BitSet128::operator_and(&ludovicoMask,tearFlagsPtr,&g_tearFlagLudovico);
|
|
if ((((GHIDRA_INT(pBVar6->_l) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&pBVar6->_l) + 4)) != 0) ||
|
|
(GHIDRA_INT(pBVar6->_h) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&pBVar6->_h) + 4)) != 0)) && ((this->_subtype & 4) != 0)
|
|
) && (this->_parent == 0)) goto LAB_006684e5;
|
|
room = GHIDRA_CAST<Room *>(this->_spawnerEntity);
|
|
local_8d8 = GHIDRA_CAST<Room *>(this);
|
|
if (GHIDRA_CAST<Room *>(this->_spawnerEntity) != GHIDRA_CAST<Room *>(0x0)) {
|
|
do {
|
|
local_8d8 = room;
|
|
room = local_8d8->_gridEntities[0xe9];
|
|
} while (local_8d8->_gridEntities[0xe9] != GHIDRA_CAST<Room *>(0x0));
|
|
}
|
|
pVVar9 = &this->_pos;
|
|
if (local_8d8->_gridEntities[1] != (void *)0x1) {
|
|
local_8d8 = GHIDRA_CAST<Room *>(0x0);
|
|
}
|
|
tearPos = pVVar9;
|
|
decayFactor = (GHIDRA_CAST<Room *>((g_game->_room)))->Room::GetTimeScale(pVVar9,GHIDRA_CAST<Entity *>(this));
|
|
game = g_game;
|
|
local_8d0 = GHIDRA_CAST<Room *>(&this->_speedMultiplier);
|
|
local_8ec = (void *)0x3f400000;
|
|
*GHIDRA_CAST<float *>(local_8d0) = decayFactor;
|
|
if (0 < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(game->_room) + 0x722c))) {
|
|
*GHIDRA_CAST<float *>(local_8d0) = decayFactor * 0.75;
|
|
}
|
|
if (0 < this->_holdTimer) {
|
|
iVar7 = this->_holdTimer + -1;
|
|
this->_holdTimer = iVar7;
|
|
if (iVar7 != 0) {
|
|
iVar7 = this->_parent;
|
|
if (iVar7 != 0) {
|
|
decayFactor = *GHIDRA_CAST<float *>((iVar7 + 0x340));
|
|
fVar36 = (this->_holdOffset).y;
|
|
pVVar9->x = *GHIDRA_CAST<float *>((iVar7 + 0x33c)) + (this->_holdOffset).x;
|
|
(this->_pos).y = decayFactor + fVar36;
|
|
}
|
|
(this->_velocity).x = g_vectorZero.x;
|
|
(this->_velocity).y = g_vectorZero.y;
|
|
if ((this->_holdTimer / 0xf & 1U) == 0) {
|
|
decayFactor = this->_height + 0.5;
|
|
}
|
|
else {
|
|
decayFactor = this->_height - 0.5;
|
|
}
|
|
this->_height = decayFactor;
|
|
(GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Entity_Projectile *>(this))))->Entity_Projectile::SetHeight(decayFactor);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::Update();
|
|
ExceptionList = prevExceptionList;
|
|
return;
|
|
}
|
|
(this->_velocity).x = (this->_holdVelocity).x;
|
|
(this->_velocity).y = (this->_holdVelocity).y;
|
|
}
|
|
pBVar6 = &this->_tearFlags;
|
|
pBVar8 = BitSet128::operator_and(&detonateMask,pBVar6,&g_tearFlagDetonate);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
local_890 = GHIDRA_CAST<Room *>(0x40400000);
|
|
if ((bVar4 != 0) && (local_8d8 != GHIDRA_CAST<Room *>(0x0))) {
|
|
playerEffects = GHIDRA_CAST<TemporaryEffects *>((GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(local_8d8))))->Entity_Player)::GetEffects();
|
|
bVar4 = (GHIDRA_CAST<TemporaryEffects *>((playerEffects)))->TemporaryEffects::HasCollectibleEffect(0x89);
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagDetonate)))->BitSet128::__bnot(¬Detonate);
|
|
FUN_005cd430();
|
|
(GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::operator__(&g_tearFlagExplosive);
|
|
this->SetCollisionDamage();
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::Die();
|
|
this->_deathFlags = 0x40;
|
|
}
|
|
}
|
|
room = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
bVar4 = (GHIDRA_CAST<Room *>((room)))->Room::is_type_16();
|
|
pointSixConst = (void *)0x3f19999a;
|
|
if (((bVar4 != 0) && (-5.1 <= this->_height)) && (this->_tearRange * 0.6 < this->_updateTime)) {
|
|
pBVar8 = BitSet128::operator_and(&ludovicoMask2,pBVar6,&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::Die();
|
|
this->_deathFlags = 0x40;
|
|
}
|
|
}
|
|
if ((this->_variant == 0xd) || (this->_variant == 0x17)) {
|
|
seeds = GHIDRA_CAST<Seeds *>(Game)::GetSeeds(g_game);
|
|
bVar4 = Seeds::HasSeedEffect(seeds,0x4f);
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagLasershot)))->BitSet128::__bnot(¬Lasershot);
|
|
FUN_005cd430();
|
|
}
|
|
}
|
|
local_8dc = (void *)0x3f800000;
|
|
oneConst = (float)local_8dc;
|
|
pBVar6 = BitSet128::operator_and(&waitMask,pBVar6,&g_tearFlagWait);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
halfConst = 0.5;
|
|
if (bVar4 == 0) {
|
|
if (0 < this->_waitFrames) {
|
|
if (this->_parent != 0) {
|
|
iVar7 = (GHIDRA_CAST<Entity *>(()))->Entity::Type();
|
|
pEVar11 = GHIDRA_CAST<Entity *>(this->_parent);
|
|
if (iVar7 != 1) {
|
|
iVar7 = (GHIDRA_CAST<Entity *>(()))->Entity::Type();
|
|
if (iVar7 != 3) goto LAB_0066757c;
|
|
familiar = GHIDRA_CAST<Entity_Familiar *>(FUN_00435de0());
|
|
pEVar11 = GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity_Familiar *>((familiar)))->Entity_Familiar)::Player();
|
|
}
|
|
pEVar17 = (GHIDRA_CAST<Entity *>((pEVar11)))->Entity::ToPlayer();
|
|
if ((pEVar17 != GHIDRA_CAST<Entity_Player *>(0x0)) &&
|
|
(iVar7 = (GHIDRA_CAST<Entity_Player *>((pEVar17)))->Entity_Player::GetFireDirection(), iVar7 == -1)) {
|
|
this->_waitFrames = 1;
|
|
}
|
|
}
|
|
LAB_0066757c:
|
|
piVar12 = &this->_waitFrames;
|
|
*piVar12 = *piVar12 + -1;
|
|
iVar7 = this->_waitFrames;
|
|
if (*piVar12 == 0) {
|
|
(GHIDRA_CAST<Vector *>((&this->_velocity)))->Vector::operator_add_assign(&this->_continueVelocity);
|
|
(GHIDRA_CAST<Vector *>((&this->_continueVelocity)))->Vector::operator_assign(&g_vectorZero);
|
|
iVar7 = this->_waitFrames;
|
|
}
|
|
if ((iVar7 / 0xf & 1U) == 0) {
|
|
decayFactor = this->_height + halfConst;
|
|
}
|
|
else {
|
|
decayFactor = this->_height - halfConst;
|
|
}
|
|
this->_height = decayFactor;
|
|
(GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Entity_Projectile *>(this))))->Entity_Projectile::SetHeight(decayFactor);
|
|
}
|
|
}
|
|
else {
|
|
this->_waitFrames = 0x5a;
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagWait)))->BitSet128::__bnot(¬Wait);
|
|
FUN_005cd430();
|
|
(GHIDRA_CAST<Vector *>((&this->_continueVelocity)))->Vector::operator_assign(&this->_velocity);
|
|
(GHIDRA_CAST<Vector *>((&this->_velocity)))->Vector::operator_assign(&g_vectorZero);
|
|
}
|
|
pBVar6 = &this->_tearFlags;
|
|
pBVar8 = BitSet128::operator_and
|
|
(&mysteriousLiquidCreepMask,pBVar6,&g_tearFlagMysteriousLiquidCreep);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
local_8fc = GHIDRA_CAST<Room *>(0x41700000);
|
|
local_900 = (void *)0x3ecccccd;
|
|
if (bVar4 != 0) {
|
|
local_888 = GHIDRA_CAST<Room *>(CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_888)) + 0x1))),this->_dead != 0));
|
|
pBVar8 = BitSet128::operator_and(&ludovicoMask3,pBVar6,&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::IsFrame(5,this->_index);
|
|
local_888 = GHIDRA_CAST<Room *>((GHIDRA_UINT(local_888) & 0xff));
|
|
if (bVar4 != 0) {
|
|
local_888 = GHIDRA_CAST<Room *>(0x1);
|
|
}
|
|
}
|
|
if (this->_dead != 0) {
|
|
pBVar8 = BitSet128::operator_and(&explosiveMask,pBVar6,&g_tearFlagExplosive);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) || (this->_variant == 4)) goto LAB_006677ce;
|
|
}
|
|
if ((char)local_888 != '\0') {
|
|
greenCreepPos.y = (this->_pos).y;
|
|
greenCreepPos.x = (this->_pos).x;
|
|
room = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
pVVar9 = (GHIDRA_CAST<Room *>((room)))->Room::GetClampedPosition(&clampedPos,&greenCreepPos,15.0);
|
|
(GHIDRA_CAST<Vector *>((&greenCreepPos)))->Vector::operator_assign(pVVar9);
|
|
uVar10 = Random();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x0);
|
|
Game::Spawn(g_game,1000,0x35,&greenCreepPos,&g_vectorZero,GHIDRA_CAST<Entity *>(this->_spawnerEntity),0,
|
|
uVar10);
|
|
pEVar11 = GHIDRA_CAST<Entity *>(__RTDynamicCast());
|
|
greenCreepBaseScale = (void *)0x3ecccccd;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&uniformScale,GHIDRA_CAST<float *>(&greenCreepBaseScale));
|
|
fVar27 = (long double)Scale(tear);
|
|
greenCreepTearScale = (void *)(float)fVar27;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_14d0,GHIDRA_CAST<float *>(&greenCreepTearScale));
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::SetSpriteScale(pVVar9);
|
|
pEVar11->Update();
|
|
pBVar6 = tearFlagsPtr;
|
|
this = tear;
|
|
}
|
|
}
|
|
LAB_006677ce:
|
|
pBVar8 = BitSet128::operator_and(&bit76Mask,pBVar6,GHIDRA_CAST<BitSet128 *>(&DAT_00c346a0));
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) && (this->_dead != 0)) {
|
|
pBVar8 = BitSet128::operator_and(&explosiveMask2,pBVar6,&g_tearFlagExplosive);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if ((bVar4 == 0) && (this->_variant != 4)) {
|
|
redCreepPos.y = (this->_pos).y;
|
|
redCreepPos.x = (this->_pos).x;
|
|
room = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
pVVar9 = (GHIDRA_CAST<Room *>((room)))->Room::GetClampedPosition(&clampedPos2,&redCreepPos,15.0);
|
|
(GHIDRA_CAST<Vector *>((&redCreepPos)))->Vector::operator_assign(pVVar9);
|
|
uVar10 = Random();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x0);
|
|
Game::Spawn(g_game,1000,0x2e,&redCreepPos,&g_vectorZero,GHIDRA_CAST<Entity *>(this->_spawnerEntity),0,
|
|
uVar10);
|
|
pEVar11 = GHIDRA_CAST<Entity *>(__RTDynamicCast());
|
|
redCreepBaseScale = (void *)0x3ecccccd;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&uniformScale2,GHIDRA_CAST<float *>(&redCreepBaseScale));
|
|
fVar27 = (long double)Scale(tear);
|
|
redCreepTearScale = (void *)(float)fVar27;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_14e8,GHIDRA_CAST<float *>(&redCreepTearScale));
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::SetSpriteScale(pVVar9);
|
|
pEVar11->Update();
|
|
pBVar6 = tearFlagsPtr;
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and(&laserMask,pBVar6,&g_tearFlagLaser);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
this = tear;
|
|
zeroConst = 0.0;
|
|
pointThreeConst = 0.3;
|
|
if (bVar4 != 0) {
|
|
local_8b9 = '\0';
|
|
if (tear->_techZeroTarget == 0) {
|
|
local_8a0 = GHIDRA_CAST<Room *>(0x0);
|
|
local_8b0 = GHIDRA_CAST<Room *>(0x47fd2000);
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x6679c9);
|
|
EntityList::QueryRadius(entityList,GHIDRA_CAST<EntityList_EL *>(techZeroQuery),&this->_pos,350.0,4);
|
|
ehState = 0;
|
|
local_898 = GHIDRA_CAST<Room *>(0x0);
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(techZeroQuery))))->EntityList::Size();
|
|
if (iVar7 != 0) {
|
|
do {
|
|
piVar12 = GHIDRA_CAST<int *>(std)::vector<int>::operator_index();
|
|
if (GHIDRA_CAST<Entity_Tear *>(*piVar12) != this) {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(*puVar13))))->Entity::Type();
|
|
if (iVar7 == 2) {
|
|
msvc::vector<int>::operator_index();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x0);
|
|
local_904 = GHIDRA_CAST<Room *>(__RTDynamicCast());
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_904))))->Entity::Position(&entityPos);
|
|
local_8e4 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::DistanceSquared(&this->_pos);
|
|
if ((float)local_8e4 < (float)local_8b0) {
|
|
local_8a0 = local_904;
|
|
local_8b0 = local_8e4;
|
|
}
|
|
}
|
|
}
|
|
local_898 = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_898)) + 0x1))));
|
|
room = GHIDRA_CAST<Room *>((GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(techZeroQuery))))->EntityList)::Size();
|
|
} while (local_898 < room);
|
|
if (((local_8a0 != GHIDRA_CAST<Room *>(0x0)) && (local_8a0->_gridEntities[0x11a] != this)) &&
|
|
(local_8d8 != GHIDRA_CAST<Room *>(0x0))) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8a0))))->Entity::Position(&entityPos2);
|
|
pVVar14 = GHIDRA_CAST<Vector *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8a0))))->Entity)::PositionOffset();
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_1500,pVVar14);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__add(&nextPos,&this->_velocity);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__add(&local_1510,&this->_posOffset);
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&toTechZeroTarget,pVVar14);
|
|
if (this->_techZeroLaser == 0) {
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_1518)))->Vector::Vector(zeroConst,-15.0);
|
|
local_8e4 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&toTechZeroTarget)))->Vector)::GetAngleDegrees();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x3);
|
|
laser = Entity_Laser::ShootAngle
|
|
(10,&this->_pos,(float)local_8e4,3,pVVar9,GHIDRA_CAST<Entity *>(local_8d8),1);
|
|
if (laser == GHIDRA_CAST<Entity_Laser *>(0x0)) {
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagLaser)))->BitSet128::__bnot(¬Laser);
|
|
FUN_005cd430();
|
|
local_8b9 = '\0';
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(&this->_techZeroTarget))))->EntityPtr::SetReference(GHIDRA_CAST<Entity *>(0x0));
|
|
goto LAB_00667cb7;
|
|
}
|
|
pEVar11 = GHIDRA_CAST<Entity *>(0x0);
|
|
iVar7 = Isaac::Random(2);
|
|
Entity_Player::GetTearHitParams
|
|
(GHIDRA_CAST<Entity_Player *>(local_8d8),&TStack_270,3,1.0,iVar7 * 2 + -1,pEVar11);
|
|
(**(code **)(*GHIDRA_CAST<int *>(laser) + 0x40))();
|
|
(GHIDRA_CAST<Entity_Laser *>((laser)))->Entity_Laser::set_scale(TStack_270._tearScale);
|
|
FUN_00435cd0();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(g_tearFlagSpectral._l);
|
|
FUN_00456830();
|
|
set_field_0x37c();
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(laser))))->Entity::SetParent(GHIDRA_CAST<Entity *>(this));
|
|
FUN_00435f70();
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(&this->_techZeroLaser))))->EntityPtr::SetReference(GHIDRA_CAST<Entity *>(laser));
|
|
local_8b9 = '\x01';
|
|
}
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(&this->_techZeroTarget))))->EntityPtr::SetReference(GHIDRA_CAST<Entity *>(local_8a0));
|
|
}
|
|
}
|
|
LAB_00667cb7:
|
|
ehState = -1;
|
|
(GHIDRA_CAST<EntityList_Query *>((techZeroQuery)))->EntityList_Query::~EntityList_Query();
|
|
}
|
|
puVar13 = &this->_techZeroTarget;
|
|
local_8e4 = GHIDRA_CAST<Room *>(&this->_techZeroLaser);
|
|
if ((this->_techZeroLaser != 0) &&
|
|
(((this->_dead != 0 || (*puVar13 == 0)) || (cVar5 = (GHIDRA_CAST<Entity *>(()))->Entity::IsDead(), cVar5 != '\0')))) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(this->_techZeroLaser) + 0x28))();
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(&this->_techZeroLaser))))->EntityPtr::SetReference(GHIDRA_CAST<Entity *>(0x0));
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(puVar13))))->EntityPtr::SetReference(GHIDRA_CAST<Entity *>(0x0));
|
|
}
|
|
if ((((this->_dead != 0) || ((*puVar13 != 0 && (cVar5 = (GHIDRA_CAST<Entity *>(()))->Entity::IsDead(), cVar5 != '\0')))) ||
|
|
(*puVar13 == 0)) && (GHIDRA_CAST<int *>(this->_techZeroLaser) != GHIDRA_CAST<int *>(0x0))) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(this->_techZeroLaser) + 0x28))();
|
|
}
|
|
if ((this->_techZeroLaser != 0) && (GHIDRA_CAST<Entity *>(*puVar13) != GHIDRA_CAST<Entity *>(0x0))) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(*puVar13))))->Entity::Position(&entityPos3);
|
|
pVVar14 = GHIDRA_CAST<Vector *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this->_techZeroTarget))))->Entity)::PositionOffset();
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_1528,pVVar14);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__add(&nextPos2,&this->_velocity);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__add(&local_1538,&this->_posOffset);
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&laserToTarget,pVVar14);
|
|
local_89c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&laserToTarget)))->Vector)::Length();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x0);
|
|
room = GHIDRA_CAST<Room *>(__RTDynamicCast());
|
|
local_8b0 = room;
|
|
decayFactor = (GHIDRA_CAST<Vector *>((&laserToTarget)))->Vector::GetAngleDegrees();
|
|
(GHIDRA_CAST<Entity_NPC *>((GHIDRA_CAST<Entity_NPC *>(room))))->Entity_NPC::SetAimAngle(decayFactor);
|
|
(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(room))))->Entity_Laser::SetMaxDistance((float)local_89c);
|
|
(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(room))))->Entity_Laser::SetTimeout();
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((tearPos)))->Vector::__add(&local_1550,&this->_posOffset);
|
|
this = tear;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_1588,&tear->_velocity);
|
|
pVVar14 = GHIDRA_CAST<Vector *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8b0))))->Entity)::PositionOffset();
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&local_1590,pVVar14);
|
|
room = local_8b0;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8b0))))->Entity::SetPosition(pVVar9);
|
|
if (350.0 < (float)local_89c) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x28))();
|
|
}
|
|
if (local_8b9 != '\0') {
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0xc))();
|
|
}
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and(&lasershotMask,&this->_tearFlags,&g_tearFlagLasershot);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
local_8f4 = GHIDRA_CAST<Entity_Player *>(0x41f00000);
|
|
if (bVar4 == 0) {
|
|
if (GHIDRA_CAST<int *>(this->_laserShotLaser) == GHIDRA_CAST<int *>(0x0)) goto LAB_00668237;
|
|
this->_visible = 1;
|
|
this->_entityCollisionClass = 4;
|
|
(**(code **)(*GHIDRA_CAST<int *>(this->_laserShotLaser) + 0x28))();
|
|
LAB_00668224:
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(&this->_laserShotLaser))))->EntityPtr::SetReference(GHIDRA_CAST<Entity *>(0x0));
|
|
}
|
|
else {
|
|
pVVar9 = &this->_continueVelocity;
|
|
if (this->_waitFrames < 1) {
|
|
pVVar9 = &this->_velocity;
|
|
}
|
|
shotVelocity.x = pVVar9->x;
|
|
shotVelocity.y = pVVar9->y;
|
|
if (this->_laserShotLaser == 0) {
|
|
local_8b0 = local_8d8;
|
|
if (local_8d8 == GHIDRA_CAST<Room *>(0x0)) {
|
|
local_8b0 = GHIDRA_CAST<Room *>(Game)::GetPlayer(g_game,0);
|
|
}
|
|
(GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::operator__(&this->_velocity);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_1598)))->Vector::Vector(zeroConst,this->_height);
|
|
local_8e4 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&this->_velocity)))->Vector)::GetAngleDegrees();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x3e8);
|
|
room = GHIDRA_CAST<Room *>(Entity_Laser)::ShootAngle
|
|
(3,&this->_pos,(float)local_8e4,1000,pVVar9,GHIDRA_CAST<Entity *>(local_8b0),1);
|
|
local_888 = room;
|
|
if (room != GHIDRA_CAST<Room *>(0x0)) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetParent(GHIDRA_CAST<Entity *>(this));
|
|
(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(room))))->Entity_Laser::SetMaxDistance(30.0);
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x40))();
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::GetColor();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xff);
|
|
(*pcVar1)();
|
|
pBVar35 = &g_tearFlagContinuum;
|
|
pBVar34 = &g_tearFlagSplit;
|
|
pBVar8 = &g_tearFlagHydrobounce;
|
|
pBVar6 = BitSet128::operator_or(&withOrbit,&g_tearFlagBounce,&g_tearFlagOrbit);
|
|
pBVar6 = BitSet128::operator_or(&orResult,pBVar6,pBVar8);
|
|
pBVar6 = BitSet128::operator_or(&orResult2,pBVar6,pBVar34);
|
|
pBVar6 = BitSet128::operator_or(&orResult3,pBVar6,pBVar35);
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::__bnot(¬Result);
|
|
pBVar8 = TearFlags(this,&tearFlagsCopy);
|
|
BitSet128::operator_and(&andResult,pBVar8,pBVar6);
|
|
room = local_888;
|
|
FUN_00456830();
|
|
(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(room))))->Entity_Laser::set_disable_init_sound();
|
|
(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(room))))->Entity_Laser::SetMultidimensionalTouched();
|
|
FUN_005cd5a0();
|
|
decayFactor = (GHIDRA_CAST<Vector *>((&shotVelocity)))->Vector::GetAngleDegrees();
|
|
(GHIDRA_CAST<Entity_NPC *>((GHIDRA_CAST<Entity_NPC *>(room))))->Entity_NPC::SetAimAngle(decayFactor);
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0xc))();
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(&this->_laserShotLaser))))->EntityPtr::SetReference(GHIDRA_CAST<Entity *>(room));
|
|
this->_visible = 0;
|
|
pBVar6 = BitSet128::operator_and(&explosiveMask3,&this->_tearFlags,&g_tearFlagExplosive);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
this->_entityCollisionClass = 0;
|
|
}
|
|
goto LAB_00668180;
|
|
}
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagLasershot)))->BitSet128::__bnot(¬Lasershot2);
|
|
FUN_005cd430();
|
|
this->_visible = 1;
|
|
this->_entityCollisionClass = 4;
|
|
}
|
|
else {
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x0);
|
|
room = GHIDRA_CAST<Room *>(__RTDynamicCast());
|
|
if (room != GHIDRA_CAST<Room *>(0x0)) {
|
|
LAB_00668180:
|
|
local_8e4 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&shotVelocity)))->Vector)::GetAngleDegrees();
|
|
fVar27 = (long double)(GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Entity_Projectile *>(room))))->Entity_Projectile::Damage();
|
|
local_904 = GHIDRA_CAST<Room *>((float)fVar27);
|
|
decayFactor = LerpAngleDeg((float)local_904,(float)local_8e4,halfConst);
|
|
(GHIDRA_CAST<Entity_NPC *>((GHIDRA_CAST<Entity_NPC *>(room))))->Entity_NPC::SetAimAngle(decayFactor);
|
|
if (this->_dead != 0) {
|
|
iVar7 = FUN_00579760();
|
|
if (10 < iVar7) {
|
|
(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(room))))->Entity_Laser::SetTimeout();
|
|
}
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetVelocity(&this->_velocity);
|
|
goto LAB_00668224;
|
|
}
|
|
(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(room))))->Entity_Laser::SetTimeout();
|
|
}
|
|
}
|
|
}
|
|
LAB_00668237:
|
|
pVVar9 = &this->_pos;
|
|
pEVar17 = GHIDRA_CAST<Entity_Player *>(this->_fallingSpeed);
|
|
local_8e0 = pEVar17;
|
|
pBVar6 = BitSet128::operator_and(&ludovicoMask4,&this->_tearFlags,&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pBVar6 = BitSet128::operator_and(&hydrobounceMask,&this->_tearFlags,&g_tearFlagHydrobounce);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::GetRootParent();
|
|
local_888 = GHIDRA_CAST<Room *>((3.1415927 / (float)pEVar17));
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::FrameCount();
|
|
local_8b0 = GHIDRA_CAST<Room *>(sinf_wrapper((float)(iVar7 + -1) * (float)local_888));
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::FrameCount();
|
|
decayFactor = sinf_wrapper((float)iVar7 * (float)local_888);
|
|
Math::abs();
|
|
(this->_posOffset).y = decayFactor * this->_height;
|
|
room = local_8b0;
|
|
Math::abs();
|
|
local_8e0 = GHIDRA_CAST<Entity_Player *>(((this->_posOffset).y - (float)room * this->_height));
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::FrameCount();
|
|
decayFactor = sinf_wrapper((float)iVar7 * (float)local_888);
|
|
if (decayFactor * (float)local_8b0 < zeroConst) {
|
|
this->_deathFlags = 4;
|
|
this->_dead = 1;
|
|
apply_death_flag_effects(this,GHIDRA_CAST<Entity *>(0x0));
|
|
}
|
|
}
|
|
}
|
|
local_8e4 = GHIDRA_CAST<Room *>(0xc1200000);
|
|
local_8cc = GHIDRA_CAST<Room *>(0xc1a00000);
|
|
local_904 = GHIDRA_CAST<Room *>(0x3e800000);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = ZEXT812(0xc1be0000);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0xc))) = 0;
|
|
local_8b0 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
if ((this->_dead == 0) || (this->_variant == 9)) goto LAB_0066a370;
|
|
if (this->_variant == 0x28) {
|
|
rng_pair_init(&local_e18);
|
|
local_e18._type = GHIDRA_UINT(this->_subtype) >> 0x10;
|
|
local_e18._variant = this->_subtype & 0xffff;
|
|
local_e18._spawnSeed = this->_initSeed;
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::HasEntityFlags(0x40000);
|
|
local_e18._varData = GHIDRA_INT((bVar4 != 0));
|
|
local_e18._state = GHIDRA_INT(this->_health);
|
|
Entity::DestroyRockGridAt(pVVar9,&local_e18,GHIDRA_CAST<Entity *>(this),this->_tearIdx);
|
|
if (GHIDRA_CAST<Entity *>(this->_spawnerEntity) != GHIDRA_CAST<Entity *>(0x0)) {
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this->_spawnerEntity))))->Entity::is_player();
|
|
if (bVar4 != 0) {
|
|
local_904 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this->_spawnerEntity))))->Entity)::ToPlayer();
|
|
if (local_904 != GHIDRA_CAST<Room *>(0x0)) {
|
|
bVar4 = (GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(local_904))))->Entity_Player::HasCollectible(0x248,0);
|
|
if (bVar4 != 0) {
|
|
iVar7 = Isaac::Random(3);
|
|
room = GHIDRA_CAST<Room *>((iVar7 + 1));
|
|
local_8e4 = room;
|
|
if (0 < GHIDRA_INT(room)) {
|
|
do {
|
|
local_8e4 = GHIDRA_CAST<Room *>(Entity_Player)::AddWisp
|
|
(GHIDRA_CAST<Entity_Player *>(local_904),0x25c,pVVar9,0,1);
|
|
if (local_8e4 != GHIDRA_CAST<Room *>(0x0)) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8e4))))->Entity::SetTargetPosition(*pVVar9);
|
|
(**(code **)(GHIDRA_INT(*GHIDRA_CAST<float *>(local_8e4)) + 0xc))();
|
|
}
|
|
room = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(room[-1])) + 0x7897))));
|
|
} while (room != GHIDRA_CAST<Room *>(0x0));
|
|
this = tear;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
LAB_006684e5:
|
|
this->Remove();
|
|
ExceptionList = prevExceptionList;
|
|
return;
|
|
}
|
|
local_888 = GHIDRA_CAST<Room *>((GHIDRA_UINT(local_888) & 0xffffff00));
|
|
pBVar6 = BitSet128::operator_and(&hydrobounceMask2,&this->_tearFlags,&g_tearFlagHydrobounce);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) && (this->_deathFlags == 4)) {
|
|
pBVar6 = BitSet128::operator_and(&ludovicoMask5,&this->_tearFlags,&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
local_8c0 = local_8e4;
|
|
if (bVar4 == 0) {
|
|
pBVar8 = &g_tearFlagBurstsplit;
|
|
pBVar6 = BitSet128::operator_or(&withQuadsplit,&g_tearFlagExplosive,&g_tearFlagQuadsplit);
|
|
pBVar6 = BitSet128::operator_or(&orResult4,pBVar6,pBVar8);
|
|
pBVar6 = BitSet128::operator_and(&andResult2,&this->_tearFlags,pBVar6);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
room = local_8c0;
|
|
}
|
|
else {
|
|
room = local_8cc;
|
|
}
|
|
pRVar28 = GHIDRA_CAST<Room *>(this->_fallingSpeed);
|
|
if (((float)room < (float)pRVar28) && (*GHIDRA_CAST<short *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x46e)))) == 0)) {
|
|
this->_fallingSpeed = (float)room;
|
|
pRVar28 = room;
|
|
}
|
|
if ((float)room < (float)pRVar28) goto LAB_0066863a;
|
|
}
|
|
*GHIDRA_CAST<short *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x46e)))) = *GHIDRA_CAST<short *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x46e)))) + 1;
|
|
this->_dead = 0;
|
|
in_stack_ffffd9fc = *GHIDRA_CAST<Vector **>(&(this->_tearFlags)._l);
|
|
qVar3 = (this->_tearFlags)._h;
|
|
local_888 = GHIDRA_CAST<Room *>(CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_888)) + 0x1))),1));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(flags_00._h)) + 0x1))) = (char)(qVar3 >> 8);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(flags_00)) + 0x0))) = *GHIDRA_CAST<unkbyte9 *>(&this->_tearFlags);
|
|
(*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(&(flags_00._h)) + 0x2))) = (short)(qVar3 >> 0x10);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags_00._h)) + 0x4))) = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4));
|
|
tear_flags_area_apply
|
|
(pVVar9,GHIDRA_CAST<Entity *>(this),this->_size + 20.0,this->_collisionDamage * (float)local_904,
|
|
flags_00);
|
|
}
|
|
LAB_0066863a:
|
|
local_910 = (void *)0x3f800000;
|
|
auVar31 = ZEXT416(GHIDRA_UINT(oneConst));
|
|
iVar7 = this->_variant;
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0x0);
|
|
local_898 = GHIDRA_CAST<Room *>(0x0);
|
|
local_88c = GHIDRA_CAST<Room *>(0x0);
|
|
local_8c4 = GHIDRA_CAST<BitSet128 *>(oneConst);
|
|
local_8a0 = GHIDRA_CAST<Room *>(oneConst);
|
|
switch(iVar7) {
|
|
case 0:
|
|
case 3:
|
|
case 5:
|
|
case 6:
|
|
case 7:
|
|
case 10:
|
|
case 0xb:
|
|
case 0xe:
|
|
case 0x10:
|
|
case 0x13:
|
|
case 0x15:
|
|
case 0x18:
|
|
case 0x1a:
|
|
case 0x1b:
|
|
case 0x1f:
|
|
case 0x24:
|
|
case 0x29:
|
|
case 0x2d:
|
|
case 0x30:
|
|
if ((float)local_900 <= this->_fScale) {
|
|
if (0.8 <= this->_fScale) {
|
|
auVar31 = ZEXT416(GHIDRA_UINT(oneConst));
|
|
if (this->_height <= -5.0) {
|
|
local_88c = GHIDRA_CAST<Room *>(0x96);
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0xc);
|
|
}
|
|
else {
|
|
local_88c = GHIDRA_CAST<Room *>(0x102);
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(&DAT_0000000d);
|
|
}
|
|
break;
|
|
}
|
|
auVar31 = ZEXT816(0x3f59999a);
|
|
local_88c = GHIDRA_CAST<Room *>(0x102);
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(&DAT_0000004f);
|
|
}
|
|
else {
|
|
auVar31 = ZEXT816(0x3f333333);
|
|
local_88c = GHIDRA_CAST<Room *>(0x102);
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(&DAT_00000050);
|
|
}
|
|
goto LAB_00668f76;
|
|
case 1:
|
|
case 0xc:
|
|
case 0xf:
|
|
case 0x11:
|
|
case 0x19:
|
|
case 0x20:
|
|
case 0x21:
|
|
case 0x22:
|
|
case 0x23:
|
|
case 0x25:
|
|
case 0x26:
|
|
case 0x27:
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(&DAT_0000000b);
|
|
local_88c = GHIDRA_CAST<Room *>(0x96);
|
|
goto LAB_00668f76;
|
|
case 2:
|
|
case 0x1e:
|
|
color = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
(GHIDRA_CAST<Color *>((&splashColor)))->Color::operator_assign(color);
|
|
if (this->_variant == 0x1e) {
|
|
(GHIDRA_CAST<Color *>((aCStack_388)))->Color::Color();
|
|
(GHIDRA_CAST<Color *>((aCStackY_3c4c + 0x81)))->Color::operator_assign(GHIDRA_CAST<ColorMod *>(&splashColor));
|
|
color = GHIDRA_CAST<ColorMod *>(FUN_004072e0());
|
|
(GHIDRA_CAST<Color *>((&splashColor)))->Color::operator_assign(color);
|
|
}
|
|
local_8c0 = GHIDRA_CAST<Room *>(this->_height);
|
|
decayFactor = random_float();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>((decayFactor * (float)local_890 + 2.0));
|
|
Game::SpawnParticles
|
|
(g_game,&this->_pos,0x23,8,(float)in_stack_ffffd9fc,GHIDRA_CAST<ColorMod *>(&splashColor),
|
|
(float)local_8c0,1);
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0x61);
|
|
local_88c = GHIDRA_CAST<Room *>(0xb5);
|
|
local_8c4 = GHIDRA_CAST<BitSet128 *>(halfConst);
|
|
decayFactor = random_float();
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * 0.2 + oneConst));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var;
|
|
local_8a0 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
break;
|
|
case 8:
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(&DAT_00000014);
|
|
local_88c = GHIDRA_CAST<Room *>(0x31);
|
|
local_8c4 = GHIDRA_CAST<BitSet128 *>(pointThreeConst);
|
|
decayFactor = random_float();
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * 0.1 + 0.95));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_01;
|
|
local_8a0 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
break;
|
|
case 0xd:
|
|
case 0x17:
|
|
case 0x1c:
|
|
if ((iVar7 == 0xd) || (iVar7 == 0x17)) {
|
|
seeds = GHIDRA_CAST<Seeds *>(Game)::GetSeeds(g_game);
|
|
bVar4 = Seeds::HasSeedEffect(seeds,0x4f);
|
|
if (bVar4 == 0) goto LAB_00668a9b;
|
|
iVar7 = Isaac::Random(5);
|
|
if ((iVar7 == 0) && ((this->_deathFlags & 1) != 0)) {
|
|
local_88c = GHIDRA_CAST<Room *>(0x33f);
|
|
local_8c4 = GHIDRA_CAST<BitSet128 *>(oneConst);
|
|
decayFactor = random_float();
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0x61);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * (float)pointSixConst + 0.8));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_03;
|
|
local_8a0 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
break;
|
|
}
|
|
local_8c4 = GHIDRA_CAST<BitSet128 *>(zeroConst);
|
|
}
|
|
else {
|
|
LAB_00668a9b:
|
|
local_8c0 = GHIDRA_CAST<Room *>(this->_height);
|
|
color = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
decayFactor = random_float();
|
|
local_8b4 = GHIDRA_CAST<Room *>((decayFactor * (float)local_890 + 2.0));
|
|
iVar7 = Isaac::Random(2);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(local_8b4);
|
|
Game::SpawnParticles
|
|
(g_game,&this->_pos,0x56,iVar7 + 2,(float)local_8b4,color,(float)local_8c0,1);
|
|
local_8c4 = GHIDRA_CAST<BitSet128 *>(pointThreeConst);
|
|
}
|
|
local_88c = GHIDRA_CAST<Room *>(0x8a);
|
|
decayFactor = random_float();
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0x61);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * halfConst + 2.0));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_04;
|
|
local_8a0 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
break;
|
|
case 0x12:
|
|
local_8c0 = GHIDRA_CAST<Room *>(this->_height);
|
|
color = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
decayFactor = random_float();
|
|
local_8b4 = GHIDRA_CAST<Room *>((decayFactor * (float)local_890 + 2.0));
|
|
iVar7 = Isaac::Random(2);
|
|
iVar7 = iVar7 + 2;
|
|
uVar37 = SUB41(local_8c0,0);
|
|
uVar38 = (uint8_t)(GHIDRA_UINT(local_8c0) >> 8);
|
|
uVar39 = (uint16_t)(GHIDRA_UINT(local_8c0) >> 0x10);
|
|
variant = 0x55;
|
|
goto LAB_006689b3;
|
|
case 0x14:
|
|
local_8c0 = GHIDRA_CAST<Room *>(this->_height);
|
|
color = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
decayFactor = random_float();
|
|
local_8b4 = GHIDRA_CAST<Room *>((decayFactor * (float)local_890 + 2.0));
|
|
iVar7 = Isaac::Random(2);
|
|
iVar7 = iVar7 + 4;
|
|
uVar37 = SUB41(local_8c0,0);
|
|
uVar38 = (uint8_t)(GHIDRA_UINT(local_8c0) >> 8);
|
|
uVar39 = (uint16_t)(GHIDRA_UINT(local_8c0) >> 0x10);
|
|
variant = 0x62;
|
|
LAB_006689b3:
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(local_8b4);
|
|
Game::SpawnParticles
|
|
(g_game,&this->_pos,variant,iVar7,(float)local_8b4,color,
|
|
(float)CONCAT22(uVar39,CONCAT11(uVar38,uVar37)),1);
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0x61);
|
|
local_88c = GHIDRA_CAST<Room *>(0x8a);
|
|
local_8c4 = GHIDRA_CAST<BitSet128 *>(pointThreeConst);
|
|
decayFactor = random_float();
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * halfConst + 2.0));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_02;
|
|
local_8a0 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
break;
|
|
case 0x1d:
|
|
local_8c0 = GHIDRA_CAST<Room *>(this->_height);
|
|
color = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
decayFactor = random_float();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>((decayFactor * (float)local_890 + 2.0));
|
|
Game::SpawnParticles
|
|
(g_game,&this->_pos,0x23,4,(float)in_stack_ffffd9fc,color,(float)local_8c0,1);
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0x61);
|
|
local_88c = GHIDRA_CAST<Room *>(0x8a);
|
|
local_8c4 = GHIDRA_CAST<BitSet128 *>(pointThreeConst);
|
|
decayFactor = random_float();
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * halfConst + (float)local_890));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_00;
|
|
local_8a0 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
break;
|
|
case 0x2a:
|
|
local_88c = GHIDRA_CAST<Room *>(0x1e7);
|
|
local_8c4 = GHIDRA_CAST<BitSet128 *>(Math)::clamp(halfConst,oneConst,this->_fScale * 1.4);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>(Math)::clamp(0.95,1.8,oneConst / this->_fScale);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_05;
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0x91);
|
|
local_8a0 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
room = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
bVar4 = (GHIDRA_CAST<Room *>((room)))->Room::IsPositionInRoom(pVVar9,-20.0);
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>((local_150 + 0x2c)))))->Color::Color();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x8c);
|
|
(GHIDRA_CAST<KColor *>((GHIDRA_CAST<KColor *>((local_150 + 0x2c)))))->KColor::FromRGBA255(0x8c,0x7b,0x7b,0xff);
|
|
color = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>((local_150 + 0x2c)))))->Color::__mul(color);
|
|
pvStack_9e8 = (void *)0x10;
|
|
pvStack_b9c = (void *)0x1;
|
|
decayFactor = random_float();
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * halfConst + oneConst));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_06;
|
|
particleCount = (void *)GHIDRA_INT((this->_fScale * 4.0 * (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auVar31)) + 0x0)))));
|
|
msvc::max<int>();
|
|
piVar12 = GHIDRA_CAST<int *>(std)::min<int>();
|
|
local_89c = GHIDRA_CAST<Room *>(*piVar12);
|
|
if (0 < GHIDRA_INT(local_89c)) {
|
|
do {
|
|
decayFactor = random_float();
|
|
Vector::FromAngle(&particleDir,decayFactor * 360.0);
|
|
decayFactor = random_float();
|
|
particleSpeed = (void *)(decayFactor * 2.0 + oneConst);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>(random_float());
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_07;
|
|
particleDist = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&particleDir)))->Vector::__mul(&VStack_15a0,GHIDRA_CAST<float *>(&particleDist));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&VStack_15a8,&this->_size);
|
|
(GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__add(&particlePos,pVVar9);
|
|
uVar10 = Random();
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&particleDir)))->Vector::__mul(&VStack_15b0,GHIDRA_CAST<float *>(&particleSpeed));
|
|
pEVar11 = Game::Spawn(g_game,1000,0x23,&particlePos,pVVar9,GHIDRA_CAST<Entity *>(0x0),1,uVar10);
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::SetPositionOffset(&this->_posOffset);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
pEVar11->SetColor();
|
|
pEVar11->Update();
|
|
local_89c = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_89c[-1])) + 0x7897))));
|
|
} while (local_89c != GHIDRA_CAST<Room *>(0x0));
|
|
local_89c = GHIDRA_CAST<Room *>(0x0);
|
|
}
|
|
}
|
|
break;
|
|
case 0x2b:
|
|
case 0x2c:
|
|
local_8c0 = GHIDRA_CAST<Room *>(this->_height);
|
|
color = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
decayFactor = random_float();
|
|
local_8b4 = GHIDRA_CAST<Room *>((decayFactor * (float)local_890 + 2.0));
|
|
iVar7 = Isaac::Random(2);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(local_8b4);
|
|
Game::SpawnParticles
|
|
(g_game,&this->_pos,0x56,iVar7 + 2,(float)local_8b4,color,(float)local_8c0,1);
|
|
local_88c = GHIDRA_CAST<Room *>(0x8a);
|
|
decayFactor = random_float();
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0xc);
|
|
local_8a0 = GHIDRA_CAST<Room *>((decayFactor * halfConst + 2.0));
|
|
local_898 = GHIDRA_CAST<Room *>(((this->_variant == 0x2c) + 0x14));
|
|
auVar31 = ZEXT416(GHIDRA_UINT(pointThreeConst));
|
|
goto LAB_00668f76;
|
|
case 0x2f:
|
|
local_88c = GHIDRA_CAST<Room *>(0x31);
|
|
goto LAB_00668eec;
|
|
case 0x31:
|
|
local_88c = GHIDRA_CAST<Room *>(0x86);
|
|
LAB_00668eec:
|
|
decayFactor = random_float();
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0xc);
|
|
local_898 = GHIDRA_CAST<Room *>(0x16);
|
|
local_8a0 = GHIDRA_CAST<Room *>((decayFactor * halfConst + 2.0));
|
|
auVar31 = ZEXT416(GHIDRA_UINT(pointThreeConst));
|
|
goto LAB_00668f76;
|
|
case 0x32:
|
|
local_88c = GHIDRA_CAST<Room *>(0x1e);
|
|
decayFactor = random_float();
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0x2);
|
|
local_898 = GHIDRA_CAST<Room *>(0x2);
|
|
local_8a0 = GHIDRA_CAST<Room *>((decayFactor * halfConst + 1.5));
|
|
auVar31 = ZEXT416(pointSixConst);
|
|
LAB_00668f76:
|
|
local_8c4 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
}
|
|
pVVar9 = &this->_pos;
|
|
pBVar6 = BitSet128::operator_and(&explosiveMask4,&this->_tearFlags,&g_tearFlagExplosive);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 == 0) || ((this->_subtype & 2) != 0)) {
|
|
LAB_00668fdf:
|
|
if (this->_variant == 4) goto LAB_00668fe9;
|
|
}
|
|
else {
|
|
pBVar6 = BitSet128::operator_and(&ludovicoMask6,&this->_tearFlags,&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if ((bVar4 == 0) && ((*GHIDRA_CAST<short *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x46e)))) < 2 && ((this->_deathFlags & 0x20) == 0))))
|
|
goto LAB_00668fdf;
|
|
LAB_00668fe9:
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0x1);
|
|
Game::BombTearflagEffects(g_game,pVVar9,60.0,this->_tearFlags,GHIDRA_CAST<Entity *>(this),1.0);
|
|
Game::GetField26614(g_game);
|
|
cVar5 = DeathmatchManager::is_active();
|
|
if (cVar5 == '\0') {
|
|
local_89c = GHIDRA_CAST<Room *>(this->_collisionDamage);
|
|
}
|
|
else {
|
|
local_89c = GHIDRA_CAST<Room *>(0x420c0000);
|
|
}
|
|
if ((char)local_888 != '\0') {
|
|
local_89c = GHIDRA_CAST<Room *>(((float)local_89c * halfConst));
|
|
}
|
|
local_8b4 = GHIDRA_CAST<Room *>(&DAT_00000004);
|
|
if (this->_variant == 4) {
|
|
local_8b4 = GHIDRA_CAST<Room *>(0x40000004);
|
|
}
|
|
decayFactor = this->_size;
|
|
if (8.75 <= decayFactor) {
|
|
local_9fc = (void *)(decayFactor + (float)local_8f4);
|
|
local_a00 = (void *)0x42700000;
|
|
}
|
|
else {
|
|
local_9f4 = (void *)0x41f00000;
|
|
local_9f8 = (void *)((decayFactor * 60.0) / 8.75);
|
|
}
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
local_910 = (void *)(*pfVar15 / 60.0);
|
|
in_stack_ffffd9fc = *GHIDRA_CAST<Vector **>((GHIDRA_INT(&(this->_tearFlags)._h) + 4));
|
|
auVar31 = ZEXT416(local_89c);
|
|
Game::BombDamage(g_game,pVVar9,(float)local_89c,*pfVar15,1,GHIDRA_CAST<Entity *>(this),this->_tearFlags,
|
|
ZEXT48(local_8b4),0);
|
|
pBVar6 = BitSet128::operator_and(&poisonMask,&this->_tearFlags,&g_tearFlagPoison);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
uVar10 = Random();
|
|
Game::Spawn(g_game,1000,7,pVVar9,&g_vectorZero,GHIDRA_CAST<Entity *>(0x0),0,uVar10);
|
|
pEVar11 = GHIDRA_CAST<Entity *>(__RTDynamicCast());
|
|
decayFactor = random_float();
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>(((decayFactor + oneConst) * (float)local_910));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_08;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_15b8)))->Vector::Vector((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auVar31)) + 0x0))),(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auVar31)) + 0x0))));
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::SetSpriteScale(pVVar9);
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(pEVar11) + 0x3c);
|
|
(GHIDRA_CAST<Color *>(()))->Color::Color();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
pEVar11->Update();
|
|
uVar10 = Random();
|
|
pEVar11 = Game::Spawn(g_game,1000,2,tearPos,&g_vectorZero,GHIDRA_CAST<Entity *>(0x0),4,uVar10);
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(pEVar11) + 0x3c);
|
|
(GHIDRA_CAST<Color *>(()))->Color::Color();
|
|
(*pcVar1)();
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_15c0)))->Vector::Vector((float)local_910,(float)local_910 * (float)local_900);
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::SetSpriteScale(pVVar9);
|
|
set_field_358(pEVar11,-5.0);
|
|
pEVar11->Update();
|
|
this = tear;
|
|
}
|
|
}
|
|
pBVar6 = &this->_tearFlags;
|
|
pBVar8 = BitSet128::operator_and(&lasershotMask2,pBVar6,&g_tearFlagLasershot);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) && (local_8c8 != GHIDRA_CAST<ANM2 *>(0x1))) {
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(0x0);
|
|
}
|
|
pBVar8 = local_8c4;
|
|
if (((char)local_888 != '\0') && (local_8c8 != GHIDRA_CAST<ANM2 *>(0x1))) {
|
|
pBVar8 = GHIDRA_CAST<BitSet128 *>(((float)local_8c4 * halfConst));
|
|
bVar26 = local_8c8 == GHIDRA_CAST<ANM2 *>(&DAT_0000000b);
|
|
local_8c8 = GHIDRA_CAST<ANM2 *>(&DAT_0000000e);
|
|
local_898 = GHIDRA_CAST<Room *>(GHIDRA_UINT(bVar26));
|
|
}
|
|
if (local_88c != GHIDRA_CAST<Room *>(0x0)) {
|
|
auVar31 = ZEXT416(local_8a0);
|
|
in_stack_ffffd9fc = &this->_pos;
|
|
SoundEffects::PlayWithFartOverride2
|
|
(GHIDRA_INT(local_88c),GHIDRA_INT(in_stack_ffffd9fc),2,0,(float)local_8a0,(float)pBVar8);
|
|
}
|
|
pBVar8 = BitSet128::operator_and(&quadsplitMask,pBVar6,&g_tearFlagQuadsplit);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
MusicManager::RandomVector(&quadsplitVel);
|
|
pVVar9 = &this->_velocity;
|
|
local_88c = GHIDRA_CAST<Room *>(pVVar9);
|
|
local_8c0 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::LengthSquared();
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = ZEXT812(0x3dcccccd);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0xc))) = 0;
|
|
if ((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) <= (float)local_8c0) {
|
|
tearSpeed = (void *)(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::Length();
|
|
ppvVar16 = &tearSpeed;
|
|
}
|
|
else {
|
|
defaultSplitSpeed = (void *)0x41200000;
|
|
ppvVar16 = &defaultSplitSpeed;
|
|
}
|
|
(GHIDRA_CAST<Vector *>((&quadsplitVel)))->Vector::operator_mul_assign(GHIDRA_CAST<float *>(ppvVar16));
|
|
local_8a0 = (void *)0x0;
|
|
do {
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(&splitVel))))->EntityPtr::clear();
|
|
if (local_8a0 < (void *)0x2) {
|
|
pVVar9 = &quadsplitVel;
|
|
}
|
|
else {
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_15c8)))->Vector::Vector(quadsplitVel.y,-quadsplitVel.x);
|
|
}
|
|
(GHIDRA_CAST<Vector *>((&splitVel)))->Vector::operator_assign(pVVar9);
|
|
if ((GHIDRA_UINT(local_8a0) & 1) != 0) {
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&splitVel)))->Vector::__unm(&negated);
|
|
(GHIDRA_CAST<Vector *>((&splitVel)))->Vector::operator_assign(pVVar9);
|
|
}
|
|
local_8b4 = GHIDRA_CAST<Room *>(GetRootPlayer(this));
|
|
local_8c0 = GHIDRA_CAST<Room *>(this->_variant);
|
|
if (local_8c0 == (void *)0x32) {
|
|
local_8c0 = (void *)0x1;
|
|
}
|
|
uVar10 = Random();
|
|
pEVar11 = GHIDRA_CAST<Entity *>(this->_spawnerEntity);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((tearPos)))->Vector::__sub(&local_15d8,GHIDRA_CAST<Vector *>(local_88c));
|
|
spawnedTear = tear;
|
|
Game::Spawn(g_game,tear->_type,GHIDRA_UINT(local_8c0),pVVar9,&splitVel,pEVar11,0,uVar10);
|
|
room = GHIDRA_CAST<Room *>(__RTDynamicCast());
|
|
local_89c = room;
|
|
if (local_8b4 == GHIDRA_CAST<Room *>(0x0)) {
|
|
pRVar28 = local_8b0;
|
|
}
|
|
else {
|
|
FUN_005cd770();
|
|
pRVar28 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
}
|
|
pRVar28 = GHIDRA_CAST<Room *>(((float)pRVar28 * halfConst));
|
|
(GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Entity_Projectile *>(room))))->Entity_Projectile::SetHeight((float)pRVar28);
|
|
pBVar6 = BitSet128::operator_and
|
|
(&hydrobounceMask3,&spawnedTear->_tearFlags,&g_tearFlagHydrobounce);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
pRVar28 = GHIDRA_CAST<Room *>(spawnedTear->_fallingAccel);
|
|
}
|
|
else if (local_8b4 == GHIDRA_CAST<Room *>(0x0)) {
|
|
pRVar28 = GHIDRA_CAST<Room *>(zeroConst);
|
|
}
|
|
else {
|
|
FUN_0060d070();
|
|
}
|
|
(GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Entity_Projectile *>(room))))->Entity_Projectile::set_falling_accel((float)pRVar28);
|
|
Game::GetPlayer(g_game,0);
|
|
FUN_0060d060();
|
|
local_8b4 = pRVar28;
|
|
if (zeroConst < (float)pRVar28) {
|
|
local_8b4 = GHIDRA_CAST<Room *>(((float)pRVar28 * pointThreeConst));
|
|
}
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<BitSet128 *>((&g_tearFlagFetus)))->BitSet128)::__bnot(¬Fetus);
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<BitSet128 *>((&g_tearFlagHydrobounce)))->BitSet128)::__bnot(¬Hydrobounce);
|
|
local_8c4 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagAbsorb)))->BitSet128::__bnot(¬Absorb);
|
|
local_8c0 = GHIDRA_CAST<Room *>((GHIDRA_CAST<BitSet128 *>((&g_tearFlagBone)))->BitSet128)::__bnot(¬Bone);
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagLudovico)))->BitSet128::__bnot(¬Ludovico);
|
|
pBVar8 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagSplit)))->BitSet128::__bnot(¬Split);
|
|
pBVar34 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagQuadsplit)))->BitSet128::__bnot(¬Quadsplit);
|
|
pBVar34 = BitSet128::operator_and(&andResult3,tearFlagsPtr,pBVar34);
|
|
pBVar8 = BitSet128::operator_and(&andResult4,pBVar34,pBVar8);
|
|
pBVar6 = BitSet128::operator_and(&andResult5,pBVar8,pBVar6);
|
|
pBVar6 = BitSet128::operator_and(&andResult6,pBVar6,GHIDRA_CAST<BitSet128 *>(local_8c0));
|
|
pBVar6 = BitSet128::operator_and(&andResult7,pBVar6,local_8c4);
|
|
pBVar6 = BitSet128::operator_and(&andResult8,pBVar6,GHIDRA_CAST<BitSet128 *>(local_8ac));
|
|
BitSet128::operator_and(&inheritedFlags3,pBVar6,GHIDRA_CAST<BitSet128 *>(local_87c));
|
|
if ((char)local_888 != '\0') {
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagExplosive)))->BitSet128::__bnot(¬Explosive);
|
|
FUN_005cd430();
|
|
}
|
|
random_float();
|
|
room = local_89c;
|
|
FUN_00444c70();
|
|
this = tear;
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x40))();
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._l)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(inheritedFlags3._l)) + 0x4)));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._l)) + 0x0))) = (uint32_t)inheritedFlags3._l;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._h)) + 0x0))) = (uint32_t)inheritedFlags3._h;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(flags._h)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((char)inheritedFlags3._h)) + 0x4)));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(flags._h)) + 0x5))) = (char)((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(inheritedFlags3._h))) + 0x4))) >> 8);
|
|
(*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(&(flags._h)) + 0x6))) = (short)((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(inheritedFlags3._h))) + 0x4))) >> 0x10);
|
|
SetTearFlags(GHIDRA_CAST<Entity_Tear *>(room),flags);
|
|
decayFactor = this->_fScale * (float)pointSixConst;
|
|
auVar31 = ZEXT416(GHIDRA_UINT(decayFactor));
|
|
SetScale(GHIDRA_CAST<Entity_Tear *>(room),decayFactor);
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::Color();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xff);
|
|
(*pcVar1)();
|
|
room = local_89c;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_89c))))->Entity::SetParent(GHIDRA_CAST<Entity *>(this->_parent));
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0xc))();
|
|
local_8a0 = GHIDRA_CAST<Room *>((GHIDRA_INT(local_8a0) + 1));
|
|
} while (GHIDRA_INT(local_8a0) < 4);
|
|
pBVar6 = &this->_tearFlags;
|
|
}
|
|
pBVar8 = BitSet128::operator_and(&burstsplitMask,pBVar6,&g_tearFlagBurstsplit);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
fire_split_projectiles(this,(uint8_t)local_888);
|
|
}
|
|
pBVar6 = BitSet128::operator_and(&laserMask2,pBVar6,&g_tearFlagLaser);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) &&
|
|
(((this->_dead != 0 || (this->_techZeroTarget == 0)) &&
|
|
(GHIDRA_CAST<int *>(this->_techZeroLaser) != GHIDRA_CAST<int *>(0x0))))) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(this->_techZeroLaser) + 0x28))();
|
|
}
|
|
pAVar22 = local_8c8;
|
|
if (local_8c8 != GHIDRA_CAST<ANM2 *>(0x0)) {
|
|
uVar10 = Random();
|
|
Game::Spawn(g_game,1000,GHIDRA_UINT(pAVar22),&this->_pos,&g_vectorZero,GHIDRA_CAST<Entity *>(this),GHIDRA_UINT(local_898),
|
|
uVar10);
|
|
room = GHIDRA_CAST<Room *>(__RTDynamicCast());
|
|
local_88c = room;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetPositionOffset(&this->_posOffset);
|
|
if (((local_8c8 != GHIDRA_CAST<ANM2 *>(0x1)) && (local_8c8 != GHIDRA_CAST<ANM2 *>(&DAT_0000004f))) &&
|
|
(local_8c8 != GHIDRA_CAST<ANM2 *>(&DAT_00000050))) {
|
|
if (local_8c8 == GHIDRA_CAST<ANM2 *>(&DAT_0000000e)) {
|
|
poofSizeScale = (void *)((this->_size + 8.0) / 28.0);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&uniformScale3,GHIDRA_CAST<float *>(&poofSizeScale));
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetSpriteScale(pVVar9);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_15e8)))->Vector::Vector((this->_posOffset).x,zeroConst);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetPositionOffset(pVVar9);
|
|
}
|
|
else {
|
|
if (((local_8c8 == GHIDRA_CAST<ANM2 *>(&DAT_00000014)) || (this->_variant == 0xf)) ||
|
|
(this->_variant == 0xe)) {
|
|
ppvVar16 = &poofScaleSmall;
|
|
poofScaleSmall = (void *)(this->_fScale * (float)local_900);
|
|
pVVar9 = &local_15f8;
|
|
}
|
|
else {
|
|
ppvVar16 = &poofScaleLarge;
|
|
poofScaleLarge = (void *)(this->_fScale * 0.8);
|
|
pVVar9 = &local_15f0;
|
|
}
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(pVVar9,GHIDRA_CAST<float *>(ppvVar16));
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetSpriteScale(pVVar9);
|
|
}
|
|
Isaac::Random(4);
|
|
FUN_0043eea0();
|
|
}
|
|
auVar31 = ZEXT416(local_910);
|
|
if ((float)local_910 != oneConst) {
|
|
pVVar9 = GHIDRA_CAST<Vector *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity)::SpriteScale();
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_1600,GHIDRA_CAST<float *>(&local_910));
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetSpriteScale(pVVar9);
|
|
}
|
|
switch(this->_variant) {
|
|
case 3:
|
|
case 0x13:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
auVar31 = ZEXT416(GHIDRA_UINT(pointThreeConst));
|
|
(GHIDRA_CAST<Color *>((aCStackY_3c4c + 0x81)))->Color::Color();
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
break;
|
|
case 4:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
(GHIDRA_CAST<Color *>((0x3f800000)))->Color::Color(0,0x55,0);
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
break;
|
|
case 5:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
(GHIDRA_CAST<Color *>((aCStackY_3c4c + 0x81)))->Color::Color();
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
break;
|
|
case 6:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
auVar31 = ZEXT816(0x3dcccccd);
|
|
(GHIDRA_CAST<Color *>((aCStackY_3c4c + 0x81)))->Color::Color();
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
break;
|
|
case 7:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
(GHIDRA_CAST<Color *>((aCStackY_3c4c + 0x81)))->Color::Color();
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
break;
|
|
default:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::Color();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
room = local_88c;
|
|
break;
|
|
case 0x12:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
auVar31 = ZEXT416(GHIDRA_UINT(oneConst));
|
|
(GHIDRA_CAST<Color *>((0x3f800000)))->Color::Color(0,0x46,0xff);
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
break;
|
|
case 0x14:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
auVar31 = ZEXT416(GHIDRA_UINT(oneConst));
|
|
(GHIDRA_CAST<Color *>((0x3f800000)))->Color::Color(0xe6,0xe6,0);
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
break;
|
|
case 0x1a:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
(GHIDRA_CAST<Color *>((0x3f800000)))->Color::Color(0,0,0);
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
break;
|
|
case 0x1b:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
auVar31 = ZEXT416(GHIDRA_UINT(halfConst));
|
|
(GHIDRA_CAST<Color *>((0x3f800000)))->Color::Color(0x3f000000,0x3f000000,0x3f000000);
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
break;
|
|
case 0x1f:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
auVar31 = ZEXT816(0x3dcccccd);
|
|
(GHIDRA_CAST<Color *>((aCStackY_3c4c + 0x81)))->Color::Color();
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
break;
|
|
case 0x26:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
auVar31 = ZEXT416(GHIDRA_UINT(pointThreeConst));
|
|
(GHIDRA_CAST<Color *>((aCStackY_3c4c + 0x81)))->Color::Color();
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
break;
|
|
case 0x2d:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
auVar31 = ZEXT416(GHIDRA_UINT(oneConst));
|
|
(GHIDRA_CAST<Color *>((0x3f800000)))->Color::Color(0x3f800000,0x3f19999a,0x3f47ae14,0x3f800000,0,0,0);
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
break;
|
|
case 0x30:
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&tear->_sprite))))->Sprite::Color();
|
|
(GHIDRA_CAST<Color *>((aCStackY_3c4c + 0x81)))->Color::Color();
|
|
FUN_004072e0();
|
|
room = local_88c;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
this = tear;
|
|
}
|
|
pEVar17 = GHIDRA_CAST<Entity_Player *>(__RTDynamicCast());
|
|
if ((pEVar17 != GHIDRA_CAST<Entity_Player *>(0x0)) &&
|
|
(bVar4 = (GHIDRA_CAST<Entity_Player *>((pEVar17)))->Entity_Player::IsLocalPlayer(), bVar4 == 0)) {
|
|
color = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity)::GetColor();
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(local_150))))->Color::operator_assign(color);
|
|
FUN_00417900();
|
|
FUN_00925df0();
|
|
local_87c = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
decayFactor = (GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(local_150))))->Color::A();
|
|
auVar31 = ZEXT416(local_87c);
|
|
Font::SetLineHeightModifier(GHIDRA_CAST<Font *>(local_150),decayFactor * (float)local_87c);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x3c))();
|
|
}
|
|
}
|
|
iVar7 = this->_variant;
|
|
if (((((((iVar7 == 0) || (iVar7 == 0x18)) || (iVar7 == 0x10)) ||
|
|
((iVar7 == 0x1b || (iVar7 == 0x21)))) || (iVar7 == 0x22)) ||
|
|
((iVar7 == 0x23 || (iVar7 == 0x24)))) || ((iVar7 == 0x25 || (iVar7 == 0x26)))) {
|
|
bloodParticleCount = (void *)Isaac::Random(5);
|
|
if (this->_variant == 0x1b) {
|
|
minBloodParticles = (void *)0x3;
|
|
piVar12 = GHIDRA_CAST<int *>(std)::max<int>();
|
|
bloodParticleCount = (void *)*piVar12;
|
|
}
|
|
local_8b4 = GHIDRA_CAST<Room *>(GetRootPlayer(this));
|
|
local_89c = GHIDRA_CAST<Room *>(0x0);
|
|
if (0 < GHIDRA_INT(bloodParticleCount)) {
|
|
do {
|
|
uVar10 = Random();
|
|
pVVar9 = MusicManager::RandomVector(&randomDir);
|
|
decayFactor = random_float();
|
|
bloodParticleDist = (void *)(decayFactor * 24.0);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_1610,GHIDRA_CAST<float *>(&bloodParticleDist));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((tearPos)))->Vector::__add(&local_1618,pVVar9);
|
|
Game::Spawn(g_game,1000,7,pVVar9,&g_vectorZero,GHIDRA_CAST<Entity *>(0x0),0,uVar10);
|
|
pEVar11 = GHIDRA_CAST<Entity *>(__RTDynamicCast());
|
|
bloodParticleScale = (void *)0x3e99999a;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&uniformScale4,GHIDRA_CAST<float *>(&bloodParticleScale));
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::SetSpriteScale(pVVar9);
|
|
auVar31 = ZEXT416(GHIDRA_UINT(zeroConst));
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(local_7c))))->Color::Color();
|
|
Font::SetLineHeightModifier(GHIDRA_CAST<Font *>(local_7c),0.08);
|
|
this = tear;
|
|
if (tear->_variant == 0x1b) {
|
|
LAB_0066a2e0:
|
|
auVar31 = ZEXT416(GHIDRA_UINT(zeroConst));
|
|
color = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Color *>(()))->Color)::Color();
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(local_7c))))->Color::operator_assign(color);
|
|
}
|
|
else if (local_8b4 == GHIDRA_CAST<Room *>(0x0)) {
|
|
LAB_0066a2bc:
|
|
if ((this->_variant == 0x21) || (this->_variant == 0x22)) goto LAB_0066a2e0;
|
|
}
|
|
else {
|
|
bVar4 = (GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(local_8b4))))->Entity_Player::HasCollectible(0x136,0);
|
|
if (bVar4 == 0) {
|
|
bVar4 = (GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(local_8b4))))->Entity_Player::HasCollectible(6,0);
|
|
if (bVar4 != 0) goto LAB_0066a2e0;
|
|
goto LAB_0066a2bc;
|
|
}
|
|
decayFactor = random_float();
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * pointThreeConst + 0.2));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_09;
|
|
Font::SetLineHeightModifier(GHIDRA_CAST<Font *>(local_7c),(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auVar31)) + 0x0))));
|
|
}
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
pEVar11->SetColor();
|
|
pEVar11->Update();
|
|
local_89c = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_89c)) + 0x1))));
|
|
} while (GHIDRA_INT(local_89c) < GHIDRA_INT(bloodParticleCount));
|
|
}
|
|
}
|
|
if (this->_dead != 0) {
|
|
pBVar6 = BitSet128::operator_and(&attractorMask,&this->_tearFlags,&g_tearFlagAttractor);
|
|
(GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
this->Remove();
|
|
ExceptionList = prevExceptionList;
|
|
return;
|
|
}
|
|
LAB_0066a370:
|
|
pBVar6 = BitSet128::operator_and(&squareMask,&this->_tearFlags,&g_tearFlagSquare);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 == 0) || (iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::FrameCount(), iVar7 < 3)) goto LAB_0066a545;
|
|
if (local_8d8 == GHIDRA_CAST<Room *>(0x0)) {
|
|
auVar33 = (uint8_t [12])0x0;
|
|
decayFactor = oneConst;
|
|
}
|
|
else {
|
|
decayFactor = get_tear_trinket_multiplier(GHIDRA_CAST<Entity_Player *>(local_8d8),0x1e);
|
|
auVar33 = extraout_var_10;
|
|
}
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * halfConst + halfConst));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = auVar33;
|
|
squareSpeedScale = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::FrameCount();
|
|
if (iVar7 < 5) {
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::FrameCount();
|
|
if (iVar7 == 3) {
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&velPerpRight)))->Vector::Vector((this->_velocity).y,-(this->_velocity).x);
|
|
pVVar9 = &local_1670;
|
|
goto LAB_0066a52b;
|
|
}
|
|
goto LAB_0066a545;
|
|
}
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::FrameCount();
|
|
switch((iVar7 + -5) % 0x16) {
|
|
case 0:
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&velPerpLeft)))->Vector::Vector(-(this->_velocity).y,(this->_velocity).x);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__div(&VStack_1630,GHIDRA_CAST<float *>(&squareSpeedScale));
|
|
break;
|
|
default:
|
|
goto LAB_0066a545;
|
|
case 7:
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&velPerpLeft2)))->Vector::Vector(-(this->_velocity).y,(this->_velocity).x);
|
|
pVVar9 = &VStack_1640;
|
|
goto LAB_0066a52b;
|
|
case 10:
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&velPerpRight2)))->Vector::Vector((this->_velocity).y,-(this->_velocity).x);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__div(&VStack_1650,GHIDRA_CAST<float *>(&squareSpeedScale));
|
|
break;
|
|
case 0x13:
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&velPerpRight3)))->Vector::Vector((this->_velocity).y,-(this->_velocity).x);
|
|
pVVar9 = &VStack_1660;
|
|
LAB_0066a52b:
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__mul(pVVar9,GHIDRA_CAST<float *>(&squareSpeedScale));
|
|
}
|
|
(GHIDRA_CAST<Vector *>((&this->_velocity)))->Vector::operator_assign(pVVar9);
|
|
LAB_0066a545:
|
|
pBVar8 = &this->_tearFlags;
|
|
pBVar6 = BitSet128::operator_or(&withOrbitAdvanced,&g_tearFlagOrbit,&g_tearFlagOrbitAdvanced);
|
|
pBVar6 = BitSet128::operator_and(&andResult9,pBVar8,pBVar6);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) && (this->_target == 0)) {
|
|
local_8a0 = GHIDRA_CAST<Room *>(this->_spawnerEntity);
|
|
if (local_8a0 == GHIDRA_CAST<Room *>(0x0)) {
|
|
local_8a0 = GHIDRA_CAST<Room *>(this->_parent);
|
|
}
|
|
pBVar6 = BitSet128::operator_and(&ludovicoMask7,pBVar8,&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
if ((local_8a0 != GHIDRA_CAST<Room *>(0x0)) ||
|
|
(bVar4 = (GHIDRA_CAST<Vector *>((&this->_targetPosition)))->Vector::operator_ne(&g_vectorZero), bVar4 != 0)) {
|
|
pBVar6 = BitSet128::operator_and(&tractorBeamMask,pBVar8,&g_tearFlagTractorBeam);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
pBVar6 = BitSet128::operator_and(&orbitAdvancedMask,pBVar8,&g_tearFlagOrbitAdvanced);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 == 0) && (this->_waitFrames < 2)) {
|
|
if ((this->_tearIdx & 1) == 0) {
|
|
local_8b4 = GHIDRA_CAST<Room *>(oneConst);
|
|
}
|
|
else {
|
|
local_8b4 = GHIDRA_CAST<Room *>(&DAT_bf800000);
|
|
}
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(&local_98c))))->EntityPtr::clear();
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(&local_b6c))))->EntityPtr::clear();
|
|
bVar4 = (GHIDRA_CAST<Vector *>((&this->_targetPosition)))->Vector::operator_eq(&g_vectorZero);
|
|
if (bVar4 == 0) {
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__add(&nextPos3,&this->_velocity);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&local_16c0,&this->_targetPosition);
|
|
(GHIDRA_CAST<Vector *>((&local_98c)))->Vector::operator_assign(pVVar9);
|
|
pVVar9 = &this->_orbitVelocity;
|
|
pVVar14 = &g_vectorZero;
|
|
}
|
|
else {
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__add(&nextPos4,&this->_velocity);
|
|
pVVar14 = GHIDRA_CAST<Vector *>(FUN_004172b0());
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(local_16a8,pVVar14);
|
|
(GHIDRA_CAST<Vector *>((&local_98c)))->Vector::operator_assign(pVVar9);
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8a0))))->Entity::Velocity(&entityVel);
|
|
pVVar9 = &local_b6c;
|
|
}
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::operator_assign(pVVar14);
|
|
bVar4 = (GHIDRA_CAST<Vector *>((&this->_targetPosition)))->Vector::operator_eq(&g_vectorZero);
|
|
if ((bVar4 != 0) && (bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8a0))))->Entity::is_player(), bVar4 != 0)) {
|
|
pVVar9 = GHIDRA_CAST<Vector *>((GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(local_8a0))))->Entity_Player)::GetAimDirection();
|
|
local_a30 = (void *)0x42700000;
|
|
pVVar9 = Vector::operator_mul(&local_16c8,GHIDRA_CAST<float *>(&local_a30),pVVar9);
|
|
(GHIDRA_CAST<Vector *>((&local_98c)))->Vector::operator__(pVVar9);
|
|
}
|
|
local_928 = (void *)(GHIDRA_CAST<Vector *>((&local_98c)))->Vector::Length();
|
|
auVar31 = ZEXT416(local_928);
|
|
if ((float)local_928 != zeroConst) {
|
|
(GHIDRA_CAST<Vector *>((&local_98c)))->Vector::__div(&local_c90,GHIDRA_CAST<float *>(&local_928));
|
|
(GHIDRA_CAST<Vector *>((&this->_velocity)))->Vector::operator__(&this->_orbitVelocity);
|
|
local_888 = GHIDRA_CAST<Room *>(0x42f00000);
|
|
local_924 = (void *)0x3dcccccd;
|
|
pBVar6 = BitSet128::operator_and
|
|
(&boomerangMask,&this->_tearFlags,&g_tearFlagBoomerang);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
room = GHIDRA_CAST<Room *>(0x42f00000);
|
|
}
|
|
else {
|
|
local_938 = (void *)assert_lerp_range(this->_height,-5.0,-24.0,0.05,1.5,1);
|
|
pBVar6 = BitSet128::operator_and
|
|
(&explosiveMask5,&this->_tearFlags,&g_tearFlagExplosive);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
local_a34 = (void *)0x3ecccccd;
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
local_938 = (void *)*pfVar15;
|
|
}
|
|
local_888 = GHIDRA_CAST<Room *>(((float)local_938 * 120.0));
|
|
local_924 = (void *)((2.5 - (float)local_938) * (float)local_924);
|
|
room = local_888;
|
|
}
|
|
local_924 = (void *)(((float)room - (float)local_928) * (float)local_924);
|
|
decayFactor = (GHIDRA_CAST<Vector *>((&local_c90)))->Vector::GetAngleDegrees();
|
|
local_87c = GHIDRA_CAST<Room *>(((float)local_8b4 * 90.0));
|
|
local_89c = GHIDRA_CAST<Room *>((decayFactor + (float)local_87c));
|
|
decayFactor = zeroConst;
|
|
FUN_00a155f0();
|
|
decayFactor = Math::clamp(zeroConst,oneConst,decayFactor);
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>(pow(decayFactor,2.0));
|
|
decayFactor = (GHIDRA_CAST<Vector *>((&this->_velocity)))->Vector::GetAngleDegrees();
|
|
local_87c = GHIDRA_CAST<Room *>(((float)local_89c - decayFactor));
|
|
decayFactor = normalize_angle_degrees((float)local_87c);
|
|
local_87c = GHIDRA_CAST<Room *>((decayFactor * (float)local_8ac));
|
|
decayFactor = (GHIDRA_CAST<Vector *>((&this->_velocity)))->Vector::GetAngleDegrees();
|
|
local_89c = GHIDRA_CAST<Room *>((decayFactor + (float)local_87c));
|
|
auVar31 = ZEXT416(local_89c);
|
|
Vector::FromAngle(&local_da0,(float)local_89c);
|
|
local_968 = (void *)(GHIDRA_CAST<Vector *>((&this->_velocity)))->Vector::Length();
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_da0)))->Vector::__mul(&local_16d0,GHIDRA_CAST<float *>(&local_968));
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&local_c90)))->Vector::__mul(&local_16d8,GHIDRA_CAST<float *>(&local_924));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_e40,pVVar14);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::Normalized(&direction);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_e50,GHIDRA_CAST<float *>(&local_968));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_e58,&local_b6c);
|
|
(GHIDRA_CAST<Vector *>((&this->_velocity)))->Vector::operator_assign(pVVar9);
|
|
pVVar9 = &local_b6c;
|
|
pVVar14 = &this->_orbitVelocity;
|
|
goto LAB_0066aff6;
|
|
}
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(&local_9bc))))->EntityPtr::clear();
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(&local_c98))))->EntityPtr::clear();
|
|
bVar4 = (GHIDRA_CAST<Vector *>((&this->_targetPosition)))->Vector::operator_eq(&g_vectorZero);
|
|
if (bVar4 == 0) {
|
|
(GHIDRA_CAST<Vector *>((&local_9bc)))->Vector::operator_assign(&this->_targetPosition);
|
|
pVVar9 = &g_vectorZero;
|
|
}
|
|
else {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8a0))))->Entity::Position(&entityPos4);
|
|
(GHIDRA_CAST<Vector *>((&local_9bc)))->Vector::operator_assign(pVVar9);
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8a0))))->Entity::Velocity(&entityVel2);
|
|
Entity::get_friction();
|
|
local_a38 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__div(&local_e70,GHIDRA_CAST<float *>(&local_a38));
|
|
}
|
|
(GHIDRA_CAST<Vector *>((&local_c98)))->Vector::operator_assign(pVVar9);
|
|
if (this->_orbitRadius == zeroConst) {
|
|
(GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__sub(&local_b74,&local_9bc);
|
|
local_950.x = (this->_velocity).x;
|
|
local_950.y = (this->_velocity).y;
|
|
if (1 < this->_waitFrames) {
|
|
(GHIDRA_CAST<Vector *>((&local_950)))->Vector::operator_assign(&this->_continueVelocity);
|
|
}
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_b74)))->Vector::Normalized(&direction2);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&local_950)))->Vector::Normalized(&direction3);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Dot(pVVar14);
|
|
if ((float)local_87c < 0.8) {
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_b74)))->Vector::Rotated(&perpDir,90.0);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Dot(&local_950);
|
|
local_8b4 = GHIDRA_CAST<Room *>(&DAT_bf800000);
|
|
if (zeroConst <= (float)local_87c) {
|
|
local_8b4 = GHIDRA_CAST<Room *>(0x3f800000);
|
|
}
|
|
decayFactor = (GHIDRA_CAST<Vector *>((&local_950)))->Vector::Length();
|
|
decayFactor = decayFactor * (float)local_8b4;
|
|
pVVar9 = &local_b74;
|
|
}
|
|
else {
|
|
local_8b4 = GHIDRA_CAST<Room *>(0x3f800000);
|
|
if ((this->_tearIdx & 1) == 0) {
|
|
local_8b4 = GHIDRA_CAST<Room *>(&DAT_bf800000);
|
|
}
|
|
decayFactor = (GHIDRA_CAST<Vector *>((&local_950)))->Vector::Length();
|
|
decayFactor = decayFactor * (float)local_8b4;
|
|
pVVar9 = &local_950;
|
|
}
|
|
this->_orbitRadius = decayFactor;
|
|
decayFactor = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::GetAngleDegrees();
|
|
this->_orbitAngle = decayFactor;
|
|
}
|
|
local_93c = (void *)0x42b40000;
|
|
if (0 < this->_waitFrames) {
|
|
local_93c = (void *)0x41f00000;
|
|
}
|
|
pVVar9 = Vector::FromAngle(&orbitDir,this->_orbitAngle);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_e98,GHIDRA_CAST<float *>(&local_93c));
|
|
(GHIDRA_CAST<Vector *>((&local_9bc)))->Vector::__add(&local_da8,pVVar9);
|
|
local_a3c = (void *)0x40a00000;
|
|
pvVar20 = (void *)this->_orbitRadius;
|
|
Math::abs();
|
|
local_a40 = pvVar20;
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::max<float>();
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>(*puVar13);
|
|
local_a44 = (void *)0x40000000;
|
|
Vector::operator_mul(&local_ca0,GHIDRA_CAST<float *>(&local_a44),&local_c98);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__add(&local_ea0,&local_ca0);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_da8)))->Vector::__sub(&local_ea8,pVVar9);
|
|
local_a48 = (void *)0x3f000000;
|
|
Vector::operator_mul(&local_b7c,GHIDRA_CAST<float *>(&local_a48),pVVar9);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&local_b7c)))->Vector)::Length();
|
|
if ((float)local_8ac < (float)local_87c) {
|
|
(GHIDRA_CAST<Vector *>((&local_b7c)))->Vector::Resize((float)local_8ac);
|
|
}
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_ca0)))->Vector::__add(&local_eb0,&local_b7c);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__div(&local_eb8,&this->_friction);
|
|
(GHIDRA_CAST<Vector *>((&this->_velocity)))->Vector::operator_assign(pVVar9);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) =
|
|
GHIDRA_CAST<Room *>(normalize_angle_degrees)
|
|
((((this->_orbitRadius / (float)local_93c) * 180.0) / 3.1415927)
|
|
* this->_speedMultiplier + this->_orbitAngle);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_11;
|
|
this->_orbitAngle = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auVar31)) + 0x0)));
|
|
if (1 < this->_waitFrames) {
|
|
pVVar9 = Vector::FromAngle(&angleDir,(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auVar31)) + 0x0))));
|
|
auVar31 = ZEXT416(GHIDRA_UINT(this->_orbitRadius));
|
|
Math::abs();
|
|
local_a4c = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x66afed);
|
|
pVVar9 = Vector::operator_mul(&local_ec8,GHIDRA_CAST<float *>(&local_a4c),pVVar9);
|
|
pVVar14 = &this->_continueVelocity;
|
|
LAB_0066aff6:
|
|
(GHIDRA_CAST<Vector *>((pVVar14)))->Vector::operator_assign(pVVar9);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
bVar4 = is_not_familiar_spawned(this);
|
|
if ((bVar4 != 0) && (local_8a0 != GHIDRA_CAST<Room *>(0x0))) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8a0))))->Entity::Position(&entityPos5);
|
|
(GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__sub(&local_ce8,pVVar9);
|
|
local_92c = (void *)(GHIDRA_CAST<Vector *>((&local_ce8)))->Vector::Length();
|
|
if ((float)local_92c == zeroConst) {
|
|
local_92c = (void *)0x3dcccccd;
|
|
}
|
|
(GHIDRA_CAST<Vector *>((&local_ce8)))->Vector::__div(&local_b64,GHIDRA_CAST<float *>(&local_92c));
|
|
local_a2c = (void *)((100.0 - (float)local_92c) * 0.01);
|
|
(GHIDRA_CAST<Vector *>((&local_b5c)))->Vector::Vector(local_b64.y,-local_b64.x);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&local_b5c)))->Vector)::Dot(&this->_velocity);
|
|
auVar31 = ZEXT416(GHIDRA_UINT(zeroConst));
|
|
if ((float)local_87c < zeroConst) {
|
|
local_a24 = &DAT_bf800000;
|
|
(GHIDRA_CAST<Vector *>((&local_b5c)))->Vector::operator_mul_assign(GHIDRA_CAST<float *>(&local_a24));
|
|
}
|
|
local_a28 = (void *)0x3f800000;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_b5c)))->Vector::__mul(&local_1680,GHIDRA_CAST<float *>(&local_a28));
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&local_b64)))->Vector::__mul(&local_1688,GHIDRA_CAST<float *>(&local_a2c));
|
|
bVar4 = 0;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x66a724);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_1690,pVVar14);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddVelocity_divided(pVVar9,bVar4);
|
|
}
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and(&fetusMask,&this->_tearFlags,&g_tearFlagFetus);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
pBVar6 = BitSet128::operator_and(&homingMask,&this->_tearFlags,&g_tearFlagHoming);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&turnHorizontalMask,&this->_tearFlags,&g_tearFlagTurnHorizontal);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) goto LAB_0066d04f;
|
|
}
|
|
if ((GHIDRA_CAST<Entity *>(this->_target) != GHIDRA_CAST<Entity *>(0x0)) &&
|
|
(bVar4 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(&this->_hitList))))->EntityList::HitListContains(GHIDRA_CAST<Entity *>(this->_target)),
|
|
bVar4 != 0)) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::SetTarget(GHIDRA_CAST<Entity *>(0x0));
|
|
}
|
|
if (this->_target == 0) {
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::IsFrame(4,this->_index);
|
|
if (bVar4 != 0) {
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = ZEXT812(0x4e6e6b28);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0xc))) = 0;
|
|
local_8a0 = GHIDRA_CAST<Room *>(0x0);
|
|
local_898 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
local_c30 = (void *)0x40a00000;
|
|
pVVar9 = Vector::operator_mul(&local_1030,GHIDRA_CAST<float *>(&local_c30),&this->_velocity);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__add(&local_1038,pVVar9);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x66cbd8);
|
|
EntityList::QueryRadius(entityList,GHIDRA_CAST<EntityList_EL *>(aheadQuery),pVVar9,128.0,8);
|
|
ehState = 3;
|
|
local_888 = GHIDRA_CAST<Room *>(0x0);
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(aheadQuery))))->EntityList::Size();
|
|
if (iVar7 != 0) {
|
|
do {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
room = GHIDRA_CAST<Room *>(*puVar13);
|
|
local_89c = room;
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::IsVulnerableEnemy(GHIDRA_CAST<Entity *>(0x0));
|
|
if (bVar4 != 0) {
|
|
if (GHIDRA_CAST<Entity *>(this->_spawnerEntity) != GHIDRA_CAST<Entity *>(0x0)) {
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this->_spawnerEntity))))->Entity::IsDescendantOf(GHIDRA_CAST<Entity *>(room));
|
|
if (bVar4 != 0) goto LAB_0066cdbc;
|
|
}
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::HasEntityFlags(0x20000010);
|
|
if (bVar4 == 0) {
|
|
bVar4 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(&this->_hitList))))->EntityList::HitListContains(GHIDRA_CAST<Entity *>(room));
|
|
if (bVar4 == 0) {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(*puVar13))))->Entity::is_player();
|
|
if (bVar4 != 0) {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
bVar4 = (GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(*puVar13))))->Entity_Player::IsInvisible();
|
|
if (bVar4 != 0) goto LAB_0066cdbc;
|
|
}
|
|
iVar7 = Isaac::Random(2);
|
|
if (iVar7 != 0) {
|
|
if (this->_entityGridCollisionClass == 4) {
|
|
room = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_89c))))->Entity::Position(&entityPos6);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x0);
|
|
bVar4 = (GHIDRA_CAST<Room *>((room)))->Room::CheckLine(&this->_pos,pVVar9,3,0,0,0,GHIDRA_CAST<Vector *>(0x0));
|
|
if (bVar4 == 0) goto LAB_0066cdbc;
|
|
}
|
|
local_c2c = (void *)0x40a00000;
|
|
pVVar9 = Vector::operator_mul(&local_1048,GHIDRA_CAST<float *>(&local_c2c),&this->_velocity);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__add(&local_1050,pVVar9);
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_89c))))->Entity::Position(&entityPos7);
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Distance(pVVar14);
|
|
decayFactor = random_float();
|
|
pRVar28 = local_89c;
|
|
local_87c = GHIDRA_CAST<Room *>((decayFactor * 128.0));
|
|
local_8d0 = GHIDRA_CAST<Room *>(((float)local_87c + (float)local_8ac));
|
|
bVar4 = EntityList::HitListContains
|
|
(GHIDRA_CAST<EntityList *>(&this->_hitList),GHIDRA_CAST<Entity *>(local_89c));
|
|
room = local_8d0;
|
|
if (bVar4 != 0) {
|
|
room = GHIDRA_CAST<Room *>(((float)local_8d0 + 1000.0));
|
|
}
|
|
auVar31 = ZEXT416(room);
|
|
if ((float)room < (float)local_898) {
|
|
local_8a0 = pRVar28;
|
|
local_898 = room;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
LAB_0066cdbc:
|
|
local_888 = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_888)) + 0x1))));
|
|
room = GHIDRA_CAST<Room *>((GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(aheadQuery))))->EntityList)::Size();
|
|
} while (local_888 < room);
|
|
}
|
|
Game::GetField26614(g_game);
|
|
cVar5 = DeathmatchManager::is_active();
|
|
if (cVar5 != '\0') {
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(&DAT_00000043);
|
|
EntityList::QuerySublist
|
|
(entityList,GHIDRA_CAST<EntityList_EL *>(deathmatchFamiliarQuery),3,0x43,-1,1,0);
|
|
room = GHIDRA_CAST<Room *>(0x0);
|
|
ehState = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(ehState)) + 0x1))),4);
|
|
local_888 = GHIDRA_CAST<Room *>(0x0);
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(deathmatchFamiliarQuery))))->EntityList::Size();
|
|
if (iVar7 != 0) {
|
|
do {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(*puVar13))))->Entity::IsDescendantOf(GHIDRA_CAST<Entity *>(this->_spawnerEntity));
|
|
if (bVar4 == 0) {
|
|
local_c28 = (void *)0x40a00000;
|
|
pVVar9 = Vector::operator_mul(&local_1060,GHIDRA_CAST<float *>(&local_c28),&this->_velocity);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__add(&local_1068,pVVar9);
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(*puVar13))))->Entity::Position(&entityPos8);
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Distance(pVVar14);
|
|
decayFactor = random_float();
|
|
room = local_888;
|
|
local_87c = GHIDRA_CAST<Room *>((decayFactor * 128.0));
|
|
local_8d0 = GHIDRA_CAST<Room *>(((float)local_87c + (float)local_8ac));
|
|
auVar31 = ZEXT416(local_898);
|
|
if ((float)local_8d0 < (float)local_898) {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
auVar31 = ZEXT416(local_8d0);
|
|
local_898 = local_8d0;
|
|
local_8a0 = GHIDRA_CAST<Room *>(*puVar13);
|
|
}
|
|
}
|
|
room = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((room)) + 0x1))));
|
|
local_888 = room;
|
|
puVar19 = GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(deathmatchFamiliarQuery))))->EntityList)::Size();
|
|
} while (room < puVar19);
|
|
}
|
|
ehState = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(ehState)) + 0x1))),3);
|
|
(GHIDRA_CAST<EntityList_Query *>((deathmatchFamiliarQuery)))->EntityList_Query::~EntityList_Query();
|
|
}
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::SetTarget(GHIDRA_CAST<Entity *>(local_8a0));
|
|
ehState = -1;
|
|
(GHIDRA_CAST<EntityList_Query *>((aheadQuery)))->EntityList_Query::~EntityList_Query();
|
|
}
|
|
if (this->_target == 0) goto LAB_0066d04f;
|
|
}
|
|
pBVar6 = BitSet128::operator_and(&homingMask2,&this->_tearFlags,&g_tearFlagHoming);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this->_target))))->Entity::Position(&targetPos);
|
|
(GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__sub(&fromTarget,pVVar9);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&fromTarget)))->Vector::Normalized(&direction4);
|
|
pVVar9 = Vector::operator_mul(&local_1088,&this->_speedMultiplier,pVVar9);
|
|
local_c24 = (void *)0x40000000;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_1090,GHIDRA_CAST<float *>(&local_c24));
|
|
(GHIDRA_CAST<Vector *>((&this->_velocity)))->Vector::operator__(pVVar9);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>(Math)::timescale_factor(this->_homingFriction,this->_speedMultiplier);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_14;
|
|
local_c20 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
(GHIDRA_CAST<Vector *>((&this->_velocity)))->Vector::operator_mul_assign(GHIDRA_CAST<float *>(&local_c20));
|
|
}
|
|
}
|
|
else {
|
|
local_88c = GHIDRA_CAST<Room *>(GetRootPlayer(this));
|
|
local_8c8 = &this->_sprite;
|
|
_empty_check_0x34();
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar32)) + 0x4))) = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4)));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar32)) + 0x0))) = GHIDRA_CAST<BitSet128 *>((((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) * 360.0) / (float)local_8fc + 90.0));
|
|
local_8c4 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar32)) + 0x0)));
|
|
if (local_88c == GHIDRA_CAST<Room *>(0x0)) {
|
|
local_8c0 = GHIDRA_CAST<Room *>(zeroConst);
|
|
}
|
|
else {
|
|
FUN_00665c00();
|
|
local_8c0 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar32)) + 0x0)));
|
|
}
|
|
local_8a1 = '\0';
|
|
pBVar6 = BitSet128::operator_and(&fetusTechxMask,&this->_tearFlags,&g_tearFlagFetusTechx);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
iVar7 = EntityPtr::Ref();
|
|
if ((iVar7 == 0) && (this->_dead == 0)) {
|
|
uVar10 = Random();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(local_88c);
|
|
local_8a0 = GHIDRA_CAST<Room *>(Game)::SpawnEx(g_game,7,2,&this->_pos,&g_vectorZero,GHIDRA_CAST<Entity *>(local_88c),3
|
|
,uVar10,1);
|
|
if (local_8a0 == GHIDRA_CAST<Room *>(0x0)) {
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagFetusTechx)))->BitSet128::__bnot(¬FetusTechx);
|
|
FUN_005cd430();
|
|
}
|
|
else {
|
|
if (local_88c != GHIDRA_CAST<Room *>(0x0)) {
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(local_8a0) + 0x3c);
|
|
(GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(local_88c))))->Entity_Player::get_laser_color_copy(&local_514);
|
|
(*pcVar1)();
|
|
}
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8a0))))->Entity::SetPositionOffset(&this->_posOffset);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8a0))))->Entity::SetParent(GHIDRA_CAST<Entity *>(this));
|
|
set_field_358(local_8a0,3000.0);
|
|
pBVar8 = &g_tearFlagFetus;
|
|
pBVar6 = BitSet128::operator_or(&withShrink,&g_tearFlagGrow,&g_tearFlagShrink);
|
|
pBVar6 = BitSet128::operator_or(&orResult5,pBVar6,pBVar8);
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::__bnot(¬Result2);
|
|
pBVar6 = BitSet128::operator_and(&andResult10,&this->_tearFlags,pBVar6);
|
|
in_stack_ffffd9fc = *GHIDRA_CAST<Vector **>(&pBVar6->_l);
|
|
FUN_00456830();
|
|
(**(code **)(*GHIDRA_CAST<int *>(local_8a0) + 0x40))();
|
|
(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(local_8a0))))->Entity_Laser::SetTimeout();
|
|
(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(local_8a0))))->Entity_Laser::set_scale(this->_fScale * (float)local_8ec);
|
|
FUN_0060ce80();
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8a0))))->Entity::SetSpawnerEntity(GHIDRA_CAST<Entity *>(local_88c));
|
|
(**(code **)(*GHIDRA_CAST<int *>(local_8a0) + 0xc))();
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4a4)))))))->EntityPtr::Set(GHIDRA_CAST<Entity *>(local_8a0));
|
|
}
|
|
}
|
|
iVar7 = EntityPtr::Ref();
|
|
if (iVar7 != 0) {
|
|
laser = GHIDRA_CAST<Entity_Laser *>(EntityPtr)::Ref();
|
|
(GHIDRA_CAST<Entity_Laser *>((laser)))->Entity_Laser::set_scale(this->_fScale * (float)local_8ec);
|
|
EntityPtr::Ref();
|
|
FUN_0060ce80();
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and(&fetusSwordMask,&this->_tearFlags,&g_tearFlagFetusSword);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
pBVar6 = BitSet128::operator_and(&fetusKnifeMask,&this->_tearFlags,&g_tearFlagFetusKnife);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
pBVar6 = BitSet128::operator_and(&fetusBoneMask,&this->_tearFlags,&g_tearFlagFetusBone);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
local_87c = GHIDRA_CAST<Room *>(&this->_attachedEffect);
|
|
iVar7 = EntityPtr::Ref();
|
|
if ((iVar7 == 0) && (this->_dead == 0)) {
|
|
uVar10 = Random();
|
|
in_stack_ffffd9fc = &g_vectorZero;
|
|
room = GHIDRA_CAST<Room *>(Game)::Spawn(g_game,8,1,&this->_pos,&g_vectorZero,GHIDRA_CAST<Entity *>(local_88c),0,
|
|
uVar10);
|
|
local_8b4 = room;
|
|
if (room != GHIDRA_CAST<Room *>(0x0)) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetParent(GHIDRA_CAST<Entity *>(this));
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::Color();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
pBVar6 = BitSet128::operator_or(&withShrink2,&g_tearFlagGrow,&g_tearFlagShrink);
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::__bnot(¬Result3);
|
|
BitSet128::operator_and(&andResult11,&this->_tearFlags,pBVar6);
|
|
room = local_8b4;
|
|
FUN_005cd5c0();
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x40))();
|
|
FUN_0060cf20();
|
|
local_a68 = (void *)(this->_fScale * (float)pointSixConst);
|
|
pVVar9 = Vector::operator_mul(&uniformScale5,GHIDRA_CAST<float *>(&local_a68),&g_vectorOne);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetSpriteScale(pVVar9);
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0xc))();
|
|
FUN_00651a10();
|
|
}
|
|
}
|
|
iVar7 = EntityPtr::Ref();
|
|
if (iVar7 != 0) {
|
|
pEVar11 = GHIDRA_CAST<Entity *>(EntityPtr)::Ref();
|
|
this = tear;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_f30)))->Vector::Vector(zeroConst,6.0);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_f38,&this->_fScale);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&this->_posOffset)))->Vector::__add(&local_f40,pVVar9);
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::SetPositionOffset(pVVar9);
|
|
EntityPtr::Ref();
|
|
FUN_005b15d0();
|
|
EntityPtr::Ref();
|
|
cVar5 = FUN_00665ba0();
|
|
if (cVar5 == '\0') {
|
|
Vector::FromAngle(&facingDir,(float)local_8c4);
|
|
if (GHIDRA_CAST<Entity *>(this->_target) != GHIDRA_CAST<Entity *>(0x0)) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this->_target))))->Entity::Position(&targetPos2);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&local_f50,&this->_pos);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::Normalized(&direction5);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Dot(&facingDir);
|
|
if (0.1 < (float)local_87c) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this->_target))))->Entity::Position(&targetPos3);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Distance(&this->_pos);
|
|
if ((float)local_87c < this->_fScale * 50.0) {
|
|
pEVar11 = GHIDRA_CAST<Entity *>(EntityPtr)::Ref();
|
|
pfVar15 = GHIDRA_CAST<float *>((GHIDRA_CAST<Entity *>((pEVar11)))->Entity)::SpriteScale();
|
|
local_a70 = (void *)0x3f000000;
|
|
local_a6c = (void *)(oneConst / (*pfVar15 * halfConst + halfConst));
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::max<float>();
|
|
local_87c = GHIDRA_CAST<Room *>(*puVar13);
|
|
decayFactor = random_float();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xfc);
|
|
SoundEffects::PlayWithFartOverride
|
|
(0xfc,oneConst,1,0,(decayFactor * 0.2 + 0.9) * (float)local_87c);
|
|
EntityPtr::Ref();
|
|
FUN_00665bc0();
|
|
knife = GHIDRA_CAST<Entity_Knife *>(EntityPtr)::Ref();
|
|
(GHIDRA_CAST<Entity_Knife *>((knife)))->Entity_Knife::SetAttackAnimation();
|
|
local_8a1 = '\x01';
|
|
goto LAB_0066b8aa;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
local_8a1 = '\x01';
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
local_87c = GHIDRA_CAST<Room *>(&this->_attachedEffect);
|
|
iVar7 = EntityPtr::Ref();
|
|
if ((iVar7 == 0) && (this->_dead == 0)) {
|
|
uVar10 = Random();
|
|
in_stack_ffffd9fc = &g_vectorZero;
|
|
room = GHIDRA_CAST<Room *>(Game)::Spawn(g_game,8,0,&this->_pos,&g_vectorZero,GHIDRA_CAST<Entity *>(local_88c),0,
|
|
uVar10);
|
|
local_8b4 = room;
|
|
if (room != GHIDRA_CAST<Room *>(0x0)) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetParent(GHIDRA_CAST<Entity *>(this));
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::Color();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
pBVar6 = BitSet128::operator_or(&withShrink3,&g_tearFlagGrow,&g_tearFlagShrink);
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::__bnot(¬Result4);
|
|
BitSet128::operator_and(&andResult12,&this->_tearFlags,pBVar6);
|
|
room = local_8b4;
|
|
FUN_005cd5c0();
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x40))();
|
|
FUN_0060cf20();
|
|
local_a60 = (void *)(this->_fScale * halfConst);
|
|
pVVar9 = Vector::operator_mul(&uniformScale6,GHIDRA_CAST<float *>(&local_a60),&g_vectorOne);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetSpriteScale(pVVar9);
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0xc))();
|
|
FUN_00651a10();
|
|
}
|
|
}
|
|
iVar7 = EntityPtr::Ref();
|
|
if (iVar7 != 0) {
|
|
piVar12 = GHIDRA_CAST<int *>(EntityPtr)::Ref();
|
|
(**(code **)(*piVar12 + 0x40))();
|
|
pEVar11 = GHIDRA_CAST<Entity *>(EntityPtr)::Ref();
|
|
local_a64 = (void *)(this->_fScale * halfConst);
|
|
pVVar9 = Vector::operator_mul(&uniformScale7,GHIDRA_CAST<float *>(&local_a64),&g_vectorOne);
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::SetSpriteScale(pVVar9);
|
|
pEVar11 = GHIDRA_CAST<Entity *>(EntityPtr)::Ref();
|
|
this = tear;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_f10)))->Vector::Vector(zeroConst,4.0);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_f18,&this->_fScale);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&this->_posOffset)))->Vector::__add(&local_f20,pVVar9);
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::SetPositionOffset(pVVar9);
|
|
EntityPtr::Ref();
|
|
FUN_005b15d0();
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
local_87c = GHIDRA_CAST<Room *>(&this->_attachedEffect);
|
|
iVar7 = EntityPtr::Ref();
|
|
if ((iVar7 == 0) && (this->_dead == 0)) {
|
|
uVar10 = 10;
|
|
pBVar6 = BitSet128::operator_and(&fetusTechMask,&this->_tearFlags,&g_tearFlagFetusTech);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
uVar10 = 0xb;
|
|
}
|
|
uVar18 = Random();
|
|
in_stack_ffffd9fc = &g_vectorZero;
|
|
room = GHIDRA_CAST<Room *>(Game)::Spawn(g_game,8,uVar10,&this->_pos,&g_vectorZero,GHIDRA_CAST<Entity *>(local_88c),0,
|
|
uVar18);
|
|
local_8b4 = room;
|
|
if (room == GHIDRA_CAST<Room *>(0x0)) {
|
|
KAGE_LogMessage(8,GHIDRA_CAST<uint8_t *>("BAD THINGS! \n"));
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetParent(GHIDRA_CAST<Entity *>(this));
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::Color();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
pBVar6 = BitSet128::operator_or(&withShrink4,&g_tearFlagGrow,&g_tearFlagShrink);
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::__bnot(¬Result5);
|
|
BitSet128::operator_and(&andResult13,&this->_tearFlags,pBVar6);
|
|
room = local_8b4;
|
|
FUN_005cd5c0();
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x40))();
|
|
FUN_0060cf20();
|
|
local_a50 = (void *)(this->_fScale * (float)pointSixConst);
|
|
pVVar9 = Vector::operator_mul(&uniformScale8,GHIDRA_CAST<float *>(&local_a50),&g_vectorOne);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetSpriteScale(pVVar9);
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0xc))();
|
|
FUN_00651a10();
|
|
EntityPtr::Ref();
|
|
FUN_005b15d0();
|
|
}
|
|
}
|
|
iVar7 = EntityPtr::Ref();
|
|
if (iVar7 != 0) {
|
|
piVar12 = GHIDRA_CAST<int *>(EntityPtr)::Ref();
|
|
(**(code **)(*piVar12 + 0x40))();
|
|
pEVar11 = GHIDRA_CAST<Entity *>(EntityPtr)::Ref();
|
|
local_a54 = (void *)(this->_fScale * (float)pointSixConst);
|
|
pVVar9 = Vector::operator_mul(&uniformScale9,GHIDRA_CAST<float *>(&local_a54),&g_vectorOne);
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::SetSpriteScale(pVVar9);
|
|
pEVar11 = GHIDRA_CAST<Entity *>(EntityPtr)::Ref();
|
|
spawnedTear = tear;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_ee0)))->Vector::Vector(zeroConst,6.0);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_ee8,&spawnedTear->_fScale);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&spawnedTear->_posOffset)))->Vector::__add(&local_ef0,pVVar9);
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::SetPositionOffset(pVVar9);
|
|
pBVar6 = local_8c4;
|
|
Vector::FromAngle(&angleDir2,(float)local_8c4);
|
|
EntityPtr::Ref();
|
|
FUN_0060ccf0();
|
|
if ((float)pBVar6 <= 1.1) {
|
|
EntityPtr::Ref();
|
|
cVar5 = FUN_00665bb0();
|
|
if (cVar5 == '\0') {
|
|
EntityPtr::Ref();
|
|
cVar5 = FUN_00665ba0();
|
|
if (cVar5 == '\0') {
|
|
pEVar11 = GHIDRA_CAST<Entity *>(EntityPtr)::Ref();
|
|
pfVar15 = GHIDRA_CAST<float *>((GHIDRA_CAST<Entity *>((pEVar11)))->Entity)::SpriteScale();
|
|
local_a5c = (void *)0x3f000000;
|
|
local_a58 = (void *)(oneConst / (*pfVar15 * halfConst + halfConst));
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::max<float>();
|
|
local_87c = GHIDRA_CAST<Room *>(*puVar13);
|
|
decayFactor = random_float();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xfc);
|
|
SoundEffects::PlayWithFartOverride
|
|
(0xfc,oneConst,1,0,(decayFactor * 0.2 + 0.9) * (float)local_87c);
|
|
EntityPtr::Ref();
|
|
FUN_00665bc0();
|
|
knife = GHIDRA_CAST<Entity_Knife *>(EntityPtr)::Ref();
|
|
(GHIDRA_CAST<Entity_Knife *>((knife)))->Entity_Knife::SetAttackAnimation();
|
|
}
|
|
}
|
|
else {
|
|
EntityPtr::Ref();
|
|
EntityPtr::Ref();
|
|
FUN_0060ccf0();
|
|
FUN_00665be0();
|
|
EntityPtr::Ref();
|
|
EntityPtr::Ref();
|
|
FUN_0060ccf0();
|
|
FUN_00665bf0();
|
|
}
|
|
}
|
|
else {
|
|
knife = GHIDRA_CAST<Entity_Knife *>(EntityPtr)::Ref();
|
|
(GHIDRA_CAST<Entity_Knife *>((knife)))->Entity_Knife::SpinAttack(1,0);
|
|
iVar7 = EntityPtr::Ref();
|
|
if (iVar7 != 0) {
|
|
EntityPtr::Ref();
|
|
FUN_00665be0();
|
|
EntityPtr::Ref();
|
|
FUN_00665bf0();
|
|
}
|
|
}
|
|
iVar7 = EntityPtr::Ref();
|
|
if (iVar7 != 0) {
|
|
knife = GHIDRA_CAST<Entity_Knife *>(EntityPtr)::Ref();
|
|
cVar5 = (GHIDRA_CAST<Entity_Knife *>((knife)))->Entity_Knife::IsFlying();
|
|
if (cVar5 == '\0') {
|
|
EntityPtr::Ref();
|
|
cVar5 = FUN_00665ba0();
|
|
if (cVar5 == '\0') {
|
|
EntityPtr::Ref();
|
|
cVar5 = FUN_00665bb0();
|
|
if (cVar5 == '\0') {
|
|
piVar12 = GHIDRA_CAST<int *>(EntityPtr)::Ref();
|
|
(**(code **)(*piVar12 + 0x28))();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
iVar7 = EntityPtr::Ref();
|
|
if (iVar7 != 0) {
|
|
pEVar11 = GHIDRA_CAST<Entity *>(EntityPtr)::Ref();
|
|
cVar5 = (GHIDRA_CAST<Entity *>((pEVar11)))->Entity::Exists();
|
|
if (cVar5 != '\0') {
|
|
_MaxCount = 4;
|
|
uVar37 = 0xe8;
|
|
uVar38 = 2;
|
|
uVar39 = 0xb6;
|
|
pEVar11 = GHIDRA_CAST<Entity *>(EntityPtr)::Ref();
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::GetSprite();
|
|
Config::GetPillEffects();
|
|
_Str1 = GHIDRA_CAST<char *>(_string_holder_c_str());
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x66b80b);
|
|
iVar7 = strncmp(_Str1,GHIDRA_CAST<char *>(CONCAT22(uVar39,CONCAT11(uVar38,uVar37))),_MaxCount);
|
|
if (iVar7 == 0) {
|
|
pEVar11 = GHIDRA_CAST<Entity *>(EntityPtr)::Ref();
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::GetNullOffset(&nullOffset,&DAT_00b1d3b0);
|
|
animState = GHIDRA_CAST<AnimationState *>(Config)::GetPillEffects();
|
|
iVar7 = AnimationState::GetAnimationLength(animState);
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((360.0 / (float)iVar7));
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&nullOffset)))->Vector)::GetAngleDegrees();
|
|
normalize_angle_degrees((float)local_87c);
|
|
FUN_0040a740();
|
|
}
|
|
else {
|
|
EntityPtr::Ref();
|
|
FUN_005b15d0();
|
|
}
|
|
}
|
|
}
|
|
this = tear;
|
|
}
|
|
}
|
|
LAB_0066b8aa:
|
|
pBVar6 = BitSet128::operator_and(&fetusTechMask2,&this->_tearFlags,&g_tearFlagFetusTech);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4a8)))) < 1) {
|
|
Vector::FromAngle(&fetusTechFacing,(float)local_8c4);
|
|
local_8b4 = GHIDRA_CAST<Room *>(0x0);
|
|
local_898 = GHIDRA_CAST<Room *>(&DAT_bf800000);
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x66bfad);
|
|
EntityList::QueryRadius(entityList,GHIDRA_CAST<EntityList_EL *>(fetusTechQuery),&this->_pos,140.0,8);
|
|
ehState = 1;
|
|
local_89c = GHIDRA_CAST<Room *>(0x0);
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(fetusTechQuery))))->EntityList::Size();
|
|
if (iVar7 != 0) {
|
|
do {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
local_888 = GHIDRA_CAST<Room *>(*puVar13);
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_888))))->Entity::IsVulnerableEnemy(GHIDRA_CAST<Entity *>(0x0));
|
|
if (bVar4 != 0) {
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_888))))->Entity::HasEntityFlags(0x20000010);
|
|
if (bVar4 == 0) {
|
|
if (this->_entityGridCollisionClass == 4) {
|
|
room = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_888))))->Entity::Position(&entityPos9);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x0);
|
|
bVar4 = (GHIDRA_CAST<Room *>((room)))->Room::CheckLine(&this->_pos,pVVar9,3,0,0,0,GHIDRA_CAST<Vector *>(0x0));
|
|
if (bVar4 == 0) goto LAB_0066c0c5;
|
|
}
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_888))))->Entity::Position(&entityPos10);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&local_f78,&this->_pos);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::Normalized(&direction6);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Dot(&fetusTechFacing);
|
|
if ((float)local_898 < (float)local_87c) {
|
|
local_8b4 = local_888;
|
|
local_898 = local_87c;
|
|
}
|
|
}
|
|
}
|
|
LAB_0066c0c5:
|
|
local_89c = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_89c)) + 0x1))));
|
|
room = GHIDRA_CAST<Room *>((GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(fetusTechQuery))))->EntityList)::Size();
|
|
} while (local_89c < room);
|
|
if ((0.85 < (float)local_898) && (local_8b4 != GHIDRA_CAST<Room *>(0x0))) {
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4a8)))) = 8;
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8b4))))->Entity::Position(&entityPos11);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&local_f90,&this->_pos);
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::Normalized(&fetusTechAimDir);
|
|
bVar4 = 1;
|
|
uVar37 = SUB41(local_88c,0);
|
|
uVar38 = (uint8_t)(GHIDRA_UINT(local_88c) >> 8);
|
|
uVar39 = (uint16_t)(GHIDRA_UINT(local_88c) >> 0x10);
|
|
pVVar9 = &this->_posOffset;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x3);
|
|
decayFactor = (GHIDRA_CAST<Vector *>((&fetusTechAimDir)))->Vector::GetAngleDegrees();
|
|
room = GHIDRA_CAST<Room *>(Entity_Laser)::ShootAngle
|
|
(2,&this->_pos,decayFactor,GHIDRA_INT(in_stack_ffffd9fc),pVVar9,
|
|
GHIDRA_CAST<Entity *>(CONCAT22(uVar39,CONCAT11(uVar38,uVar37))),bVar4);
|
|
local_888 = room;
|
|
if (room != GHIDRA_CAST<Room *>(0x0)) {
|
|
(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(room))))->Entity_Laser::SetOneHit();
|
|
FUN_00435f70();
|
|
pBVar6 = BitSet128::operator_or(&withShrink5,&g_tearFlagGrow,&g_tearFlagShrink);
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::__bnot(¬Result6);
|
|
pBVar6 = BitSet128::operator_and(&andResult14,&this->_tearFlags,pBVar6);
|
|
in_stack_ffffd9fc = *GHIDRA_CAST<Vector **>(&pBVar6->_l);
|
|
FUN_00456830();
|
|
local_a78 = (void *)0x1;
|
|
local_a74 = GHIDRA_CAST<Room *>(GHIDRA_INT((20.0 - (float)local_8c0)));
|
|
local_87c = local_a74;
|
|
piVar12 = GHIDRA_CAST<int *>(std)::max<int>();
|
|
iVar7 = Isaac::Random(*piVar12);
|
|
if (iVar7 != 0) {
|
|
pBVar8 = &g_tearFlagSpore;
|
|
pBVar6 = BitSet128::operator_or(&withBooger,&g_tearFlagSticky,&g_tearFlagBooger);
|
|
pBVar6 = BitSet128::operator_or(&orResult6,pBVar6,pBVar8);
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::__bnot(¬Result7);
|
|
pBVar8 = TearFlags(GHIDRA_CAST<Entity_Tear *>(local_888),&tearFlagsCopy2);
|
|
pBVar6 = BitSet128::operator_and(&andResult15,pBVar8,pBVar6);
|
|
room = local_888;
|
|
in_stack_ffffd9fc = *GHIDRA_CAST<Vector **>(&pBVar6->_l);
|
|
FUN_00456830();
|
|
}
|
|
local_a7c = local_87c;
|
|
local_a80 = (void *)0x1;
|
|
piVar12 = GHIDRA_CAST<int *>(std)::max<int>();
|
|
iVar7 = Isaac::Random(*piVar12);
|
|
if (iVar7 != 0) {
|
|
pBVar6 = BitSet128::operator_or(&withAbsorb,&g_tearFlagPop,&g_tearFlagAbsorb);
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::__bnot(¬Result8);
|
|
pBVar8 = TearFlags(GHIDRA_CAST<Entity_Tear *>(local_888),&tearFlagsCopy3);
|
|
pBVar6 = BitSet128::operator_and(&andResult16,pBVar8,pBVar6);
|
|
room = local_888;
|
|
in_stack_ffffd9fc = *GHIDRA_CAST<Vector **>(&pBVar6->_l);
|
|
FUN_00456830();
|
|
}
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x40))();
|
|
if ((fetusTechAimDir.y < -0.5) || (fetusTechAimDir.x < -0.5)) {
|
|
uVar37 = 0;
|
|
uVar39 = 0xc120;
|
|
}
|
|
else {
|
|
uVar37 = 0x80;
|
|
uVar39 = 0x453b;
|
|
}
|
|
set_field_358(room,(float)(GHIDRA_UINT(CONCAT21(uVar39,uVar37)) << 8));
|
|
if (local_88c != GHIDRA_CAST<Room *>(0x0)) {
|
|
Entity_Player::get_laser_color_copy
|
|
(GHIDRA_CAST<Entity_Player *>(local_88c),GHIDRA_CAST<ColorMod *>(local_1d8));
|
|
playerEffects = GHIDRA_CAST<Color *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
decayFactor = (GHIDRA_CAST<Color *>((playerEffects)))->Color::A();
|
|
Font::SetLineHeightModifier(GHIDRA_CAST<Font *>(local_1d8),decayFactor);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xff);
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x3c))();
|
|
}
|
|
(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(room))))->Entity_Laser::SetMaxDistance(140.0);
|
|
(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(room))))->Entity_Laser::set_scale(this->_fScale * (float)local_8ec);
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0xc))();
|
|
}
|
|
}
|
|
}
|
|
ehState = -1;
|
|
(GHIDRA_CAST<EntityList_Query *>((fetusTechQuery)))->EntityList_Query::~EntityList_Query();
|
|
}
|
|
else {
|
|
*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4a8)))) = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4a8)))) + -1;
|
|
}
|
|
}
|
|
decayFactor = Math::clamp(zeroConst,2.0,this->_updateTime / 10.0);
|
|
decayFactor = pow(oneConst - decayFactor,2.0);
|
|
this->_friction = decayFactor * 0.1 + 0.9;
|
|
local_a84 = (void *)(this->_updateTime / 45.0);
|
|
local_a88 = (void *)0x3f800000;
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::min<float>();
|
|
local_898 = GHIDRA_CAST<Room *>(*puVar13);
|
|
auVar31 = ZEXT416(local_898);
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::IsFrame(8,this->_index);
|
|
if ((bVar4 != 0) && (this->_stickTarget == (void *)0x0)) {
|
|
(GHIDRA_CAST<msvc::vector *>((&this->_hitList)))->msvc::vector::clear(0);
|
|
}
|
|
if ((this->_target == 0) && (bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::IsFrame(4,this->_index), bVar4 != 0)
|
|
) {
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = ZEXT812(0x4e6e6b28);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0xc))) = 0;
|
|
local_888 = GHIDRA_CAST<Room *>(0x0);
|
|
local_8c0 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
local_b44 = (void *)0x40a00000;
|
|
pVVar9 = Vector::operator_mul(&local_f98,GHIDRA_CAST<float *>(&local_b44),&this->_velocity);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__add(&local_fa0,pVVar9);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x66c558);
|
|
EntityList::QueryRadius(entityList,GHIDRA_CAST<EntityList_EL *>(aheadQuery2),pVVar9,128.0,8);
|
|
ehState = 2;
|
|
local_8b4 = GHIDRA_CAST<Room *>(0x0);
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(aheadQuery2))))->EntityList::Size();
|
|
if (iVar7 != 0) {
|
|
do {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
room = GHIDRA_CAST<Room *>(*puVar13);
|
|
local_89c = room;
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::IsVulnerableEnemy(GHIDRA_CAST<Entity *>(0x0));
|
|
if (bVar4 != 0) {
|
|
if (GHIDRA_CAST<Entity *>(this->_spawnerEntity) != GHIDRA_CAST<Entity *>(0x0)) {
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this->_spawnerEntity))))->Entity::IsDescendantOf(GHIDRA_CAST<Entity *>(room));
|
|
if (bVar4 != 0) goto LAB_0066c6d8;
|
|
}
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::HasEntityFlags(0x20000010);
|
|
if (bVar4 == 0) {
|
|
iVar7 = Isaac::Random(2);
|
|
if (iVar7 != 0) {
|
|
if (this->_entityGridCollisionClass == 4) {
|
|
room = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_89c))))->Entity::Position(&entityPos12);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x0);
|
|
bVar4 = (GHIDRA_CAST<Room *>((room)))->Room::CheckLine(&this->_pos,pVVar9,3,0,0,0,GHIDRA_CAST<Vector *>(0x0));
|
|
if (bVar4 == 0) goto LAB_0066c6d8;
|
|
}
|
|
local_a8c = (void *)0x40a00000;
|
|
pVVar9 = Vector::operator_mul(&local_fb0,GHIDRA_CAST<float *>(&local_a8c),&this->_velocity);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__add(&local_fb8,pVVar9);
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_89c))))->Entity::Position(&entityPos13);
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Distance(pVVar14);
|
|
decayFactor = random_float();
|
|
local_87c = GHIDRA_CAST<Room *>((decayFactor * 128.0 + (float)local_8ac));
|
|
auVar31 = ZEXT416(local_87c);
|
|
if ((float)local_87c < (float)local_8c0) {
|
|
local_888 = local_89c;
|
|
local_8c0 = local_87c;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
LAB_0066c6d8:
|
|
puVar23 = &(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_8b4)) + 0x1)));
|
|
local_8b4 = GHIDRA_CAST<Room *>(puVar23);
|
|
puVar19 = GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(aheadQuery2))))->EntityList)::Size();
|
|
} while (puVar23 < puVar19);
|
|
}
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::SetTarget(GHIDRA_CAST<Entity *>(local_888));
|
|
ehState = -1;
|
|
(GHIDRA_CAST<EntityList_Query *>((aheadQuery2)))->EntityList_Query::~EntityList_Query();
|
|
}
|
|
if (GHIDRA_CAST<Entity *>(this->_target) != GHIDRA_CAST<Entity *>(0x0)) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this->_target))))->Entity::Position(&targetPos4);
|
|
(GHIDRA_CAST<Vector *>((&this->_pos)))->Vector::__sub(&fromTarget2,pVVar9);
|
|
pVVar14 = &this->_velocity;
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>(pVVar14);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&fromTarget2)))->Vector::Normalized(&direction7);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar14)))->Vector)::Dot(pVVar9);
|
|
local_c44 = (void *)(((float)local_87c * 0.1 + 1.35) * (float)local_898);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::Normalized(&direction8);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&fromTarget2)))->Vector::Normalized(&direction9);
|
|
decayFactor = (GHIDRA_CAST<Vector *>((&fromTarget2)))->Vector::Length();
|
|
local_a94 = (void *)0x0;
|
|
local_a90 = (void *)(0.08 - decayFactor * 0.0005);
|
|
decayFactor = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::Dot(pVVar14);
|
|
local_87c = GHIDRA_CAST<Room *>((0.92 - decayFactor * 0.05));
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
local_a98 = (void *)((float)local_87c + *pfVar15);
|
|
local_a9c = (void *)0x3f7ae148;
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::min<float>();
|
|
local_87c = GHIDRA_CAST<Room *>(*pfVar15);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&fromTarget2)))->Vector::Normalized(&direction10);
|
|
room = local_8d0;
|
|
pVVar9 = Vector::operator_mul(&local_ff0,GHIDRA_CAST<float *>(local_8d0),pVVar9);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_ff8,GHIDRA_CAST<float *>(&local_c44));
|
|
pEVar30 = local_8ac;
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>(local_8ac))))->Vector::operator__(pVVar9);
|
|
timescaleFactor = (void *)Math::timescale_factor((float)local_87c,*GHIDRA_CAST<float *>(room));
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>(pEVar30))))->Vector::operator_mul_assign(GHIDRA_CAST<float *>(×caleFactor));
|
|
local_89c = (void *)0x40000000;
|
|
pBVar6 = BitSet128::operator_and(&homingMask3,tearFlagsPtr,&g_tearFlagHoming);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
local_89c = (void *)0x41400000;
|
|
}
|
|
local_89c = GHIDRA_CAST<Room *>(((float)local_89c * *GHIDRA_CAST<float *>(room)));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&fromTarget2)))->Vector::__unm(&negated2);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::GetAngleDegrees();
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>(pEVar30))))->Vector)::GetAngleDegrees();
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>(approach_angle((float)local_8ac,(float)local_87c,(float)local_89c));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_12;
|
|
pVVar9 = Vector::FromAngle(&angleDir3,(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auVar31)) + 0x0))));
|
|
local_c3c = (void *)(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>(pEVar30))))->Vector::Length();
|
|
pVVar9 = Vector::operator_mul(&local_1010,GHIDRA_CAST<float *>(&local_c3c),pVVar9);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>(pEVar30))))->Vector::operator_assign(pVVar9);
|
|
if ((local_8a1 != '\0') &&
|
|
(bVar4 = (GHIDRA_CAST<Vector *>((&fromTarget2)))->Vector::operator_ne(&g_vectorZero), bVar4 != 0)) {
|
|
animState = GHIDRA_CAST<AnimationState *>(Config)::GetPillEffects();
|
|
iVar7 = AnimationState::GetAnimationLength(animState);
|
|
decayFactor = (float)iVar7;
|
|
local_8c0 = GHIDRA_CAST<Room *>((360.0 / decayFactor));
|
|
_empty_check_0x34();
|
|
pVVar9 = Vector::FromAngle(&angleDir4,decayFactor * (float)local_8c0);
|
|
local_c38 = (void *)(*GHIDRA_CAST<float *>(local_8d0) * (float)local_8fc);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x66ca43);
|
|
pVVar14 = Vector::operator_mul(&local_1020,GHIDRA_CAST<float *>(&local_c38),&fromTarget2);
|
|
fromTargetLenSq = (void *)(GHIDRA_CAST<Vector *>((&fromTarget2)))->Vector::LengthSquared();
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__div(&local_1028,GHIDRA_CAST<float *>(&fromTargetLenSq));
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_dc8,pVVar14);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&local_dc8)))->Vector)::GetAngleDegrees();
|
|
decayFactor = normalize_angle_degrees((float)local_87c);
|
|
if (decayFactor < zeroConst) {
|
|
decayFactor = decayFactor + 360.0;
|
|
}
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor / (float)local_8c0));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_13;
|
|
FUN_0040a740();
|
|
}
|
|
}
|
|
}
|
|
LAB_0066d04f:
|
|
pBVar6 = tearFlagsPtr;
|
|
pBVar8 = BitSet128::operator_and(&occultMask,tearFlagsPtr,&g_tearFlagOccult);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
LAB_0066d2f2:
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
}
|
|
else {
|
|
pBVar8 = BitSet128::operator_and(&ludovicoMask8,pBVar6,&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsZero();
|
|
if (bVar4 == 0) goto LAB_0066d2f2;
|
|
pBVar8 = BitSet128::operator_and(&fetusMask2,pBVar6,&g_tearFlagFetus);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsZero();
|
|
room = local_8d8;
|
|
if ((bVar4 == 0) || (local_8d8 == GHIDRA_CAST<Room *>(0x0))) goto LAB_0066d2f2;
|
|
(GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(local_8d8))))->Entity_Player::ControllerIndex();
|
|
aimDir.x = g_vectorZero.x;
|
|
aimDir.y = g_vectorZero.y;
|
|
pRVar28 = GHIDRA_CAST<Room *>(g_vectorZero.y);
|
|
iVar7 = FUN_007826c0();
|
|
if (iVar7 == 0) {
|
|
pVVar9 = GHIDRA_CAST<Vector *>(FUN_005cd7e0());
|
|
(GHIDRA_CAST<Vector *>((&aimDir)))->Vector::operator_assign(pVVar9);
|
|
(GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(room))))->Entity_Player::GetMouseAimTarget(&aimDir,0);
|
|
}
|
|
else {
|
|
pEVar11 = GHIDRA_CAST<Entity *>(FUN_007826c0());
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((pEVar11)))->Entity::Position(&entityPos14);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&local_10a0,tearPos);
|
|
local_c1c = (void *)0x41200000;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__div(&local_10a8,GHIDRA_CAST<float *>(&local_c1c));
|
|
(GHIDRA_CAST<Vector *>((&aimDir)))->Vector::operator_assign(pVVar9);
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&aimDir)))->Vector)::Length();
|
|
local_87c = pRVar28;
|
|
if (oneConst < (float)pRVar28) {
|
|
(GHIDRA_CAST<Vector *>((&aimDir)))->Vector::Normalize();
|
|
}
|
|
}
|
|
FUN_00436190();
|
|
local_914 = (void *)((float)pRVar28 * (float)local_890);
|
|
bVar4 = (GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(room))))->Entity_Player::HasWeaponType(8);
|
|
if (bVar4 == 0) {
|
|
pBVar8 = BitSet128::operator_and(&boomerangMask2,pBVar6,&g_tearFlagBoomerang);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
local_914 = (void *)((float)local_914 * halfConst);
|
|
}
|
|
}
|
|
else {
|
|
local_914 = (void *)((float)local_914 * (float)local_900);
|
|
}
|
|
auVar31 = ZEXT416(GHIDRA_UINT(aimDir.x));
|
|
if ((aimDir.x == zeroConst) && (auVar31 = ZEXT416(GHIDRA_UINT(aimDir.y)), aimDir.y == zeroConst)) {
|
|
pBVar8 = BitSet128::operator_and(&boomerangMask3,pBVar6,&g_tearFlagBoomerang);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
pBVar8 = BitSet128::operator_and(&homingMask4,pBVar6,&g_tearFlagHoming);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
if (bVar4 == 0) goto LAB_0066d2e6;
|
|
tear->_friction = 0.9;
|
|
}
|
|
else {
|
|
tear->_friction = 1.0;
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
}
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<Vector *>((&aimDir)))->Vector::Normalize();
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&aimDir)))->Vector::__mul(local_10b8,GHIDRA_CAST<float *>(&local_914));
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
(GHIDRA_CAST<Vector *>((&tear->_velocity)))->Vector::operator_add_assign(pVVar9);
|
|
LAB_0066d2e6:
|
|
room->_gridEntities[0xd2] = (void *)0x3f4ccccd;
|
|
}
|
|
}
|
|
pBVar8 = BitSet128::operator_and(&growMask,pBVar6,&g_tearFlagGrow);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pBVar6 = BitSet128::operator_and(&ludovicoMask9,pBVar6,&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
if (GHIDRA_INT(room->_gridEntities[0x105]) < 1) {
|
|
decayFactor = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridPaths + 0x20)))))->Vector::Length();
|
|
local_87c = GHIDRA_CAST<Room *>((decayFactor * 0.014));
|
|
room->_gridEntities[0xd9] = (void *)((float)local_87c + (float)room->_gridEntities[0xd9]);
|
|
pvVar20 = (void *)((float)room->_gridEntities[0x100] + 0.01);
|
|
auVar31 = ZEXT416(pvVar20);
|
|
room->_gridEntities[0x100] = pvVar20;
|
|
}
|
|
}
|
|
else {
|
|
bVar4 = is_not_familiar_spawned(GHIDRA_CAST<Entity_Tear *>(room));
|
|
if (bVar4 != 0) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::Position(&parentPos);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Distance(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)));
|
|
decayFactor = Math::clamp(oneConst,700.0,(float)local_87c);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor / 700.0 + oneConst));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_15;
|
|
room->_gridEntities[0xd9] =
|
|
(void *)((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auVar31)) + 0x0))) * (float)room->_gridEntities[0x10c]);
|
|
local_8dc = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
}
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&shrinkMask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagShrink);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask10,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
if (GHIDRA_INT(room->_gridEntities[0x105]) < 1) {
|
|
auVar31 = ZEXT416(room->_gridEntities[0xe0]);
|
|
if (4.0 < (float)room->_gridEntities[0xe0]) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&fetusMask3,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagFetus);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
pvVar20 = room->_gridEntities[0x10c];
|
|
pvVar24 = room->_gridEntities[0xd9];
|
|
if (bVar4 == 0) {
|
|
if ((float)pvVar20 / (float)local_890 < (float)pvVar24) {
|
|
decayFactor = 0.08;
|
|
}
|
|
else {
|
|
decayFactor = 0.03;
|
|
}
|
|
local_c0c = (void *)0x3dcccccd;
|
|
local_c10 = (void *)((float)pvVar24 - decayFactor * (float)pvVar20);
|
|
}
|
|
else {
|
|
if ((float)pvVar20 / (float)local_890 < (float)pvVar24) {
|
|
decayFactor = 0.022;
|
|
}
|
|
else {
|
|
decayFactor = 0.006;
|
|
}
|
|
local_c14 = (void *)0x3dcccccd;
|
|
local_c18 = (void *)((float)pvVar24 - decayFactor * (float)pvVar20);
|
|
}
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
pvVar20 = (void *)*pfVar15;
|
|
room->_gridEntities[0xd9] = pvVar20;
|
|
pvVar20 = (void *)((float)pvVar20 / (float)room->_gridEntities[0x10c]);
|
|
FUN_00431260();
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = ZEXT812(0x3dcccccd);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0xc))) = 0;
|
|
local_8dc = pvVar20;
|
|
if ((float)room->_gridEntities[0xd9] <= (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)))) {
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x14f)) = 1;
|
|
room->_gridEntities[0x114] = (void *)(GHIDRA_UINT(room->_gridEntities[0x114]) | 0x10);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
bVar4 = is_not_familiar_spawned(GHIDRA_CAST<Entity_Tear *>(room));
|
|
if (bVar4 != 0) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::Position(&parentPos2);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Distance(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)));
|
|
decayFactor = Math::clamp(zeroConst,900.0,(float)local_87c);
|
|
decayFactor = oneConst - decayFactor / 900.0;
|
|
local_8dc = (void *)(decayFactor * (float)local_8dc);
|
|
auVar31 = ZEXT416(local_8dc);
|
|
room->_gridEntities[0xd9] = (void *)(decayFactor * (float)room->_gridEntities[0x10c]);
|
|
}
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&spectralMask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagSpectral);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
if ((room->_gridEntities[2] == &DAT_00000004) || (room->_gridEntities[2] == &DAT_00000009)) {
|
|
pvVar20 = (void *)0x3;
|
|
}
|
|
else {
|
|
pvVar20 = (void *)0x0;
|
|
}
|
|
room->_gridEntities[0x58] = pvVar20;
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask11,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
if (*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x447)) == '\0') {
|
|
cVar5 = try_make_bridges();
|
|
if (cVar5 != '\0') {
|
|
apply_death_flag_effects(GHIDRA_CAST<Entity_Tear *>(room),GHIDRA_CAST<Entity *>(0x0));
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x447)) = 1;
|
|
}
|
|
}
|
|
else {
|
|
iVar7 = Isaac::Random(8);
|
|
if (iVar7 == 0) {
|
|
try_make_bridges();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&boomerangMask4,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagBoomerang);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) && (room->_gridEntities[0xe6] != (void *)0x0)) {
|
|
pBVar8 = &g_tearFlagOrbitAdvanced;
|
|
pBVar6 = BitSet128::operator_or(&withOrbit2,&g_tearFlagLudovico,&g_tearFlagOrbit);
|
|
pBVar6 = BitSet128::operator_or(&orResult7,pBVar6,pBVar8);
|
|
pBVar6 = BitSet128::operator_and(&andResult17,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),pBVar6)
|
|
;
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::Position(&parentPos3);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&local_10d8)))->Vector::Vector(zeroConst,2.0);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_10e0,pVVar14);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)))))->Vector::__sub(&local_ca8,pVVar9);
|
|
bVar4 = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc4)))))->Vector::operator_ne(&g_vectorZero);
|
|
if (bVar4 != 0) {
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_10e8)))->Vector::Vector(zeroConst,2.0);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc4)))))->Vector::__sub(&local_10f0,pVVar9);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)))))->Vector::__sub(&local_10f8,pVVar9);
|
|
(GHIDRA_CAST<Vector *>((&local_ca8)))->Vector::operator_assign(pVVar9);
|
|
}
|
|
local_87c = GHIDRA_CAST<Room *>(GetRootPlayer(GHIDRA_CAST<Entity_Tear *>(room)));
|
|
local_c04 = (void *)0x41a00000;
|
|
local_c08 = (void *)(((float)room->_gridPaths[0x2d] - 60.0) * halfConst);
|
|
auVar31 = ZEXT416(local_c08);
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::max<float>();
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>(*puVar13);
|
|
if (local_87c == GHIDRA_CAST<Room *>(0x0)) {
|
|
auVar31 = ZEXT416(GHIDRA_UINT(oneConst));
|
|
}
|
|
else {
|
|
FUN_00436190();
|
|
}
|
|
decayFactor = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) * 10.0;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>(((decayFactor * decayFactor) / ((float)local_8ac + (float)local_8ac)));
|
|
local_c00 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_ca8)))->Vector::Normalized(&direction11);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_1108,GHIDRA_CAST<float *>(&local_c00));
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::operator__(pVVar9);
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&wiggleMask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagWiggle);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
if (local_8d8 == GHIDRA_CAST<Room *>(0x0)) {
|
|
decayFactor = oneConst;
|
|
}
|
|
else {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>(get_tear_trinket_multiplier(GHIDRA_CAST<Entity_Player *>(local_8d8),10));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_16;
|
|
local_bf8 = (void *)0x3f800000;
|
|
local_bfc = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
decayFactor = *pfVar15;
|
|
}
|
|
apply_wiggle(GHIDRA_CAST<Entity_Tear *>(room),decayFactor);
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&spiralMask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagSpiral);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
if (local_8d8 == GHIDRA_CAST<Room *>(0x0)) {
|
|
decayFactor = oneConst;
|
|
}
|
|
else {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>(get_tear_trinket_multiplier(GHIDRA_CAST<Entity_Player *>(local_8d8),0x1a));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_17;
|
|
local_bf0 = (void *)0x3f800000;
|
|
local_bf4 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
decayFactor = *pfVar15;
|
|
}
|
|
apply_wiggle(GHIDRA_CAST<Entity_Tear *>(room),decayFactor);
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&bigSpiralMask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagBigSpiral
|
|
);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
if (local_8d8 != GHIDRA_CAST<Room *>(0x0)) {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>(get_tear_trinket_multiplier(GHIDRA_CAST<Entity_Player *>(local_8d8),0x2e));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_18;
|
|
local_be8 = (void *)0x3f800000;
|
|
local_bec = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
msvc::max<float>();
|
|
}
|
|
update_wiggle(GHIDRA_CAST<Entity_Tear *>(room));
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&attractorMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagAttractor);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) =
|
|
GHIDRA_CAST<Room *>(Math)::clamp(zeroConst,oneConst,((float)room->_gridEntities[0xe0] - 10.0) / 10.0);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_19;
|
|
local_87c = room->_gridEntities[0x115];
|
|
local_8d0 = GHIDRA_CAST<Room *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auVar31)) + 0x0))) * 20.0 * (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auVar31)) + 0x0)))));
|
|
if (local_87c != GHIDRA_CAST<Room *>(0x0)) {
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = ZEXT812(0x41000000);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0xc))) = 0;
|
|
local_8d0 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
}
|
|
local_be4 = (void *)0x40800000;
|
|
pVVar9 = Vector::operator_mul
|
|
(&local_1110,GHIDRA_CAST<float *>(&local_be4),GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)))))->Vector::__add(&local_1118,pVVar9);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x66dae1);
|
|
Game::AttractEntities
|
|
(g_game,pVVar9,Entity_Effect::rift_attract_filter,local_87c,(float)local_8d0,250.0);
|
|
}
|
|
pBVar6 = GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101));
|
|
pBVar8 = BitSet128::operator_and(&pulseMask,pBVar6,&g_tearFlagPulse);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
if (local_8d8 == GHIDRA_CAST<Room *>(0x0)) {
|
|
decayFactor = oneConst;
|
|
}
|
|
else {
|
|
local_ba0 = (void *)get_tear_trinket_multiplier(GHIDRA_CAST<Entity_Player *>(local_8d8),0x19);
|
|
local_be0 = (void *)0x3f800000;
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
decayFactor = *pfVar15;
|
|
}
|
|
local_8d0 = GHIDRA_CAST<Room *>((decayFactor * pointThreeConst));
|
|
auVar31 = ZEXT416(local_8d0);
|
|
pBVar8 = BitSet128::operator_and(&ludovicoMask12,pBVar6,&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::FrameCount();
|
|
decayFactor = sinf_wrapper((float)iVar7 * 0.7);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>(((decayFactor + 0.7) * (float)local_8d0 + (float)pointSixConst));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_21;
|
|
local_8dc = (void *)((float)local_8dc * (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auVar31)) + 0x0))));
|
|
}
|
|
else if ((room->_gridEntities[0xe6] != (void *)0x0) && (iVar7 = (GHIDRA_CAST<Entity *>(()))->Entity::Type(), iVar7 == 1)) {
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::FrameCount();
|
|
decayFactor = sinf_wrapper((float)iVar7 * 0.2);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>(((decayFactor + 0.2) * (float)local_8d0 + 1.1));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_20;
|
|
local_8dc = (void *)((float)local_8dc * (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auVar31)) + 0x0))));
|
|
}
|
|
}
|
|
local_8b4 = local_8dc;
|
|
pBVar8 = BitSet128::operator_and(&stickyMask,pBVar6,&g_tearFlagSticky);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
pBVar8 = BitSet128::operator_and(&sporeMask,pBVar6,&g_tearFlagSpore);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) goto LAB_0066dc7d;
|
|
}
|
|
else {
|
|
LAB_0066dc7d:
|
|
if ((room->_gridEntities[0x115] != (void *)0x0) && (0 < GHIDRA_INT(room->_gridEntities[0x118]))) {
|
|
decayFactor = oneConst - (float)GHIDRA_INT(room->_gridEntities[0x118]) / 60.0;
|
|
local_8dc = (void *)((float)local_8dc + decayFactor + decayFactor);
|
|
auVar31 = ZEXT416(local_8dc);
|
|
}
|
|
}
|
|
local_8a0 = GHIDRA_CAST<Room *>((room->_gridEntities + 9));
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(local_8a0))))->Sprite::SetRotation(0.0);
|
|
local_87c = GHIDRA_CAST<Room *>((room->_gridEntities + 0x167));
|
|
local_8b9 = '\0';
|
|
cVar5 = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(local_87c))))->Sprite::IsLoaded();
|
|
if (cVar5 == '\0') {
|
|
LAB_0066dd14:
|
|
local_8a1 = 0;
|
|
}
|
|
else {
|
|
cVar5 = _has_flag_0x110();
|
|
local_8a1 = 1;
|
|
if (cVar5 == '\0') goto LAB_0066dd14;
|
|
}
|
|
pBVar8 = BitSet128::operator_and(&flatMask,pBVar6,&g_tearFlagFlat);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) && (puVar19 = room->_gridEntities[2], puVar19 != &DAT_00000004)) {
|
|
if (local_8d8 == GHIDRA_CAST<Room *>(0x0)) {
|
|
decayFactor = oneConst;
|
|
}
|
|
else {
|
|
local_bdc = (void *)get_tear_trinket_multiplier(GHIDRA_CAST<Entity_Player *>(local_8d8),0x1b);
|
|
local_bd8 = (void *)0x3f800000;
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
puVar19 = room->_gridEntities[2];
|
|
decayFactor = *pfVar15;
|
|
}
|
|
decayFactor = decayFactor * halfConst + oneConst;
|
|
auVar31 = ZEXT416(GHIDRA_UINT(decayFactor));
|
|
if (puVar19 == GHIDRA_CAST<uint8_t *>(0x32)) {
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_1120)))->Vector::Vector(decayFactor,oneConst);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xd4)))))->Vector::operator_assign(pVVar9);
|
|
}
|
|
else {
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_1128)))->Vector::Vector(oneConst,decayFactor);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xd4)))))->Vector::operator_assign(pVVar9);
|
|
local_8b9 = '\x01';
|
|
}
|
|
}
|
|
if (((room->_gridEntities[2] == &DAT_0000000d) || (room->_gridEntities[2] == &DAT_00000017)) &&
|
|
(bVar4 = Game::IsInTimedSet(g_game,0x4f), bVar4 != 0)) {
|
|
(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xd4)))->x = 3.0;
|
|
}
|
|
puVar19 = room->_gridEntities[2];
|
|
if ((puVar19 == &DAT_0000000e) || (puVar19 == &DAT_0000000f)) {
|
|
pBVar6 = BitSet128::operator_and(&boomerangMask5,pBVar6,&g_tearFlagBoomerang);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
puVar19 = room->_gridEntities[2];
|
|
goto LAB_0066de6b;
|
|
}
|
|
decayFactor = (float)room->_gridEntities[0xe0] * 45.0;
|
|
auVar31 = ZEXT416(GHIDRA_UINT(decayFactor));
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::SetRotation(decayFactor);
|
|
local_8b9 = '\0';
|
|
}
|
|
else {
|
|
LAB_0066de6b:
|
|
if (((((puVar19 == &DAT_0000000b) || (puVar19 == GHIDRA_CAST<uint8_t *>(0xc))) ||
|
|
((puVar19 == &DAT_0000000d ||
|
|
(((puVar19 == &DAT_0000000e || (puVar19 == &DAT_0000000f)) || (puVar19 == &DAT_00000017)))
|
|
))) || ((puVar19 == &DAT_0000001f || (puVar19 == GHIDRA_CAST<uint8_t *>(0x21))))) ||
|
|
((puVar19 == GHIDRA_CAST<uint8_t *>(0x22) ||
|
|
(((puVar19 == &DAT_00000014 || (puVar19 == &DAT_00000027)) ||
|
|
((puVar19 == GHIDRA_CAST<uint8_t *>(0x29) ||
|
|
((((puVar19 == &DAT_0000002b || (puVar19 == &DAT_0000002c)) ||
|
|
(puVar19 == GHIDRA_CAST<uint8_t *>(0x2d))) ||
|
|
((puVar19 == &DAT_0000002f || (puVar19 == GHIDRA_CAST<uint8_t *>(0x31))))))))))))) {
|
|
local_8b9 = '\x01';
|
|
}
|
|
}
|
|
if (room->_gridEntities[2] == (void *)0x32) {
|
|
decayFactor = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::Length();
|
|
local_8d0 = GHIDRA_CAST<Room *>((decayFactor + decayFactor));
|
|
if ((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))->x <= zeroConst &&
|
|
zeroConst != (GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))->x) {
|
|
local_8d0 = GHIDRA_CAST<Room *>(((float)local_8d0 * -1.0));
|
|
}
|
|
animState = GHIDRA_CAST<AnimationState *>(Config)::GetPillEffects();
|
|
iVar7 = AnimationState::GetAnimationLength(animState);
|
|
decayFactor = (float)iVar7;
|
|
local_8c0 = GHIDRA_CAST<Room *>((360.0 / decayFactor));
|
|
_empty_check_0x34();
|
|
decayFactor = normalize_angle_degrees
|
|
(decayFactor * (float)local_8c0 +
|
|
(float)local_8d0 * (float)room->_gridEntities[0xde]);
|
|
if (decayFactor < zeroConst) {
|
|
decayFactor = decayFactor + 360.0;
|
|
}
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor / (float)local_8c0));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_22;
|
|
FUN_0040a740();
|
|
}
|
|
if ((local_8b9 != '\0') || (local_8a1 != 0)) {
|
|
local_9c4.x = (GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))->x;
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((room->_gridEntities + 0xcf));
|
|
local_9c4.y = (float)room->_gridEntities[0xd0];
|
|
if (GHIDRA_INT(room->_gridEntities[0x105]) < 1) {
|
|
decayFactor = (GHIDRA_CAST<Vector *>((room->_gridEntities + 0xfd)))->x;
|
|
auVar31 = ZEXT416(GHIDRA_UINT(decayFactor));
|
|
if (0.001 < decayFactor) {
|
|
LAB_0066e037:
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_1130)))->Vector::Vector(zeroConst,(float)local_8e0);
|
|
(GHIDRA_CAST<Vector *>((&local_9c4)))->Vector::operator_add_assign(pVVar9);
|
|
}
|
|
else {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask13,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&hydrobounceMask4,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagHydrobounce);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) goto LAB_0066e037;
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<Vector *>((&local_9c4)))->Vector::operator_assign(GHIDRA_CAST<Vector *>((room->_gridEntities + 0x106)));
|
|
}
|
|
local_89c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&local_9c4)))->Vector)::GetAngleDegrees();
|
|
if (local_8b9 != '\0') {
|
|
auVar31 = ZEXT416(local_89c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::SetRotation((float)local_89c);
|
|
}
|
|
if (local_8a1 != 0) {
|
|
layerIndex = GHIDRA_CAST<uint8_t *>(0x0);
|
|
iVar7 = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 0x167)))))->Sprite::GetLayerCount();
|
|
pRVar28 = local_87c;
|
|
if (iVar7 != 0) {
|
|
do {
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(pRVar28))))->Sprite::GetLayer(layerIndex);
|
|
if ((layer->_bitflags & 0x1000U) != 0) {
|
|
auVar31 = ZEXT416(local_89c);
|
|
layer->_rotation = (float)local_89c;
|
|
}
|
|
layerIndex = layerIndex + 1;
|
|
layerCount = GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(pRVar28))))->Sprite)::GetLayerCount();
|
|
} while (layerIndex < layerCount);
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
}
|
|
}
|
|
if (room->_gridEntities[2] == &DAT_00000017) {
|
|
seeds = GHIDRA_CAST<Seeds *>(Game)::GetSeeds(g_game);
|
|
bVar4 = Seeds::HasSeedEffect(seeds,0x4f);
|
|
if (((bVar4 != 0) &&
|
|
(iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::GetIntervalTicks(2.0,zeroConst), iVar7 != 0)) &&
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x14d)) != 0)) {
|
|
uVar10 = Random();
|
|
local_bd4 = (void *)0x3e0f5c29;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>(local_8ac))))->Vector::__mul(&local_1138,GHIDRA_CAST<float *>(&local_bd4));
|
|
pVVar14 = Vector::FromAngle(&angleDir5,(float)local_89c);
|
|
local_bd0 = (void *)0x40a00000;
|
|
pVVar14 = Vector::operator_mul(&local_1148,GHIDRA_CAST<float *>(&local_bd0),pVVar14);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__mul(&local_1150,&tear->_fScale);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((tearPos)))->Vector::__sub(&local_1158,pVVar14);
|
|
effect = (Entity_Effect *)
|
|
Game::Spawn(g_game,1000,0x3b,pVVar14,pVVar9,GHIDRA_CAST<Entity *>(0x0),0,uVar10);
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(effect) + 0x3c);
|
|
(GHIDRA_CAST<Color *>((local_4e8)))->Color::Color(oneConst,oneConst,oneConst,0.3);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
decayFactor = random_float();
|
|
(GHIDRA_CAST<Entity_Effect *>((effect)))->Entity_Effect::set_rotation(decayFactor * 10.0 + 2.0);
|
|
iVar7 = Isaac::Random(0xf);
|
|
(GHIDRA_CAST<Entity_Effect *>((effect)))->Entity_Effect::SetTimeout(iVar7 + 0xf);
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
local_bcc = (void *)(tear->_fScale * (float)local_900);
|
|
auVar31 = ZEXT416(local_bcc);
|
|
pVVar9 = Vector::operator_mul(&uniformScale10,GHIDRA_CAST<float *>(&local_bcc),&g_vectorOne);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(effect))))->Entity::SetSpriteScale(pVVar9);
|
|
set_field_358(effect,-18.0);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(effect))))->Entity::SetPositionOffset(&(GHIDRA_CAST<Entity_Tear *>(room))->_posOffset);
|
|
}
|
|
}
|
|
}
|
|
puVar19 = room->_gridEntities[2];
|
|
if ((((puVar19 == &DAT_00000023) || (puVar19 == GHIDRA_CAST<uint8_t *>(0x25))) ||
|
|
(puVar19 == GHIDRA_CAST<uint8_t *>(0x26))) && (bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::IsFrame(2,0), bVar4 != 0))
|
|
{
|
|
if (room->_gridEntities[2] == (void *)0x26) {
|
|
local_87c = GHIDRA_CAST<Room *>(Random());
|
|
local_bc8 = (void *)0x3e99999a;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::__mul(&local_1168,GHIDRA_CAST<float *>(&local_bc8))
|
|
;
|
|
pVVar14 = MusicManager::RandomVector(&randomDir2);
|
|
local_bc4 = (void *)random_float();
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__mul(&local_1178,GHIDRA_CAST<float *>(&local_bc4));
|
|
local_bc0 = (void *)0x40400000;
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__mul(&local_1180,GHIDRA_CAST<float *>(&local_bc0));
|
|
pfVar15 = &tear->_fScale;
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__mul(&local_1188,pfVar15);
|
|
in_stack_ffffd9fc = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_1190,pVVar14);
|
|
local_89c = GHIDRA_CAST<Room *>(Game)::Spawn(g_game,1000,0x58,tearPos,in_stack_ffffd9fc,GHIDRA_CAST<Entity *>(0x0),0,
|
|
GHIDRA_UINT(local_87c));
|
|
sprite = GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_89c))))->Entity)::GetSprite();
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&uniformScale11,pfVar15);
|
|
local_bbc = (void *)0x3f4ccccd;
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_11a0,GHIDRA_CAST<float *>(&local_bbc));
|
|
decayFactor = random_float();
|
|
ppvVar16 = &local_bb4;
|
|
pVVar9 = &local_11a8;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * (float)pointSixConst + (float)pointSixConst));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_23;
|
|
local_bb4 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
}
|
|
else {
|
|
local_87c = GHIDRA_CAST<Room *>(Random());
|
|
local_bb0 = (void *)0x3e99999a;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::__mul(&local_11b0,GHIDRA_CAST<float *>(&local_bb0))
|
|
;
|
|
pVVar14 = MusicManager::RandomVector(&randomDir3);
|
|
local_bac = (void *)random_float();
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__mul(&local_11c0,GHIDRA_CAST<float *>(&local_bac));
|
|
local_ba8 = (void *)0x40400000;
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__mul(&local_11c8,GHIDRA_CAST<float *>(&local_ba8));
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__mul(&local_11d0,&tear->_fScale);
|
|
in_stack_ffffd9fc = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_11d8,pVVar14);
|
|
room = GHIDRA_CAST<Room *>(Game)::Spawn(g_game,1000,0x6f,tearPos,in_stack_ffffd9fc,GHIDRA_CAST<Entity *>(0x0),0,
|
|
GHIDRA_UINT(local_87c));
|
|
local_89c = room;
|
|
pAVar22 = GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity)::GetSprite();
|
|
decayFactor = random_float();
|
|
set_PlaybackSpeed(pAVar22,decayFactor * (float)pointSixConst + halfConst);
|
|
sprite = GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity)::GetSprite();
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&uniformScale12,&tear->_fScale);
|
|
local_ba4 = (void *)0x3f000000;
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_11e8,GHIDRA_CAST<float *>(&local_ba4));
|
|
decayFactor = random_float();
|
|
ppvVar16 = &local_b98;
|
|
pVVar9 = &local_11f0;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * (float)pointSixConst + (float)pointSixConst));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_24;
|
|
local_b98 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
}
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__mul(pVVar9,GHIDRA_CAST<float *>(ppvVar16));
|
|
(GHIDRA_CAST<Sprite *>((sprite)))->Sprite::SetScale(pVVar9);
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
pRVar28 = local_89c;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_89c))))->Entity::SetPositionOffset(&tear->_posOffset);
|
|
FUN_00440e90();
|
|
sprite = GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(pRVar28))))->Entity)::GetSprite();
|
|
color = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&(GHIDRA_CAST<Entity_Tear *>(room))->_sprite))))->Sprite)::Color();
|
|
(GHIDRA_CAST<Sprite *>((sprite)))->Sprite::SetColor(color);
|
|
(**(code **)(*GHIDRA_CAST<int *>(local_89c) + 0xc))();
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&glowMask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagGlow);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x66e65e);
|
|
EntityList::QueryRadius
|
|
(entityList,GHIDRA_CAST<EntityList_EL *>(local_d08),GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)),
|
|
(float)room->_gridEntities[0xd3] * (float)local_890 + 100.0,0xffffffff);
|
|
ehState = 5;
|
|
local_888 = GHIDRA_CAST<Room *>(0x0);
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(local_d08))))->EntityList::Size();
|
|
if (iVar7 != 0) {
|
|
do {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
local_898 = GHIDRA_CAST<Room *>(*puVar13);
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::IsVulnerableEnemy(GHIDRA_CAST<Entity *>(0x0));
|
|
if ((bVar4 != 0) &&
|
|
((room->_gridEntities[0xe9] == GHIDRA_CAST<Entity *>(0x0) ||
|
|
(bVar4 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe9])))->Entity::IsDescendantOf(GHIDRA_CAST<Entity *>(local_898)),
|
|
bVar4 == 0)))) {
|
|
FUN_00417340();
|
|
pvVar20 = (void *)((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) + (float)room->_gridEntities[0xd3]);
|
|
local_89c = pvVar20;
|
|
FUN_00417340();
|
|
decayFactor = (float)pvVar20 + (float)room->_gridEntities[0xd3] * 4.0;
|
|
local_89c = GHIDRA_CAST<Room *>(((float)local_89c * (float)local_89c));
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((decayFactor * decayFactor));
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::Position(&entityPos15);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::DistanceSquared(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)))
|
|
;
|
|
auVar31 = ZEXT416(local_8ac);
|
|
if (((float)local_87c < (float)local_8ac) && ((float)local_89c < (float)local_87c)) {
|
|
pcVar1 = *(code **)(GHIDRA_INT(*GHIDRA_CAST<float *>(local_898)) + 0x20);
|
|
(GHIDRA_CAST<EntityRef *>((&local_2570)))->EntityRef::constructor(GHIDRA_CAST<Entity *>(room));
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x0);
|
|
(*pcVar1)();
|
|
}
|
|
}
|
|
local_888 = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_888)) + 0x1))));
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(local_d08))))->EntityList)::Size();
|
|
} while (local_888 < pRVar28);
|
|
}
|
|
ehState = -1;
|
|
(GHIDRA_CAST<EntityList_Query *>((local_d08)))->EntityList_Query::~EntityList_Query();
|
|
}
|
|
pBVar8 = GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101));
|
|
pBVar6 = BitSet128::operator_and(&decelerateMask,pBVar8,&g_tearFlagDecelerate);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pBVar34 = &g_tearFlagPop;
|
|
pBVar6 = BitSet128::operator_or(&withLudovico,&g_tearFlagAbsorb,&g_tearFlagLudovico);
|
|
pBVar6 = BitSet128::operator_or(&orResult8,pBVar6,pBVar34);
|
|
pBVar6 = BitSet128::operator_and(&andResult18,pBVar8,pBVar6);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
decayFactor = assert_lerp_range((float)room->_gridEntities[0xe0],zeroConst,10.0,oneConst,0.8,1
|
|
);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * (float)room->_gridEntities[0xd2]));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_25;
|
|
room->_gridEntities[0xd2] = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and(&accelerateMask,pBVar8,&g_tearFlagAccelerate);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pBVar34 = &g_tearFlagPop;
|
|
pBVar6 = BitSet128::operator_or(&withLudovico2,&g_tearFlagAbsorb,&g_tearFlagLudovico);
|
|
pBVar6 = BitSet128::operator_or(&orResult9,pBVar6,pBVar34);
|
|
pBVar6 = BitSet128::operator_and(&andResult19,pBVar8,pBVar6);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
local_87c = GHIDRA_CAST<Room *>(assert_lerp_range((float)room->_gridEntities[0xe0],zeroConst,10.0,0.8,1.2,
|
|
1));
|
|
decayFactor = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::Length();
|
|
local_b2c = (void *)(decayFactor * (float)local_87c);
|
|
local_b28 = (void *)0x41f00000;
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::min<float>();
|
|
auVar31 = ZEXT416(GHIDRA_UINT(*pfVar15));
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::Resize(*pfVar15);
|
|
}
|
|
}
|
|
pBVar6 = GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101));
|
|
pBVar8 = BitSet128::operator_and(&absorbMask,pBVar6,&g_tearFlagAbsorb);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pBVar8 = BitSet128::operator_and(&ludovicoMask14,pBVar6,&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
local_89c = GHIDRA_CAST<Room *>(GetRootPlayer(GHIDRA_CAST<Entity_Tear *>(room)));
|
|
if (local_89c == GHIDRA_CAST<Room *>(0x0)) {
|
|
local_8d8 = GHIDRA_CAST<Room *>(0x40600000);
|
|
local_888 = GHIDRA_CAST<Room *>(0x41200000);
|
|
local_aac = (void *)oneConst;
|
|
}
|
|
else {
|
|
FUN_005cd770();
|
|
local_8b0 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
FUN_0060d040();
|
|
local_8d8 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
FUN_005cd750();
|
|
local_888 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
FUN_00436190();
|
|
local_aac = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
}
|
|
pRVar29 = GHIDRA_CAST<Room *>(((float)local_888 / 10.0));
|
|
local_b34 = (void *)0x40400000;
|
|
pow_wrapper();
|
|
pRVar28 = local_8d8;
|
|
local_87c = pRVar29;
|
|
FUN_00431260();
|
|
local_bb8 = (void *)((float)local_87c * (float)pRVar28);
|
|
local_b30 = (void *)0x41200000;
|
|
msvc::min<float>();
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
local_940 = (void *)*pfVar15;
|
|
auVar31 = ZEXT416(local_8b0);
|
|
(GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Entity_Projectile *>(room))))->Entity_Projectile::SetHeight((float)local_8b0);
|
|
(GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Entity_Projectile *>(room))))->Entity_Projectile::set_falling_accel(0.0);
|
|
FUN_00444c70();
|
|
pBVar8 = BitSet128::operator_or(&withOrbitAdvanced2,&g_tearFlagOrbit,&g_tearFlagOrbitAdvanced)
|
|
;
|
|
pBVar8 = BitSet128::operator_and(&andResult20,pBVar6,pBVar8);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
pvVar20 = (void *)((float)room->_gridEntities[0xd2] * 0.95);
|
|
auVar31 = ZEXT416(pvVar20);
|
|
room->_gridEntities[0xd2] = pvVar20;
|
|
}
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::FrameCount();
|
|
if (10 < iVar7) {
|
|
if ((float)local_940 <= (GHIDRA_CAST<Vector *>((room->_gridEntities + 0xff)))->x) {
|
|
LAB_0066ebda:
|
|
pBVar6 = GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) =
|
|
GHIDRA_CAST<Room *>(Math)::clamp(zeroConst,8.0,(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xff)))->x * 5.0);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_26;
|
|
local_890 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<Room *>(GHIDRA_INT((float)auVar31)))) + 0x0)));
|
|
pBVar8 = BitSet128::operator_and(&splitMask,pBVar6,&g_tearFlagSplit);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
local_890 = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_890)) + 0x4))));
|
|
}
|
|
pBVar8 = BitSet128::operator_and(&quadsplitMask2,pBVar6,&g_tearFlagQuadsplit);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
auVar31 = ZEXT416(GHIDRA_UINT(((float)GHIDRA_INT(local_890) * 1.5)));
|
|
local_890 = GHIDRA_CAST<Room *>(GHIDRA_INT(((float)GHIDRA_INT(local_890) * 1.5)));
|
|
}
|
|
if (GHIDRA_INT(local_890) < 3) {
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagAbsorb)))->BitSet128::__bnot(¬Absorb2);
|
|
FUN_005cd430();
|
|
FUN_00444c70();
|
|
goto LAB_0066ef8a;
|
|
}
|
|
decayFactor = random_float();
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((decayFactor * 360.0));
|
|
local_8e0 = GHIDRA_CAST<Entity_Player *>((room->_gridEntities + 0xfb));
|
|
local_8b0 = (void *)0x0;
|
|
local_87c = GHIDRA_CAST<Room *>((360.0 / (float)GHIDRA_INT(local_890)));
|
|
while( true ) {
|
|
pBVar35 = &g_tearFlagFetus;
|
|
uVar37 = 0x50;
|
|
uVar38 = 0x4c;
|
|
uVar39 = 0xc3;
|
|
pBVar34 = &g_tearFlagAbsorb;
|
|
pBVar8 = BitSet128::operator_or(&withQuadsplit2,&g_tearFlagSplit,&g_tearFlagQuadsplit);
|
|
pBVar8 = BitSet128::operator_or(&orResult10,pBVar8,pBVar34);
|
|
pBVar8 = BitSet128::operator_or
|
|
(&orResult11,pBVar8,
|
|
GHIDRA_CAST<BitSet128 *>(CONCAT22(uVar39,CONCAT11(uVar38,uVar37))));
|
|
pBVar8 = BitSet128::operator_or(&orResult12,pBVar8,pBVar35);
|
|
pBVar8 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::__bnot(¬Result9);
|
|
BitSet128::operator_and(&inheritedFlags,pBVar6,pBVar8);
|
|
uVar18 = Random();
|
|
pEVar11 = room->_gridEntities[0xe9];
|
|
pVVar9 = Vector::FromAngle(&angleDir6,
|
|
(float)GHIDRA_INT(local_8b0) * (float)local_87c + (float)local_8ac);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_1208,GHIDRA_CAST<float *>(&local_aac));
|
|
local_ab0 = (void *)0x41200000;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_1210,GHIDRA_CAST<float *>(&local_ab0));
|
|
uVar10 = tear->_variant;
|
|
if (uVar10 == 0x24) {
|
|
uVar10 = 1;
|
|
}
|
|
Game::Spawn(g_game,2,uVar10,tearPos,pVVar9,pEVar11,0,uVar18);
|
|
pRVar28 = GHIDRA_CAST<Room *>(__RTDynamicCast());
|
|
local_ab4 = (void *)0xc0c00000;
|
|
local_898 = pRVar28;
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::min<float>();
|
|
(GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Entity_Projectile *>(pRVar28))))->Entity_Projectile::SetHeight(*pfVar15);
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
SetScale(GHIDRA_CAST<Entity_Tear *>(pRVar28),tear->_baseScale * halfConst);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags_01._l)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(inheritedFlags._l)) + 0x4)));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags_01._l)) + 0x0))) = (uint32_t)inheritedFlags._l;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(flags_01._h)) + 0x0))) = (char)(uint32_t)inheritedFlags._h;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(flags_01._h)) + 0x1))) = (char)(GHIDRA_UINT((uint32_t)inheritedFlags._h) >> 8);
|
|
(*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(&(flags_01._h)) + 0x2))) = (short)(GHIDRA_UINT((uint32_t)inheritedFlags._h) >> 0x10);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags_01._h)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(inheritedFlags._h)) + 0x4)));
|
|
SetTearFlags(GHIDRA_CAST<Entity_Tear *>(pRVar28),flags_01);
|
|
auVar31 = ZEXT416(GHIDRA_UINT(((GHIDRA_CAST<Entity_Tear *>(room))->_collisionDamage * halfConst)));
|
|
(**(code **)(*GHIDRA_CAST<int *>(pRVar28) + 0x40))();
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(pRVar28) + 0x3c);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::GetColor();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xff);
|
|
(*pcVar1)();
|
|
FUN_0060cd70();
|
|
FUN_0060cd90();
|
|
pVVar9 = &(GHIDRA_CAST<Entity_Tear *>(room))->_pos;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::SetTargetPosition(*pVVar9);
|
|
pBVar6 = BitSet128::operator_and
|
|
(&hydrobounceMask5,&(GHIDRA_CAST<Entity_Tear *>(room))->_tearFlags,
|
|
&g_tearFlagHydrobounce);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
FallingSpeed(GHIDRA_CAST<Entity_Tear *>(local_898));
|
|
FUN_00444c70();
|
|
(GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Entity_Projectile *>(local_898))))->Entity_Projectile::set_falling_accel(3.0);
|
|
}
|
|
local_8b0 = GHIDRA_CAST<Room *>((GHIDRA_INT(local_8b0) + 1));
|
|
if (GHIDRA_INT(local_890) <= GHIDRA_INT(local_8b0)) break;
|
|
pBVar6 = &(GHIDRA_CAST<Entity_Tear *>(room))->_tearFlags;
|
|
}
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x28))();
|
|
}
|
|
else {
|
|
auVar31 = ZEXT416(GHIDRA_UINT(((float)local_888 * 5.0)));
|
|
local_aa4 = (void *)0x96;
|
|
local_aa0 = (void *)GHIDRA_INT(((float)local_888 * 5.0));
|
|
msvc::min<int>();
|
|
local_aa8 = &DAT_00000050;
|
|
piVar12 = GHIDRA_CAST<int *>(std)::max<int>();
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::FrameCount();
|
|
if ((*piVar12 <= iVar7) || (cVar5 = Entity::CollidesWithGrid(), cVar5 != '\0'))
|
|
goto LAB_0066ebda;
|
|
LAB_0066ef8a:
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
}
|
|
if (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x14f)) == 0) {
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x66efd8);
|
|
EntityList::QueryRadius
|
|
(entityList,GHIDRA_CAST<EntityList_EL *>(radiusQuery),pVVar9,
|
|
(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xff)))->x * (float)room->_gridEntities[0xd3]
|
|
* 4.0,4);
|
|
ehState = 6;
|
|
local_8b0 = GHIDRA_CAST<Room *>(0x0);
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(radiusQuery))))->EntityList::Size();
|
|
if (iVar7 != 0) {
|
|
do {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
local_890 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(*puVar13))))->Entity)::ToTear();
|
|
if (((local_890 != GHIDRA_CAST<Room *>(0x0)) && (local_890 != room)) &&
|
|
(cVar5 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_890))))->Entity::IsDead(), cVar5 == '\0')) {
|
|
pBVar8 = &g_tearFlagLudovico;
|
|
pBVar6 = TearFlags(GHIDRA_CAST<Entity_Tear *>(local_890),&tearFlagsCopy4);
|
|
pBVar6 = BitSet128::operator_and(&andResult21,pBVar6,pBVar8);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
Game::GetField26614(g_game);
|
|
cVar5 = DeathmatchManager::is_active();
|
|
if ((cVar5 == '\0') ||
|
|
(bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_890))))->Entity::IsDescendantOf(room->_gridEntities[0xe9]),
|
|
bVar4 != 0)) {
|
|
FUN_00417340();
|
|
local_ab8 = (void *)((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) + (float)room->_gridEntities[0xd3]);
|
|
local_abc = (void *)0x40a00000;
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::max<float>();
|
|
local_87c = GHIDRA_CAST<Room *>(*puVar13);
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_890))))->Entity::Position(&entityPos16);
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Vector *>((pVVar14)))->Vector)::DistanceSquared(pVVar9);
|
|
pRVar28 = local_890;
|
|
auVar31 = ZEXT416(GHIDRA_UINT(((float)local_87c * (float)local_87c)));
|
|
if ((float)local_8ac <= (float)local_87c * (float)local_87c) {
|
|
fVar27 = (long double)Scale(GHIDRA_CAST<Entity_Tear *>(local_890));
|
|
local_87c = GHIDRA_CAST<Room *>((float)fVar27);
|
|
if ((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xff)))->x <= (float)local_87c) {
|
|
pBVar8 = &g_tearFlagAbsorb;
|
|
pBVar6 = TearFlags(GHIDRA_CAST<Entity_Tear *>(pRVar28),&tearFlagsCopy5);
|
|
pBVar6 = BitSet128::operator_and(&andResult22,pBVar6,pBVar8);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 == 0) {
|
|
local_ad8 = (void *)0x3e4ccccd;
|
|
local_ad4 = (void *)(((float)local_888 *
|
|
(float)pRVar28->_gridEntities[0x100]) / 50.0);
|
|
msvc::max<float>();
|
|
local_adc = (void *)0x3f800000;
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::min<float>();
|
|
local_ae0 = (void *)((float)pRVar28->_gridEntities[0x100] + *pfVar15);
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::min<float>();
|
|
SetScale(GHIDRA_CAST<Entity_Tear *>(pRVar28),*pfVar15);
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(pRVar28) + 0x40);
|
|
fVar27 = (long double)(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_890))))->Entity::CollisionDamage();
|
|
local_ae4 = (void *)(float)fVar27;
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
auVar31 = ZEXT416(GHIDRA_UINT(((float)local_8d8 + *pfVar15)));
|
|
(*pcVar1)();
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x28))();
|
|
break;
|
|
}
|
|
}
|
|
local_ac4 = (void *)0x3e4ccccd;
|
|
local_ac0 = (void *)(((float)local_888 * (float)room->_gridEntities[0x100]) /
|
|
50.0);
|
|
msvc::max<float>();
|
|
local_ac8 = (void *)0x3f800000;
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::min<float>();
|
|
local_acc = (void *)((float)room->_gridEntities[0x100] + *pfVar15);
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::min<float>();
|
|
SetScale(GHIDRA_CAST<Entity_Tear *>(room),*pfVar15);
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x40);
|
|
fVar27 = (long double)(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_890))))->Entity::CollisionDamage();
|
|
local_ad0 = (void *)(float)fVar27;
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
auVar31 = ZEXT416(GHIDRA_UINT(((float)local_8d8 + *pfVar15)));
|
|
(*pcVar1)();
|
|
(**(code **)(*GHIDRA_CAST<int *>(local_890) + 0x28))();
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
local_8b0 = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_8b0)) + 0x1))));
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(radiusQuery))))->EntityList)::Size();
|
|
} while (local_8b0 < pRVar28);
|
|
}
|
|
ehState = -1;
|
|
(GHIDRA_CAST<EntityList_Query *>((radiusQuery)))->EntityList_Query::~EntityList_Query();
|
|
}
|
|
pBVar6 = GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101));
|
|
}
|
|
}
|
|
}
|
|
pBVar8 = BitSet128::operator_and(&chainMask,pBVar6,&g_tearFlagChain);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
iVar7 = EntityPtr::Ref();
|
|
if (iVar7 == 0) {
|
|
if (8.0 < (float)room->_gridEntities[0xe0] || (float)room->_gridEntities[0xe0] == 8.0) {
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagChain)))->BitSet128::__bnot(¬Chain);
|
|
FUN_005cd430();
|
|
}
|
|
else {
|
|
if (room->_gridEntities[0xe6] != GHIDRA_CAST<Entity *>(0x0)) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::Position(&parentPos4);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)))))->Vector)::Distance(pVVar9);
|
|
if (10.0 < (float)local_87c) {
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>((room->_gridEntities + 0x11c)))))->EntityPtr::Set(room->_gridEntities[0xe6]);
|
|
goto LAB_0066f416;
|
|
}
|
|
}
|
|
iVar7 = find_nearest_linkable_tear(GHIDRA_CAST<Entity_Tear *>(room));
|
|
if (iVar7 != 0) {
|
|
FUN_0067ae30();
|
|
}
|
|
}
|
|
}
|
|
LAB_0066f416:
|
|
auVar31 = ZEXT416(room->_gridEntities[0xe0]);
|
|
if ((float)local_8fc < (float)room->_gridEntities[0xe0]) {
|
|
iVar7 = EntityPtr::Ref();
|
|
if (iVar7 != 0) {
|
|
pEVar11 = GHIDRA_CAST<Entity *>(EntityPtr)::Ref();
|
|
bVar4 = (GHIDRA_CAST<Entity *>((pEVar11)))->Entity::IsTear();
|
|
if (bVar4 != 0) goto LAB_0066f4a9;
|
|
}
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::IsFrame(4,GHIDRA_INT((room->_bottomRightPos).y));
|
|
if (((bVar4 != 0) && (iVar7 = FUN_0067adc0(), iVar7 < 5)) &&
|
|
((iVar7 = Isaac::Random(10), iVar7 == 0 &&
|
|
(local_87c = GHIDRA_CAST<Room *>(find_link_partner(GHIDRA_CAST<Entity_Tear *>(room))), local_87c != GHIDRA_CAST<Room *>(0x0)))))
|
|
{
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>((room->_gridEntities + 0x11c)))))->EntityPtr::Set(GHIDRA_CAST<Entity *>(local_87c));
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>((local_87c->_gridEntities + 0x11d)))))->EntityPtr::Set(GHIDRA_CAST<Entity *>(room));
|
|
}
|
|
}
|
|
LAB_0066f4a9:
|
|
apply_link_spring_forces(GHIDRA_CAST<Entity_Tear *>(room));
|
|
}
|
|
pBVar8 = BitSet128::operator_and(&tractorBeamMask2,pBVar6,&g_tearFlagTractorBeam);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pBVar8 = BitSet128::operator_and(&ludovicoMask15,pBVar6,&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar8)))->BitSet128::IsZero();
|
|
if ((((bVar4 != 0) && (room->_gridEntities[0xe6] != (void *)0x0)) &&
|
|
(iVar7 = (GHIDRA_CAST<Entity *>(()))->Entity::Type(), iVar7 == 1)) && (room->_gridEntities[0x115] == (void *)0x0)) {
|
|
local_8e0 = GHIDRA_CAST<Entity_Player *>(__RTDynamicCast());
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x0);
|
|
(GHIDRA_CAST<Entity_Player *>((local_8e0)))->Entity_Player::GetTractorBeam();
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>(__RTDynamicCast());
|
|
if (local_8ac != GHIDRA_CAST<Entity_Projectile *>(0x0)) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8e0))))->Entity::Position(&entityPos17);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)))))->Vector::__sub(&local_cb0,pVVar9);
|
|
local_96c = GHIDRA_CAST<uint8_t *>(0x3f800000);
|
|
pBVar6 = BitSet128::operator_and(&boomerangMask6,pBVar6,&g_tearFlagBoomerang);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) &&
|
|
(local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector)::Dot(&local_cb0),
|
|
(float)local_87c < zeroConst)) {
|
|
local_96c = &DAT_bf800000;
|
|
}
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector)::Length();
|
|
fVar27 = (long double)(GHIDRA_CAST<Entity_Projectile *>((local_8ac)))->Entity_Projectile::Damage();
|
|
Vector::FromAngle(&local_cb8,(float)fVar27);
|
|
auVar31 = ZEXT416(local_87c);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_cb8)))->Vector::Resized(&resized,(float)local_87c);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_1238,GHIDRA_CAST<float *>(&local_96c));
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::operator_assign(pVVar9);
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8e0))))->Entity::Position(&entityPos18);
|
|
local_ae8 = (void *)(GHIDRA_CAST<Vector *>((&local_cb0)))->Vector::Length();
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&local_cb8)))->Vector::__mul(&local_1248,GHIDRA_CAST<float *>(&local_ae8));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_1250,pVVar14);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)))))->Vector::operator_assign(pVVar9);
|
|
}
|
|
}
|
|
}
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x66f6d1);
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::HasEntityFlags(0x80000);
|
|
if (bVar4 != 0) {
|
|
pvVar20 = room->_gridEntities[0xe0];
|
|
auVar31 = ZEXT416(pvVar20);
|
|
if (5.0 <= (float)pvVar20) {
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x66f72f);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::ClearEntityFlags(0x80000);
|
|
}
|
|
else {
|
|
decayFactor = assert_lerp_range((float)pvVar20,zeroConst,5.0,0.55,1.0,1);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) = GHIDRA_CAST<Room *>((decayFactor * (float)room->_gridEntities[0xd2]));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x4))) = extraout_var_27;
|
|
room->_gridEntities[0xd2] = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0)));
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&popMask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagPop);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask16,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(popTearQuery);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x66f7b2);
|
|
EntityList::QueryRadius
|
|
(entityList,GHIDRA_CAST<EntityList_EL *>(outResult),pVVar9,(float)room->_gridEntities[0xd3] * 4.0
|
|
,4);
|
|
ehState = 7;
|
|
local_8b0 = GHIDRA_CAST<Room *>(0x0);
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(popTearQuery))))->EntityList::Size();
|
|
if (iVar7 != 0) {
|
|
do {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
local_898 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(*puVar13))))->Entity)::ToTear();
|
|
if ((local_898 != GHIDRA_CAST<Room *>(0x0)) &&
|
|
(decayFactor = (float)(GHIDRA_CAST<PathFinder *>((GHIDRA_CAST<PathFinder *>(local_898))))->PathFinder::GetGridIndex(),
|
|
GHIDRA_UINT(decayFactor) <= GHIDRA_UINT((room->_bottomRightPos).y))) {
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::Position(&entityPos19);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x66f832);
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&separation,pVVar14);
|
|
FUN_00417340();
|
|
local_8c0 = GHIDRA_CAST<Room *>((((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar31)) + 0x0))) + (float)room->_gridEntities[0xd3]) * 0.9));
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&separation)))->Vector)::LengthSquared();
|
|
auVar31 = ZEXT416(local_87c);
|
|
if ((float)local_87c <= (float)local_8c0 * (float)local_8c0) {
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&separation)))->Vector)::LengthSquared();
|
|
auVar31 = ZEXT416(local_87c);
|
|
if ((float)local_87c != zeroConst) {
|
|
(GHIDRA_CAST<Vector *>((&separation)))->Vector::Normalized(&separationDir);
|
|
pVVar25 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf));
|
|
local_8e0 = GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Vector *>((pVVar25)))->Vector)::Dot(&separationDir);
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::Velocity(&entityVel3);
|
|
local_8d0 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Dot(&separationDir);
|
|
relSpeed = (void *)((float)local_8d0 - (float)local_8e0);
|
|
bounceFactor = (void *)0x3f8ccccd;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&separationDir)))->Vector::__mul(&local_1268,GHIDRA_CAST<float *>(&relSpeed));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_1270,GHIDRA_CAST<float *>(&bounceFactor));
|
|
(GHIDRA_CAST<Vector *>((pVVar25)))->Vector::__add(&bouncedVel,pVVar9);
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::Velocity(&entityVel4);
|
|
otherRelSpeed = (void *)((float)local_8e0 - (float)local_8d0);
|
|
auVar31 = ZEXT416(otherRelSpeed);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&separationDir)))->Vector::__mul(&local_1280,GHIDRA_CAST<float *>(&otherRelSpeed));
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__mul(&local_1288,GHIDRA_CAST<float *>(&bounceFactor));
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&otherBouncedVel,pVVar14);
|
|
decayFactor = (GHIDRA_CAST<Vector *>((&separation)))->Vector::Length();
|
|
halfOverlap = (void *)(((float)local_8c0 - decayFactor) * 0.5);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&separationDir)))->Vector::__mul(&local_1290,GHIDRA_CAST<float *>(&halfOverlap));
|
|
(GHIDRA_CAST<Vector *>((tearPos)))->Vector::__add(&pushedPos,pVVar9);
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::Position(&entityPos20);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&separationDir)))->Vector::__mul(&local_12a0,GHIDRA_CAST<float *>(&halfOverlap));
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&otherPushedPos,pVVar14);
|
|
(GHIDRA_CAST<Vector *>((pVVar25)))->Vector::operator_assign(&bouncedVel);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::SetVelocity(&otherBouncedVel);
|
|
pVVar9 = tearPos;
|
|
(GHIDRA_CAST<Vector *>((tearPos)))->Vector::operator_assign(&pushedPos);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::SetPosition(&otherPushedPos);
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
tear->_popBounceCount = tear->_popBounceCount + 1;
|
|
*GHIDRA_CAST<short *>((local_898->_gridEntities + 0x112)) =
|
|
*GHIDRA_CAST<short *>((local_898->_gridEntities + 0x112)) + 1;
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x2);
|
|
in_stack_ffffd9fc = pVVar9;
|
|
SoundEffects::PlayWithFartOverride2(0x1ca,GHIDRA_INT(pVVar9),2,0,1.0,oneConst);
|
|
}
|
|
}
|
|
}
|
|
local_8b0 = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_8b0)) + 0x1))));
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(popTearQuery))))->EntityList)::Size();
|
|
} while (local_8b0 < pRVar28);
|
|
}
|
|
ehState = -1;
|
|
room->_gridEntities[0xd2] = (void *)((float)room->_gridEntities[0xd2] * 0.96);
|
|
(GHIDRA_CAST<EntityList_Query *>((popTearQuery)))->EntityList_Query::~EntityList_Query();
|
|
}
|
|
}
|
|
if (-5.0 < (float)room->_gridEntities[0xfb]) {
|
|
LAB_0066fb70:
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask17,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 == 0) goto LAB_0066fc9b;
|
|
if ((room->_gridEntities[2] == &DAT_00000009) &&
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x14f)) == 0)) {
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::operator_assign(&g_vectorZero);
|
|
room->_gridEntities[0x58] = (void *)0x0;
|
|
room->_gridEntities[0x59] = (void *)0x0;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::SetRotation(180.0);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x66fbea);
|
|
ANM2::Play(GHIDRA_CAST<ANM2 *>((room->_gridEntities + 9)),GHIDRA_CAST<uint8_t *>("Stuck"),0);
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&hydrobounceMask6,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagHydrobounce);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<NPCAI_Pathfinder *>((room->_gridEntities + 0xfc)))->_entity =
|
|
(void *)((float)(GHIDRA_CAST<NPCAI_Pathfinder *>((room->_gridEntities + 0xfc)))->_entity * -1.6);
|
|
(GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Entity_Projectile *>(room))))->Entity_Projectile::SetHeight(-5.0);
|
|
}
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x14f)) = 1;
|
|
room->_gridEntities[0x114] = (void *)(GHIDRA_UINT(room->_gridEntities[0x114]) | 4);
|
|
apply_death_flag_effects(GHIDRA_CAST<Entity_Tear *>(room),GHIDRA_CAST<Entity *>(0x0));
|
|
if ((room->_gridEntities[0xe6] != GHIDRA_CAST<Entity *>(0x0)) && (*GHIDRA_CAST<char *>((room->_gridPaths + 0x1f)) != '\0')
|
|
) {
|
|
pEVar17 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::ToPlayer();
|
|
if (pEVar17 != GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x66fc84);
|
|
bVar4 = (GHIDRA_CAST<Entity_Player *>((pEVar17)))->Entity_Player::HasCollectible(0x175,0);
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<Entity_Player *>((pEVar17)))->Entity_Player::ClearDeadEyeCharge();
|
|
}
|
|
FUN_007cb4f0();
|
|
}
|
|
}
|
|
goto LAB_00670391;
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&hydrobounceMask7,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagHydrobounce);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) &&
|
|
(-5.0 < (float)(GHIDRA_CAST<NPCAI_Pathfinder *>((room->_gridEntities + 0xfc)))->_entity +
|
|
(float)room->_gridEntities[0xfb])) goto LAB_0066fb70;
|
|
LAB_0066fc9b:
|
|
pBVar6 = BitSet128::operator_or(&withBounceWallsonly,&g_tearFlagBounce,&g_tearFlagBounceWallsonly)
|
|
;
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x66fcc2);
|
|
pBVar6 = BitSet128::operator_and(&andResult23,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),pBVar6);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 == 0) && (room->_gridEntities[2] != (void *)0x2e)) {
|
|
LAB_0066fcf0:
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask18,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) && ((GHIDRA_UINT(room->_gridEntities[3]) & 2) != 0)) goto LAB_00670254;
|
|
pBVar6 = BitSet128::operator_and
|
|
(&rerollRockWispMask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagRerollRockWisp);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
pEVar30 = GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Room *>((pRVar28)))->Room)::GetGridIndex(pVVar9);
|
|
local_8ac = pEVar30;
|
|
if (-1 < GHIDRA_INT(pEVar30)) {
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
local_8e0 = GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Room *>((pRVar28)))->Room)::GetGridEntity(GHIDRA_UINT(pEVar30));
|
|
if ((local_8e0 != GHIDRA_CAST<Entity_Player *>(0x0)) &&
|
|
(bVar4 = (GHIDRA_CAST<GridEntity *>((GHIDRA_CAST<GridEntity *>(local_8e0))))->GridEntity::IsBreakableRock(), bVar4 != 0)) {
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagRerollRockWisp)))->BitSet128::__bnot(¬RerollRockWisp);
|
|
FUN_005cd430();
|
|
FUN_00665b70();
|
|
(GHIDRA_CAST<GridEntity_Rock *>((GHIDRA_CAST<GridEntity_Rock *>(local_8e0))))->GridEntity_Rock::UpdateNeighbors();
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<RNG *>((GHIDRA_CAST<RNG *>((room->_gridEntities + 0xee)))))->RNG)::RandomInt(6);
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
tintedRockIdx = (GHIDRA_CAST<Room *>((pRVar28)))->Room::GetTintedRockIdx();
|
|
local_890 = GHIDRA_CAST<Room *>((GHIDRA_UINT((pEVar30 == GHIDRA_CAST<Entity_Projectile *>(tintedRockIdx))) * 2 + 2));
|
|
if ((pEVar30 == GHIDRA_CAST<Entity_Projectile *>(tintedRockIdx)) &&
|
|
(uVar10 = (GHIDRA_CAST<RNG *>((GHIDRA_CAST<RNG *>((room->_gridEntities + 0xee)))))->RNG::RandomInt(0x14), uVar10 == 0)) {
|
|
persistentGameData = GHIDRA_CAST<PersistentGameData *>((GHIDRA_CAST<Room *>((GHIDRA_CAST<Room *>(g_manager))))->Room)::GetTopLeftPos();
|
|
bVar4 = PersistentGameData::Unlocked(persistentGameData,0x143);
|
|
if (bVar4 != 0) {
|
|
local_890 = GHIDRA_CAST<Room *>(0x16);
|
|
}
|
|
}
|
|
local_888 = GHIDRA_CAST<Room *>(0x0);
|
|
switch(local_87c) {
|
|
case GHIDRA_CAST<Room *>(0x0):
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<RNG *>((GHIDRA_CAST<RNG *>((room->_gridEntities + 0xee)))))->RNG)::RandomFloat();
|
|
local_890 = GHIDRA_CAST<Room *>(&DAT_0000000e);
|
|
if ((float)pointSixConst <= (float)local_87c) {
|
|
if (0.8 <= (float)local_87c) {
|
|
if (0.95 <= (float)local_87c) {
|
|
if (0.97 <= (float)local_87c) {
|
|
local_888 = GHIDRA_CAST<Room *>((((float)local_87c < 0.98) + 3));
|
|
}
|
|
else {
|
|
local_888 = GHIDRA_CAST<Room *>(&DAT_00000005);
|
|
}
|
|
}
|
|
else {
|
|
local_888 = GHIDRA_CAST<Room *>(0x1);
|
|
}
|
|
}
|
|
else {
|
|
local_888 = GHIDRA_CAST<Room *>(0x2);
|
|
}
|
|
}
|
|
break;
|
|
case GHIDRA_CAST<Room *>(0x1):
|
|
local_890 = GHIDRA_CAST<Room *>(&DAT_00000005);
|
|
break;
|
|
case GHIDRA_CAST<Room *>(0x2):
|
|
local_890 = GHIDRA_CAST<Room *>(&DAT_00000006);
|
|
break;
|
|
case GHIDRA_CAST<Room *>(0x3):
|
|
local_890 = GHIDRA_CAST<Room *>(0x3);
|
|
break;
|
|
case GHIDRA_CAST<Room *>(0x4):
|
|
local_890 = GHIDRA_CAST<Room *>(0xc);
|
|
}
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
(GHIDRA_CAST<Room *>((pRVar28)))->Room::SetGridPath(GHIDRA_INT(pEVar30),0);
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
uVar10 = (GHIDRA_CAST<RNG *>((GHIDRA_CAST<RNG *>((room->_gridEntities + 0xee)))))->RNG::Next();
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(local_890);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(local_888);
|
|
(GHIDRA_CAST<Room *>((pRVar28)))->Room::SpawnGridEntity(GHIDRA_INT(local_8ac),GHIDRA_UINT(local_890),GHIDRA_UINT(local_888),uVar10,0);
|
|
}
|
|
}
|
|
goto LAB_00670391;
|
|
}
|
|
if ((*GHIDRA_CAST<uint8_t *>((room->_gridEntities + 0x5b)) != 0) && (-60.0 < (float)room->_gridEntities[0xfb]))
|
|
{
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask19,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if ((bVar4 == 0) || (room->_gridEntities[2] == &DAT_00000009)) goto LAB_0066ffc8;
|
|
LAB_00670079:
|
|
pBVar6 = BitSet128::operator_and
|
|
(&spectralMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagSpectral);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if ((bVar4 == 0) && (room->_gridEntities[2] != &DAT_00000004)) goto LAB_00670391;
|
|
pBVar6 = BitSet128::operator_and
|
|
(&stickyMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagSticky)
|
|
;
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 == 0) {
|
|
LAB_00670113:
|
|
if (room->_gridEntities[0x115] != (void *)0x0) goto LAB_00670391;
|
|
}
|
|
else {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&boogerMask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagBooger
|
|
);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 == 0) goto LAB_00670113;
|
|
pBVar6 = BitSet128::operator_and
|
|
(&sporeMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagSpore)
|
|
;
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 == 0) goto LAB_00670113;
|
|
}
|
|
game = g_game;
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x14f)) = 1;
|
|
room->_gridEntities[0x114] = (void *)(GHIDRA_UINT(room->_gridEntities[0x114]) | 1);
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(game))))->Level)::GetCurrentRoom();
|
|
local_880 = (void *)pVVar9->x;
|
|
local_87c = GHIDRA_CAST<Room *>(pVVar9->y);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x670165);
|
|
iVar7 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::GetGridCollisionAtPos(*pVVar9);
|
|
if (iVar7 == 4) {
|
|
LAB_006701a6:
|
|
room->_gridEntities[0x114] = (void *)(GHIDRA_UINT(room->_gridEntities[0x114]) | 2);
|
|
}
|
|
else {
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
local_880 = (void *)pVVar9->x;
|
|
local_87c = GHIDRA_CAST<Room *>(pVVar9->y);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x6701a1);
|
|
iVar7 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::GetGridCollisionAtPos(*pVVar9);
|
|
if (iVar7 == 5) goto LAB_006701a6;
|
|
}
|
|
apply_death_flag_effects(GHIDRA_CAST<Entity_Tear *>(room),GHIDRA_CAST<Entity *>(0x0));
|
|
try_make_bridges();
|
|
if (((room->_gridEntities[0xe6] != GHIDRA_CAST<Entity *>(0x0)) &&
|
|
(*GHIDRA_CAST<char *>((room->_gridPaths + 0x1f)) != '\0')) &&
|
|
(local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity)::ToPlayer(), local_87c != GHIDRA_CAST<Room *>(0x0))
|
|
) {
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
gridEntity = (GHIDRA_CAST<Room *>((pRVar28)))->Room::GetGridEntityFromPos(pVVar9);
|
|
if ((gridEntity == GHIDRA_CAST<GridEntity *>(0x0)) ||
|
|
((iVar7 = (GHIDRA_CAST<GridEntity *>((gridEntity)))->GridEntity::GetType(), iVar7 != 0xe &&
|
|
(iVar7 = (GHIDRA_CAST<GridEntity *>((gridEntity)))->GridEntity::GetType(), iVar7 != 0xc)))) {
|
|
pRVar28 = local_87c;
|
|
FUN_007cb4f0();
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x670240);
|
|
bVar4 = (GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(pRVar28))))->Entity_Player::HasCollectible(0x175,0);
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(pRVar28))))->Entity_Player::ClearDeadEyeCharge();
|
|
}
|
|
}
|
|
}
|
|
goto LAB_00670391;
|
|
}
|
|
LAB_0066ffc8:
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
local_880 = (void *)pVVar9->x;
|
|
local_87c = GHIDRA_CAST<Room *>(pVVar9->y);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x66ffff);
|
|
iVar7 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::GetGridCollisionAtPos(*pVVar9);
|
|
if (iVar7 != 4) {
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
local_880 = (void *)pVVar9->x;
|
|
local_87c = GHIDRA_CAST<Room *>(pVVar9->y);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x67003b);
|
|
iVar7 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::GetGridCollisionAtPos(*pVVar9);
|
|
if (iVar7 == 5) {
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
iVar7 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::GetGridPathFromPos(pVVar9);
|
|
if (iVar7 < 3000) goto LAB_00670062;
|
|
}
|
|
goto LAB_00670391;
|
|
}
|
|
LAB_00670062:
|
|
if (*GHIDRA_CAST<uint8_t *>((room->_gridEntities + 0x5b)) == 0) goto LAB_00670391;
|
|
if (room->_gridEntities[2] != &DAT_00000009) goto LAB_00670079;
|
|
LAB_0067039b:
|
|
if (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x14f)) == 0) {
|
|
pRVar29 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
pRVar28 = GHIDRA_CAST<Room *>((room->_gridEntities + 0xc6));
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(&DAT_bf800000);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(pRVar28);
|
|
Room::GetClampedPositionImpl
|
|
(pRVar29,&roomClampedPos,GHIDRA_CAST<Vector *>(pRVar28),-1.0,-20.0,-40.0,(float)local_8cc);
|
|
bVar4 = (GHIDRA_CAST<Vector *>((&roomClampedPos)))->Vector::operator_ne(GHIDRA_CAST<Vector *>(pRVar28));
|
|
if (bVar4 != 0) {
|
|
pRVar29 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
puVar13 = GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<Room *>((pRVar29)))->Room)::GetTopLeftPos();
|
|
local_87c = GHIDRA_CAST<Room *>(*puVar13);
|
|
local_8cc = GHIDRA_CAST<Room *>(puVar13[1]);
|
|
pRVar29 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
puVar13 = GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<Room *>((pRVar29)))->Room)::GetBottomRightPos();
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>(*puVar13);
|
|
local_8e0 = GHIDRA_CAST<Entity_Player *>(puVar13[1]);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x670463);
|
|
ANM2::Play(GHIDRA_CAST<ANM2 *>((room->_gridEntities + 9)),GHIDRA_CAST<uint8_t *>("Stuck"),0);
|
|
if ((float)local_87c <= *GHIDRA_CAST<float *>(pRVar28)) {
|
|
if (*GHIDRA_CAST<float *>(pRVar28) <= (float)local_8ac) {
|
|
if ((float)local_8cc <= (float)room->_gridEntities[199]) {
|
|
if ((float)local_8e0 < (float)room->_gridEntities[199]) {
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::set_flip_x(zeroConst < (GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))->x);
|
|
set_byte_0x101(GHIDRA_CAST<ANM2 *>((room->_gridEntities + 9)),1);
|
|
}
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::set_flip_x((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))->x <= zeroConst &&
|
|
zeroConst != (GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))->x);
|
|
}
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::SetRotation(90.0);
|
|
}
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::SetRotation(90.0);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::set_flip_x(1);
|
|
}
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::operator_assign(&g_vectorZero);
|
|
room->_gridEntities[0x58] = (void *)0x0;
|
|
room->_gridEntities[0x59] = (void *)0x0;
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x14f)) = 1;
|
|
room->_gridEntities[0x114] = (void *)(GHIDRA_UINT(room->_gridEntities[0x114]) | 3);
|
|
}
|
|
pRVar29 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Room *>((pRVar29)))->Room)::GetGridIndex(GHIDRA_CAST<Vector *>(pRVar28));
|
|
if (-1 < GHIDRA_INT(local_87c)) {
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
(GHIDRA_CAST<EntityRef *>((&local_2598)))->EntityRef::constructor(GHIDRA_CAST<Entity *>(room));
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x0);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(local_87c);
|
|
Room::DestroyGridWithSource(pRVar28);
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
bVar4 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::IsBeastDungeon();
|
|
if (bVar4 != 0) goto LAB_0066fcf0;
|
|
LAB_00670254:
|
|
pBVar6 = BitSet128::operator_and
|
|
(&spectralMask3,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagSpectral);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
puVar19 = &DAT_00000006;
|
|
if (bVar4 != 0) {
|
|
puVar19 = GHIDRA_CAST<uint8_t *>(0x3);
|
|
}
|
|
room->_gridEntities[0x58] = puVar19;
|
|
if (*GHIDRA_CAST<uint8_t *>((room->_gridEntities + 0x5b)) != 0) {
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf));
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)))))->Vector::__sub(&local_12a8,pVVar9);
|
|
try_make_bridges();
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::Normalize();
|
|
local_af0 = (void *)(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0x5c)))))->Vector::Length();
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::operator_mul_assign(GHIDRA_CAST<float *>(&local_af0));
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagTractorBeam)))->BitSet128::__bnot(¬TractorBeam);
|
|
FUN_005cd430();
|
|
(GHIDRA_CAST<msvc::vector *>((room->_gridEntities + 0x108)))->msvc::vector::clear(0);
|
|
local_87c = GHIDRA_CAST<Room *>(oneConst);
|
|
pRVar28 = GHIDRA_CAST<Room *>(oneConst);
|
|
if (room->_gridEntities[0xe9] != GHIDRA_CAST<Entity *>(0x0)) {
|
|
bVar4 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe9])))->Entity::is_player();
|
|
if (bVar4 == 0) {
|
|
pRVar28 = local_87c;
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<Entity_Player *>((room->_gridEntities[0xe9])))->Entity_Player::IsLocalPlayer();
|
|
}
|
|
}
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x2);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x389);
|
|
SoundEffects::PlayWithFartOverride(0x389,(float)pRVar28,2,0,1.0);
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
bVar4 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::is_type_16();
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagBounce)))->BitSet128::__bnot(¬Bounce);
|
|
FUN_005cd430();
|
|
}
|
|
}
|
|
LAB_00670391:
|
|
if (room->_gridEntities[2] == &DAT_00000009) goto LAB_0067039b;
|
|
}
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
if (((room->_gridEntities[2] == &DAT_0000002b) || (room->_gridEntities[2] == &DAT_0000002c)) &&
|
|
((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x14f)) == 0 &&
|
|
(local_8b0 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Entity *>((room->_gridEntities[0xe9])))->Entity)::ToPlayer(), local_8b0 != GHIDRA_CAST<Room *>(0x0)))))
|
|
{
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_9cc,GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)));
|
|
bVar4 = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::operator_ne(&g_vectorZero);
|
|
if (bVar4 != 0) {
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::Normalized(&direction12);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_12b8,GHIDRA_CAST<float *>((room->_gridEntities + 0xd3)));
|
|
(GHIDRA_CAST<Vector *>((&local_9cc)))->Vector::operator_add_assign(pVVar9);
|
|
}
|
|
local_890 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
uVar10 = (GHIDRA_CAST<Room *>((local_890)))->Room::GetGridIndex(&local_9cc);
|
|
if (-1 < GHIDRA_INT(uVar10)) {
|
|
local_88c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Room *>((local_890)))->Room)::GetGridEntity(uVar10);
|
|
pos.y = local_9cc.y;
|
|
pos.x = local_9cc.x;
|
|
local_8cc = GHIDRA_CAST<Room *>((GHIDRA_CAST<Room *>((local_890)))->Room)::GetGridCollisionAtPos(pos);
|
|
local_898 = room->_gridEntities[0x58];
|
|
if (local_88c != GHIDRA_CAST<Room *>(0x0)) {
|
|
iVar7 = (GHIDRA_CAST<GridEntity *>((GHIDRA_CAST<GridEntity *>(local_88c))))->GridEntity::GetType();
|
|
if ((iVar7 == 0x10) && (local_8cc == GHIDRA_CAST<Room *>(&DAT_00000004))) {
|
|
bVar4 = (GHIDRA_CAST<GridEntity_Door *>((GHIDRA_CAST<GridEntity_Door *>(local_88c))))->GridEntity_Door::IsLocked();
|
|
if ((bVar4 == 0) || (cVar5 = FUN_00436000(), cVar5 != '\0')) {
|
|
bVar4 = (GHIDRA_CAST<GridEntity_Door *>((GHIDRA_CAST<GridEntity_Door *>(local_88c))))->GridEntity_Door::IsRoomType(7);
|
|
if ((bVar4 == 0) &&
|
|
(bVar4 = (GHIDRA_CAST<GridEntity_Door *>((GHIDRA_CAST<GridEntity_Door *>(local_88c))))->GridEntity_Door::IsRoomType(8), bVar4 == 0)) {
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(local_88c))))->EntityList::Size();
|
|
if (iVar7 == 2) goto LAB_006708cc;
|
|
(GHIDRA_CAST<GridEntity_Door *>((GHIDRA_CAST<GridEntity_Door *>(local_88c))))->GridEntity_Door::Open();
|
|
}
|
|
else {
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(local_88c) + 0x14);
|
|
(GHIDRA_CAST<EntityRef *>((&local_25e8)))->EntityRef::EntityRef();
|
|
(*pcVar1)();
|
|
}
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<GridEntity_Door *>((GHIDRA_CAST<GridEntity_Door *>(local_88c))))->GridEntity_Door::TryUnlock(GHIDRA_CAST<Entity_Player *>(local_8b0),1);
|
|
}
|
|
LAB_00670792:
|
|
if (local_898 == GHIDRA_CAST<Room *>(&DAT_00000004)) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::Die();
|
|
}
|
|
}
|
|
else {
|
|
iVar7 = (GHIDRA_CAST<GridEntity *>((GHIDRA_CAST<GridEntity *>(local_88c))))->GridEntity::GetType();
|
|
if (iVar7 == 0xb) {
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(local_88c))))->EntityList::Size();
|
|
if (iVar7 == 0) {
|
|
(GHIDRA_CAST<GridEntity_Lock *>((GHIDRA_CAST<GridEntity_Lock *>(local_88c))))->GridEntity_Lock::try_unlock(GHIDRA_CAST<Entity_Player *>(local_8b0),1)
|
|
;
|
|
goto LAB_00670792;
|
|
}
|
|
}
|
|
else if ((((local_8cc == GHIDRA_CAST<Room *>(0x3)) || (local_8cc == GHIDRA_CAST<Room *>(0x2))) &&
|
|
(iVar7 = FUN_00499db0(), iVar7 == 3)) &&
|
|
((local_898 == GHIDRA_CAST<Room *>(&DAT_00000004) || (iVar7 = Isaac::Random(8), iVar7 == 0))))
|
|
{
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(local_88c) + 0x14);
|
|
(GHIDRA_CAST<EntityRef *>((&local_25c0)))->EntityRef::constructor(GHIDRA_CAST<Entity *>(room));
|
|
cVar5 = (*pcVar1)();
|
|
if (cVar5 != '\0') {
|
|
if (local_898 == GHIDRA_CAST<Room *>(&DAT_00000004)) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::Die();
|
|
}
|
|
(GHIDRA_CAST<GridEntity *>((GHIDRA_CAST<GridEntity *>(local_88c))))->GridEntity::Position(&gridPos);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&gridPos)))->Vector::__sub(&local_12c0,GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)));
|
|
pVVar9 = Vector::ToCardinal(&cardinalDir,pVVar9);
|
|
local_af4 = (void *)0x42200000;
|
|
pVVar9 = Vector::operator_mul(&local_12d0,GHIDRA_CAST<float *>(&local_af4),pVVar9);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&gridPos)))->Vector::__add(&local_12d8,pVVar9);
|
|
uVar10 = (GHIDRA_CAST<Room *>((local_890)))->Room::GetGridIndex(pVVar9);
|
|
if (-1 < GHIDRA_INT(uVar10)) {
|
|
pRVar28 = local_88c;
|
|
gridEntity = (GHIDRA_CAST<Room *>((local_890)))->Room::GetGridEntity(uVar10);
|
|
(GHIDRA_CAST<Room *>((local_890)))->Room::TryMakeBridge(gridEntity,GHIDRA_CAST<GridEntity *>(pRVar28));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
LAB_006708cc:
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>((local_d08 + 0x10));
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x6708f0);
|
|
EntityList::QueryRadius(entityList,GHIDRA_CAST<EntityList_EL *>(outResult),pVVar9,24.0,0x10);
|
|
ehState = 8;
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>((local_d08 + 0x10)))))->EntityList::Size();
|
|
pRVar28 = local_8b0;
|
|
if (iVar7 != 0) {
|
|
uVar10 = 0;
|
|
do {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
local_890 = GHIDRA_CAST<Room *>(*puVar13);
|
|
if (local_890 != GHIDRA_CAST<Room *>(0x0)) {
|
|
cVar5 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_890))))->Entity::is_pickup();
|
|
if ((cVar5 == '\0') ||
|
|
(((iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_890))))->Entity::Variant(), iVar7 != 0x3c &&
|
|
(iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_890))))->Entity::Variant(), iVar7 != 0x35)) &&
|
|
(iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_890))))->Entity::Variant(), iVar7 != 0x37)))) {
|
|
cVar5 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_890))))->Entity::is_slot();
|
|
if ((cVar5 != '\0') && (iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_890))))->Entity::Variant(), iVar7 == 7)) {
|
|
Entity::ForceCollide(GHIDRA_CAST<Entity *>(pRVar28),GHIDRA_CAST<Entity *>(local_890),1);
|
|
}
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<Entity_Pickup *>((GHIDRA_CAST<Entity_Pickup *>(local_890))))->Entity_Pickup::TryOpenChest(GHIDRA_CAST<Entity_Player *>(pRVar28));
|
|
}
|
|
}
|
|
uVar10 = uVar10 + 1;
|
|
uVar18 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>((local_d08 + 0x10)))))->EntityList::Size();
|
|
} while (uVar10 < uVar18);
|
|
pVVar9 = &tear->_pos;
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
}
|
|
ehState = -1;
|
|
(GHIDRA_CAST<EntityList_Query *>((local_d08 + 0x10)))->EntityList_Query::~EntityList_Query();
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask20,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagLudovico
|
|
);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
local_888 = GHIDRA_CAST<Room *>((GHIDRA_UINT(room->_gridEntities[3]) >> 1 & 0xffffff01));
|
|
local_8a1 = is_not_familiar_spawned(GHIDRA_CAST<Entity_Tear *>(room));
|
|
if ((char)local_888 == '\0') {
|
|
decayFactor = 0.7;
|
|
}
|
|
else {
|
|
decayFactor = 0.98;
|
|
}
|
|
pRVar28 = GHIDRA_CAST<Room *>((decayFactor * (float)room->_gridEntities[0xd2]));
|
|
room->_gridEntities[0xd2] = pRVar28;
|
|
local_890 = GHIDRA_CAST<Room *>(GetRootPlayer(GHIDRA_CAST<Entity_Tear *>(room)));
|
|
if (local_890 == GHIDRA_CAST<Room *>(0x0)) {
|
|
pRVar28 = GHIDRA_CAST<Room *>(0x41200000);
|
|
}
|
|
else {
|
|
FUN_005cd750();
|
|
}
|
|
local_8cc = pRVar28;
|
|
pBVar6 = BitSet128::operator_and
|
|
(&flatMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagFlat);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
if (local_890 == GHIDRA_CAST<Room *>(0x0)) {
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x670aac);
|
|
bVar4 = (GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(0x0))))->Entity_Player::HasTrinket(0xc,0);
|
|
if (bVar4 != 0) goto LAB_00670ae2;
|
|
}
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&local_12e0)))->Vector::Vector(oneConst,oneConst);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xd4)))))->Vector::operator_assign(pVVar14);
|
|
FUN_00665a50();
|
|
}
|
|
LAB_00670ae2:
|
|
if ((room->_gridEntities[0xe6] != GHIDRA_CAST<Entity *>(0x0)) &&
|
|
(bVar4 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::IsFamiliar(), bVar4 != 0)) {
|
|
local_8dc = (void *)((float)local_8dc * (float)local_8ec);
|
|
}
|
|
local_8b0 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector)::Length();
|
|
if ((char)local_888 != '\0') {
|
|
decayFactor = assert_lerp_range((float)local_8b0,10.0,20.0,0.9,2.0,1);
|
|
local_8dc = (void *)(decayFactor * (float)local_8dc);
|
|
}
|
|
local_89c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity)::GetIntervalTicks((float)local_8cc,zeroConst);
|
|
if (local_89c != GHIDRA_CAST<Room *>(0x0)) {
|
|
(GHIDRA_CAST<msvc::vector *>((room->_gridEntities + 0x108)))->msvc::vector::clear(0);
|
|
try_make_bridges();
|
|
if (local_890 != GHIDRA_CAST<Room *>(0x0)) {
|
|
pEVar11 = room->_gridEntities[0xe9];
|
|
iVar7 = Isaac::Random(2);
|
|
pRVar28 = local_890;
|
|
Entity_Player::GetTearHitParams
|
|
(GHIDRA_CAST<Entity_Player *>(local_890),&local_f8,8,1.0,iVar7 * 2 + -1,pEVar11);
|
|
room->_gridEntities[0x118] = (void *)0x0;
|
|
if (room->_gridEntities[2] != (void *)local_f8._tearVariant) {
|
|
room->_gridEntities[2] = (void *)local_f8._tearVariant;
|
|
cVar5 = FUN_00665cc0();
|
|
if (cVar5 != '\0') {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::LoadEntityConfig();
|
|
room->_gridEntities[0x58] = (void *)0x0;
|
|
if (room->_gridEntities[0xc3] != (void *)0x0) {
|
|
ANM2::Load(GHIDRA_CAST<ANM2 *>((room->_gridEntities + 9)),
|
|
GHIDRA_CAST<std_string *>((GHIDRA_INT(room->_gridEntities[0xc3]) + 0x74)),1);
|
|
bVar4 = 0;
|
|
psVar21 = (std_string *)
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::GetDefaultAnimationName();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::Play(psVar21,bVar4);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::SetRotation(0.0);
|
|
ResetSpriteScale(GHIDRA_CAST<Entity_Tear *>(room));
|
|
}
|
|
}
|
|
}
|
|
if ((char)local_888 != '\0') {
|
|
if (10.0 < (float)local_8b0) {
|
|
decayFactor = assert_lerp_range((float)local_8b0,10.0,20.0,oneConst,6.0,1);
|
|
local_f8._tearDamage = decayFactor * local_f8._tearDamage;
|
|
decayFactor = assert_lerp_range((float)local_8b0,10.0,(float)local_8fc,zeroConst,6.0,1);
|
|
local_f8._tearDamage = decayFactor + local_f8._tearDamage;
|
|
}
|
|
(GHIDRA_CAST<BitSet128 *>((&local_f8._flags)))->BitSet128::operator__(&g_tearFlagSpectral);
|
|
}
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
room->_gridEntities[0xd9] = (void *)local_f8._tearDamage;
|
|
(*pcVar1)();
|
|
pBVar8 = &g_tearFlagLudovico;
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagBounce)))->BitSet128::__bnot(¬Bounce2);
|
|
pBVar6 = BitSet128::operator_and(&andResult24,&local_f8._flags,pBVar6);
|
|
pBVar6 = BitSet128::operator_or(&orResult13,pBVar6,pBVar8);
|
|
pRVar29 = *GHIDRA_CAST<Room **>(&pBVar6->_l);
|
|
outResult = *GHIDRA_CAST<TypeDescriptor **>((GHIDRA_INT(&pBVar6->_l) + 4));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(flags_02._h)) + 0x1))) = (char)(pBVar6->_h >> 8);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(flags_02)) + 0x0))) = *GHIDRA_CAST<unkbyte9 *>(pBVar6);
|
|
(*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(&(flags_02._h)) + 0x2))) = (short)(pBVar6->_h >> 0x10);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags_02._h)) + 0x4))) = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&pBVar6->_h) + 4));
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(pRVar29);
|
|
SetTearFlags(GHIDRA_CAST<Entity_Tear *>(room),flags_02);
|
|
if (local_8a1 != 0) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&growMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagGrow)
|
|
;
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::Position(&parentPos5);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Distance(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)));
|
|
decayFactor = Math::clamp(oneConst,700.0,(float)local_87c);
|
|
pRVar29 = GHIDRA_CAST<Room *>(((decayFactor / 700.0 + oneConst) * (float)room->_gridEntities[0xd9]));
|
|
room->_gridEntities[0xd9] = pRVar29;
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&shrinkMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagShrink);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::Position(&parentPos6);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Distance(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)));
|
|
decayFactor = Math::clamp(zeroConst,700.0,(float)local_87c);
|
|
pRVar29 = GHIDRA_CAST<Room *>((decayFactor / 900.0));
|
|
room->_gridEntities[0xd9] =
|
|
(void *)((oneConst - (float)pRVar29) * (float)room->_gridEntities[0xd9]);
|
|
}
|
|
pRVar28 = local_890;
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&occultMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagOccult);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (((bVar4 == 0) ||
|
|
(iVar7 = (GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<Entity_Player *>(pRVar28))))->Entity_Player::GetFireDirection(), iVar7 == -1)) ||
|
|
(GHIDRA_INT(local_89c) < 1)) {
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
}
|
|
else {
|
|
do {
|
|
pVVar9 = MusicManager::RandomVector(&randomDir4);
|
|
FUN_00436190();
|
|
pRVar29 = GHIDRA_CAST<Room *>(((float)pRVar29 * 10.0));
|
|
local_af8 = pRVar29;
|
|
pVVar14 = Vector::operator_mul(&local_1300,GHIDRA_CAST<float *>(&local_af8),pVVar9);
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(&DAT_00000007);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(pVVar14->y);
|
|
Entity_Player::FireTear(GHIDRA_CAST<Entity_Player *>(local_890),pVVar9,*pVVar14,7,GHIDRA_CAST<Entity *>(room),1.0)
|
|
;
|
|
local_89c = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_89c[-1])) + 0x7897))));
|
|
} while (local_89c != GHIDRA_CAST<Room *>(0x0));
|
|
local_89c = GHIDRA_CAST<Room *>(0x0);
|
|
}
|
|
}
|
|
}
|
|
if (local_8a1 == 0) {
|
|
if (((room->_gridEntities[0xe6] != (void *)0x0) && (iVar7 = (GHIDRA_CAST<Entity *>(()))->Entity::Type(), iVar7 == 2)) &&
|
|
(pvVar20 = (void *)(GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::Variant(),
|
|
room->_gridEntities[2] != pvVar20)) {
|
|
room->_gridEntities[2] = pvVar20;
|
|
cVar5 = FUN_00665cc0();
|
|
if (cVar5 != '\0') {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::LoadEntityConfig();
|
|
if (room->_gridEntities[0xc3] != (void *)0x0) {
|
|
ANM2::Load(GHIDRA_CAST<ANM2 *>((room->_gridEntities + 9)),
|
|
GHIDRA_CAST<std_string *>((GHIDRA_INT(room->_gridEntities[0xc3]) + 0x74)),1);
|
|
bVar4 = 0;
|
|
psVar21 = (std_string *)
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::GetDefaultAnimationName();
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x6715e3);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::Play(psVar21,bVar4);
|
|
ResetSpriteScale(GHIDRA_CAST<Entity_Tear *>(room));
|
|
}
|
|
}
|
|
}
|
|
puVar19 = room->_gridEntities[2];
|
|
if (((puVar19 == &DAT_00000005) || (puVar19 == &DAT_00000006)) ||
|
|
((puVar19 == &DAT_00000007 ||
|
|
(((puVar19 == &DAT_00000014 || (puVar19 == GHIDRA_CAST<uint8_t *>(0x21))) ||
|
|
(puVar19 == GHIDRA_CAST<uint8_t *>(0x22))))))) {
|
|
LAB_0067162f:
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::SetRotation((float)room->_gridEntities[0x10d]);
|
|
}
|
|
else {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&flatMask3,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagFlat);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) goto LAB_0067162f;
|
|
}
|
|
if ((GHIDRA_UINT(room->_gridEntities[3]) & 1) != 0) {
|
|
if (room->_gridEntities[0xe6] != GHIDRA_CAST<Entity *>(0x0)) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::Position(&parentPos7);
|
|
pVVar25 = GHIDRA_CAST<Vector *>((room->_gridPaths + 0x22));
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(tear))))->Entity::FrameCount();
|
|
iVar7 = iVar7 + tear->_index * 0x32;
|
|
decayFactor = sinf_wrapper((float)((double)iVar7 +
|
|
__uint_to_double_fixup[-(iVar7 >> 0x1f)]) * 0.08);
|
|
local_87c = GHIDRA_CAST<Room *>((decayFactor * halfConst + oneConst));
|
|
decayFactor = (GHIDRA_CAST<Vector *>((pVVar25)))->Vector::Length();
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar25)))->Vector::Resized(&resized2,decayFactor * (float)local_87c);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_1388,pVVar14);
|
|
pVVar9 = tearPos;
|
|
(GHIDRA_CAST<Vector *>((tearPos)))->Vector::operator_assign(pVVar14);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x67174f);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar25)))->Vector::Rotated(&rotatedDir,
|
|
((float)(GHIDRA_UINT(tear->_index) % 10) + 0.0) * 0.1 - 4.0);
|
|
(GHIDRA_CAST<Vector *>((pVVar25)))->Vector::operator_assign(pVVar14);
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
}
|
|
}
|
|
if (room->_gridEntities[0xe6] == (void *)0x0) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x28))();
|
|
}
|
|
}
|
|
else {
|
|
FUN_00424510();
|
|
ehState = 9;
|
|
for (chainChild = GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity)::Child(); chainChild != GHIDRA_CAST<Entity *>(0x0);
|
|
chainChild = GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>((chainChild)))->Entity)::Child()) {
|
|
msvc::vector<unsigned_int>::push_back();
|
|
}
|
|
local_8ec = (void *)0x0;
|
|
iVar7 = (GHIDRA_CAST<msvc::vector *>((local_9e0)))->msvc::vector::size();
|
|
if (iVar7 != 0) {
|
|
do {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(FUN_0042c810());
|
|
local_898 = GHIDRA_CAST<Room *>(*puVar13);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::SetVelocity(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)));
|
|
local_8b0 = GHIDRA_CAST<Room *>(((float)((double)GHIDRA_INT(local_8ec) +
|
|
__uint_to_double_fixup[-(GHIDRA_INT(local_8ec) >> 0x1f)]) * 360.0));
|
|
iVar7 = (GHIDRA_CAST<msvc::vector *>((local_9e0)))->msvc::vector::size();
|
|
local_8b0 = GHIDRA_CAST<Room *>(((float)local_8b0 /
|
|
(float)((double)iVar7 + __uint_to_double_fixup[-(iVar7 >> 0x1f)])));
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::FrameCount();
|
|
local_8cc = GHIDRA_CAST<Room *>(((float)iVar7 * 5.0 + (float)local_8b0));
|
|
local_948 = (void *)((float)room->_gridEntities[0xd3] + (float)room->_gridEntities[0xd3]);
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::FrameCount();
|
|
if (iVar7 < 0x32) {
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::FrameCount();
|
|
local_948 = (void *)(((float)iVar7 / 50.0) * (float)local_948);
|
|
}
|
|
pVVar14 = Vector::FromAngle(&angleDir7,(float)local_8cc);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__mul(&local_1310,GHIDRA_CAST<float *>(&local_948));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_1318,pVVar14);
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::Position(&entityPos21);
|
|
bVar4 = 0;
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&local_1328,pVVar14);
|
|
pRVar28 = local_898;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_898))))->Entity::AddVelocity_divided(pVVar9,bVar4);
|
|
fVar27 = (long double)Scale(GHIDRA_CAST<Entity_Tear *>(room));
|
|
SetScale(GHIDRA_CAST<Entity_Tear *>(pRVar28),(float)(fVar27 * (long double)0.5));
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(pRVar28) + 0x3c);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::GetColor();
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0xff);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xffffffff);
|
|
(*pcVar1)();
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagExplosive)))->BitSet128::__bnot(¬Explosive2);
|
|
pBVar6 = BitSet128::operator_and
|
|
(&andResult25,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),pBVar6);
|
|
pRVar28 = local_898;
|
|
SetTearFlags(GHIDRA_CAST<Entity_Tear *>(local_898),*pBVar6);
|
|
FUN_0044bfa0();
|
|
(**(code **)(*GHIDRA_CAST<int *>(pRVar28) + 0x40))();
|
|
normalize_angle_degrees((float)local_8cc + 90.0);
|
|
FUN_004aadb0();
|
|
pvVar24 = (void *)(GHIDRA_INT(local_8ec) + 1);
|
|
local_8ec = pvVar24;
|
|
pvVar20 = (void *)(GHIDRA_CAST<msvc::vector *>((local_9e0)))->msvc::vector::size();
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
} while (pvVar24 < pvVar20);
|
|
}
|
|
if (room->_gridEntities[0xe6] != GHIDRA_CAST<Entity *>(0x0)) {
|
|
bVar4 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::IsFamiliar();
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>((local_d68 + 0x10));
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x67126f);
|
|
EntityList::QueryRadius
|
|
(entityList,GHIDRA_CAST<EntityList_EL *>(outResult),GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)),
|
|
24.0,4);
|
|
ehState = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(ehState)) + 0x1))),10);
|
|
local_8b0 = GHIDRA_CAST<Room *>(0x0);
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>((local_d68 + 0x10)))))->EntityList::Size();
|
|
if (iVar7 != 0) {
|
|
do {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
local_8cc = GHIDRA_CAST<Room *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(*puVar13))))->Entity)::ToTear();
|
|
if ((local_8cc != GHIDRA_CAST<Room *>(0x0)) && (local_8cc != room)) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask21,GHIDRA_CAST<BitSet128 *>((local_8cc->_gridEntities + 0x101)),
|
|
&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) &&
|
|
(bVar4 = is_not_familiar_spawned(GHIDRA_CAST<Entity_Tear *>(local_8cc)), bVar4 != 0)) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8cc))))->Entity::Position(&entityPos22);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x671317);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)))))->Vector::__sub(&local_984,pVVar9);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&local_984)))->Vector)::Length();
|
|
if (24.0 <= (float)local_87c) {
|
|
local_978 = GHIDRA_CAST<Room *>(zeroConst);
|
|
}
|
|
else {
|
|
decayFactor = (GHIDRA_CAST<Vector *>((&local_984)))->Vector::Length();
|
|
local_87c = GHIDRA_CAST<Room *>((4.0 / (decayFactor + 1.0)));
|
|
local_978 = local_87c;
|
|
}
|
|
bVar4 = (GHIDRA_CAST<Vector *>((&local_984)))->Vector::operator_eq(&g_vectorZero);
|
|
if (bVar4 != 0) {
|
|
pVVar9 = MusicManager::RandomVector(&randomDir5);
|
|
(GHIDRA_CAST<Vector *>((&local_984)))->Vector::operator_assign(pVVar9);
|
|
}
|
|
if (zeroConst < (float)local_978) {
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_984)))->Vector::Normalized(&direction13);
|
|
bVar4 = 0;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x6713d7);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__mul(&local_1348,GHIDRA_CAST<float *>(&local_978));
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x6713df);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::AddVelocity_divided(pVVar9,bVar4);
|
|
}
|
|
}
|
|
}
|
|
local_8b0 = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_8b0)) + 0x1))));
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>((local_d68 + 0x10)))))->EntityList)::Size();
|
|
} while (local_8b0 < pRVar28);
|
|
}
|
|
ehState = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(ehState)) + 0x1))),9);
|
|
(GHIDRA_CAST<EntityList_Query *>((local_d68 + 0x10)))->EntityList_Query::~EntityList_Query();
|
|
}
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::Position(&parentPos8);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar14)))->Vector)::DistanceSquared(pVVar9);
|
|
if ((char)local_888 != '\0') {
|
|
if ((float)local_87c <= 1600.0) {
|
|
ehState = -1;
|
|
room->_gridEntities[0xd2] = (void *)((float)room->_gridEntities[0xd2] * 0.9);
|
|
FID_conflict__Tidy(local_9e0);
|
|
}
|
|
else {
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::Position(&parentPos9);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__sub(&local_1360,pVVar9);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::Normalized(&direction14);
|
|
bVar4 = 0;
|
|
local_afc = (void *)0x3dcccccd;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x6714a7);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__mul(&local_1370,GHIDRA_CAST<float *>(&local_afc));
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x6714af);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::AddVelocity_divided(pVVar14,bVar4);
|
|
ehState = -1;
|
|
FID_conflict__Tidy(local_9e0);
|
|
}
|
|
goto LAB_0067176f;
|
|
}
|
|
bVar4 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::is_player();
|
|
if (bVar4 != 0) {
|
|
outResult = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x0);
|
|
pEVar17 = GHIDRA_CAST<Entity_Player *>(__RTDynamicCast());
|
|
bVar4 = (GHIDRA_CAST<Entity_Player *>((pEVar17)))->Entity_Player::HasWeaponType(8);
|
|
if (bVar4 == 0) {
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity)::Child();
|
|
while (pRVar28 != GHIDRA_CAST<Room *>(0x0)) {
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(pRVar28))))->Entity)::Child();
|
|
(**(code **)(*GHIDRA_CAST<int *>(pRVar28) + 0x28))();
|
|
pRVar28 = local_87c;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
ehState = -1;
|
|
FID_conflict__Tidy(local_9e0);
|
|
}
|
|
}
|
|
LAB_0067176f:
|
|
Game::GetField26614(g_game);
|
|
cVar5 = DeathmatchManager::is_active();
|
|
if (cVar5 == '\0') {
|
|
LAB_006717e1:
|
|
local_8a1 = '\0';
|
|
}
|
|
else {
|
|
playerManager = GHIDRA_CAST<PlayerManager *>(Game)::GetPlayerManager(g_game);
|
|
bVar4 = PlayerManager::AnyoneHasCollectible(playerManager,0x1a7);
|
|
if (bVar4 == 0) goto LAB_006717e1;
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x6717b0);
|
|
(GHIDRA_CAST<RNG *>((&local_8c)))->RNG::game_constructor(GHIDRA_UINT(room->_gridEntities[0xf2]),0x2c);
|
|
ehState = 0xb;
|
|
local_8f8 = GHIDRA_CAST<Room *>((GHIDRA_UINT(local_8f8) | 1));
|
|
local_87c = local_8f8;
|
|
uVar10 = (GHIDRA_CAST<RNG *>((laser)))->RNG::RandomInt(100);
|
|
local_8a1 = '\x01';
|
|
if (0x20 < uVar10) goto LAB_006717e1;
|
|
}
|
|
ehState = -1;
|
|
if ((GHIDRA_UINT(local_8f8) & 1) != 0) {
|
|
guard_check_icall();
|
|
}
|
|
if (local_8a1 != '\0') {
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x3);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(&DAT_00000008);
|
|
EntityList::QuerySublist(entityList,GHIDRA_CAST<EntityList_EL *>(local_d68),7,8,3,1,0);
|
|
ehState = 0xc;
|
|
local_8f8 = GHIDRA_CAST<Room *>(0x0);
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(local_d68))))->EntityList::Size();
|
|
if (iVar7 != 0) {
|
|
while( true ) {
|
|
msvc::vector<int>::operator_index();
|
|
outResult = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor;
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x0);
|
|
local_8cc = GHIDRA_CAST<Room *>(__RTDynamicCast());
|
|
local_888 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8cc))))->Entity)::SpawnerEntity();
|
|
if ((local_888 != GHIDRA_CAST<Room *>(0x0)) &&
|
|
(bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_888))))->Entity::is_player(), bVar4 == 0)) {
|
|
local_888 = GHIDRA_CAST<Room *>(0x0);
|
|
}
|
|
if (room->_gridEntities[0xe9] != local_888) {
|
|
fVar27 = (long double)(GHIDRA_CAST<Entity_Laser *>((GHIDRA_CAST<Entity_Laser *>(local_8cc))))->Entity_Laser::Radius();
|
|
local_87c = GHIDRA_CAST<Room *>((float)fVar27);
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8cc))))->Entity::Position(&entityPos23);
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::DistanceSquared(pVVar14);
|
|
if ((float)local_8ac < (float)local_87c * (float)local_87c) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x28))();
|
|
pRVar28 = local_888;
|
|
if (local_888 == GHIDRA_CAST<Room *>(0x0)) {
|
|
(GHIDRA_CAST<TearParams *>((&local_878)))->TearParams::constructor();
|
|
other = extraout_EAX;
|
|
}
|
|
else {
|
|
pEVar11 = GHIDRA_CAST<Entity *>(0x0);
|
|
iVar7 = Isaac::Random(2);
|
|
other = Entity_Player::GetTearHitParams
|
|
(GHIDRA_CAST<Entity_Player *>(pRVar28),local_810,1,1.0,iVar7 * 2 + -1,pEVar11);
|
|
}
|
|
(GHIDRA_CAST<TearParams *>((&tearHitParams)))->TearParams::copy(other);
|
|
uVar10 = Random();
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::__unm(&negated3);
|
|
Game::Spawn(g_game,2,0,GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)),pVVar9,GHIDRA_CAST<Entity *>(local_888)
|
|
,0,uVar10);
|
|
spawnedTear = GHIDRA_CAST<Entity_Tear *>(__RTDynamicCast());
|
|
Entity_Projectile::SetHeight
|
|
(GHIDRA_CAST<Entity_Projectile *>(spawnedTear),(float)room->_gridEntities[0xfb]);
|
|
FUN_00444c70();
|
|
spawnedTear->SetCollisionDamage();
|
|
SetTearFlags(spawnedTear,g_tearFlagHoming);
|
|
SetScale(spawnedTear,tearHitParams._tearScale);
|
|
Entity_Projectile::set_falling_accel
|
|
(GHIDRA_CAST<Entity_Projectile *>(spawnedTear),(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xfd)))->x)
|
|
;
|
|
(GHIDRA_CAST<Color *>(()))->Color::Color();
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x0);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0xff);
|
|
spawnedTear->SetColor();
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(spawnedTear))))->Entity::SetParent(GHIDRA_CAST<Entity *>(local_888));
|
|
spawnedTear->Update();
|
|
}
|
|
}
|
|
puVar23 = &(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_8f8)) + 0x1)));
|
|
local_8f8 = GHIDRA_CAST<Room *>(puVar23);
|
|
puVar19 = GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(local_d68))))->EntityList)::Size();
|
|
if (puVar19 <= puVar23) break;
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
}
|
|
}
|
|
ehState = -1;
|
|
(GHIDRA_CAST<EntityList_Query *>((local_d68)))->EntityList_Query::~EntityList_Query();
|
|
}
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xff));
|
|
pVVar9->x = (float)local_8dc * (float)room->_gridEntities[0x100];
|
|
local_b00 = (void *)0x3c23d70a;
|
|
local_8c0 = GHIDRA_CAST<Room *>(pVVar9);
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
pVVar9->x = *pfVar15;
|
|
ResetSpriteScale(GHIDRA_CAST<Entity_Tear *>(room));
|
|
if (room->_gridEntities[2] == (void *)0x2e) {
|
|
pEVar30 = room->_gridEntities[0x10c];
|
|
local_8ac = pEVar30;
|
|
if (room->_gridEntities[0xe9] != GHIDRA_CAST<Entity *>(0x0)) {
|
|
local_87c = GHIDRA_CAST<Room *>(((float)pEVar30 * (float)pointSixConst));
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe9])))->Entity::Position(&spawnerPos);
|
|
local_8cc = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::Distance(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6)));
|
|
pEVar30 = (Entity_Projectile *)
|
|
assert_lerp_range((float)local_8cc,zeroConst,160.0,(float)local_8ac,(float)local_87c
|
|
,1);
|
|
}
|
|
room->_gridEntities[0xd9] = pEVar30;
|
|
local_97c = (void *)Math::clamp(pointThreeConst,oneConst,
|
|
(float)room->_gridEntities[0xe0] / (float)local_8fc);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x671bef);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&uniformScale13,GHIDRA_CAST<float *>(&local_97c));
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::SetScale(pVVar9);
|
|
effect = GHIDRA_CAST<Font *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite)::Color();
|
|
decayFactor = Math::clamp(zeroConst,(float)pointSixConst,
|
|
(float)room->_gridEntities[0xe0] / (float)local_8f4);
|
|
Font::SetLineHeightModifier(effect,oneConst - decayFactor);
|
|
local_b04 = (void *)0x3f19999a;
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
room->_gridEntities[0xd3] =
|
|
(void *)(*GHIDRA_CAST<float *>((GHIDRA_INT(room->_gridEntities[0xc3]) + 0x38)) * *pfVar15 * 5.0);
|
|
}
|
|
bVar4 = Game::IsInTimedSet(g_game,0x25);
|
|
if (bVar4 != 0) {
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Color *>(()))->Color::Color();
|
|
(*pcVar1)();
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x0);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x3f800000);
|
|
color = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Color *>(()))->Color)::Color();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::SetColor(color);
|
|
}
|
|
prevPos.y = (float)room->_gridEntities[199];
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
prevPos.x = pVVar9->x;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::Update();
|
|
pBVar6 = BitSet128::operator_and
|
|
(&bit127Mask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
GHIDRA_CAST<BitSet128 *>(&DAT_00c346d0));
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
if (room->_gridEntities[0xe6] != (void *)0x0) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&bit125Mask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
GHIDRA_CAST<BitSet128 *>(&DAT_00c346b0));
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (((bVar4 == 0) || (iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::FrameCount(), iVar7 < 1)) ||
|
|
((0 < room->_gridPaths[0x34] &&
|
|
(iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::GetIntervalTicks((float)room->_gridPaths[0x34],zeroConst),
|
|
iVar7 == 0)))) {
|
|
local_8f4 = GHIDRA_CAST<Entity_Player *>((room->_gridEntities + 0xcf));
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_13b8,GHIDRA_CAST<Vector *>(local_8f4));
|
|
pVVar14 = GHIDRA_CAST<Vector *>(FUN_004172b0());
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&local_cc8,pVVar14);
|
|
local_95c = (void *)(GHIDRA_CAST<Vector *>((&local_cc8)))->Vector::Length();
|
|
if ((float)local_95c != zeroConst) {
|
|
(GHIDRA_CAST<Vector *>((&local_cc8)))->Vector::__div(&local_c88,GHIDRA_CAST<float *>(&local_95c));
|
|
decayFactor = (GHIDRA_CAST<Vector *>((&local_c88)))->Vector::GetAngleDegrees();
|
|
room->_gridPaths[0x35] = GHIDRA_INT(decayFactor);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>(local_8f4))))->Vector::operator__(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc4)));
|
|
bVar4 = 0;
|
|
local_b08 = (void *)((50.0 - (float)local_95c) * 0.1);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_c88)))->Vector::__mul(local_13c8,GHIDRA_CAST<float *>(&local_b08));
|
|
pVVar9 = vector_lerp(&lerped,GHIDRA_CAST<Vector *>(local_8f4),pVVar9,bVar4,pointThreeConst);
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(tear->_parent))))->Entity::Velocity(&parentVel);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_13e0,pVVar14);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>(local_8f4))))->Vector::operator_assign(pVVar9);
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(tear->_parent))))->Entity::Velocity(&parentVel2);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc4)))))->Vector::operator_assign(pVVar9);
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
}
|
|
pvVar20 = (void *)Math::lerp((float)room->_gridEntities[0xfb],-23.0,(float)local_900,0);
|
|
room->_gridEntities[0xfb] = pvVar20;
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::IsFrame(8,0);
|
|
if (bVar4 != 0) {
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Color *>((local_438)))->Color::Color(oneConst,oneConst,oneConst,0.35,0.45,0.5);
|
|
(GHIDRA_CAST<Color *>((aCStackY_3c4c + 0x81)))->Color::operator_assign(&tear->_color);
|
|
FUN_004072e0();
|
|
(*pcVar1)();
|
|
}
|
|
goto LAB_00673502;
|
|
}
|
|
}
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(Vector)::FromAngle(&angleDir8,(float)room->_gridPaths[0x35]);
|
|
in_stack_ffffd9fc = GHIDRA_CAST<Vector *>(0x67201c);
|
|
pVVar14 = Vector::operator_mul
|
|
(&local_13f8,GHIDRA_CAST<float *>((room->_gridPaths + 0x33)),GHIDRA_CAST<Vector *>(outResult));
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::operator_assign(pVVar14);
|
|
room->_gridPaths[0x35] = 0x3c75c28f;
|
|
}
|
|
if (room->_gridEntities[0xe8] != (void *)0x0) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&turnHorizontalMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagTurnHorizontal);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::Normalized(&velDir);
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe8])))->Entity::Position(&targetPos5);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__sub(&local_1408,&prevPos);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__sub(&local_1410,GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)));
|
|
(GHIDRA_CAST<Vector *>((pVVar14)))->Vector::Normalized(&local_d88);
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Vector *>((&local_d88)))->Vector)::Dot(&velDir);
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe8])))->Entity::Position(&targetPos6);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__sub(&local_1420,pVVar9);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x672114);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__sub(&local_1428,GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)));
|
|
(GHIDRA_CAST<Vector *>((pVVar14)))->Vector::Normalized(&local_cd8);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&local_cd8)))->Vector)::Dot(&velDir);
|
|
if ((zeroConst < (float)local_87c) ||
|
|
(((float)local_8ac <= zeroConst && ((float)local_87c < -0.1)))) {
|
|
if (((float)local_87c < -0.1) && ((float)local_8ac < -0.1)) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&homingMask5,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagHoming);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetTarget(GHIDRA_CAST<Entity *>(0x0));
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&velDir)))->Vector::Rotated(&perpDir2,90.0);
|
|
(GHIDRA_CAST<Vector *>((&velDir)))->Vector::operator_assign(pVVar14);
|
|
local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((&velDir)))->Vector)::Dot(&local_cd8);
|
|
if ((float)local_87c < zeroConst) {
|
|
local_b0c = &DAT_bf800000;
|
|
(GHIDRA_CAST<Vector *>((&velDir)))->Vector::operator_mul_assign(GHIDRA_CAST<float *>(&local_b0c));
|
|
}
|
|
local_b10 = (void *)(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::Length();
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x672206);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((&velDir)))->Vector::__mul(&local_1438,GHIDRA_CAST<float *>(&local_b10));
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::operator_assign(pVVar14);
|
|
(GHIDRA_CAST<BitSet128 *>((&g_tearFlagTurnHorizontal)))->BitSet128::__bnot(¬TurnHorizontal);
|
|
FUN_005cd430();
|
|
}
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&stickyMask3,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagSticky);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&boogerMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagBooger);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) goto LAB_006722d8;
|
|
pBVar6 = BitSet128::operator_and
|
|
(&sporeMask3,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagSpore);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) goto LAB_006722d8;
|
|
}
|
|
else {
|
|
LAB_006722d8:
|
|
local_8b0 = GHIDRA_CAST<Room *>((room->_gridEntities + 0x115));
|
|
if (room->_gridEntities[0x115] == (void *)0x0) {
|
|
if (((room->_gridEntities[2] == (void *)0x1a) || (room->_gridEntities[2] == (void *)0x30)) &&
|
|
(bVar4 = ANM2::IsPlaying(GHIDRA_CAST<ANM2 *>((room->_gridEntities + 9)),&s_empty), bVar4 == 0)) {
|
|
pAVar22 = GHIDRA_CAST<ANM2 *>(Config)::GetPillEffects();
|
|
psVar21 = ANM2::GetAnimation(pAVar22,GHIDRA_CAST<std_string *>((local_1d8 + 0x2c)));
|
|
ehState = 0x10;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::Play(psVar21,0);
|
|
ehState = -1;
|
|
(GHIDRA_CAST<msvc::string *>((local_1d8 + 0x2c)))->msvc::string::_Tidy_deallocate();
|
|
}
|
|
}
|
|
else {
|
|
cVar5 = (GHIDRA_CAST<Entity *>(()))->Entity::Visible();
|
|
if ((cVar5 == '\0') ||
|
|
(iVar7 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0x115])))->Entity::EntityCollisionClass(), iVar7 == 0)) {
|
|
(GHIDRA_CAST<EntityPtr *>((GHIDRA_CAST<EntityPtr *>((room->_gridEntities + 0x115)))))->EntityPtr::SetReference(GHIDRA_CAST<Entity *>(0x0));
|
|
(GHIDRA_CAST<msvc::vector *>((room->_gridEntities + 0x108)))->msvc::vector::clear(0);
|
|
if ((room->_gridEntities[2] == (void *)0x1a) || (room->_gridEntities[2] == (void *)0x30)) {
|
|
pAVar22 = GHIDRA_CAST<ANM2 *>(Config)::GetPillEffects();
|
|
psVar21 = ANM2::GetAnimation(pAVar22,&curAnimName);
|
|
ehState = 0xd;
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x6723d6);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::Play(psVar21,0);
|
|
ehState = -1;
|
|
(GHIDRA_CAST<msvc::string *>((curAnimName._buf)))->msvc::string::_Tidy_deallocate();
|
|
}
|
|
}
|
|
else {
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0x115])))->Entity::Velocity(&stickTargetVel);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::operator_assign(pVVar14);
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0x115])))->Entity::Position(&stickTargetPos);
|
|
outResult = GHIDRA_CAST<TypeDescriptor *>(0x672353);
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar14)))->Vector::__add(&local_1450,GHIDRA_CAST<Vector *>((room->_gridEntities + 0x116)));
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::operator_assign(pVVar14);
|
|
if (((room->_gridEntities[2] == (void *)0x1a) || (room->_gridEntities[2] == (void *)0x30))
|
|
&& (bVar4 = ANM2::IsPlaying(GHIDRA_CAST<ANM2 *>((room->_gridEntities + 9)),&s_empty), bVar4 != 0)) {
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((room->_gridEntities + 9)))))->Sprite::Stop();
|
|
}
|
|
}
|
|
room->_gridEntities[0x118] = (void *)(GHIDRA_INT(room->_gridEntities[0x118]) + -1);
|
|
if (GHIDRA_INT(room->_gridEntities[0x118]) < 1) {
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x14f)) = 1;
|
|
room->_gridEntities[0x114] = (void *)(GHIDRA_UINT(room->_gridEntities[0x114]) | 0x40);
|
|
(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xff)))->x =
|
|
(float)local_8b4 * (float)room->_gridEntities[0x100];
|
|
local_b14 = (void *)0x3c23d70a;
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
(GHIDRA_CAST<Vector *>((room->_gridEntities + 0xff)))->x = *pfVar15;
|
|
ResetSpriteScale(GHIDRA_CAST<Entity_Tear *>(room));
|
|
pBVar6 = BitSet128::operator_and
|
|
(&stickyMask4,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagSticky);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
uVar37 = 0x83;
|
|
uVar38 = 0x24;
|
|
uVar39 = 0x67;
|
|
(GHIDRA_CAST<BitSet128 *>((GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)))))->BitSet128::operator__(&g_tearFlagExplosive);
|
|
room->_gridEntities[0x114] = (void *)(GHIDRA_UINT(room->_gridEntities[0x114]) | 0x20);
|
|
room->_gridEntities[0xd9] = (void *)((float)room->_gridEntities[0xd9] + 60.0);
|
|
local_8f4 = GetRootPlayer(GHIDRA_CAST<Entity_Tear *>(room));
|
|
if (local_8f4 != GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
uVar40 = 0;
|
|
FUN_00435bc0();
|
|
Entity_Player::GetBombVariant();
|
|
FUN_00435bc0();
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tearFlags._l)) + 0x4))) = GHIDRA_CAST<Room *>(outResult);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tearFlags._l)) + 0x0))) = GHIDRA_CAST<Room *>(in_stack_ffffd9fc);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(tearFlags._h)) + 0x0))) = uVar37;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(tearFlags._h)) + 0x1))) = uVar38;
|
|
(*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(&(tearFlags._h)) + 0x2))) = uVar39;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tearFlags._h)) + 0x4))) = uVar40;
|
|
decayFactor = (GHIDRA_CAST<Entity_Player *>((local_8f4)))->Entity_Player::check_bomb_tearflags(tearFlags);
|
|
if (1.5 <= decayFactor) {
|
|
room->_gridEntities[0xd9] = (void *)((float)room->_gridEntities[0xd9] + 50.0);
|
|
}
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&sporeMask4,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagSpore)
|
|
;
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
pRVar29 = GHIDRA_CAST<Room *>(GetRootPlayer(GHIDRA_CAST<Entity_Tear *>(room)));
|
|
color = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Color *>(()))->Color)::Color();
|
|
pRVar28 = room;
|
|
if (pRVar29 != GHIDRA_CAST<Room *>(0x0)) {
|
|
pRVar28 = pRVar29;
|
|
}
|
|
pVVar9 = GHIDRA_CAST<Vector *>((room->_gridEntities + 0xc6));
|
|
Game::Fart(g_game,pVVar9,85.0,GHIDRA_CAST<Entity *>(pRVar28),1.0,0,color);
|
|
if (room->_gridEntities[0x115] != (void *)0x0) {
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::HasEntityFlags(0x80000000000);
|
|
if (bVar4 == 0) {
|
|
iVar7 = Isaac::Random(3);
|
|
local_8ec = (void *)(iVar7 + 2);
|
|
}
|
|
else {
|
|
local_8ec = (void *)Isaac::Random(2);
|
|
}
|
|
decayFactor = random_float();
|
|
local_87c = GHIDRA_CAST<Room *>((decayFactor * 360.0));
|
|
FUN_00424510();
|
|
ehState = 0xe;
|
|
FUN_00431620();
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
EntityList::QueryRadius(entityList,GHIDRA_CAST<EntityList_EL *>(radiusQuery200),pVVar9,200.0,8);
|
|
ehState = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(ehState)) + 0x1))),0xf);
|
|
local_8f8 = GHIDRA_CAST<Room *>(0x0);
|
|
if (0 < GHIDRA_INT(local_8ec)) {
|
|
local_8e0 = GHIDRA_CAST<Entity_Player *>((room->_gridEntities + 0xcf));
|
|
do {
|
|
pvVar20 = local_8ec;
|
|
decayFactor = random_float();
|
|
Vector::FromAngle(&local_b8c,
|
|
((decayFactor * 0.8 + ((float)GHIDRA_INT(local_8f8) - (float)local_900))
|
|
* 360.0) / (float)GHIDRA_INT(pvVar20) + (float)local_87c);
|
|
local_8fc = GHIDRA_CAST<Room *>(0x0);
|
|
local_8f4 = (void *)0x4e6e6b28;
|
|
local_8ac = (void *)0x0;
|
|
iVar7 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(radiusQuery200))))->EntityList::Size();
|
|
if (iVar7 != 0) {
|
|
pEVar30 = local_8ac;
|
|
do {
|
|
puVar13 = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index();
|
|
room = GHIDRA_CAST<Room *>(*puVar13);
|
|
local_8cc = room;
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::IsVulnerableEnemy(GHIDRA_CAST<Entity *>(0x0));
|
|
if (((bVar4 != 0) &&
|
|
(bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::HasEntityFlags(0x20000000), bVar4 == 0)) &&
|
|
(bVar4 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(local_c80))))->EntityList::HitListContains(GHIDRA_CAST<Entity *>(room)),
|
|
bVar4 == 0)) {
|
|
local_b18 = (void *)0x43480000;
|
|
pVVar9 = Vector::operator_mul(&local_1458,GHIDRA_CAST<float *>(&local_b18),&local_b8c);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((tearPos)))->Vector::__add(&local_1460,pVVar9);
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_8cc))))->Entity::Position(&entityPos24);
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Vector *>((pVVar9)))->Vector)::DistanceSquared(pVVar14);
|
|
if ((float)local_8ac < (float)local_8f4) {
|
|
local_8fc = local_8cc;
|
|
local_8f4 = GHIDRA_CAST<Entity_Player *>(local_8ac);
|
|
}
|
|
}
|
|
room = local_8fc;
|
|
pEVar30 = GHIDRA_CAST<Entity_Projectile *>((GHIDRA_INT(pEVar30) + 1));
|
|
pvVar20 = (void *)(GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(radiusQuery200))))->EntityList::Size();
|
|
spawnedTear = tear;
|
|
} while (pEVar30 < pvVar20);
|
|
if (room != GHIDRA_CAST<Room *>(0x0)) {
|
|
FUN_00431620();
|
|
pVVar9 = GHIDRA_CAST<Vector *>(FUN_006b6e40());
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(local_1478,&spawnedTear->_pos);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::Normalized(&direction15);
|
|
(GHIDRA_CAST<Vector *>((&local_b8c)))->Vector::operator_assign(pVVar9);
|
|
}
|
|
}
|
|
uVar10 = Random();
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>(tear->_spawnerEntity);
|
|
decayFactor = random_float();
|
|
local_b1c = (void *)(decayFactor * 4.0 + 8.0);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((&local_b8c)))->Vector::__mul(&local_1488,GHIDRA_CAST<float *>(&local_b1c));
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((tearPos)))->Vector::__sub(&local_1490,GHIDRA_CAST<Vector *>(local_8e0));
|
|
local_8d0 = GHIDRA_CAST<Room *>(Game)::Spawn(g_game,tear->_type,tear->_variant,pVVar14,pVVar9,
|
|
GHIDRA_CAST<Entity *>(local_8ac),0,uVar10);
|
|
(GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<Entity_Projectile *>(local_8d0))))->Entity_Projectile::SetHeight(-23.75);
|
|
local_8cc = GHIDRA_CAST<Room *>((GHIDRA_CAST<BitSet128 *>((&g_tearFlagHydrobounce)))->BitSet128)::__bnot(¬Hydrobounce2);
|
|
local_8f4 = GHIDRA_CAST<Entity_Player *>((GHIDRA_CAST<BitSet128 *>((&g_tearFlagAbsorb)))->BitSet128)::__bnot(¬Absorb3);
|
|
local_8ac = GHIDRA_CAST<Entity_Projectile *>((GHIDRA_CAST<BitSet128 *>((&g_tearFlagBone)))->BitSet128)::__bnot(¬Bone2);
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagLudovico)))->BitSet128::__bnot(¬Ludovico2);
|
|
pBVar8 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagSplit)))->BitSet128::__bnot(¬Split2);
|
|
pBVar34 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagQuadsplit)))->BitSet128::__bnot(¬Quadsplit2);
|
|
pBVar34 = BitSet128::operator_and(&andResult26,tearFlagsPtr,pBVar34);
|
|
pBVar8 = BitSet128::operator_and(&andResult27,pBVar34,pBVar8);
|
|
pBVar6 = BitSet128::operator_and(&andResult28,pBVar8,pBVar6);
|
|
pBVar6 = BitSet128::operator_and(&andResult29,pBVar6,GHIDRA_CAST<BitSet128 *>(local_8ac));
|
|
pBVar6 = BitSet128::operator_and(&andResult30,pBVar6,GHIDRA_CAST<BitSet128 *>(local_8f4));
|
|
BitSet128::operator_and(&inheritedFlags2,pBVar6,GHIDRA_CAST<BitSet128 *>(local_8cc));
|
|
pBVar8 = &g_tearFlagHoming;
|
|
pBVar6 = BitSet128::operator_or
|
|
(&withSpectral,&g_tearFlagPiercing,&g_tearFlagSpectral);
|
|
pBVar6 = BitSet128::operator_or(&orResult14,pBVar6,pBVar8);
|
|
(GHIDRA_CAST<BitSet128 *>((&inheritedFlags2)))->BitSet128::operator__(pBVar6);
|
|
room = local_8d0;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags_03._l)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(inheritedFlags2._l)) + 0x4)));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags_03._l)) + 0x0))) = (uint32_t)inheritedFlags2._l;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(flags_03._h)) + 0x0))) = (char)(uint32_t)inheritedFlags2._h;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(flags_03._h)) + 0x1))) = (char)(GHIDRA_UINT((uint32_t)inheritedFlags2._h) >> 8);
|
|
(*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(&(flags_03._h)) + 0x2))) = (short)(GHIDRA_UINT((uint32_t)inheritedFlags2._h) >> 0x10);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags_03._h)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(inheritedFlags2._h)) + 0x4)));
|
|
SetTearFlags(GHIDRA_CAST<Entity_Tear *>(local_8d0),flags_03);
|
|
SetScale(GHIDRA_CAST<Entity_Tear *>(room),*GHIDRA_CAST<float *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_8c0)) + 0x0)))) * 0.2);
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(local_8a0))))->Sprite::Color();
|
|
(*pcVar1)();
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::SetParent(GHIDRA_CAST<Entity *>(tear->_parent));
|
|
FUN_00431620();
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::AddEntityFlags(0x80000000000);
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0xc))();
|
|
local_8f8 = GHIDRA_CAST<Room *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((local_8f8)) + 0x1))));
|
|
} while (GHIDRA_INT(local_8f8) < GHIDRA_INT(local_8ec));
|
|
pVVar9 = tearPos;
|
|
room = GHIDRA_CAST<Room *>(tear);
|
|
}
|
|
(GHIDRA_CAST<EntityList_Query *>((radiusQuery200)))->EntityList_Query::~EntityList_Query();
|
|
ehState = -1;
|
|
FID_conflict__Tidy(local_c80);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&boogerMask3,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagBooger);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (((bVar4 != 0) &&
|
|
(bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::IsFrame(0x1e,GHIDRA_INT((room->_bottomRightPos).y)), bVar4 != 0)) &&
|
|
((room->_gridEntities[0x115] != GHIDRA_CAST<Entity *>(0x0) &&
|
|
(bVar4 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0x115])))->Entity::IsVulnerableEnemy(GHIDRA_CAST<Entity *>(0x0)), bVar4 != 0)))) {
|
|
FUN_00665a90();
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask22,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagLudovico
|
|
);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) && (bVar4 = is_not_familiar_spawned(GHIDRA_CAST<Entity_Tear *>(room)), bVar4 != 0)) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&continuumMask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagContinuum);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
pVVar14 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::GetClampedPosition(&clampedPos3,pVVar9,0.0);
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::operator_assign(pVVar14);
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&bit126Mask,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
GHIDRA_CAST<BitSet128 *>(&DAT_00c346c0));
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) &&
|
|
(((room->_gridPaths[0x34] < 1 ||
|
|
(iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::GetIntervalTicks((float)room->_gridPaths[0x34],zeroConst),
|
|
iVar7 != 0)) && (iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::FrameCount(), 0 < iVar7)))) {
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector::Resize((float)room->_gridPaths[0x33]);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bit125Flags._l)) + 0x0))) = _DAT_00c346b0;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bit125Flags._l)) + 0x4))) = uRam00c346b4;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bit125Flags._h)) + 0x0))) = uRam00c346b8;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bit125Flags._h)) + 0x4))) = uRam00c346bc;
|
|
pBVar6 = BitSet128::operator_and
|
|
(&andResult31,GHIDRA_CAST<BitSet128 *>((room->_gridPaths + 0x2f)),&bit125Flags);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bit126Flags._l)) + 0x0))) = _DAT_00c346c0;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bit126Flags._l)) + 0x4))) = uRam00c346c4;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bit126Flags._h)) + 0x0))) = uRam00c346c8;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bit126Flags._h)) + 0x4))) = uRam00c346cc;
|
|
pBVar6 = BitSet128::operator_and
|
|
(&andResult32,GHIDRA_CAST<BitSet128 *>((room->_gridPaths + 0x2f)),&bit126Flags);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 != 0) goto LAB_00672d53;
|
|
}
|
|
pBVar6 = (GHIDRA_CAST<BitSet128 *>((GHIDRA_CAST<BitSet128 *>(&DAT_00c346c0))))->BitSet128::__bnot(¬Bit126);
|
|
pBVar6 = BitSet128::operator_and(&andResult33,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),pBVar6)
|
|
;
|
|
pvVar20 = *(void **)(GHIDRA_INT(&pBVar6->_l) + 4);
|
|
pvVar24 = *(void **)&pBVar6->_h;
|
|
pvVar2 = *(void **)(GHIDRA_INT(&pBVar6->_h) + 4);
|
|
room->_gridEntities[0x101] = *(void **)&pBVar6->_l;
|
|
room->_gridEntities[0x102] = pvVar20;
|
|
room->_gridEntities[0x103] = pvVar24;
|
|
room->_gridEntities[0x104] = pvVar2;
|
|
}
|
|
LAB_00672d53:
|
|
pBVar6 = BitSet128::operator_and
|
|
(&bit125Mask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
GHIDRA_CAST<BitSet128 *>(&DAT_00c346b0));
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (((bVar4 != 0) && (iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::FrameCount(), 0 < iVar7)) &&
|
|
((room->_gridPaths[0x34] < 1 ||
|
|
(iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::GetIntervalTicks((float)room->_gridPaths[0x34],zeroConst),
|
|
iVar7 != 0)))) {
|
|
(GHIDRA_CAST<BitSet128 *>((GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)))))->BitSet128::IsNonZero();
|
|
pvVar20 = (void *)room->_gridPaths[0x30];
|
|
pvVar24 = (void *)room->_gridPaths[0x31];
|
|
pvVar2 = (void *)room->_gridPaths[0x32];
|
|
room->_gridEntities[0x101] = (void *)room->_gridPaths[0x2f];
|
|
room->_gridEntities[0x102] = pvVar20;
|
|
room->_gridEntities[0x103] = pvVar24;
|
|
room->_gridEntities[0x104] = pvVar2;
|
|
FUN_00435bc0();
|
|
room->_gridPaths[0x2f] = local_1580;
|
|
room->_gridPaths[0x30] = uStack_157c;
|
|
room->_gridPaths[0x31] = uStack_1578;
|
|
room->_gridPaths[0x32] = uStack_1574;
|
|
}
|
|
pVVar14 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__sub(&local_14a0,&prevPos);
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridPaths + 0x20)))))->Vector::operator_assign(pVVar14);
|
|
if (GHIDRA_INT(room->_gridEntities[0x105]) < 1) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask23,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagLudovico);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (((bVar4 != 0) && (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x14f)) == 0)) &&
|
|
(room->_gridEntities[0x115] == (void *)0x0)) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&chainMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagChain);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (bVar4 != 0) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&popMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagPop);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if (((bVar4 != 0) || (8 < *GHIDRA_CAST<short *>((room->_gridEntities + 0x112)))) ||
|
|
(local_87c = GHIDRA_CAST<Room *>((GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xcf)))))->Vector)::LengthSquared(),
|
|
(float)local_87c < 0.01)) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&fetusMask4,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagFetus);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
decayFactor = Math::timescale_factor(0.9,(float)room->_gridEntities[0xde]);
|
|
pvVar20 = room->_gridEntities[0xde];
|
|
pvVar24 = (void *)((float)pvVar20 * 0.1 +
|
|
decayFactor *
|
|
(float)(GHIDRA_CAST<NPCAI_Pathfinder *>((room->_gridEntities + 0xfc)))->_entity +
|
|
(float)pvVar20 * (GHIDRA_CAST<Vector *>((room->_gridEntities + 0xfd)))->x);
|
|
}
|
|
else if ((float)room->_gridEntities[0xe0] <=
|
|
(float)room->_gridPaths[0x2d] * (float)local_904) {
|
|
pvVar20 = room->_gridEntities[0xde];
|
|
pvVar24 = (void *)zeroConst;
|
|
}
|
|
else {
|
|
local_b20 = (void *)((GHIDRA_CAST<Vector *>((room->_gridEntities + 0xfd)))->x + 0.2);
|
|
local_b24 = (void *)0x0;
|
|
local_87c = (GHIDRA_CAST<NPCAI_Pathfinder *>((room->_gridEntities + 0xfc)))->_entity;
|
|
decayFactor = Math::timescale_factor(0.9,(float)room->_gridEntities[0xde]);
|
|
local_87c = GHIDRA_CAST<Room *>((decayFactor * (float)local_87c));
|
|
pfVar15 = GHIDRA_CAST<float *>(std)::max<float>();
|
|
pvVar20 = room->_gridEntities[0xde];
|
|
pvVar24 = (void *)((float)pvVar20 * *pfVar15 + (float)local_87c);
|
|
}
|
|
(GHIDRA_CAST<NPCAI_Pathfinder *>((room->_gridEntities + 0xfc)))->_entity = pvVar24;
|
|
Entity_Projectile::SetHeight
|
|
(GHIDRA_CAST<Entity_Projectile *>(room),
|
|
(float)pvVar20 * (float)pvVar24 + (float)room->_gridEntities[0xfb]);
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
bVar4 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::is_type_16();
|
|
if (bVar4 != 0) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&fetusMask5,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagFetus);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
decayFactor = (GHIDRA_CAST<Vector *>((room->_gridEntities + 0xfd)))->x;
|
|
if (decayFactor < 0.001) {
|
|
if ((float)room->_gridEntities[0xfb] <= (float)local_8e4) goto LAB_0067308c;
|
|
pvVar20 = (void *)((float)room->_gridEntities[0xd0] + halfConst);
|
|
}
|
|
else {
|
|
pvVar20 = (void *)(decayFactor + (float)room->_gridEntities[0xd0]);
|
|
}
|
|
room->_gridEntities[0xd0] = pvVar20;
|
|
}
|
|
LAB_0067308c:
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
bVar4 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::IsBeastDungeon();
|
|
if (((bVar4 != 0) && (iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::FrameCount(), 2 < iVar7)) &&
|
|
(pvVar20 = room->_gridEntities[0xd0], zeroConst < (float)pvVar20)) {
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
Room::get_lava_line_y();
|
|
if ((float)pvVar20 < (float)room->_gridEntities[199]) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&explosiveMask6,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagExplosive);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x28))();
|
|
uVar10 = Random();
|
|
pEVar11 = Game::Spawn(g_game,1000,0x10,pVVar9,&g_vectorZero,GHIDRA_CAST<Entity *>(0x0),0x42,
|
|
uVar10);
|
|
pEVar11->Update();
|
|
}
|
|
else {
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(room->_gridEntities) + 0x14f)) = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
bVar4 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::is_type_16();
|
|
if (bVar4 != 0) {
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
bVar4 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::IsPositionInRoom(pVVar9,-256.0);
|
|
if (bVar4 == 0) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x28))();
|
|
}
|
|
}
|
|
pBVar6 = BitSet128::operator_and
|
|
(&continuumMask2,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagContinuum);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if (bVar4 == 0) goto LAB_006734ab;
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask24,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagLudovico
|
|
);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsZero();
|
|
if ((bVar4 == 0) && (bVar4 = is_not_familiar_spawned(GHIDRA_CAST<Entity_Tear *>(room)), bVar4 == 0))
|
|
goto LAB_006734ab;
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
(GHIDRA_CAST<Room *>((pRVar28)))->Room::ScreenWrapPosition(&wrappedPos,pVVar9,-100.0);
|
|
(GHIDRA_CAST<Vector *>((&wrappedPos)))->Vector::__sub(&wrapDelta,pVVar9);
|
|
bVar4 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::operator_ne(&wrappedPos);
|
|
if (bVar4 != 0) {
|
|
pBVar6 = BitSet128::operator_and
|
|
(&tractorBeamMask3,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),
|
|
&g_tearFlagTractorBeam);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) && (room->_gridEntities[0xe6] != GHIDRA_CAST<Entity *>(0x0))) {
|
|
pVVar14 = (GHIDRA_CAST<Entity *>((room->_gridEntities[0xe6])))->Entity::Position(&parentPos10);
|
|
(GHIDRA_CAST<Vector *>((&wrappedPos)))->Vector::operator_assign(pVVar14);
|
|
}
|
|
}
|
|
(GHIDRA_CAST<Vector *>((pVVar9)))->Vector::operator_assign(&wrappedPos);
|
|
pBVar6 = BitSet128::operator_and
|
|
(&ludovicoMask25,GHIDRA_CAST<BitSet128 *>((room->_gridEntities + 0x101)),&g_tearFlagLudovico
|
|
);
|
|
bVar4 = (GHIDRA_CAST<BitSet128 *>((pBVar6)))->BitSet128::IsNonZero();
|
|
if ((bVar4 != 0) && (bVar4 = is_not_familiar_spawned(GHIDRA_CAST<Entity_Tear *>(room)), bVar4 != 0)) {
|
|
for (pEVar11 = room->_gridEntities[0xe7]; pEVar11 != GHIDRA_CAST<Entity *>(0x0);
|
|
pEVar11 = GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>((pEVar11)))->Entity)::Child()) {
|
|
pVVar9 = (GHIDRA_CAST<Entity *>((pEVar11)))->Entity::Position(&entityPos25);
|
|
pVVar9 = (GHIDRA_CAST<Vector *>((pVVar9)))->Vector::__add(&local_14b8,&wrapDelta);
|
|
(GHIDRA_CAST<Entity *>((pEVar11)))->Entity::SetPosition(pVVar9);
|
|
}
|
|
}
|
|
bVar4 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::IsFrame(2,GHIDRA_INT((room->_bottomRightPos).y));
|
|
if (bVar4 == 0) goto LAB_006734ab;
|
|
iVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(room))))->Entity::FrameCount();
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>((local_7c + 0x2c)))))->Color::Color();
|
|
switch((iVar7 / 2) % 9) {
|
|
case 0:
|
|
decayFactor = 0.33;
|
|
goto LAB_00673484;
|
|
case 1:
|
|
decayFactor = 0.66;
|
|
goto LAB_00673484;
|
|
case 2:
|
|
decayFactor = 1.0;
|
|
goto LAB_00673484;
|
|
case 3:
|
|
uVar37 = 0xc3;
|
|
uVar38 = 0xf5;
|
|
uVar39 = 0x3f28;
|
|
decayFactor = 0.66;
|
|
fVar36 = 0.66;
|
|
break;
|
|
case 4:
|
|
uVar37 = 0xc3;
|
|
uVar38 = 0xf5;
|
|
uVar39 = 0x3ea8;
|
|
decayFactor = 0.33;
|
|
fVar36 = 0.33;
|
|
break;
|
|
case 5:
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>((local_7c + 0x2c)))))->Color::SetTint(0.0,0.0,0.0,1.0);
|
|
goto LAB_00673493;
|
|
case 6:
|
|
uVar37 = 0xc3;
|
|
uVar38 = 0xf5;
|
|
uVar39 = 0x3ea8;
|
|
decayFactor = 0.0;
|
|
fVar36 = 0.33;
|
|
break;
|
|
case 7:
|
|
uVar37 = 0xc3;
|
|
uVar38 = 0xf5;
|
|
uVar39 = 0x3f28;
|
|
decayFactor = 0.0;
|
|
fVar36 = 0.66;
|
|
break;
|
|
case 8:
|
|
decayFactor = 0.0;
|
|
LAB_00673484:
|
|
uVar39 = 0x3f80;
|
|
uVar38 = 0;
|
|
uVar37 = 0;
|
|
fVar36 = 1.0;
|
|
break;
|
|
default:
|
|
goto LAB_00673493;
|
|
}
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>((local_7c + 0x2c)))))->Color::SetColorize(fVar36,decayFactor,
|
|
(float)CONCAT22(uVar39,CONCAT11(uVar38,uVar37)),1.0);
|
|
LAB_00673493:
|
|
(**(code **)(*GHIDRA_CAST<int *>(room) + 0x3c))();
|
|
LAB_006734ab:
|
|
pRVar28 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
cVar5 = (GHIDRA_CAST<Room *>((pRVar28)))->Room::HasSlowDown();
|
|
if (cVar5 != '\0') {
|
|
pcVar1 = *(code **)(*GHIDRA_CAST<int *>(room) + 0x3c);
|
|
(GHIDRA_CAST<Color *>(()))->Color::Color();
|
|
(*pcVar1)();
|
|
}
|
|
LAB_00673502:
|
|
FUN_00862aa0();
|
|
ExceptionList = prevExceptionList;
|
|
return;
|
|
}
|
|
|
|
// 00676020
|
|
float Entity_Tear::get_height_offset_y(float height)
|
|
{
|
|
int iVar1;
|
|
uint8_t isGFuel;
|
|
float heightAboveFloor;
|
|
|
|
iVar1 = this->_variant;
|
|
if ((iVar1 != 0x2e) &&
|
|
(((iVar1 != 0x2f && (iVar1 != 0x31)) ||
|
|
((0.001 < this->_fallingAccel && (this->_isHovering == 0)))))) {
|
|
if ((((iVar1 == 0xd) || (iVar1 == 0x17)) &&
|
|
(isGFuel = Seeds::HasSeedEffect(&g_game->_seedEffects,0x4f), isGFuel != 0)) &&
|
|
((this->_fallingAccel <= 0.001 || (this->_isHovering != 0)))) {
|
|
return -12.0;
|
|
}
|
|
if ((this->_fallingAccel <= 0.001) || (this->_isHovering != 0)) {
|
|
heightAboveFloor = this->_height + 8.5;
|
|
if (heightAboveFloor <= 0.0) {
|
|
heightAboveFloor = 0.0;
|
|
}
|
|
height = (this->_height * 0.4 - 15.0) + heightAboveFloor * heightAboveFloor;
|
|
}
|
|
return height;
|
|
}
|
|
return -8.0;
|
|
}
|
|
|
|
// 00676120
|
|
void Entity_Tear::SetScale(float scale)
|
|
{
|
|
if (scale <= 0.01) {
|
|
scale = 0.01;
|
|
}
|
|
this->_baseScale = scale;
|
|
this->_fScale = scale;
|
|
ResetSpriteScale(this);
|
|
return;
|
|
}
|
|
|
|
// 00676150
|
|
void Entity_Tear::SetTearFlags(BitSet128 flags)
|
|
{
|
|
uint8_t bVar1;
|
|
BitSet128 *maskedFlags;
|
|
LayerState *layer;
|
|
uint8_t *pbVar2;
|
|
int blendDst;
|
|
char *freeBlock;
|
|
uint8_t *expectedNameCh;
|
|
uint32_t uVar3;
|
|
bool bVar4;
|
|
uint8_t *pbVar5;
|
|
uint8_t *layerIdx;
|
|
std_string anm2Path;
|
|
uint32_t local_58 [5];
|
|
uint8_t local_44 [12];
|
|
float local_38;
|
|
float fStack_34;
|
|
float local_30;
|
|
uint32_t local_24;
|
|
uint8_t *puStack_20;
|
|
void *local_1c;
|
|
uint8_t *puStack_18;
|
|
uint32_t local_14;
|
|
int *anmBitflags;
|
|
|
|
puStack_20 = local_44 + 0x40;
|
|
local_14 = 0xffffffff;
|
|
puStack_18 = &LAB_00af7975;
|
|
local_1c = ExceptionList;
|
|
local_24 = __security_cookie ^ GHIDRA_UINT((local_44 + 0x34));
|
|
ExceptionList = &local_1c;
|
|
maskedFlags = BitSet128::operator_and(GHIDRA_CAST<BitSet128 *>((local_44 + 4)),&flags,&g_tearFlagGlow);
|
|
if (((GHIDRA_INT(maskedFlags->_l) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_l) + 4)) != 0) ||
|
|
(GHIDRA_INT(maskedFlags->_h) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_h) + 4)) != 0)) &&
|
|
((this->_tearHaloANM2)._loaded == 0)) {
|
|
fStack_34 = 0.0;
|
|
local_30 = 2.10195e-44;
|
|
local_44[0] = '\0';
|
|
local_44[1] = '\0';
|
|
local_44[2] = '\0';
|
|
local_44[3] = '\0';
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) = msvc::_Allocate(0x20);
|
|
fStack_34 = 2.38221e-44;
|
|
local_30 = 4.34403e-44;
|
|
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0))),"gfx/TearHalo.anm2",0x12);
|
|
local_14 = 0;
|
|
ANM2::Load(&this->_tearHaloANM2,GHIDRA_CAST<std_string *>(local_44),1);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < GHIDRA_UINT(local_30)) {
|
|
uVar3 = GHIDRA_INT(local_30) + 1;
|
|
freeBlock = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0)));
|
|
if (0xfff < uVar3) {
|
|
freeBlock = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + -4));
|
|
uVar3 = GHIDRA_INT(local_30) + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar3);
|
|
}
|
|
ANM2::Play(&this->_tearHaloANM2,s_Idle,0);
|
|
}
|
|
if ((this->_tearEffectANM2)._loaded != 0) goto LAB_00676b9b;
|
|
maskedFlags = BitSet128::operator_and(GHIDRA_CAST<BitSet128 *>((local_44 + 4)),&flags,&g_tearFlagHorn);
|
|
if ((GHIDRA_INT(maskedFlags->_l) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_l) + 4)) != 0) ||
|
|
(GHIDRA_INT(maskedFlags->_h) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_h) + 4)) != 0)) {
|
|
fStack_34 = 0.0;
|
|
local_30 = 2.10195e-44;
|
|
local_44[0] = '\0';
|
|
local_44[1] = '\0';
|
|
local_44[2] = '\0';
|
|
local_44[3] = '\0';
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) = msvc::_Allocate(0x20);
|
|
fStack_34 = 4.06377e-44;
|
|
local_30 = 4.34403e-44;
|
|
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0))),"gfx/LittleHornTearEffect.anm2",0x1e);
|
|
local_14 = 1;
|
|
ANM2::Load(&this->_tearEffectANM2,GHIDRA_CAST<std_string *>(local_44),1);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < GHIDRA_UINT(local_30)) {
|
|
uVar3 = GHIDRA_INT(local_30) + 1;
|
|
freeBlock = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0)));
|
|
if (0xfff < uVar3) {
|
|
freeBlock = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + -4));
|
|
uVar3 = GHIDRA_INT(local_30) + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar3);
|
|
}
|
|
layerIdx = GHIDRA_CAST<uint8_t *>(0x0);
|
|
if ((this->_tearEffectANM2)._layerCount != 0) {
|
|
do {
|
|
uVar3 = g_graphicsManager_flags;
|
|
layer = ANM2::GetLayer(&this->_tearEffectANM2,layerIdx);
|
|
blendDst = 1;
|
|
if ((uVar3 & 4) == 0) {
|
|
blendDst = 6;
|
|
}
|
|
layer->_blendMode[0] = 0;
|
|
layer->_blendMode[1] = blendDst;
|
|
layer->_blendMode[2] = 1;
|
|
layer->_blendMode[3] = 1;
|
|
layer->_blendMode[4] = 1;
|
|
layerIdx = layerIdx + 1;
|
|
} while (layerIdx < GHIDRA_CAST<uint8_t *>((this->_tearEffectANM2)._layerCount));
|
|
}
|
|
pbVar5 = (this->_tearEffectANM2)._animState._animData;
|
|
if (pbVar5 != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((pbVar5 + 0x14))) {
|
|
pbVar5 = *GHIDRA_CAST<uint8_t **>(pbVar5);
|
|
}
|
|
pbVar2 = s_Idle;
|
|
do {
|
|
bVar1 = *pbVar5;
|
|
bVar4 = bVar1 < *pbVar2;
|
|
if (bVar1 != *pbVar2) {
|
|
LAB_00676b65:
|
|
uVar3 = -GHIDRA_UINT(bVar4) | 1;
|
|
goto LAB_00676b6a;
|
|
}
|
|
if (bVar1 == 0) break;
|
|
bVar1 = pbVar5[1];
|
|
bVar4 = bVar1 < pbVar2[1];
|
|
if (bVar1 != pbVar2[1]) goto LAB_00676b65;
|
|
pbVar5 = pbVar5 + 2;
|
|
pbVar2 = pbVar2 + 2;
|
|
} while (bVar1 != 0);
|
|
uVar3 = 0;
|
|
LAB_00676b6a:
|
|
if ((uVar3 == 0) &&
|
|
((*GHIDRA_CAST<char *>((GHIDRA_INT((this->_tearEffectANM2)._animState._animData) + 0x34)) == '\0' ||
|
|
((this->_tearEffectANM2)._animState._isPlaying != 0)))) goto LAB_00676b9b;
|
|
}
|
|
bVar1 = ANM2::SetAnimation(&this->_tearEffectANM2,s_Idle,1);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind(&(this->_tearEffectANM2)._animState);
|
|
(this->_tearEffectANM2)._animState._isPlaying = 1;
|
|
}
|
|
goto LAB_00676b9b;
|
|
}
|
|
maskedFlags = BitSet128::operator_and(GHIDRA_CAST<BitSet128 *>((local_44 + 4)),&flags,&g_tearFlagRift);
|
|
if ((GHIDRA_INT(maskedFlags->_l) == 0 && *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_l) + 4)) == 0) &&
|
|
(GHIDRA_INT(maskedFlags->_h) == 0 && *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_h) + 4)) == 0)) {
|
|
maskedFlags = BitSet128::operator_and
|
|
(GHIDRA_CAST<BitSet128 *>((local_44 + 4)),&flags,&g_tearFlagLightFromHeaven);
|
|
if ((GHIDRA_INT(maskedFlags->_l) == 0 && *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_l) + 4)) == 0) &&
|
|
(GHIDRA_INT(maskedFlags->_h) == 0 && *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_h) + 4)) == 0)) {
|
|
maskedFlags = BitSet128::operator_and(GHIDRA_CAST<BitSet128 *>((local_44 + 4)),&flags,&g_tearFlagJacobs);
|
|
if ((GHIDRA_INT(maskedFlags->_l) == 0 && *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_l) + 4)) == 0) &&
|
|
(GHIDRA_INT(maskedFlags->_h) == 0 && *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_h) + 4)) == 0)) {
|
|
maskedFlags = BitSet128::operator_and
|
|
(GHIDRA_CAST<BitSet128 *>((local_44 + 4)),&flags,&g_tearFlagMysteriousLiquidCreep
|
|
);
|
|
bVar1 = (GHIDRA_CAST<BitSet128 *>((maskedFlags)))->BitSet128::IsNonZero();
|
|
if (bVar1 != 0) {
|
|
fStack_34 = 0.0;
|
|
local_30 = 2.10195e-44;
|
|
local_44[0] = '\0';
|
|
local_44[1] = '\0';
|
|
local_44[2] = '\0';
|
|
local_44[3] = '\0';
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) = msvc::_Allocate(0x20);
|
|
fStack_34 = 4.06377e-44;
|
|
local_30 = 4.34403e-44;
|
|
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0))),"gfx/MysteriousTearEffect.anm2",0x1e);
|
|
local_14 = 5;
|
|
ANM2::Load(&this->_tearEffectANM2,GHIDRA_CAST<std_string *>(local_44),1);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < GHIDRA_UINT(local_30)) {
|
|
uVar3 = GHIDRA_INT(local_30) + 1;
|
|
freeBlock = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0)));
|
|
if (0xfff < uVar3) {
|
|
freeBlock = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + -4));
|
|
uVar3 = GHIDRA_INT(local_30) + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar3);
|
|
}
|
|
anmBitflags = &(this->_tearEffectANM2)._bitflags;
|
|
*anmBitflags = *anmBitflags | 0x3000;
|
|
layer = ANM2::GetLayer(&this->_tearEffectANM2,GHIDRA_CAST<uint8_t *>(0x0));
|
|
pbVar5 = GHIDRA_CAST<uint8_t *>(0x1);
|
|
layer->_bitflags = 0x1000;
|
|
goto LAB_00676426;
|
|
}
|
|
maskedFlags = BitSet128::operator_and(GHIDRA_CAST<BitSet128 *>((local_44 + 4)),&flags,&g_tearFlagBurn);
|
|
bVar1 = (GHIDRA_CAST<BitSet128 *>((maskedFlags)))->BitSet128::IsNonZero();
|
|
if (bVar1 == 0) {
|
|
maskedFlags = BitSet128::operator_and
|
|
(GHIDRA_CAST<BitSet128 *>((local_44 + 4)),&flags,&g_tearFlagDarkMatter);
|
|
bVar1 = (GHIDRA_CAST<BitSet128 *>((maskedFlags)))->BitSet128::IsNonZero();
|
|
if (bVar1 == 0) goto LAB_00676b9b;
|
|
(GHIDRA_CAST<msvc::string *>((anm2Path._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST<uint8_t *>("gfx/DarkMatterTearEffect.anm2"));
|
|
local_14 = 7;
|
|
ANM2::Load(&this->_tearEffectANM2,&anm2Path,1);
|
|
local_14 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((anm2Path._buf)))->msvc::string::_Tidy_deallocate();
|
|
}
|
|
else {
|
|
fStack_34 = 0.0;
|
|
local_30 = 2.10195e-44;
|
|
local_44[0] = '\0';
|
|
local_44[1] = '\0';
|
|
local_44[2] = '\0';
|
|
local_44[3] = '\0';
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) = msvc::_Allocate(0x20);
|
|
fStack_34 = 3.78351e-44;
|
|
local_30 = 4.34403e-44;
|
|
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0))),"gfx/FireMindTearEffect.anm2",0x1c);
|
|
local_14 = 6;
|
|
ANM2::Load(&this->_tearEffectANM2,GHIDRA_CAST<std_string *>(local_44),1);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < GHIDRA_UINT(local_30)) {
|
|
uVar3 = GHIDRA_INT(local_30) + 1;
|
|
freeBlock = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0)));
|
|
if (0xfff < uVar3) {
|
|
freeBlock = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + -4));
|
|
uVar3 = GHIDRA_INT(local_30) + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar3);
|
|
}
|
|
}
|
|
anmBitflags = &(this->_tearEffectANM2)._bitflags;
|
|
*anmBitflags = *anmBitflags | 0x3000;
|
|
layer = ANM2::GetLayer(&this->_tearEffectANM2,GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_bitflags = 0x1000;
|
|
}
|
|
else {
|
|
fStack_34 = 0.0;
|
|
local_30 = 2.10195e-44;
|
|
local_44[0] = '\0';
|
|
local_44[1] = '\0';
|
|
local_44[2] = '\0';
|
|
local_44[3] = '\0';
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) = msvc::_Allocate(0x20);
|
|
fStack_34 = 4.34403e-44;
|
|
local_30 = 4.34403e-44;
|
|
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0))),"gfx/JacobsLadderTearEffect.anm2",0x20);
|
|
local_14 = 4;
|
|
ANM2::Load(&this->_tearEffectANM2,GHIDRA_CAST<std_string *>(local_44),1);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < GHIDRA_UINT(local_30)) {
|
|
uVar3 = GHIDRA_INT(local_30) + 1;
|
|
freeBlock = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0)));
|
|
if (0xfff < uVar3) {
|
|
freeBlock = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + -4));
|
|
uVar3 = GHIDRA_INT(local_30) + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar3);
|
|
}
|
|
pbVar5 = GHIDRA_CAST<uint8_t *>(0x0);
|
|
LAB_00676426:
|
|
uVar3 = g_graphicsManager_flags;
|
|
layer = ANM2::GetLayer(&this->_tearEffectANM2,pbVar5);
|
|
blendDst = 1;
|
|
if ((uVar3 & 4) == 0) {
|
|
blendDst = 6;
|
|
}
|
|
layer->_blendMode[0] = 0;
|
|
layer->_blendMode[1] = blendDst;
|
|
layer->_blendMode[2] = 1;
|
|
layer->_blendMode[3] = 1;
|
|
layer->_blendMode[4] = 1;
|
|
}
|
|
ANM2::Play(&this->_tearEffectANM2,s_Idle,0);
|
|
goto LAB_00676b9b;
|
|
}
|
|
fStack_34 = 0.0;
|
|
local_30 = 2.10195e-44;
|
|
local_44[0] = '\0';
|
|
local_44[1] = '\0';
|
|
local_44[2] = '\0';
|
|
local_44[3] = '\0';
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) = msvc::_Allocate(0x20);
|
|
fStack_34 = 3.92364e-44;
|
|
local_30 = 4.34403e-44;
|
|
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0))),"gfx/HolyLightTearEffect.anm2",0x1d);
|
|
local_14 = 3;
|
|
ANM2::Load(&this->_tearEffectANM2,GHIDRA_CAST<std_string *>(local_44),1);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < GHIDRA_UINT(local_30)) {
|
|
uVar3 = GHIDRA_INT(local_30) + 1;
|
|
freeBlock = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0)));
|
|
if (0xfff < uVar3) {
|
|
freeBlock = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + -4));
|
|
uVar3 = GHIDRA_INT(local_30) + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar3);
|
|
}
|
|
uVar3 = g_graphicsManager_flags;
|
|
layer = ANM2::GetLayer(&this->_tearEffectANM2,GHIDRA_CAST<uint8_t *>(0x0));
|
|
blendDst = 1;
|
|
if ((uVar3 & 4) == 0) {
|
|
blendDst = 6;
|
|
}
|
|
layer->_blendMode[0] = 0;
|
|
layer->_blendMode[1] = blendDst;
|
|
layer->_blendMode[2] = 1;
|
|
layer->_blendMode[3] = 1;
|
|
layer->_blendMode[4] = 1;
|
|
pbVar5 = (this->_tearEffectANM2)._animState._animData;
|
|
if (pbVar5 != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
pbVar2 = pbVar5;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((pbVar5 + 0x14))) {
|
|
pbVar2 = *GHIDRA_CAST<uint8_t **>(pbVar5);
|
|
}
|
|
expectedNameCh = s_Idle;
|
|
do {
|
|
bVar1 = *pbVar2;
|
|
bVar4 = bVar1 < *expectedNameCh;
|
|
if (bVar1 != *expectedNameCh) goto LAB_006767e0;
|
|
if (bVar1 == 0) break;
|
|
bVar1 = pbVar2[1];
|
|
bVar4 = bVar1 < expectedNameCh[1];
|
|
if (bVar1 != expectedNameCh[1]) goto LAB_006767e0;
|
|
pbVar2 = pbVar2 + 2;
|
|
expectedNameCh = expectedNameCh + 2;
|
|
} while (bVar1 != 0);
|
|
LAB_006767dc:
|
|
uVar3 = 0;
|
|
goto LAB_006767e5;
|
|
}
|
|
}
|
|
else {
|
|
fStack_34 = 0.0;
|
|
local_30 = 2.10195e-44;
|
|
local_44[0] = '\0';
|
|
local_44[1] = '\0';
|
|
local_44[2] = '\0';
|
|
local_44[3] = '\0';
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) = msvc::_Allocate(0x20);
|
|
fStack_34 = 4.06377e-44;
|
|
local_30 = 4.34403e-44;
|
|
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0))),"gfx/LittleHornTearEffect.anm2",0x1e);
|
|
local_14 = 2;
|
|
ANM2::Load(&this->_tearEffectANM2,GHIDRA_CAST<std_string *>(local_44),1);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < GHIDRA_UINT(local_30)) {
|
|
uVar3 = GHIDRA_INT(local_30) + 1;
|
|
freeBlock = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_44))) + 0x0)));
|
|
if (0xfff < uVar3) {
|
|
freeBlock = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + -4));
|
|
uVar3 = GHIDRA_INT(local_30) + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_44)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar3);
|
|
}
|
|
layerIdx = GHIDRA_CAST<uint8_t *>(0x0);
|
|
if ((this->_tearEffectANM2)._layerCount != 0) {
|
|
do {
|
|
uVar3 = g_graphicsManager_flags;
|
|
layer = ANM2::GetLayer(&this->_tearEffectANM2,layerIdx);
|
|
local_38 = 0.0;
|
|
fStack_34 = 0.0;
|
|
blendDst = 1;
|
|
layer->_blendMode[0] = 0;
|
|
if ((uVar3 & 4) == 0) {
|
|
blendDst = 6;
|
|
}
|
|
layer->_blendMode[2] = 1;
|
|
layer->_blendMode[1] = blendDst;
|
|
layer->_blendMode[3] = 1;
|
|
layer->_blendMode[4] = 1;
|
|
local_30 = 0.0;
|
|
layer = ANM2::GetLayer(&this->_tearEffectANM2,layerIdx);
|
|
if (&layer->_color != GHIDRA_CAST<ColorMod *>(local_58)) {
|
|
(layer->_color)._tint[0] = 1.0;
|
|
(layer->_color)._tint[1] = 0.7;
|
|
(layer->_color)._tint[2] = 0.7;
|
|
(layer->_color)._tint[3] = 1.0;
|
|
(layer->_color)._colorize[0] = 0.0;
|
|
(layer->_color)._colorize[1] = 0.0;
|
|
(layer->_color)._colorize[2] = 0.0;
|
|
(layer->_color)._colorize[3] = 0.0;
|
|
(layer->_color)._offset[0] = local_38;
|
|
(layer->_color)._offset[1] = fStack_34;
|
|
(layer->_color)._offset[2] = local_30;
|
|
}
|
|
layerIdx = layerIdx + 1;
|
|
} while (layerIdx < GHIDRA_CAST<uint8_t *>((this->_tearEffectANM2)._layerCount));
|
|
}
|
|
pbVar5 = (this->_tearEffectANM2)._animState._animData;
|
|
if (pbVar5 != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
pbVar2 = pbVar5;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((pbVar5 + 0x14))) {
|
|
pbVar2 = *GHIDRA_CAST<uint8_t **>(pbVar5);
|
|
}
|
|
expectedNameCh = s_Idle;
|
|
do {
|
|
bVar1 = *pbVar2;
|
|
bVar4 = bVar1 < *expectedNameCh;
|
|
if (bVar1 != *expectedNameCh) goto LAB_006767e0;
|
|
if (bVar1 == 0) goto LAB_006767dc;
|
|
bVar1 = pbVar2[1];
|
|
bVar4 = bVar1 < expectedNameCh[1];
|
|
if (bVar1 != expectedNameCh[1]) goto LAB_006767e0;
|
|
pbVar2 = pbVar2 + 2;
|
|
expectedNameCh = expectedNameCh + 2;
|
|
} while (bVar1 != 0);
|
|
uVar3 = 0;
|
|
LAB_006767e5:
|
|
if ((uVar3 == 0) &&
|
|
((pbVar5[0x34] == 0 || ((this->_tearEffectANM2)._animState._isPlaying != 0))))
|
|
goto LAB_00676b9b;
|
|
}
|
|
}
|
|
bVar1 = ANM2::SetAnimation(&this->_tearEffectANM2,s_Idle,1);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind(&(this->_tearEffectANM2)._animState);
|
|
(this->_tearEffectANM2)._animState._isPlaying = 1;
|
|
}
|
|
LAB_00676b9b:
|
|
*GHIDRA_CAST<uint32_t *>(&(this->_tearFlags)._l) = (uint32_t)flags._l;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._l)) + 0x4)));
|
|
*GHIDRA_CAST<uint32_t *>(&(this->_tearFlags)._h) = (uint32_t)flags._h;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._h)) + 0x4)));
|
|
ExceptionList = local_1c;
|
|
return;
|
|
LAB_006767e0:
|
|
uVar3 = -GHIDRA_UINT(bVar4) | 1;
|
|
goto LAB_006767e5;
|
|
}
|
|
|
|
// 00676be0
|
|
void Entity_Tear::apply_death_flag_effects(Entity *target)
|
|
{
|
|
uint32_t *puVar1;
|
|
float fVar2;
|
|
BitSet128 flags;
|
|
BitSet128 flags_00;
|
|
uint8_t bVar3;
|
|
uint32_t uVar4;
|
|
BitSet128 *pBVar5;
|
|
int iVar6;
|
|
BitSet128 *pBVar7;
|
|
Entity *spawned;
|
|
Entity_Tear *childTear;
|
|
BitSet128 **childScalePtr;
|
|
BitSet128 *pBVar8;
|
|
uint32_t seed;
|
|
uint8_t extraout_CL;
|
|
uint8_t extraout_CL_00;
|
|
char *ptr;
|
|
float fVar9;
|
|
uint32_t uVar10;
|
|
TypeDescriptor *pTVar11;
|
|
TypeDescriptor *pTVar12;
|
|
uint32_t uVar13;
|
|
BitSet128 local_110;
|
|
BitSet128 local_100;
|
|
BitSet128 local_f0;
|
|
BitSet128 local_e0;
|
|
BitSet128 local_d0;
|
|
BitSet128 local_c0;
|
|
BitSet128 local_b0;
|
|
Vector local_a0;
|
|
Vector local_98;
|
|
BitSet128 *tearFlags;
|
|
Vector local_8c;
|
|
BitSet128 childFlags;
|
|
BitSet128 *local_74;
|
|
Entity *local_70;
|
|
float alphaMultiplier;
|
|
Entity_Tear *local_68;
|
|
BitSet128 *local_64;
|
|
Entity_Tear *local_60;
|
|
char isDeadRising;
|
|
char *spritesheetPath [2];
|
|
BitSet128 local_50;
|
|
ColorMod color;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
float local_8;
|
|
float childScale;
|
|
Game *game;
|
|
Manager *manager;
|
|
|
|
local_8 = -NAN;
|
|
puStack_c = &LAB_00af79ad;
|
|
local_10 = ExceptionList;
|
|
uVar4 = __security_cookie ^ GHIDRA_UINT((&color)[1]._colorize);
|
|
ExceptionList = &local_10;
|
|
local_70 = target;
|
|
local_a0.y = (float)this;
|
|
if ((this->_dead == 0) ||
|
|
(((pBVar5 = BitSet128::operator_and(&childFlags,&this->_tearFlags,&g_tearFlagHydrobounce),
|
|
GHIDRA_INT(pBVar5->_l) == 0 && *GHIDRA_CAST<int *>((GHIDRA_INT(&pBVar5->_l) + 4)) == 0 &&
|
|
(GHIDRA_INT(pBVar5->_h) == 0 && *GHIDRA_CAST<int *>((GHIDRA_INT(&pBVar5->_h) + 4)) == 0)) ||
|
|
(isDeadRising = '\x01', 0.0 < this->_fallingSpeed || this->_fallingSpeed == 0.0)))) {
|
|
isDeadRising = '\0';
|
|
}
|
|
alphaMultiplier = 1.0;
|
|
iVar6 = __RTDynamicCast(this->_spawnerEntity,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor,
|
|
&IsaacRepentancePlus::Entity_Player::RTTI_Type_Descriptor,0,uVar4);
|
|
if (((iVar6 != 0) && (g_manager->_netplayManager != *GHIDRA_CAST<int *>((g_manager + 1)))) &&
|
|
(bVar3 = NetplayManager::IsIdxLocalPlayer
|
|
(GHIDRA_CAST<NetplayManager *>(&g_manager->_netplayManager),*GHIDRA_CAST<uint32_t *>((iVar6 + 0x1618))),
|
|
bVar3 == 0)) {
|
|
if ((g_game == GHIDRA_CAST<Game *>(0x0)) || (*GHIDRA_CAST<int *>(&g_game->_deathmatchManager) < 2)) {
|
|
alphaMultiplier = (float)(g_manager->_optionsConfig)._onlinePlayerOpacity * 0.09 + 0.1;
|
|
}
|
|
else {
|
|
alphaMultiplier = 1.0;
|
|
}
|
|
}
|
|
fVar9 = 1.0;
|
|
pBVar5 = &this->_tearFlags;
|
|
tearFlags = pBVar5;
|
|
pBVar7 = BitSet128::operator_and(&childFlags,pBVar5,&g_tearFlagSplit);
|
|
if ((((GHIDRA_INT(pBVar7->_l) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&pBVar7->_l) + 4)) != 0) ||
|
|
(GHIDRA_INT(pBVar7->_h) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&pBVar7->_h) + 4)) != 0)) &&
|
|
(fVar9 < this->_collisionDamage)) &&
|
|
((this->_height <= -5.0 && this->_height != -5.0 || (isDeadRising != '\0')))) {
|
|
local_68 = GHIDRA_CAST<Entity_Tear *>(0x0);
|
|
local_74 = GHIDRA_CAST<BitSet128 *>(0x3c23d70a);
|
|
do {
|
|
fVar9 = (this->_velocity).x;
|
|
local_8c.x = (this->_velocity).y;
|
|
local_8c.y = -fVar9;
|
|
if (local_68 == GHIDRA_CAST<Entity_Tear *>(0x1)) {
|
|
local_8c.x = -local_8c.x;
|
|
local_8c.y = fVar9;
|
|
}
|
|
uVar4 = Random();
|
|
local_98.x = (this->_pos).x - (this->_velocity).x;
|
|
local_98.y = (this->_pos).y - (this->_velocity).y;
|
|
uVar13 = 0;
|
|
pTVar12 = &IsaacRepentancePlus::Entity_Tear::RTTI_Type_Descriptor;
|
|
pTVar11 = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor;
|
|
uVar10 = 0;
|
|
spawned = Game::Spawn(g_game,2,0,&local_98,&local_8c,GHIDRA_CAST<Entity *>(this->_spawnerEntity),0,uVar4);
|
|
childTear = GHIDRA_CAST<Entity_Tear *>(__RTDynamicCast(spawned,uVar10,pTVar11,pTVar12,uVar13));
|
|
local_60 = childTear;
|
|
if (isDeadRising == '\0') {
|
|
local_64 = GHIDRA_CAST<BitSet128 *>((this->_height / 1.5));
|
|
childTear->_height = (float)local_64;
|
|
fVar9 = get_height_offset_y(childTear,(float)local_64);
|
|
game = g_game;
|
|
(childTear->_posOffset).y = fVar9;
|
|
if ((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(game->_room) + 8)) == 0x10) &&
|
|
((childTear->_posOffset).y = -18.0, -5.1 < (float)local_64)) {
|
|
childTear->_height = -5.1;
|
|
}
|
|
childTear->_fallingSpeed = this->_fallingSpeed;
|
|
fVar9 = this->_collisionDamage * 0.5;
|
|
}
|
|
else {
|
|
childTear->_height = -5.1;
|
|
fVar9 = get_height_offset_y(childTear,-5.1);
|
|
game = g_game;
|
|
(childTear->_posOffset).y = fVar9;
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(game->_room) + 8)) == 0x10) {
|
|
(childTear->_posOffset).y = -18.0;
|
|
}
|
|
childTear->_fallingSpeed = this->_fallingSpeed;
|
|
childTear->_fallingAccel = 2.0;
|
|
fVar9 = this->_collisionDamage * 0.25;
|
|
}
|
|
childTear->SetCollisionDamage(fVar9);
|
|
local_64 = GHIDRA_CAST<BitSet128 *>((this->_fScale * 0.5));
|
|
childScalePtr = &local_64;
|
|
if ((float)local_64 <= 0.01) {
|
|
childScalePtr = &local_74;
|
|
}
|
|
childScale = (float)*childScalePtr;
|
|
childTear->_baseScale = childScale;
|
|
childTear->_fScale = childScale;
|
|
ResetSpriteScale(childTear);
|
|
local_64 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagFetus)))->BitSet128::__bnot(&local_110);
|
|
pBVar5 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagHydrobounce)))->BitSet128::__bnot(&local_50);
|
|
pBVar7 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagAbsorb)))->BitSet128::__bnot(&local_c0);
|
|
pBVar8 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagLudovico)))->BitSet128::__bnot(&local_d0);
|
|
pBVar8 = BitSet128::operator_and(&local_e0,tearFlags,pBVar8);
|
|
pBVar7 = BitSet128::operator_and(&local_f0,pBVar8,pBVar7);
|
|
pBVar5 = BitSet128::operator_and(&local_100,pBVar7,pBVar5);
|
|
BitSet128::operator_and(&childFlags,pBVar5,local_64);
|
|
if (isDeadRising != '\0') {
|
|
pBVar5 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagExplosive)))->BitSet128::__bnot(&local_b0);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._l)) + 0x0))) = GHIDRA_UINT(childFlags._l) & GHIDRA_UINT(pBVar5->_l);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._l)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._l)) + 0x4))) & *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&pBVar5->_l) + 4));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._h)) + 0x0))) = GHIDRA_UINT(childFlags._h) & GHIDRA_UINT(pBVar5->_h);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._h)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._h)) + 0x4))) & *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&pBVar5->_h) + 4));
|
|
}
|
|
childTear = local_60;
|
|
this = GHIDRA_CAST<Entity_Tear *>(local_a0.y);
|
|
color._tint[0] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._tint[0];
|
|
color._tint[1] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._tint[1];
|
|
color._tint[2] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._tint[2];
|
|
color._offset[2] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._offset[2];
|
|
color._colorize[0] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._colorize[0];
|
|
color._colorize[1] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._colorize[1];
|
|
color._colorize[2] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._colorize[2];
|
|
color._colorize[3] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._colorize[3];
|
|
color._tint[3] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._tint[3] * alphaMultiplier;
|
|
(*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(color._offset)) + 0x0))) = *GHIDRA_CAST<uint64_t *>(((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._offset);
|
|
local_60->SetColor(&color,0xffffffff,0xff,0,1);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._l)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._l)) + 0x4)));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._l)) + 0x0))) = GHIDRA_UINT(childFlags._l);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._h)) + 0x0))) = GHIDRA_UINT(childFlags._h);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._h)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._h)) + 0x4)));
|
|
SetTearFlags(childTear,flags);
|
|
local_64 = *GHIDRA_CAST<BitSet128 **>((GHIDRA_CAST<char *>(this) + 0x3bc));
|
|
if (childTear->_parent != 0) {
|
|
local_60 = GHIDRA_CAST<Entity_Tear *>(&childTear->_parent);
|
|
msvc::multiset<unsigned_int>::erase(&local_60);
|
|
}
|
|
childTear->_parent = local_64;
|
|
if (local_64 != GHIDRA_CAST<BitSet128 *>(0x0)) {
|
|
msvc::multiset<unsigned_int>::insert(&childTear->_parent);
|
|
}
|
|
childTear->Update();
|
|
local_68 = GHIDRA_CAST<Entity_Tear *>((GHIDRA_INT(local_68) + 1));
|
|
} while (GHIDRA_INT(local_68) < 2);
|
|
pBVar5 = GHIDRA_CAST<BitSet128 *>((GHIDRA_INT(this) + 0x428));
|
|
}
|
|
fVar9 = -5.0;
|
|
pBVar7 = BitSet128::operator_and(&local_b0,pBVar5,&g_tearFlagBone);
|
|
if (((GHIDRA_INT(pBVar7->_l) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&pBVar7->_l) + 4)) != 0) ||
|
|
(GHIDRA_INT(pBVar7->_h) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&pBVar7->_h) + 4)) != 0)) &&
|
|
(this->_height <= fVar9 && fVar9 != this->_height)) {
|
|
local_64 = GHIDRA_CAST<BitSet128 *>(0x0);
|
|
do {
|
|
uVar4 = Random();
|
|
fVar9 = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) *
|
|
2.3283064e-10 * 3.14;
|
|
local_60 = GHIDRA_CAST<Entity_Tear *>((fVar9 + fVar9));
|
|
local_68 = GHIDRA_CAST<Entity_Tear *>(sin((float)local_60));
|
|
fVar9 = (this->_velocity).y;
|
|
fVar2 = (this->_velocity).x;
|
|
local_74 = GHIDRA_CAST<BitSet128 *>(sqrtf(fVar2 * fVar2 + fVar9 * fVar9));
|
|
local_98.x = cos((float)local_60);
|
|
local_98.x = local_98.x * (float)local_74;
|
|
uVar4 = this->_variant;
|
|
local_98.y = (float)local_68 * (float)local_74;
|
|
if (uVar4 == 0x32) {
|
|
uVar4 = 0x1d;
|
|
}
|
|
seed = Random();
|
|
local_8c.x = (this->_pos).x - (this->_velocity).x;
|
|
local_8c.y = (this->_pos).y - (this->_velocity).y;
|
|
uVar13 = 0;
|
|
pTVar12 = &IsaacRepentancePlus::Entity_Tear::RTTI_Type_Descriptor;
|
|
pTVar11 = &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor;
|
|
uVar10 = 0;
|
|
spawned = Game::Spawn(g_game,2,uVar4,&local_8c,&local_98,GHIDRA_CAST<Entity *>(this->_spawnerEntity),0,seed
|
|
);
|
|
childTear = GHIDRA_CAST<Entity_Tear *>(__RTDynamicCast(spawned,uVar10,pTVar11,pTVar12,uVar13));
|
|
local_68 = childTear;
|
|
if (uVar4 == 0x1d) {
|
|
spritesheetPath[0] = msvc::_Allocate(0x20);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_50._h)) + 0x0))) = 0x18;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_50._h)) + 0x4))) = 0x1f;
|
|
builtin_strncpy(spritesheetPath[0],"gfx/tears_brokenbone.png",0x19);
|
|
local_8 = 0.0;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&childTear->_sprite))))->Sprite::ReplaceSpritesheet(0,GHIDRA_CAST<std_string *>(spritesheetPath));
|
|
local_8 = -NAN;
|
|
bVar3 = extraout_CL;
|
|
if (0xf < (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_50._h)) + 0x4)))) {
|
|
uVar4 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_50._h)) + 0x4))) + 1;
|
|
ptr = spritesheetPath[0];
|
|
if (0xfff < uVar4) {
|
|
ptr = *GHIDRA_CAST<char **>((spritesheetPath[0] + -4));
|
|
uVar4 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_50._h)) + 0x4))) + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < spritesheetPath[0] + (-4 - GHIDRA_INT(ptr))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(ptr,uVar4);
|
|
bVar3 = extraout_CL_00;
|
|
}
|
|
ANM2::LoadGraphics(&childTear->_sprite,bVar3);
|
|
}
|
|
local_60 = GHIDRA_CAST<Entity_Tear *>(this->_height);
|
|
childTear->_height = (float)local_60;
|
|
fVar9 = get_height_offset_y(childTear,(float)local_60);
|
|
game = g_game;
|
|
(childTear->_posOffset).y = fVar9;
|
|
if ((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(game->_room) + 8)) == 0x10) &&
|
|
((childTear->_posOffset).y = -18.0, -5.1 < (float)local_60)) {
|
|
childTear->_height = -5.1;
|
|
}
|
|
childTear->_fallingSpeed = this->_fallingSpeed;
|
|
childTear->SetCollisionDamage(this->_collisionDamage * 0.5);
|
|
pBVar5 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagFetus)))->BitSet128::__bnot(&local_b0);
|
|
pBVar7 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagBone)))->BitSet128::__bnot(&local_100);
|
|
pBVar8 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagLudovico)))->BitSet128::__bnot(&local_f0);
|
|
pBVar8 = BitSet128::operator_and(&local_e0,tearFlags,pBVar8);
|
|
pBVar7 = BitSet128::operator_and(&local_d0,pBVar8,pBVar7);
|
|
BitSet128::operator_and(&childFlags,pBVar7,pBVar5);
|
|
if (isDeadRising != '\0') {
|
|
pBVar5 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagExplosive)))->BitSet128::__bnot(&local_c0);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._l)) + 0x0))) = GHIDRA_UINT(childFlags._l) & GHIDRA_UINT(pBVar5->_l);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._l)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._l)) + 0x4))) & *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&pBVar5->_l) + 4));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._h)) + 0x0))) = GHIDRA_UINT(childFlags._h) & GHIDRA_UINT(pBVar5->_h);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._h)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._h)) + 0x4))) & *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&pBVar5->_h) + 4));
|
|
}
|
|
childTear = local_68;
|
|
this = GHIDRA_CAST<Entity_Tear *>(local_a0.y);
|
|
color._tint[0] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._tint[0];
|
|
color._tint[1] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._tint[1];
|
|
color._tint[2] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._tint[2];
|
|
color._offset[2] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._offset[2];
|
|
color._colorize[0] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._colorize[0];
|
|
color._colorize[1] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._colorize[1];
|
|
color._colorize[2] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._colorize[2];
|
|
color._colorize[3] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._colorize[3];
|
|
color._tint[3] = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._tint[3] * alphaMultiplier;
|
|
(*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(color._offset)) + 0x0))) = *GHIDRA_CAST<uint64_t *>(((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_a0.y) + 0x48)))->_color)._offset);
|
|
local_68->SetColor(&color,0xffffffff,0xff,0,1);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags_00._l)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._l)) + 0x4)));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags_00._l)) + 0x0))) = GHIDRA_UINT(childFlags._l);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags_00._h)) + 0x0))) = GHIDRA_UINT(childFlags._h);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags_00._h)) + 0x4))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(childFlags._h)) + 0x4)));
|
|
SetTearFlags(childTear,flags_00);
|
|
local_74 = *GHIDRA_CAST<BitSet128 **>((GHIDRA_CAST<char *>(this) + 0x3bc));
|
|
if (childTear->_parent != 0) {
|
|
local_60 = GHIDRA_CAST<Entity_Tear *>(&childTear->_parent);
|
|
msvc::multiset<unsigned_int>::erase(&local_60);
|
|
}
|
|
childTear->_parent = local_74;
|
|
if (local_74 != GHIDRA_CAST<BitSet128 *>(0x0)) {
|
|
msvc::multiset<unsigned_int>::insert(&childTear->_parent);
|
|
}
|
|
childTear->Update();
|
|
local_64 = GHIDRA_CAST<BitSet128 *>((GHIDRA_INT(&local_64->_l) + 1));
|
|
} while (GHIDRA_INT(local_64) < 2);
|
|
pBVar5 = GHIDRA_CAST<BitSet128 *>((GHIDRA_INT(this) + 0x428));
|
|
}
|
|
pBVar7 = BitSet128::operator_and(&local_b0,pBVar5,&g_tearFlagJacobs);
|
|
if (((GHIDRA_INT(pBVar7->_l) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&pBVar7->_l) + 4)) != 0) ||
|
|
(GHIDRA_INT(pBVar7->_h) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&pBVar7->_h) + 4)) != 0)) &&
|
|
(this->_height <= -5.0 && this->_height != -5.0)) {
|
|
spawned = spawn_chain_lightning
|
|
(&this->_pos,*pBVar5,GHIDRA_CAST<Entity *>(this->_spawnerEntity),
|
|
this->_collisionDamage * 0.5);
|
|
if (local_70 != GHIDRA_CAST<Entity *>(0x0)) {
|
|
if (spawned->_target != 0) {
|
|
local_60 = GHIDRA_CAST<Entity_Tear *>(&spawned->_target);
|
|
msvc::multiset<unsigned_int>::erase(&local_60);
|
|
}
|
|
spawned->_target = local_70;
|
|
msvc::multiset<unsigned_int>::insert(&spawned->_target);
|
|
}
|
|
color._tint[0] = (spawned->_sprite)._color._tint[0];
|
|
color._tint[1] = (spawned->_sprite)._color._tint[1];
|
|
color._tint[2] = (spawned->_sprite)._color._tint[2];
|
|
color._colorize[0] = (spawned->_sprite)._color._colorize[0];
|
|
color._colorize[1] = (spawned->_sprite)._color._colorize[1];
|
|
color._colorize[2] = (spawned->_sprite)._color._colorize[2];
|
|
color._colorize[3] = (spawned->_sprite)._color._colorize[3];
|
|
color._tint[3] = (spawned->_sprite)._color._tint[3] * alphaMultiplier;
|
|
(*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(color._offset)) + 0x0))) = *GHIDRA_CAST<uint64_t *>((spawned->_sprite)._color._offset);
|
|
color._offset[2] = (spawned->_sprite)._color._offset[2];
|
|
spawned->SetColor(&color,0xffffffff,0xff,0,1);
|
|
spawned->Update();
|
|
pBVar5 = &this->_tearFlags;
|
|
}
|
|
pBVar7 = BitSet128::operator_and(&local_b0,pBVar5,&g_tearFlagRift);
|
|
if ((GHIDRA_INT(pBVar7->_l) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&pBVar7->_l) + 4)) != 0) ||
|
|
(GHIDRA_INT(pBVar7->_h) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&pBVar7->_h) + 4)) != 0)) {
|
|
pBVar7 = (GHIDRA_CAST<BitSet128 *>((&g_tearFlagRift)))->BitSet128::__bnot(&local_b0);
|
|
*GHIDRA_CAST<uint32_t *>(&pBVar5->_l) = GHIDRA_UINT(pBVar5->_l) & GHIDRA_UINT(pBVar7->_l);
|
|
puVar1 = GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&pBVar5->_l) + 4));
|
|
*puVar1 = *puVar1 & *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&pBVar7->_l) + 4));
|
|
*GHIDRA_CAST<uint32_t *>(&pBVar5->_h) = GHIDRA_UINT(pBVar5->_h) & GHIDRA_UINT(pBVar7->_h);
|
|
puVar1 = GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&pBVar5->_h) + 4));
|
|
*puVar1 = *puVar1 & *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&pBVar7->_h) + 4));
|
|
game = g_game;
|
|
bVar3 = (GHIDRA_CAST<Room *>((g_game->_room)))->Room::IsPositionInRoom(&this->_pos,-10.0);
|
|
if (bVar3 != 0) {
|
|
local_60 = GHIDRA_CAST<Entity_Tear *>((this->_collisionDamage * 0.5));
|
|
Room::GetClampedPositionImpl(game->_room,&local_a0,&this->_pos,0.0,0.0,0.0,0.0);
|
|
uVar4 = Random();
|
|
spawned = Game::Spawn(g_game,1000,0xb4,&local_a0,&g_vectorZero,GHIDRA_CAST<Entity *>(this->_spawnerEntity),
|
|
0,uVar4);
|
|
fVar9 = this->_fScale * g_vectorOne.x;
|
|
iVar6 = *GHIDRA_CAST<int *>(spawned);
|
|
(spawned->_sprite)._scale.y = this->_fScale * g_vectorOne.y;
|
|
(spawned->_sprite)._scale.x = fVar9;
|
|
(**(code **)(iVar6 + 0x40))(local_60);
|
|
uVar10 = 0x3c;
|
|
iVar6 = *GHIDRA_CAST<int *>(spawned);
|
|
if (1 < *GHIDRA_CAST<int *>(&g_game->_deathmatchManager)) {
|
|
uVar10 = 0x1e;
|
|
}
|
|
*GHIDRA_CAST<uint32_t *>((spawned[1]._sprite._filename._buf + 4)) = uVar10;
|
|
*GHIDRA_CAST<uint32_t *>((spawned[1]._sprite._filename._buf + 8)) = uVar10;
|
|
(**(code **)(iVar6 + 0xc))();
|
|
manager = g_manager;
|
|
local_70 = GHIDRA_CAST<Entity *>(0x440);
|
|
seed_fart_sound_override(GHIDRA_CAST<int *>(&local_70));
|
|
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_70),0.5,2,0,1.0,0.0);
|
|
}
|
|
}
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 00677780
|
|
void Entity_Tear::ResetSpriteScale()
|
|
{
|
|
float *scaleThreshold;
|
|
uint32_t startFrame;
|
|
void *animData;
|
|
int iVar1;
|
|
LayerState *layer;
|
|
char *format;
|
|
int scaleAnimBase;
|
|
uint8_t *layerIndex;
|
|
uint32_t uVar2;
|
|
float fVar3;
|
|
float fVar4;
|
|
float fVar5;
|
|
float local_4c;
|
|
float local_48;
|
|
float sizeMultiX;
|
|
float local_40;
|
|
float layerSizeY;
|
|
uint8_t local_38 [8];
|
|
void *seedEffectNode;
|
|
uint8_t animName [32];
|
|
uint32_t local_c;
|
|
Game *game;
|
|
|
|
local_c = __security_cookie ^ GHIDRA_UINT(&local_4c);
|
|
local_4c = 1.0;
|
|
iVar1 = this->_variant;
|
|
scaleAnimBase = iVar1 * 100;
|
|
local_48 = (float)scaleAnimBase;
|
|
switch(iVar1) {
|
|
case 0:
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
case 10:
|
|
case 0xb:
|
|
case 0xc:
|
|
case 0xd:
|
|
case 0xe:
|
|
case 0xf:
|
|
case 0x10:
|
|
case 0x11:
|
|
case 0x12:
|
|
case 0x13:
|
|
case 0x14:
|
|
case 0x15:
|
|
case 0x16:
|
|
case 0x17:
|
|
case 0x18:
|
|
case 0x19:
|
|
case 0x1a:
|
|
case 0x1b:
|
|
case 0x1c:
|
|
case 0x1d:
|
|
case 0x1e:
|
|
case 0x1f:
|
|
case 0x20:
|
|
case 0x21:
|
|
case 0x22:
|
|
case 0x23:
|
|
case 0x24:
|
|
case 0x25:
|
|
case 0x26:
|
|
case 0x27:
|
|
case 0x29:
|
|
case 0x30:
|
|
uVar2 = 1;
|
|
scaleThreshold = GHIDRA_CAST<float *>(&DAT_00b64e30);
|
|
do {
|
|
if (this->_fScale <= *scaleThreshold + 0.05) break;
|
|
uVar2 = uVar2 + 1;
|
|
scaleThreshold = scaleThreshold + 1;
|
|
} while (uVar2 < 0xd);
|
|
if (this->_scaleAnimNum != scaleAnimBase + uVar2) {
|
|
if (((((iVar1 == 1) || (iVar1 == 0xc)) || (iVar1 == 0xf)) ||
|
|
((iVar1 == 0x11 || (iVar1 == 0x22)))) || (iVar1 == 0x19)) {
|
|
format = "BloodTear%d";
|
|
}
|
|
else if ((iVar1 == 2) || (iVar1 == 0x1e)) {
|
|
format = "Tooth%dMove";
|
|
}
|
|
else if (iVar1 == 0x14) {
|
|
format = "Rotate%d";
|
|
}
|
|
else if ((((iVar1 == 0x16) || (iVar1 == 0x1a)) || (iVar1 == 0x1b)) ||
|
|
(((iVar1 == 0x1c || (iVar1 == 0x1d)) || (iVar1 == 0x30)))) {
|
|
format = "Stone%dMove";
|
|
}
|
|
else {
|
|
format = "RegularTear%d";
|
|
}
|
|
sprintf_s(animName,0x20,GHIDRA_CAST<uint8_t *>(format));
|
|
ANM2::Play(&this->_sprite,animName,0);
|
|
this->_scaleAnimNum = scaleAnimBase + uVar2;
|
|
}
|
|
if (GHIDRA_INT(uVar2) < 0xd) {
|
|
if ((((GHIDRA_UINT(g_tearFlagGrow._l) | GHIDRA_UINT(g_tearFlagLudovico._l)) & GHIDRA_UINT((this->_tearFlags)._l))
|
|
== 0 && (((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGrow._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLudovico._l)) + 0x4)))) &
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4))) == 0) &&
|
|
(((GHIDRA_UINT(g_tearFlagGrow._h) | GHIDRA_UINT(g_tearFlagLudovico._h)) & GHIDRA_UINT((this->_tearFlags)._h)) ==
|
|
0 && (*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) &
|
|
((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGrow._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLudovico._h)) + 0x4))))) == 0)) {
|
|
local_4c = 1.0;
|
|
fVar3 = 1.0;
|
|
}
|
|
else {
|
|
local_4c = this->_fScale / *GHIDRA_CAST<float *>((&DAT_00b64e2c + uVar2 * 4));
|
|
fVar3 = local_4c;
|
|
}
|
|
}
|
|
else {
|
|
local_4c = this->_fScale / 2.75;
|
|
fVar3 = local_4c;
|
|
}
|
|
break;
|
|
default:
|
|
if (this->_scaleAnimNum != scaleAnimBase) {
|
|
ANM2::Play(&this->_sprite,s_Idle,0);
|
|
this->_scaleAnimNum = scaleAnimBase;
|
|
}
|
|
case 0x28:
|
|
switchD_006777c1_caseD_28:
|
|
fVar3 = 1.0;
|
|
break;
|
|
case 5:
|
|
case 6:
|
|
case 7:
|
|
if (this->_scaleAnimNum != scaleAnimBase) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("MoveHori"),0);
|
|
this->_scaleAnimNum = scaleAnimBase;
|
|
}
|
|
local_4c = this->_fScale / 2.75;
|
|
fVar3 = (this->_velocity).x + 0.0;
|
|
fVar4 = this->_fallingSpeed + (this->_velocity).y;
|
|
if (0 < this->_waitFrames) {
|
|
fVar3 = (this->_continueVelocity).x;
|
|
fVar4 = (this->_continueVelocity).y;
|
|
}
|
|
fVar3 = atan2f(fVar4,fVar3);
|
|
(this->_sprite)._rotation = fVar3 * 57.295776;
|
|
fVar3 = local_4c;
|
|
break;
|
|
case 8:
|
|
case 0x2a:
|
|
local_4c = this->_fScale;
|
|
iVar1 = 0;
|
|
do {
|
|
if (local_4c <= (float)(&DAT_00b64e90)[iVar1]) break;
|
|
iVar1 = iVar1 + 1;
|
|
} while (iVar1 < 5);
|
|
sprintf(animName,GHIDRA_CAST<uint8_t *>("Rotate%d"));
|
|
if (((this->_sprite)._animState._animData == (void *)0x0) ||
|
|
((this->_sprite)._animState._isPlaying == 0)) {
|
|
ANM2::Play(&this->_sprite,animName,0);
|
|
animData = (this->_sprite)._animState._animData;
|
|
if ((animData == (void *)0x0) || (uVar2 = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(animData) + 0x30)), uVar2 == 0)) {
|
|
startFrame = 0;
|
|
}
|
|
else {
|
|
startFrame = Random();
|
|
startFrame = startFrame % uVar2;
|
|
animData = (this->_sprite)._animState._animData;
|
|
}
|
|
if (animData != (void *)0x0) {
|
|
AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)GHIDRA_INT(startFrame));
|
|
}
|
|
}
|
|
else {
|
|
ANM2::SetAnimation(&this->_sprite,animName,0);
|
|
}
|
|
fVar3 = local_4c;
|
|
if (this->_variant == 8) {
|
|
this->_fScale = this->_fScale + this->_fScale;
|
|
}
|
|
break;
|
|
case 9:
|
|
if (this->_dead == 0) {
|
|
if (this->_scaleAnimNum != scaleAnimBase) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Rotate"),0);
|
|
this->_scaleAnimNum = scaleAnimBase;
|
|
}
|
|
(this->_sprite)._flipX = (this->_velocity).x <= 0.0 && (this->_velocity).x != 0.0;
|
|
}
|
|
goto switchD_006777c1_caseD_28;
|
|
case 0x2e:
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Flickering"),0);
|
|
uVar2 = g_graphicsManager_flags;
|
|
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
|
|
iVar1 = 1;
|
|
if ((uVar2 & 4) == 0) {
|
|
iVar1 = 6;
|
|
}
|
|
layer->_blendMode[0] = 0;
|
|
layer->_blendMode[1] = iVar1;
|
|
layer->_blendMode[2] = 1;
|
|
layer->_blendMode[3] = 1;
|
|
layer->_blendMode[4] = 1;
|
|
goto switchD_006777c1_caseD_28;
|
|
case 0x2f:
|
|
case 0x31:
|
|
ANM2::Play(&this->_sprite,s_Idle,0);
|
|
local_4c = this->_fScale;
|
|
fVar3 = local_4c;
|
|
break;
|
|
case 0x32:
|
|
uVar2 = 0;
|
|
fVar3 = this->_fScale + 0.25;
|
|
this->_fScale = fVar3;
|
|
do {
|
|
if (fVar3 <= (float)(&DAT_00b64e70)[uVar2]) break;
|
|
uVar2 = uVar2 + 1;
|
|
} while (GHIDRA_INT(uVar2) < 4);
|
|
if (this->_scaleAnimNum != uVar2 + scaleAnimBase) {
|
|
this->_scaleAnimNum = uVar2 + scaleAnimBase;
|
|
sprintf(animName,GHIDRA_CAST<uint8_t *>("Rotate%d"));
|
|
if (this->_scaleAnimNum / 100 == GHIDRA_INT(local_48) / 100) {
|
|
iVar1 = ANM2::GetFrame(&this->_sprite);
|
|
ANM2::Play(&this->_sprite,animName,0);
|
|
if (iVar1 < 0) goto LAB_00677c46;
|
|
}
|
|
else {
|
|
ANM2::Play(&this->_sprite,animName,0);
|
|
LAB_00677c46:
|
|
animData = (this->_sprite)._animState._animData;
|
|
if (animData == (void *)0x0) {
|
|
iVar1 = 0;
|
|
}
|
|
else {
|
|
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(animData) + 0x30));
|
|
}
|
|
iVar1 = Isaac::Random(iVar1);
|
|
}
|
|
if (((this->_sprite)._animState._animData != (void *)0x0) &&
|
|
(AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)iVar1),
|
|
(this->_sprite)._animState._animData != (void *)0x0)) {
|
|
(this->_sprite)._animState._isPlaying = 0;
|
|
}
|
|
}
|
|
if (uVar2 < 5) {
|
|
local_4c = this->_fScale / (float)(&DAT_00b64e70)[uVar2];
|
|
fVar3 = local_4c;
|
|
}
|
|
else {
|
|
local_4c = this->_fScale / 2.25;
|
|
fVar3 = local_4c;
|
|
}
|
|
}
|
|
game = g_game;
|
|
fVar4 = (this->_sizeMulti).x;
|
|
fVar5 = (this->_sizeMulti).y;
|
|
uVar2 = this->_variant;
|
|
local_48 = fVar5;
|
|
sizeMultiX = fVar4;
|
|
if (uVar2 < 0x33) {
|
|
if ((uVar2 == 0xd) || (uVar2 == 0x17)) {
|
|
local_40 = 1.10703e-43;
|
|
msvc::set<int>::find_node(local_38,&local_40);
|
|
if ((*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(seedEffectNode) + 0xd)) == '\0') &&
|
|
((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(seedEffectNode) + 0x10)) < 0x50 &&
|
|
(seedEffectNode != (game->_seedEffects)._seedEffects)))) {
|
|
fVar4 = fVar4 / 3.0;
|
|
sizeMultiX = fVar4;
|
|
}
|
|
}
|
|
layerIndex = GHIDRA_CAST<uint8_t *>(0x0);
|
|
if ((this->_sprite)._layerCount != 0) {
|
|
do {
|
|
local_40 = fVar3 * g_vectorOne.x * fVar4;
|
|
layerSizeY = fVar3 * g_vectorOne.y * fVar5;
|
|
layer = ANM2::GetLayer(&this->_sprite,layerIndex);
|
|
layerIndex = layerIndex + 1;
|
|
(layer->_size).x = local_40;
|
|
(layer->_size).y = layerSizeY;
|
|
fVar4 = sizeMultiX;
|
|
fVar5 = local_48;
|
|
fVar3 = local_4c;
|
|
} while (layerIndex < GHIDRA_CAST<uint8_t *>((this->_sprite)._layerCount));
|
|
}
|
|
}
|
|
else {
|
|
layerIndex = GHIDRA_CAST<uint8_t *>(0x0);
|
|
if ((this->_sprite)._layerCount != 0) {
|
|
do {
|
|
local_40 = this->_fScale * g_vectorOne.y * local_48;
|
|
local_4c = this->_fScale * g_vectorOne.x * sizeMultiX;
|
|
layer = ANM2::GetLayer(&this->_sprite,layerIndex);
|
|
layerIndex = layerIndex + 1;
|
|
(layer->_size).x = local_4c;
|
|
(layer->_size).y = local_40;
|
|
fVar4 = sizeMultiX;
|
|
fVar5 = local_48;
|
|
} while (layerIndex < GHIDRA_CAST<uint8_t *>((this->_sprite)._layerCount));
|
|
}
|
|
}
|
|
if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagGlow._l)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGlow._l)) + 0x4)))) != 0) ||
|
|
((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagGlow._h)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGlow._h)) + 0x4)))) != 0)) {
|
|
fVar3 = this->_fScale * 0.45;
|
|
(this->_tearHaloANM2)._scale.y = fVar3 * fVar5;
|
|
(this->_tearHaloANM2)._scale.x = fVar3 * fVar4;
|
|
if ((this->_tearHaloANM2)._loaded != 0) {
|
|
AnimationState::Update(&(this->_tearHaloANM2)._animState);
|
|
AnimationState::Update(&(this->_tearHaloANM2)._overlayAnimState);
|
|
}
|
|
}
|
|
if ((this->_tearEffectANM2)._loaded != 0) {
|
|
fVar3 = this->_fScale * 0.45;
|
|
(this->_tearEffectANM2)._scale.y = fVar3 * local_48;
|
|
(this->_tearEffectANM2)._scale.x = fVar3 * sizeMultiX;
|
|
AnimationState::Update(&(this->_tearEffectANM2)._animState);
|
|
AnimationState::Update(&(this->_tearEffectANM2)._overlayAnimState);
|
|
}
|
|
if (this->_deadEyeIntensity != 0.0) {
|
|
fVar3 = this->_fScale * 0.45;
|
|
(this->_deadEyeANM2)._scale.y = fVar3 * local_48;
|
|
(this->_deadEyeANM2)._scale.x = fVar3 * sizeMultiX;
|
|
if ((this->_deadEyeANM2)._loaded != 0) {
|
|
AnimationState::Update(&(this->_deadEyeANM2)._animState);
|
|
AnimationState::Update(&(this->_deadEyeANM2)._overlayAnimState);
|
|
}
|
|
}
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::SetSize(*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this->_config) + 0x38)) * this->_fScale,
|
|
this->_sizeMulti,*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this->_config) + 0x48)));
|
|
this->_shadowSize =
|
|
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this->_config) + 0x24)) * this->_fScale * (sizeMultiX + local_48) * 0.5;
|
|
return;
|
|
}
|
|
|
|
// 00678060
|
|
uint8_t Entity_Tear::is_not_familiar_spawned()
|
|
{
|
|
if ((this->_parent == 0) || (*GHIDRA_CAST<int *>((this->_parent + 0x28)) != 2)) {
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
// 00678080
|
|
void Entity_Tear::fire_split_projectiles(uint8_t isHalved)
|
|
{
|
|
uint32_t *puVar1;
|
|
double dVar2;
|
|
Entity_Player *pEVar3;
|
|
code *pcVar4;
|
|
BitSet128 flags;
|
|
uint64_t qVar5;
|
|
uint8_t isOwned;
|
|
uint32_t uVar6;
|
|
Entity_Tear *childShot;
|
|
Entity_Bomb *childBomb;
|
|
uint32_t uVar7;
|
|
Entity_Laser *techXLaser;
|
|
Entity *spawned;
|
|
uint32_t uVar8;
|
|
int iVar9;
|
|
uint32_t uVar10;
|
|
uint32_t uVar11;
|
|
float fVar12;
|
|
float fVar13;
|
|
float fVar14;
|
|
Entity_Player *player;
|
|
uint32_t splitCount;
|
|
float shotSpeed;
|
|
Vector bombVelocity;
|
|
Vector bombPos;
|
|
Vector techXVelocity;
|
|
Vector laserDirection;
|
|
Vector tearVelocity;
|
|
uint32_t uStack_20;
|
|
uint32_t uStack_1c;
|
|
uint32_t uStack_18;
|
|
uint32_t uStack_14;
|
|
Game *game;
|
|
|
|
player = GHIDRA_CAST<Entity_Player *>(0x0);
|
|
pEVar3 = GHIDRA_CAST<Entity_Player *>(this->_parent);
|
|
if (pEVar3 == GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
LAB_006780c0:
|
|
splitCount = 6;
|
|
if (player == GHIDRA_CAST<Entity_Player *>(0x0)) goto LAB_00678128;
|
|
}
|
|
else {
|
|
if (pEVar3->_type != 1) {
|
|
if (pEVar3->_type == 3) {
|
|
player = *GHIDRA_CAST<Entity_Player **>(&pEVar3->_isControlsEnabled);
|
|
}
|
|
goto LAB_006780c0;
|
|
}
|
|
player = pEVar3;
|
|
}
|
|
isOwned = (GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::HasCollectible(0xe5,0);
|
|
if ((isOwned == 0) && (isOwned = (GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::HasCollectible(0x18b,0), isOwned == 0)) {
|
|
isOwned = (GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::HasCollectible(0x76,0);
|
|
if (isOwned != 0) {
|
|
splitCount = 4;
|
|
goto LAB_00678128;
|
|
}
|
|
splitCount = 6;
|
|
isOwned = (GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::HasCollectible(0x34,0);
|
|
if (isOwned == 0) goto LAB_00678128;
|
|
}
|
|
splitCount = 3;
|
|
LAB_00678128:
|
|
uVar6 = Random();
|
|
splitCount = splitCount + uVar6 % splitCount;
|
|
if (isHalved != 0) {
|
|
splitCount = (splitCount + 1) / 2;
|
|
}
|
|
shotSpeed = 1.0;
|
|
if (player != GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
shotSpeed = player->_shotspeed;
|
|
}
|
|
if (splitCount != 0) {
|
|
do {
|
|
if (player == GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
LAB_00678885:
|
|
uVar6 = Random();
|
|
spawned = GHIDRA_CAST<Entity *>(this->_spawnerEntity);
|
|
uVar7 = Random();
|
|
fVar12 = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) *
|
|
2.3283064e-10 * 360.0 * 0.017453292;
|
|
fVar13 = cos(fVar12);
|
|
fVar12 = sin(fVar12);
|
|
tearVelocity.x = fVar13 * shotSpeed * 10.0 - fVar12 * 0.0;
|
|
tearVelocity.y = fVar12 * shotSpeed * 10.0 + fVar13 * 0.0;
|
|
spawned = Game::SpawnEx(g_game,2,1,&this->_pos,&tearVelocity,spawned,0,uVar6,0);
|
|
childShot = (Entity_Tear *)
|
|
__RTDynamicCast(spawned,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor,
|
|
&IsaacRepentancePlus::Entity_Tear::RTTI_Type_Descriptor,0);
|
|
if ((*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>(ThreadLocalStoragePointer) + 0xc)) < DAT_00c80008) &&
|
|
(_Init_thread_header(&DAT_00c80008), DAT_00c80008 == -1)) {
|
|
DAT_00c80010 = GHIDRA_UINT(g_tearFlagSpore._l) | GHIDRA_UINT(g_tearFlagOccult._l) |
|
|
GHIDRA_UINT(g_tearFlagBait._l) | GHIDRA_UINT(g_tearFlagMagnetize._l) |
|
|
GHIDRA_UINT(g_tearFlagIce._l) | GHIDRA_UINT(g_tearFlagPunch._l) |
|
|
GHIDRA_UINT(g_tearFlagCreepTrail._l) | GHIDRA_UINT(g_tearFlagHydrobounce._l) |
|
|
GHIDRA_UINT(g_tearFlagLasershot._l) | GHIDRA_UINT(g_tearFlagLaser._l) |
|
|
GHIDRA_UINT(g_tearFlagHorn._l) | GHIDRA_UINT(g_tearFlagJacobs._l) |
|
|
GHIDRA_UINT(g_tearFlagNeedle._l) | GHIDRA_UINT(g_tearFlagMidas._l) |
|
|
GHIDRA_UINT(g_tearFlagBelial._l) | GHIDRA_UINT(g_tearFlagAcid._l) |
|
|
GHIDRA_UINT(g_tearFlagEgg._l) | GHIDRA_UINT(g_tearFlagBooger._l) |
|
|
GHIDRA_UINT(g_tearFlagPermanentConfusion._l) | GHIDRA_UINT(g_tearFlagBigSpiral._l) |
|
|
GHIDRA_UINT(g_tearFlagGreedCoin._l) | GHIDRA_UINT(g_tearFlagGodsFlesh._l) |
|
|
GHIDRA_UINT(g_tearFlagBlackHpDrop._l) | GHIDRA_UINT(g_tearFlagCoinDrop._l) |
|
|
GHIDRA_UINT(g_tearFlagLightFromHeaven._l) | GHIDRA_UINT(g_tearFlagContinuum._l) |
|
|
GHIDRA_UINT(g_tearFlagSticky._l) | GHIDRA_UINT(g_tearFlagMysteriousLiquidCreep._l) |
|
|
GHIDRA_UINT(g_tearFlagGish._l) | GHIDRA_UINT(g_tearFlagGlow._l) |
|
|
GHIDRA_UINT(g_tearFlagSquare._l) | GHIDRA_UINT(g_tearFlagFlat._l) |
|
|
GHIDRA_UINT(g_tearFlagSpiral._l) | GHIDRA_UINT(g_tearFlagPulse._l) |
|
|
GHIDRA_UINT(g_tearFlagKnockback._l) | GHIDRA_UINT(g_tearFlagAttractor._l) |
|
|
GHIDRA_UINT(g_tearFlagBurn._l) | GHIDRA_UINT(g_tearFlagShrink._l) |
|
|
GHIDRA_UINT(g_tearFlagFear._l) | GHIDRA_UINT(g_tearFlagBounce._l) |
|
|
GHIDRA_UINT(g_tearFlagHpDrop._l) | GHIDRA_UINT(g_tearFlagConfusion._l) |
|
|
GHIDRA_UINT(g_tearFlagCharm._l) | GHIDRA_UINT(g_tearFlagMulligan._l) |
|
|
GHIDRA_UINT(g_tearFlagWiggle._l) | GHIDRA_UINT(g_tearFlagPersistent._l) |
|
|
GHIDRA_UINT(g_tearFlagGrow._l) | GHIDRA_UINT(g_tearFlagFreeze._l) |
|
|
GHIDRA_UINT(g_tearFlagPoison._l) | GHIDRA_UINT(g_tearFlagSlow._l) |
|
|
GHIDRA_UINT(g_tearFlagHoming._l) | GHIDRA_UINT(g_tearFlagSpectral._l) |
|
|
GHIDRA_UINT(g_tearFlagPiercing._l);
|
|
DAT_00c80014 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSpore._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagOccult._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBait._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagMagnetize._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagIce._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagPunch._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagCreepTrail._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHydrobounce._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLasershot._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLaser._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHorn._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagJacobs._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagNeedle._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagMidas._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBelial._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagAcid._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagEgg._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBooger._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagPermanentConfusion._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBigSpiral._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGreedCoin._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGodsFlesh._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBlackHpDrop._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagCoinDrop._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLightFromHeaven._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagContinuum._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSticky._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagMysteriousLiquidCreep._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGish._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGlow._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSquare._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagFlat._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSpiral._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagPulse._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagKnockback._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagAttractor._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBurn._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagShrink._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagFear._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBounce._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHpDrop._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagConfusion._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagCharm._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagMulligan._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagWiggle._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagPersistent._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGrow._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagFreeze._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagPoison._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSlow._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHoming._l)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSpectral._l)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagPiercing._l)) + 0x4)));
|
|
DAT_00c80018 = GHIDRA_UINT(g_tearFlagSpore._h) | GHIDRA_UINT(g_tearFlagOccult._h) |
|
|
GHIDRA_UINT(g_tearFlagBait._h) | GHIDRA_UINT(g_tearFlagMagnetize._h) |
|
|
GHIDRA_UINT(g_tearFlagIce._h) | GHIDRA_UINT(g_tearFlagPunch._h) |
|
|
GHIDRA_UINT(g_tearFlagCreepTrail._h) | GHIDRA_UINT(g_tearFlagHydrobounce._h) |
|
|
GHIDRA_UINT(g_tearFlagLasershot._h) | GHIDRA_UINT(g_tearFlagLaser._h) |
|
|
GHIDRA_UINT(g_tearFlagHorn._h) | GHIDRA_UINT(g_tearFlagJacobs._h) |
|
|
GHIDRA_UINT(g_tearFlagNeedle._h) | GHIDRA_UINT(g_tearFlagMidas._h) |
|
|
GHIDRA_UINT(g_tearFlagBelial._h) | GHIDRA_UINT(g_tearFlagAcid._h) |
|
|
GHIDRA_UINT(g_tearFlagEgg._h) | GHIDRA_UINT(g_tearFlagBooger._h) |
|
|
GHIDRA_UINT(g_tearFlagPermanentConfusion._h) | GHIDRA_UINT(g_tearFlagBigSpiral._h) |
|
|
GHIDRA_UINT(g_tearFlagGreedCoin._h) | GHIDRA_UINT(g_tearFlagGodsFlesh._h) |
|
|
GHIDRA_UINT(g_tearFlagBlackHpDrop._h) | GHIDRA_UINT(g_tearFlagCoinDrop._h) |
|
|
GHIDRA_UINT(g_tearFlagLightFromHeaven._h) | GHIDRA_UINT(g_tearFlagContinuum._h) |
|
|
GHIDRA_UINT(g_tearFlagSticky._h) | GHIDRA_UINT(g_tearFlagMysteriousLiquidCreep._h) |
|
|
GHIDRA_UINT(g_tearFlagGish._h) | GHIDRA_UINT(g_tearFlagGlow._h) |
|
|
GHIDRA_UINT(g_tearFlagSquare._h) | GHIDRA_UINT(g_tearFlagFlat._h) |
|
|
GHIDRA_UINT(g_tearFlagSpiral._h) | GHIDRA_UINT(g_tearFlagPulse._h) |
|
|
GHIDRA_UINT(g_tearFlagKnockback._h) | GHIDRA_UINT(g_tearFlagAttractor._h) |
|
|
GHIDRA_UINT(g_tearFlagBurn._h) | GHIDRA_UINT(g_tearFlagShrink._h) |
|
|
GHIDRA_UINT(g_tearFlagFear._h) | GHIDRA_UINT(g_tearFlagBounce._h) |
|
|
GHIDRA_UINT(g_tearFlagHpDrop._h) | GHIDRA_UINT(g_tearFlagConfusion._h) |
|
|
GHIDRA_UINT(g_tearFlagCharm._h) | GHIDRA_UINT(g_tearFlagMulligan._h) |
|
|
GHIDRA_UINT(g_tearFlagWiggle._h) | GHIDRA_UINT(g_tearFlagPersistent._h) |
|
|
GHIDRA_UINT(g_tearFlagGrow._h) | GHIDRA_UINT(g_tearFlagFreeze._h) |
|
|
GHIDRA_UINT(g_tearFlagPoison._h) | GHIDRA_UINT(g_tearFlagSlow._h) |
|
|
GHIDRA_UINT(g_tearFlagHoming._h) | GHIDRA_UINT(g_tearFlagSpectral._h) |
|
|
GHIDRA_UINT(g_tearFlagPiercing._h);
|
|
DAT_00c8001c = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSpore._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagOccult._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBait._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagMagnetize._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagIce._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagPunch._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagCreepTrail._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHydrobounce._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLasershot._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLaser._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHorn._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagJacobs._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagNeedle._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagMidas._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBelial._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagAcid._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagEgg._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBooger._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagPermanentConfusion._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBigSpiral._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGreedCoin._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGodsFlesh._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBlackHpDrop._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagCoinDrop._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLightFromHeaven._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagContinuum._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSticky._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagMysteriousLiquidCreep._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGish._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGlow._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSquare._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagFlat._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSpiral._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagPulse._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagKnockback._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagAttractor._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBurn._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagShrink._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagFear._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBounce._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHpDrop._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagConfusion._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagCharm._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagMulligan._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagWiggle._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagPersistent._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGrow._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagFreeze._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagPoison._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSlow._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHoming._h)) + 0x4))) | (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSpectral._h)) + 0x4))) |
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagPiercing._h)) + 0x4)));
|
|
_Init_thread_footer(&DAT_00c80008);
|
|
}
|
|
uStack_1c = DAT_00c80014 & *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4));
|
|
uStack_20 = DAT_00c80010 & GHIDRA_UINT((this->_tearFlags)._l);
|
|
uStack_14 = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & DAT_00c8001c;
|
|
uStack_18 = DAT_00c80018 & GHIDRA_UINT((this->_tearFlags)._h);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._l)) + 0x4))) = uStack_1c;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._l)) + 0x0))) = uStack_20;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._h)) + 0x0))) = uStack_18;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._h)) + 0x4))) = uStack_14;
|
|
SetTearFlags(childShot,flags);
|
|
uVar6 = Random();
|
|
(**(code **)(*GHIDRA_CAST<int *>(childShot) + 0x40))
|
|
((this->_collisionDamage / 1.5) *
|
|
((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) *
|
|
2.3283064e-10 * 0.5 + 0.75));
|
|
fVar12 = fVar13 * this->_fScale * 0.55;
|
|
if (fVar12 <= 0.01) {
|
|
fVar12 = 0.01;
|
|
}
|
|
childShot->_baseScale = fVar12;
|
|
childShot->_fScale = fVar12;
|
|
ResetSpriteScale(childShot);
|
|
fVar12 = -6.0;
|
|
if (this->_height <= -6.0) {
|
|
fVar12 = this->_height;
|
|
}
|
|
childShot->_height = fVar12;
|
|
fVar13 = get_height_offset_y(childShot,fVar12);
|
|
game = g_game;
|
|
(childShot->_posOffset).y = fVar13;
|
|
if ((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(game->_room) + 8)) == 0x10) &&
|
|
((childShot->_posOffset).y = -18.0, -5.1 < fVar12)) {
|
|
childShot->_height = -5.1;
|
|
}
|
|
uVar6 = Random();
|
|
childShot->_fallingAccel = 1.3;
|
|
childShot->_fallingSpeed =
|
|
((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) *
|
|
2.3283064e-10 * 0.75 + 0.5) * (float)this * 0.5;
|
|
childShot->SetColor(&(this->_sprite)._color,0xffffffff,0xff,0,1);
|
|
childShot->_prismTouched = this->_prismTouched;
|
|
childShot->_multidimensionalTouched = this->_multidimensionalTouched;
|
|
LAB_00678b68:
|
|
childShot->Update();
|
|
}
|
|
else {
|
|
isOwned = (GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::HasCollectible(0x76,0);
|
|
if (isOwned != 0) {
|
|
uVar6 = Random();
|
|
childShot = (Entity_Tear *)
|
|
Entity_Player::FireDelayedBrimstone
|
|
(player,(float)((double)GHIDRA_INT(uVar6) +
|
|
__uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) *
|
|
2.3283064e-10 * 360.0,GHIDRA_CAST<Entity *>(player));
|
|
(childShot->_pos).x = (this->_pos).x;
|
|
(childShot->_pos).y = (this->_pos).y;
|
|
iVar9 = *GHIDRA_CAST<int *>(childShot);
|
|
*GHIDRA_CAST<uint8_t *>(&(childShot->_tearHaloANM2)._animState._layerFrames) = 1;
|
|
(**(code **)(iVar9 + 0x3c))(&(this->_sprite)._color,0xffffffff,0xff,0,1);
|
|
*GHIDRA_CAST<uint8_t *>(&(childShot->_tearHaloANM2)._overlayAnimState._currentlyTriggeredEvents) =
|
|
this->_prismTouched;
|
|
*GHIDRA_CAST<uint8_t *>(&(childShot->_tearHaloANM2)._overlayAnimState._animData) =
|
|
this->_multidimensionalTouched;
|
|
goto LAB_00678b68;
|
|
}
|
|
isOwned = (GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::HasCollectible(0x34,0);
|
|
if (isOwned == 0) {
|
|
isOwned = (GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::HasCollectible(0x18b,0);
|
|
if (isOwned == 0) {
|
|
isOwned = (GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::HasCollectible(0x44,0);
|
|
if (isOwned == 0) goto LAB_00678885;
|
|
uVar6 = Random();
|
|
fVar12 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) *
|
|
2.3283064e-10 * 360.0 * 0.017453292;
|
|
fVar13 = cos(fVar12);
|
|
laserDirection.y = sin(fVar12);
|
|
laserDirection.x = fVar13 - laserDirection.y * 0.0;
|
|
laserDirection.y = fVar13 * 0.0 + laserDirection.y;
|
|
childShot = (Entity_Tear *)
|
|
Entity_Player::FireTechLaser
|
|
(player,&this->_pos,1,&laserDirection,0,0,GHIDRA_CAST<Entity *>(0x0),1.0);
|
|
childShot->SetCollisionDamage(childShot->_collisionDamage / 1.5);
|
|
(childShot->_pos).x = (this->_pos).x;
|
|
(childShot->_pos).y = (this->_pos).y;
|
|
iVar9 = *GHIDRA_CAST<int *>(childShot);
|
|
*GHIDRA_CAST<uint8_t *>(&(childShot->_tearHaloANM2)._animState._layerFrames) = 1;
|
|
(**(code **)(iVar9 + 0x3c))(&(this->_sprite)._color,0xffffffff,0xff,0,1);
|
|
*GHIDRA_CAST<uint8_t *>(&(childShot->_tearHaloANM2)._overlayAnimState._currentlyTriggeredEvents) =
|
|
this->_prismTouched;
|
|
*GHIDRA_CAST<uint8_t *>(&(childShot->_tearHaloANM2)._overlayAnimState._animData) =
|
|
this->_multidimensionalTouched;
|
|
goto LAB_00678b68;
|
|
}
|
|
uVar6 = Random();
|
|
dVar2 = __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)];
|
|
fVar12 = player->_shotspeed * 10.0;
|
|
uVar7 = Random();
|
|
fVar13 = (float)((double)GHIDRA_INT(uVar7) + __uint_to_double_fixup[-(GHIDRA_INT(uVar7) >> 0x1f)]) *
|
|
2.3283064e-10 * 360.0 * 0.017453292;
|
|
fVar14 = cos(fVar13);
|
|
fVar13 = sin(fVar13);
|
|
techXVelocity.y = fVar13 * fVar12 + fVar14 * 0.0;
|
|
techXVelocity.x = fVar14 * fVar12 - fVar13 * 0.0;
|
|
techXLaser = Entity_Player::FireTechXLaser
|
|
(player,&this->_pos,&techXVelocity,
|
|
(float)((double)GHIDRA_INT(uVar6) + dVar2) * 2.3283064e-10 * 60.0 + 20.0,
|
|
GHIDRA_CAST<Entity *>(0x0),1.0);
|
|
techXLaser->_prismTouched = this->_prismTouched;
|
|
techXLaser->_multidimensionalTouched = this->_multidimensionalTouched;
|
|
techXLaser->Update();
|
|
}
|
|
else {
|
|
uVar6 = Random();
|
|
fVar12 = ((float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) *
|
|
2.3283064e-10 * 4.0 + 3.0) * player->_shotspeed;
|
|
uVar6 = Random();
|
|
fVar13 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) *
|
|
2.3283064e-10 * 360.0 * 0.017453292;
|
|
fVar14 = cos(fVar13);
|
|
fVar13 = sin(fVar13);
|
|
bombVelocity.x = fVar12 * fVar14 - fVar13 * 0.0;
|
|
bombVelocity.y = fVar12 * fVar13 + fVar14 * 0.0;
|
|
uVar6 = Random();
|
|
fVar12 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) *
|
|
2.3283064e-10 * 3.14;
|
|
fVar12 = fVar12 + fVar12;
|
|
uVar6 = Random();
|
|
fVar13 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) *
|
|
2.3283064e-10;
|
|
fVar14 = cos(fVar12);
|
|
bombPos.x = fVar14 * fVar13 * 10.0 + (this->_pos).x;
|
|
fVar12 = sin(fVar12);
|
|
bombPos.y = fVar12 * fVar13 * 10.0 + (this->_pos).y;
|
|
childBomb = (GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::FireBomb(&bombPos,&bombVelocity,GHIDRA_CAST<Entity *>(0x0));
|
|
childBomb->SetColor(&(this->_sprite)._color,0xffffffff,0xff,0,1);
|
|
childBomb->_prismTouched = this->_prismTouched;
|
|
if (this->_canTriggerStreakEnd == 0) {
|
|
uVar6 = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(childBomb->_tearFlags)._l) + 4));
|
|
qVar5 = (childBomb->_tearFlags)._h;
|
|
uVar7 = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(childBomb->_tearFlags)._h) + 4));
|
|
uVar11 = ~GHIDRA_UINT(g_tearFlagSadBomb._h);
|
|
uVar10 = ~(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSadBomb._h)) + 0x4)));
|
|
uVar8 = ~(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSadBomb._l)) + 0x4)));
|
|
*GHIDRA_CAST<uint32_t *>(&(childBomb->_tearFlags)._l) =
|
|
~GHIDRA_UINT(g_tearFlagSadBomb._l) & GHIDRA_UINT((childBomb->_tearFlags)._l);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(childBomb->_tearFlags)._l) + 4)) = uVar8 & uVar6;
|
|
*GHIDRA_CAST<uint32_t *>(&(childBomb->_tearFlags)._h) = uVar11 & GHIDRA_UINT(qVar5);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(childBomb->_tearFlags)._h) + 4)) = uVar10 & uVar7;
|
|
}
|
|
childBomb->_loadCostumes = 1;
|
|
childBomb->_scale = childBomb->_scale * 0.5;
|
|
childBomb->_explosionDamage = childBomb->_explosionDamage * 0.5;
|
|
childBomb->_radiusMultiplier = childBomb->_radiusMultiplier * 0.65;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(childBomb))))->Entity::SetSize(childBomb->_size * 0.5,
|
|
(Vector)(CONCAT44(g_vectorOne.y,g_vectorOne.x) ^ 0x8000000080000000),-1);
|
|
if ((childBomb->_variant != 0x13) && (childBomb->_variant != 0x14)) {
|
|
uVar6 = Random();
|
|
childBomb->_fallSpeed =
|
|
-3.0 - (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)])
|
|
* 2.3283064e-10 * 5.0;
|
|
uVar6 = (childBomb->_dropRNG)._seed;
|
|
if (uVar6 == 0) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("RNG Seed is zero!\n"));
|
|
uVar6 = (childBomb->_dropRNG)._seed;
|
|
if (uVar6 == 0) {
|
|
pcVar4 = (code *)swi(3);
|
|
(*pcVar4)();
|
|
return;
|
|
}
|
|
}
|
|
uVar6 = uVar6 >> ((uint8_t)(childBomb->_dropRNG)._shift1 & 0x1f) ^ uVar6;
|
|
uVar6 = uVar6 << ((uint8_t)(childBomb->_dropRNG)._shift2 & 0x1f) ^ uVar6;
|
|
uVar6 = uVar6 >> ((uint8_t)(childBomb->_dropRNG)._shift3 & 0x1f) ^ uVar6;
|
|
(childBomb->_dropRNG)._seed = uVar6;
|
|
(childBomb->_posOffset).x = 0.0;
|
|
iVar9 = uVar6 % 0xe + 10;
|
|
(childBomb->_posOffset).y = -3.0;
|
|
childBomb->_explosionCountdown1 = iVar9;
|
|
*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((childBomb)) + 0x414)))) = iVar9;
|
|
}
|
|
*GHIDRA_CAST<uint32_t *>(&childBomb->_flags) = GHIDRA_UINT(childBomb->_flags) | 0x4000000;
|
|
puVar1 = GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&childBomb->_flags) + 4));
|
|
*puVar1 = *puVar1 | 0x400;
|
|
}
|
|
}
|
|
splitCount = splitCount - 1;
|
|
} while (splitCount != 0);
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 006790c0
|
|
void Entity_Tear::Render(Vector *offset)
|
|
{
|
|
Vector *position;
|
|
float fVar1;
|
|
uint8_t isLocalPlayer;
|
|
Entity_Player *spawnerPlayer;
|
|
float fVar2;
|
|
float fVar3;
|
|
double dVar4;
|
|
double dVar5;
|
|
ColorMod remoteColor;
|
|
float savedTintR;
|
|
float savedTintG;
|
|
float savedTintB;
|
|
float savedTintA;
|
|
float savedColorizeR;
|
|
float savedColorizeG;
|
|
float savedColorizeB;
|
|
float savedColorizeA;
|
|
uint32_t auStack_6c [26];
|
|
uint64_t savedOffsetXY;
|
|
ColorMod *spriteColor;
|
|
|
|
if ((this->_exists != 0) && (this->_visible != 0)) {
|
|
fVar3 = g_displayPixelRatio * g_screenPointScale;
|
|
dVar4 = floor((double)(((((this->_posOffset).x + (this->_pos).x) - 60.0) * 0.65 +
|
|
(g_screenWidth - 338.0) * 0.5) * fVar3 + 0.5));
|
|
dVar5 = floor((double)(((((this->_pos).y + (this->_posOffset).y) - 140.0) * 0.65 +
|
|
(g_screenHeight - 182.0) * 0.5) * fVar3 + 0.5));
|
|
position = &this->_renderPosition;
|
|
fVar1 = offset->y;
|
|
position->x = (float)dVar4 / fVar3 + offset->x;
|
|
(this->_renderPosition).y = (float)dVar5 / fVar3 + fVar1;
|
|
if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagGlow._l)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGlow._l)) + 0x4)))) != 0) ||
|
|
((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagGlow._h)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagGlow._h)) + 0x4)))) != 0)) {
|
|
ANM2::Render(&this->_tearHaloANM2,position,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
if (((this->_tearEffectANM2)._loaded != 0) &&
|
|
((GHIDRA_UINT((this->_tearEffectANM2)._bitflags) >> 0xd & 1) != 0)) {
|
|
ANM2::Render(&this->_tearEffectANM2,position,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
spawnerPlayer =
|
|
(Entity_Player *)
|
|
__RTDynamicCast(this->_spawnerEntity,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor,
|
|
&IsaacRepentancePlus::Entity_Player::RTTI_Type_Descriptor);
|
|
savedTintR = (this->_sprite)._color._tint[0];
|
|
savedTintG = (this->_sprite)._color._tint[1];
|
|
savedTintB = (this->_sprite)._color._tint[2];
|
|
savedTintA = (this->_sprite)._color._tint[3];
|
|
spriteColor = &(this->_sprite)._color;
|
|
fVar1 = (this->_sprite)._color._offset[2];
|
|
savedColorizeR = (this->_sprite)._color._colorize[0];
|
|
savedColorizeG = (this->_sprite)._color._colorize[1];
|
|
savedColorizeB = (this->_sprite)._color._colorize[2];
|
|
savedColorizeA = (this->_sprite)._color._colorize[3];
|
|
savedOffsetXY = *GHIDRA_CAST<uint64_t *>((this->_sprite)._color._offset);
|
|
if ((spawnerPlayer != GHIDRA_CAST<Entity_Player *>(0x0)) &&
|
|
(g_manager->_netplayManager != *GHIDRA_CAST<int *>((g_manager + 1)))) {
|
|
isLocalPlayer =
|
|
NetplayManager::IsIdxLocalPlayer
|
|
(GHIDRA_CAST<NetplayManager *>(&g_manager->_netplayManager),spawnerPlayer->_controllerIndex)
|
|
;
|
|
if (isLocalPlayer == 0) {
|
|
remoteColor._colorize[0] = (this->_sprite)._color._colorize[0];
|
|
remoteColor._colorize[1] = (this->_sprite)._color._colorize[1];
|
|
remoteColor._colorize[2] = (this->_sprite)._color._colorize[2];
|
|
remoteColor._colorize[3] = (this->_sprite)._color._colorize[3];
|
|
remoteColor._tint[0] = spriteColor->_tint[0];
|
|
remoteColor._tint[1] = (this->_sprite)._color._tint[1];
|
|
remoteColor._tint[2] = (this->_sprite)._color._tint[2];
|
|
fVar3 = (this->_sprite)._color._tint[3];
|
|
remoteColor._offset[2] = (this->_sprite)._color._offset[2];
|
|
fVar2 = (this->_sprite)._color._offset[0];
|
|
remoteColor._offset[1] = (this->_sprite)._color._offset[1];
|
|
remoteColor._tint[3] = fVar3;
|
|
remoteColor._offset[0] = fVar2;
|
|
FUN_00925df0();
|
|
remoteColor._tint[3] = fVar2 * fVar3;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(&remoteColor);
|
|
}
|
|
}
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::Render(offset);
|
|
if (spriteColor != GHIDRA_CAST<ColorMod *>(auStack_6c)) {
|
|
spriteColor->_tint[0] = savedTintR;
|
|
(this->_sprite)._color._tint[1] = savedTintG;
|
|
(this->_sprite)._color._tint[2] = savedTintB;
|
|
(this->_sprite)._color._tint[3] = savedTintA;
|
|
(this->_sprite)._color._colorize[0] = savedColorizeR;
|
|
(this->_sprite)._color._colorize[1] = savedColorizeG;
|
|
(this->_sprite)._color._colorize[2] = savedColorizeB;
|
|
(this->_sprite)._color._colorize[3] = savedColorizeA;
|
|
*GHIDRA_CAST<uint64_t *>((this->_sprite)._color._offset) = savedOffsetXY;
|
|
(this->_sprite)._color._offset[2] = fVar1;
|
|
}
|
|
if (((this->_tearEffectANM2)._loaded != 0) &&
|
|
((GHIDRA_UINT((this->_tearEffectANM2)._bitflags) >> 0xd & 1) == 0)) {
|
|
ANM2::Render(&this->_tearEffectANM2,position,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
if (this->_deadEyeIntensity != 0.0) {
|
|
ANM2::Render(&this->_deadEyeANM2,position,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
FUN_00862b80(this,offset);
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 00679400
|
|
void Entity_Tear::Interpolate()
|
|
{
|
|
uint8_t isFlagSet;
|
|
int iVar1;
|
|
int playerLaser;
|
|
Vector *pVVar2;
|
|
int extraout_EDX;
|
|
uint32_t uVar3;
|
|
Entity_Player *player;
|
|
Game *game;
|
|
float fVar4;
|
|
uint8_t *puVar5;
|
|
float fVar6;
|
|
float fVar7;
|
|
Vector local_34;
|
|
uint8_t *local_2c;
|
|
float local_28;
|
|
Vector local_24;
|
|
Entity_Tear *local_1c;
|
|
uint8_t auStack_18 [8];
|
|
uint32_t uStack_10;
|
|
uint32_t uStack_c;
|
|
Entity_Player *nextSpawner;
|
|
Entity_Player *spawner;
|
|
Entity_Tear *tear;
|
|
uint32_t tearFlagsLo;
|
|
|
|
if (0 < this->_holdTimer) {
|
|
iVar1 = this->_parent;
|
|
if (iVar1 == 0) {
|
|
return;
|
|
}
|
|
fVar4 = *GHIDRA_CAST<float *>((iVar1 + 0x340));
|
|
fVar7 = (this->_holdOffset).y;
|
|
(this->_pos).x = *GHIDRA_CAST<float *>((iVar1 + 0x33c)) + (this->_holdOffset).x;
|
|
(this->_pos).y = fVar4 + fVar7;
|
|
return;
|
|
}
|
|
uVar3 = GHIDRA_UINT((this->_tearFlags)._h);
|
|
local_2c = GHIDRA_CAST<uint8_t *>((uVar3 & GHIDRA_UINT(g_tearFlagTractorBeam._h)));
|
|
tearFlagsLo = GHIDRA_UINT((this->_tearFlags)._l);
|
|
local_34.x = (float)(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagTractorBeam._h)) + 0x4))));
|
|
local_1c = this;
|
|
if (((tearFlagsLo & GHIDRA_UINT(g_tearFlagTractorBeam._l)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagTractorBeam._l)) + 0x4)))) != 0) ||
|
|
(local_2c != GHIDRA_CAST<uint8_t *>(0x0) || local_34.x != 0.0)) {
|
|
if ((((tearFlagsLo & GHIDRA_UINT(g_tearFlagLudovico._l)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLudovico._l)) + 0x4)))) == 0) &&
|
|
((((uVar3 & GHIDRA_UINT(g_tearFlagLudovico._h)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLudovico._h)) + 0x4)))) == 0 &&
|
|
(iVar1 = this->_parent, iVar1 != 0)) && (*GHIDRA_CAST<int *>((iVar1 + 0x28)) == 1)))) &&
|
|
(this->_stickTarget == (void *)0x0)) {
|
|
iVar1 = __RTDynamicCast(iVar1,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor,
|
|
&IsaacRepentancePlus::Entity_Player::RTTI_Type_Descriptor,0);
|
|
playerLaser = __RTDynamicCast(*GHIDRA_CAST<uint32_t *>((iVar1 + 0x1430)),0,
|
|
&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor,
|
|
&IsaacRepentancePlus::Entity_Laser::RTTI_Type_Descriptor,0);
|
|
if (playerLaser != 0) {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auStack_18)) + 0x0))) = GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagBoomerang._l);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auStack_18)) + 0x4))) = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBoomerang._l)) + 0x4)))
|
|
;
|
|
fVar4 = (this->_pos).x - *GHIDRA_CAST<float *>((iVar1 + 0x33c));
|
|
fVar7 = (this->_pos).y - *GHIDRA_CAST<float *>((iVar1 + 0x340));
|
|
uStack_10 = GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagBoomerang._h);
|
|
uStack_c = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBoomerang._h)) + 0x4)));
|
|
local_2c = GHIDRA_CAST<uint8_t *>(0x3f800000);
|
|
local_28 = fVar7;
|
|
local_24.x = fVar4;
|
|
isFlagSet = (GHIDRA_CAST<BitSet128 *>((GHIDRA_CAST<BitSet128 *>(auStack_18))))->BitSet128::IsNonZero();
|
|
if ((isFlagSet != 0) && (fVar7 * (this->_velocity).y + fVar4 * (this->_velocity).x < 0.0)) {
|
|
local_2c = &DAT_bf800000;
|
|
}
|
|
local_34.x = *GHIDRA_CAST<float *>((extraout_EDX + 0x41c)) * 0.017453292;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auStack_18)) + 0x0))) = cos(local_34.x);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auStack_18)) + 0x4))) = sin(local_34.x);
|
|
fVar4 = (this->_velocity).y;
|
|
fVar7 = (this->_velocity).x;
|
|
fVar4 = sqrtf(fVar7 * fVar7 + fVar4 * fVar4);
|
|
pVVar2 = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>(auStack_18))))->Vector::Resized(&local_34,fVar4);
|
|
fVar4 = pVVar2->y;
|
|
(this->_velocity).x = (float)local_2c * pVVar2->x;
|
|
(this->_velocity).y = (float)local_2c * fVar4;
|
|
fVar7 = sqrtf(local_28 * local_28 + local_24.x * local_24.x);
|
|
fVar4 = *GHIDRA_CAST<float *>((iVar1 + 0x33c));
|
|
(this->_pos).y = fVar7 * (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auStack_18)) + 0x4))) + *GHIDRA_CAST<float *>((iVar1 + 0x340));
|
|
(this->_pos).x = fVar7 * (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auStack_18)) + 0x0))) + fVar4;
|
|
}
|
|
}
|
|
}
|
|
uVar3 = GHIDRA_UINT((this->_tearFlags)._h);
|
|
local_24.x = (float)(uVar3 & GHIDRA_UINT(g_tearFlagLaser._h));
|
|
local_34.x = *GHIDRA_CAST<float *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4));
|
|
local_28 = (float)(GHIDRA_UINT(local_34.x) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLaser._h)) + 0x4))));
|
|
if (((!((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagLaser._l)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLaser._l)) + 0x4)))) == 0)) ||
|
|
(!(local_24.x == 0.0 && local_28 == 0.0))) &&
|
|
((this->_techZeroLaser != 0 && (this->_techZeroTarget != 0)))) {
|
|
playerLaser = __RTDynamicCast(this->_techZeroLaser,0,
|
|
&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor,
|
|
&IsaacRepentancePlus::Entity_Laser::RTTI_Type_Descriptor,0);
|
|
iVar1 = this->_techZeroTarget;
|
|
local_28 = (*GHIDRA_CAST<float *>((iVar1 + 0x33c)) + *GHIDRA_CAST<float *>((iVar1 + 0x34c))) -
|
|
((this->_velocity).x + (this->_pos).x + (this->_posOffset).x);
|
|
local_24.x = (*GHIDRA_CAST<float *>((iVar1 + 0x340)) + *GHIDRA_CAST<float *>((iVar1 + 0x350))) -
|
|
((this->_velocity).y + (this->_pos).y + (this->_posOffset).y);
|
|
fVar4 = atan2f(local_24.x,local_28);
|
|
fVar4 = fVar4 * 57.295776;
|
|
*GHIDRA_CAST<uint32_t *>((playerLaser + 0x420)) = *GHIDRA_CAST<uint32_t *>((playerLaser + 0x41c));
|
|
*GHIDRA_CAST<float *>((playerLaser + 0x418)) = fVar4;
|
|
*GHIDRA_CAST<float *>((playerLaser + 0x41c)) = fVar4;
|
|
*GHIDRA_CAST<float *>((playerLaser + 0xec)) = fVar4 - 90.0;
|
|
fVar4 = sqrtf(local_24.x * local_24.x + local_28 * local_28);
|
|
*GHIDRA_CAST<float *>((playerLaser + 0x4d0)) = fVar4;
|
|
fVar4 = (this->_posOffset).y;
|
|
fVar7 = (this->_pos).y;
|
|
fVar6 = (this->_velocity).y;
|
|
*GHIDRA_CAST<float *>((playerLaser + 0x33c)) =
|
|
((this->_posOffset).x + (this->_pos).x + (this->_velocity).x) -
|
|
*GHIDRA_CAST<float *>((playerLaser + 0x34c));
|
|
*GHIDRA_CAST<float *>((playerLaser + 0x340)) = (fVar4 + fVar7 + fVar6) - *GHIDRA_CAST<float *>((playerLaser + 0x350));
|
|
uVar3 = GHIDRA_UINT((this->_tearFlags)._h);
|
|
local_34.x = *GHIDRA_CAST<float *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4));
|
|
}
|
|
tear = local_1c;
|
|
local_24.x = (float)(uVar3 & GHIDRA_UINT(g_tearFlagLudovico._h));
|
|
if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagLudovico._l)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLudovico._l)) + 0x4)))) == 0) &&
|
|
(local_24.x == 0.0 && (GHIDRA_UINT(local_34.x) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLudovico._h)) + 0x4)))) == 0)) {
|
|
nextSpawner = GHIDRA_CAST<Entity_Player *>(this->_spawnerEntity);
|
|
player = GHIDRA_CAST<Entity_Player *>(this);
|
|
while (spawner = nextSpawner, spawner != GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
player = spawner;
|
|
nextSpawner = GHIDRA_CAST<Entity_Player *>(spawner->_spawnerEntity);
|
|
}
|
|
if (player->_type != 1) {
|
|
player = GHIDRA_CAST<Entity_Player *>(0x0);
|
|
}
|
|
if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagWiggle._l)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagWiggle._l)) + 0x4)))) != 0) ||
|
|
((uVar3 & GHIDRA_UINT(g_tearFlagWiggle._h)) != 0 ||
|
|
(GHIDRA_UINT(local_34.x) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagWiggle._h)) + 0x4)))) != 0)) {
|
|
if (player == GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
fVar4 = 1.0;
|
|
}
|
|
else {
|
|
fVar4 = get_tear_trinket_multiplier(player,10);
|
|
if (fVar4 <= 1.0) {
|
|
fVar4 = 1.0;
|
|
}
|
|
}
|
|
apply_wiggle(tear,fVar4);
|
|
}
|
|
local_1c = (Entity_Tear *)
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(tear->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSpiral._h)) + 0x4))));
|
|
if (((GHIDRA_UINT((tear->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagSpiral._l)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(tear->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagSpiral._l)) + 0x4)))) != 0) ||
|
|
((GHIDRA_UINT((tear->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagSpiral._h)) != 0 ||
|
|
local_1c != GHIDRA_CAST<Entity_Tear *>(0x0))) {
|
|
if (player == GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
fVar4 = 1.0;
|
|
}
|
|
else {
|
|
playerLaser = (GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::GetTrinketMultiplier(0xb);
|
|
iVar1 = 1;
|
|
if (1 < playerLaser) {
|
|
iVar1 = playerLaser;
|
|
}
|
|
fVar4 = (float)iVar1;
|
|
if (fVar4 <= 1.0) {
|
|
fVar4 = 1.0;
|
|
}
|
|
}
|
|
apply_wiggle(tear,fVar4);
|
|
}
|
|
local_1c = (Entity_Tear *)
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(tear->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBigSpiral._h)) + 0x4))));
|
|
if (((GHIDRA_UINT((tear->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagBigSpiral._l)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(tear->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagBigSpiral._l)) + 0x4)))) != 0) ||
|
|
((GHIDRA_UINT((tear->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagBigSpiral._h)) != 0 ||
|
|
local_1c != GHIDRA_CAST<Entity_Tear *>(0x0))) {
|
|
if (player != GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
(GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::GetTrinketMultiplier(0x60);
|
|
}
|
|
update_wiggle(tear);
|
|
}
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(tear))))->Entity::Interpolate();
|
|
this = tear;
|
|
}
|
|
else {
|
|
if ((this->_subtype & 2) != 0) {
|
|
uVar3 = GHIDRA_UINT(this->_flags);
|
|
if ((uVar3 & 2) != 0) {
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&this->_flags) + 4)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&this->_flags) + 4));
|
|
*GHIDRA_CAST<uint32_t *>(&this->_flags) = uVar3 & 0xfffffffd;
|
|
return;
|
|
}
|
|
}
|
|
pVVar2 = &this->_pos;
|
|
(this->_preInterpolatePos).x = (this->_pos).x;
|
|
(this->_preInterpolatePos).y = (this->_pos).y;
|
|
fVar4 = this->_friction;
|
|
fVar7 = (this->_velocity).y;
|
|
fVar6 = this->_speedMultiplier;
|
|
puVar5 = GHIDRA_CAST<uint8_t *>((fVar4 * (this->_velocity).x * fVar6 * 0.5 + pVVar2->x));
|
|
pVVar2->x = (float)puVar5;
|
|
(this->_pos).y = fVar7 * fVar4 * fVar6 * 0.5 + (this->_pos).y;
|
|
this->_isInterpolating = 1;
|
|
local_34.x = (float)this->_parent;
|
|
if ((local_34.x == 0.0) || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_34.x) + 0x28)) != 2)) {
|
|
local_1c = GHIDRA_CAST<Entity_Tear *>((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagContinuum._h)));
|
|
local_24.x = (float)(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagContinuum._h)) + 0x4)))
|
|
);
|
|
if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagContinuum._l)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagContinuum._l)) + 0x4)))) == 0) &&
|
|
(local_1c == GHIDRA_CAST<Entity_Tear *>(0x0) && local_24.x == 0.0)) {
|
|
Room::GetClampedPositionImpl(g_game->_room,GHIDRA_CAST<Vector *>(auStack_18),pVVar2,0.0,0.0,0.0,0.0);
|
|
pVVar2->x = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auStack_18)) + 0x0)));
|
|
(this->_pos).y = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)auStack_18)) + 0x4)));
|
|
local_34.x = (float)this->_parent;
|
|
puVar5 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<uint8_t *>(auStack_18))) + 0x4)));
|
|
}
|
|
if ((local_34.x != 0.0) && (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_34.x) + 0x28)) == 2)) goto LAB_00679c17;
|
|
}
|
|
else {
|
|
LAB_00679c17:
|
|
if ((this->_subtype & 1) != 0) {
|
|
local_1c = (Entity_Tear *)
|
|
((((float)(GHIDRA_UINT(this->_index) % 10) + 0.0) * 0.1 * 0.5 + 2.0) * 0.017453292);
|
|
local_2c = GHIDRA_CAST<uint8_t *>(cos((float)local_1c));
|
|
fVar6 = sin((float)local_1c);
|
|
fVar4 = (this->_parentOffset).x;
|
|
fVar7 = (this->_parentOffset).y;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auStack_18)) + 0x4))) = (float)local_2c * fVar7 + fVar6 * fVar4;
|
|
local_28 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(local_34.x) + 0x33c));
|
|
local_34.x = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(local_34.x) + 0x340));
|
|
local_1c = GHIDRA_CAST<Entity_Tear *>(((float)local_2c * fVar4 - fVar6 * fVar7));
|
|
iVar1 = this->_index * 0x32;
|
|
local_2c = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<uint8_t *>(auStack_18))) + 0x4)));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auStack_18)) + 0x0))) = local_1c;
|
|
local_24.x = sin(((float)(g_game->_frameCount - this->_spawnFrame) + 0.5 +
|
|
(float)((double)iVar1 + __uint_to_double_fixup[-(iVar1 >> 0x1f)])) * 0.08);
|
|
fVar4 = sqrtf((float)local_1c * (float)local_1c + (float)local_2c * (float)local_2c);
|
|
pVVar2 = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>(auStack_18))))->Vector::Resized(&local_24,fVar4 * (local_24.x * 0.5 + 1.0));
|
|
puVar5 = GHIDRA_CAST<uint8_t *>((local_28 + pVVar2->x));
|
|
fVar4 = pVVar2->y;
|
|
(this->_pos).x = (float)puVar5;
|
|
(this->_pos).y = local_34.x + fVar4;
|
|
}
|
|
}
|
|
if (((GHIDRA_UINT((this->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagHydrobounce._l)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHydrobounce._l)) + 0x4)))) != 0) ||
|
|
((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagHydrobounce._h)) != 0 ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagHydrobounce._h)) + 0x4)))) != 0)) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::GetRootParent();
|
|
game = g_game;
|
|
fVar4 = sin(((float)(g_game->_frameCount - this->_spawnFrame) + 0.5) *
|
|
(3.1415927 / (float)puVar5));
|
|
(this->_posOffset).y = ABS(fVar4) * this->_height;
|
|
goto LAB_00679a3a;
|
|
}
|
|
}
|
|
game = g_game;
|
|
LAB_00679a3a:
|
|
if (this->_waitFrames < 1) {
|
|
local_1c = (Entity_Tear *)
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLudovico._h)) + 0x4))));
|
|
if ((((GHIDRA_UINT(g_tearFlagLudovico._l) & GHIDRA_UINT((this->_tearFlags)._l)) == 0 &&
|
|
((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLudovico._l)) + 0x4))) & *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4))) == 0) &&
|
|
((GHIDRA_UINT((this->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagLudovico._h)) == 0 &&
|
|
local_1c == GHIDRA_CAST<Entity_Tear *>(0x0))) && (this->_dead == 0)) {
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(game->_room) + 8)) == 0x10) {
|
|
(this->_posOffset).y = -18.0;
|
|
return;
|
|
}
|
|
fVar4 = get_height_offset_y(this,this->_fallingSpeed * this->_speedMultiplier * 0.5 +
|
|
this->_height);
|
|
(this->_posOffset).y = fVar4;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 00679e80
|
|
void Entity_Tear::SetDeadEyeIntensity(float intensity)
|
|
{
|
|
LayerState *effectLayer;
|
|
char *ptr;
|
|
int blendMode;
|
|
uint32_t uVar1;
|
|
ColorMod *effectColor;
|
|
uint32_t local_68 [11];
|
|
std_string anm2Path;
|
|
uint32_t local_24;
|
|
uint8_t *puStack_20;
|
|
void *local_1c;
|
|
uint8_t *puStack_18;
|
|
uint32_t local_14;
|
|
|
|
puStack_20 = GHIDRA_CAST<uint8_t *>((local_68 + 0x19));
|
|
local_14 = 0xffffffff;
|
|
puStack_18 = &LAB_00af33dd;
|
|
local_1c = ExceptionList;
|
|
local_24 = __security_cookie ^ GHIDRA_UINT((local_68 + 0x16));
|
|
ExceptionList = &local_1c;
|
|
this->_deadEyeIntensity = intensity;
|
|
if ((intensity != 0.0) && ((this->_deadEyeANM2)._loaded == 0)) {
|
|
anm2Path._size = 0;
|
|
anm2Path._capacity = 0xf;
|
|
anm2Path._buf[0] = '\0';
|
|
anm2Path._buf[1] = '\0';
|
|
anm2Path._buf[2] = '\0';
|
|
anm2Path._buf[3] = '\0';
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(anm2Path._buf)) + 0x0))) = msvc::_Allocate(0x20);
|
|
anm2Path._size = 0x1a;
|
|
anm2Path._capacity = 0x1f;
|
|
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/DeadEyeTearEffect.anm2",0x1b);
|
|
local_14 = 0;
|
|
ANM2::Load(&this->_deadEyeANM2,&anm2Path,1);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < anm2Path._capacity) {
|
|
uVar1 = anm2Path._capacity + 1;
|
|
ptr = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0)));
|
|
if (0xfff < uVar1) {
|
|
ptr = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(anm2Path._buf)) + 0x0))) + -4));
|
|
uVar1 = anm2Path._capacity + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(anm2Path._buf)) + 0x0))) + (-4 - GHIDRA_INT(ptr))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(ptr,uVar1);
|
|
}
|
|
uVar1 = g_graphicsManager_flags;
|
|
effectLayer = ANM2::GetLayer(&this->_deadEyeANM2,GHIDRA_CAST<uint8_t *>(0x0));
|
|
blendMode = 1;
|
|
if ((uVar1 & 4) == 0) {
|
|
blendMode = 6;
|
|
}
|
|
effectLayer->_blendMode[1] = blendMode;
|
|
effectLayer->_blendMode[0] = 0;
|
|
effectLayer->_blendMode[2] = 1;
|
|
effectLayer->_blendMode[3] = 1;
|
|
effectLayer->_blendMode[4] = 1;
|
|
ANM2::Play(&this->_deadEyeANM2,s_Idle,0);
|
|
effectColor = &(this->_deadEyeANM2)._color;
|
|
if (effectColor != GHIDRA_CAST<ColorMod *>(local_68)) {
|
|
(this->_deadEyeANM2)._color._colorize[0] = 0.0;
|
|
(this->_deadEyeANM2)._color._colorize[1] = 0.0;
|
|
(this->_deadEyeANM2)._color._colorize[2] = 0.0;
|
|
(this->_deadEyeANM2)._color._colorize[3] = 0.0;
|
|
effectColor->_tint[0] = 1.0;
|
|
(this->_deadEyeANM2)._color._tint[1] = 1.0;
|
|
(this->_deadEyeANM2)._color._tint[2] = 1.0;
|
|
(this->_deadEyeANM2)._color._tint[3] = intensity;
|
|
(this->_deadEyeANM2)._color._offset[0] = 0.0;
|
|
(this->_deadEyeANM2)._color._offset[1] = 0.0;
|
|
(this->_deadEyeANM2)._color._offset[2] = 0.0;
|
|
}
|
|
}
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
|
|
// 0067a190
|
|
Entity_Tear * Entity_Tear::MakeMultidimensionalCopy(Entity *spawner)
|
|
{
|
|
BitSet128 flags;
|
|
Entity *spawned;
|
|
Entity_Tear *copy;
|
|
uint32_t variant;
|
|
float fVar1;
|
|
uint32_t uStack_28;
|
|
uint32_t uStack_20;
|
|
uint32_t uStack_1c;
|
|
uint32_t uStack_18;
|
|
uint32_t uStack_14;
|
|
Game *game;
|
|
uint32_t *refSlot;
|
|
|
|
variant = this->_variant;
|
|
if (((variant != 0x23) && (variant != 0x25)) && (variant != 0x26)) {
|
|
variant = 0x15;
|
|
}
|
|
spawned = Game::SpawnEx(g_game,2,variant,&this->_pos,&this->_velocity,spawner,this->_subtype,
|
|
(this->_dropRNG)._seed,0);
|
|
copy = (Entity_Tear *)
|
|
__RTDynamicCast(spawned,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor,
|
|
&IsaacRepentancePlus::Entity_Tear::RTTI_Type_Descriptor,0);
|
|
uStack_28 = GHIDRA_CAST<uint8_t *>(this->_height);
|
|
copy->_height = (float)uStack_28;
|
|
fVar1 = get_height_offset_y(copy,(float)uStack_28);
|
|
game = g_game;
|
|
(copy->_posOffset).y = fVar1;
|
|
if ((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(game->_room) + 8)) == 0x10) &&
|
|
((copy->_posOffset).y = -18.0, -5.1 < (float)uStack_28)) {
|
|
copy->_height = -5.1;
|
|
}
|
|
copy->_fallingSpeed = this->_fallingSpeed;
|
|
copy->_fallingAccel = this->_fallingAccel;
|
|
copy->_homingFriction = this->_homingFriction;
|
|
copy->_tearRange = this->_tearRange;
|
|
fVar1 = this->_fScale;
|
|
if (fVar1 <= 0.01) {
|
|
fVar1 = 0.01;
|
|
}
|
|
copy->_baseScale = fVar1;
|
|
copy->_fScale = fVar1;
|
|
ResetSpriteScale(copy);
|
|
uStack_1c = ~(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLudovico._l)) + 0x4))) & *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._l) + 4));
|
|
uStack_20 = ~GHIDRA_UINT(g_tearFlagLudovico._l) & GHIDRA_UINT((this->_tearFlags)._l);
|
|
uStack_14 = ~(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagLudovico._h)) + 0x4))) & *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_tearFlags)._h) + 4));
|
|
uStack_18 = ~GHIDRA_UINT(g_tearFlagLudovico._h) & GHIDRA_UINT((this->_tearFlags)._h);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._l)) + 0x4))) = uStack_1c;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._l)) + 0x0))) = uStack_20;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._h)) + 0x0))) = uStack_18;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(flags._h)) + 0x4))) = uStack_14;
|
|
SetTearFlags(copy,flags);
|
|
copy->_waitFrames = this->_waitFrames;
|
|
copy->_tearIdx = this->_tearIdx;
|
|
copy->SetCollisionDamage(this->_collisionDamage);
|
|
copy->_rotation = this->_rotation;
|
|
copy->_knockbackMultiplier = this->_knockbackMultiplier;
|
|
SetDeadEyeIntensity(copy,this->_deadEyeIntensity);
|
|
copy->_multidimensionalTouched = this->_multidimensionalTouched;
|
|
(copy->_continueVelocity).x = (this->_continueVelocity).x;
|
|
(copy->_continueVelocity).y = (this->_continueVelocity).y;
|
|
uStack_28 = GHIDRA_CAST<uint8_t *>(this->_parent);
|
|
refSlot = ©->_parent;
|
|
if (*refSlot != 0) {
|
|
msvc::multiset<unsigned_int>::erase(GHIDRA_INT(register0x00000010) + -0x2c);
|
|
}
|
|
*refSlot = uStack_28;
|
|
if (uStack_28 != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
msvc::multiset<unsigned_int>::insert(refSlot);
|
|
}
|
|
refSlot = ©->_spawnerEntity;
|
|
if (copy->_spawnerEntity != 0) {
|
|
uStack_28 = GHIDRA_CAST<uint8_t *>(refSlot);
|
|
msvc::multiset<unsigned_int>::erase(&uStack_28);
|
|
}
|
|
*refSlot = spawner;
|
|
if (spawner != GHIDRA_CAST<Entity *>(0x0)) {
|
|
msvc::multiset<unsigned_int>::insert(refSlot);
|
|
}
|
|
return copy;
|
|
}
|
|
|
|
// 0067a400
|
|
void Entity_Tear::ChangeVariant(int variant)
|
|
{
|
|
uint8_t isGfuelSeed;
|
|
LayerState *layer;
|
|
int blendSrc;
|
|
char *freeBlock;
|
|
uint32_t uVar1;
|
|
std_string bulletAnmPath;
|
|
std_string missileAnmPath;
|
|
uint32_t local_24;
|
|
uint8_t *puStack_20;
|
|
void *local_1c;
|
|
uint8_t *puStack_18;
|
|
uint32_t local_14;
|
|
float savedCollisionDamage;
|
|
int savedGridCollisionClass;
|
|
float savedScale;
|
|
|
|
puStack_20 = GHIDRA_CAST<uint8_t *>((GHIDRA_INT(register0x00000010) + -4));
|
|
local_14 = 0xffffffff;
|
|
puStack_18 = &LAB_00af79f5;
|
|
local_1c = ExceptionList;
|
|
local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U;
|
|
ExceptionList = &local_1c;
|
|
savedGridCollisionClass = this->_entityGridCollisionClass;
|
|
savedCollisionDamage = this->_collisionDamage;
|
|
this->_variant = variant;
|
|
savedScale = this->_fScale;
|
|
this->LoadEntityConfig(local_24);
|
|
if (this->_config != (void *)0x0) {
|
|
ANM2::Load(&this->_sprite,GHIDRA_CAST<std_string *>((GHIDRA_INT(this->_config) + 0x74)),1);
|
|
if (this->_variant == 0xd) {
|
|
isGfuelSeed = Seeds::HasSeedEffect(&g_game->_seedEffects,0x4f);
|
|
if (isGfuelSeed != 0) {
|
|
bulletAnmPath._size = 0;
|
|
bulletAnmPath._capacity = 0xf;
|
|
bulletAnmPath._buf[0] = '\0';
|
|
bulletAnmPath._buf[1] = '\0';
|
|
bulletAnmPath._buf[2] = '\0';
|
|
bulletAnmPath._buf[3] = '\0';
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bulletAnmPath._buf)) + 0x0))) = msvc::_Allocate(0x30);
|
|
bulletAnmPath._size = 0x20;
|
|
bulletAnmPath._capacity = 0x2f;
|
|
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(bulletAnmPath._buf))) + 0x0))),"gfx/promo/gfuel/bullet tear.anm2",0x21);
|
|
local_14 = 0;
|
|
ANM2::Load(&this->_sprite,&bulletAnmPath,1);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < bulletAnmPath._capacity) {
|
|
uVar1 = bulletAnmPath._capacity + 1;
|
|
freeBlock = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(bulletAnmPath._buf))) + 0x0)));
|
|
if (0xfff < uVar1) {
|
|
freeBlock = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bulletAnmPath._buf)) + 0x0))) + -4));
|
|
uVar1 = bulletAnmPath._capacity + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(bulletAnmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar1);
|
|
}
|
|
uVar1 = g_graphicsManager_flags;
|
|
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
|
|
blendSrc = 1;
|
|
if ((uVar1 & 4) == 0) {
|
|
blendSrc = 6;
|
|
}
|
|
layer->_blendMode[0] = 0;
|
|
layer->_blendMode[1] = blendSrc;
|
|
layer->_blendMode[2] = 1;
|
|
layer->_blendMode[3] = 1;
|
|
layer->_blendMode[4] = 1;
|
|
}
|
|
}
|
|
else if (this->_variant == 0x17) {
|
|
isGfuelSeed = Seeds::HasSeedEffect(&g_game->_seedEffects,0x4f);
|
|
if (isGfuelSeed != 0) {
|
|
missileAnmPath._size = 0;
|
|
missileAnmPath._capacity = 0xf;
|
|
missileAnmPath._buf[0] = '\0';
|
|
missileAnmPath._buf[1] = '\0';
|
|
missileAnmPath._buf[2] = '\0';
|
|
missileAnmPath._buf[3] = '\0';
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(missileAnmPath._buf)) + 0x0))) = msvc::_Allocate(0x20);
|
|
missileAnmPath._size = 0x1c;
|
|
missileAnmPath._capacity = 0x1f;
|
|
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(missileAnmPath._buf))) + 0x0))),"gfx/promo/gfuel/missile.anm2",0x1d);
|
|
local_14 = 1;
|
|
ANM2::Load(&this->_sprite,&missileAnmPath,1);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < missileAnmPath._capacity) {
|
|
uVar1 = missileAnmPath._capacity + 1;
|
|
freeBlock = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(missileAnmPath._buf))) + 0x0)));
|
|
if (0xfff < uVar1) {
|
|
freeBlock = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(missileAnmPath._buf)) + 0x0))) + -4));
|
|
uVar1 = missileAnmPath._capacity + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(missileAnmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar1);
|
|
}
|
|
uVar1 = g_graphicsManager_flags;
|
|
missileAnmPath._size = 0;
|
|
missileAnmPath._capacity = 0xf;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(missileAnmPath._buf)) + 0x0))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(missileAnmPath._buf)) + 0x0))) & 0xffffff00;
|
|
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x1));
|
|
blendSrc = 1;
|
|
if ((uVar1 & 4) == 0) {
|
|
blendSrc = 6;
|
|
}
|
|
layer->_blendMode[1] = blendSrc;
|
|
layer->_blendMode[0] = 0;
|
|
layer->_blendMode[2] = 1;
|
|
layer->_blendMode[3] = 1;
|
|
layer->_blendMode[4] = 1;
|
|
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_bitflags = layer->_bitflags | 1;
|
|
}
|
|
}
|
|
}
|
|
this->_fScale = savedScale;
|
|
ResetSpriteScale(this);
|
|
this->_collisionDamage = savedCollisionDamage;
|
|
this->_entityGridCollisionClass = savedGridCollisionClass;
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
|
|
// 0067a770
|
|
int Entity_Tear::find_nearest_linkable_tear()
|
|
{
|
|
int iVar1;
|
|
int tearsData;
|
|
uint64_t *allocCounter;
|
|
int iVar2;
|
|
int nearestTear;
|
|
uint32_t uVar3;
|
|
float fVar4;
|
|
float dx;
|
|
EntityList_EL local_2c;
|
|
float nearestDist;
|
|
int nearestTearSaved;
|
|
int selfTear;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t uStack_8;
|
|
uint64_t oldAllocated;
|
|
|
|
uStack_8 = 0xffffffff;
|
|
puStack_c = &LAB_00af7a20;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
EntityList::QuerySublist(GHIDRA_CAST<EntityList *>((GHIDRA_INT(g_game->_room) + 0x1218)),&local_2c,2,-1,-1,0,0);
|
|
nearestTear = 0;
|
|
uVar3 = 0;
|
|
nearestDist = 40.0;
|
|
nearestTearSaved = 0;
|
|
if (local_2c._size != 0) {
|
|
tearsData = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c)) + 0x4)));
|
|
iVar2 = selfTear;
|
|
do {
|
|
iVar1 = *GHIDRA_CAST<int *>((tearsData + uVar3 * 4));
|
|
if (iVar1 != iVar2) {
|
|
if (((((*GHIDRA_CAST<uint32_t *>((iVar1 + 0x428)) & GHIDRA_UINT(g_tearFlagChain._l)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((iVar1 + 0x42c)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagChain._l)) + 0x4)))) == 0) &&
|
|
((*GHIDRA_CAST<uint32_t *>((iVar1 + 0x430)) & GHIDRA_UINT(g_tearFlagChain._h)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((iVar1 + 0x434)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagChain._h)) + 0x4)))) == 0)) ||
|
|
((*GHIDRA_CAST<int *>((iVar1 + 0x494)) != 0 && (*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((iVar1 + 0x494)) + 0x28)) == 2)))) ||
|
|
(fVar4 = *GHIDRA_CAST<float *>((selfTear + 0x340)) - *GHIDRA_CAST<float *>((iVar1 + 0x340)),
|
|
dx = *GHIDRA_CAST<float *>((selfTear + 0x33c)) - *GHIDRA_CAST<float *>((iVar1 + 0x33c)),
|
|
fVar4 = sqrtf(fVar4 * fVar4 + dx * dx), nearestDist <= fVar4)) {
|
|
tearsData = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c)) + 0x4)));
|
|
iVar2 = selfTear;
|
|
nearestTear = nearestTearSaved;
|
|
}
|
|
else {
|
|
tearsData = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c)) + 0x4)));
|
|
iVar2 = selfTear;
|
|
nearestTear = iVar1;
|
|
nearestDist = fVar4;
|
|
nearestTearSaved = iVar1;
|
|
}
|
|
}
|
|
uVar3 = uVar3 + 1;
|
|
} while (uVar3 < GHIDRA_UINT(local_2c._size));
|
|
}
|
|
if ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_2c)) + 0x0))) == '\0') {
|
|
if (g_mainHeap == (void *)0x0) {
|
|
allocCounter = &g_allocatedBytesNoHeap;
|
|
}
|
|
else {
|
|
allocCounter = GHIDRA_CAST<uint64_t *>((GHIDRA_INT(g_mainHeap) + 0x30));
|
|
}
|
|
if ((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c)) + 0x4))) != 0) {
|
|
uVar3 = *GHIDRA_CAST<uint32_t *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c)) + 0x4))) + -4));
|
|
oldAllocated = *allocCounter;
|
|
*GHIDRA_CAST<uint32_t *>(allocCounter) = GHIDRA_UINT(*allocCounter) - uVar3;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(allocCounter) + 4)) =
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(allocCounter) + 4)) - GHIDRA_UINT((GHIDRA_UINT(oldAllocated) < uVar3));
|
|
free(GHIDRA_CAST<uint32_t *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c)) + 0x4))) + -4)));
|
|
}
|
|
}
|
|
ExceptionList = local_10;
|
|
return nearestTear;
|
|
}
|
|
|
|
// 0067a8f0
|
|
Entity_Tear * Entity_Tear::find_link_partner()
|
|
{
|
|
uint32_t uVar1;
|
|
bool bVar2;
|
|
bool bVar3;
|
|
uint64_t qVar4;
|
|
int tearData;
|
|
uint64_t *allocatedBytes;
|
|
Entity_Tear *chainTear;
|
|
Entity_Tear *partner;
|
|
bool isNotSelf;
|
|
float fVar5;
|
|
float dx;
|
|
EntityList_EL local_30;
|
|
float nearestDistance;
|
|
uint32_t i;
|
|
Entity_Tear *nearestTear;
|
|
Entity_Tear *self;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t uStack_8;
|
|
|
|
uStack_8 = 0xffffffff;
|
|
puStack_c = &LAB_00af4e20;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
self = this;
|
|
EntityList::QuerySublist(GHIDRA_CAST<EntityList *>((GHIDRA_INT(g_game->_room) + 0x1218)),&local_30,2,-1,-1,0,0);
|
|
partner = GHIDRA_CAST<Entity_Tear *>(0x0);
|
|
nearestDistance = 20.0;
|
|
nearestTear = GHIDRA_CAST<Entity_Tear *>(0x0);
|
|
i = 0;
|
|
if (local_30._size != 0) {
|
|
tearData = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_30)) + 0x4)));
|
|
do {
|
|
chainTear = *GHIDRA_CAST<Entity_Tear **>((tearData + i * 4));
|
|
if (chainTear != this) {
|
|
this = self;
|
|
if ((((GHIDRA_UINT((chainTear->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagChain._l)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(chainTear->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagChain._l)) + 0x4)))) == 0) &&
|
|
((GHIDRA_UINT((chainTear->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagChain._h)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(chainTear->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagChain._h)) + 0x4)))) == 0)) ||
|
|
(chainTear->_linkNext != 0)) {
|
|
tearData = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_30)) + 0x4)));
|
|
}
|
|
else {
|
|
bVar3 = true;
|
|
do {
|
|
if (chainTear == GHIDRA_CAST<Entity_Tear *>(0x0)) goto LAB_0067aa2a;
|
|
if (((GHIDRA_UINT((chainTear->_tearFlags)._l) & GHIDRA_UINT(g_tearFlagChain._l)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(chainTear->_tearFlags)._l) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagChain._l)) + 0x4)))) == 0)
|
|
&& (bVar2 = bVar3,
|
|
(GHIDRA_UINT((chainTear->_tearFlags)._h) & GHIDRA_UINT(g_tearFlagChain._h)) == 0 &&
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(chainTear->_tearFlags)._h) + 4)) & (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_tearFlagChain._h)) + 0x4)))) == 0)
|
|
) break;
|
|
isNotSelf = chainTear != self;
|
|
chainTear = GHIDRA_CAST<Entity_Tear *>(chainTear->_linkPrev);
|
|
bVar2 = false;
|
|
if (isNotSelf) {
|
|
bVar2 = bVar3;
|
|
}
|
|
if ((chainTear == GHIDRA_CAST<Entity_Tear *>(0x0)) || (chainTear->_type != 2)) {
|
|
chainTear = GHIDRA_CAST<Entity_Tear *>(0x0);
|
|
}
|
|
bVar3 = bVar2;
|
|
} while (bVar2);
|
|
if (bVar2) {
|
|
LAB_0067aa2a:
|
|
partner = *GHIDRA_CAST<Entity_Tear **>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_30)) + 0x4))) + i * 4));
|
|
fVar5 = (self->_pos).y - (partner->_pos).y;
|
|
dx = (self->_pos).x - (partner->_pos).x;
|
|
fVar5 = sqrtf(fVar5 * fVar5 + dx * dx);
|
|
if (fVar5 < nearestDistance) {
|
|
tearData = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_30)) + 0x4)));
|
|
nearestDistance = fVar5;
|
|
nearestTear = partner;
|
|
goto LAB_0067aa8b;
|
|
}
|
|
}
|
|
tearData = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_30)) + 0x4)));
|
|
partner = nearestTear;
|
|
}
|
|
}
|
|
LAB_0067aa8b:
|
|
i = i + 1;
|
|
} while (i < GHIDRA_UINT(local_30._size));
|
|
}
|
|
if ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_30)) + 0x0))) == '\0') {
|
|
if (g_mainHeap == (void *)0x0) {
|
|
allocatedBytes = &g_allocatedBytesNoHeap;
|
|
}
|
|
else {
|
|
allocatedBytes = GHIDRA_CAST<uint64_t *>((GHIDRA_INT(g_mainHeap) + 0x30));
|
|
}
|
|
if ((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_30)) + 0x4))) != 0) {
|
|
uVar1 = *GHIDRA_CAST<uint32_t *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_30)) + 0x4))) + -4));
|
|
qVar4 = *allocatedBytes;
|
|
*GHIDRA_CAST<uint32_t *>(allocatedBytes) = GHIDRA_UINT(*allocatedBytes) - uVar1;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(allocatedBytes) + 4)) =
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(allocatedBytes) + 4)) - GHIDRA_UINT((GHIDRA_UINT(qVar4) < uVar1));
|
|
free(GHIDRA_CAST<uint32_t *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_30)) + 0x4))) + -4)));
|
|
}
|
|
}
|
|
ExceptionList = local_10;
|
|
return partner;
|
|
}
|
|
|
|
// 0067aaf0
|
|
void Entity_Tear::apply_link_spring_forces()
|
|
{
|
|
float dist;
|
|
float dirY;
|
|
float dirX;
|
|
float springX;
|
|
float springY;
|
|
int frameCount;
|
|
int linkedTear;
|
|
float speedMultiplier;
|
|
|
|
frameCount = g_game->_frameCount;
|
|
if (0 < frameCount - this->_spawnFrame) {
|
|
linkedTear = this->_linkPrev;
|
|
springY = 0.0;
|
|
springX = 0.0;
|
|
if ((linkedTear != 0) && (0 < frameCount - *GHIDRA_CAST<int *>((linkedTear + 0x328)))) {
|
|
dirY = (this->_prevPosition).y - *GHIDRA_CAST<float *>((linkedTear + 0x390));
|
|
dirX = (this->_prevPosition).x - *GHIDRA_CAST<float *>((linkedTear + 0x38c));
|
|
dist = sqrtf(dirY * dirY + dirX * dirX);
|
|
if (0.0 < dist) {
|
|
dirX = dirX * (1.0 / dist);
|
|
dirY = dirY * (1.0 / dist);
|
|
}
|
|
speedMultiplier = this->_speedMultiplier;
|
|
springX = (0.0 - ((dist - 10.0) * dirX * 0.3) / speedMultiplier) -
|
|
(((this->_prevVelocity).x - *GHIDRA_CAST<float *>((linkedTear + 0x394))) * 0.3) / speedMultiplier
|
|
;
|
|
springY = (0.0 - ((dist - 10.0) * dirY * 0.3) / speedMultiplier) -
|
|
(((this->_prevVelocity).y - *GHIDRA_CAST<float *>((linkedTear + 0x398))) * 0.3) / speedMultiplier
|
|
;
|
|
}
|
|
linkedTear = this->_linkNext;
|
|
if ((linkedTear != 0) && (0 < frameCount - *GHIDRA_CAST<int *>((linkedTear + 0x328)))) {
|
|
dirY = (this->_prevPosition).y - *GHIDRA_CAST<float *>((linkedTear + 0x390));
|
|
dirX = (this->_prevPosition).x - *GHIDRA_CAST<float *>((linkedTear + 0x38c));
|
|
dist = sqrtf(dirY * dirY + dirX * dirX);
|
|
if (0.0 < dist) {
|
|
dirY = dirY * (1.0 / dist);
|
|
dirX = dirX * (1.0 / dist);
|
|
}
|
|
speedMultiplier = this->_speedMultiplier;
|
|
springX = (springX - ((dist - 10.0) * dirX * 0.3) / speedMultiplier) -
|
|
(((this->_prevVelocity).x - *GHIDRA_CAST<float *>((linkedTear + 0x394))) * 0.3) / speedMultiplier
|
|
;
|
|
springY = (springY - ((dist - 10.0) * dirY * 0.3) / speedMultiplier) -
|
|
(((this->_prevVelocity).y - *GHIDRA_CAST<float *>((linkedTear + 0x398))) * 0.3) / speedMultiplier
|
|
;
|
|
}
|
|
if ((springX != g_vectorZero.x) || (springY != g_vectorZero.y)) {
|
|
dist = this->_speedMultiplier;
|
|
(this->_velocity).x = springX * dist + (this->_velocity).x;
|
|
(this->_velocity).y = dist * springY + (this->_velocity).y;
|
|
}
|
|
this->_friction = this->_friction * 0.95;
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 0067d560
|
|
uint8_t Entity_Tear::try_make_bridges(float *param_1)
|
|
{
|
|
GridEntity *rock;
|
|
Room *this;
|
|
char cVar1;
|
|
uint32_t uVar2;
|
|
BitSet128 *maskedFlags;
|
|
int iVar3;
|
|
GridEntity *pit;
|
|
Entity *in_ECX;
|
|
void *collisionPoints;
|
|
int iVar4;
|
|
int iVar5;
|
|
uint32_t uVar6;
|
|
Entity *pEVar7;
|
|
float dirX;
|
|
float dirY;
|
|
EntityRef tearRef;
|
|
BitSet128 local_58;
|
|
BitSet128 local_48;
|
|
BitSet128 local_38;
|
|
int *local_28;
|
|
int *local_24;
|
|
int rockDamage;
|
|
void *local_1c;
|
|
Entity *local_18;
|
|
uint8_t isHitSolid;
|
|
char isRockDestroyed;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
float velX;
|
|
float velY;
|
|
code *virtualFn;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00af7a8d;
|
|
local_10 = ExceptionList;
|
|
uVar2 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U;
|
|
ExceptionList = &local_10;
|
|
local_18 = in_ECX;
|
|
maskedFlags = BitSet128::operator_and
|
|
(&local_48,GHIDRA_CAST<BitSet128 *>(&in_ECX[1]._pendingDamageFlags),
|
|
&g_tearFlagNoGridDamage);
|
|
if ((GHIDRA_INT(maskedFlags->_l) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_l) + 4)) != 0) ||
|
|
(local_28 = GHIDRA_CAST<int *>((GHIDRA_UINT(maskedFlags->_h) | *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&maskedFlags->_h) + 4)))),
|
|
local_28 != GHIDRA_CAST<int *>(0x0))) {
|
|
ExceptionList = local_10;
|
|
return 0;
|
|
}
|
|
isHitSolid = 0;
|
|
isRockDestroyed = '\0';
|
|
rockDamage = (10.0 < in_ECX->_collisionDamage) + 1;
|
|
local_24 = local_28;
|
|
local_28 = operator_new(0x14);
|
|
*local_28 = GHIDRA_INT(local_28);
|
|
local_28[1] = GHIDRA_INT(local_28);
|
|
local_28[2] = GHIDRA_INT(local_28);
|
|
*GHIDRA_CAST<uint16_t *>((local_28 + 3)) = 0x101;
|
|
local_8 = 0;
|
|
uVar6 = 0;
|
|
collisionPoints = (in_ECX->_collisionPoints)._begin;
|
|
if (GHIDRA_INT((in_ECX->_collisionPoints)._end) - GHIDRA_INT(collisionPoints) >> 3 != 0) {
|
|
do {
|
|
local_1c = g_game->_room;
|
|
iVar4 = GHIDRA_INT((((*param_1 + *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(collisionPoints) + uVar6 * 8))) - 40.0) / 40.0 + 0.5))
|
|
;
|
|
iVar3 = GHIDRA_INT((((*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(collisionPoints) + uVar6 * 8 + 4)) + param_1[1]) - 120.0) / 40.0
|
|
+ 0.5));
|
|
if ((((-1 < iVar4) && (iVar4 < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_1c) + 0xc)))) && (-1 < iVar3)) &&
|
|
((in_ECX = local_18, iVar3 < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_1c) + 0x10)) &&
|
|
(local_1c = (void *)(iVar3 * *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_1c) + 0xc)) + iVar4), -1 < GHIDRA_INT(local_1c))))
|
|
) {
|
|
msvc::set<int>::insert(&local_38._h,&local_1c);
|
|
}
|
|
uVar6 = uVar6 + 1;
|
|
collisionPoints = (in_ECX->_collisionPoints)._begin;
|
|
} while (uVar6 < GHIDRA_UINT((GHIDRA_INT((in_ECX->_collisionPoints)._end) - GHIDRA_INT(collisionPoints) >> 3)));
|
|
}
|
|
param_1 = GHIDRA_CAST<float *>(*local_28);
|
|
if (param_1 != GHIDRA_CAST<float *>(local_28)) {
|
|
pEVar7 = local_18;
|
|
do {
|
|
if (((GHIDRA_UINT(param_1[4]) < 0x1c0) &&
|
|
(rock = *GHIDRA_CAST<GridEntity **>((GHIDRA_CAST<char *>(g_game->_room) + GHIDRA_INT(param_1[4]) * 4 + 0x24)),
|
|
rock != GHIDRA_CAST<GridEntity *>(0x0))) &&
|
|
((rock->_collisionClass != 1 &&
|
|
((rock->_collisionClass != 0 && (isHitSolid = 1, isRockDestroyed == '\0')))))) {
|
|
cVar1 = rock->CanTakeDamageFromTearEffects(uVar2);
|
|
if ((cVar1 != '\0') &&
|
|
(((maskedFlags = BitSet128::operator_and
|
|
(&local_38,GHIDRA_CAST<BitSet128 *>(&pEVar7[1]._pendingDamageFlags),
|
|
&g_tearFlagAcid),
|
|
GHIDRA_INT(maskedFlags->_l) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_l) + 4)) != 0 ||
|
|
(GHIDRA_INT(maskedFlags->_h) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_h) + 4)) != 0)) ||
|
|
(((maskedFlags = BitSet128::operator_and
|
|
(&local_58,GHIDRA_CAST<BitSet128 *>(&pEVar7[1]._pendingDamageFlags),
|
|
&g_tearFlagRock),
|
|
GHIDRA_INT(maskedFlags->_l) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_l) + 4)) != 0 ||
|
|
(GHIDRA_INT(maskedFlags->_h) != 0 || *GHIDRA_CAST<int *>((GHIDRA_INT(&maskedFlags->_h) + 4)) != 0)) &&
|
|
(uVar6 = Random(),
|
|
(float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) *
|
|
2.3283064e-10 < pEVar7->_collisionDamage * 0.1)))))) {
|
|
virtualFn = *(code **)(*GHIDRA_CAST<int *>(rock) + 0x14);
|
|
(GHIDRA_CAST<EntityRef *>((&tearRef)))->EntityRef::constructor(local_18);
|
|
cVar1 = (*virtualFn)(0,&tearRef);
|
|
if (cVar1 != '\0') {
|
|
isRockDestroyed = '\x01';
|
|
velX = (local_18->_velocity).x;
|
|
velY = (local_18->_velocity).y;
|
|
if (ABS(velX) <= ABS(velY)) {
|
|
dirX = 0.0;
|
|
if (0.0 <= velY) {
|
|
dirY = 1.0;
|
|
}
|
|
else {
|
|
dirY = (float)&DAT_bf800000;
|
|
}
|
|
}
|
|
else {
|
|
dirY = 0.0;
|
|
if (0.0 <= velX) {
|
|
dirX = 1.0;
|
|
}
|
|
else {
|
|
dirX = (float)&DAT_bf800000;
|
|
}
|
|
}
|
|
if ((dirX != g_vectorZero.x) || (dirY != g_vectorZero.y)) {
|
|
this = g_game->_room;
|
|
iVar3 = this->_gridWidth;
|
|
iVar5 = GHIDRA_INT(((((float)(rock->_gridIndex % iVar3) * 40.0 + 40.0 + dirX * 40.0) - 40.0)
|
|
/ 40.0 + 0.5));
|
|
iVar4 = GHIDRA_INT(((((float)(rock->_gridIndex / iVar3) * 40.0 + 120.0 + dirY * 40.0) -
|
|
120.0) / 40.0 + 0.5));
|
|
if (((-1 < iVar5) &&
|
|
(((iVar5 < iVar3 && (-1 < iVar4)) && (iVar4 < this->_gridHeight)))) &&
|
|
(iVar5 = iVar3 * iVar4 + iVar5, -1 < iVar5)) {
|
|
if (iVar5 < 0x1c0) {
|
|
pit = this->_gridEntities[iVar5];
|
|
}
|
|
else {
|
|
pit = GHIDRA_CAST<GridEntity *>(0x0);
|
|
}
|
|
this->Room::TryMakeBridge(pit,rock);
|
|
}
|
|
}
|
|
}
|
|
pEVar7 = local_18;
|
|
}
|
|
if (isRockDestroyed == '\0') {
|
|
virtualFn = *(code **)(*GHIDRA_CAST<int *>(rock) + 0x10);
|
|
(GHIDRA_CAST<EntityRef *>((&tearRef)))->EntityRef::constructor(local_18);
|
|
(*virtualFn)(rockDamage,&tearRef);
|
|
pEVar7 = local_18;
|
|
}
|
|
}
|
|
msvc::
|
|
_Tree_unchecked_const_iterator<msvc::_Tree_val<msvc::_Tree_simple_types<unsigned_int>_>,msvc::_Iterator_base0>
|
|
::operator++((_Tree_unchecked_const_iterator<msvc::_Tree_val<msvc::_Tree_simple_types<unsigned_int>_>,msvc::_Iterator_base0>
|
|
*)¶m_1);
|
|
} while (param_1 != GHIDRA_CAST<float *>(local_28));
|
|
}
|
|
FID_conflict__Erase_tree<fuzzer::fuzzer_allocator<msvc::_Tree_node<fuzzer::TracePC::PCTableEntry_const*,void*>_>_>
|
|
(&local_28,(fuzzer_allocator<msvc::_Tree_node<unsigned_int,void*>_> *)&local_28,
|
|
(_Tree_node<unsigned_int,void*> *)local_28[1]);
|
|
operator_delete(local_28,0x14);
|
|
ExceptionList = local_10;
|
|
return isHitSolid;
|
|
}
|
|
|
|
// 006b5320
|
|
void Entity_Tear::reroll_hit_entity(int unused)
|
|
{
|
|
code *pcVar1;
|
|
Game *pGVar2;
|
|
int64_t lVar3;
|
|
int64_t lVar4;
|
|
char isBanned;
|
|
uint8_t isErased;
|
|
Vector *foundPos;
|
|
Entity *tmpEntity;
|
|
uint32_t uVar5;
|
|
uint32_t uVar6;
|
|
int *piVar7;
|
|
int unusedArg;
|
|
void *pvVar8;
|
|
uint32_t uVar9;
|
|
int iVar10;
|
|
PlayerManager *playerManager;
|
|
bool bVar11;
|
|
float dy;
|
|
float dx;
|
|
uint64_t timeNs;
|
|
uint8_t auStack_c4 [4];
|
|
uint32_t spawnSubType;
|
|
uint32_t local_bc;
|
|
int *local_b8;
|
|
Vector newPos;
|
|
int *local_ac;
|
|
Entity *local_a8;
|
|
Game *local_a4;
|
|
uint32_t local_a0;
|
|
uint32_t spawnType;
|
|
uint32_t spawnVariant;
|
|
uint32_t spawnSeed;
|
|
int local_90 [3];
|
|
Entity_Tear *hitEntity;
|
|
int procKeyType;
|
|
int procKeyVariant;
|
|
Vector freeTilePos [2];
|
|
uint64_t rngShifts;
|
|
uint32_t local_60;
|
|
uint8_t local_5c [8];
|
|
int local_54;
|
|
Vector randomPos;
|
|
ColorMod poofColor;
|
|
RNG cardRng;
|
|
uint32_t local_c;
|
|
uint32_t *spawnerPtr;
|
|
ColorMod *spriteColor;
|
|
|
|
local_c = __security_cookie ^ GHIDRA_UINT(auStack_c4);
|
|
iVar10 = 0x20;
|
|
hitEntity = this;
|
|
do {
|
|
newPos.x = g_vectorZero.x;
|
|
newPos.y = g_vectorZero.y;
|
|
foundPos = (GHIDRA_CAST<Room *>((g_game->_room)))->Room::GetRandomPosition(&randomPos,0.0);
|
|
newPos.x = foundPos->x;
|
|
newPos.y = foundPos->y;
|
|
foundPos = (GHIDRA_CAST<Room *>((g_game->_room)))->Room::FindFreeTilePosition(freeTilePos,&newPos,0.0);
|
|
newPos.x = foundPos->x;
|
|
newPos.y = foundPos->y;
|
|
dx = newPos.x - (this->_pos).x;
|
|
dy = newPos.y - (this->_pos).y;
|
|
if ((400.0 < dy * dy + dx * dx) &&
|
|
(tmpEntity = Game::GetNearestTargetPlayer(&newPos,GHIDRA_CAST<Entity *>(this),0,0,(void *)0x0,5000.0),
|
|
dx = (tmpEntity->_pos).x - newPos.x, dy = (tmpEntity->_pos).y - newPos.y,
|
|
6400.0 < dy * dy + dx * dx)) break;
|
|
iVar10 = iVar10 + -1;
|
|
newPos.x = g_vectorZero.x;
|
|
newPos.y = g_vectorZero.y;
|
|
} while (-1 < iVar10);
|
|
if ((newPos.x == g_vectorZero.x) && (newPos.y == g_vectorZero.y)) {
|
|
return;
|
|
}
|
|
uVar5 = Random();
|
|
poofColor._colorize[0] = 0.0;
|
|
poofColor._colorize[1] = 0.0;
|
|
poofColor._colorize[2] = 0.0;
|
|
poofColor._colorize[3] = 0.0;
|
|
poofColor._tint[0] = 1.0;
|
|
poofColor._tint[1] = 1.0;
|
|
poofColor._tint[2] = 1.0;
|
|
poofColor._tint[3] = 1.0;
|
|
poofColor._offset[0] = 0.2509804;
|
|
poofColor._offset[1] = 0.34901962;
|
|
poofColor._offset[2] = 0.5019608;
|
|
tmpEntity = Game::SpawnEx(g_game,1000,0xf,&this->_pos,&g_vectorZero,GHIDRA_CAST<Entity *>(0x0),0,uVar5,0);
|
|
spriteColor = &(tmpEntity->_sprite)._color;
|
|
if (spriteColor != &poofColor) {
|
|
spriteColor->_tint[0] = 1.0;
|
|
(tmpEntity->_sprite)._color._tint[1] = 1.0;
|
|
(tmpEntity->_sprite)._color._tint[2] = 1.0;
|
|
(tmpEntity->_sprite)._color._tint[3] = 1.0;
|
|
(tmpEntity->_sprite)._color._colorize[0] = 0.0;
|
|
(tmpEntity->_sprite)._color._colorize[1] = 0.0;
|
|
(tmpEntity->_sprite)._color._colorize[2] = 0.0;
|
|
(tmpEntity->_sprite)._color._colorize[3] = 0.0;
|
|
*GHIDRA_CAST<uint64_t *>((tmpEntity->_sprite)._color._offset) =
|
|
CONCAT44(poofColor._offset[1],poofColor._offset[0]);
|
|
(tmpEntity->_sprite)._color._offset[2] = poofColor._offset[2];
|
|
}
|
|
spawnSeed = Random();
|
|
local_a4 = g_game;
|
|
spawnSubType = 0;
|
|
spawnVariant = 0xf;
|
|
spawnType = 1000;
|
|
lua_callback_run_pre_entity_spawn
|
|
(GHIDRA_CAST<int *>(&spawnType),GHIDRA_CAST<int *>(&spawnVariant),&newPos,&g_vectorZero,GHIDRA_CAST<Entity *>(0x0),
|
|
GHIDRA_CAST<int *>(&spawnSubType),&spawnSeed);
|
|
uVar5 = spawnVariant;
|
|
if (*GHIDRA_CAST<int *>(&g_game->_deathmatchManager) < 2) {
|
|
LAB_006b57d9:
|
|
local_bc = spawnSubType;
|
|
}
|
|
else {
|
|
piVar7 = *GHIDRA_CAST<int **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((g_game->_deathmatchManager))) + 0xc))));
|
|
local_b8 = piVar7;
|
|
uVar6 = Random();
|
|
uVar9 = spawnSubType;
|
|
rngShifts = 0x900000005;
|
|
local_a8 = GHIDRA_CAST<Entity *>(0x7);
|
|
local_60 = 7;
|
|
if (spawnType != 5) goto LAB_006b57d9;
|
|
if (uVar5 < 0x12d) {
|
|
if (uVar5 == 300) {
|
|
while ((local_bc = spawnSubType, spawnSubType == 0 ||
|
|
(isBanned = (**(code **)(*piVar7 + 0x24))(spawnSubType), isBanned != '\0'))) {
|
|
if (uVar6 == 0) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("RNG Seed is zero!\n"));
|
|
pcVar1 = (code *)swi(3);
|
|
(*pcVar1)();
|
|
return;
|
|
}
|
|
uVar6 = uVar6 >> ((uint8_t)rngShifts & 0x1f) ^ uVar6;
|
|
uVar6 = uVar6 << ((uint8_t)((uint64_t)rngShifts >> 0x20) & 0x1f) ^ uVar6;
|
|
uVar6 = uVar6 >> ((uint8_t)local_a8 & 0x1f) ^ uVar6;
|
|
iVar10 = ItemPool::GetCardEx(uVar6,0x19,10,10,1);
|
|
cardRng._shift1 = 5;
|
|
cardRng._shift2 = 9;
|
|
cardRng._shift3 = 7;
|
|
cardRng._seed = uVar6;
|
|
spawnSubType = lua_callback_run_get_card(&cardRng,iVar10,1,1,0);
|
|
}
|
|
}
|
|
else {
|
|
if (uVar5 == 0x46) {
|
|
local_a0 = spawnSubType >> 0xb;
|
|
do {
|
|
local_bc = spawnSubType;
|
|
if (spawnSubType != 0) {
|
|
pcVar1 = *(code **)(*piVar7 + 0x28);
|
|
iVar10 = ItemPool::GetPillEffect(&g_game->_itemPool,spawnSubType,GHIDRA_CAST<Entity_Player *>(0x0))
|
|
;
|
|
isBanned = (*pcVar1)(iVar10);
|
|
if (isBanned == '\0') goto LAB_006b57e1;
|
|
piVar7 = local_b8;
|
|
}
|
|
if (uVar6 == 0) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("RNG Seed is zero!\n"));
|
|
pcVar1 = (code *)swi(3);
|
|
(*pcVar1)();
|
|
return;
|
|
}
|
|
uVar6 = uVar6 >> ((uint8_t)rngShifts & 0x1f) ^ uVar6;
|
|
uVar6 = uVar6 << ((uint8_t)((uint64_t)rngShifts >> 0x20) & 0x1f) ^ uVar6;
|
|
uVar6 = uVar6 >> ((uint8_t)local_a8 & 0x1f) ^ uVar6;
|
|
spawnSubType = ItemPool::GetPill(uVar6);
|
|
spawnSubType = spawnSubType | (local_a0 & 1) << 0xb;
|
|
} while( true );
|
|
}
|
|
if (uVar5 != 100) goto LAB_006b57d9;
|
|
local_bc = spawnSubType;
|
|
if (spawnSubType == 0x19) {
|
|
LAB_006b5635:
|
|
bVar11 = false;
|
|
}
|
|
else {
|
|
local_a0 = spawnSubType;
|
|
msvc::set<int>::find_node(local_5c,&local_a0);
|
|
if (((*GHIDRA_CAST<char *>((local_54 + 0xd)) == '\0') && (*GHIDRA_CAST<int *>((local_54 + 0x10)) <= GHIDRA_INT(uVar9))) &&
|
|
(local_54 != piVar7[8])) goto LAB_006b5635;
|
|
bVar11 = true;
|
|
}
|
|
if ((uVar9 == 0) || (bVar11)) {
|
|
spawnSubType = (**(code **)(*piVar7 + 0x84))(0);
|
|
local_bc = spawnSubType;
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
if (uVar5 != 0x15e) goto LAB_006b57d9;
|
|
while ((local_bc = spawnSubType, spawnSubType == 0 ||
|
|
(isBanned = (**(code **)(*piVar7 + 0x2c))(spawnSubType), isBanned != '\0'))) {
|
|
spawnSubType = ItemPool::GetTrinket(&g_game->_itemPool,0);
|
|
}
|
|
}
|
|
}
|
|
LAB_006b57e1:
|
|
local_a8 = (GHIDRA_CAST<EntityFactory *>((local_a4->_entityFactory)))->EntityFactory::Create(spawnType,0);
|
|
if (local_a8 == GHIDRA_CAST<Entity *>(0x0)) goto LAB_006b5ab6;
|
|
timeNs = GetTimeNs();
|
|
tmpEntity = local_a8;
|
|
uVar5 = GHIDRA_UINT((timeNs >> 0x20));
|
|
lVar3 = (timeNs & 0xffffffff) * 0x431bde82;
|
|
local_ac = GHIDRA_CAST<int *>(((uint64_t)lVar3 >> 0x20));
|
|
lVar4 = (uint64_t)uVar5 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20);
|
|
local_90[0] = GHIDRA_INT((lVar4 + lVar3));
|
|
lVar3 = (uint64_t)uVar5 * 0x431bde82 +
|
|
(uint64_t)
|
|
CONCAT14(CARRY4(GHIDRA_UINT(((uint64_t)lVar4 >> 0x20)),
|
|
GHIDRA_INT(local_ac) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar3),GHIDRA_UINT(lVar4)))),
|
|
GHIDRA_INT(((uint64_t)(lVar4 + lVar3) >> 0x20)));
|
|
local_90[2] = GHIDRA_INT(((uint64_t)lVar3 >> 0x20));
|
|
spawnerPtr = &local_a8->_spawnerEntity;
|
|
local_b8 = GHIDRA_CAST<int *>((GHIDRA_UINT(lVar3) >> 0x12 | local_90[2] * 0x4000));
|
|
local_90[2] = GHIDRA_UINT(local_90[2]) >> 0x12;
|
|
local_a8->_spawnerType = 0;
|
|
local_a8->_spawnerVariant = 0;
|
|
if (*spawnerPtr != 0) {
|
|
local_ac = spawnerPtr;
|
|
msvc::multiset<unsigned_int>::erase(&local_ac);
|
|
}
|
|
iVar10 = *GHIDRA_CAST<int *>(tmpEntity);
|
|
*spawnerPtr = 0;
|
|
(tmpEntity->_pos).x = newPos.x;
|
|
(tmpEntity->_pos).y = newPos.y;
|
|
(tmpEntity->_velocity).x = g_vectorZero.x;
|
|
(tmpEntity->_velocity).y = g_vectorZero.y;
|
|
(**(code **)(iVar10 + 4))(spawnType,spawnVariant,local_bc,spawnSeed);
|
|
pGVar2 = local_a4;
|
|
pvVar8 = local_a4->_room;
|
|
iVar10 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar8) + 0x1214));
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar8) + 0x1214)) = iVar10 + 1;
|
|
tmpEntity->_index = iVar10;
|
|
(GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>((GHIDRA_INT(pvVar8) + 0x1218)))))->EntityList::AddEntity(tmpEntity);
|
|
isErased = Game::ShouldEraseEnemy(tmpEntity);
|
|
if (isErased != 0) {
|
|
Entity::RemoveWithPoof(tmpEntity,unusedArg);
|
|
}
|
|
if ((tmpEntity->_exists != 0) &&
|
|
((pGVar2->_proceduralItemManager)._proceduralItems._begin !=
|
|
(pGVar2->_proceduralItemManager)._proceduralItems._end)) {
|
|
procKeyVariant = tmpEntity->_variant;
|
|
procKeyType = tmpEntity->_type;
|
|
msvc::map<unsigned_long_long>::find(&local_a4,&procKeyType);
|
|
pGVar2 = (pGVar2->_proceduralItemManager)._spawnTriggerTargets._head;
|
|
if (local_a4 == pGVar2) {
|
|
local_90[0] = tmpEntity->_type;
|
|
local_90[1] = 0xffffffff;
|
|
piVar7 = GHIDRA_CAST<int *>(std)::map<unsigned_long_long>::find(&local_bc,local_90);
|
|
local_a4 = GHIDRA_CAST<Game *>(*piVar7);
|
|
if (local_a4 == pGVar2) goto LAB_006b5a32;
|
|
}
|
|
uVar5 = 0;
|
|
playerManager = &g_game->_playerManager;
|
|
if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >>
|
|
2 != 0) {
|
|
do {
|
|
pvVar8 = (playerManager->_playerList)._end;
|
|
if (GHIDRA_INT(pvVar8) - GHIDRA_INT((playerManager->_playerList)._begin) >> 2 == 0) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("PlayerManager::GetPlayer() : There are no players! \n"));
|
|
pvVar8 = (playerManager->_playerList)._end;
|
|
}
|
|
piVar7 = (playerManager->_playerList)._begin;
|
|
if (uVar5 < GHIDRA_UINT((GHIDRA_INT(pvVar8) - GHIDRA_INT(piVar7) >> 2))) {
|
|
piVar7 = piVar7 + uVar5;
|
|
}
|
|
trigger_set_dispatch((void *)(*piVar7 + 0x1fc8),6,tmpEntity,&newPos,&g_vectorZero);
|
|
uVar5 = uVar5 + 1;
|
|
playerManager = &g_game->_playerManager;
|
|
} while (uVar5 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) -
|
|
GHIDRA_INT((playerManager->_playerList)._begin) >> 2)));
|
|
}
|
|
}
|
|
LAB_006b5a32:
|
|
timeNs = GetTimeNs();
|
|
uVar9 = GHIDRA_UINT((timeNs >> 0x20));
|
|
lVar3 = (timeNs & 0xffffffff) * 0x431bde82;
|
|
lVar4 = (uint64_t)uVar9 * 0xd7b634db + ((timeNs & 0xffffffff) * 0xd7b634db >> 0x20);
|
|
uVar6 = GHIDRA_UINT(((uint64_t)lVar4 >> 0x20));
|
|
uVar5 = GHIDRA_INT(((uint64_t)lVar3 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar3),GHIDRA_UINT(lVar4)));
|
|
lVar3 = (uint64_t)uVar9 * 0x431bde82 + (uint64_t)CONCAT14(CARRY4(uVar6,uVar5),uVar6 + uVar5);
|
|
uVar6 = GHIDRA_UINT(((uint64_t)lVar3 >> 0x20));
|
|
uVar5 = GHIDRA_UINT(lVar3) >> 0x12 | uVar6 * 0x4000;
|
|
uVar9 = uVar5 - GHIDRA_INT(local_b8);
|
|
bVar11 = CARRY4(GHIDRA_UINT(g_entitySpawnTimeMs),uVar9);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_entitySpawnTimeMs)) + 0x0))) = GHIDRA_UINT(g_entitySpawnTimeMs) + uVar9;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_entitySpawnTimeMs)) + 0x4))) =
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(g_entitySpawnTimeMs)) + 0x4))) + (((uVar6 >> 0x12) - local_90[2]) - GHIDRA_UINT((uVar5 < local_b8))) +
|
|
GHIDRA_UINT(bVar11);
|
|
LAB_006b5ab6:
|
|
spriteColor = &(local_a8->_sprite)._color;
|
|
if (spriteColor != &poofColor) {
|
|
(local_a8->_sprite)._color._colorize[0] = 0.0;
|
|
(local_a8->_sprite)._color._colorize[1] = 0.0;
|
|
(local_a8->_sprite)._color._colorize[2] = 0.0;
|
|
(local_a8->_sprite)._color._colorize[3] = 0.0;
|
|
(local_a8->_sprite)._color._offset[0] = 0.2509804;
|
|
(local_a8->_sprite)._color._offset[1] = 0.34901962;
|
|
spriteColor->_tint[0] = 1.0;
|
|
(local_a8->_sprite)._color._tint[1] = 1.0;
|
|
(local_a8->_sprite)._color._tint[2] = 1.0;
|
|
(local_a8->_sprite)._color._tint[3] = 1.0;
|
|
(local_a8->_sprite)._color._offset[2] = 0.5019608;
|
|
}
|
|
(hitEntity->_pos).x = newPos.x;
|
|
(hitEntity->_pos).y = newPos.y;
|
|
return;
|
|
}
|
|
|
|
// 0085dd60
|
|
long double Entity_Tear::BaseDamage()
|
|
{
|
|
return (long double)this->_baseDamage;
|
|
}
|
|
|
|
// 0085dd70
|
|
void Entity_Tear::SetParentOffset(Vector *offset)
|
|
{
|
|
(this->_parentOffset).x = offset->x;
|
|
(this->_parentOffset).y = offset->y;
|
|
return;
|
|
}
|
|
|
|
// 0085dd90
|
|
Vector * Entity_Tear::PosDisplacement()
|
|
{
|
|
return &this->_posDisplacement;
|
|
}
|