- item_config, entity_config and mod_manager take over their families as idiomatic classes (std containers, unique_ptr, bitset tear flags). Every big loader reads the imported JSON: entities2.xml gives 1349 entities. - manager.h/.cpp take over Manager (g_manager) and IsaacStartup. Members are the curated subsystems by value. - kage_graphics, kage_input and kage_sound take over KAGE's graphics (shaders, render targets, batches, PNG through stb_image), input (SDL3 keyboard, mouse, gamepads) and sound (SDL3 audio, wav and stb_vorbis ogg, pitch and volume). - source_tree.py: classes inside a namespace block in src/ headers count as taken over, and a still-generated class's vtable slot keeps its stub unless src/ defines that exact method. build/isaac opens the window, sets up GL 4.6, framebuffers and PulseAudio, logs the version, and stops at LuaEngine::Init. 522 functions taken over, boot path 156/615. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5455 lines
240 KiB
C++
5455 lines
240 KiB
C++
#include "classes.h"
|
|
|
|
// 00435290
|
|
void Entity_Effect::render_player_target(Vector *offset, int segmentMode)
|
|
{
|
|
double dVar1;
|
|
double dVar2;
|
|
uint8_t isLocalPlayer;
|
|
int umbilicalData;
|
|
int lastIndex;
|
|
uint32_t i;
|
|
float fVar3;
|
|
double dVar4;
|
|
double dVar5;
|
|
float heightSign;
|
|
uint32_t endIndex;
|
|
Vector renderPos;
|
|
Color beamColor [2];
|
|
float *point;
|
|
uint32_t pointCount;
|
|
int ringStart;
|
|
|
|
umbilicalData =
|
|
__RTDynamicCast(this[3]._sprite._overlayAnimState._layerFrames,0,
|
|
&IsaacRepentancePlus::Entity_Familiar::ExtraData::RTTI_Type_Descriptor,
|
|
&IsaacRepentancePlus::UmbilicalBabyData::RTTI_Type_Descriptor);
|
|
if (umbilicalData != 0) {
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + 0x12bc)) == 5) {
|
|
heightSign = (float)&DAT_bf800000;
|
|
(GHIDRA_CAST<Color *>((beamColor)))->Color::Color();
|
|
fVar3 = 0.5;
|
|
beamColor[0]._tint[3] = 0.5;
|
|
}
|
|
else {
|
|
fVar3 = 1.0;
|
|
heightSign = 1.0;
|
|
(GHIDRA_CAST<Color *>((beamColor)))->Color::Color();
|
|
}
|
|
if ((this->_height != 0.0) && (g_manager->_netplayManager != *GHIDRA_CAST<int *>((g_manager + 1)))) {
|
|
isLocalPlayer =
|
|
NetplayManager::IsIdxLocalPlayer
|
|
(GHIDRA_CAST<NetplayManager *>(&g_manager->_netplayManager),
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this->_height) + 0x1618)));
|
|
if (isLocalPlayer == 0) {
|
|
FUN_00925df0();
|
|
beamColor[0]._tint[3] = fVar3 * beamColor[0]._tint[3];
|
|
}
|
|
}
|
|
pointCount = *GHIDRA_CAST<uint32_t *>((umbilicalData + 0x14));
|
|
i = 0;
|
|
endIndex = pointCount - 1;
|
|
if (segmentMode == 1) {
|
|
endIndex = pointCount >> 1;
|
|
}
|
|
else if (segmentMode == 2) {
|
|
i = pointCount >> 1;
|
|
}
|
|
if (i < endIndex) {
|
|
DAT_00c78ef0 = umbilicalData + 0x18;
|
|
DAT_00c78ef4 = 2;
|
|
(*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(&(DAT_00c78ef8)) + 0x0))) = 0x100;
|
|
g_beamRendererPointsEnd = g_beamRendererPoints;
|
|
do {
|
|
ringStart = *GHIDRA_CAST<int *>((umbilicalData + 0x10));
|
|
dVar1 = __uint_to_double_fixup[-(GHIDRA_INT(i) >> 0x1f)];
|
|
lastIndex = *GHIDRA_CAST<int *>((umbilicalData + 0x14)) + -1;
|
|
fVar3 = g_displayPixelRatio * g_screenPointScale;
|
|
dVar2 = __uint_to_double_fixup[-(lastIndex >> 0x1f)];
|
|
point = *(float **)
|
|
(*GHIDRA_CAST<int *>((umbilicalData + 8)) +
|
|
(*GHIDRA_CAST<int *>((umbilicalData + 0xc)) - 1U & ringStart + i) * 4);
|
|
dVar4 = floor((double)((((*point + 0.0) - 60.0) * 0.65 + (g_screenWidth - 338.0) * 0.5) *
|
|
fVar3 + 0.5));
|
|
dVar5 = floor((double)((((heightSign *
|
|
*GHIDRA_CAST<float *>((*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((umbilicalData + 8)) +
|
|
(*GHIDRA_CAST<int *>((umbilicalData + 0xc)) - 1U &
|
|
ringStart + i) * 4)) + 8)) + point[1]) - 140.0) *
|
|
0.65 + (g_screenHeight - 182.0) * 0.5) * fVar3 + 0.5));
|
|
renderPos.x = (float)dVar4 / fVar3 + offset->x;
|
|
renderPos.y = (float)dVar5 / fVar3 + offset->y;
|
|
BeamRenderer::Add(&renderPos,GHIDRA_CAST<ColorMod *>(beamColor),1.0,
|
|
(float)((double)GHIDRA_INT(i) + dVar1) / (float)((double)lastIndex + dVar2));
|
|
i = i + 1;
|
|
} while (i <= endIndex);
|
|
BeamRenderer::End();
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 00435e60
|
|
void Entity_Effect::set_state(int state)
|
|
{
|
|
this->_state = state;
|
|
return;
|
|
}
|
|
|
|
// 00435e90
|
|
void Entity_Effect::SetTimeout(int timeout)
|
|
{
|
|
this->_timeout = timeout;
|
|
this->_lifespan = timeout;
|
|
return;
|
|
}
|
|
|
|
// 00435eb0
|
|
void Entity_Effect::set_rotation(float rotation)
|
|
{
|
|
this->_rotation = rotation;
|
|
return;
|
|
}
|
|
|
|
// 00435ef0
|
|
void Entity_Effect::SetRadii(float minRadius, float maxRadius)
|
|
{
|
|
this->_minRadius = minRadius;
|
|
this->_maxRadius = maxRadius;
|
|
return;
|
|
}
|
|
|
|
// 004564b0
|
|
void Entity_Effect::FollowParent(Entity *parent)
|
|
{
|
|
Entity_Effect *local_c [2];
|
|
uint32_t *parentRef;
|
|
float parentX;
|
|
float parentY;
|
|
float posX;
|
|
float posY;
|
|
|
|
parentRef = &this->_parent;
|
|
local_c[0] = this;
|
|
if (this->_parent != 0) {
|
|
local_c[0] = GHIDRA_CAST<Entity_Effect *>(parentRef);
|
|
msvc::multiset<unsigned_int>::erase(local_c);
|
|
}
|
|
*parentRef = parent;
|
|
if (parent != GHIDRA_CAST<Entity *>(0x0)) {
|
|
msvc::multiset<unsigned_int>::insert(parentRef);
|
|
}
|
|
posX = (this->_pos).x;
|
|
posY = (this->_pos).y;
|
|
parentX = (parent->_pos).x;
|
|
parentY = (parent->_pos).y;
|
|
this->_isFollowing = 1;
|
|
(this->_parentOffset).x = posX - parentX;
|
|
(this->_parentOffset).y = posY - parentY;
|
|
return;
|
|
}
|
|
|
|
// 004d7770
|
|
long double Entity_Effect::Scale()
|
|
{
|
|
return (long double)this->_scale;
|
|
}
|
|
|
|
// 005784c0
|
|
long double Entity_Effect::Rotation()
|
|
{
|
|
return (long double)this->_rotation;
|
|
}
|
|
|
|
// 005ccc20
|
|
void Entity_Effect::HandleCollision()
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
// 005cd950
|
|
bool Entity_Effect::rift_attract_filter(int param_1, int param_2)
|
|
{
|
|
return param_1 != param_2;
|
|
}
|
|
|
|
// 005cd960
|
|
void Entity_Effect::constructor()
|
|
{
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::constructor();
|
|
*GHIDRA_CAST<uint8_t ***>(this) = IsaacRepentancePlus::Entity_Effect::vftable;
|
|
(this->_parentOffset).y = 0.0;
|
|
(this->_parentOffset).x = 0.0;
|
|
(this->_hitList)._begin = (void *)0x0;
|
|
(this->_hitList)._end = (void *)0x0;
|
|
(this->_hitList)._capacity = (void *)0x0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x488)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x484)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x490)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x48c)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4b4)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4b8)))) = 0;
|
|
return;
|
|
}
|
|
|
|
// 005cdb20
|
|
void Entity_Effect::Init(int type, int variant, int subType, uint32_t initSeed)
|
|
{
|
|
uint8_t bVar1;
|
|
char isDeathmatch;
|
|
uint8_t *pbVar2;
|
|
LayerState *layer;
|
|
Entity *tmpEntity;
|
|
int iVar3;
|
|
uint32_t uVar4;
|
|
int iVar5;
|
|
Entity_Player *player;
|
|
char *pcVar6;
|
|
std_string *psVar7;
|
|
ColorMod *color;
|
|
ColorMod *extraout_EAX;
|
|
Vector *vecResult;
|
|
void *extraout_EAX_00;
|
|
Room *pRVar8;
|
|
AnimationState *animState;
|
|
GridEntity *currentRoom;
|
|
uint32_t *clampedSubtype;
|
|
Game *game;
|
|
RoomDescriptor *currentRoomDesc;
|
|
RoomDescriptor *linkedRoomDesc;
|
|
Entity_Familiar *tmpEntity;
|
|
ColorMod *tmpColor;
|
|
Sprite *wispSprite;
|
|
Font *spriteColor;
|
|
uint32_t extraout_EAX_01;
|
|
void *extraout_EAX_02;
|
|
void *extraout_EAX_03;
|
|
void *extraout_EAX_04;
|
|
void *pvVar10;
|
|
void *extraout_EAX_05;
|
|
void *extraout_EAX_06;
|
|
void *extraout_EAX_07;
|
|
void *pvVar11;
|
|
void *extraout_EAX_08;
|
|
Entity_Effect *pEVar12;
|
|
ColorMod *other;
|
|
void *extraout_EAX_09;
|
|
uint32_t uVar13;
|
|
Color *colorTarget;
|
|
ColorMod *color_00;
|
|
ColorMod *color_01;
|
|
Vector *playerPos;
|
|
ColorMod *color_02;
|
|
uint32_t *listEntry;
|
|
uint8_t *puVar14;
|
|
RNG *seedRng;
|
|
void *extraout_EAX_10;
|
|
ColorMod *color_03;
|
|
uint32_t extraout_EAX_11;
|
|
EntityList *entityList;
|
|
int *piVar15;
|
|
RNG *rng;
|
|
ANM2 *sprite;
|
|
float fVar16;
|
|
float scale;
|
|
uint32_t uVar17;
|
|
uint32_t uVar18;
|
|
uint32_t uVar19;
|
|
uint8_t local_36c [40];
|
|
uint8_t local_344 [20];
|
|
uint8_t local_330 [20];
|
|
uint8_t local_31c [20];
|
|
uint8_t local_308 [20];
|
|
uint8_t local_2f4 [4];
|
|
uint8_t auStack_2f0 [12];
|
|
Level *local_2e4;
|
|
Vector scratchVec;
|
|
KColor local_2d8;
|
|
char isReplaced;
|
|
Vector local_2c0;
|
|
LayerState *local_2b8;
|
|
Entity_Familiar *local_2b4;
|
|
Entity_Effect *effect;
|
|
Color scratchColor;
|
|
std_string minesLavaSheet;
|
|
std_string blueWombSheet;
|
|
std_string wombSheet;
|
|
std_string depthsSheet;
|
|
std_string cavesSheet;
|
|
std_string corpse2Sheet;
|
|
std_string corpseSheet;
|
|
std_string mausoleumSheet;
|
|
std_string minesLava2Sheet;
|
|
std_string minesSheet;
|
|
Color fadedColor;
|
|
Color faintColor;
|
|
Color orangeOffsetColor;
|
|
Color splatTint;
|
|
Color defaultColor;
|
|
std_string local_b4;
|
|
std_string sheetPath3;
|
|
std_string sheetPath2;
|
|
Color workColor;
|
|
std_string sheetPath;
|
|
uint8_t local_28 [8];
|
|
uint64_t local_20;
|
|
int local_18;
|
|
uint32_t local_14;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
KColor *blendMode;
|
|
bool isOpened;
|
|
Manager *manager;
|
|
code *setColorFn;
|
|
Level *subSprite;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00af61a2;
|
|
local_10 = ExceptionList;
|
|
local_14 = __security_cookie ^ GHIDRA_UINT((local_28 + 0x24));
|
|
ExceptionList = &local_10;
|
|
effect = this;
|
|
FUN_0060c800(0);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::Init(type,variant,subType,initSeed);
|
|
(GHIDRA_CAST<msvc::vector *>((&this->_hitList)))->msvc::vector::clear(1);
|
|
this->_maxHitPoints = 0.0;
|
|
if (this->_config != (void *)0x0) {
|
|
ANM2::Load(&this->_sprite,GHIDRA_CAST<std_string *>((GHIDRA_INT(this->_config) + 0x74)),0);
|
|
pbVar2 = (GHIDRA_CAST<msvc::string *>(((this->_sprite)._animDefaultName._buf)))->msvc::string::c_str();
|
|
ANM2::Play(&this->_sprite,pbVar2,0);
|
|
}
|
|
this->_state = 0;
|
|
this->_timeout = -1;
|
|
this->_lifespan = 1;
|
|
(this->_parentOffset).x = g_vectorZero.x;
|
|
(this->_parentOffset).y = g_vectorZero.y;
|
|
this->_rotation = 0.0;
|
|
this->_isFollowing = 0;
|
|
this->_scale = 1.0;
|
|
this->_minRadius = 0.0;
|
|
this->_maxRadius = 0.0;
|
|
this->_damageSource = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(this->_varData)._l) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_varData)._l) + 4)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(this->_varData)._h) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_varData)._h) + 4)) = 0;
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + 8)) == 0x10) {
|
|
switch(this->_variant) {
|
|
case 7:
|
|
case 0x12:
|
|
case 0x16:
|
|
case 0x17:
|
|
case 0x18:
|
|
case 0x19:
|
|
case 0x1a:
|
|
case 0x20:
|
|
case 0x25:
|
|
case 0x2c:
|
|
case 0x2d:
|
|
case 0x2e:
|
|
case 0x35:
|
|
case 0x36:
|
|
case 0x38:
|
|
case 0x4d:
|
|
case 0x4e:
|
|
case 0x59:
|
|
case 0x5a:
|
|
case 0x5c:
|
|
case 0x5d:
|
|
case 0x5e:
|
|
case 100:
|
|
case 0xa9:
|
|
case 0xc3:
|
|
case 0xcc:
|
|
this->_visible = 0;
|
|
goto LAB_005cdc8a;
|
|
}
|
|
}
|
|
iVar3 = this->_variant;
|
|
if ((((((((iVar3 == 0x16) || (iVar3 == 0x17)) || (iVar3 == 0x18)) ||
|
|
((iVar3 == 0x19 || (iVar3 == 0x1a)))) || (iVar3 == 0x20)) ||
|
|
(((iVar3 == 0x4e || (iVar3 == 0x25)) ||
|
|
((iVar3 == 0x2c || (((iVar3 == 0x2d || (iVar3 == 0x2e)) || (iVar3 == 0x36)))))))) ||
|
|
((iVar3 == 0x35 || (iVar3 == 0xcc)))) ||
|
|
((iVar3 == 0x38 ||
|
|
(((iVar3 == 0x5a || (iVar3 == 0x5c)) ||
|
|
((iVar3 == 0x5d || (((iVar3 == 0x5e || (iVar3 == 0xc3)) || (iVar3 == 0xa9)))))))))) {
|
|
this->_sortingLayer = 0;
|
|
this->_renderZOffset = 2000;
|
|
if ((((iVar3 == 0x20) || (iVar3 == 0x25)) || (iVar3 == 0x4e)) || (iVar3 == 0x5a)) {
|
|
this->_lifespan = 0x122;
|
|
iVar3 = 0x122;
|
|
}
|
|
else {
|
|
iVar3 = 0x7d;
|
|
}
|
|
this->_timeout = iVar3;
|
|
game = g_game;
|
|
iVar3 = this->_variant;
|
|
this->_isInitFlag176 = 1;
|
|
if ((iVar3 == 0x16) && (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(game->_room) + 0x1d18)) == 10)) {
|
|
(GHIDRA_CAST<Color *>((&scratchColor)))->Color::Reset();
|
|
(GHIDRA_CAST<Color *>((&scratchColor)))->Color::SetTint(0.5,0.5,0.5,1.0);
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&(this->_sprite)._color))))->Color::operator_assign(GHIDRA_CAST<ColorMod *>(&scratchColor));
|
|
iVar3 = this->_variant;
|
|
}
|
|
if (iVar3 == 0xa9) {
|
|
piVar15 = &(this->_sprite)._bitflags;
|
|
*piVar15 = *piVar15 | 0x20;
|
|
}
|
|
if (iVar3 == 0xc3) {
|
|
(GHIDRA_CAST<Color *>((&orangeOffsetColor)))->Color::Reset();
|
|
(GHIDRA_CAST<Color *>((&orangeOffsetColor)))->Color::SetTint(0.0,0.0,0.0,1.0);
|
|
orangeOffsetColor._offset[0] = 0.6;
|
|
orangeOffsetColor._offset[1] = 0.4;
|
|
orangeOffsetColor._offset[2] = 0.0;
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&(this->_sprite)._color))))->Color::operator_assign(GHIDRA_CAST<ColorMod *>(&orangeOffsetColor));
|
|
iVar3 = this->_variant;
|
|
}
|
|
}
|
|
else {
|
|
if ((iVar3 != 7) && (iVar3 != 0x12)) {
|
|
if (iVar3 == 0x59) {
|
|
pvVar10 = (this->_sprite)._animState._animData;
|
|
if ((pvVar10 == (void *)0x0) || (uVar4 = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(pvVar10) + 0x30)), uVar4 == 0)) {
|
|
uVar13 = 0;
|
|
}
|
|
else {
|
|
uVar13 = Random();
|
|
uVar13 = uVar13 % uVar4;
|
|
pvVar10 = (this->_sprite)._animState._animData;
|
|
}
|
|
if (pvVar10 != (void *)0x0) {
|
|
AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)GHIDRA_INT(uVar13));
|
|
}
|
|
(GHIDRA_CAST<Color *>((&faintColor)))->Color::Reset();
|
|
(GHIDRA_CAST<Color *>((&faintColor)))->Color::SetTint(1.0,1.0,1.0,0.3);
|
|
faintColor._offset[0] = 0.0;
|
|
tmpColor = GHIDRA_CAST<ColorMod *>(&faintColor);
|
|
faintColor._offset[1] = 0.0;
|
|
faintColor._offset[2] = 0.0;
|
|
}
|
|
else {
|
|
if (iVar3 != 100) goto LAB_005ce02f;
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Final"),0);
|
|
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_blendMode[0] = 0;
|
|
layer->_blendMode[1] = 4;
|
|
layer->_blendMode[2] = 7;
|
|
layer->_blendMode[3] = 4;
|
|
layer->_blendMode[4] = 7;
|
|
(GHIDRA_CAST<Color *>((&fadedColor)))->Color::Reset();
|
|
(GHIDRA_CAST<Color *>((&fadedColor)))->Color::SetTint(1.0,1.0,1.0,0.66);
|
|
fadedColor._offset[0] = 0.0;
|
|
tmpColor = GHIDRA_CAST<ColorMod *>(&fadedColor);
|
|
fadedColor._offset[1] = 0.0;
|
|
fadedColor._offset[2] = 0.0;
|
|
}
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&(this->_sprite)._color))))->Color::operator_assign(tmpColor);
|
|
}
|
|
iVar3 = this->_variant;
|
|
if ((iVar3 != 7) && (iVar3 != 0x12)) {
|
|
uVar17 = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&this->_flags) + 4));
|
|
*GHIDRA_CAST<uint32_t *>(&this->_flags) = GHIDRA_UINT(this->_flags) | 8;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&this->_flags) + 4)) = uVar17;
|
|
}
|
|
this->_sortingLayer = 0;
|
|
}
|
|
LAB_005ce02f:
|
|
if (((iVar3 == 1) || (iVar3 == 0x12)) &&
|
|
((tmpEntity = GHIDRA_CAST<Entity *>(this->_spawnerEntity), tmpEntity == GHIDRA_CAST<Entity *>(0x0) ||
|
|
((tmpEntity->_type != 1 &&
|
|
(tmpEntity = (GHIDRA_CAST<Entity *>((tmpEntity)))->Entity::GetPlayerAncestor(), tmpEntity == GHIDRA_CAST<Entity *>(0x0))))))) {
|
|
iVar3 = (GHIDRA_CAST<PlayerManager *>((&g_game->_playerManager)))->PlayerManager::GetTrinketMultiplier(0x3f);
|
|
if (iVar3 == 2) {
|
|
scale = (this->_sprite)._scale.x * 0.75;
|
|
fVar16 = (this->_sprite)._scale.y * 0.75;
|
|
}
|
|
else {
|
|
if (iVar3 < 3) goto LAB_005ce0c2;
|
|
scale = (this->_sprite)._scale.x * 0.5;
|
|
fVar16 = (this->_sprite)._scale.y * 0.5;
|
|
}
|
|
(this->_sprite)._scale.y = fVar16;
|
|
(this->_sprite)._scale.x = scale;
|
|
}
|
|
LAB_005ce0c2:
|
|
iVar3 = this->_variant;
|
|
if (iVar3 == 0xe) {
|
|
this->_sortingLayer = 0;
|
|
uVar4 = Random();
|
|
(this->_sprite)._flipX = (uint8_t)uVar4 & 1;
|
|
iVar3 = this->_variant;
|
|
}
|
|
iVar5 = 3;
|
|
if (iVar3 != 5) {
|
|
iVar5 = 0;
|
|
}
|
|
this->_entityGridCollisionClass = iVar5;
|
|
this->_entityCollisionClass = 0;
|
|
game = g_game;
|
|
if ((((iVar3 == 0xc) || (iVar3 == 0xd)) || (iVar3 == 0x4f)) || (iVar3 == 0x50)) {
|
|
uVar4 = Random();
|
|
this->_rotation = ((float)(uVar4 & 3) + 0.0) * 90.0;
|
|
goto LAB_005d03c8;
|
|
}
|
|
if (iVar3 == 0x61) {
|
|
uVar4 = Random();
|
|
this->_isInitFlag176 = 1;
|
|
this->_rotation = ((float)(uVar4 & 3) + 0.0) * 90.0;
|
|
uVar4 = Random();
|
|
(this->_sprite)._flipX = ((uint8_t)uVar4 ^ 0xff) & 1;
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (iVar3 == 1) {
|
|
uVar4 = Random();
|
|
(this->_sprite)._flipX = ((uint8_t)uVar4 ^ 0xff) & 1;
|
|
goto LAB_005d03cf;
|
|
}
|
|
if ((((iVar3 == 4) || (iVar3 == 0x1b)) ||
|
|
((iVar3 == 0x23 || ((iVar3 == 0x55 || (iVar3 == 0x56)))))) ||
|
|
((iVar3 == 0x5f || ((iVar3 == 0x62 || (iVar3 == 0xa3)))))) {
|
|
this->_fallingAcceleration = 1.3;
|
|
uVar4 = Random();
|
|
this->_height = -23.0;
|
|
(this->_posOffset).y = -23.0;
|
|
iVar3 = this->_variant;
|
|
this->_fallingSpeed =
|
|
-5.0 - (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) *
|
|
2.3283064e-10 * 10.0;
|
|
if ((iVar3 == 0x1b) || (iVar3 == 0xa3)) {
|
|
uVar4 = Random();
|
|
ANM2::SetFrame(&this->_sprite,GHIDRA_CAST<std_string *>((&PTR_DAT_00b63bc8)[uVar4 & 3]),0);
|
|
}
|
|
else if ((((iVar3 == 0x23) || (iVar3 == 0x55)) || (iVar3 == 0x56)) ||
|
|
((iVar3 == 0x5f || (iVar3 == 0x62)))) {
|
|
uVar4 = Random();
|
|
uVar13 = Random();
|
|
if ((uVar13 % 3 == 0) && (this->_variant != 0x55)) {
|
|
ANM2::SetFrame(&this->_sprite,GHIDRA_CAST<std_string *>((&PTR_s_Gib01_00b63ba8)[uVar4 & 3]),0);
|
|
}
|
|
else {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>((&PTR_s_Gib01_00b63ba8)[uVar4 & 3]),0);
|
|
}
|
|
}
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (iVar3 == 0x3a) {
|
|
this->_fallingAcceleration = 1.3;
|
|
this->_height = -23.0;
|
|
uVar4 = Random();
|
|
local_2b8 = (LayerState *)
|
|
((float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) *
|
|
2.3283064e-10 * 360.0);
|
|
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_rotation = (float)local_2b8;
|
|
uVar4 = Random();
|
|
ANM2::Play(&this->_sprite,(&PTR_s_Gib01_00b63b94)[uVar4 % 5],0);
|
|
uVar4 = Random();
|
|
this->_fallingSpeed =
|
|
5.0 - (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) *
|
|
2.3283064e-10 * 30.0;
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (iVar3 == 0x22) {
|
|
if (this->_subtype == 1) {
|
|
(GHIDRA_CAST<msvc::string *>((local_b4._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_Fart_Red.png"));
|
|
local_8 = 0;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&local_b4);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((local_b4._buf)))->msvc::string::_Tidy_deallocate();
|
|
ANM2::LoadGraphics(&this->_sprite,0);
|
|
}
|
|
uVar4 = Random();
|
|
(this->_sprite)._flipX = ((uint8_t)uVar4 ^ 0xff) & 1;
|
|
manager = g_manager;
|
|
if ((GHIDRA_UINT(this->_subtype) < 10) &&
|
|
((this->_spawnerEntity == 0 || (*GHIDRA_CAST<int *>((this->_spawnerEntity + 0x28)) != 0x108)))) {
|
|
local_2b4 = GHIDRA_CAST<Entity_Familiar *>(0x25);
|
|
seed_fart_sound_override(GHIDRA_CAST<int *>(&local_2b4));
|
|
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_2b4),1.0,0x14,0,1.0,0.0);
|
|
}
|
|
this->_renderZOffset = 1000;
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (iVar3 == 8) {
|
|
this->_renderDepthOffset = -40.0;
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (((iVar3 == 10) || (iVar3 == 0x34)) || (iVar3 == 0x33)) {
|
|
iVar3 = this->_spawnerEntity;
|
|
this->_entityGridCollisionClass = 6;
|
|
if (((iVar3 != 0) && ((*GHIDRA_CAST<int *>((iVar3 + 0x28)) == 2 || (*GHIDRA_CAST<int *>((iVar3 + 0x28)) == 4)))) &&
|
|
(*GHIDRA_CAST<Entity **>((iVar3 + 0x3c8)) != GHIDRA_CAST<Entity *>(0x0))) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::SetSpawnerEntity(*GHIDRA_CAST<Entity **>((iVar3 + 0x3c8)));
|
|
}
|
|
pvVar10 = &(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4b4)));
|
|
if (this->_variant != 10) {
|
|
this->_scale = 1.0;
|
|
this->_timeout = 300;
|
|
this->_lifespan = 300;
|
|
}
|
|
goto LAB_005d03dd;
|
|
}
|
|
if (iVar3 == 0x1f) {
|
|
ANM2::SetFrame(&this->_sprite,GHIDRA_CAST<std_string *>("Falling"),0);
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (iVar3 == 0x37) {
|
|
this->_state = 1;
|
|
this->_collisionDamage = 1.0;
|
|
player = (GHIDRA_CAST<PlayerManager *>((&game->_playerManager)))->PlayerManager::FirstTrinketOwner(0x97);
|
|
if (player == GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
LAB_005ce40c:
|
|
pcVar6 = "SummonWomb";
|
|
}
|
|
else {
|
|
iVar3 = (GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::GetTrinketMultiplier(0x97);
|
|
pcVar6 = "SummonWombDisabled";
|
|
if (iVar3 < 2) goto LAB_005ce40c;
|
|
}
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>(pcVar6),0);
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (variant == 0x15) {
|
|
this->_sortingLayer = 1;
|
|
LAB_005d0198:
|
|
if (this->_variant == 0x44) {
|
|
this->_sortingLayer = 0;
|
|
this->_renderZOffset = 5000;
|
|
uVar4 = Random();
|
|
local_2c0.y = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) *
|
|
2.3283064e-10 * 10000.0;
|
|
uVar4 = Random();
|
|
(this->_targetPosition).x =
|
|
(float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) *
|
|
2.3283064e-10 * 40.0;
|
|
(this->_targetPosition).y = local_2c0.y;
|
|
}
|
|
this->_mass = 1.0;
|
|
this->_entityCollisionClass = 4;
|
|
LAB_005d03c8:
|
|
this->_isInitFlag176 = 1;
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (variant == 0x21) {
|
|
uVar4 = RoomConfig::GetStageID(g_game->_stage,g_game->_stageType,-1);
|
|
if (uVar4 == 0xf) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("White"),0);
|
|
}
|
|
goto LAB_005d0198;
|
|
}
|
|
if (variant == 0x44) goto LAB_005d0198;
|
|
if (variant == 2) {
|
|
if (this->_subtype - 1U < 5) {
|
|
ANM2::Play(&this->_sprite,(&PTR_s_Poof_Large_00b63b48)[this->_subtype],0);
|
|
}
|
|
goto LAB_005d03c8;
|
|
}
|
|
if (variant == 0xf) {
|
|
if (this->_subtype - 1U < 3) {
|
|
ANM2::Play(&this->_sprite,(&PTR_s_Poof2_00b63b3c)[this->_subtype],0);
|
|
}
|
|
this->_renderZOffset = 8000;
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (variant == 0x10) {
|
|
iVar3 = this->_subtype;
|
|
if ((iVar3 == 1) || (iVar3 == 3)) {
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + 8)) != 0x10) {
|
|
this->_sortingLayer = 0;
|
|
}
|
|
ANM2::Play(&this->_sprite,&DAT_00b1d534,0);
|
|
}
|
|
else if (((iVar3 == 2) || (iVar3 == 4)) || (iVar3 == 5)) {
|
|
this->_renderZOffset = 8000;
|
|
ANM2::Play(&this->_sprite,&DAT_00b1d534,0);
|
|
}
|
|
else {
|
|
if (iVar3 == 0x42) {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_28)) + 0x4))) = this->_initSeed;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_20)) + 0x0))) = 1.4013e-45;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_20)) + 0x4))) = 1.54143e-44;
|
|
local_18 = 6;
|
|
local_8 = 1;
|
|
(GHIDRA_CAST<RNG *>((GHIDRA_CAST<RNG *>((local_28 + 4)))))->RNG::Next();
|
|
ANM2::Play(&this->_sprite,(&PTR_s_Poof0_00b63b34)[(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(local_28))) + 0x4))) % 3],0);
|
|
local_8 = 0xffffffff;
|
|
}
|
|
else {
|
|
if (iVar3 != 0x43) goto LAB_005d03cf;
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("PoofLarge"),0);
|
|
}
|
|
(this->_sprite)._flipX = ~(uint8_t)this->_initSeed & 1;
|
|
}
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (variant == 0x39) {
|
|
pcVar6 = "Effect";
|
|
if (this->_subtype != 0) {
|
|
pcVar6 = "Effect2";
|
|
}
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>(pcVar6),0);
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + 8)) != 0x10) {
|
|
this->_sortingLayer = 0;
|
|
}
|
|
goto LAB_005d03d7;
|
|
}
|
|
if (variant == 0x3b) {
|
|
pcVar6 = ANM2::GetAnimationData(&this->_sprite,GHIDRA_CAST<uint8_t *>("Clouds"));
|
|
if (pcVar6 != GHIDRA_CAST<char *>(0x0)) {
|
|
local_2b8 = *GHIDRA_CAST<LayerState **>((pcVar6 + 0x30));
|
|
if (local_2b8 == GHIDRA_CAST<LayerState *>(0x0)) {
|
|
local_2b4 = GHIDRA_CAST<Entity_Familiar *>(0x0);
|
|
}
|
|
else {
|
|
uVar4 = Random();
|
|
local_2b4 = GHIDRA_CAST<Entity_Familiar *>((uVar4 % GHIDRA_UINT(local_2b8)));
|
|
}
|
|
psVar7 = GHIDRA_CAST<std_string *>((GHIDRA_CAST<msvc::string *>((pcVar6)))->std)::string::c_str();
|
|
ANM2::SetFrame(&this->_sprite,psVar7,GHIDRA_INT(local_2b4));
|
|
uVar4 = Random();
|
|
(this->_sprite)._flipX = ((uint8_t)uVar4 ^ 0xff) & 1;
|
|
uVar4 = Random();
|
|
(this->_sprite)._rotation =
|
|
(float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) *
|
|
2.3283064e-10 * 360.0 - 180.0;
|
|
(this->_sprite)._scale.x = 0.5;
|
|
(this->_sprite)._scale.y = 0.5;
|
|
this->_renderZOffset = 8000;
|
|
if (this->_subtype == 1) {
|
|
(GHIDRA_CAST<Color *>((&workColor)))->Color::Reset();
|
|
(GHIDRA_CAST<Color *>((&workColor)))->Color::SetTint(1.0,1.0,1.0,1.0);
|
|
workColor._offset[0] = -0.5;
|
|
workColor._offset[1] = -0.5;
|
|
workColor._offset[2] = -0.5;
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&(this->_sprite)._color))))->Color::operator_assign(GHIDRA_CAST<ColorMod *>(&workColor));
|
|
}
|
|
}
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (iVar3 == 0x3c) {
|
|
this->_entityGridCollisionClass = 3;
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Rotate"),0);
|
|
(this->_posOffset).x = 0.0;
|
|
manager = g_manager;
|
|
(this->_posOffset).y = -20.0;
|
|
local_2b8 = GHIDRA_CAST<LayerState *>(0x345);
|
|
seed_fart_sound_override(GHIDRA_CAST<int *>(&local_2b8));
|
|
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_2b8),1.0,2,1,1.0,0.0);
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (iVar3 == 0x3d) {
|
|
this->_visible = 0;
|
|
this->_timeout = 0x14;
|
|
this->_minRadius = 20.0;
|
|
this->_maxRadius = 95.0;
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (iVar3 == 0x43) {
|
|
this->_visible = 0;
|
|
this->_timeout = 0x32;
|
|
this->_minRadius = 45.0;
|
|
this->_maxRadius = 320.0;
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (iVar3 != 0x3e) {
|
|
if (iVar3 == 0x29) {
|
|
iVar3 = g_game->_stage;
|
|
if (iVar3 < 7) {
|
|
if (((iVar3 == 5) || (iVar3 == 6)) && (g_game->_stageType == 2)) {
|
|
msvc::string::string_from_cstr
|
|
(sheetPath3._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_DankDroplets.png"));
|
|
local_8 = 0xe;
|
|
goto LAB_005ceb44;
|
|
}
|
|
}
|
|
else {
|
|
msvc::string::string_from_cstr
|
|
(sheetPath3._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_BloodDroplets.png"));
|
|
local_8 = 0xd;
|
|
LAB_005ceb44:
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&sheetPath3);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((sheetPath3._buf)))->msvc::string::_Tidy_deallocate();
|
|
}
|
|
uVar4 = Random();
|
|
this->_state = uVar4 % 3;
|
|
if (uVar4 % 3 == 0) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("LargeDrop"),0);
|
|
uVar4 = Random();
|
|
scale = (float)((double)GHIDRA_INT(uVar4) + __uint_to_double_fixup[-(GHIDRA_INT(uVar4) >> 0x1f)]) *
|
|
2.3283064e-10 * 0.5 + 0.5;
|
|
fVar16 = scale * g_vectorOne.x;
|
|
(this->_sprite)._scale.y = scale * g_vectorOne.y;
|
|
(this->_sprite)._scale.x = fVar16;
|
|
}
|
|
else {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("SmallDrop"),0);
|
|
}
|
|
this->_height = -10.0;
|
|
uVar4 = Random();
|
|
(this->_sprite)._flipX = ((uint8_t)uVar4 ^ 0xff) & 1;
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (iVar3 != 0x41) {
|
|
if (iVar3 == 0x3f) {
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
bVar1 = (GHIDRA_CAST<Room *>((pRVar8)))->Room::is_type_16();
|
|
if (bVar1 != 0) {
|
|
LAB_005cdc8a:
|
|
this->Remove();
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
iVar3 = this->_subtype;
|
|
if (iVar3 == 0) {
|
|
pcVar6 = "WormHori";
|
|
LAB_005ceeab:
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>(pcVar6),0);
|
|
}
|
|
else {
|
|
if (iVar3 == 1) {
|
|
pcVar6 = "MaggotHori";
|
|
goto LAB_005ceeab;
|
|
}
|
|
if (iVar3 == 2) {
|
|
pcVar6 = "LeechHori";
|
|
goto LAB_005ceeab;
|
|
}
|
|
}
|
|
fVar16 = random_float();
|
|
fVar16 = normalize_angle_degrees(fVar16 * 360.0);
|
|
this->_rotation = fVar16;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetRotation(fVar16);
|
|
this->_sortingLayer = 1;
|
|
this->_fallingAcceleration = 1.3;
|
|
fVar16 = random_float();
|
|
this->_fallingSpeed = 5.0 - fVar16 * 30.0;
|
|
goto LAB_005d03cf;
|
|
}
|
|
if (iVar3 == 0x40) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("WalkHori"),0);
|
|
fVar16 = random_float();
|
|
local_2b8 = GHIDRA_CAST<LayerState *>(normalize_angle_degrees(fVar16 * 360.0));
|
|
this->_rotation = (float)local_2b8;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_rotation = (float)local_2b8;
|
|
this->_height = 0.0;
|
|
}
|
|
else {
|
|
if (iVar3 != 0x45) {
|
|
if (iVar3 == 0x46) {
|
|
iVar3 = Isaac::Random(3);
|
|
ANM2::SetFrame(&this->_sprite,GHIDRA_CAST<std_string *>("Droplets"),iVar3);
|
|
this->_fallingAcceleration = 1.3;
|
|
fVar16 = random_float();
|
|
this->_shadowSize = 0.04;
|
|
this->_fallingSpeed = 1.0 - fVar16 * 15.0;
|
|
goto LAB_005d03d7;
|
|
}
|
|
if ((iVar3 == 0x47) || (iVar3 == 0x6e)) {
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_minFilterMode = 1;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_magFilterMode = 1;
|
|
if (this->_variant == 0x6e) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("IdleQuick"),0);
|
|
}
|
|
}
|
|
else if (iVar3 == 0x7e) {
|
|
iVar3 = Isaac::Random(4);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetRotation((float)((double)iVar3 + __uint_to_double_fixup[-(iVar3 >> 0x1f)]) *
|
|
90.0);
|
|
iVar3 = Isaac::Random(2);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::set_flip_x(iVar3 == 0);
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_visible = 0;
|
|
if (this->_subtype == 1) {
|
|
SetTimeout(this,0x3c);
|
|
fVar16 = random_float();
|
|
SoundEffects::PlayWithFartOverride2(0x22d,GHIDRA_INT(&this->_pos),2,0,fVar16 * 0.2 + 0.9,1.0)
|
|
;
|
|
}
|
|
else {
|
|
SetTimeout(this,0x5a);
|
|
fVar16 = random_float();
|
|
SoundEffects::PlayWithFartOverride2(0x110,GHIDRA_INT(&this->_pos),2,0,fVar16 * 0.3 + 2.7,0.6)
|
|
;
|
|
}
|
|
}
|
|
else if ((iVar3 == 0x7f) || (iVar3 == 0xca)) {
|
|
this->_visible = 0;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x200000);
|
|
if (this->_variant == 0xca) {
|
|
iVar3 = 0x365;
|
|
LAB_005cf680:
|
|
SoundEffects::PlayWithFartOverride(iVar3,1.0,2,0,1.0);
|
|
}
|
|
}
|
|
else if (iVar3 == 0x48) {
|
|
this->_visible = 0;
|
|
this->_timeout = 0xf0;
|
|
(GHIDRA_CAST<Vector *>((&this->_targetPosition)))->Vector::operator_assign(&g_vectorZero);
|
|
}
|
|
else if (iVar3 == 0x49) {
|
|
this->_visible = 0;
|
|
this->_timeout = 8;
|
|
}
|
|
else if (iVar3 == 0x4a) {
|
|
this->_sortingLayer = 0;
|
|
this->_entityGridCollisionClass = 3;
|
|
this->_entityCollisionClass = 1;
|
|
currentRoom = GHIDRA_CAST<GridEntity *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(game))))->Level)::GetCurrentRoom();
|
|
iVar3 = (GHIDRA_CAST<GridEntity *>((currentRoom)))->GridEntity::GetVariant();
|
|
if (iVar3 == 0x13) {
|
|
msvc::string::string_from_cstr
|
|
(sheetPath2._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/IsaacCarpet_Barren.png"));
|
|
local_8 = 0xf;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&sheetPath2);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((sheetPath2._buf)))->msvc::string::_Tidy_deallocate();
|
|
}
|
|
}
|
|
else if (iVar3 == 0x4b) {
|
|
this->_timeout = 0x32;
|
|
this->_fallingAcceleration = 1.3;
|
|
this->_fallingSpeed = 0.5;
|
|
ANM2::Play(&this->_sprite,&DAT_00b634bc,0);
|
|
}
|
|
else if (iVar3 == 0x4c) {
|
|
local_2e4 = GHIDRA_CAST<Level *>(&DAT_00000005);
|
|
clampedSubtype = std_min_ptr(GHIDRA_CAST<uint32_t *>(&local_2e4),GHIDRA_CAST<uint32_t *>(&this->_subtype));
|
|
ANM2::Play(&this->_sprite,(&PTR_DAT_00b63b70)[*clampedSubtype],0);
|
|
LAB_005cf2a4:
|
|
this->_sortingLayer = 0;
|
|
}
|
|
else if (iVar3 == 0x24) {
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
(GHIDRA_CAST<Room *>((pRVar8)))->Room::GetBackdropType();
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
FUN_004aae70();
|
|
iVar3 = FUN_005cd470();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,GHIDRA_CAST<std_string *>((iVar3 + 0x108)));
|
|
this->_sortingLayer = 1;
|
|
}
|
|
else if (iVar3 == 0x1d) {
|
|
(GHIDRA_CAST<Vector *>((&this->_targetPosition)))->Vector::operator_assign(&g_vectorZero);
|
|
this->_collisionDamage = 300.0;
|
|
}
|
|
else if (iVar3 == 0x13) {
|
|
this->_collisionDamage = 20.0;
|
|
}
|
|
else if (iVar3 == 0x51) {
|
|
this->_fallingSpeed = 0.0;
|
|
this->_height = -60.0;
|
|
(this->_posOffset).y = -60.0;
|
|
this->_entityGridCollisionClass = 6;
|
|
}
|
|
else if (iVar3 == 0x52) {
|
|
sprite = &this->_sprite;
|
|
local_2b4 = GHIDRA_CAST<Entity_Familiar *>(sprite);
|
|
if (this->_subtype == 1) {
|
|
msvc::string::string_from_cstr
|
|
(sheetPath2._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/wombhole_orange.png"));
|
|
local_8 = 0x10;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::ReplaceSpritesheet(0,&sheetPath2);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((sheetPath2._buf)))->msvc::string::_Tidy_deallocate();
|
|
}
|
|
this->_sortingLayer = 0;
|
|
this->_state = 0;
|
|
ANM2::Play(sprite,GHIDRA_CAST<uint8_t *>("Closed"),0);
|
|
Config::GetCollectibles();
|
|
layer = GHIDRA_CAST<LayerState *>(FUN_00436120(this->_subtype - 1U & 1));
|
|
local_2b8 = layer;
|
|
local_2e4 = GHIDRA_CAST<Level *>(Config)::GetCollectibles();
|
|
pvVar10 = layer->_layerData;
|
|
game = GHIDRA_CAST<Game *>(Config)::GetCollectibles();
|
|
currentRoomDesc = (GHIDRA_CAST<Game *>((game)))->Game::GetCurrentRoomDesc();
|
|
linkedRoomDesc = (GHIDRA_CAST<Level *>((local_2e4)))->Level::GetRoomByIdx(GHIDRA_INT(pvVar10),-1);
|
|
if ((-1 < GHIDRA_INT(local_2b8->_layerData)) ||
|
|
(isOpened = false, linkedRoomDesc == currentRoomDesc)) {
|
|
isOpened = true;
|
|
}
|
|
pcVar6 = "Opened";
|
|
if (!isOpened) {
|
|
pcVar6 = "Closed";
|
|
}
|
|
ANM2::Play(GHIDRA_CAST<ANM2 *>(local_2b4),GHIDRA_CAST<uint8_t *>(pcVar6),0);
|
|
Config::GetCollectibles();
|
|
this = effect;
|
|
iVar3 = FUN_00436120(effect->_subtype);
|
|
if (*GHIDRA_CAST<char *>((iVar3 + 8)) != '\0') {
|
|
player = (GHIDRA_CAST<Game *>((g_game)))->Game::GetPlayer(0);
|
|
tmpEntity = Entity_Player::AddWisp(player,0x18c,&this->_pos,0,1);
|
|
local_2b4 = tmpEntity;
|
|
if (tmpEntity != GHIDRA_CAST<Entity_Familiar *>(0x0)) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(tmpEntity))))->Entity::SetParent(GHIDRA_CAST<Entity *>(this));
|
|
if (this->_subtype != 0) {
|
|
tmpColor = ColorParams::set_from_bytes
|
|
(GHIDRA_CAST<ColorParams *>(&workColor),400,0xfa,0x3c,0xff,0,0,0);
|
|
wispSprite = GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_2b4))))->Entity)::GetSprite();
|
|
layer = (GHIDRA_CAST<Sprite *>((wispSprite)))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&layer->_color))))->Color::operator_assign(tmpColor);
|
|
tmpColor = ColorParams::set_from_bytes
|
|
(GHIDRA_CAST<ColorParams *>(&workColor),300,200,10,0xff,0,0,0);
|
|
wispSprite = GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(local_2b4))))->Entity)::GetSprite();
|
|
layer = (GHIDRA_CAST<Sprite *>((wispSprite)))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&layer->_color))))->Color::operator_assign(tmpColor);
|
|
tmpEntity = local_2b4;
|
|
}
|
|
FUN_0063c060(9);
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
iVar3 = (GHIDRA_CAST<Room *>((pRVar8)))->Room::GetFrameCount();
|
|
if (iVar3 < 2) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(tmpEntity))))->Entity::ClearEntityFlags(4);
|
|
}
|
|
tmpEntity->Update();
|
|
}
|
|
}
|
|
}
|
|
else if (iVar3 == 0x57) {
|
|
(GHIDRA_CAST<BlendMode *>((&local_2d8)))->BlendMode::SetMode(2,0);
|
|
blendMode = &local_2d8;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
copy_20_bytes(layer->_blendMode,blendMode);
|
|
fVar16 = (GHIDRA_CAST<RNG *>((&this->_dropRNG)))->RNG::RandomFloat();
|
|
local_2c0.y = fVar16 * 0.5 + 0.5;
|
|
vecResult = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&scratchVec,&local_2c0.y);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetScale(vecResult);
|
|
}
|
|
else if (iVar3 == 0x58) {
|
|
if (this->_subtype == 1) {
|
|
msvc::string::string_from_cstr
|
|
(sheetPath2._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_088_PurpleBall.png"));
|
|
local_8 = 0x11;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&sheetPath2);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((sheetPath2._buf)))->msvc::string::_Tidy_deallocate();
|
|
}
|
|
uVar4 = Random();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::PlayRandom(uVar4);
|
|
iVar3 = Isaac::Random(2);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::set_flip_x(iVar3 == 0);
|
|
this->_renderZOffset = -1000;
|
|
}
|
|
else {
|
|
if (iVar3 == 0x5b) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("JumpDown"),0);
|
|
iVar3 = 2;
|
|
goto LAB_005cf680;
|
|
}
|
|
if (iVar3 == 99) {
|
|
if (this->_subtype == 0) {
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
FUN_00440ec0();
|
|
iVar3 = FUN_005cd620();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(GHIDRA_CAST<ColorMod *>((iVar3 + 0x74)));
|
|
spriteColor = GHIDRA_CAST<Font *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
fVar16 = random_float();
|
|
Font::SetLineHeightModifier(spriteColor,fVar16 * 0.15 + 0.05);
|
|
iVar3 = Isaac::Random(2);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::set_flip_x(iVar3 == 0);
|
|
fVar16 = random_float();
|
|
local_2c0.y = fVar16 * 0.2 + 0.5;
|
|
vecResult = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&scratchVec,&local_2c0.y);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetScale(vecResult);
|
|
fVar16 = random_float();
|
|
local_2c0.y = fVar16 * 2.0 + 1.0;
|
|
fVar16 = random_float();
|
|
SoundEffects::PlayWithFartOverride(0x18e,fVar16 * 0.5 + 0.5,2,0,local_2c0.y);
|
|
}
|
|
else {
|
|
this->_fallingAcceleration = 0.5;
|
|
fVar16 = random_float();
|
|
this->_height = -10.0;
|
|
this->_fallingSpeed = -1.0 - fVar16 * 2.0;
|
|
fVar16 = random_float();
|
|
local_2c0.y = fVar16 * 0.5 + 0.5;
|
|
vecResult = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&scratchVec,&local_2c0.y);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetScale(vecResult);
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
FUN_00440ec0();
|
|
iVar3 = FUN_005cd620();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(GHIDRA_CAST<ColorMod *>((iVar3 + 0x74)));
|
|
spriteColor = GHIDRA_CAST<Font *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
fVar16 = random_float();
|
|
Font::SetLineHeightModifier(spriteColor,fVar16 * 0.3 + 0.1);
|
|
}
|
|
}
|
|
else if (iVar3 == 0x53) {
|
|
iVar3 = (GHIDRA_CAST<Game *>((g_game)))->Game::Challenge();
|
|
if (iVar3 == 0x1e) {
|
|
msvc::string::string_from_cstr
|
|
(sheetPath._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_101_FireSword.png"));
|
|
local_8 = 0x12;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&sheetPath);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((sheetPath._buf)))->msvc::string::_Tidy_deallocate();
|
|
}
|
|
}
|
|
else if (iVar3 == 0x35) {
|
|
this->_timeout = 0x19;
|
|
}
|
|
else if (iVar3 == 0x68) {
|
|
uVar4 = this->_subtype;
|
|
if (uVar4 == 0) {
|
|
this->_visible = 0;
|
|
}
|
|
else if (uVar4 == 1) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Projectile"),0);
|
|
fVar16 = random_float();
|
|
this->_height = -(fVar16 * 4.0 + 12.0);
|
|
local_2e4 = GHIDRA_CAST<Level *>(random_float());
|
|
local_2c0.y = random_float();
|
|
random_float();
|
|
setColorFn = *(code **)(*GHIDRA_CAST<int *>(this) + 0x3c);
|
|
(GHIDRA_CAST<Color *>((&workColor)))->Color::Color();
|
|
(*setColorFn)(extraout_EAX_01,0xffffffff,0xff,0,1);
|
|
}
|
|
else {
|
|
if (uVar4 == 2) {
|
|
bVar1 = 0;
|
|
pcVar6 = "Explode";
|
|
}
|
|
else {
|
|
if (uVar4 < 3) goto LAB_005cf9dd;
|
|
bVar1 = 0;
|
|
iVar3 = Isaac::Random(4);
|
|
pcVar6 = (&PTR_s_Particle1_00b63b60)[iVar3];
|
|
}
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>(pcVar6),bVar1);
|
|
}
|
|
LAB_005cf9dd:
|
|
if (this->_subtype != 1) {
|
|
fVar16 = random_float();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetRotation(fVar16 * 360.0 - 180.0);
|
|
}
|
|
(GHIDRA_CAST<BlendMode *>((local_308)))->BlendMode::SetMode(2,0);
|
|
pvVar10 = extraout_EAX_02;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
copy_20_bytes(layer->_blendMode,pvVar10);
|
|
}
|
|
else if (iVar3 == 0x69) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("PoofStart"),0);
|
|
this->_renderZOffset = 1000;
|
|
}
|
|
else if (iVar3 == 0x6a) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Appear"),0);
|
|
this->_renderZOffset = 1000;
|
|
(this->_posOffset).y = -20.0;
|
|
}
|
|
else if (iVar3 == 0x27) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x200000);
|
|
if (this->_subtype == 1) {
|
|
if (this->_spawnerType != 0) goto LAB_005cf2a4;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_minFilterMode = 1;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_magFilterMode = 1;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x2));
|
|
layer->_minFilterMode = 1;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x2));
|
|
layer->_magFilterMode = 1;
|
|
(GHIDRA_CAST<BlendMode *>((local_308)))->BlendMode::SetMode(2,0);
|
|
pvVar10 = extraout_EAX_03;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
copy_20_bytes(layer->_blendMode,pvVar10);
|
|
(GHIDRA_CAST<BlendMode *>((local_308)))->BlendMode::SetMode(2,0);
|
|
pvVar10 = extraout_EAX_04;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x2));
|
|
copy_20_bytes(layer->_blendMode,pvVar10);
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x2));
|
|
game = g_game;
|
|
layer->_visible = 0;
|
|
tmpEntity = (GHIDRA_CAST<Game *>((game)))->Game::Spawn(this->_type,this->_variant,&this->_pos,&g_vectorZero,
|
|
GHIDRA_CAST<Entity *>(this),this->_subtype,this->_initSeed);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::SetChild(tmpEntity);
|
|
(GHIDRA_CAST<Entity *>((tmpEntity)))->Entity::SetParent(GHIDRA_CAST<Entity *>(this));
|
|
this->_renderDepthOffset = 10.0;
|
|
}
|
|
}
|
|
else if (iVar3 == 0x7b) {
|
|
iVar3 = this->_subtype;
|
|
if (iVar3 == 3) {
|
|
pvVar10 = (void *)FUN_00a11590(0,2,0);
|
|
pbVar2 = GHIDRA_CAST<uint8_t *>(0x0);
|
|
LAB_005cfc0c:
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(pbVar2);
|
|
copy_20_bytes(layer->_blendMode,pvVar10);
|
|
}
|
|
else {
|
|
if (iVar3 == 4) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(&this->_sprite))))->Entity::AddFlagsLow(0x20);
|
|
(GHIDRA_CAST<BlendMode *>((local_344)))->BlendMode::SetMode(2,0);
|
|
pbVar2 = GHIDRA_CAST<uint8_t *>(0x0);
|
|
pvVar10 = extraout_EAX_05;
|
|
goto LAB_005cfc0c;
|
|
}
|
|
if (iVar3 == 7) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(&this->_sprite))))->Entity::AddFlagsLow(0x100);
|
|
(GHIDRA_CAST<BlendMode *>((local_330)))->BlendMode::SetMode(2,0);
|
|
pbVar2 = GHIDRA_CAST<uint8_t *>(0x0);
|
|
pvVar10 = extraout_EAX_06;
|
|
goto LAB_005cfc0c;
|
|
}
|
|
if (iVar3 == 9) {
|
|
(GHIDRA_CAST<BlendMode *>((local_b4._buf + 4)))->BlendMode::SetMode(2,0);
|
|
pbVar2 = GHIDRA_CAST<uint8_t *>(0x1);
|
|
pvVar10 = extraout_EAX_07;
|
|
goto LAB_005cfc0c;
|
|
}
|
|
}
|
|
this->_renderZOffset = -1000;
|
|
}
|
|
else if (iVar3 == 0x6b) {
|
|
if (this->_subtype == 0) {
|
|
(this->_posOffset).y = -32.0;
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Throw"),0);
|
|
}
|
|
else {
|
|
ANM2::Play(&this->_sprite,s_Idle,0);
|
|
}
|
|
}
|
|
else {
|
|
if (iVar3 == 0x6c) {
|
|
local_2c0.y = (float)operator_new(300);
|
|
local_8 = 0x13;
|
|
if (GHIDRA_CAST<Room *>(local_2c0.y) == GHIDRA_CAST<Room *>(0x0)) {
|
|
pvVar11 = (void *)0x0;
|
|
}
|
|
else {
|
|
pvVar11 = (void *)FUN_005cd850();
|
|
}
|
|
pvVar10 = &(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4b4)));
|
|
local_8 = 0xffffffff;
|
|
ExtraDataRef::Set(pvVar10,pvVar11);
|
|
this->_state = 0;
|
|
goto LAB_005d03dd;
|
|
}
|
|
if (iVar3 == 0x6d) {
|
|
LAB_005d00d8:
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Appear"),0);
|
|
}
|
|
else if (iVar3 == 0x6f) {
|
|
ANM2::Play(&this->_sprite,&DAT_00b1d534,0);
|
|
}
|
|
else if (iVar3 == 0x70) {
|
|
(GHIDRA_CAST<BlendMode *>((local_b4._buf + 4)))->BlendMode::SetMode(2,0);
|
|
pvVar10 = extraout_EAX_08;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
copy_20_bytes(layer->_blendMode,pvVar10);
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Appear"),0);
|
|
this->_state = -1;
|
|
}
|
|
else {
|
|
if (iVar3 == 0x71) goto LAB_005d00d8;
|
|
if (iVar3 == 0x73) {
|
|
ANM2::Play(&this->_sprite,s_Idle,0);
|
|
this->_renderZOffset = 10000;
|
|
this->_state = 0;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x200000);
|
|
}
|
|
else if (iVar3 == 0x74) {
|
|
ANM2::Play(&this->_sprite,s_Idle,0);
|
|
this->_sortingLayer = 0;
|
|
this->_state = 0;
|
|
this->_damageSource = 0;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x200000);
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
iVar3 = (GHIDRA_CAST<Room *>((pRVar8)))->Room::GetBackdropType();
|
|
if (iVar3 == 0x10) {
|
|
msvc::string::string_from_cstr
|
|
(sheetPath._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/dirtpatch_darkroom.png"));
|
|
local_8 = 0x14;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&sheetPath);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((sheetPath._buf)))->msvc::string::_Tidy_deallocate();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::LoadGraphics();
|
|
}
|
|
}
|
|
else if (iVar3 == 0x75) {
|
|
if ((*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>(ThreadLocalStoragePointer) + 0xc)) < DAT_00c7fb40) &&
|
|
(_Init_thread_header(&DAT_00c7fb40), DAT_00c7fb40 == -1)) {
|
|
local_8 = 0x15;
|
|
(GHIDRA_CAST<Color *>((0x3f800000)))->Color::Color(0x3d4ccccd,0x3df5c28f,0x3e4ccccd);
|
|
local_8 = 0xffffffff;
|
|
_Init_thread_footer(&DAT_00c7fb40);
|
|
}
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(GHIDRA_CAST<ColorMod *>(&DAT_00c7fb44));
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("LostDeath"),0);
|
|
this->_state = 0;
|
|
}
|
|
else if (iVar3 == 0x77) {
|
|
this->_visible = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(this->_varData)._l) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_varData)._l) + 4)) = 1;
|
|
*GHIDRA_CAST<uint32_t *>(&(this->_varData)._h) = 1;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x200000);
|
|
}
|
|
else if (iVar3 == 0x78) {
|
|
this->_visible = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(this->_varData)._l) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(this->_varData)._l) + 4)) = 0;
|
|
this->_state = -1;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x200000);
|
|
}
|
|
else if (iVar3 == 0x31) {
|
|
if (GHIDRA_UINT(this->_subtype) < 6) {
|
|
ANM2::Play(&this->_sprite,(&PTR_s_Heart_00b63af4)[this->_subtype],0);
|
|
}
|
|
}
|
|
else if (iVar3 == 0x79) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x200000);
|
|
this->_scale = 0.0;
|
|
ANM2::SetFrame(&this->_sprite,GHIDRA_CAST<std_string *>("Default"),0);
|
|
}
|
|
else if (iVar3 == 0x7c) {
|
|
bVar1 = 0;
|
|
iVar3 = Isaac::Random(3);
|
|
ANM2::Play(&this->_sprite,(&PTR_s_Bubble1_00b63ae4)[iVar3],bVar1);
|
|
iVar3 = Isaac::Random(2);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::set_flip_x(iVar3 == 0);
|
|
}
|
|
else if (iVar3 == 0x7d) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("SmallHoleOpen"),0);
|
|
this->_state = 0;
|
|
this->_renderDepthOffset = -5.0;
|
|
local_2b8 = ANM2::GetLayer(&this->_sprite,&DAT_00b1d57c);
|
|
if (local_2b8 != GHIDRA_CAST<LayerState *>(0x0)) {
|
|
uVar4 = Random();
|
|
vecResult = &this->_pos;
|
|
pEVar12 = (Entity_Effect *)
|
|
(GHIDRA_CAST<Game *>((g_game)))->Game::Spawn(1000,0x7a,vecResult,&g_vectorZero,GHIDRA_CAST<Entity *>(effect),
|
|
0,uVar4);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(pEVar12))))->Entity::SetParent(GHIDRA_CAST<Entity *>(effect));
|
|
iVar3 = _ptr_deref_or_minus1();
|
|
set_state(pEVar12,iVar3);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(effect))))->Entity::SetChild(GHIDRA_CAST<Entity *>(pEVar12));
|
|
layer = local_2b8;
|
|
game = g_game;
|
|
local_2b8->_visible = 0;
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(game))))->Level)::GetCurrentRoom();
|
|
this = effect;
|
|
(GHIDRA_CAST<Room *>((pRVar8)))->Room::GetFloorColorAt(&local_2d8,vecResult,effect->_size);
|
|
(GHIDRA_CAST<Color *>((&defaultColor)))->Color::Color(local_2d8._red * 2.0,local_2d8._green * 2.0,
|
|
local_2d8._blue * 2.0,1.0);
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&layer->_color))))->Color::operator_assign(other);
|
|
}
|
|
}
|
|
else if (iVar3 == 0x67) {
|
|
(GHIDRA_CAST<BlendMode *>((local_b4._buf + 4)))->BlendMode::SetMode(2,0);
|
|
pvVar10 = extraout_EAX_09;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
copy_20_bytes(layer->_blendMode,pvVar10);
|
|
bVar1 = 0;
|
|
iVar3 = Isaac::Random(5);
|
|
ANM2::Play(&this->_sprite,(&PTR_s_Bling1_00b63ad0)[iVar3],bVar1);
|
|
}
|
|
else if (iVar3 == 0xcb) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Summon"),0);
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
(GHIDRA_CAST<Room *>((pRVar8)))->Room::SetClear(0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
goto LAB_005d03cf;
|
|
}
|
|
ANM2::Play(&this->_sprite,s_Idle,0);
|
|
animState = GHIDRA_CAST<AnimationState *>(Config)::GetPillEffects();
|
|
iVar3 = AnimationState::GetAnimationLength(animState);
|
|
iVar3 = Isaac::Random(iVar3);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetFrame_1(iVar3);
|
|
fVar16 = random_float();
|
|
fVar16 = normalize_angle_degrees(fVar16 * 360.0);
|
|
this->_rotation = fVar16;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetRotation(fVar16);
|
|
fVar16 = random_float();
|
|
fVar16 = fVar16 * -30.0 - 5.0;
|
|
(this->_posOffset).y = fVar16;
|
|
this->_height = fVar16;
|
|
(GHIDRA_CAST<Vector *>((&this->_targetPosition)))->Vector::operator_assign(&g_vectorZero);
|
|
}
|
|
goto LAB_005d03c8;
|
|
}
|
|
uVar4 = (GHIDRA_CAST<Game *>((g_game)))->Game::GetStageID(0);
|
|
switch(uVar4) {
|
|
case 10:
|
|
case 0xb:
|
|
case 0xc:
|
|
case 0x1c:
|
|
case 0x1e:
|
|
case 0x21:
|
|
case 0x22:
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("White"),0);
|
|
(GHIDRA_CAST<Color *>((&workColor)))->Color::Reset();
|
|
(GHIDRA_CAST<Color *>((&workColor)))->Color::SetTint(1.0,0.8,0.0,1.0);
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&(this->_sprite)._color))))->Color::operator_assign(GHIDRA_CAST<ColorMod *>(&workColor));
|
|
(GHIDRA_CAST<Color *>((&workColor)))->Color::Reset();
|
|
(GHIDRA_CAST<Color *>((&workColor)))->Color::SetTint(1.0,1.0,0.5,1.0);
|
|
tmpColor = GHIDRA_CAST<ColorMod *>(&workColor);
|
|
goto code_r0x005ceddb;
|
|
default:
|
|
ANM2::Play(&this->_sprite,&DAT_00b634c0,0);
|
|
break;
|
|
case 0x10:
|
|
case 0x1f:
|
|
ANM2::Play(&this->_sprite,&DAT_00b633c4,0);
|
|
(GHIDRA_CAST<Color *>((&splatTint)))->Color::Reset();
|
|
(GHIDRA_CAST<Color *>((&splatTint)))->Color::SetTint(1.0,0.5,0.5,1.0);
|
|
if (&this->_splatColor != GHIDRA_CAST<ColorMod *>(&splatTint)) {
|
|
(this->_splatColor)._tint[0] = splatTint._tint[0];
|
|
(this->_splatColor)._tint[1] = splatTint._tint[1];
|
|
(this->_splatColor)._tint[2] = splatTint._tint[2];
|
|
(this->_splatColor)._tint[3] = splatTint._tint[3];
|
|
(this->_splatColor)._colorize[0] = splatTint._colorize[0];
|
|
(this->_splatColor)._colorize[1] = splatTint._colorize[1];
|
|
(this->_splatColor)._colorize[2] = splatTint._colorize[2];
|
|
(this->_splatColor)._colorize[3] = splatTint._colorize[3];
|
|
*GHIDRA_CAST<uint64_t *>((this->_splatColor)._offset) = (*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(splatTint._offset)) + 0x0)));
|
|
(this->_splatColor)._offset[2] = splatTint._offset[2];
|
|
}
|
|
goto code_r0x005cede7;
|
|
case 0x20:
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("White"),0);
|
|
(GHIDRA_CAST<Color *>((&workColor)))->Color::Color(1.0,0.02,0.0,1.0);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(color);
|
|
}
|
|
(GHIDRA_CAST<Color *>((&workColor)))->Color::Color();
|
|
tmpColor = extraout_EAX;
|
|
code_r0x005ceddb:
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&this->_splatColor))))->Color::operator_assign(tmpColor);
|
|
code_r0x005cede7:
|
|
fVar16 = random_float();
|
|
(this->_posOffset).y = fVar16 * -50.0;
|
|
fVar16 = random_float();
|
|
local_2b8 = GHIDRA_CAST<LayerState *>((fVar16 * 0.5 + 0.5));
|
|
vecResult = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&local_2c0,GHIDRA_CAST<float *>(&local_2b8));
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetScale(vecResult);
|
|
(GHIDRA_CAST<BlendMode *>((local_36c)))->BlendMode::SetMode(2,0);
|
|
pvVar10 = extraout_EAX_00;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
copy_20_bytes(layer->_blendMode,pvVar10);
|
|
goto LAB_005d03cf;
|
|
}
|
|
uVar4 = Random();
|
|
(this->_sprite)._flipX = ~(uint8_t)uVar4 & 1;
|
|
switch(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(g_game->_room) + 0x1d18))) {
|
|
case 4:
|
|
case 5:
|
|
msvc::string::string_from_cstr
|
|
(cavesSheet._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_062_GroundBreakCaves.png"));
|
|
local_8 = 2;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&cavesSheet);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((cavesSheet._buf)))->msvc::string::_Tidy_deallocate();
|
|
break;
|
|
case 7:
|
|
case 8:
|
|
case 9:
|
|
msvc::string::string_from_cstr
|
|
(depthsSheet._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_062_GroundBreakDepths.png"));
|
|
local_8 = 3;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&depthsSheet);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((depthsSheet._buf)))->msvc::string::_Tidy_deallocate();
|
|
break;
|
|
case 10:
|
|
case 0xb:
|
|
case 0xc:
|
|
msvc::string::string_from_cstr
|
|
(wombSheet._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_062_GroundBreakWomb.png"));
|
|
local_8 = 4;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&wombSheet);
|
|
psVar7 = &wombSheet;
|
|
goto LAB_005ceaae;
|
|
case 0xd:
|
|
msvc::string::string_from_cstr
|
|
(blueWombSheet._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_062_GroundBreakBlueWomb.png"));
|
|
local_8 = 5;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&blueWombSheet);
|
|
psVar7 = &blueWombSheet;
|
|
goto LAB_005ceaae;
|
|
case 0x20:
|
|
if ((*GHIDRA_CAST<uint32_t *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + 4)) + 0x44)) >> 5 & 1) == 0) {
|
|
msvc::string::string_from_cstr
|
|
(minesSheet._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_062_GroundBreakMines.png"));
|
|
local_8 = 7;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&minesSheet);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((minesSheet._buf)))->msvc::string::_Tidy_deallocate();
|
|
}
|
|
else {
|
|
msvc::string::string_from_cstr
|
|
(minesLavaSheet._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_062_GroundBreakMinesLava.png"));
|
|
local_8 = 6;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&minesLavaSheet);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((minesLavaSheet._buf)))->msvc::string::_Tidy_deallocate();
|
|
}
|
|
break;
|
|
case 0x21:
|
|
case 0x28:
|
|
case 0x29:
|
|
case 0x2a:
|
|
msvc::string::string_from_cstr
|
|
(mausoleumSheet._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_062_GroundBreakMausoleum.png"));
|
|
local_8 = 9;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&mausoleumSheet);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((mausoleumSheet._buf)))->msvc::string::_Tidy_deallocate();
|
|
break;
|
|
case 0x22:
|
|
msvc::string::string_from_cstr
|
|
(corpseSheet._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_062_GroundBreakCorpse.png"));
|
|
local_8 = 10;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&corpseSheet);
|
|
psVar7 = &corpseSheet;
|
|
goto LAB_005ceaae;
|
|
case 0x2b:
|
|
msvc::string::string_from_cstr
|
|
(corpse2Sheet._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_062_GroundBreakCorpse2.png"));
|
|
local_8 = 0xb;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&corpse2Sheet);
|
|
psVar7 = &corpse2Sheet;
|
|
goto LAB_005ceaae;
|
|
case 0x2c:
|
|
msvc::string::string_from_cstr
|
|
(sheetPath3._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_062_GroundBreakWomb.png"));
|
|
local_8 = 0xc;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&sheetPath3);
|
|
psVar7 = &sheetPath3;
|
|
LAB_005ceaae:
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((psVar7->_buf)))->msvc::string::_Tidy_deallocate();
|
|
(GHIDRA_CAST<RNG *>((&this->_dropRNG)))->RNG::Next();
|
|
ANM2::Play(&this->_sprite,(&PTR_s_WombBreak1_00b63b88)[GHIDRA_UINT((this->_dropRNG)._seed) % 3],0);
|
|
break;
|
|
case 0x2e:
|
|
msvc::string::string_from_cstr
|
|
(minesLava2Sheet._buf,GHIDRA_CAST<uint8_t *>("gfx/Effects/Effect_062_GroundBreakMinesLava.png"));
|
|
local_8 = 8;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&minesLava2Sheet);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((minesLava2Sheet._buf)))->msvc::string::_Tidy_deallocate();
|
|
}
|
|
LAB_005d03cf:
|
|
LAB_005d03d7:
|
|
pvVar10 = &(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4b4)));
|
|
LAB_005d03dd:
|
|
game = g_game;
|
|
switch(this->_variant) {
|
|
case 0x15:
|
|
case 0x21:
|
|
case 0x40:
|
|
case 0x44:
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
iVar3 = (GHIDRA_CAST<Room *>((pRVar8)))->Room::GetBackdropType();
|
|
if (iVar3 == 0x2d) {
|
|
(GHIDRA_CAST<Color *>((&defaultColor)))->Color::Color();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(color_00);
|
|
}
|
|
break;
|
|
case 0x20:
|
|
if (GHIDRA_CAST<Entity *>(this->_spawnerEntity) != GHIDRA_CAST<Entity *>(0x0)) {
|
|
bVar1 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this->_spawnerEntity))))->Entity::is_player();
|
|
pEVar12 = effect;
|
|
if (bVar1 != 0) {
|
|
this->_scale = 1.3;
|
|
}
|
|
goto LAB_005d1317;
|
|
}
|
|
break;
|
|
case 0x80:
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x200000);
|
|
ANM2::Play(&this->_sprite,s_Idle,0);
|
|
break;
|
|
case 0x82:
|
|
game = GHIDRA_CAST<Game *>(Config)::GetCollectibles();
|
|
uVar4 = (GHIDRA_CAST<Game *>((game)))->Game::GetStageID(0);
|
|
if (uVar4 == 0x1c) {
|
|
msvc::string::string_from_cstr
|
|
(sheetPath._buf,GHIDRA_CAST<uint8_t *>("gfx/monsters/repentance/810.000_small_leech_dross.png"));
|
|
local_8 = 0x16;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&sheetPath);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((sheetPath._buf)))->msvc::string::_Tidy_deallocate();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::LoadGraphics();
|
|
}
|
|
break;
|
|
case 0x84:
|
|
if ((this->_subtype == 1) || (this->_subtype == 2)) goto LAB_005d049c;
|
|
case 0x86:
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
FUN_00440ec0();
|
|
iVar3 = FUN_005cd620();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(GHIDRA_CAST<ColorMod *>((iVar3 + 0x74)));
|
|
break;
|
|
case 0x85:
|
|
this->_renderZOffset = -100;
|
|
sprite = &this->_sprite;
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(game))))->Level::GetCurrentRoom();
|
|
FUN_00440ec0();
|
|
iVar3 = FUN_005cd620();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::SetColor(GHIDRA_CAST<ColorMod *>((iVar3 + 0x74)));
|
|
spriteColor = GHIDRA_CAST<Font *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite)::Color();
|
|
colorTarget = GHIDRA_CAST<Color *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite)::Color();
|
|
fVar16 = (GHIDRA_CAST<Color *>((colorTarget)))->Color::A();
|
|
pRVar8 = GHIDRA_CAST<Room *>((fVar16 * 0.8));
|
|
local_2c0.y = (float)pRVar8;
|
|
LAB_005d130c:
|
|
Font::SetLineHeightModifier(spriteColor,(float)pRVar8);
|
|
break;
|
|
case 0x87:
|
|
bVar1 = 0;
|
|
sprite = &this->_sprite;
|
|
iVar3 = Isaac::Random(4);
|
|
ANM2::Play(sprite,(&PTR_s_Drop01_00b63b24)[iVar3],bVar1);
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
iVar3 = (GHIDRA_CAST<Room *>((pRVar8)))->Room::GetFrameCount();
|
|
if (iVar3 == 0) {
|
|
animState = GHIDRA_CAST<AnimationState *>(Config)::GetPillEffects();
|
|
iVar3 = AnimationState::GetAnimationLength(animState);
|
|
iVar3 = Isaac::Random(iVar3);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::SetFrame_1(iVar3);
|
|
}
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
FUN_00440ec0();
|
|
iVar3 = FUN_005cd620();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::SetColor(GHIDRA_CAST<ColorMod *>((iVar3 + 0x74)));
|
|
break;
|
|
case 0x88:
|
|
case 0x96:
|
|
case 0xb1:
|
|
case 0xb7:
|
|
case 0xbb:
|
|
case 0xc0:
|
|
goto LAB_005d11c7;
|
|
case 0x89:
|
|
local_2b4 = GHIDRA_CAST<Entity_Familiar *>(&this->_sprite);
|
|
ANM2::Play(GHIDRA_CAST<ANM2 *>(local_2b4),s_Open,0);
|
|
if (this->_subtype == 0) {
|
|
this->_sortingLayer = 1;
|
|
LAB_005d05aa:
|
|
tmpEntity = local_2b4;
|
|
}
|
|
else {
|
|
if (this->_subtype != 1) goto LAB_005d05aa;
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
FUN_00440ec0();
|
|
iVar3 = FUN_005cd620();
|
|
tmpEntity = local_2b4;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(local_2b4))))->Sprite::SetColor(GHIDRA_CAST<ColorMod *>((iVar3 + 0x74)));
|
|
}
|
|
game = GHIDRA_CAST<Game *>(Config)::GetCollectibles();
|
|
uVar4 = (GHIDRA_CAST<Game *>((game)))->Game::GetStageID(0);
|
|
if (uVar4 == 0x1c) {
|
|
uVar4 = 0;
|
|
iVar3 = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(tmpEntity))))->Sprite::GetLayerCount();
|
|
if (iVar3 != 0) {
|
|
do {
|
|
msvc::string::string_from_cstr
|
|
(sheetPath._buf,GHIDRA_CAST<uint8_t *>("gfx/bosses/repentance/wormwood_wallbreak_dross.png"));
|
|
local_8 = 0x17;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(tmpEntity))))->Sprite::ReplaceSpritesheet(uVar4,&sheetPath);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((sheetPath._buf)))->msvc::string::_Tidy_deallocate();
|
|
uVar4 = uVar4 + 1;
|
|
uVar13 = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(tmpEntity))))->Sprite::GetLayerCount();
|
|
} while (uVar4 < uVar13);
|
|
}
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(tmpEntity))))->Sprite::LoadGraphics();
|
|
}
|
|
break;
|
|
case 0x8a:
|
|
this->_renderZOffset = -0x80000000;
|
|
goto LAB_005d0669;
|
|
case 0x8c:
|
|
case 0x9a:
|
|
case 0x9c:
|
|
goto LAB_005d0f6b;
|
|
case 0x8d:
|
|
sprite = &this->_sprite;
|
|
local_2e4 = GHIDRA_CAST<Level *>(sprite);
|
|
if (this->_subtype == 1) {
|
|
tmpColor = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Color *>((0x3f800000)))->Color)::Color(0,0,0,0,0x3e4ccccd,0x3e4ccccd,0);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::SetColor(tmpColor);
|
|
}
|
|
else {
|
|
tmpColor = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Color *>((0x3f800000)))->Color)::Color(0,0,0,0,0,0x3e4ccccd,0);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::SetColor(tmpColor);
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
bVar1 = (GHIDRA_CAST<Room *>((pRVar8)))->Room::IsBeastDungeon();
|
|
if (bVar1 != 0) {
|
|
tmpColor = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Color *>((0x3f800000)))->Color)::Color(0,0,0,0,0,0x3e99999a,0);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::SetColor(tmpColor);
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
Font::SetLineHeightModifier(GHIDRA_CAST<Font *>(&layer->_color),0.5);
|
|
}
|
|
}
|
|
spriteColor = GHIDRA_CAST<Font *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite)::Color();
|
|
Font::SetLineHeightModifier(spriteColor,0.0);
|
|
rng = &this->_dropRNG;
|
|
fVar16 = (GHIDRA_CAST<RNG *>((rng)))->RNG::RandomFloat();
|
|
local_2c0.y = fVar16 * 0.4 + 1.0;
|
|
vecResult = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&scratchVec,&local_2c0.y);
|
|
subSprite = local_2e4;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(local_2e4))))->Sprite::SetScale(vecResult);
|
|
vecResult = (GHIDRA_CAST<Vector *>((GHIDRA_CAST<Vector *>((auStack_2f0 + 8)))))->Vector::Vector(0.0,-20.0);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(subSprite))))->Sprite::set_offset(vecResult);
|
|
uVar4 = (GHIDRA_CAST<RNG *>((rng)))->RNG::RandomInt(2);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(subSprite))))->Sprite::set_flip_x(uVar4 != 0);
|
|
ANM2::Play(GHIDRA_CAST<ANM2 *>(subSprite),s_Idle,0);
|
|
animState = GHIDRA_CAST<AnimationState *>(Config)::GetPillEffects();
|
|
uVar4 = AnimationState::GetAnimationLength(animState);
|
|
uVar4 = (GHIDRA_CAST<RNG *>((rng)))->RNG::RandomInt(uVar4);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(subSprite))))->Sprite::SetFrame_1(uVar4);
|
|
break;
|
|
case 0x8e:
|
|
if (this->_subtype == 1) {
|
|
this->_sortingLayer = 0;
|
|
(GHIDRA_CAST<RNG *>((&this->_dropRNG)))->RNG::RandomInt(4);
|
|
sprintf_s(local_28 + 4,0x10,GHIDRA_CAST<uint8_t *>("Idle%d"));
|
|
ANM2::Play(&this->_sprite,local_28 + 4,0);
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
FUN_00440ec0();
|
|
iVar3 = FUN_005cd620();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(GHIDRA_CAST<ColorMod *>((iVar3 + 0x74)));
|
|
colorTarget = GHIDRA_CAST<Color *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
(GHIDRA_CAST<Color *>((colorTarget)))->Color::SetOffset(0.3,0.3,0.3);
|
|
}
|
|
else {
|
|
this->_renderDepthOffset = -14.0;
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(game))))->Level::GetCurrentRoom();
|
|
FUN_00440ec0();
|
|
iVar3 = FUN_005cd620();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(GHIDRA_CAST<ColorMod *>((iVar3 + 0x74)));
|
|
}
|
|
break;
|
|
case 0x8f:
|
|
case 0x94:
|
|
this->_visible = 0;
|
|
this->_timeout = 0x78;
|
|
(GHIDRA_CAST<Vector *>((&this->_targetPosition)))->Vector::operator_assign(&g_vectorZero);
|
|
break;
|
|
case 0x90:
|
|
sprite = &this->_sprite;
|
|
bVar1 = 0;
|
|
if (this->_subtype == 0) {
|
|
uVar4 = (GHIDRA_CAST<RNG *>((&this->_dropRNG)))->RNG::RandomInt(4);
|
|
ANM2::Play(sprite,(&PTR_DAT_00b63b14)[uVar4],bVar1);
|
|
game = g_game;
|
|
this->_entityGridCollisionClass = 3;
|
|
vecResult = &this->_pos;
|
|
player = (GHIDRA_CAST<Game *>((game)))->Game::GetNearestPlayer(vecResult);
|
|
if (player != GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
playerPos = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(player))))->Entity::Position(&scratchVec);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::set_flip_x(vecResult->x <= playerPos->x && playerPos->x != vecResult->x);
|
|
}
|
|
}
|
|
else {
|
|
ANM2::Play(sprite,GHIDRA_CAST<uint8_t *>("Explosion"),0);
|
|
this->_renderDepthOffset = 100.0;
|
|
if (this->_subtype == 2) {
|
|
tmpColor = (ColorMod *)
|
|
(GHIDRA_CAST<Color *>((0x3f800000)))->Color::Color(0x3f800000,0x3f800000,0x3f800000,0x3f800000,0,0,0);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::SetColor(tmpColor);
|
|
}
|
|
else if (this->_subtype == 3) {
|
|
tmpColor = (ColorMod *)
|
|
(GHIDRA_CAST<Color *>((0x3f800000)))->Color::Color(0x3f400000,0x3f19999a,0x3f800000,0x3f800000,0,0,0);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::SetColor(tmpColor);
|
|
}
|
|
}
|
|
break;
|
|
case 0x91:
|
|
this->_isInitFlag176 = 1;
|
|
uVar4 = (GHIDRA_CAST<RNG *>((&this->_dropRNG)))->RNG::RandomInt(2);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::set_flip_x(uVar4 != 0);
|
|
break;
|
|
case 0x92:
|
|
this->_isInitFlag176 = 1;
|
|
uVar4 = (GHIDRA_CAST<RNG *>((&this->_dropRNG)))->RNG::RandomInt(2);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::set_flip_x(uVar4 != 0);
|
|
this->_lifespan = 0x1e;
|
|
this->_timeout = 0x1e;
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Appear"),0);
|
|
if (this->_subtype == 0) {
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
(GHIDRA_CAST<Room *>((pRVar8)))->Room::GetFloorColorAt(&local_2d8,&this->_pos,this->_size);
|
|
(GHIDRA_CAST<Color *>((&defaultColor)))->Color::Color(local_2d8._red * 2.0,local_2d8._green * 2.0,local_2d8._blue * 2.0,
|
|
1.0);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(color_02);
|
|
}
|
|
break;
|
|
case 0x97:
|
|
fVar16 = random_float();
|
|
iVar3 = this->_subtype;
|
|
this->_rotation = fVar16 * 30.0 + 5.0;
|
|
if (iVar3 == 0xb) {
|
|
fVar16 = random_float();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetRotation(fVar16 * 360.0);
|
|
this->_maxRadius = 100.0;
|
|
this->_scale = 1.0;
|
|
}
|
|
else if (iVar3 == 10) {
|
|
this->_maxRadius = 100.0;
|
|
(GHIDRA_CAST<msvc::string *>((sheetPath._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST<uint8_t *>("gfx/effects/shockwave.png"));
|
|
local_8 = 0x18;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&sheetPath);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((sheetPath._buf)))->msvc::string::_Tidy_deallocate();
|
|
this->_scale = 1.0;
|
|
}
|
|
else {
|
|
if (iVar3 == 0) {
|
|
fVar16 = random_float();
|
|
this->_maxRadius = fVar16 * 0.4 + 1.2;
|
|
}
|
|
else {
|
|
fVar16 = random_float();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetRotation(fVar16 * 360.0);
|
|
this->_maxRadius = 20.0;
|
|
if (this->_spawnerType == 0x3b7) {
|
|
fVar16 = random_float();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetRotation(fVar16 * 80.0 + 140.0);
|
|
this->_scale = 1.0;
|
|
break;
|
|
}
|
|
}
|
|
this->_scale = 1.0;
|
|
}
|
|
break;
|
|
case 0x98:
|
|
this->_visible = 0;
|
|
goto LAB_005d0f6b;
|
|
case 0x9b:
|
|
this->_sortingLayer = 0;
|
|
this->_renderZOffset = 2000;
|
|
this->_isInitFlag176 = 1;
|
|
this->_scale = 0.033;
|
|
break;
|
|
case 0x9d:
|
|
goto LAB_005d11e7;
|
|
case 0x9e:
|
|
ANM2::Play(&this->_sprite,s_Idle,0);
|
|
fVar16 = random_float();
|
|
fVar16 = normalize_angle_degrees(fVar16 * 360.0);
|
|
this->_rotation = fVar16;
|
|
local_2c0.y = fVar16 + 180.0;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_rotation = local_2c0.y;
|
|
this->_height = 0.0;
|
|
this->_isInitFlag176 = 1;
|
|
break;
|
|
case 0x9f:
|
|
(GHIDRA_CAST<Vector *>((&this->_targetPosition)))->Vector::operator_assign(&this->_pos);
|
|
fVar16 = random_float();
|
|
fVar16 = normalize_angle_degrees(fVar16 * 360.0);
|
|
this->_rotation = fVar16;
|
|
ANM2::Play(&this->_sprite,s_Idle,0);
|
|
fVar16 = (GHIDRA_CAST<RNG *>((&this->_dropRNG)))->RNG::RandomFloat();
|
|
local_2c0.y = fVar16 * 0.2 + 1.0;
|
|
vecResult = Vector::operator_mul(&scratchVec,&local_2c0.y,&g_vectorOne);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetScale(vecResult);
|
|
uVar4 = (GHIDRA_CAST<RNG *>((&this->_dropRNG)))->RNG::RandomInt(2);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::set_flip_x(uVar4 != 0);
|
|
local_2c0.y = (GHIDRA_CAST<RNG *>((&this->_dropRNG)))->RNG::RandomFloat();
|
|
set_PlaybackSpeed(&this->_sprite,local_2c0.y * 0.3 + 1.0);
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
uVar17 = (GHIDRA_CAST<Room *>((pRVar8)))->Room::GetBackdropType();
|
|
switch(uVar17) {
|
|
case 0x21:
|
|
case 0x26:
|
|
case 0x28:
|
|
case 0x29:
|
|
case 0x2a:
|
|
(GHIDRA_CAST<Color *>((&defaultColor)))->Color::Color(0.96,0.9,1.0,1.0);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(color_01);
|
|
}
|
|
spriteColor = GHIDRA_CAST<Font *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
fVar16 = (GHIDRA_CAST<RNG *>((&this->_dropRNG)))->RNG::RandomFloat();
|
|
local_2c0.y = fVar16 * 0.3 + 0.3;
|
|
Font::SetLineHeightModifier(spriteColor,local_2c0.y);
|
|
this->_isInitFlag176 = 1;
|
|
break;
|
|
case 0xa1:
|
|
iVar3 = this->_subtype;
|
|
if (iVar3 == 0) {
|
|
uVar19 = 0x3f000000;
|
|
uVar18 = 0x3fe66666;
|
|
uVar17 = 0x40133333;
|
|
LAB_005d10c7:
|
|
tmpColor = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Color *>((0x3f800000)))->Color)::Color(uVar17,uVar18,uVar19,0x3f800000,0,0,0);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(tmpColor);
|
|
}
|
|
else {
|
|
if (iVar3 == 1) {
|
|
uVar19 = 0x3ecccccd;
|
|
uVar18 = 0x3ecccccd;
|
|
uVar17 = 0x40000000;
|
|
goto LAB_005d10c7;
|
|
}
|
|
if (iVar3 == 2) {
|
|
uVar19 = 0x40000000;
|
|
uVar18 = 0x3f99999a;
|
|
uVar17 = 0x3f800000;
|
|
goto LAB_005d10c7;
|
|
}
|
|
if (iVar3 == 3) {
|
|
uVar19 = 0;
|
|
uVar18 = 0x3fe66666;
|
|
uVar17 = 0;
|
|
goto LAB_005d10c7;
|
|
}
|
|
}
|
|
this->_sortingLayer = 0;
|
|
this->_state = 0;
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Opened"),0);
|
|
animState = GHIDRA_CAST<AnimationState *>(Config)::GetPillEffects();
|
|
uVar4 = AnimationState::GetAnimationLength(animState);
|
|
uVar4 = (GHIDRA_CAST<RNG *>((&this->_dropRNG)))->RNG::RandomInt(uVar4);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetFrame_1(uVar4);
|
|
break;
|
|
case 0xa2:
|
|
goto LAB_005d1bff;
|
|
case 0xa4:
|
|
this->_renderDepthOffset = 80.0;
|
|
spriteColor = GHIDRA_CAST<Font *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
Font::SetLineHeightModifier(spriteColor,0.6);
|
|
goto LAB_005d0669;
|
|
case 0xa5:
|
|
(GHIDRA_CAST<BlendMode *>((&local_2d8)))->BlendMode::SetMode(2,0);
|
|
blendMode = &local_2d8;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
copy_20_bytes(layer->_blendMode,blendMode);
|
|
pEVar12 = effect;
|
|
if (this->_subtype == 1) {
|
|
this->_sortingLayer = 0;
|
|
}
|
|
else {
|
|
this->_renderDepthOffset = 4.0;
|
|
}
|
|
goto LAB_005d1317;
|
|
case 0xa6:
|
|
this->_renderZOffset = -0x80000000;
|
|
local_2c0.y = (float)operator_new(0x18);
|
|
local_8 = 0x19;
|
|
if (GHIDRA_CAST<Room *>(local_2c0.y) == GHIDRA_CAST<Room *>(0x0)) {
|
|
pvVar11 = (void *)0x0;
|
|
}
|
|
else {
|
|
pvVar11 = (void *)FUN_005d2270();
|
|
}
|
|
local_8 = 0xffffffff;
|
|
ExtraDataRef::Set(pvVar10,pvVar11);
|
|
this->_minRadius = 0.1;
|
|
goto LAB_005d0669;
|
|
case 0xa7:
|
|
SetTimeout(this,1);
|
|
this->_maxRadius = 130.0;
|
|
this->_minRadius = 130.0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x430)))) = 0x40600000;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x434)))) = 0x3f800000;
|
|
FUN_00435bc0(0,0);
|
|
*GHIDRA_CAST<uint32_t *>(&(this->_varData)._l) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_28)) + 0x4)));
|
|
*GHIDRA_CAST<float *>((GHIDRA_INT(&(this->_varData)._l) + 4)) = (float)local_20;
|
|
*GHIDRA_CAST<float *>(&(this->_varData)._h) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_20)) + 0x4)));
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT(&(this->_varData)._h) + 4)) = local_18;
|
|
goto LAB_005d11c7;
|
|
case 0xa8:
|
|
this->_sortingLayer = 0;
|
|
this->_renderZOffset = 2000;
|
|
goto LAB_005d11e7;
|
|
case 0xaa:
|
|
this->_sortingLayer = 0;
|
|
sprite = &this->_sprite;
|
|
ANM2::PlayOverlay(sprite,GHIDRA_CAST<uint8_t *>("Float"),0);
|
|
rng = &effect->_dropRNG;
|
|
animState = GHIDRA_CAST<AnimationState *>(FUN_0041e470());
|
|
uVar4 = AnimationState::GetAnimationLength(animState);
|
|
uVar4 = (GHIDRA_CAST<RNG *>((rng)))->RNG::RandomInt(uVar4);
|
|
ANM2::SetOverlayFrame(sprite,uVar4);
|
|
ANM2::SetFrame(sprite,GHIDRA_CAST<std_string *>(s_Idle),0);
|
|
animState = GHIDRA_CAST<AnimationState *>(Config)::GetPillEffects();
|
|
uVar4 = AnimationState::GetAnimationLength(animState);
|
|
uVar4 = (GHIDRA_CAST<RNG *>((rng)))->RNG::RandomInt(uVar4);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::SetFrame_1(uVar4);
|
|
uVar4 = (GHIDRA_CAST<RNG *>((rng)))->RNG::RandomInt(2);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::set_flip_x(uVar4 != 0);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(effect))))->Entity::AddEntityFlags(0x200000);
|
|
break;
|
|
case 0xab:
|
|
if (this->_subtype == 2) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Swirl"),0);
|
|
local_2c0.y = 3.0;
|
|
vecResult = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&scratchVec,&local_2c0.y);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetScale(vecResult);
|
|
fVar16 = random_float();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetRotation(fVar16 * 360.0);
|
|
spriteColor = GHIDRA_CAST<Font *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
pRVar8 = GHIDRA_CAST<Room *>(0x0);
|
|
LAB_005d130a:
|
|
goto LAB_005d130c;
|
|
}
|
|
if (this->_subtype == 1) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Trail"),0);
|
|
fVar16 = random_float();
|
|
local_2c0.y = fVar16 * 0.5 + 0.5;
|
|
fVar16 = random_float();
|
|
vecResult = (GHIDRA_CAST<Vector *>((&scratchVec)))->Vector::Vector(fVar16 + 1.0,local_2c0.y);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetScale(vecResult);
|
|
fVar16 = random_float();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetRotation(fVar16 * 360.0);
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x200000);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(&this->_sprite))))->Entity::AddFlagsLow(0x20);
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("IdleClosed"),0);
|
|
this->_timeout = 0x2d;
|
|
}
|
|
break;
|
|
case 0xac:
|
|
if (this->_subtype == 2) {
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Swirl"),0);
|
|
local_2c0.y = 0.7;
|
|
vecResult = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&scratchVec,&local_2c0.y);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetScale(vecResult);
|
|
fVar16 = random_float();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetRotation(fVar16 * 360.0);
|
|
spriteColor = GHIDRA_CAST<Font *>((GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite)::Color();
|
|
pRVar8 = GHIDRA_CAST<Room *>(0x3f800000);
|
|
goto LAB_005d130a;
|
|
}
|
|
if (this->_subtype != 1) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x200000);
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(&this->_sprite))))->Entity::AddFlagsLow(0x20);
|
|
(GHIDRA_CAST<BlendMode *>((&local_2d8)))->BlendMode::SetMode(2,0);
|
|
blendMode = &local_2d8;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x2));
|
|
copy_20_bytes(layer->_blendMode,blendMode);
|
|
ANM2::Play(&this->_sprite,s_Open,0);
|
|
this->_minRadius = 0.0;
|
|
break;
|
|
}
|
|
ANM2::SetFrame(&this->_sprite,GHIDRA_CAST<std_string *>(&DAT_00b635b8),0);
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_visible = 0;
|
|
(GHIDRA_CAST<BlendMode *>((&local_2d8)))->BlendMode::SetMode(2,0);
|
|
blendMode = &local_2d8;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
copy_20_bytes(layer->_blendMode,blendMode);
|
|
(GHIDRA_CAST<BlendMode *>((local_28)))->BlendMode::SetMode(2,0);
|
|
blendMode = GHIDRA_CAST<KColor *>(local_28);
|
|
pbVar2 = GHIDRA_CAST<uint8_t *>(0x1);
|
|
goto LAB_005d0681;
|
|
case 0xad:
|
|
case 0xc9:
|
|
this->_renderDepthOffset = 10.0;
|
|
break;
|
|
case 0xae:
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x200000);
|
|
ANM2::Play(&this->_sprite,s_Idle,0);
|
|
game = g_game;
|
|
this->_renderDepthOffset = -100.0;
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(game))))->Level)::GetCurrentRoom();
|
|
iVar3 = (GHIDRA_CAST<Room *>((pRVar8)))->Room::GetFrameCount();
|
|
if (1 < iVar3) {
|
|
isReplaced = '\0';
|
|
(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
entityList = GHIDRA_CAST<EntityList *>(FUN_00428a60());
|
|
EntityList::QuerySublist(entityList,GHIDRA_CAST<EntityList_EL *>(auStack_2f0),1000,0xae,-1,0,0);
|
|
local_8 = 0x1a;
|
|
tmpEntity = GHIDRA_CAST<Entity_Familiar *>(0x0);
|
|
local_2b4 = GHIDRA_CAST<Entity_Familiar *>(0x0);
|
|
iVar3 = (GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(auStack_2f0))))->EntityList::Size();
|
|
if (iVar3 == 0) {
|
|
LAB_005d1763:
|
|
(GHIDRA_CAST<RNG *>((GHIDRA_CAST<RNG *>((local_28 + 4)))))->RNG::game_constructor(this->_initSeed,0x12);
|
|
local_8 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),0x1b);
|
|
uVar4 = (GHIDRA_CAST<RNG *>((seedRng)))->RNG::Next();
|
|
tmpEntity = (GHIDRA_CAST<Game *>((g_game)))->Game::Spawn(1000,7,&this->_pos,&g_vectorZero,GHIDRA_CAST<Entity *>(0x0),0,uVar4);
|
|
tmpEntity->Update();
|
|
guard_check_icall();
|
|
}
|
|
else {
|
|
do {
|
|
piVar15 = GHIDRA_CAST<int *>(std)::vector<int>::operator_index(tmpEntity);
|
|
if (*GHIDRA_CAST<int *>((*piVar15 + 0x450)) != 0) {
|
|
local_2c0.y = (float)(GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level::GetCurrentRoom();
|
|
listEntry = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index(tmpEntity);
|
|
vecResult = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(*listEntry))))->Entity::Position(&scratchVec);
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
iVar3 = (GHIDRA_CAST<Room *>((pRVar8)))->Room::GetGridIndex(&effect->_pos);
|
|
iVar5 = (GHIDRA_CAST<Room *>((GHIDRA_CAST<Room *>(local_2c0.y))))->Room::GetGridIndex(vecResult);
|
|
tmpEntity = local_2b4;
|
|
if (iVar5 == iVar3) {
|
|
listEntry = GHIDRA_CAST<uint32_t *>(std)::vector<int>::operator_index(local_2b4);
|
|
(**(code **)(*GHIDRA_CAST<int *>(*listEntry) + 0x28))();
|
|
isReplaced = '\x01';
|
|
}
|
|
}
|
|
tmpEntity = GHIDRA_CAST<Entity_Familiar *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((tmpEntity)) + 0x1))));
|
|
local_2b4 = tmpEntity;
|
|
puVar14 = GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<EntityList *>((GHIDRA_CAST<EntityList *>(auStack_2f0))))->EntityList)::Size();
|
|
} while (tmpEntity < puVar14);
|
|
if (isReplaced == '\0') {
|
|
this = effect;
|
|
goto LAB_005d1763;
|
|
}
|
|
}
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<EntityList_Query *>((auStack_2f0)))->EntityList_Query::~EntityList_Query();
|
|
}
|
|
break;
|
|
case 0xb2:
|
|
this->_timeout = -1;
|
|
this->_scale = 0.0;
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x2000200000);
|
|
break;
|
|
case 0xb3:
|
|
(GHIDRA_CAST<BlendMode *>((&local_2d8)))->BlendMode::SetMode(2,0);
|
|
blendMode = &local_2d8;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
copy_20_bytes(layer->_blendMode,blendMode);
|
|
pEVar12 = effect;
|
|
fVar16 = (GHIDRA_CAST<RNG *>((&effect->_dropRNG)))->RNG::RandomFloat();
|
|
local_2c0.y = fVar16 * 0.3 + 0.9;
|
|
vecResult = (GHIDRA_CAST<Vector *>((&g_vectorOne)))->Vector::__mul(&scratchVec,&local_2c0.y);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetScale(vecResult);
|
|
fVar16 = (GHIDRA_CAST<RNG *>((&pEVar12->_dropRNG)))->RNG::RandomFloat();
|
|
pEVar12->_scale = fVar16 * 0.08 + 0.06;
|
|
goto LAB_005d1317;
|
|
case 0xb4:
|
|
this->_renderDepthOffset = -100.0;
|
|
break;
|
|
case 0xb5:
|
|
this->_renderZOffset = 1000;
|
|
LAB_005d0669:
|
|
(GHIDRA_CAST<BlendMode *>((&local_2d8)))->BlendMode::SetMode(2,0);
|
|
blendMode = &local_2d8;
|
|
pbVar2 = GHIDRA_CAST<uint8_t *>(0x0);
|
|
LAB_005d0681:
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(pbVar2);
|
|
copy_20_bytes(layer->_blendMode,blendMode);
|
|
break;
|
|
case 0xb9:
|
|
(GHIDRA_CAST<BlendMode *>((local_b4._buf + 4)))->BlendMode::SetMode(2,0);
|
|
pvVar10 = extraout_EAX_10;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
copy_20_bytes(layer->_blendMode,pvVar10);
|
|
this->_renderDepthOffset = -10.0;
|
|
ANM2::Play(&this->_sprite,s_Idle,0);
|
|
break;
|
|
case 0xba:
|
|
if (this->_subtype == 1) {
|
|
(GHIDRA_CAST<msvc::string *>((sheetPath._buf)))->msvc::string::string_from_cstr(GHIDRA_CAST<uint8_t *>("gfx/Effects/spookier_ghost_white.png"));
|
|
local_8 = 0x1c;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(0,&sheetPath);
|
|
local_8 = 0xffffffff;
|
|
(GHIDRA_CAST<msvc::string *>((sheetPath._buf)))->msvc::string::_Tidy_deallocate();
|
|
}
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Appear"),0);
|
|
break;
|
|
case 0xbc:
|
|
this->_visible = 0;
|
|
this->_state = 0;
|
|
break;
|
|
case 0xbd:
|
|
if (this->_subtype != 0) goto LAB_005d11e7;
|
|
(GHIDRA_CAST<RNG *>((GHIDRA_CAST<RNG *>((local_28 + 4)))))->RNG::game_constructor(this->_initSeed,8);
|
|
local_8 = 0x1d;
|
|
uVar4 = (GHIDRA_CAST<RNG *>((GHIDRA_CAST<RNG *>((local_28 + 4)))))->RNG::RandomInt(4);
|
|
uVar13 = (GHIDRA_CAST<RNG *>((GHIDRA_CAST<RNG *>((local_28 + 4)))))->RNG::RandomInt(2);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::set_flip_x(uVar13 != 0);
|
|
sprite = &this->_sprite;
|
|
local_2b8 = GHIDRA_CAST<LayerState *>(((float)GHIDRA_INT(uVar4) * 64.0));
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
(layer->_cropOffset).y = (float)local_2b8;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
(layer->_cropOffset).y = (float)local_2b8;
|
|
pvVar10 = (void *)FUN_00a11590(0,2,0);
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
copy_20_bytes(layer->_blendMode,pvVar10);
|
|
ANM2::Play(sprite,GHIDRA_CAST<uint8_t *>("Appear"),0);
|
|
local_8 = 0xffffffff;
|
|
effect->_sortingLayer = 0;
|
|
guard_check_icall();
|
|
break;
|
|
case 0xbe:
|
|
case 0xc6:
|
|
(GHIDRA_CAST<BlendMode *>((&local_2d8)))->BlendMode::SetMode(2,0);
|
|
blendMode = &local_2d8;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
copy_20_bytes(layer->_blendMode,blendMode);
|
|
(GHIDRA_CAST<BlendMode *>((local_28)))->BlendMode::SetMode(2,0);
|
|
puVar14 = local_28;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
copy_20_bytes(layer->_blendMode,puVar14);
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_visible = 0;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_visible = 0;
|
|
vecResult = (GHIDRA_CAST<Vector *>((&scratchVec)))->Vector::Vector(0.0,-20.0);
|
|
(GHIDRA_CAST<Vector *>((&this->_posOffset)))->Vector::operator_assign(vecResult);
|
|
break;
|
|
case 0xbf:
|
|
local_2c0.y = (float)operator_new(0x458);
|
|
local_8 = 0x1e;
|
|
if (GHIDRA_CAST<Room *>(local_2c0.y) == GHIDRA_CAST<Room *>(0x0)) {
|
|
pvVar11 = (void *)0x0;
|
|
}
|
|
else {
|
|
pvVar11 = (void *)FUN_005d2300();
|
|
}
|
|
local_8 = 0xffffffff;
|
|
ExtraDataRef::Set(pvVar10,pvVar11);
|
|
pRVar8 = GHIDRA_CAST<Room *>((GHIDRA_CAST<Level *>((GHIDRA_CAST<Level *>(g_game))))->Level)::GetCurrentRoom();
|
|
bVar1 = (GHIDRA_CAST<Room *>((pRVar8)))->Room::is_type_16();
|
|
pEVar12 = effect;
|
|
if (bVar1 == 0) {
|
|
this->_renderDepthOffset = 10.0;
|
|
}
|
|
else {
|
|
this->_renderZOffset = 10000;
|
|
}
|
|
goto LAB_005d1317;
|
|
case 0xc1:
|
|
this->_state = 0;
|
|
ANM2::Play(&this->_sprite,s_Idle,0);
|
|
if (this->_subtype == 0) {
|
|
this->_visible = 0;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_visible = 0;
|
|
}
|
|
else {
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_visible = 0;
|
|
}
|
|
break;
|
|
case 0xc2:
|
|
this->_state = 0;
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Shadow"),0);
|
|
goto LAB_005d1bff;
|
|
case 0xc5:
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Flying"),0);
|
|
break;
|
|
case 199:
|
|
ANM2::Play(&this->_sprite,&DAT_00b602e8,0);
|
|
break;
|
|
case 200:
|
|
LAB_005d049c:
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(&this->_sprite))))->Entity::AddFlagsLow(0x20);
|
|
}
|
|
LAB_005d1311:
|
|
pEVar12 = effect;
|
|
LAB_005d1317:
|
|
sprite = &pEVar12->_sprite;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::LoadGraphics();
|
|
iVar3 = effect->_variant;
|
|
if ((iVar3 == 0xbe) || (iVar3 == 0xc6)) {
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_minFilterMode = 1;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_magFilterMode = 1;
|
|
iVar3 = effect->_variant;
|
|
}
|
|
if (iVar3 == 0x3b) {
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_minFilterMode = 1;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_magFilterMode = 1;
|
|
iVar3 = effect->_variant;
|
|
}
|
|
if ((iVar3 == 0x1e) || (iVar3 == 0x99)) {
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(effect->_varData)._l) + 4)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(effect->_varData)._h) = 0;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_wrapSMode = 0;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_wrapTMode = 1;
|
|
if (effect->_variant == 0x99) {
|
|
colorTarget = &defaultColor;
|
|
}
|
|
else {
|
|
colorTarget = &scratchColor;
|
|
}
|
|
(GHIDRA_CAST<Color *>((colorTarget)))->Color::Color();
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::SetColor(color_03);
|
|
iVar3 = effect->_variant;
|
|
}
|
|
if (iVar3 == 0xa0) {
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_wrapSMode = 1;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_wrapTMode = 0;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_visible = 0;
|
|
effect->_renderDepthOffset = 4.0;
|
|
pEVar12 = effect;
|
|
}
|
|
else if (iVar3 == 0xaf) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(effect))))->Entity::AddEntityFlags(0x200000);
|
|
ANM2::Play(sprite,s_Idle,0);
|
|
(GHIDRA_CAST<BlendMode *>((&local_2d8)))->BlendMode::SetMode(2,0);
|
|
blendMode = &local_2d8;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
copy_20_bytes(layer->_blendMode,blendMode);
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_visible = 0;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_wrapSMode = 1;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_wrapTMode = 0;
|
|
(GHIDRA_CAST<BlendMode *>((local_28)))->BlendMode::SetMode(2,0);
|
|
puVar14 = local_28;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
copy_20_bytes(layer->_blendMode,puVar14);
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_visible = 0;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_wrapSMode = 1;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_wrapTMode = 0;
|
|
(GHIDRA_CAST<BlendMode *>((local_2f4)))->BlendMode::SetMode(2,0);
|
|
puVar14 = local_2f4;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x2));
|
|
copy_20_bytes(layer->_blendMode,puVar14);
|
|
pEVar12 = effect;
|
|
setColorFn = *(code **)(*GHIDRA_CAST<int *>(effect) + 0x3c);
|
|
(GHIDRA_CAST<Color *>((&workColor)))->Color::Color(0.5,0.0,1.0,1.0);
|
|
(*setColorFn)(extraout_EAX_11,0xffffffff,0xff,0,1);
|
|
}
|
|
else {
|
|
if (iVar3 == 0xc1) {
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_wrapSMode = 1;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_wrapTMode = 0;
|
|
}
|
|
else if (iVar3 == 0xc4) {
|
|
effect->_sortingLayer = 0;
|
|
(GHIDRA_CAST<BlendMode *>((local_31c)))->BlendMode::SetMode(2,0);
|
|
puVar14 = local_31c;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
copy_20_bytes(layer->_blendMode,puVar14);
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_minFilterMode = 1;
|
|
layer = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(sprite))))->Sprite::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
|
layer->_magFilterMode = 1;
|
|
}
|
|
pEVar12 = effect;
|
|
}
|
|
(GHIDRA_CAST<Game *>((g_game)))->Game::GetField26614();
|
|
isDeathmatch = DeathmatchManager::is_active();
|
|
if (isDeathmatch != '\0') {
|
|
entityList = GHIDRA_CAST<EntityList *>((GHIDRA_CAST<Game *>((g_game)))->Game)::GetField26614();
|
|
piVar15 = GHIDRA_CAST<int *>((GHIDRA_CAST<EntityList *>((entityList)))->EntityList)::Size();
|
|
(**(code **)(*piVar15 + 0x44))(pEVar12);
|
|
}
|
|
FUN_00861330(pEVar12);
|
|
ExceptionList = local_10;
|
|
return;
|
|
LAB_005d1bff:
|
|
this->_sortingLayer = 0;
|
|
goto LAB_005d1311;
|
|
LAB_005d11e7:
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Appear"),0);
|
|
goto LAB_005d1311;
|
|
LAB_005d0f6b:
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::AddEntityFlags(0x200000);
|
|
goto LAB_005d1311;
|
|
LAB_005d11c7:
|
|
this->_visible = 0;
|
|
goto LAB_005d1311;
|
|
}
|
|
|
|
// 005d2420
|
|
void Entity_Effect::Remove()
|
|
{
|
|
uint32_t *ptr;
|
|
uint32_t i;
|
|
Entity *entity;
|
|
uint32_t entityCount;
|
|
bool isLoopSoundShared;
|
|
bool isSecondLoopSoundShared;
|
|
|
|
isLoopSoundShared = false;
|
|
isSecondLoopSoundShared = false;
|
|
i = 0;
|
|
entityCount = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(g_game->_room) + 0x1264));
|
|
if (entityCount != 0) {
|
|
isSecondLoopSoundShared = false;
|
|
do {
|
|
entity = *GHIDRA_CAST<Entity **>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + 0x125c)) + i * 4));
|
|
if ((entity->_type == 1000) && (GHIDRA_CAST<Entity_Effect *>(entity) != this)) {
|
|
if (entity->_variant == 0x3c) {
|
|
isLoopSoundShared = true;
|
|
}
|
|
else if (entity->_variant == 0xa1) {
|
|
isSecondLoopSoundShared = true;
|
|
}
|
|
}
|
|
i = i + 1;
|
|
} while (i < entityCount);
|
|
if (isLoopSoundShared) goto LAB_005d24ab;
|
|
}
|
|
(GHIDRA_CAST<SFXManager *>((&g_manager->_sfxManager)))->SFXManager::Stop(0x345);
|
|
LAB_005d24ab:
|
|
if (!isSecondLoopSoundShared) {
|
|
(GHIDRA_CAST<SFXManager *>((&g_manager->_sfxManager)))->SFXManager::Stop(0x34e);
|
|
}
|
|
this->_exists = 0;
|
|
if (this->_dead == 0) {
|
|
this->_dead = 1;
|
|
}
|
|
Entity::ReleaseLuaRef(GHIDRA_CAST<Entity *>(this));
|
|
ptr = this->_luaBridgeRef;
|
|
if (ptr != GHIDRA_CAST<uint32_t *>(0x0)) {
|
|
luaL_unref(*ptr,0xfff0b9d8,ptr[1]);
|
|
operator_delete(ptr,8);
|
|
this->_luaBridgeRef = (void *)0x0;
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 005d2520
|
|
void Entity_Effect::Interpolate()
|
|
{
|
|
Entity *this_00;
|
|
uint8_t isEnemy;
|
|
LayerState *layer;
|
|
float fVar1;
|
|
float fVar2;
|
|
Vector scratchVec;
|
|
int linkedEntity;
|
|
|
|
if (this->_pauseTimer == 0) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::Interpolate();
|
|
if ((this->_isFollowing != 0) && (linkedEntity = this->_parent, linkedEntity != 0)) {
|
|
fVar1 = *GHIDRA_CAST<float *>((linkedEntity + 0x340));
|
|
fVar2 = (this->_parentOffset).y;
|
|
(this->_pos).x = *GHIDRA_CAST<float *>((linkedEntity + 0x33c)) + (this->_parentOffset).x;
|
|
(this->_pos).y = fVar1 + fVar2;
|
|
(this->_posOffset).x = *GHIDRA_CAST<float *>((linkedEntity + 0x34c));
|
|
(this->_posOffset).y = *GHIDRA_CAST<float *>((linkedEntity + 0x350));
|
|
}
|
|
switch(this->_variant) {
|
|
case 4:
|
|
case 5:
|
|
case 0x1b:
|
|
case 0x23:
|
|
case 0x3a:
|
|
case 0x55:
|
|
case 0x56:
|
|
case 0x5f:
|
|
case 0x62:
|
|
case 0xa3:
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + 8)) != 0x10) {
|
|
LAB_005d2702:
|
|
(this->_posOffset).y =
|
|
this->_fallingSpeed * this->_speedMultiplier * 0.5 + (this->_posOffset).y;
|
|
return;
|
|
}
|
|
break;
|
|
case 0x1e:
|
|
case 0x99:
|
|
if (this->_subtype == 0) {
|
|
Room::GetClampedPositionImpl(g_game->_room,&scratchVec,&this->_pos,0.0,0.0,0.0,0.0);
|
|
(this->_pos).x = scratchVec.x;
|
|
(this->_pos).y = scratchVec.y;
|
|
}
|
|
this_00 = GHIDRA_CAST<Entity *>(this->_spawnerEntity);
|
|
if ((this_00 != GHIDRA_CAST<Entity *>(0x0)) &&
|
|
(((this_00->_type == 1 || (isEnemy = (GHIDRA_CAST<Entity *>((this_00)))->Entity::IsEnemy(), isEnemy != 0)) &&
|
|
(this->_lifespan == 0)))) {
|
|
scratchVec.x = (this_00->_pos).x - (this->_pos).x;
|
|
fVar1 = (this_00->_pos).y - (this->_pos).y;
|
|
fVar2 = atan2f(fVar1,scratchVec.x);
|
|
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_rotation = fVar2 * 57.295776;
|
|
fVar1 = sqrtf(fVar1 * fVar1 + scratchVec.x * scratchVec.x);
|
|
this->_scale = fVar1;
|
|
return;
|
|
}
|
|
break;
|
|
case 0x1f:
|
|
(this->_posOffset).y = (float)-this->_timeout * 100.0 - 50.0;
|
|
return;
|
|
case 0x51:
|
|
(this->_posOffset).y = this->_fallingSpeed * 0.5 * this->_speedMultiplier + this->_height;
|
|
return;
|
|
case 0x76:
|
|
if (0 < this->_state) goto LAB_005d2702;
|
|
break;
|
|
case 0x7b:
|
|
linkedEntity = this->_parent;
|
|
if ((linkedEntity != 0) && ((this->_subtype == 4 || (this->_subtype == 7)))) {
|
|
fVar1 = *GHIDRA_CAST<float *>((linkedEntity + 0x340));
|
|
(this->_pos).x = *GHIDRA_CAST<float *>((linkedEntity + 0x33c));
|
|
(this->_pos).y = fVar1;
|
|
fVar1 = *GHIDRA_CAST<float *>((linkedEntity + 0x364));
|
|
(this->_velocity).x = *GHIDRA_CAST<float *>((linkedEntity + 0x360));
|
|
(this->_velocity).y = fVar1;
|
|
(this->_posOffset).x = *GHIDRA_CAST<float *>((linkedEntity + 0x34c));
|
|
(this->_posOffset).y = *GHIDRA_CAST<float *>((linkedEntity + 0x350));
|
|
return;
|
|
}
|
|
break;
|
|
case 0xaf:
|
|
linkedEntity = this->_target;
|
|
if (linkedEntity != 0) {
|
|
fVar1 = *GHIDRA_CAST<float *>((linkedEntity + 0x340));
|
|
(this->_pos).x = *GHIDRA_CAST<float *>((linkedEntity + 0x33c));
|
|
(this->_pos).y = fVar1;
|
|
}
|
|
(this->_velocity).x = g_vectorZero.x;
|
|
(this->_velocity).y = g_vectorZero.y;
|
|
return;
|
|
case 0xb2:
|
|
update_variant178_shooter(this,1);
|
|
return;
|
|
case 0xb9:
|
|
linkedEntity = this->_parent;
|
|
if (linkedEntity != 0) {
|
|
fVar1 = *GHIDRA_CAST<float *>((linkedEntity + 0x340));
|
|
(this->_pos).x = *GHIDRA_CAST<float *>((linkedEntity + 0x33c));
|
|
(this->_pos).y = fVar1;
|
|
fVar1 = *GHIDRA_CAST<float *>((linkedEntity + 0x364));
|
|
(this->_velocity).x = *GHIDRA_CAST<float *>((linkedEntity + 0x360));
|
|
(this->_velocity).y = fVar1;
|
|
(this->_posOffset).x = *GHIDRA_CAST<float *>((linkedEntity + 0x34c));
|
|
(this->_posOffset).y = *GHIDRA_CAST<float *>((linkedEntity + 0x350));
|
|
(this->_sprite)._scale.x = *GHIDRA_CAST<float *>((linkedEntity + 0xe4));
|
|
(this->_sprite)._scale.y = *GHIDRA_CAST<float *>((linkedEntity + 0xe8));
|
|
}
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 005d2a70
|
|
void Entity_Effect::update_mr_me()
|
|
{
|
|
Vector *pos;
|
|
uint32_t savedParentX;
|
|
uint32_t savedParentY;
|
|
uint8_t curChar;
|
|
GridEntity *gridEntity;
|
|
Game *game;
|
|
Manager *manager;
|
|
char cVar7;
|
|
int mrMeData;
|
|
Entity_Player *pEVar9;
|
|
int *targetEffect;
|
|
GridEntity_Door *door;
|
|
int iVar12;
|
|
float *vecResult;
|
|
int iVar14;
|
|
uint8_t *animNameCursor;
|
|
uint32_t uVar16;
|
|
ItemConfig_Item *itemConfig;
|
|
uint32_t *gridPos;
|
|
Entity_Pickup *pickup;
|
|
ColorMod *explosionColor;
|
|
void *pvVar20;
|
|
int extraout_ECX;
|
|
char *literalCursor;
|
|
float *extraout_ECX_00;
|
|
EntityPtr EVar22;
|
|
bool isLess;
|
|
float fVar24;
|
|
float fVar25;
|
|
float fVar26;
|
|
float fVar27;
|
|
float fVar28;
|
|
uint8_t pickupSpriteCopy [220];
|
|
float fStack_cc;
|
|
float bestDistSq;
|
|
float local_74;
|
|
float local_70;
|
|
float local_60;
|
|
EntityPtr local_5c;
|
|
float moveY;
|
|
float moveX;
|
|
float local_50;
|
|
float local_48;
|
|
float local_44;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t uStack_8;
|
|
|
|
uStack_8 = 0xffffffff;
|
|
puStack_c = &LAB_00af6230;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
mrMeData = __RTDynamicCast();
|
|
if (mrMeData == 0) {
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
iVar14 = this->_state;
|
|
moveX = g_vectorZero.x;
|
|
moveY = g_vectorZero.y;
|
|
if (iVar14 == 0) {
|
|
if (this->_parent == (EntityPtr)0x0) goto LAB_005d3f7c;
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Float"),0);
|
|
fVar26 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this->_parent) + 0x340)) - (this->_pos).y;
|
|
fVar24 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this->_parent) + 0x33c)) - (this->_pos).x;
|
|
bestDistSq = 0.0;
|
|
fVar28 = fVar26 * fVar26 + fVar24 * fVar24;
|
|
if (fVar28 <= 4900.0) {
|
|
(this->_velocity).x = (this->_velocity).x * 0.9;
|
|
(this->_velocity).y = (this->_velocity).y * 0.9;
|
|
}
|
|
else {
|
|
sqrtf();
|
|
if (fVar28 <= 0.0) {
|
|
moveY = fVar26;
|
|
moveX = fVar24;
|
|
}
|
|
else {
|
|
moveY = (6.0 / fVar28) * fVar26;
|
|
moveX = fVar24 * (6.0 / fVar28);
|
|
}
|
|
}
|
|
if (((this->_target != (EntityPtr)0x0) && (this->_parent != (EntityPtr)0x0)) &&
|
|
(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this->_parent) + 0x28)) == 1)) {
|
|
pEVar9 = GHIDRA_CAST<Entity_Player *>(__RTDynamicCast());
|
|
targetEffect = GHIDRA_CAST<int *>(__RTDynamicCast());
|
|
pvVar20 = pEVar9->_markedTarget;
|
|
if (pvVar20 == (void *)0x0) {
|
|
fVar24 = (pEVar9->_aimDirection).y * 20.0;
|
|
fVar28 = (pEVar9->_aimDirection).x * 20.0;
|
|
}
|
|
else {
|
|
fVar24 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar20) + 0x340)) - (float)targetEffect[0xd0];
|
|
fVar28 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar20) + 0x33c)) - (float)targetEffect[0xcf];
|
|
targetEffect[0xd5] = 100;
|
|
}
|
|
targetEffect[0xd8] = GHIDRA_INT(fVar28);
|
|
targetEffect[0xd9] = GHIDRA_INT(fVar24);
|
|
(**(code **)(*targetEffect + 0x3c))();
|
|
fVar24 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this->_target) + 0x340));
|
|
(this->_targetPosition).x = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this->_target) + 0x33c));
|
|
(this->_targetPosition).y = fVar24;
|
|
if ((*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(this->_target) + 0x172)) != '\0') &&
|
|
(*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(this->_target) + 0x173)) == '\0')) {
|
|
*GHIDRA_CAST<int *>((mrMeData + 0x124)) = *GHIDRA_CAST<int *>((mrMeData + 0x124)) + 1;
|
|
goto LAB_005d3f7c;
|
|
}
|
|
Entity_Player::AnimateCollectible(pEVar9);
|
|
pEVar9->Update();
|
|
game = g_game;
|
|
local_44 = -NAN;
|
|
fVar26 = 0.0;
|
|
local_48 = 0.0;
|
|
*GHIDRA_CAST<uint32_t *>((mrMeData + 4)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((mrMeData + 0x120)) = 0xffffffff;
|
|
fVar28 = g_vectorZero.y;
|
|
fVar24 = g_vectorZero.x;
|
|
*GHIDRA_CAST<uint8_t *>((mrMeData + 0x128)) = 0;
|
|
pvVar20 = game->_room;
|
|
local_50 = fVar24;
|
|
local_74 = fVar28;
|
|
local_5c = (EntityPtr)0x0;
|
|
if (0 < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0x10)) * *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0xc))) {
|
|
local_70 = 5.04467e-44;
|
|
do {
|
|
if (GHIDRA_UINT(local_5c) < 0x1c0) {
|
|
iVar14 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + GHIDRA_INT(local_70)));
|
|
if (iVar14 == 0) goto LAB_005d2e6b;
|
|
uVar16 = *GHIDRA_CAST<uint32_t *>((iVar14 + 0xc));
|
|
fVar26 = local_48;
|
|
if (uVar16 == 2) goto LAB_005d2e6b;
|
|
iVar12 = *GHIDRA_CAST<int *>((iVar14 + 4));
|
|
if (((iVar12 != 4) && (iVar12 != 0x16)) && ((iVar12 != 6 && (iVar12 != 0x1a)))) {
|
|
if (iVar12 == 0xc) {
|
|
if (uVar16 < 4) goto LAB_005d314d;
|
|
}
|
|
else if (iVar12 == 0x10) {
|
|
if (*GHIDRA_CAST<int *>(&g_game->_deathmatchManager) < 2) {
|
|
if (g_game->_currentRoomIdx != -0x14) {
|
|
door = GHIDRA_CAST<GridEntity_Door *>(__RTDynamicCast());
|
|
fVar24 = local_50;
|
|
fVar28 = local_74;
|
|
if ((((door->_doorFlags & 0x50U) == 0) &&
|
|
((((door->_doorFlags & 0x20U) == 0 || ((door->_desc)._variant != 4))
|
|
&& (iVar12 = (GHIDRA_CAST<GridEntity_Door *>((door)))->GridEntity_Door::get_secret_exit_kind(), iVar12 != 4)))
|
|
) && ((door->_desc)._state != 2)) {
|
|
iVar14 = *GHIDRA_CAST<int *>((iVar14 + 0x24));
|
|
local_48 = 2.8026e-45;
|
|
iVar12 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + 0xc));
|
|
vecResult = GHIDRA_CAST<float *>(Isaac)::GetAxisAlignedUnitVectorFromDir();
|
|
local_44 = (float)local_5c;
|
|
local_50 = ((float)(iVar14 % iVar12) * 40.0 + 40.0) - *vecResult * 20.0;
|
|
local_74 = ((float)(iVar14 / iVar12) * 40.0 + 120.0) - vecResult[1] * 20.0;
|
|
fVar24 = local_50;
|
|
fVar28 = local_74;
|
|
if (((door->_currentRoomType == 7) || (door->_targetRoomType == 7)) ||
|
|
((door->_currentRoomType == 8 ||
|
|
(fVar26 = local_48, door->_targetRoomType == 8)))) {
|
|
local_48 = 1.4013e-45;
|
|
fVar26 = (float)1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if (iVar12 == 0x14) {
|
|
if (uVar16 == 0) {
|
|
local_48 = 5.60519e-45;
|
|
fVar26 = 5.60519e-45;
|
|
fVar24 = (float)(*GHIDRA_CAST<int *>((iVar14 + 0x24)) % *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0xc))) * 40.0 +
|
|
40.0;
|
|
fVar28 = (float)(*GHIDRA_CAST<int *>((iVar14 + 0x24)) / *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0xc))) * 40.0 +
|
|
120.0;
|
|
local_74 = fVar28;
|
|
local_50 = fVar24;
|
|
local_44 = (float)local_5c;
|
|
goto LAB_005d2e6e;
|
|
}
|
|
}
|
|
goto LAB_005d2e6b;
|
|
}
|
|
LAB_005d314d:
|
|
fVar26 = 1.4013e-45;
|
|
local_48 = 1.4013e-45;
|
|
fVar24 = (float)(*GHIDRA_CAST<int *>((iVar14 + 0x24)) % *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0xc))) * 40.0 + 40.0;
|
|
fVar28 = (float)(*GHIDRA_CAST<int *>((iVar14 + 0x24)) / *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0xc))) * 40.0 + 120.0;
|
|
local_74 = fVar28;
|
|
local_50 = fVar24;
|
|
local_44 = (float)local_5c;
|
|
}
|
|
else {
|
|
LAB_005d2e6b:
|
|
}
|
|
LAB_005d2e6e:
|
|
EVar22 = this->_target;
|
|
if ((EVar22 != (EntityPtr)0x0) &&
|
|
((fVar25 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x33c)) - fVar24,
|
|
fVar27 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x340)) - fVar28,
|
|
fVar25 = fVar27 * fVar27 + fVar25 * fVar25, *GHIDRA_CAST<int *>((mrMeData + 4)) == 0 ||
|
|
(fVar25 < bestDistSq)))) {
|
|
*GHIDRA_CAST<float *>((mrMeData + 4)) = fVar26;
|
|
(this->_targetPosition).x = fVar24;
|
|
(this->_targetPosition).y = fVar28;
|
|
*GHIDRA_CAST<float *>((mrMeData + 0x120)) = local_44;
|
|
bestDistSq = fVar25;
|
|
}
|
|
local_5c = (EntityPtr)(GHIDRA_INT(local_5c) + 1);
|
|
local_70 = (float)(GHIDRA_INT(local_70) + 4);
|
|
pvVar20 = g_game->_room;
|
|
} while (GHIDRA_INT(local_5c) < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0x10)) * *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0xc)));
|
|
}
|
|
local_50 = 0.0;
|
|
pvVar20 = g_game->_room;
|
|
local_44 = g_vectorZero.x;
|
|
local_48 = g_vectorZero.y;
|
|
local_5c = (EntityPtr)0x0;
|
|
local_60 = 0.0;
|
|
fVar24 = g_vectorZero.x;
|
|
fVar28 = g_vectorZero.y;
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0x1264)) != 0) {
|
|
do {
|
|
EVar22 = *GHIDRA_CAST<EntityPtr *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0x125c)) + GHIDRA_INT(local_60) * 4));
|
|
iVar14 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x28));
|
|
if (iVar14 == 0x21) {
|
|
if ((*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x380)) <= 1.0) || (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(EVar22) + 0x2c)) < 2))
|
|
goto LAB_005d31b7;
|
|
LAB_005d2f78:
|
|
fVar24 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x33c));
|
|
fVar28 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x340));
|
|
local_50 = 1.4013e-45;
|
|
local_5c = EVar22;
|
|
local_48 = fVar28;
|
|
local_44 = fVar24;
|
|
}
|
|
else {
|
|
if ((iVar14 == 0x11) || ((iVar14 == 0x124 && (1.0 < *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x380))))))
|
|
goto LAB_005d2f78;
|
|
LAB_005d31b7:
|
|
if ((*GHIDRA_CAST<int *>(&g_game->_deathmatchManager) < 2) || (iVar14 != 1)) {
|
|
if (iVar14 - 10U < 0x3de) goto LAB_005d31d8;
|
|
LAB_005d3260:
|
|
if (((*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(EVar22) + 0x172)) == '\0') || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x28)) != 5))
|
|
|| (*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(EVar22) + 0x171)) == '\0')) {
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x28)) == 6) {
|
|
if ((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x7c)) != 0) && (*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(EVar22) + 0x8c)) != '\0')
|
|
) {
|
|
animNameCursor = *GHIDRA_CAST<uint8_t **>((GHIDRA_CAST<char *>(EVar22) + 0x7c));
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((animNameCursor + 0x14))) {
|
|
animNameCursor = *GHIDRA_CAST<uint8_t **>(animNameCursor);
|
|
}
|
|
literalCursor = "Broken";
|
|
do {
|
|
curChar = *animNameCursor;
|
|
isLess = curChar < (uint8_t)*literalCursor;
|
|
if (curChar != *literalCursor) {
|
|
LAB_005d3386:
|
|
uVar16 = -GHIDRA_UINT(isLess) | 1;
|
|
goto LAB_005d338b;
|
|
}
|
|
if (curChar == 0) break;
|
|
curChar = animNameCursor[1];
|
|
isLess = curChar < (uint8_t)literalCursor[1];
|
|
if (curChar != literalCursor[1]) goto LAB_005d3386;
|
|
animNameCursor = animNameCursor + 2;
|
|
literalCursor = literalCursor + 2;
|
|
} while (curChar != 0);
|
|
uVar16 = 0;
|
|
LAB_005d338b:
|
|
if (uVar16 == 0) goto LAB_005d3396;
|
|
}
|
|
goto LAB_005d2f78;
|
|
}
|
|
}
|
|
else {
|
|
iVar14 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x2c));
|
|
if (iVar14 == 100) {
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x30)) == 0) goto LAB_005d32c7;
|
|
LAB_005d32e3:
|
|
iVar14 = PlayerManager::FirstCollectibleOwner();
|
|
if (iVar14 != 0) {
|
|
*GHIDRA_CAST<uint8_t *>((mrMeData + 0x128)) = 1;
|
|
}
|
|
}
|
|
else if (((((iVar14 != 300) && (iVar14 != 0x46)) && (iVar14 != 0x15e)) &&
|
|
((iVar14 != 0x45 && (iVar14 != 0x14)))) &&
|
|
(((iVar14 != 10 && ((iVar14 != 0x28 && (iVar14 != 0x1e)))) &&
|
|
(iVar14 != 0x5a)))) {
|
|
LAB_005d32c7:
|
|
cVar7 = Entity_Pickup::IsChest();
|
|
if ((cVar7 == '\0') || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x30)) == 0)) goto LAB_005d3396;
|
|
if (extraout_ECX == 100) goto LAB_005d32e3;
|
|
}
|
|
fVar24 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x33c));
|
|
fVar28 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x340));
|
|
local_50 = 5.60519e-45;
|
|
local_5c = EVar22;
|
|
local_48 = fVar28;
|
|
local_44 = fVar24;
|
|
}
|
|
}
|
|
else {
|
|
LAB_005d31d8:
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x188)) == 1) goto LAB_005d3260;
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x188)) == 0) goto LAB_005d3260;
|
|
if (*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(EVar22) + 0x3b0)) != '\0') goto LAB_005d3260;
|
|
if (*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(EVar22) + 0x173)) != '\0') goto LAB_005d3260;
|
|
cVar7 = (GHIDRA_CAST<Entity *>(()))->Entity::HasEntityFlags();
|
|
if ((((cVar7 != '\0') && (iVar14 != 0x322)) && (iVar14 != 0x362)) ||
|
|
(cVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::IsDescendantOf(), cVar7 != '\0')) {
|
|
fVar24 = local_44;
|
|
fVar28 = local_48;
|
|
goto LAB_005d3260;
|
|
}
|
|
fVar24 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x33c));
|
|
fVar28 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x340));
|
|
local_50 = 4.2039e-45;
|
|
local_5c = EVar22;
|
|
local_48 = fVar28;
|
|
local_44 = fVar24;
|
|
}
|
|
}
|
|
LAB_005d3396:
|
|
fVar26 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this->_target) + 0x33c)) - fVar24;
|
|
fVar25 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this->_target) + 0x340)) - fVar28;
|
|
fVar26 = fVar25 * fVar25 + fVar26 * fVar26;
|
|
if (*GHIDRA_CAST<int *>((mrMeData + 4)) == 0) {
|
|
LAB_005d33d8:
|
|
*GHIDRA_CAST<float *>((mrMeData + 4)) = local_50;
|
|
(this->_targetPosition).x = fVar24;
|
|
(this->_targetPosition).y = fVar28;
|
|
if (this->_child != (EntityPtr)0x0) {
|
|
msvc::multiset<unsigned_int>::erase();
|
|
}
|
|
this->_child = local_5c;
|
|
if (local_5c != (EntityPtr)0x0) {
|
|
msvc::multiset<unsigned_int>::insert();
|
|
}
|
|
*GHIDRA_CAST<uint32_t *>((mrMeData + 0x120)) = 0xffffffff;
|
|
fVar24 = local_44;
|
|
fVar28 = local_48;
|
|
bestDistSq = fVar26;
|
|
}
|
|
else if (fVar26 < bestDistSq) goto LAB_005d33d8;
|
|
local_60 = (float)(GHIDRA_INT(local_60) + 1);
|
|
} while (GHIDRA_UINT(local_60) < *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(pvVar20) + 0x1264)));
|
|
}
|
|
if (*GHIDRA_CAST<int *>((mrMeData + 4)) != 0) {
|
|
this->_state = 1;
|
|
*GHIDRA_CAST<uint32_t *>((mrMeData + 0x124)) = 0;
|
|
*GHIDRA_CAST<int *>((mrMeData + 0x124)) = *GHIDRA_CAST<int *>((mrMeData + 0x124)) + 1;
|
|
goto LAB_005d3f7c;
|
|
}
|
|
}
|
|
this->_state = 3;
|
|
*GHIDRA_CAST<int *>((mrMeData + 0x124)) = *GHIDRA_CAST<int *>((mrMeData + 0x124)) + 1;
|
|
goto LAB_005d3f7c;
|
|
}
|
|
if (iVar14 == 1) {
|
|
if (*GHIDRA_CAST<char *>((mrMeData + 0x128)) != '\0') {
|
|
uVar16 = 0;
|
|
pvVar20 = g_game->_room;
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0x1264)) != 0) {
|
|
do {
|
|
if ((*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0x125c)) + uVar16 * 4)) + 0x28)) == 5) &&
|
|
(iVar14 = __RTDynamicCast(), 1 < *GHIDRA_CAST<uint32_t *>((iVar14 + 0x5c0)))) {
|
|
this->_child = *GHIDRA_CAST<EntityPtr *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar20) + 0x125c)) + uVar16 * 4));
|
|
break;
|
|
}
|
|
uVar16 = uVar16 + 1;
|
|
} while (uVar16 < *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(pvVar20) + 0x1264)));
|
|
}
|
|
}
|
|
EVar22 = this->_child;
|
|
if (EVar22 == (EntityPtr)0x0) {
|
|
itemConfig = GHIDRA_CAST<ItemConfig_Item *>(0x0);
|
|
}
|
|
else {
|
|
itemConfig = ItemConfig::GetCollectible(&g_manager->_itemConfig,*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x30)));
|
|
}
|
|
iVar14 = *GHIDRA_CAST<int *>((mrMeData + 4));
|
|
if (iVar14 == 4) {
|
|
uVar16 = *GHIDRA_CAST<uint32_t *>((mrMeData + 0x120));
|
|
if ((uVar16 != 0xffffffff) ||
|
|
((EVar22 != (EntityPtr)0x0 &&
|
|
((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x2c)) != 100 || (itemConfig != GHIDRA_CAST<ItemConfig_Item *>(0x0))))))) {
|
|
local_60 = (this->_targetPosition).x;
|
|
local_70 = (this->_targetPosition).y;
|
|
if (EVar22 != (EntityPtr)0x0) {
|
|
local_60 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x33c));
|
|
local_70 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x340));
|
|
}
|
|
vecResult = GHIDRA_CAST<float *>((GHIDRA_CAST<Vector *>(()))->Vector)::Resized();
|
|
moveX = *vecResult;
|
|
moveY = vecResult[1];
|
|
local_60 = (this->_pos).x - local_60;
|
|
local_70 = (this->_pos).y - local_70;
|
|
if (256.0 <= local_70 * local_70 + local_60 * local_60) {
|
|
if ((EVar22 == (EntityPtr)0x0) || (*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(EVar22) + 0x171)) != '\0'))
|
|
goto LAB_005d3f7c;
|
|
}
|
|
else if (GHIDRA_INT(uVar16) < 0) {
|
|
if (EVar22 != (EntityPtr)0x0) {
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x28)) != 5) goto LAB_005d3f7c;
|
|
pickup = GHIDRA_CAST<Entity_Pickup *>(__RTDynamicCast());
|
|
if (pickup->_price != 0) {
|
|
uVar16 = (GHIDRA_CAST<RNG *>((&this->_dropRNG)))->RNG::RandomInt(3);
|
|
manager = g_manager;
|
|
if (uVar16 == 0) {
|
|
seed_fart_sound_override();
|
|
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(0xbb,1.0,2,0,1.0,0.0);
|
|
this->_state = 3;
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<Entity_Pickup *>(()))->Entity_Pickup::update_price_sprite();
|
|
}
|
|
}
|
|
if (this->_state == 3) goto LAB_005d3f7c;
|
|
iVar14 = pickup->_variant;
|
|
if (((iVar14 == 0x3c) || (iVar14 == 0x35)) || (iVar14 == 0x37)) {
|
|
(GHIDRA_CAST<Entity_Pickup *>((pickup)))->Entity_Pickup::TryOpenChest(GHIDRA_CAST<Entity_Player *>(0x0));
|
|
}
|
|
else if (iVar14 == 0x33) {
|
|
explosionColor = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Color *>(()))->Color)::Color();
|
|
fStack_cc = 8.560782e-39;
|
|
Game::BombExplosionEffects
|
|
(g_game,&this->_pos,20.0,(BitSet128)ZEXT816(0),explosionColor,
|
|
GHIDRA_CAST<Entity *>(this->_parent),1.0,1,4,0);
|
|
}
|
|
else if ((iVar14 != 0x14) || (pickup->_subtype != 6)) {
|
|
if (*GHIDRA_CAST<char *>((mrMeData + 0x128)) != '\0') {
|
|
pickup->_cycleCollectibleCount = 0;
|
|
}
|
|
ANM2::ANM2(GHIDRA_CAST<ANM2 *>(pickupSpriteCopy),&pickup->_sprite);
|
|
ANM2::operator_assign();
|
|
if (pickup->_variant == 100) {
|
|
ANM2::Play(GHIDRA_CAST<ANM2 *>((mrMeData + 8)),GHIDRA_CAST<uint8_t *>("ShopIdle"),1);
|
|
AnimationState::SetAnimationData(GHIDRA_CAST<AnimationState *>((mrMeData + 0x58)));
|
|
fVar24 = g_vectorOne.y * 0.8;
|
|
*GHIDRA_CAST<float *>((mrMeData + 0xa4)) = g_vectorOne.x * 0.8;
|
|
*GHIDRA_CAST<float *>((mrMeData + 0xa8)) = fVar24;
|
|
}
|
|
pickup->_visible = 0;
|
|
*GHIDRA_CAST<int *>((mrMeData + 0x11c)) = pickup->_entityCollisionClass;
|
|
pickup->_entityCollisionClass = 0;
|
|
this->_state = 2;
|
|
goto LAB_005d3f7c;
|
|
}
|
|
}
|
|
}
|
|
else if (((uVar16 < 0x1c0) &&
|
|
(gridEntity = *GHIDRA_CAST<GridEntity **>((GHIDRA_CAST<char *>(g_game->_room) + uVar16 * 4 + 0x24)),
|
|
gridEntity != GHIDRA_CAST<GridEntity *>(0x0))) &&
|
|
(((gridEntity->_desc)._type == 0x14 &&
|
|
((EVar22 = this->_parent, EVar22 != (EntityPtr)0x0 &&
|
|
(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x28)) == 1)))))) {
|
|
iVar14 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x13bc));
|
|
savedParentX = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(EVar22) + 0x33c));
|
|
savedParentY = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(EVar22) + 0x340));
|
|
if (iVar14 < 1) {
|
|
iVar14 = 1;
|
|
}
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(EVar22) + 0x13bc)) = iVar14;
|
|
gridPos = GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<GridEntity *>((gridEntity)))->GridEntity)::Position();
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(EVar22) + 0x33c)) = *gridPos;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(EVar22) + 0x340)) = gridPos[1];
|
|
gridEntity->Update();
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(EVar22) + 0x33c)) = savedParentX;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(EVar22) + 0x340)) = savedParentY;
|
|
}
|
|
}
|
|
}
|
|
else if (iVar14 == 2) {
|
|
fVar24 = (this->_targetPosition).x;
|
|
fVar28 = (this->_targetPosition).y;
|
|
moveX = fVar24 - (this->_pos).x;
|
|
moveY = fVar28 - (this->_pos).y;
|
|
fVar26 = moveY * moveY + moveX * moveX;
|
|
sqrtf();
|
|
if (0.0 < fVar26) {
|
|
moveX = moveX * (8.0 / fVar26);
|
|
moveY = moveY * (8.0 / fVar26);
|
|
}
|
|
fVar24 = (this->_pos).x - fVar24;
|
|
fVar28 = (this->_pos).y - fVar28;
|
|
if (1600.0 <= fVar28 * fVar28 + fVar24 * fVar24) goto LAB_005d3f7c;
|
|
uVar16 = *GHIDRA_CAST<uint32_t *>((mrMeData + 0x120));
|
|
if (((((((-1 < GHIDRA_INT(uVar16)) && (uVar16 < 0x1c0)) &&
|
|
(iVar14 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + uVar16 * 4 + 0x24)), iVar14 != 0)) &&
|
|
((*GHIDRA_CAST<int *>((iVar14 + 4)) == 0x10 &&
|
|
(door = GHIDRA_CAST<GridEntity_Door *>(__RTDynamicCast()), (door->_desc)._state != 2)))) &&
|
|
(this->_parent != (EntityPtr)0x0)) &&
|
|
((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this->_parent) + 0x28)) == 1 && (cVar7 = FUN_00710370(), cVar7 != '\0'))))
|
|
&& (cVar7 = (GHIDRA_CAST<GridEntity_Door *>((door)))->GridEntity_Door::TryUnlock(), cVar7 == '\0')) {
|
|
(GHIDRA_CAST<GridEntity_Door *>(()))->GridEntity_Door::Open();
|
|
}
|
|
}
|
|
else if (iVar14 == 1) {
|
|
fVar24 = (this->_targetPosition).x;
|
|
pos = &this->_pos;
|
|
fVar28 = (this->_targetPosition).y;
|
|
moveX = fVar24 - pos->x;
|
|
moveY = fVar28 - (this->_pos).y;
|
|
fVar26 = moveY * moveY + moveX * moveX;
|
|
sqrtf();
|
|
if (0.0 < fVar26) {
|
|
moveX = moveX * (8.0 / fVar26);
|
|
moveY = moveY * (8.0 / fVar26);
|
|
}
|
|
fVar24 = pos->x - fVar24;
|
|
fVar28 = (this->_pos).y - fVar28;
|
|
if (400.0 <= fVar28 * fVar28 + fVar24 * fVar24) goto LAB_005d3f7c;
|
|
explosionColor = GHIDRA_CAST<ColorMod *>((GHIDRA_CAST<Color *>(()))->Color)::Color();
|
|
fStack_cc = 8.561981e-39;
|
|
Game::BombExplosionEffects
|
|
(g_game,pos,20.0,(BitSet128)ZEXT816(0),explosionColor,GHIDRA_CAST<Entity *>(this->_parent),1.0,1,4,0);
|
|
}
|
|
else {
|
|
if (iVar14 != 3) goto LAB_005d3f7c;
|
|
if ((EVar22 != (EntityPtr)0x0) && (*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(EVar22) + 0x173)) == '\0')) {
|
|
fVar24 = (this->_pos).x;
|
|
sqrtf();
|
|
vecResult = GHIDRA_CAST<float *>((GHIDRA_CAST<Vector *>(()))->Vector)::Resized();
|
|
moveX = *vecResult;
|
|
moveY = vecResult[1];
|
|
if ((1 < *GHIDRA_CAST<int *>(&g_game->_deathmatchManager)) && (600 < *GHIDRA_CAST<int *>((mrMeData + 0x124)))) {
|
|
this->_state = 3;
|
|
}
|
|
cVar7 = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::IsFrame();
|
|
if ((cVar7 != '\0') &&
|
|
(fVar28 = (this->_pos).y - *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x340)),
|
|
fVar24 = fVar24 - *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x33c)),
|
|
fVar28 * fVar28 + fVar24 * fVar24 < this->_size * this->_size)) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(EVar22) + 0x20))();
|
|
(GHIDRA_CAST<Color *>(()))->Color::Color();
|
|
this->SetColor();
|
|
}
|
|
goto LAB_005d3f7c;
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
if (iVar14 == 3) {
|
|
Random();
|
|
(GHIDRA_CAST<Game *>((g_game)))->Game::SpawnEx();
|
|
this->Remove();
|
|
goto LAB_005d3f7c;
|
|
}
|
|
if (iVar14 != 2) goto LAB_005d3f7c;
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Carry"),0);
|
|
EVar22 = this->_parent;
|
|
if (((EVar22 != (EntityPtr)0x0) && (this->_child != (EntityPtr)0x0)) &&
|
|
(*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(this->_child) + 0x172)) != '\0')) {
|
|
fVar24 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x33c)) - (this->_pos).x;
|
|
fVar26 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x340)) - (this->_pos).y;
|
|
vecResult = GHIDRA_CAST<float *>((GHIDRA_CAST<Vector *>(()))->Vector)::Resized();
|
|
fVar25 = (this->_pos).y - *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x340));
|
|
moveX = *vecResult;
|
|
moveY = vecResult[1];
|
|
fVar28 = (this->_pos).x - *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x33c));
|
|
if (1024.0 <= fVar25 * fVar25 + fVar28 * fVar28) goto LAB_005d3f7c;
|
|
Room::FindFreePickupSpawnPosition();
|
|
EVar22 = this->_child;
|
|
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x33c)) = fVar24;
|
|
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(EVar22) + 0x340)) = fVar26;
|
|
EVar22 = this->_child;
|
|
cVar7 = (GHIDRA_CAST<Vector *>(()))->Vector::operator_ne();
|
|
if (cVar7 != '\0') {
|
|
*extraout_ECX_00 = fVar24;
|
|
extraout_ECX_00[1] = fVar26;
|
|
EVar22 = this->_child;
|
|
}
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(EVar22) + 0x171)) = 1;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this->_child) + 0x188)) = *GHIDRA_CAST<uint32_t *>((mrMeData + 0x11c));
|
|
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Float"),0);
|
|
}
|
|
}
|
|
this->_state = 3;
|
|
LAB_005d3f7c:
|
|
if (*GHIDRA_CAST<char *>((mrMeData + 0x111)) != '\0') {
|
|
AnimationState::Update();
|
|
AnimationState::Update();
|
|
}
|
|
(this->_velocity).x = (this->_velocity).x * 0.9 + moveX * 0.1;
|
|
(this->_velocity).y = (this->_velocity).y * 0.9 + moveY * 0.1;
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 005d4010
|
|
void Entity_Effect::update_wave_chain()
|
|
{
|
|
float fVar1;
|
|
BitSet128 **clampedStep;
|
|
float fVar2;
|
|
float fVar3;
|
|
BitSet128 *local_14;
|
|
BitSet128 *local_10;
|
|
float spawnY;
|
|
int waveDelay;
|
|
int waveMode;
|
|
|
|
waveDelay = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x438))));
|
|
if (g_game->_frameCount - this->_spawnFrame == waveDelay) {
|
|
waveMode = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x440))));
|
|
if (waveMode == 4) {
|
|
local_10 = GHIDRA_CAST<BitSet128 *>((*GHIDRA_CAST<float *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x430)))) * 1.5));
|
|
local_14 = GHIDRA_CAST<BitSet128 *>(0x41a00000);
|
|
clampedStep = &local_14;
|
|
if ((float)local_10 <= 20.0) {
|
|
clampedStep = &local_10;
|
|
}
|
|
*GHIDRA_CAST<BitSet128 **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x430)))) = *clampedStep;
|
|
*GHIDRA_CAST<float *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x434)))) = *GHIDRA_CAST<float *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x434)))) + 0.1;
|
|
}
|
|
else if ((waveMode == 2) && (GHIDRA_INT((this->_varData)._h) == 1)) {
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x434)))) = 0x3fe00000;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x43c)))) = 0x3c;
|
|
}
|
|
else if (waveMode == 1) {
|
|
local_10 = GHIDRA_CAST<BitSet128 *>((*GHIDRA_CAST<float *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x448)))) * 0.017453292));
|
|
local_14 = GHIDRA_CAST<BitSet128 *>(cos((float)local_10));
|
|
fVar3 = sin((float)local_10);
|
|
fVar1 = *GHIDRA_CAST<float *>(&(this->_varData)._l);
|
|
fVar2 = *GHIDRA_CAST<float *>((GHIDRA_INT(&(this->_varData)._l) + 4));
|
|
*GHIDRA_CAST<float *>(&(this->_varData)._l) = fVar1 * (float)local_14 - fVar2 * fVar3;
|
|
*GHIDRA_CAST<float *>((GHIDRA_INT(&(this->_varData)._l) + 4)) = fVar2 * (float)local_14 + fVar1 * fVar3;
|
|
}
|
|
fVar1 = *GHIDRA_CAST<float *>(&(this->_varData)._l);
|
|
local_14 = &this->_varData;
|
|
fVar2 = *GHIDRA_CAST<float *>((GHIDRA_INT(&(this->_varData)._l) + 4));
|
|
fVar2 = sqrtf(fVar1 * fVar1 + fVar2 * fVar2);
|
|
fVar1 = *GHIDRA_CAST<float *>((GHIDRA_INT(&(this->_varData)._h) + 4));
|
|
spawnY = *GHIDRA_CAST<float *>((GHIDRA_INT(&local_14->_l) + 4));
|
|
if (fVar2 <= 0.0) {
|
|
fVar3 = *GHIDRA_CAST<float *>(&local_14->_l);
|
|
}
|
|
else {
|
|
fVar2 = fVar1 / fVar2;
|
|
fVar3 = *GHIDRA_CAST<float *>(&local_14->_l) * fVar2;
|
|
spawnY = spawnY * fVar2;
|
|
}
|
|
local_10 = GHIDRA_CAST<BitSet128 *>((fVar3 + (this->_pos).x));
|
|
spawnY = spawnY + (this->_pos).y;
|
|
FUN_006395e0(&local_10,local_14,GHIDRA_INT((this->_varData)._h),fVar1,*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x430))))
|
|
,*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x434)))),waveDelay,*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x43c)))),
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x444)))),*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x448)))));
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 006073f0
|
|
void Entity_Effect::moonlight_timer_callback(int param_1)
|
|
{
|
|
Entity_Player *this;
|
|
void *pvVar1;
|
|
int iVar2;
|
|
Manager *pMVar3;
|
|
uint8_t auStack_50 [4];
|
|
int local_4c;
|
|
int aiStack_48 [3];
|
|
uint32_t uStack_3c;
|
|
uint32_t local_38;
|
|
uint32_t uStack_34;
|
|
uint32_t uStack_30;
|
|
uint32_t uStack_2c;
|
|
uint32_t local_28;
|
|
uint32_t uStack_24;
|
|
uint32_t uStack_20;
|
|
uint32_t uStack_1c;
|
|
uint32_t local_18;
|
|
uint32_t local_14;
|
|
uint32_t local_10;
|
|
uint32_t local_c;
|
|
|
|
pMVar3 = g_manager;
|
|
local_c = __security_cookie ^ GHIDRA_UINT(auStack_50);
|
|
this = *GHIDRA_CAST<Entity_Player **>((param_1 + 0x3bc));
|
|
if (((this != GHIDRA_CAST<Entity_Player *>(0x0)) && (this->_type == 1)) && (this->_dead == 0)) {
|
|
local_4c = 0x84;
|
|
seed_fart_sound_override(&local_4c);
|
|
(GHIDRA_CAST<SoundEffects *>((&pMVar3->_sfxManager)))->SoundEffects::Play(local_4c,1.0,2,0,1.0,0.0);
|
|
local_38 = 0x40000000;
|
|
uStack_34 = 0x40400000;
|
|
uStack_30 = 0x40800000;
|
|
uStack_2c = 0x3f800000;
|
|
local_18 = 0x3e4ccccd;
|
|
local_14 = 0x3e4ccccd;
|
|
local_10 = 0x3e4ccccd;
|
|
local_28 = 0;
|
|
uStack_24 = 0;
|
|
uStack_20 = 0;
|
|
uStack_1c = 0;
|
|
this->SetColor(&local_38,3,0xffffffff,1,1);
|
|
pvVar1 = (g_manager->_itemConfig)._nullItems._begin;
|
|
if ((0x128 < GHIDRA_INT((GHIDRA_INT((g_manager->_itemConfig)._nullItems._end) - GHIDRA_INT(pvVar1) & 0xfffffffcU)))
|
|
&& (iVar2 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar1) + 0x128)), iVar2 != 0)) {
|
|
aiStack_48[2] = *GHIDRA_CAST<uint32_t *>((iVar2 + 0x78));
|
|
aiStack_48[1] = 0;
|
|
uStack_3c = 0;
|
|
aiStack_48[0] = iVar2;
|
|
(GHIDRA_CAST<TemporaryEffects *>((&this->_temporaryeffects)))->TemporaryEffects::AddEffect(aiStack_48,1,1);
|
|
}
|
|
Entity_Player::AnimateCollectible(this,0x24d,GHIDRA_CAST<uint8_t *>("UseItem"),GHIDRA_CAST<uint8_t *>("PlayerPickupSparkle"));
|
|
this->Entity_Player::AddSoulHearts(1,0);
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 00607620
|
|
void Entity_Effect::Render(Vector *offset)
|
|
{
|
|
Entity_Effect *player;
|
|
Entity *layerSprite;
|
|
uint8_t isLocalPlayerOwned;
|
|
LayerState *layer;
|
|
int trailDeque;
|
|
int iVar1;
|
|
ColorMod *to;
|
|
ColorMod *pCVar2;
|
|
Vector *renderPos;
|
|
ColorMod *to_00;
|
|
ColorMod *to_01;
|
|
Entity_Player *player;
|
|
AnimationState *overlayFrame;
|
|
Vector *pVVar3;
|
|
uint32_t uVar4;
|
|
ColorMod *tmpColor;
|
|
ColorMod *extraout_EAX;
|
|
ColorMod *color;
|
|
ColorMod *extraout_EAX_00;
|
|
ColorMod *color_00;
|
|
ColorMod *extraout_EAX_01;
|
|
float *pfVar5;
|
|
float curveY;
|
|
ANM2 *layerSprite;
|
|
Color *this_02;
|
|
float *extraout_ECX;
|
|
uint32_t *extraout_ECX_00;
|
|
int extraout_EDX;
|
|
int extraout_EDX_00;
|
|
void *pvVar6;
|
|
int *trail;
|
|
uint8_t auVar7 [12];
|
|
uint8_t auVar8 [12];
|
|
uint8_t auVar9 [12];
|
|
float fVar10;
|
|
float fVar11;
|
|
float fVar12;
|
|
double dVar13;
|
|
uint8_t auStack_1f0 [20];
|
|
float fStack_1dc;
|
|
uint8_t *layerName;
|
|
Vector local_1bc;
|
|
Vector local_1b4;
|
|
int *local_1ac;
|
|
int *local_1a8;
|
|
float local_1a4;
|
|
char isParentFrameVisible;
|
|
Vector local_19c;
|
|
float local_194;
|
|
float local_190;
|
|
float local_18c;
|
|
Vector *renderOffset;
|
|
Vector local_184;
|
|
float *local_17c;
|
|
Vector local_178;
|
|
float local_170;
|
|
uint32_t overlayLayer;
|
|
AnimationState *local_168;
|
|
Vector local_164;
|
|
float local_15c;
|
|
float *local_158;
|
|
float *local_154;
|
|
AnimationState overlayFrameCopy;
|
|
uint8_t local_124;
|
|
Color lerpColor;
|
|
ColorMod scratchColorMod;
|
|
Color scratchColor;
|
|
ColorMod beamColor;
|
|
Color parentColor;
|
|
float local_8;
|
|
Game *game;
|
|
uint32_t *trailPoint;
|
|
|
|
local_8 = (float)(__security_cookie ^ GHIDRA_UINT(((&parentColor)[1]._tint + 1)));
|
|
renderOffset = offset;
|
|
if (this->_variant == 0x79) {
|
|
return;
|
|
}
|
|
local_1bc.y = (float)this;
|
|
if ((((this->_variant == 0x1e) && (GHIDRA_CAST<Entity *>(this->_spawnerEntity) != GHIDRA_CAST<Entity *>(0x0))) &&
|
|
(isLocalPlayerOwned = (GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this->_spawnerEntity))))->Entity::IsEnemy(), isLocalPlayerOwned != 0
|
|
)) && (isLocalPlayerOwned = is_local_player_owned((void *)this->_spawnerEntity),
|
|
isLocalPlayerOwned == 0)) {
|
|
return;
|
|
}
|
|
if (this->_visible == 0) {
|
|
return;
|
|
}
|
|
local_17c = GHIDRA_CAST<float *>(((this->_posOffset).y + (this->_pos).y));
|
|
local_1b4.y = (g_screenHeight - 182.0) * 0.5;
|
|
local_158 = GHIDRA_CAST<float *>((g_displayPixelRatio * g_screenPointScale));
|
|
local_154 = GHIDRA_CAST<float *>((((((this->_pos).x + (this->_posOffset).x) - 60.0) * 0.65 +
|
|
(g_screenWidth - 338.0) * 0.5) * (float)local_158 + 0.5));
|
|
dVar13 = floor((double)(float)local_154);
|
|
local_1ac = GHIDRA_CAST<int *>((float)dVar13);
|
|
local_154 = GHIDRA_CAST<float *>(((((float)local_17c - 140.0) * 0.65 + local_1b4.y) * (float)local_158 + 0.5));
|
|
dVar13 = floor((double)(float)local_154);
|
|
local_154 = GHIDRA_CAST<float *>((float)dVar13);
|
|
fVar10 = offset->y;
|
|
pVVar3 = &this->_renderPosition;
|
|
pVVar3->x = (float)local_1ac / (float)local_158 + offset->x;
|
|
(this->_renderPosition).y = (float)local_154 / (float)local_158 + fVar10;
|
|
iVar1 = this->_variant;
|
|
if ((iVar1 == 0x7a) || (iVar1 == 0xb8)) {
|
|
local_154 = GHIDRA_CAST<float *>(this->_parent);
|
|
if (local_154 == GHIDRA_CAST<float *>(0x0)) goto LAB_0060ab8d;
|
|
layerSprite = GHIDRA_CAST<ANM2 *>((local_154 + 0x12));
|
|
layer = ANM2::GetLayer(layerSprite,GHIDRA_CAST<uint8_t *>(this->_state));
|
|
fVar10 = g_displayPixelRatio;
|
|
layer->_visible = 1;
|
|
local_17c = GHIDRA_CAST<float *>((fVar10 * g_screenPointScale));
|
|
local_164.y = (((local_154[0xcf] + local_154[0xd3]) - 60.0) * 0.65 +
|
|
(g_screenWidth - 338.0) * 0.5) * (float)local_17c + 0.5;
|
|
dVar13 = floor((double)local_164.y);
|
|
local_178.y = (float)dVar13 / (float)local_17c;
|
|
local_164.y = (((local_154[0xd0] + local_154[0xd4]) - 140.0) * 0.65 +
|
|
(g_screenHeight - 182.0) * 0.5) * (float)local_17c + 0.5;
|
|
dVar13 = floor((double)local_164.y);
|
|
local_164.x = local_178.y + renderOffset->x;
|
|
local_164.y = (float)dVar13 / (float)local_17c + renderOffset->y;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(layerSprite))))->Sprite::RenderLayer(this->_state,&local_164,&g_vectorZero,&g_vectorZero);
|
|
layerName = GHIDRA_CAST<uint8_t *>(this->_state);
|
|
goto LAB_0060ab84;
|
|
}
|
|
if (iVar1 == 0xc9) {
|
|
player = GHIDRA_CAST<Entity_Effect *>(this->_parent);
|
|
if ((player != GHIDRA_CAST<Entity_Effect *>(0x0)) && (player->_type == 3)) {
|
|
render_player_target(player,renderOffset,1);
|
|
}
|
|
goto LAB_0060ab8d;
|
|
}
|
|
if (iVar1 == 0xc4) {
|
|
if ((this->_parent != 0) && (this->_isFollowing != 0)) {
|
|
local_15c = g_displayPixelRatio * g_screenPointScale;
|
|
local_154 = GHIDRA_CAST<float *>((((g_screenWidth - 338.0) * 0.5 +
|
|
(*GHIDRA_CAST<float *>((this->_parent + 0x33c)) - 60.0) * 0.65) * local_15c + 0.5));
|
|
dVar13 = floor((double)(float)local_154);
|
|
local_1b4.y = (float)dVar13 / local_15c;
|
|
local_154 = GHIDRA_CAST<float *>((((g_screenHeight - 182.0) * 0.5 +
|
|
(*GHIDRA_CAST<float *>((this->_parent + 0x340)) - 140.0) * 0.65) * local_15c + 0.5));
|
|
dVar13 = floor((double)(float)local_154);
|
|
local_154 = GHIDRA_CAST<float *>((float)dVar13);
|
|
local_164.x = local_1b4.y + renderOffset->x;
|
|
local_164.y = (float)local_154 / local_15c + renderOffset->y;
|
|
ANM2::Render(&this->_sprite,&local_164,&g_vectorZero,&g_vectorZero);
|
|
goto LAB_0060ab8d;
|
|
}
|
|
}
|
|
else if (iVar1 == 0x27) {
|
|
if ((this->_subtype == 1) && (iVar1 = this->_parent, iVar1 != 0)) {
|
|
if (*GHIDRA_CAST<uint32_t *>((iVar1 + 200)) < 3) goto LAB_0060ab8d;
|
|
layer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>((iVar1 + 0x48)),GHIDRA_CAST<uint8_t *>(0x2));
|
|
layer->_visible = 1;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>((this->_parent + 0x48)))))->Sprite::RenderLayer(2,pVVar3,&g_vectorZero,&g_vectorZero);
|
|
layerSprite = GHIDRA_CAST<ANM2 *>((this->_parent + 0x48));
|
|
layerName = GHIDRA_CAST<uint8_t *>(0x2);
|
|
LAB_0060ab84:
|
|
layer = ANM2::GetLayer(layerSprite,layerName);
|
|
layer->_visible = 0;
|
|
goto LAB_0060ab8d;
|
|
}
|
|
}
|
|
else {
|
|
if (iVar1 == 0x8b) {
|
|
uVar4 = this->_state;
|
|
if ((((GHIDRA_INT(uVar4) < 0) || (0x1bf < uVar4)) ||
|
|
(iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + uVar4 * 4 + 0x24)), iVar1 == 0)) ||
|
|
((*GHIDRA_CAST<int *>((iVar1 + 4)) != 0x11 || (*GHIDRA_CAST<uint32_t *>((iVar1 + 0xc0)) < 2)))) goto LAB_0060ab8d;
|
|
layerSprite = GHIDRA_CAST<ANM2 *>((iVar1 + 0x40));
|
|
layer = ANM2::GetLayer(layerSprite,GHIDRA_CAST<uint8_t *>(0x1));
|
|
layer->_visible = 1;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(layerSprite))))->Sprite::RenderLayer(1,&this->_renderPosition,&g_vectorZero,&g_vectorZero);
|
|
layerName = GHIDRA_CAST<uint8_t *>(0x1);
|
|
goto LAB_0060ab84;
|
|
}
|
|
if (iVar1 == 0xa6) {
|
|
fStack_1dc = 8.860197e-39;
|
|
local_190 = (float)__RTDynamicCast();
|
|
if ((((this->_sprite)._loaded != 0) && (local_190 != 0.0)) &&
|
|
(1 < *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_190) + 0x14)))) {
|
|
DAT_00c78ef0 = &this->_sprite;
|
|
DAT_00c78ef4 = 0;
|
|
(*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(&(DAT_00c78ef8)) + 0x0))) = 0;
|
|
g_beamRendererPointsEnd = g_beamRendererPoints;
|
|
local_1ac = *GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(local_190) + 4));
|
|
local_170 = (float)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_190) + 0x14)) + -1 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_190) + 0x10)));
|
|
local_194 = 0.0;
|
|
local_158 = GHIDRA_CAST<float *>(g_vectorZero.x);
|
|
local_18c = g_vectorZero.y;
|
|
fVar10 = local_190;
|
|
trail = local_1ac;
|
|
LAB_00607b21:
|
|
do {
|
|
if (GHIDRA_INT(local_170) + 1U == *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(fVar10) + 0x10))) goto LAB_00607e4b;
|
|
if (0 < GHIDRA_INT(local_194)) {
|
|
if (trail == GHIDRA_CAST<int *>(0x0)) {
|
|
iVar1 = 0;
|
|
}
|
|
else {
|
|
iVar1 = *trail;
|
|
}
|
|
pfVar5 = *(float **)
|
|
(*GHIDRA_CAST<int *>((iVar1 + 4)) + (*GHIDRA_CAST<int *>((iVar1 + 8)) - 1U & GHIDRA_UINT(local_170)) * 4);
|
|
fVar11 = *pfVar5 - (float)local_158;
|
|
fVar12 = pfVar5[1] - local_18c;
|
|
fVar12 = sqrtf(fVar12 * fVar12 + fVar11 * fVar11);
|
|
if (trail == GHIDRA_CAST<int *>(0x0)) {
|
|
iVar1 = 0;
|
|
}
|
|
else {
|
|
iVar1 = *trail;
|
|
}
|
|
if (fVar12 < *GHIDRA_CAST<float *>((*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((iVar1 + 4)) +
|
|
(*GHIDRA_CAST<int *>((iVar1 + 8)) - 1U & GHIDRA_UINT(local_170)) * 4)) + 0x34
|
|
)) * 0.4) {
|
|
local_170 = (float)(GHIDRA_INT(local_170) - 1);
|
|
goto LAB_00607b21;
|
|
}
|
|
}
|
|
if (trail == GHIDRA_CAST<int *>(0x0)) {
|
|
iVar1 = 0;
|
|
}
|
|
else {
|
|
iVar1 = *trail;
|
|
}
|
|
iVar1 = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((iVar1 + 4)) + (*GHIDRA_CAST<int *>((iVar1 + 8)) - 1U & GHIDRA_UINT(local_170)) * 4));
|
|
beamColor._tint[0] = *GHIDRA_CAST<float *>((iVar1 + 8));
|
|
beamColor._tint[1] = *GHIDRA_CAST<float *>((iVar1 + 0xc));
|
|
beamColor._tint[2] = *GHIDRA_CAST<float *>((iVar1 + 0x10));
|
|
beamColor._colorize[0] = *GHIDRA_CAST<float *>((iVar1 + 0x18));
|
|
beamColor._colorize[1] = *GHIDRA_CAST<float *>((iVar1 + 0x1c));
|
|
beamColor._colorize[2] = *GHIDRA_CAST<float *>((iVar1 + 0x20));
|
|
beamColor._colorize[3] = *GHIDRA_CAST<float *>((iVar1 + 0x24));
|
|
(*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(beamColor._offset)) + 0x0))) = *GHIDRA_CAST<uint64_t *>((iVar1 + 0x28));
|
|
beamColor._offset[2] = *GHIDRA_CAST<float *>((iVar1 + 0x30));
|
|
if (trail == GHIDRA_CAST<int *>(0x0)) {
|
|
trailDeque = 0;
|
|
}
|
|
else {
|
|
trailDeque = *trail;
|
|
}
|
|
beamColor._tint[3] =
|
|
*GHIDRA_CAST<float *>((iVar1 + 0x14)) *
|
|
*GHIDRA_CAST<float *>((*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((trailDeque + 4)) +
|
|
(*GHIDRA_CAST<int *>((trailDeque + 8)) - 1U & GHIDRA_UINT(local_170)) * 4)) + 0x3c));
|
|
if (trail == GHIDRA_CAST<int *>(0x0)) {
|
|
iVar1 = 0;
|
|
}
|
|
else {
|
|
iVar1 = *trail;
|
|
}
|
|
iVar1 = *GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((iVar1 + 4)) + (*GHIDRA_CAST<int *>((iVar1 + 8)) - 1U & GHIDRA_UINT(local_170)) * 4));
|
|
if (trail == GHIDRA_CAST<int *>(0x0)) {
|
|
local_158 = *GHIDRA_CAST<float **>((_DAT_00000004 + (_DAT_00000008 - 1U & GHIDRA_UINT(local_170)) * 4));
|
|
trailDeque = 0;
|
|
}
|
|
else {
|
|
local_158 = *(float **)
|
|
(*GHIDRA_CAST<int *>((*trail + 4)) + (*GHIDRA_CAST<int *>((*trail + 8)) - 1U & GHIDRA_UINT(local_170)) * 4);
|
|
trailDeque = *trail;
|
|
}
|
|
local_1b4.y = *GHIDRA_CAST<float *>((*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((trailDeque + 4)) +
|
|
(*GHIDRA_CAST<int *>((trailDeque + 8)) - 1U & GHIDRA_UINT(local_170)) * 4)) +
|
|
0x34)) * *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(local_158) + 0x3c));
|
|
if (trail == GHIDRA_CAST<int *>(0x0)) {
|
|
trailDeque = 0;
|
|
}
|
|
else {
|
|
trailDeque = *trail;
|
|
}
|
|
local_158 = GHIDRA_CAST<float *>((g_displayPixelRatio * g_screenPointScale));
|
|
pfVar5 = *(float **)
|
|
(*GHIDRA_CAST<int *>((trailDeque + 4)) +
|
|
(*GHIDRA_CAST<int *>((trailDeque + 8)) - 1U & GHIDRA_UINT(local_170)) * 4);
|
|
local_154 = GHIDRA_CAST<float *>((((g_screenWidth - 338.0) * 0.5 + (*pfVar5 - 60.0) * 0.65) *
|
|
(float)local_158 + 0.5));
|
|
dVar13 = floor((double)(float)local_154);
|
|
local_17c = GHIDRA_CAST<float *>(((float)dVar13 / (float)local_158));
|
|
local_154 = GHIDRA_CAST<float *>((((pfVar5[1] - 140.0) * 0.65 + (g_screenHeight - 182.0) * 0.5) *
|
|
(float)local_158 + 0.5));
|
|
dVar13 = floor((double)(float)local_154);
|
|
local_154 = GHIDRA_CAST<float *>((float)dVar13);
|
|
local_164.x = (float)local_17c + renderOffset->x;
|
|
local_164.y = (float)local_154 / (float)local_158 + renderOffset->y;
|
|
BeamRenderer::Add(&local_164,&beamColor,local_1b4.y,*GHIDRA_CAST<float *>((iVar1 + 0x38)));
|
|
if (local_1ac == GHIDRA_CAST<int *>(0x0)) {
|
|
iVar1 = 0;
|
|
}
|
|
else {
|
|
iVar1 = *local_1ac;
|
|
}
|
|
trailPoint = *(uint32_t **)
|
|
(*GHIDRA_CAST<int *>((iVar1 + 4)) + (*GHIDRA_CAST<int *>((iVar1 + 8)) - 1U & GHIDRA_UINT(local_170)) * 4);
|
|
local_194 = (float)(GHIDRA_INT(local_194) + 1);
|
|
local_170 = (float)(GHIDRA_INT(local_170) - 1);
|
|
local_158 = GHIDRA_CAST<float *>(*trailPoint);
|
|
local_18c = (float)trailPoint[1];
|
|
fVar10 = local_190;
|
|
trail = local_1ac;
|
|
} while( true );
|
|
}
|
|
goto LAB_0060ab8d;
|
|
}
|
|
if (iVar1 == 0xaf) {
|
|
layerSprite = GHIDRA_CAST<Entity *>(this->_target);
|
|
if (layerSprite == GHIDRA_CAST<Entity *>(0x0)) {
|
|
local_1a8 = GHIDRA_CAST<int *>(((this->_posOffset).x + (this->_pos).x));
|
|
local_1a4 = (this->_posOffset).y + (this->_pos).y;
|
|
}
|
|
else {
|
|
local_1a8 = GHIDRA_CAST<int *>(((layerSprite->_pos).x + (layerSprite->_posOffset).x));
|
|
local_1a4 = (layerSprite->_pos).y + (layerSprite->_posOffset).y;
|
|
isLocalPlayerOwned = (GHIDRA_CAST<Entity *>((layerSprite)))->Entity::IsEnemy();
|
|
if (isLocalPlayerOwned != 0) {
|
|
local_1a4 = local_1a4 - 12.0;
|
|
}
|
|
}
|
|
local_170 = 1.0;
|
|
if (0 < this->_timeout) {
|
|
fVar10 = (float)this->_timeout / 10.0;
|
|
if (fVar10 <= 0.0) {
|
|
fVar10 = 0.0;
|
|
}
|
|
if (1.0 <= fVar10) {
|
|
fVar10 = local_170;
|
|
}
|
|
local_170 = (2.0 - (fVar10 + fVar10)) * fVar10 + fVar10;
|
|
}
|
|
local_15c = g_displayPixelRatio * g_screenPointScale;
|
|
local_178.y = ((float)local_1a8 - 60.0) * 0.65;
|
|
local_17c = GHIDRA_CAST<float *>(((local_1a4 - 140.0) * 0.65));
|
|
local_154 = GHIDRA_CAST<float *>((((g_screenWidth - 338.0) * 0.5 + local_178.y) * local_15c + 0.5));
|
|
dVar13 = floor((double)(float)local_154);
|
|
local_1b4.y = (float)dVar13 / local_15c;
|
|
local_154 = GHIDRA_CAST<float *>((((g_screenHeight - 182.0) * 0.5 + (float)local_17c) * local_15c + 0.5));
|
|
dVar13 = floor((double)(float)local_154);
|
|
local_154 = GHIDRA_CAST<float *>((float)dVar13);
|
|
fVar10 = renderOffset->x;
|
|
(this->_renderPosition).y = (float)local_154 / local_15c + renderOffset->y;
|
|
pVVar3->x = local_1b4.y + fVar10;
|
|
fVar10 = local_170 * g_vectorOne.y;
|
|
(this->_sprite)._scale.x = local_170 * g_vectorOne.x;
|
|
(this->_sprite)._scale.y = fVar10;
|
|
ANM2::Render(&this->_sprite,pVVar3,&g_vectorZero,&g_vectorZero);
|
|
if (this->_parent != 0) {
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&beamColor))))->Color::operator_assign(&(this->_sprite)._color);
|
|
local_18c = this->_updateTime / 15.0;
|
|
if (1.0 <= local_18c) {
|
|
local_18c = 1.0;
|
|
}
|
|
local_1bc.y = *GHIDRA_CAST<float *>((extraout_EDX + 0x340)) - 15.0;
|
|
local_194 = *GHIDRA_CAST<float *>((extraout_EDX + 0x33c)) + 0.0;
|
|
local_1a4 = local_1a4 - local_1bc.y;
|
|
local_1a8 = GHIDRA_CAST<int *>(((float)local_1a8 - local_194));
|
|
local_164.y = sqrtf(local_1a4 * local_1a4 + (float)local_1a8 * (float)local_1a8);
|
|
if (80.0 <= local_164.y) {
|
|
fVar10 = 40.0 / local_164.y;
|
|
local_154 = GHIDRA_CAST<float *>((local_164.y - 40.0));
|
|
local_158 = GHIDRA_CAST<float *>(0x42200000);
|
|
local_1ac = GHIDRA_CAST<int *>(((float)local_1a8 * fVar10 + local_194));
|
|
local_1b4.y = local_1a4 * fVar10;
|
|
local_1a4 = local_1a4 * (1.0 - fVar10) + local_1bc.y;
|
|
local_1b4.y = local_1b4.y + local_1bc.y;
|
|
local_1a8 = GHIDRA_CAST<int *>(((float)local_1a8 * (1.0 - fVar10) + local_194));
|
|
}
|
|
else {
|
|
local_1ac = GHIDRA_CAST<int *>(((float)local_1a8 * 0.5 + local_194));
|
|
local_1b4.y = local_1a4 * 0.5 + local_1bc.y;
|
|
local_158 = GHIDRA_CAST<float *>((local_164.y * 0.5));
|
|
local_1a8 = local_1ac;
|
|
local_1a4 = local_1b4.y;
|
|
local_154 = local_158;
|
|
}
|
|
fVar10 = local_194 - 60.0;
|
|
local_194 = (g_screenHeight - 182.0) * 0.5;
|
|
local_190 = (g_screenWidth - 338.0) * 0.5;
|
|
local_15c = g_displayPixelRatio * g_screenPointScale;
|
|
local_19c.y = (fVar10 * 0.65 + local_190) * local_15c + 0.5;
|
|
dVar13 = floor((double)local_19c.y);
|
|
local_184.y = (float)dVar13 / local_15c;
|
|
local_19c.y = ((local_1bc.y - 140.0) * 0.65 + local_194) * local_15c + 0.5;
|
|
dVar13 = floor((double)local_19c.y);
|
|
local_19c.y = (float)dVar13;
|
|
local_1bc.y = renderOffset->y + local_19c.y / local_15c;
|
|
local_1bc.x = renderOffset->x + local_184.y;
|
|
local_184.y = (((float)local_1ac - 60.0) * 0.65 + local_190) * local_15c + 0.5;
|
|
dVar13 = floor((double)local_184.y);
|
|
local_19c.y = (float)dVar13 / local_15c;
|
|
local_184.y = ((local_1b4.y - 140.0) * 0.65 + local_194) * local_15c + 0.5;
|
|
dVar13 = floor((double)local_184.y);
|
|
pVVar3 = renderOffset;
|
|
local_1b4.y = renderOffset->y + (float)dVar13 / local_15c;
|
|
local_1b4.x = renderOffset->x + local_19c.y;
|
|
local_184.y = (((float)local_1a8 - 60.0) * 0.65 + local_190) * local_15c + 0.5;
|
|
dVar13 = floor((double)local_184.y);
|
|
local_19c.y = (float)dVar13 / local_15c;
|
|
local_184.y = ((local_1a4 - 140.0) * 0.65 + local_194) * local_15c + 0.5;
|
|
dVar13 = floor((double)local_184.y);
|
|
local_184.y = (float)dVar13;
|
|
local_19c.x = pVVar3->x + local_19c.y;
|
|
local_178.y = (local_190 + local_178.y) * local_15c + 0.5;
|
|
local_19c.y = pVVar3->y + local_184.y / local_15c;
|
|
dVar13 = floor((double)local_178.y);
|
|
local_184.y = (float)dVar13 / local_15c;
|
|
local_178.y = (local_194 + (float)local_17c) * local_15c + 0.5;
|
|
dVar13 = floor((double)local_178.y);
|
|
iVar1 = 0;
|
|
local_178.x = pVVar3->x + local_184.y;
|
|
local_178.y = pVVar3->y + (float)dVar13 / local_15c;
|
|
local_18c = local_18c * 0.7;
|
|
do {
|
|
if (iVar1 == 0) {
|
|
local_190 = 4.0;
|
|
}
|
|
else {
|
|
local_190 = 7.0;
|
|
}
|
|
local_190 = local_190 * this->_updateTime;
|
|
DAT_00c78ef0 = &this->_sprite;
|
|
g_beamRendererPointsEnd = g_beamRendererPoints;
|
|
(*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(&(DAT_00c78ef8)) + 0x0))) = 0;
|
|
beamColor._tint[3] = 0.0;
|
|
DAT_00c78ef4 = iVar1;
|
|
BeamRenderer::Add(&local_1bc,&beamColor,local_170,local_190 + 0.0);
|
|
beamColor._tint[3] = local_18c;
|
|
BeamRenderer::Add(&local_1b4,&beamColor,local_170,local_190 + (float)local_158);
|
|
if ((float)local_154 != (float)local_158) {
|
|
BeamRenderer::Add(&local_19c,&beamColor,local_170,local_190 + (float)local_154);
|
|
}
|
|
beamColor._tint[3] = 0.0;
|
|
BeamRenderer::Add(&local_178,&beamColor,local_170,local_190 + local_164.y);
|
|
BeamRenderer::End();
|
|
iVar1 = iVar1 + 1;
|
|
} while (iVar1 < 2);
|
|
}
|
|
goto LAB_0060ab8d;
|
|
}
|
|
if (iVar1 == 0xc1) {
|
|
if (this->_subtype == 0) {
|
|
fVar12 = 0.0;
|
|
fVar10 = ((this->_updateTime + 6.0) - 10.0) / 50.0;
|
|
if (fVar10 <= 0.0) {
|
|
fVar10 = 0.0;
|
|
}
|
|
if (1.0 <= fVar10) {
|
|
fVar10 = 1.0;
|
|
}
|
|
(GHIDRA_CAST<Color *>((&scratchColor)))->Color::Color();
|
|
pCVar2 = Color::Lerp(&beamColor,GHIDRA_CAST<ColorMod *>(&DAT_00c5c8f8),to,fVar10 + fVar12);
|
|
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&layer->_color))))->Color::operator_assign(pCVar2);
|
|
iVar1 = this->_target;
|
|
if (iVar1 == 0) {
|
|
local_164.x = (this->_pos).x + (this->_posOffset).x;
|
|
local_164.y = (this->_pos).y + (this->_posOffset).y;
|
|
}
|
|
else {
|
|
local_164.x = *GHIDRA_CAST<float *>((iVar1 + 0x33c)) + (this->_posOffset).x;
|
|
local_164.y = *GHIDRA_CAST<float *>((iVar1 + 0x340)) + (this->_posOffset).y;
|
|
}
|
|
renderPos = Isaac::GetRenderPosition(&local_178,&local_164,1);
|
|
fVar10 = renderOffset->x;
|
|
fVar12 = renderPos->x;
|
|
(this->_renderPosition).y = renderPos->y + renderOffset->y;
|
|
pVVar3->x = fVar10 + fVar12;
|
|
ANM2::Render(&this->_sprite,pVVar3,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
else {
|
|
local_164.x = (this->_targetPosition).x;
|
|
local_17c = GHIDRA_CAST<float *>((this->_targetPosition).y);
|
|
local_164.y = (float)local_17c;
|
|
local_154 = GHIDRA_CAST<float *>(local_164.x);
|
|
(GHIDRA_CAST<Color *>((&parentColor)))->Color::Color();
|
|
fVar10 = 0.0;
|
|
if (this->_parent != 0) {
|
|
(GHIDRA_CAST<Color *>((this_02)))->Color::operator_assign(GHIDRA_CAST<ColorMod *>((this->_parent + 0xf0)));
|
|
iVar1 = *GHIDRA_CAST<int *>((extraout_EDX_00 + 0x3c4));
|
|
if (iVar1 == 0) {
|
|
local_178.x = *GHIDRA_CAST<float *>((extraout_EDX_00 + 0x33c));
|
|
local_178.y = *GHIDRA_CAST<float *>((extraout_EDX_00 + 0x340));
|
|
}
|
|
else {
|
|
local_184.x = (float)*GHIDRA_CAST<float **>((iVar1 + 0x33c));
|
|
local_184.y = *GHIDRA_CAST<float *>((iVar1 + 0x340));
|
|
}
|
|
pVVar3 = &local_178;
|
|
if (iVar1 != 0) {
|
|
pVVar3 = &local_184;
|
|
}
|
|
fVar12 = (*GHIDRA_CAST<float *>((extraout_EDX_00 + 0x3a4)) - fVar10) / 6.0;
|
|
if (fVar12 <= fVar10) {
|
|
fVar12 = fVar10;
|
|
}
|
|
if (1.0 <= fVar12) {
|
|
fVar12 = 1.0;
|
|
}
|
|
fVar12 = fVar12 + fVar10;
|
|
local_164.x = (pVVar3->x - (this->_pos).x) * fVar12 + (this->_pos).x;
|
|
local_17c = GHIDRA_CAST<float *>(((pVVar3->y - (this->_pos).y) * fVar12 + (this->_pos).y));
|
|
(this->_posOffset).y = (*GHIDRA_CAST<float *>((extraout_EDX_00 + 0x350)) - fVar10) * fVar12 + fVar10;
|
|
local_164.y = (float)local_17c;
|
|
local_154 = GHIDRA_CAST<float *>(local_164.x);
|
|
}
|
|
isLocalPlayerOwned = (GHIDRA_CAST<Vector *>((&local_164)))->Vector::operator_ne(&this->_pos);
|
|
if (isLocalPlayerOwned != 0) {
|
|
pVVar3 = Isaac::GetRenderPosition(&local_164,&this->_pos,1);
|
|
local_170 = renderOffset->x;
|
|
local_1b4.y = local_170 + pVVar3->x;
|
|
local_15c = renderOffset->y;
|
|
local_1ac = GHIDRA_CAST<int *>((local_15c + pVVar3->y));
|
|
local_164.x = (float)local_154 + (this->_posOffset).x;
|
|
local_164.y = (float)local_17c + (this->_posOffset).y;
|
|
pVVar3 = Isaac::GetRenderPosition(&local_178,&local_164,1);
|
|
local_184.y = local_15c + pVVar3->y;
|
|
local_184.x = local_170 + pVVar3->x;
|
|
local_15c = local_184.y - (float)local_1ac;
|
|
local_170 = local_184.x - local_1b4.y;
|
|
local_154 = GHIDRA_CAST<float *>(sqrtf(local_15c * local_15c + local_170 * local_170));
|
|
DAT_00c78ef0 = &this->_sprite;
|
|
local_170 = local_170 / (float)local_154;
|
|
DAT_00c78ef4 = 1;
|
|
(*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(&(DAT_00c78ef8)) + 0x0))) = 0;
|
|
g_beamRendererPointsEnd = g_beamRendererPoints;
|
|
local_15c = local_15c / (float)local_154;
|
|
local_158 = GHIDRA_CAST<float *>(0x0);
|
|
if (0.0 < (float)local_154) {
|
|
do {
|
|
fVar12 = 0.0;
|
|
local_164.y = (float)local_154 - (float)local_158;
|
|
fVar10 = (((this->_updateTime + 6.0) - local_164.y * 0.5) - 10.0) / 50.0;
|
|
if (fVar10 <= 0.0) {
|
|
fVar10 = fVar12;
|
|
}
|
|
if (1.0 <= fVar10) {
|
|
fVar10 = 1.0;
|
|
}
|
|
(GHIDRA_CAST<Color *>((&lerpColor)))->Color::Color();
|
|
pCVar2 = Color::Lerp(&scratchColorMod,GHIDRA_CAST<ColorMod *>(&DAT_00c5c8f8),to_00,fVar10 + fVar12)
|
|
;
|
|
beamColor._offset[2] = parentColor._offset[2];
|
|
beamColor._tint[0] = parentColor._tint[0];
|
|
beamColor._tint[1] = parentColor._tint[1];
|
|
beamColor._tint[2] = parentColor._tint[2];
|
|
beamColor._tint[3] = parentColor._tint[3];
|
|
beamColor._colorize[0] = parentColor._colorize[0];
|
|
beamColor._colorize[1] = parentColor._colorize[1];
|
|
beamColor._colorize[2] = parentColor._colorize[2];
|
|
beamColor._colorize[3] = parentColor._colorize[3];
|
|
beamColor._offset[0] = parentColor._offset[0];
|
|
beamColor._offset[1] = parentColor._offset[1];
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&beamColor))))->Color::__mul(pCVar2);
|
|
scratchColor._offset[2] = beamColor._offset[2];
|
|
scratchColor._tint[0] = beamColor._tint[0];
|
|
scratchColor._tint[1] = beamColor._tint[1];
|
|
scratchColor._tint[2] = beamColor._tint[2];
|
|
scratchColor._colorize[0] = beamColor._colorize[0];
|
|
scratchColor._colorize[1] = beamColor._colorize[1];
|
|
scratchColor._colorize[2] = beamColor._colorize[2];
|
|
scratchColor._colorize[3] = beamColor._colorize[3];
|
|
scratchColor._offset[0] = beamColor._offset[0];
|
|
scratchColor._offset[1] = beamColor._offset[1];
|
|
auVar7 = ZEXT812(0x3f800000);
|
|
if ((float)local_158 / 40.0 <= (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar7)) + 0x0)))) {
|
|
(*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(auVar7)) + 0x4))) = (*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(auVar7)) + 0x4)));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar7)) + 0x0))) = (float)local_158 / 40.0;
|
|
}
|
|
scratchColor._tint[3] = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar7)) + 0x0)));
|
|
local_178.x = local_170 * (float)local_158 + local_1b4.y;
|
|
local_178.y = local_15c * (float)local_158 + (float)local_1ac;
|
|
BeamRenderer::Add(&local_178,GHIDRA_CAST<ColorMod *>(&scratchColor),1.0,local_164.y);
|
|
local_158 = GHIDRA_CAST<float *>(((float)local_158 + 10.0));
|
|
} while ((float)local_158 < (float)local_154);
|
|
}
|
|
fVar12 = 0.0;
|
|
fVar10 = ((this->_updateTime + 6.0) - 10.0) / 50.0;
|
|
if (fVar10 <= 0.0) {
|
|
fVar10 = 0.0;
|
|
}
|
|
if (1.0 <= fVar10) {
|
|
fVar10 = 1.0;
|
|
}
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&scratchColorMod))))->Color::Color();
|
|
Color::Lerp(GHIDRA_CAST<ColorMod *>(&lerpColor),GHIDRA_CAST<ColorMod *>(&DAT_00c5c8f8),to_01,fVar10 + fVar12);
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(auStack_1f0))))->Color::operator_assign(GHIDRA_CAST<ColorMod *>(&parentColor));
|
|
FUN_004072e0();
|
|
auVar8 = ZEXT812(0x3f800000);
|
|
if ((float)local_154 / 40.0 <= (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar8)) + 0x0)))) {
|
|
(*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(auVar8)) + 0x4))) = (*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(auVar8)) + 0x4)));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar8)) + 0x0))) = (float)local_154 / 40.0;
|
|
}
|
|
scratchColor._tint[3] = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar8)) + 0x0)));
|
|
BeamRenderer::Add(&local_184,GHIDRA_CAST<ColorMod *>(&scratchColor),1.0,0.0);
|
|
BeamRenderer::End();
|
|
}
|
|
}
|
|
goto LAB_0060ab8d;
|
|
}
|
|
if (iVar1 == 0xbd) {
|
|
if ((this->_subtype == 1) && (0 < this->_state)) {
|
|
local_170 = (this->_velocity).x;
|
|
local_15c = (this->_velocity).y;
|
|
fVar10 = sqrtf(local_170 * local_170 + local_15c * local_15c);
|
|
if ((7.0 < fVar10) && (0.0 < fVar10)) {
|
|
local_170 = (this->_velocity).x * (7.0 / fVar10);
|
|
local_15c = (this->_velocity).y * (7.0 / fVar10);
|
|
}
|
|
iVar1 = 5;
|
|
if (0.0 <= local_15c) {
|
|
pfVar5 = beamColor._tint + 1;
|
|
do {
|
|
pfVar5[1] = 0.0;
|
|
*pfVar5 = 0.0;
|
|
iVar1 = iVar1 + -1;
|
|
pfVar5 = pfVar5 + 2;
|
|
} while (iVar1 != 0);
|
|
pfVar5 = beamColor._tint + 1;
|
|
local_164.y = this->_updateTime * 0.6;
|
|
uVar4 = 4;
|
|
local_170 = -local_170;
|
|
local_15c = -local_15c;
|
|
do {
|
|
local_178.y = sqrtf((float)GHIDRA_INT(uVar4));
|
|
local_178.y = local_178.y * 1.5;
|
|
fVar12 = sin(local_178.y + local_164.y);
|
|
fVar10 = local_1bc.y;
|
|
uVar4 = uVar4 - 1;
|
|
*pfVar5 = (local_170 * local_178.y + 0.0) * 0.65;
|
|
pfVar5[1] = (fVar12 + fVar12 + local_15c * local_178.y) * 0.65;
|
|
pfVar5 = pfVar5 + 2;
|
|
} while (uVar4 < 0x80000000);
|
|
local_158 = GHIDRA_CAST<float *>(0x0);
|
|
do {
|
|
pvVar6 = (void *)0x0;
|
|
if (((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(fVar10) + 0x48)))->_animState)._animData != (void *)0x0) {
|
|
AnimationState::SetFrameFloat
|
|
(&(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(fVar10) + 0x48)))->_animState,(float)GHIDRA_INT(local_158));
|
|
pvVar6 = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(fVar10) + 0x48)))->_animState)._animData;
|
|
}
|
|
local_164.x = beamColor._tint[GHIDRA_INT(local_158) * 2 + 1] +
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_INT(fVar10) + 0x1a4)))->x;
|
|
local_164.y = beamColor._tint[GHIDRA_INT(local_158) * 2 + 2] +
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_INT(fVar10) + 0x1a4)))->y;
|
|
if (((pvVar6 != (void *)0x0) &&
|
|
(1 < *GHIDRA_CAST<int *>((GHIDRA_INT(((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(fVar10) + 0x48)))->_animState)._animation) + 0x80))))
|
|
&& (iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar6) + 0x3c)), -1 < iVar1)) {
|
|
fStack_1dc = 8.868798e-39;
|
|
AnimationLayer::RenderFrame
|
|
(GHIDRA_CAST<AnimationLayer *>((iVar1 * 0x10 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar6) + 0x18)))),&local_164,
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT(((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(fVar10) + 0x48)))->_animState)._layerFrames) +
|
|
iVar1 * 4)),&g_vectorZero,&g_vectorZero,
|
|
((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(fVar10) + 0x48)))->_animState)._animation);
|
|
}
|
|
local_158 = GHIDRA_CAST<float *>((GHIDRA_INT(local_158) + 1));
|
|
} while (GHIDRA_INT(local_158) < 5);
|
|
local_158 = GHIDRA_CAST<float *>(0x0);
|
|
do {
|
|
pvVar6 = (void *)0x0;
|
|
if (((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(fVar10) + 0x48)))->_animState)._animData != (void *)0x0) {
|
|
AnimationState::SetFrameFloat
|
|
(&(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(fVar10) + 0x48)))->_animState,(float)GHIDRA_INT(local_158));
|
|
pvVar6 = ((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(fVar10) + 0x48)))->_animState)._animData;
|
|
}
|
|
local_164.x = beamColor._tint[GHIDRA_INT(local_158) * 2 + 1] +
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_INT(fVar10) + 0x1a4)))->x;
|
|
local_164.y = beamColor._tint[GHIDRA_INT(local_158) * 2 + 2] +
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_INT(fVar10) + 0x1a4)))->y;
|
|
if (((pvVar6 != (void *)0x0) &&
|
|
(0 < *GHIDRA_CAST<int *>((GHIDRA_INT(((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(fVar10) + 0x48)))->_animState)._animation) + 0x80))))
|
|
&& (iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar6) + 0x38)), -1 < iVar1)) {
|
|
fStack_1dc = 8.869034e-39;
|
|
AnimationLayer::RenderFrame
|
|
(GHIDRA_CAST<AnimationLayer *>((iVar1 * 0x10 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar6) + 0x18)))),&local_164,
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT(((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(fVar10) + 0x48)))->_animState)._layerFrames) +
|
|
iVar1 * 4)),&g_vectorZero,&g_vectorZero,
|
|
((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(fVar10) + 0x48)))->_animState)._animation);
|
|
}
|
|
local_158 = GHIDRA_CAST<float *>((GHIDRA_INT(local_158) + 1));
|
|
} while (GHIDRA_INT(local_158) < 5);
|
|
}
|
|
else {
|
|
pfVar5 = parentColor._tint + 1;
|
|
do {
|
|
pfVar5[1] = 0.0;
|
|
*pfVar5 = 0.0;
|
|
iVar1 = iVar1 + -1;
|
|
pfVar5 = pfVar5 + 2;
|
|
} while (iVar1 != 0);
|
|
iVar1 = 0;
|
|
local_164.y = this->_updateTime * 0.6;
|
|
local_170 = -local_170;
|
|
local_15c = -local_15c;
|
|
do {
|
|
local_178.y = sqrtf((float)iVar1);
|
|
local_178.y = local_178.y * 1.5;
|
|
fVar10 = sin(local_178.y + local_164.y);
|
|
parentColor._tint[iVar1 * 2 + 1] = (local_170 * local_178.y + 0.0) * 0.65;
|
|
parentColor._tint[iVar1 * 2 + 2] = (fVar10 + fVar10 + local_15c * local_178.y) * 0.65;
|
|
iVar1 = iVar1 + 1;
|
|
} while (iVar1 < 5);
|
|
local_158 = GHIDRA_CAST<float *>(0x0);
|
|
do {
|
|
if (local_158 == GHIDRA_CAST<float *>(0x0)) {
|
|
iVar1 = 5;
|
|
}
|
|
else {
|
|
iVar1 = 4 - GHIDRA_INT(local_158);
|
|
}
|
|
pvVar6 = (void *)0x0;
|
|
if ((this->_sprite)._animState._animData != (void *)0x0) {
|
|
AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)iVar1);
|
|
pvVar6 = (this->_sprite)._animState._animData;
|
|
}
|
|
local_164.x = parentColor._tint[GHIDRA_INT(local_158) * 2 + 1] + (this->_renderPosition).x;
|
|
local_164.y = parentColor._tint[GHIDRA_INT(local_158) * 2 + 2] + (this->_renderPosition).y;
|
|
if (((pvVar6 != (void *)0x0) &&
|
|
(1 < *GHIDRA_CAST<int *>((GHIDRA_INT((this->_sprite)._animState._animation) + 0x80)))) &&
|
|
(iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar6) + 0x3c)), -1 < iVar1)) {
|
|
fStack_1dc = 8.867977e-39;
|
|
AnimationLayer::RenderFrame
|
|
(GHIDRA_CAST<AnimationLayer *>((iVar1 * 0x10 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar6) + 0x18)))),&local_164,
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT((this->_sprite)._animState._layerFrames) + iVar1 * 4)),
|
|
&g_vectorZero,&g_vectorZero,(this->_sprite)._animState._animation);
|
|
}
|
|
local_158 = GHIDRA_CAST<float *>((GHIDRA_INT(local_158) + 1));
|
|
} while (GHIDRA_INT(local_158) < 5);
|
|
local_158 = GHIDRA_CAST<float *>(0x0);
|
|
do {
|
|
if (local_158 == GHIDRA_CAST<float *>(0x0)) {
|
|
iVar1 = 5;
|
|
}
|
|
else {
|
|
iVar1 = 4 - GHIDRA_INT(local_158);
|
|
}
|
|
pvVar6 = (void *)0x0;
|
|
if ((this->_sprite)._animState._animData != (void *)0x0) {
|
|
AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)iVar1);
|
|
pvVar6 = (this->_sprite)._animState._animData;
|
|
}
|
|
local_164.x = (this->_renderPosition).x + parentColor._tint[GHIDRA_INT(local_158) * 2 + 1];
|
|
local_164.y = parentColor._tint[GHIDRA_INT(local_158) * 2 + 2] + (this->_renderPosition).y;
|
|
if (((pvVar6 != (void *)0x0) &&
|
|
(0 < *GHIDRA_CAST<int *>((GHIDRA_INT((this->_sprite)._animState._animation) + 0x80)))) &&
|
|
(iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar6) + 0x38)), -1 < iVar1)) {
|
|
fStack_1dc = 8.868238e-39;
|
|
AnimationLayer::RenderFrame
|
|
(GHIDRA_CAST<AnimationLayer *>((iVar1 * 0x10 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar6) + 0x18)))),&local_164,
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT((this->_sprite)._animState._layerFrames) + iVar1 * 4)),
|
|
&g_vectorZero,&g_vectorZero,(this->_sprite)._animState._animation);
|
|
}
|
|
local_158 = GHIDRA_CAST<float *>((GHIDRA_INT(local_158) + 1));
|
|
} while (GHIDRA_INT(local_158) < 5);
|
|
}
|
|
goto LAB_0060ab8d;
|
|
}
|
|
}
|
|
else {
|
|
if (iVar1 == 0xbf) {
|
|
fStack_1dc = 8.869122e-39;
|
|
local_190 = (float)__RTDynamicCast();
|
|
if ((local_190 == 0.0) || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_190) + 0x454)) < 1)) goto LAB_0060ab8d;
|
|
iVar1 = this->_parent;
|
|
local_170 = g_vectorOne.x;
|
|
local_15c = g_vectorOne.y;
|
|
local_158 = GHIDRA_CAST<float *>(g_vectorZero.x);
|
|
local_18c = g_vectorZero.y;
|
|
if ((iVar1 == 0) || ((*GHIDRA_CAST<char *>((iVar1 + 0x151)) == '\0' || (*GHIDRA_CAST<int *>((iVar1 + 0x7c)) == 0)))) {
|
|
local_164.x = (this->_pos).x + (this->_posOffset).x;
|
|
local_164.y = (this->_pos).y + (this->_posOffset).y;
|
|
renderPos = Isaac::GetRenderPosition(&local_1b4,&local_164,1);
|
|
fVar10 = renderPos->y;
|
|
fVar12 = renderOffset->y;
|
|
pVVar3->x = renderPos->x + renderOffset->x;
|
|
(this->_renderPosition).y = fVar10 + fVar12;
|
|
}
|
|
else {
|
|
local_154 = AnimationState::GetLayerFrame(GHIDRA_CAST<AnimationState *>((iVar1 + 0x78)),0);
|
|
if ((local_154 == GHIDRA_CAST<float *>(0x0)) || (*GHIDRA_CAST<char *>((local_154 + 0xb)) == '\0')) {
|
|
iVar1 = this->_parent;
|
|
isParentFrameVisible = '\0';
|
|
local_170 = *GHIDRA_CAST<float *>((iVar1 + 0xe4));
|
|
local_15c = *GHIDRA_CAST<float *>((iVar1 + 0xe8));
|
|
if (local_154 != GHIDRA_CAST<float *>(0x0)) goto LAB_00609482;
|
|
}
|
|
else {
|
|
iVar1 = this->_parent;
|
|
isParentFrameVisible = '\x01';
|
|
local_170 = *GHIDRA_CAST<float *>((iVar1 + 0xe4));
|
|
local_15c = *GHIDRA_CAST<float *>((iVar1 + 0xe8));
|
|
LAB_00609482:
|
|
if ((*GHIDRA_CAST<int *>((iVar1 + 0x28)) == 5) && (*GHIDRA_CAST<int *>((iVar1 + 0x2c)) == 0x45)) {
|
|
layer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>((iVar1 + 0x48)),GHIDRA_CAST<uint8_t *>(0x0));
|
|
iVar1 = this->_parent;
|
|
local_158 = GHIDRA_CAST<float *>(((float)local_158 + (layer->_pos).x + local_154[4]));
|
|
local_18c = local_18c + (layer->_pos).y + local_154[5];
|
|
}
|
|
layer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>((iVar1 + 0x48)),GHIDRA_CAST<uint8_t *>(0x0));
|
|
iVar1 = this->_parent;
|
|
local_170 = local_170 * (layer->_size).x * local_154[6];
|
|
local_15c = local_15c * (layer->_size).y * local_154[7];
|
|
}
|
|
local_164.x = *GHIDRA_CAST<float *>((iVar1 + 0x33c)) + *GHIDRA_CAST<float *>((iVar1 + 0x34c));
|
|
local_164.y = *GHIDRA_CAST<float *>((iVar1 + 0x340)) + *GHIDRA_CAST<float *>((iVar1 + 0x350));
|
|
renderPos = Isaac::GetRenderPosition(&local_19c,&local_164,1);
|
|
fVar10 = renderPos->y;
|
|
fVar12 = renderOffset->y;
|
|
pVVar3->x = renderPos->x + renderOffset->x;
|
|
(this->_renderPosition).y = fVar10 + fVar12;
|
|
if (isParentFrameVisible == '\0') goto LAB_0060ab8d;
|
|
}
|
|
local_154 = GHIDRA_CAST<float *>(0x0);
|
|
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_190) + 0x454));
|
|
if (0 < iVar1) {
|
|
local_17c = GHIDRA_CAST<float *>((&DAT_00c5c928 + (((iVar1 + -1) * iVar1) / 2) * 8));
|
|
local_164.y = local_170 * 0.5;
|
|
local_178.y = local_15c * 0.5;
|
|
pfVar5 = GHIDRA_CAST<float *>((GHIDRA_INT(local_190) + 0xa4));
|
|
do {
|
|
pfVar5[-3] = (float)local_158;
|
|
pfVar5[-2] = local_18c;
|
|
pfVar5[-1] = local_164.y;
|
|
*pfVar5 = local_178.y;
|
|
local_184.x = local_170 * *local_17c * 0.65 + pVVar3->x;
|
|
local_184.y = local_15c * local_17c[1] * 0.65 + (this->_renderPosition).y;
|
|
ANM2::Render(GHIDRA_CAST<ANM2 *>((pfVar5 + -0x28)),&local_184,&g_vectorZero,&g_vectorZero);
|
|
pfVar5 = pfVar5 + 0x45;
|
|
local_154 = GHIDRA_CAST<float *>((GHIDRA_INT(local_154) + 1));
|
|
local_17c = local_17c + 2;
|
|
} while (GHIDRA_INT(local_154) < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_190) + 0x454)));
|
|
}
|
|
goto LAB_0060ab8d;
|
|
}
|
|
if (iVar1 == 0x32) {
|
|
pfVar5 = GHIDRA_CAST<float *>(0x3f800000);
|
|
local_154 = GHIDRA_CAST<float *>(0x3f800000);
|
|
if (GHIDRA_CAST<Entity *>(this->_parent) != GHIDRA_CAST<Entity *>(0x0)) {
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this->_parent))))->Entity::GetLastParent();
|
|
fStack_1dc = 8.870603e-39;
|
|
player = GHIDRA_CAST<Entity_Player *>(__RTDynamicCast());
|
|
if (player != GHIDRA_CAST<Entity_Player *>(0x0)) {
|
|
isLocalPlayerOwned = (GHIDRA_CAST<Entity_Player *>((player)))->Entity_Player::IsLocalPlayer();
|
|
if (isLocalPlayerOwned == 0) {
|
|
FUN_00925df0();
|
|
local_154 = pfVar5;
|
|
}
|
|
}
|
|
}
|
|
(GHIDRA_CAST<Color *>((&scratchColor)))->Color::operator_assign(&(this->_sprite)._color);
|
|
game = g_game;
|
|
(this->_sprite)._color._tint[3] = (float)local_154 * (this->_sprite)._color._tint[3];
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(game->_room) + 0x12bc)) == 5) {
|
|
(this->_sprite)._flipY = (this->_sprite)._flipY == 0;
|
|
ANM2::Render(&this->_sprite,&this->_renderPosition,&g_vectorZero,&g_vectorZero);
|
|
(this->_sprite)._flipY = (this->_sprite)._flipY == 0;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(GHIDRA_CAST<ColorMod *>(&scratchColor));
|
|
}
|
|
else {
|
|
ANM2::Render(&this->_sprite,&this->_renderPosition,&g_vectorZero,&g_vectorZero);
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetColor(GHIDRA_CAST<ColorMod *>(&scratchColor));
|
|
}
|
|
goto LAB_0060ab8d;
|
|
}
|
|
}
|
|
}
|
|
ANM2::Render(&this->_sprite,pVVar3,&g_vectorZero,&g_vectorZero);
|
|
iVar1 = this->_variant;
|
|
if (((iVar1 == 0x1e) || (iVar1 == 0x99)) &&
|
|
((this->_sprite)._overlayAnimState._animData != (void *)0x0)) {
|
|
overlayFrame = AnimationState::GetLayerFrame(&(this->_sprite)._overlayAnimState,1);
|
|
if (overlayFrame != GHIDRA_CAST<AnimationState *>(0x0)) {
|
|
AnimationState::copy_assign(&overlayFrameCopy,overlayFrame);
|
|
(GHIDRA_CAST<LayerAnimation *>((&overlayLayer)))->LayerAnimation::LayerAnimation();
|
|
overlayFrameCopy._layerFrames = (void *)(this->_scale * 0.65);
|
|
local_168 = &overlayFrameCopy;
|
|
local_164.x = 1.4013e-45;
|
|
overlayLayer = 1;
|
|
local_164.y = (float)CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_164.y)) + 0x1))),1);
|
|
local_124 = 1;
|
|
fStack_1dc = 8.871164e-39;
|
|
AnimationLayer::RenderFrame
|
|
(GHIDRA_CAST<AnimationLayer *>(&overlayLayer),pVVar3,0,&g_vectorZero,&g_vectorZero,&this->_sprite
|
|
);
|
|
}
|
|
}
|
|
else if (iVar1 == 0xa0) {
|
|
if (((this->_target != 0) && (this->_parent != 0)) &&
|
|
(isLocalPlayerOwned = (GHIDRA_CAST<Vector *>((&this->_targetPosition)))->Vector::operator_ne(&g_vectorZero),
|
|
isLocalPlayerOwned != 0)) {
|
|
fVar10 = (this->_posOffset).x;
|
|
fVar12 = (this->_posOffset).y;
|
|
local_184.y = *GHIDRA_CAST<float *>((this->_parent + 0x340)) + (this->_parentOffset).y;
|
|
local_184.x = *GHIDRA_CAST<float *>((this->_parent + 0x33c)) + (this->_parentOffset).x;
|
|
local_164.y = *GHIDRA_CAST<float *>((this->_target + 0x33c)) + fVar10;
|
|
local_154 = GHIDRA_CAST<float *>((fVar10 + *extraout_ECX));
|
|
local_178.y = *GHIDRA_CAST<float *>((this->_target + 0x340)) + fVar12;
|
|
local_17c = GHIDRA_CAST<float *>((fVar12 + extraout_ECX[1]));
|
|
fVar10 = local_184.x - local_164.y;
|
|
fVar12 = local_184.y - local_178.y;
|
|
if (900.0 <= fVar12 * fVar12 + fVar10 * fVar10) {
|
|
local_19c.x = fVar10;
|
|
local_19c.y = fVar12;
|
|
pVVar3 = (GHIDRA_CAST<Vector *>((&local_19c)))->Vector::Resized(&local_1b4,30.0);
|
|
local_164.x = local_164.y + pVVar3->x;
|
|
local_164.y = local_178.y + pVVar3->y;
|
|
pVVar3 = Isaac::GetRenderPosition(&local_178,&local_164,1);
|
|
local_170 = renderOffset->x;
|
|
local_15c = renderOffset->y;
|
|
local_1bc.y = local_170 + pVVar3->x;
|
|
local_18c = local_15c + pVVar3->y;
|
|
local_164.x = local_184.x - (float)local_154;
|
|
local_164.y = local_184.y - (float)local_17c;
|
|
pVVar3 = (GHIDRA_CAST<Vector *>((&local_164)))->Vector::Resized(&local_178,30.0);
|
|
local_164.x = (float)local_154 + pVVar3->x;
|
|
local_164.y = (float)local_17c + pVVar3->y;
|
|
isLocalPlayerOwned = 1;
|
|
pVVar3 = Isaac::GetRenderPosition(&local_19c,&local_164,1);
|
|
local_194 = local_170 + pVVar3->x;
|
|
local_158 = GHIDRA_CAST<float *>((local_15c + pVVar3->y));
|
|
pVVar3 = Isaac::GetRenderPosition(&local_164,&local_184,1);
|
|
local_170 = local_170 + pVVar3->x;
|
|
local_15c = local_15c + pVVar3->y;
|
|
local_154 = GHIDRA_CAST<float *>(0x3f800000);
|
|
uVar4 = (GHIDRA_CAST<Game *>((g_game)))->Game::GetStageID(isLocalPlayerOwned);
|
|
if (uVar4 == 0x1e) {
|
|
local_154 = GHIDRA_CAST<float *>(0x3eb33333);
|
|
}
|
|
BeamRenderer::Begin(&this->_sprite,0,0,0);
|
|
local_164.y = 0.0;
|
|
local_1bc.y = local_1bc.y - local_170;
|
|
local_190 = 0.0;
|
|
local_194 = local_194 - local_170;
|
|
local_164.x = 0.0;
|
|
local_18c = local_18c - local_15c;
|
|
local_17c = GHIDRA_CAST<float *>(0x0);
|
|
local_158 = GHIDRA_CAST<float *>(((float)local_158 - local_15c));
|
|
do {
|
|
fVar11 = (float)((double)GHIDRA_INT(local_17c) +
|
|
__uint_to_double_fixup[-(GHIDRA_INT(local_17c) >> 0x1f)]) / 10.0;
|
|
fVar10 = local_194 * fVar11 + local_170;
|
|
fVar12 = (float)local_158 * fVar11 + local_15c;
|
|
pfVar5 = GHIDRA_CAST<float *>((((local_1bc.y * fVar11 + local_170) - fVar10) * fVar11 + fVar10));
|
|
curveY = ((local_18c * fVar11 + local_15c) - fVar12) * fVar11 + fVar12;
|
|
if (local_17c != GHIDRA_CAST<float *>(0x0)) {
|
|
fVar10 = curveY - local_164.y;
|
|
fVar12 = (float)pfVar5 - local_164.x;
|
|
local_164.x = (float)pfVar5;
|
|
local_164.y = curveY;
|
|
fVar10 = sqrtf(fVar10 * fVar10 + fVar12 * fVar12);
|
|
local_190 = fVar10 + local_190;
|
|
pfVar5 = GHIDRA_CAST<float *>(local_164.x);
|
|
curveY = local_164.y;
|
|
}
|
|
local_164.y = curveY;
|
|
local_164.x = (float)pfVar5;
|
|
(GHIDRA_CAST<Color *>((&scratchColor)))->Color::Reset();
|
|
scratchColor._tint[0] = 1.0;
|
|
scratchColor._tint[1] = 1.0;
|
|
scratchColor._tint[2] = 1.0;
|
|
scratchColor._tint[3] = (float)local_154;
|
|
BeamRenderer::Add(&local_164,GHIDRA_CAST<ColorMod *>(&scratchColor),0.9,local_190);
|
|
local_17c = GHIDRA_CAST<float *>((GHIDRA_INT(local_17c) + 1));
|
|
} while (local_17c < &DAT_0000000b);
|
|
BeamRenderer::End();
|
|
}
|
|
}
|
|
}
|
|
else if (iVar1 == 0x7e) {
|
|
if ((this->_subtype == 1) &&
|
|
(isLocalPlayerOwned = (GHIDRA_CAST<Vector *>((&this->_targetPosition)))->Vector::operator_ne(&g_vectorZero),
|
|
isLocalPlayerOwned != 0)) {
|
|
local_164.y = (float)this->_timeout;
|
|
if (this->_timeout < 6) {
|
|
fVar10 = (local_164.y - 0.0) / 5.0;
|
|
if (fVar10 <= 0.0) {
|
|
fVar10 = 0.0;
|
|
}
|
|
if (1.0 <= fVar10) {
|
|
fVar10 = 1.0;
|
|
}
|
|
fVar10 = fVar10 * 0.8 + 0.2;
|
|
local_158 = GHIDRA_CAST<float *>((2.0 - fVar10));
|
|
}
|
|
else {
|
|
local_178.y = (float)this->_lifespan;
|
|
if (local_178.y == 5.0) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("Start and End parameters cannot be the same!"));
|
|
}
|
|
fVar10 = (local_164.y - 5.0) / (local_178.y - 5.0);
|
|
if (fVar10 <= 0.0) {
|
|
fVar10 = 0.0;
|
|
}
|
|
if (1.0 <= fVar10) {
|
|
fVar10 = 1.0;
|
|
}
|
|
fVar10 = pow(1.0 - fVar10,0.5);
|
|
local_158 = GHIDRA_CAST<float *>(0x3f800000);
|
|
}
|
|
fVar12 = 1.0;
|
|
BeamRenderer::Begin(&this->_sprite,1,0,1);
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&scratchColorMod))))->Color::Color(fVar12,fVar12,fVar12,fVar10 * 0.5);
|
|
local_164.x = (this->_pos).x + (this->_posOffset).x;
|
|
local_164.y = (this->_pos).y + (this->_posOffset).y;
|
|
pVVar3 = Isaac::GetRenderPosition(&local_178,&local_164,1);
|
|
local_164.x = renderOffset->x + pVVar3->x;
|
|
local_164.y = pVVar3->y + renderOffset->y;
|
|
BeamRenderer::Add(&local_164,tmpColor,(float)local_158,0.0);
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&scratchColorMod))))->Color::Color(1.0,1.0,1.0,0.0);
|
|
local_164.x = (this->_pos).x + (this->_posOffset).x + (this->_targetPosition).x * 700.0;
|
|
local_164.y = (this->_posOffset).y + (this->_pos).y + (this->_targetPosition).y * 700.0;
|
|
pVVar3 = Isaac::GetRenderPosition(&local_178,&local_164,1);
|
|
fVar10 = 0.0;
|
|
pCVar2 = extraout_EAX;
|
|
pfVar5 = local_158;
|
|
LAB_0060a8db:
|
|
local_164.x = pVVar3->x + renderOffset->x;
|
|
LAB_0060a8e9:
|
|
local_164.y = pVVar3->y + renderOffset->y;
|
|
BeamRenderer::Add(&local_164,pCVar2,(float)pfVar5,fVar10);
|
|
BeamRenderer::End();
|
|
}
|
|
}
|
|
else if (iVar1 == 0xac) {
|
|
if ((this->_subtype == 1) &&
|
|
(isLocalPlayerOwned = (GHIDRA_CAST<Vector *>((&this->_targetPosition)))->Vector::operator_ne(&g_vectorZero),
|
|
isLocalPlayerOwned != 0)) {
|
|
local_184.x = (float)*extraout_ECX_00;
|
|
local_18c = (float)extraout_ECX_00[1];
|
|
local_184.y = local_18c;
|
|
local_158 = GHIDRA_CAST<float *>(local_184.x);
|
|
if ((g_manager->_framecount & 1) == 0) {
|
|
local_164.y = this->_rotation * this->_speedMultiplier * 0.5 * 0.017453292;
|
|
local_178.y = cos(local_164.y);
|
|
fVar10 = sin(local_164.y);
|
|
local_184.y = (float)local_158 * fVar10;
|
|
local_158 = GHIDRA_CAST<float *>(((float)local_158 * local_178.y - local_18c * fVar10));
|
|
local_184.y = local_18c * local_178.y + local_184.y;
|
|
}
|
|
local_164.y = (float)this->_timeout;
|
|
local_18c = local_184.y;
|
|
local_184.x = (float)local_158;
|
|
if (this->_timeout < 6) {
|
|
fVar10 = (local_164.y - 0.0) / 5.0;
|
|
if (fVar10 <= 0.0) {
|
|
fVar10 = 0.0;
|
|
}
|
|
if (1.0 <= fVar10) {
|
|
fVar10 = 1.0;
|
|
}
|
|
fVar10 = fVar10 * 0.8 + 0.2;
|
|
fVar11 = 2.0 - fVar10;
|
|
local_154 = GHIDRA_CAST<float *>((fVar10 * fVar10));
|
|
}
|
|
else {
|
|
iVar1 = this->_lifespan;
|
|
local_178.y = (float)iVar1;
|
|
if (local_178.y == 5.0) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("Start and End parameters cannot be the same!"));
|
|
iVar1 = this->_lifespan;
|
|
}
|
|
fVar10 = (local_164.y - 5.0) / (local_178.y - 5.0);
|
|
if (fVar10 <= 0.0) {
|
|
fVar10 = 0.0;
|
|
}
|
|
if (1.0 <= fVar10) {
|
|
fVar10 = 1.0;
|
|
}
|
|
fVar10 = pow(1.0 - fVar10,0.5);
|
|
fVar11 = 1.0;
|
|
fVar12 = (float)(iVar1 - this->_timeout) / 15.0;
|
|
if (1.0 <= fVar12) {
|
|
fVar12 = 1.0;
|
|
}
|
|
local_154 = GHIDRA_CAST<float *>((fVar12 * fVar10 * fVar10));
|
|
}
|
|
fVar10 = 1.0;
|
|
local_164.y = (this->_sprite)._scale.x;
|
|
local_17c = GHIDRA_CAST<float *>((local_164.y * fVar11));
|
|
BeamRenderer::Begin(&this->_sprite,1,0,1);
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&scratchColorMod))))->Color::Color(fVar10,fVar10,fVar10,0.5);
|
|
local_178.x = (this->_posOffset).x + (this->_pos).x + (float)local_158;
|
|
local_178.y = (this->_posOffset).y + (this->_pos).y + local_18c;
|
|
pVVar3 = Isaac::GetRenderPosition(&local_19c,&local_178,1);
|
|
local_178.x = renderOffset->x + pVVar3->x;
|
|
local_178.y = pVVar3->y + renderOffset->y;
|
|
BeamRenderer::Add(&local_178,color,(float)local_17c,0.0);
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&scratchColorMod))))->Color::Color(1.0,1.0,1.0,0.0);
|
|
pVVar3 = (GHIDRA_CAST<Vector *>((&local_184)))->Vector::Resized(&local_178,((float)local_154 * 250.0 + 40.0) * local_164.y);
|
|
local_164.x = (this->_pos).x + (this->_posOffset).x + pVVar3->x;
|
|
local_164.y = (this->_posOffset).y + (this->_pos).y + pVVar3->y;
|
|
pVVar3 = Isaac::GetRenderPosition(&local_184,&local_164,1);
|
|
fVar10 = 0.0;
|
|
local_164.x = renderOffset->x + pVVar3->x;
|
|
pCVar2 = extraout_EAX_00;
|
|
pfVar5 = local_17c;
|
|
goto LAB_0060a8e9;
|
|
}
|
|
}
|
|
else if (iVar1 == 0xc6) {
|
|
local_178.x = (this->_targetPosition).x;
|
|
local_178.y = (this->_targetPosition).y;
|
|
local_158 = GHIDRA_CAST<float *>((this->_sprite)._scale.x);
|
|
pvVar6 = g_game->_room;
|
|
if (ABS(local_178.x) <= ABS(local_178.y)) {
|
|
fVar10 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar6) + 0x20)) - *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar6) + 0x18));
|
|
}
|
|
else {
|
|
fVar10 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar6) + 0x1c)) - *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar6) + 0x14));
|
|
}
|
|
local_154 = GHIDRA_CAST<float *>((fVar10 * 0.8));
|
|
ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x1));
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(auStack_1f0))))->Color::operator_assign(&(this->_sprite)._color);
|
|
FUN_004072e0();
|
|
(GHIDRA_CAST<Color *>((&scratchColor)))->Color::operator_assign(&beamColor);
|
|
scratchColor._tint[3] = 0.0;
|
|
BeamRenderer::Begin(&this->_sprite,1,0,1);
|
|
local_164.x = (this->_pos).x + (this->_posOffset).x;
|
|
local_164.y = (this->_posOffset).y + (this->_pos).y;
|
|
pVVar3 = Isaac::GetRenderPosition(&local_184,&local_164,1);
|
|
local_164.x = pVVar3->x + renderOffset->x;
|
|
local_164.y = pVVar3->y + renderOffset->y;
|
|
BeamRenderer::Add(&local_164,GHIDRA_CAST<ColorMod *>(&scratchColor),(float)local_158,1.0);
|
|
auVar9 = ZEXT812(0x42700000);
|
|
if ((float)local_154 * 0.5 <= (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar9)) + 0x0)))) {
|
|
(*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(auVar9)) + 0x4))) = (*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(auVar9)) + 0x4)));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar9)) + 0x0))) = (float)local_154 * 0.5;
|
|
}
|
|
pVVar3 = (GHIDRA_CAST<Vector *>((&local_178)))->Vector::Resized(&local_184,(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(auVar9)) + 0x0))));
|
|
local_164.x = (this->_posOffset).x + (this->_pos).x + pVVar3->x;
|
|
local_164.y = (this->_posOffset).y + (this->_pos).y + pVVar3->y;
|
|
pVVar3 = Isaac::GetRenderPosition(&local_19c,&local_164,1);
|
|
local_164.x = pVVar3->x + renderOffset->x;
|
|
local_164.y = pVVar3->y + renderOffset->y;
|
|
BeamRenderer::Add(&local_164,&beamColor,(float)local_158,0.0);
|
|
pVVar3 = (GHIDRA_CAST<Vector *>((&local_178)))->Vector::Resized(&local_184,(float)local_154);
|
|
local_164.x = (this->_posOffset).x + (this->_pos).x + pVVar3->x;
|
|
local_164.y = (this->_posOffset).y + (this->_pos).y + pVVar3->y;
|
|
pVVar3 = Isaac::GetRenderPosition(&local_178,&local_164,1);
|
|
local_164.x = pVVar3->x + renderOffset->x;
|
|
local_164.y = pVVar3->y + renderOffset->y;
|
|
BeamRenderer::Add(&local_164,GHIDRA_CAST<ColorMod *>(&scratchColor),(float)local_158,1.0);
|
|
BeamRenderer::End();
|
|
}
|
|
else if ((iVar1 == 0xbe) && (this->_state != 3)) {
|
|
fVar10 = (this->_targetPosition).x;
|
|
fVar12 = (this->_targetPosition).y;
|
|
pvVar6 = g_game->_room;
|
|
fVar11 = (this->_sprite)._color._tint[3];
|
|
if (ABS(fVar10) <= ABS(fVar12)) {
|
|
local_154 = GHIDRA_CAST<float *>((*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar6) + 0x20)) - *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar6) + 0x18))));
|
|
}
|
|
else {
|
|
local_154 = GHIDRA_CAST<float *>((*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar6) + 0x1c)) - *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar6) + 0x14))));
|
|
}
|
|
local_178.x = fVar10;
|
|
local_178.y = fVar12;
|
|
BeamRenderer::Begin(&this->_sprite,1,0,1);
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&scratchColorMod))))->Color::Color(1.0,1.0,1.0,fVar11);
|
|
local_164.x = (this->_posOffset).x + (this->_pos).x + fVar10;
|
|
local_164.y = (this->_pos).y + (this->_posOffset).y + fVar12;
|
|
pVVar3 = Isaac::GetRenderPosition(&local_184,&local_164,1);
|
|
local_164.x = renderOffset->x + pVVar3->x;
|
|
local_164.y = pVVar3->y + renderOffset->y;
|
|
BeamRenderer::Add(&local_164,color_00,1.0,0.0);
|
|
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&scratchColorMod))))->Color::Color(1.0,1.0,1.0,0.0);
|
|
pVVar3 = (GHIDRA_CAST<Vector *>((&local_178)))->Vector::Resized(&local_184,(float)local_154 * 0.8);
|
|
local_164.x = (this->_posOffset).x + (this->_pos).x + pVVar3->x;
|
|
local_164.y = (this->_pos).y + (this->_posOffset).y + pVVar3->y;
|
|
pVVar3 = Isaac::GetRenderPosition(&local_178,&local_164,1);
|
|
pfVar5 = GHIDRA_CAST<float *>(0x3f800000);
|
|
fVar10 = 1.0;
|
|
pCVar2 = extraout_EAX_01;
|
|
goto LAB_0060a8db;
|
|
}
|
|
if ((this->_variant == 0x6c) && (this->_state == 2)) {
|
|
fStack_1dc = 8.87695e-39;
|
|
local_164.y = (float)__RTDynamicCast();
|
|
if ((this->_child != 0) &&
|
|
(((GHIDRA_CAST<float *>(local_164.y) != GHIDRA_CAST<float *>(0x0) && (*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(local_164.y) + 0x111)) != '\0')) &&
|
|
(pfVar5 = (GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::GetNullFrame(GHIDRA_CAST<uint8_t *>("CarryPos")),
|
|
pfVar5 != GHIDRA_CAST<float *>(0x0))))) {
|
|
local_178.x = *pfVar5 + (this->_renderPosition).x;
|
|
local_178.y = (this->_renderPosition).y + pfVar5[1];
|
|
ANM2::Render(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(local_164.y) + 8)),&local_178,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
}
|
|
LAB_0060ab8d:
|
|
FUN_008614f0();
|
|
return;
|
|
LAB_00607e4b:
|
|
BeamRenderer::End();
|
|
goto LAB_0060ab8d;
|
|
}
|
|
|
|
// 0060abb0
|
|
void Entity_Effect::ClearReferences()
|
|
{
|
|
int variant;
|
|
Entity_Player *target;
|
|
|
|
variant = this->_variant;
|
|
if (variant == 0xb3) {
|
|
target = GHIDRA_CAST<Entity_Player *>(this->_target);
|
|
if ((target == GHIDRA_CAST<Entity_Player *>(0x0)) || (target->_type != 1)) goto LAB_0060ac03;
|
|
(GHIDRA_CAST<Entity_Player *>((target)))->Entity_Player::AddUrnSouls(1);
|
|
variant = this->_variant;
|
|
}
|
|
if (((variant == 0xc1) && (this->_subtype == 0)) && (this->_visible == 0)) {
|
|
(GHIDRA_CAST<SFXManager *>((&g_manager->_sfxManager)))->SFXManager::Stop(0x1f7);
|
|
}
|
|
LAB_0060ac03:
|
|
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::ClearReferences();
|
|
ExtraDataRef::Set(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4b4))),(void *)0x0);
|
|
return;
|
|
}
|
|
|
|
// 0060ac20
|
|
uint8_t Entity_Effect::IsPlayerCreep(int variant)
|
|
{
|
|
if (((((variant == 0x36) || (variant == 0x2d)) || (variant == 0x2e)) ||
|
|
((((variant == 0x2c || (variant == 0x25)) ||
|
|
((variant == 0x35 || ((variant == 0x20 || (variant == 0x4e)))))) || (variant == 0xcc)))) ||
|
|
(((variant == 0x5c || (variant == 0x5a)) || (variant == 0x5d)))) {
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
// 0060af00
|
|
Entity_Effect * Entity_Effect::CreateTimer(void *fn, uint32_t delay, uint32_t times, uint8_t isPersistent)
|
|
{
|
|
uint32_t seed;
|
|
Entity_Effect *timer;
|
|
uint64_t flags;
|
|
uint32_t *flagsHigh;
|
|
|
|
seed = Random();
|
|
timer = (Entity_Effect *)
|
|
(GHIDRA_CAST<Game *>((g_game)))->Game::SpawnEx(1000,0x77,&g_vectorZero,&g_vectorZero,GHIDRA_CAST<Entity *>(0x0),0,seed,0);
|
|
*(void **)&(timer->_varData)._l = fn;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&(timer->_varData)._l) + 4)) = delay;
|
|
*GHIDRA_CAST<uint32_t *>(&(timer->_varData)._h) = times;
|
|
if (isPersistent != 0) {
|
|
flags = timer->_flags;
|
|
flagsHigh = GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&timer->_flags) + 4));
|
|
*flagsHigh = *flagsHigh | 0x20;
|
|
*GHIDRA_CAST<int *>(&timer->_flags) = GHIDRA_INT(flags);
|
|
}
|
|
return timer;
|
|
}
|
|
|
|
// 0060b0d0
|
|
void Entity_Effect::update_variant178_shooter(uint8_t isPositionOnly)
|
|
{
|
|
float fVar1;
|
|
uint8_t bVar2;
|
|
char *directionName;
|
|
int iVar3;
|
|
uint8_t *******pppppppbVar4;
|
|
uint8_t *pbVar5;
|
|
void *freeBlock;
|
|
uint8_t *pbVar6;
|
|
char *currentAnimName;
|
|
uint32_t uVar7;
|
|
uint8_t *pbVar8;
|
|
uint8_t *******pppppppbVar9;
|
|
bool bVar10;
|
|
float fVar11;
|
|
float fVar12;
|
|
float fVar13;
|
|
uint64_t uVar14;
|
|
float turnLerp;
|
|
uint8_t *fullAnimName;
|
|
void *local_84 [4];
|
|
uint32_t local_74;
|
|
uint32_t local_70;
|
|
void *local_6c;
|
|
uint32_t local_5c;
|
|
uint32_t local_58;
|
|
void *local_54 [4];
|
|
uint32_t local_44;
|
|
uint32_t local_40;
|
|
uint8_t *******joinedAnimName [5];
|
|
uint32_t local_28;
|
|
uint32_t local_24;
|
|
uint8_t *puStack_20;
|
|
void *local_1c;
|
|
uint8_t *puStack_18;
|
|
uint8_t ******local_14;
|
|
|
|
puStack_20 = GHIDRA_CAST<uint8_t *>((joinedAnimName + 0xe));
|
|
local_14 = GHIDRA_CAST<uint8_t ******>(0xffffffff);
|
|
puStack_18 = &DAT_00af6605;
|
|
local_1c = ExceptionList;
|
|
local_24 = __security_cookie ^ GHIDRA_UINT((joinedAnimName + 0xb));
|
|
iVar3 = this->_parent;
|
|
if (iVar3 == 0) {
|
|
if (isPositionOnly == 0) {
|
|
ExceptionList = &local_1c;
|
|
puStack_20 = GHIDRA_CAST<uint8_t *>((joinedAnimName + 0xe));
|
|
this->Remove(local_24);
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
fVar12 = 0.4;
|
|
turnLerp = 0.4;
|
|
ExceptionList = &local_1c;
|
|
pppppppbVar9 = GHIDRA_CAST<uint8_t *******>((joinedAnimName + 0xe));
|
|
if (isPositionOnly == 0) {
|
|
fVar1 = this->_speedMultiplier;
|
|
if (fVar1 != 1.0) {
|
|
fVar12 = 0.4 / ((fVar1 + 0.4) - fVar1 * 0.4);
|
|
}
|
|
fVar1 = (this->_sprite)._rotation;
|
|
fVar11 = this->_rotation;
|
|
fVar13 = fVar11 - fVar1;
|
|
pppppppbVar9 = GHIDRA_CAST<uint8_t *******>((joinedAnimName + 0xe));
|
|
if (360.0 < ABS(fVar13)) {
|
|
fVar13 = fmodf(fVar13,360.0);
|
|
pppppppbVar9 = GHIDRA_CAST<uint8_t *******>(puStack_20);
|
|
}
|
|
puStack_20 = GHIDRA_CAST<uint8_t *>(pppppppbVar9);
|
|
if (fVar13 <= 180.0) {
|
|
if (fVar13 < -180.0) {
|
|
fVar13 = fVar13 + 360.0;
|
|
}
|
|
}
|
|
else {
|
|
fVar13 = fVar13 - 360.0;
|
|
}
|
|
fVar12 = approach_angle(fVar1,fVar11,ABS(fVar13 * fVar12));
|
|
(this->_sprite)._rotation = fVar12;
|
|
pppppppbVar9 = GHIDRA_CAST<uint8_t *******>(puStack_20);
|
|
}
|
|
puStack_20 = GHIDRA_CAST<uint8_t *>(pppppppbVar9);
|
|
fVar12 = this->_speedMultiplier;
|
|
if (fVar12 != 1.0) {
|
|
turnLerp = 0.4 / ((fVar12 + 0.4) - fVar12 * 0.4);
|
|
}
|
|
fVar12 = (this->_sprite)._rotation;
|
|
if (isPositionOnly != 0) {
|
|
fVar1 = this->_rotation;
|
|
fVar11 = fVar1 - fVar12;
|
|
if (360.0 < ABS(fVar11)) {
|
|
fVar11 = fmodf(fVar11,360.0);
|
|
}
|
|
if (fVar11 <= 180.0) {
|
|
if (fVar11 < -180.0) {
|
|
fVar11 = fVar11 + 360.0;
|
|
}
|
|
}
|
|
else {
|
|
fVar11 = fVar11 - 360.0;
|
|
}
|
|
fVar12 = approach_angle(fVar12,fVar1,ABS(fVar11 * turnLerp) * 0.5);
|
|
}
|
|
fVar13 = sin(fVar12 * 0.017453292);
|
|
fVar1 = *GHIDRA_CAST<float *>((iVar3 + 0x33c));
|
|
fVar11 = *GHIDRA_CAST<float *>((iVar3 + 0x340));
|
|
fVar12 = cos(fVar12 * 0.017453292);
|
|
(this->_pos).x = fVar1 + fVar12 * 18.0;
|
|
(this->_pos).y = fVar11 + fVar13 * 18.0;
|
|
(this->_velocity).x = g_vectorZero.x;
|
|
(this->_velocity).y = g_vectorZero.y;
|
|
if (isPositionOnly != 0) {
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
iVar3 = this->_state;
|
|
if (iVar3 < 0) {
|
|
this->_state = iVar3 + 1;
|
|
switchD_0060b3c2_caseD_0:
|
|
pbVar8 = s_Idle;
|
|
}
|
|
else {
|
|
switch(iVar3) {
|
|
case 0:
|
|
goto switchD_0060b3c2_caseD_0;
|
|
case 1:
|
|
case 2:
|
|
pbVar8 = GHIDRA_CAST<uint8_t *>("ShootBegin");
|
|
break;
|
|
case 3:
|
|
pbVar8 = GHIDRA_CAST<uint8_t *>("ShootLoop");
|
|
break;
|
|
case 4:
|
|
pbVar8 = GHIDRA_CAST<uint8_t *>("ShootEnd");
|
|
break;
|
|
default:
|
|
goto switchD_0060b3c2_default;
|
|
}
|
|
}
|
|
fVar12 = (this->_sprite)._rotation;
|
|
if (360.0 < ABS(fVar12)) {
|
|
fVar12 = fmodf(fVar12,360.0);
|
|
}
|
|
if (fVar12 <= 180.0) {
|
|
if (fVar12 < -180.0) {
|
|
fVar12 = fVar12 + 360.0;
|
|
}
|
|
}
|
|
else {
|
|
fVar12 = fVar12 - 360.0;
|
|
}
|
|
if ((fVar12 < 20.0) || (160.0 < fVar12)) {
|
|
if ((fVar12 < -160.0) || (-20.0 < fVar12)) {
|
|
if ((160.0 < fVar12) || (directionName = "Right", fVar12 < -160.0)) {
|
|
directionName = "Left";
|
|
}
|
|
}
|
|
else {
|
|
directionName = "Up";
|
|
}
|
|
}
|
|
else {
|
|
directionName = "Down";
|
|
}
|
|
currentAnimName = (this->_sprite)._animState._animData;
|
|
if (currentAnimName != GHIDRA_CAST<char *>(0x0)) {
|
|
pbVar5 = pbVar8;
|
|
do {
|
|
bVar2 = *pbVar5;
|
|
pbVar5 = pbVar5 + 1;
|
|
} while (bVar2 != 0);
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((currentAnimName + 0x14))) {
|
|
currentAnimName = *GHIDRA_CAST<char **>(currentAnimName);
|
|
}
|
|
iVar3 = strncmp(GHIDRA_CAST<char *>(pbVar8),currentAnimName,GHIDRA_INT(pbVar5) - GHIDRA_INT((pbVar8 + 1)));
|
|
if (iVar3 == 0) {
|
|
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>(local_54))))->msvc::string::string_from_cstr(pbVar8);
|
|
local_14 = GHIDRA_CAST<uint8_t ******>(0x0);
|
|
FUN_0060c790(directionName);
|
|
local_14 = GHIDRA_CAST<uint8_t ******>(CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x1))),2));
|
|
if (0xf < local_40) {
|
|
uVar7 = local_40 + 1;
|
|
freeBlock = local_54[0];
|
|
if (0xfff < uVar7) {
|
|
freeBlock = *(void **)(GHIDRA_INT(local_54[0]) + -4);
|
|
uVar7 = local_40 + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_54[0]) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar7);
|
|
}
|
|
pppppppbVar9 = joinedAnimName[0];
|
|
local_44 = 0;
|
|
local_40 = 0xf;
|
|
local_54[0] = (void *)(GHIDRA_UINT(local_54[0]) & 0xffffff00);
|
|
uVar14 = _string_holder_c_str();
|
|
do {
|
|
pbVar5 = GHIDRA_CAST<uint8_t *>(((uint64_t)uVar14 >> 0x20));
|
|
pbVar8 = GHIDRA_CAST<uint8_t *>(uVar14);
|
|
bVar2 = *pbVar5;
|
|
bVar10 = bVar2 < *pbVar8;
|
|
if (bVar2 != *pbVar8) {
|
|
LAB_0060b567:
|
|
uVar7 = -GHIDRA_UINT(bVar10) | 1;
|
|
goto LAB_0060b56c;
|
|
}
|
|
if (bVar2 == 0) break;
|
|
bVar2 = pbVar5[1];
|
|
bVar10 = bVar2 < pbVar8[1];
|
|
if (bVar2 != pbVar8[1]) goto LAB_0060b567;
|
|
uVar14 = CONCAT44(pbVar5 + 2,pbVar8 + 2);
|
|
} while (bVar2 != 0);
|
|
uVar7 = 0;
|
|
LAB_0060b56c:
|
|
if (uVar7 != 0) {
|
|
pppppppbVar4 = GHIDRA_CAST<uint8_t *******>(joinedAnimName);
|
|
if (0xf < local_28) {
|
|
pppppppbVar4 = pppppppbVar9;
|
|
}
|
|
ANM2::SetAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>(pppppppbVar4),0);
|
|
pppppppbVar9 = joinedAnimName[0];
|
|
}
|
|
local_14 = GHIDRA_CAST<uint8_t ******>(0xffffffff);
|
|
if (0xf < local_28) {
|
|
uVar7 = local_28 + 1;
|
|
pppppppbVar4 = pppppppbVar9;
|
|
if (0xfff < uVar7) {
|
|
pppppppbVar4 = GHIDRA_CAST<uint8_t *******>(pppppppbVar9[-1]);
|
|
uVar7 = local_28 + 0x24;
|
|
if (GHIDRA_CAST<uint8_t *>(0x1f) < GHIDRA_CAST<uint8_t *>((GHIDRA_INT(pppppppbVar9) + (-4 - GHIDRA_INT(pppppppbVar4))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(pppppppbVar4,uVar7);
|
|
}
|
|
goto switchD_0060b3c2_default;
|
|
}
|
|
}
|
|
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>(local_84))))->msvc::string::string_from_cstr(pbVar8);
|
|
local_14 = GHIDRA_CAST<uint8_t ******>(0x3);
|
|
fullAnimName = GHIDRA_CAST<uint8_t *>(FUN_0060c790(directionName));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 4;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((fullAnimName + 0x14))) {
|
|
fullAnimName = *GHIDRA_CAST<uint8_t **>(fullAnimName);
|
|
}
|
|
pbVar8 = (this->_sprite)._animState._animData;
|
|
if (pbVar8 == GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
LAB_0060b64b:
|
|
bVar2 = ANM2::SetAnimation(&this->_sprite,fullAnimName,1);
|
|
if (bVar2 != 0) {
|
|
AnimationState::Rewind(&(this->_sprite)._animState);
|
|
(this->_sprite)._animState._isPlaying = 1;
|
|
}
|
|
}
|
|
else {
|
|
pbVar5 = pbVar8;
|
|
pbVar6 = fullAnimName;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((pbVar8 + 0x14))) {
|
|
pbVar5 = *GHIDRA_CAST<uint8_t **>(pbVar8);
|
|
}
|
|
do {
|
|
bVar2 = *pbVar5;
|
|
bVar10 = bVar2 < *pbVar6;
|
|
if (bVar2 != *pbVar6) {
|
|
LAB_0060b632:
|
|
uVar7 = -GHIDRA_UINT(bVar10) | 1;
|
|
goto LAB_0060b637;
|
|
}
|
|
if (bVar2 == 0) break;
|
|
bVar2 = pbVar5[1];
|
|
bVar10 = bVar2 < pbVar6[1];
|
|
if (bVar2 != pbVar6[1]) goto LAB_0060b632;
|
|
pbVar5 = pbVar5 + 2;
|
|
pbVar6 = pbVar6 + 2;
|
|
} while (bVar2 != 0);
|
|
uVar7 = 0;
|
|
LAB_0060b637:
|
|
if ((uVar7 != 0) || ((pbVar8[0x34] != 0 && ((this->_sprite)._animState._isPlaying == 0))))
|
|
goto LAB_0060b64b;
|
|
}
|
|
local_14 = GHIDRA_CAST<uint8_t ******>(CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x1))),3));
|
|
if (0xf < local_58) {
|
|
uVar7 = local_58 + 1;
|
|
freeBlock = local_6c;
|
|
if (0xfff < uVar7) {
|
|
freeBlock = *(void **)(GHIDRA_CAST<char *>(local_6c) + -4);
|
|
uVar7 = local_58 + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_6c) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_0060b6dc;
|
|
}
|
|
operator_delete(freeBlock,uVar7);
|
|
}
|
|
local_14 = GHIDRA_CAST<uint8_t ******>(0xffffffff);
|
|
local_5c = 0;
|
|
local_58 = 0xf;
|
|
local_6c = (void *)(GHIDRA_UINT(local_6c) & 0xffffff00);
|
|
if (0xf < local_70) {
|
|
uVar7 = local_70 + 1;
|
|
freeBlock = local_84[0];
|
|
if (0xfff < uVar7) {
|
|
freeBlock = *(void **)(GHIDRA_INT(local_84[0]) + -4);
|
|
uVar7 = local_70 + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_84[0]) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
LAB_0060b6dc:
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar7);
|
|
}
|
|
local_74 = 0;
|
|
local_70 = 0xf;
|
|
local_84[0] = (void *)(GHIDRA_UINT(local_84[0]) & 0xffffff00);
|
|
switchD_0060b3c2_default:
|
|
iVar3 = this->_state;
|
|
if (iVar3 == 1) {
|
|
if (((this->_sprite)._animState._animData != (void *)0x0) &&
|
|
(bVar2 = AnimationState::IsEventTriggered(&(this->_sprite)._animState,GHIDRA_CAST<uint8_t *>("Shoot")),
|
|
bVar2 != 0)) {
|
|
this->_state = 2;
|
|
}
|
|
}
|
|
else if (iVar3 == 2) {
|
|
if (((this->_sprite)._animState._animData == (void *)0x0) ||
|
|
((this->_sprite)._animState._isPlaying == 0)) {
|
|
this->_state = 3;
|
|
}
|
|
}
|
|
else if ((iVar3 == 4) &&
|
|
(((this->_sprite)._animState._animData == (void *)0x0 ||
|
|
((this->_sprite)._animState._isPlaying == 0)))) {
|
|
this->_state = 0;
|
|
}
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
|
|
// 0060b7a0
|
|
Entity_Effect * Entity_Effect::CreateLootPreview(void *lootlist, Vector *pos, Entity *owner, Entity_Effect *effect)
|
|
{
|
|
uint32_t seed;
|
|
Entity_Effect *result;
|
|
uint32_t *local_c [2];
|
|
float effectX;
|
|
float effectY;
|
|
float ownerX;
|
|
float ownerY;
|
|
uint32_t *parentRef;
|
|
|
|
local_c[0] = lootlist;
|
|
if (((effect == GHIDRA_CAST<Entity_Effect *>(0x0)) || (effect->_type != 1000)) || (effect->_variant != 0xbf)) {
|
|
seed = Random();
|
|
effect = (Entity_Effect *)
|
|
(GHIDRA_CAST<Game *>((g_game)))->Game::SpawnEx(1000,0xbf,pos,&g_vectorZero,GHIDRA_CAST<Entity *>(0x0),0,seed,0);
|
|
}
|
|
(effect->_pos).x = pos->x;
|
|
(effect->_pos).y = pos->y;
|
|
setup_loot_preview(effect,lootlist);
|
|
if (owner != GHIDRA_CAST<Entity *>(0x0)) {
|
|
parentRef = &effect->_parent;
|
|
if (effect->_parent != 0) {
|
|
local_c[0] = parentRef;
|
|
msvc::multiset<unsigned_int>::erase(local_c);
|
|
}
|
|
*parentRef = owner;
|
|
msvc::multiset<unsigned_int>::insert(parentRef);
|
|
effectX = (effect->_pos).x;
|
|
effectY = (effect->_pos).y;
|
|
ownerX = (owner->_pos).x;
|
|
ownerY = (owner->_pos).y;
|
|
effect->_isFollowing = 1;
|
|
(effect->_parentOffset).x = effectX - ownerX;
|
|
(effect->_parentOffset).y = effectY - ownerY;
|
|
}
|
|
result = GHIDRA_CAST<Entity_Effect *>(0x0);
|
|
if (effect->_exists != 0) {
|
|
result = effect;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
// 0060bae0
|
|
void Entity_Effect::setup_loot_preview(void *lootQueue)
|
|
{
|
|
code *pcVar1;
|
|
uint64_t uVar2;
|
|
uint8_t isPicked;
|
|
EntityConfig_Entity *entityConfig;
|
|
LayerState *layer;
|
|
uint8_t *pbVar3;
|
|
uint32_t uVar4;
|
|
uint32_t preventedCurses;
|
|
ItemConfig_Item *item;
|
|
uint32_t uVar5;
|
|
std_string *stringPtr;
|
|
uint8_t unk;
|
|
uint8_t *ptr;
|
|
uint32_t *puVar6;
|
|
uint32_t *puVar7;
|
|
int iVar8;
|
|
int iVar9;
|
|
ANM2 *pAVar10;
|
|
uint32_t uVar11;
|
|
uint32_t uVar12;
|
|
ColorMod ghostColor;
|
|
uint8_t insertedIt [4];
|
|
ANM2 *lootIt [2];
|
|
uint32_t local_8c;
|
|
ANM2 *lootType;
|
|
uint32_t lootVariant;
|
|
uint64_t uStack_80;
|
|
uint32_t *local_78;
|
|
ANM2 *lootMap;
|
|
uint32_t lootMapSize;
|
|
int ghostData;
|
|
uint8_t *local_68;
|
|
uint32_t local_64;
|
|
ANM2 *local_60;
|
|
uint8_t *local_5c;
|
|
uint32_t *local_58;
|
|
std_string itemGfxPath;
|
|
uint8_t local_3c [8];
|
|
uint32_t uStack_34;
|
|
uint32_t uStack_30;
|
|
uint32_t uStack_2c;
|
|
uint32_t *local_28;
|
|
uint32_t local_24;
|
|
uint8_t *puStack_20;
|
|
void *local_1c;
|
|
uint8_t *puStack_18;
|
|
uint32_t local_14;
|
|
void *configTable;
|
|
Manager *manager;
|
|
ANM2 *sprite;
|
|
|
|
puStack_20 = local_3c + 0x38;
|
|
local_14 = 0xffffffff;
|
|
puStack_18 = &LAB_00af6655;
|
|
local_1c = ExceptionList;
|
|
local_24 = __security_cookie ^ GHIDRA_UINT((local_3c + 0x2c));
|
|
ExceptionList = &local_1c;
|
|
ghostData = __RTDynamicCast(*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4b4)))),0,
|
|
&IsaacRepentancePlus::Entity_Effect::ExtraData::RTTI_Type_Descriptor,
|
|
&IsaacRepentancePlus::PickupGhostData::RTTI_Type_Descriptor,0,local_24
|
|
);
|
|
if (ghostData == 0) {
|
|
this->Remove();
|
|
}
|
|
else {
|
|
pAVar10 = GHIDRA_CAST<ANM2 *>((ghostData + 4));
|
|
iVar8 = 4;
|
|
do {
|
|
if (pAVar10->_loaded != 0) {
|
|
ANM2::Reset(pAVar10);
|
|
}
|
|
iVar9 = ghostData;
|
|
pAVar10 = pAVar10 + 1;
|
|
iVar8 = iVar8 + -1;
|
|
} while (iVar8 != 0);
|
|
*GHIDRA_CAST<uint32_t *>((ghostData + 0x454)) = 0;
|
|
lootMap = GHIDRA_CAST<ANM2 *>(0x0);
|
|
lootMapSize = 0;
|
|
lootMap = operator_new(0x28);
|
|
*GHIDRA_CAST<ANM2 **>((lootMap->_filename)._buf) = lootMap;
|
|
*GHIDRA_CAST<ANM2 **>(((lootMap->_filename)._buf + 4)) = lootMap;
|
|
*GHIDRA_CAST<ANM2 **>(((lootMap->_filename)._buf + 8)) = lootMap;
|
|
(lootMap->_filename)._buf[0xc] = '\x01';
|
|
(lootMap->_filename)._buf[0xd] = '\x01';
|
|
local_14 = 0;
|
|
local_64 = 0;
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(lootQueue) + 0x10)) != 0) {
|
|
do {
|
|
local_8c = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(lootQueue) + 0xc)) + local_64;
|
|
puVar6 = *(uint32_t **)
|
|
(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(lootQueue) + 4)) + (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(lootQueue) + 8)) - 1U & local_8c) * 4
|
|
);
|
|
lootType = GHIDRA_CAST<ANM2 *>(*puVar6);
|
|
lootVariant = puVar6[1];
|
|
uStack_80 = *GHIDRA_CAST<uint64_t *>((puVar6 + 2));
|
|
local_78 = GHIDRA_CAST<uint32_t *>(puVar6[4]);
|
|
uVar5 = puVar6[2];
|
|
uVar12 = puVar6[3];
|
|
local_60 = lootType;
|
|
local_58 = local_78;
|
|
if (lootType == GHIDRA_CAST<ANM2 *>(&DAT_00000005)) {
|
|
isPicked = Pickup_PickVariant(puVar6[3],&lootVariant,GHIDRA_CAST<uint32_t *>(&uStack_80),0,0);
|
|
if (isPicked != 0) {
|
|
local_58 = local_78;
|
|
local_60 = lootType;
|
|
uVar5 = GHIDRA_UINT(uStack_80);
|
|
uVar12 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uStack_80)) + 0x4)));
|
|
goto LAB_0060bc31;
|
|
}
|
|
}
|
|
else {
|
|
LAB_0060bc31:
|
|
uVar4 = lootVariant;
|
|
if (g_game->_challenge == 0x2b) {
|
|
if (lootVariant != 300) goto LAB_0060bcab;
|
|
uStack_80 = CONCAT44((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uStack_80)) + 0x4))),0x10);
|
|
uVar2 = uStack_80;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uStack_80)) + 0x0))) = 0x10;
|
|
preventedCurses = 0x10;
|
|
uVar5 = GHIDRA_UINT(uStack_80);
|
|
uVar12 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uStack_80)) + 0x4)));
|
|
uStack_80 = uVar2;
|
|
}
|
|
else if (lootVariant == 300) {
|
|
if (((GHIDRA_INT(GHIDRA_UINT(uStack_80)) < 0) ||
|
|
(configTable = (g_manager->_itemConfig)._cards._begin,
|
|
GHIDRA_INT((g_manager->_itemConfig)._cards._end) - GHIDRA_INT(configTable) >> 2 <=
|
|
GHIDRA_INT(GHIDRA_UINT(uStack_80)))) ||
|
|
(iVar8 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(configTable) + GHIDRA_UINT(uStack_80) * 4)), iVar8 == 0)) {
|
|
preventedCurses = 2;
|
|
uStack_80 = CONCAT44((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uStack_80)) + 0x4))),2);
|
|
uVar2 = uStack_80;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uStack_80)) + 0x0))) = 2;
|
|
uVar5 = GHIDRA_UINT(uStack_80);
|
|
uVar12 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uStack_80)) + 0x4)));
|
|
uStack_80 = uVar2;
|
|
}
|
|
else {
|
|
preventedCurses = *GHIDRA_CAST<uint32_t *>((iVar8 + 0x54));
|
|
uStack_80 = CONCAT44((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uStack_80)) + 0x4))),preventedCurses);
|
|
uVar5 = preventedCurses;
|
|
uVar12 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uStack_80)) + 0x4)));
|
|
}
|
|
}
|
|
else {
|
|
LAB_0060bcab:
|
|
preventedCurses = GHIDRA_UINT(uStack_80);
|
|
}
|
|
pAVar10 = local_60;
|
|
uVar11 = lootVariant;
|
|
lootType = local_60;
|
|
local_78 = local_58;
|
|
entityConfig = EntityConfig::GetEntity
|
|
(&g_manager->_entityConfig,GHIDRA_INT(local_60),lootVariant,
|
|
preventedCurses);
|
|
if (entityConfig != GHIDRA_CAST<EntityConfig_Entity *>(0x0)) {
|
|
if (local_60 == GHIDRA_CAST<ANM2 *>(&DAT_00000005)) {
|
|
if (uVar4 < 0x29) {
|
|
if (uVar4 == 0x28) {
|
|
if (((preventedCurses == 4) || (preventedCurses == 6)) || (preventedCurses == 7))
|
|
{
|
|
LAB_0060bd04:
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = GHIDRA_CAST<uint8_t *>(0x1f4);
|
|
}
|
|
else {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = GHIDRA_CAST<uint8_t *>(0xa);
|
|
}
|
|
}
|
|
else if (uVar4 == 10) {
|
|
if (((preventedCurses == 4) || (preventedCurses == 7)) || (preventedCurses == 0xb)
|
|
) goto LAB_0060bd04;
|
|
if ((((preventedCurses == 6) || (preventedCurses == 10)) || (preventedCurses == 3)
|
|
) || (preventedCurses == 8)) {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = GHIDRA_CAST<uint8_t *>(0xc8);
|
|
}
|
|
else {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = GHIDRA_CAST<uint8_t *>(0xa);
|
|
}
|
|
}
|
|
else if (uVar4 == 0x14) {
|
|
if ((preventedCurses == 3) || (preventedCurses == 5)) goto LAB_0060bd04;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = GHIDRA_CAST<uint8_t *>(0xa);
|
|
if (preventedCurses == 2) {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = GHIDRA_CAST<uint8_t *>(0xc8);
|
|
}
|
|
}
|
|
else {
|
|
if (uVar4 != 0x1e) goto LAB_0060bd7e;
|
|
if ((preventedCurses == 2) || (preventedCurses == 4)) goto LAB_0060bd04;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = GHIDRA_CAST<uint8_t *>(0xa);
|
|
}
|
|
}
|
|
else if (uVar4 == 100) {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = GHIDRA_CAST<uint8_t *>(0x2710);
|
|
}
|
|
else if (uVar4 == 0x15e) {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = GHIDRA_CAST<uint8_t *>(0x3e8);
|
|
}
|
|
else {
|
|
LAB_0060bd7e:
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = GHIDRA_CAST<uint8_t *>(0x32);
|
|
}
|
|
}
|
|
else {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = GHIDRA_CAST<uint8_t *>(0x0);
|
|
}
|
|
local_28 = local_58;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x4))) = pAVar10;
|
|
uStack_34 = uVar11;
|
|
uStack_30 = uVar5;
|
|
uStack_2c = uVar12;
|
|
msvc::multimap<unsigned_int_20byte>::emplace(insertedIt,local_3c);
|
|
}
|
|
}
|
|
local_64 = local_64 + 1;
|
|
} while (local_64 < *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(lootQueue) + 0x10)));
|
|
iVar9 = ghostData;
|
|
}
|
|
pAVar10 = lootMap;
|
|
lootIt[0] = lootMap;
|
|
if (lootMap != *GHIDRA_CAST<ANM2 **>((lootMap->_filename)._buf)) {
|
|
while (iVar8 = *GHIDRA_CAST<int *>((iVar9 + 0x454)), iVar8 < 4) {
|
|
local_60 = lootIt[0];
|
|
(GHIDRA_CAST<msvc::_Tree_iterator *>((&local_60)))->msvc::_Tree_iterator::operator_decrement();
|
|
local_68 = GHIDRA_CAST<uint8_t *>((local_60->_filename)._capacity);
|
|
local_64 = *GHIDRA_CAST<uint32_t *>((local_60->_animDefaultName)._buf);
|
|
local_58 = *GHIDRA_CAST<uint32_t **>(((local_60->_animDefaultName)._buf + 4));
|
|
pbVar3 = *GHIDRA_CAST<uint8_t **>(((local_60->_animDefaultName)._buf + 8));
|
|
entityConfig = EntityConfig::GetEntity
|
|
(&g_manager->_entityConfig,GHIDRA_INT(local_68),local_64,GHIDRA_INT(local_58));
|
|
if (entityConfig != GHIDRA_CAST<EntityConfig_Entity *>(0x0)) {
|
|
*GHIDRA_CAST<int *>((ghostData + 0x454)) = *GHIDRA_CAST<int *>((ghostData + 0x454)) + 1;
|
|
pAVar10 = GHIDRA_CAST<ANM2 *>((ghostData + 4 + iVar8 * 0x114));
|
|
local_60 = pAVar10;
|
|
ANM2::Load(pAVar10,&entityConfig->anm2Path,0);
|
|
layer = ANM2::GetLayer(pAVar10,GHIDRA_CAST<uint8_t *>(0x0));
|
|
(layer->_pos).x = 0.0;
|
|
(layer->_pos).y = -4.0;
|
|
if (local_68 == &DAT_00000005) {
|
|
if (local_64 == 0x15e) {
|
|
configTable = (g_manager->_itemConfig)._trinkets._begin;
|
|
if (GHIDRA_INT((GHIDRA_UINT(local_58) & 0x7fff)) <
|
|
GHIDRA_INT((g_manager->_itemConfig)._trinkets._end) - GHIDRA_INT(configTable) >> 2) {
|
|
iVar8 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(configTable) + (GHIDRA_UINT(local_58) & 0x7fff) * 4));
|
|
}
|
|
else {
|
|
iVar8 = 0;
|
|
}
|
|
local_64 = *GHIDRA_CAST<uint32_t *>((iVar8 + 0x48));
|
|
local_58 = GHIDRA_CAST<uint32_t *>((iVar8 + 0x38));
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((iVar8 + 0x4c))) {
|
|
local_58 = GHIDRA_CAST<uint32_t *>(*local_58);
|
|
}
|
|
if (local_64 < 0x10) {
|
|
local_5c = GHIDRA_CAST<uint8_t *>(*local_58);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x4))) = local_58[1];
|
|
uStack_34 = local_58[2];
|
|
uStack_30 = local_58[3];
|
|
puVar6 = GHIDRA_CAST<uint32_t *>(&DAT_0000000f);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = local_5c;
|
|
}
|
|
else {
|
|
puVar6 = GHIDRA_CAST<uint32_t *>((local_64 | 0xf));
|
|
if (GHIDRA_CAST<uint32_t *>(0x7fffffff) < puVar6) {
|
|
puVar6 = GHIDRA_CAST<uint32_t *>(0x7fffffff);
|
|
}
|
|
local_5c = msvc::_Allocate(GHIDRA_UINT((GHIDRA_INT(puVar6) + 1)));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = local_5c;
|
|
memcpy(local_5c,local_58,local_64 + 1);
|
|
}
|
|
sprite = local_60;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 1;
|
|
uStack_2c = local_64;
|
|
local_28 = puVar6;
|
|
if (0 < pAVar10->_layerCount) {
|
|
local_58 = pAVar10->_layerState;
|
|
local_8c = local_58[6];
|
|
local_68 = GHIDRA_CAST<uint8_t *>((local_58 + 2));
|
|
if (0xf < GHIDRA_UINT(local_58[7])) {
|
|
local_68 = *GHIDRA_CAST<uint8_t **>(local_68);
|
|
}
|
|
pbVar3 = local_3c;
|
|
if (&DAT_0000000f < puVar6) {
|
|
pbVar3 = local_5c;
|
|
}
|
|
isPicked = str_eq(pbVar3,local_64,local_68,local_8c);
|
|
pAVar10 = sprite;
|
|
if (isPicked == 0) {
|
|
if (local_58 + 2 == GHIDRA_CAST<uint32_t *>(local_3c)) {
|
|
puVar7 = local_58;
|
|
}
|
|
else {
|
|
pbVar3 = local_3c;
|
|
if (&DAT_0000000f < puVar6) {
|
|
pbVar3 = local_5c;
|
|
}
|
|
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>((local_58 + 2)))))->msvc::string::assign(pbVar3,local_64);
|
|
local_5c = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<uint8_t *>(local_3c))) + 0x0)));
|
|
puVar7 = sprite->_layerState;
|
|
puVar6 = local_28;
|
|
}
|
|
*GHIDRA_CAST<uint8_t *>((puVar7 + 0xc)) = 0;
|
|
}
|
|
}
|
|
local_14 = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(local_14))) + 0x1))) << 8;
|
|
if (&DAT_0000000f < puVar6) {
|
|
puVar7 = GHIDRA_CAST<uint32_t *>((GHIDRA_INT(puVar6) + 1));
|
|
ptr = local_5c;
|
|
if (GHIDRA_CAST<uint32_t *>(0xfff) < puVar7) {
|
|
ptr = *GHIDRA_CAST<uint8_t **>((local_5c + -4));
|
|
puVar7 = puVar6 + 9;
|
|
if (GHIDRA_CAST<uint8_t *>(0x1f) < local_5c + (-4 - GHIDRA_INT(ptr))) goto LAB_0060c2e6;
|
|
}
|
|
LAB_0060c216:
|
|
operator_delete(ptr,GHIDRA_UINT(puVar7));
|
|
}
|
|
}
|
|
else if (local_64 == 100) {
|
|
layer = ANM2::GetLayer(pAVar10,GHIDRA_CAST<uint8_t *>(0x1));
|
|
(layer->_pos).x = 0.0;
|
|
(layer->_pos).y = 4.0;
|
|
if (local_58 != GHIDRA_CAST<uint32_t *>(0x0)) {
|
|
uVar5 = g_game->_debugCurses;
|
|
uVar12 = g_game->_curses;
|
|
uVar4 = Seeds::GetForcedCurses();
|
|
preventedCurses = Seeds::GetPreventedCurses();
|
|
if ((~preventedCurses & (uVar4 | uVar5 | uVar12) & 0x40) == 0) {
|
|
item = ItemConfig::GetCollectible(&g_manager->_itemConfig,GHIDRA_INT(local_58));
|
|
(GHIDRA_CAST<msvc::string *>((itemGfxPath._buf)))->msvc::string::string(&item->gfxFilename);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 3;
|
|
if (g_game->_challenge == 0x20) {
|
|
uStack_80 = 0x150000000b;
|
|
local_8c = 0xd;
|
|
local_68 = GHIDRA_CAST<uint8_t *>(0x0);
|
|
while( true ) {
|
|
manager = g_manager;
|
|
if (pbVar3 == GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("RNG Seed is zero!\n"));
|
|
pcVar1 = (code *)swi(3);
|
|
(*pcVar1)();
|
|
return;
|
|
}
|
|
uVar5 = GHIDRA_UINT(pbVar3) >> ((uint8_t)uStack_80 & 0x1f) ^ GHIDRA_UINT(pbVar3);
|
|
uVar5 = uVar5 << ((uint8_t)((uint64_t)uStack_80 >> 0x20) & 0x1f) ^ uVar5;
|
|
local_5c = GHIDRA_CAST<uint8_t *>((uVar5 >> ((uint8_t)local_8c & 0x1f) ^ uVar5));
|
|
iVar8 = GHIDRA_UINT(local_5c) % 0x2dc + 1;
|
|
if ((((iVar8 != 0) &&
|
|
(iVar8 < GHIDRA_INT((g_manager->_itemConfig)._collectibles._end) -
|
|
GHIDRA_INT((g_manager->_itemConfig)._collectibles._begin) >> 2)) &&
|
|
(iVar8 != 0xeb)) &&
|
|
(((iVar8 != 0x2b && (iVar8 != 0x3d)) &&
|
|
(item = ItemConfig::GetCollectible(&g_manager->_itemConfig,iVar8),
|
|
item != GHIDRA_CAST<ItemConfig_Item *>(0x0))))) break;
|
|
local_68 = local_68 + 1;
|
|
if (0xe < GHIDRA_INT(local_68)) goto LAB_0060c1d7;
|
|
pbVar3 = local_5c;
|
|
}
|
|
item = ItemConfig::GetCollectible(&manager->_itemConfig,iVar8);
|
|
stringPtr = &item->gfxFilename;
|
|
if (&itemGfxPath != stringPtr) {
|
|
if (0xf < (item->gfxFilename)._capacity) {
|
|
stringPtr = *GHIDRA_CAST<std_string **>(stringPtr->_buf);
|
|
}
|
|
(GHIDRA_CAST<msvc::string *>((itemGfxPath._buf)))->msvc::string::assign(GHIDRA_CAST<uint8_t *>(stringPtr),
|
|
(item->gfxFilename)._size);
|
|
}
|
|
}
|
|
LAB_0060c1d7:
|
|
pAVar10 = local_60;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(local_60))))->Sprite::ReplaceSpritesheet(1,&itemGfxPath);
|
|
local_14 = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(local_14))) + 0x1))) << 8;
|
|
if (&DAT_0000000f < itemGfxPath._capacity) {
|
|
pbVar3 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<uint8_t *>(itemGfxPath._buf))) + 0x0)));
|
|
puVar6 = GHIDRA_CAST<uint32_t *>(itemGfxPath._capacity);
|
|
goto LAB_0060c1f6;
|
|
}
|
|
}
|
|
else {
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) = msvc::_Allocate(0x30);
|
|
pAVar10 = local_60;
|
|
uStack_2c = 0x27;
|
|
local_28 = GHIDRA_CAST<uint32_t *>(&DAT_0000002f);
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0)) = 'g';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 1)) = 'f';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 2)) = 'x';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 3)) = '/';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 4)) = 'I';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 5)) = 't';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 6)) = 'e';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 7)) = 'm';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 8)) = 's';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 9)) = '/';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 10)) = 'C';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0xb)) = 'o';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0xc)) = 'l';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0xd)) = 'l';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0xe)) = 'e';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0xf)) = 'c';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x10)) = 't';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x11)) = 'i';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x12)) = 'b';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x13)) = 'l';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x14)) = 'e';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x15)) = 's';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x16)) = '/';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x17)) = 'q';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x18)) = 'u';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x19)) = 'e';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x1a)) = 's';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x1b)) = 't';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x1c)) = 'i';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x1d)) = 'o';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x1e)) = 'n';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x1f)) = 'm';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x20)) = 'a';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x21)) = 'r';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x22)) = 'k';
|
|
*GHIDRA_CAST<char *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x23)) = '.';
|
|
*GHIDRA_CAST<uint8_t *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x24)) = 0x70;
|
|
*GHIDRA_CAST<uint8_t *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x25)) = 0x6e;
|
|
*GHIDRA_CAST<uint8_t *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x26)) = 0x67;
|
|
*GHIDRA_CAST<uint8_t *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x0))) + 0x27)) = 0;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 2;
|
|
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(local_60))))->Sprite::ReplaceSpritesheet(1,GHIDRA_CAST<std_string *>(local_3c));
|
|
local_14 = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(local_14))) + 0x1))) << 8;
|
|
if (&DAT_0000000f < local_28) {
|
|
pbVar3 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<uint8_t *>(local_3c))) + 0x0)));
|
|
puVar6 = local_28;
|
|
LAB_0060c1f6:
|
|
puVar7 = GHIDRA_CAST<uint32_t *>((GHIDRA_INT(puVar6) + 1));
|
|
ptr = pbVar3;
|
|
if (GHIDRA_CAST<uint32_t *>(0xfff) < puVar7) {
|
|
ptr = *GHIDRA_CAST<uint8_t **>((pbVar3 + -4));
|
|
puVar7 = puVar6 + 9;
|
|
if (GHIDRA_CAST<uint8_t *>(0x1f) < pbVar3 + (-4 - GHIDRA_INT(ptr))) {
|
|
LAB_0060c2e6:
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
goto LAB_0060c216;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
layer = ANM2::GetLayer(pAVar10,GHIDRA_CAST<uint8_t *>("shadow"));
|
|
if (layer != GHIDRA_CAST<LayerState *>(0x0)) {
|
|
layer->_visible = 0;
|
|
}
|
|
ANM2::LoadGraphics(pAVar10,unk);
|
|
stringPtr = &pAVar10->_animDefaultName;
|
|
if (0xf < (pAVar10->_animDefaultName)._capacity) {
|
|
stringPtr = *GHIDRA_CAST<std_string **>(stringPtr->_buf);
|
|
}
|
|
isPicked = ANM2::SetAnimation(pAVar10,GHIDRA_CAST<uint8_t *>(stringPtr),1);
|
|
if (((isPicked != 0) && ((pAVar10->_animState)._animData != (void *)0x0)) &&
|
|
(AnimationState::SetFrameFloat(&pAVar10->_animState,0.0),
|
|
(pAVar10->_animState)._animData != (void *)0x0)) {
|
|
(pAVar10->_animState)._isPlaying = 0;
|
|
}
|
|
ghostColor._offset[0] = 0.0;
|
|
ghostColor._offset[1] = 0.0;
|
|
ghostColor._offset[2] = 0.0;
|
|
if (&pAVar10->_color != &ghostColor) {
|
|
(pAVar10->_color)._colorize[0] = 0.0;
|
|
(pAVar10->_color)._colorize[1] = 0.0;
|
|
(pAVar10->_color)._colorize[2] = 0.0;
|
|
(pAVar10->_color)._colorize[3] = 0.0;
|
|
(pAVar10->_color)._offset[0] = 0.0;
|
|
(pAVar10->_color)._offset[1] = 0.0;
|
|
(pAVar10->_color)._tint[0] = 1.0;
|
|
(pAVar10->_color)._tint[1] = 1.0;
|
|
(pAVar10->_color)._tint[2] = 1.0;
|
|
(pAVar10->_color)._tint[3] = 0.75;
|
|
(pAVar10->_color)._offset[2] = 0.0;
|
|
}
|
|
pAVar10 = lootMap;
|
|
}
|
|
(GHIDRA_CAST<msvc::_Tree_iterator *>((lootIt)))->msvc::_Tree_iterator::operator_decrement();
|
|
if (lootIt[0] == *GHIDRA_CAST<ANM2 **>((pAVar10->_filename)._buf)) break;
|
|
iVar9 = ghostData;
|
|
}
|
|
}
|
|
if (*GHIDRA_CAST<int *>((ghostData + 0x454)) == 0) {
|
|
this->Remove();
|
|
pAVar10 = lootMap;
|
|
}
|
|
FID_conflict__Erase_tree<fuzzer::fuzzer_allocator<msvc::_Tree_node<fuzzer::TracePC::PCTableEntry_const*,void*>_>_>
|
|
(&lootMap,(fuzzer_allocator<msvc::_Tree_node<unsigned_int,void*>_> *)&lootMap,
|
|
*(_Tree_node<unsigned_int,void*> **)((pAVar10->_filename)._buf + 4));
|
|
operator_delete(lootMap,0x28);
|
|
}
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
|
|
// 0060c370
|
|
void Entity_Effect::guard_check_icall()
|
|
{
|
|
uint8_t bVar1;
|
|
uint8_t *animNameCursor;
|
|
uint32_t cmpResult;
|
|
uint8_t *idleCursor;
|
|
bool isLess;
|
|
uint8_t *animData;
|
|
|
|
if (this->_variant == 0xb9) {
|
|
this->_state = 0;
|
|
animData = (this->_sprite)._animState._animData;
|
|
if (animData != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
animNameCursor = animData;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((animData + 0x14))) {
|
|
animNameCursor = *GHIDRA_CAST<uint8_t **>(animData);
|
|
}
|
|
idleCursor = s_Idle;
|
|
do {
|
|
bVar1 = *animNameCursor;
|
|
isLess = bVar1 < *idleCursor;
|
|
if (bVar1 != *idleCursor) {
|
|
LAB_0060c3c0:
|
|
cmpResult = -GHIDRA_UINT(isLess) | 1;
|
|
goto LAB_0060c3c5;
|
|
}
|
|
if (bVar1 == 0) break;
|
|
bVar1 = animNameCursor[1];
|
|
isLess = bVar1 < idleCursor[1];
|
|
if (bVar1 != idleCursor[1]) goto LAB_0060c3c0;
|
|
animNameCursor = animNameCursor + 2;
|
|
idleCursor = idleCursor + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
LAB_0060c3c5:
|
|
if (cmpResult == 0) {
|
|
if (animData[0x34] == 0) {
|
|
return;
|
|
}
|
|
if ((this->_sprite)._animState._isPlaying != 0) {
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
bVar1 = ANM2::SetAnimation(&this->_sprite,s_Idle,1);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind(&(this->_sprite)._animState);
|
|
(this->_sprite)._animState._isPlaying = 1;
|
|
}
|
|
}
|
|
else if (this->_variant == 0x77) {
|
|
/* WARNING: Could not recover jumptable at 0x0060c3fb. Too many branches */
|
|
/* WARNING: Treating indirect jump as call */
|
|
this->Remove();
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 0060c400
|
|
uint8_t Entity_Effect::CanShutDoors()
|
|
{
|
|
return this->_variant == 0xcb;
|
|
}
|
|
|
|
// 0060ce20
|
|
void Entity_Effect::SetDamageSource(int param_2)
|
|
{
|
|
this->_damageSource = param_2;
|
|
return;
|
|
}
|