mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-26 22:40:33 +00:00
Changing PLAYER_STATUS_UNK40000 to PLAYER_STATUS_ZERO_HP (#1911)
Some checks are pending
Format code / format (push) Waiting to run
Build C code / extract-assets (push) Waiting to run
Build C code / build-linux (x86_64, Debug, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, gcc, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, gcc, lle) (push) Blocked by required conditions
Build C code / build-macos (Debug, custom) (push) Blocked by required conditions
Build C code / build-macos (Debug, lle) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo, custom) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo, lle) (push) Blocked by required conditions
Build C code / build-windows (Debug, custom) (push) Blocked by required conditions
Build C code / build-windows (Debug, lle) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo, custom) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo, lle) (push) Blocked by required conditions
Build Saturn version / build-and-test-saturn (push) Waiting to run
Build Saturn version / function-finder-saturn (push) Waiting to run
Build Debug Module tool / build (push) Waiting to run
Build PSX and PSP version / build-and-test (pspeu, hd) (push) Waiting to run
Build PSX and PSP version / build-and-test (pspeu, pspeu) (push) Waiting to run
Build PSX and PSP version / build-and-test (us, us) (push) Waiting to run
Build PSX and PSP version / generate-progress-report (pspeu, hd) (push) Blocked by required conditions
Build PSX and PSP version / generate-progress-report (pspeu, pspeu) (push) Blocked by required conditions
Build PSX and PSP version / generate-progress-report (us, us) (push) Blocked by required conditions
Build PSX and PSP version / generate-duplicates-report (us, us) (push) Blocked by required conditions
Build PSX and PSP version / generate-duplicates-report-psp (pspeu, pspeu) (push) Blocked by required conditions
Some checks are pending
Format code / format (push) Waiting to run
Build C code / extract-assets (push) Waiting to run
Build C code / build-linux (x86_64, Debug, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, gcc, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, gcc, lle) (push) Blocked by required conditions
Build C code / build-macos (Debug, custom) (push) Blocked by required conditions
Build C code / build-macos (Debug, lle) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo, custom) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo, lle) (push) Blocked by required conditions
Build C code / build-windows (Debug, custom) (push) Blocked by required conditions
Build C code / build-windows (Debug, lle) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo, custom) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo, lle) (push) Blocked by required conditions
Build Saturn version / build-and-test-saturn (push) Waiting to run
Build Saturn version / function-finder-saturn (push) Waiting to run
Build Debug Module tool / build (push) Waiting to run
Build PSX and PSP version / build-and-test (pspeu, hd) (push) Waiting to run
Build PSX and PSP version / build-and-test (pspeu, pspeu) (push) Waiting to run
Build PSX and PSP version / build-and-test (us, us) (push) Waiting to run
Build PSX and PSP version / generate-progress-report (pspeu, hd) (push) Blocked by required conditions
Build PSX and PSP version / generate-progress-report (pspeu, pspeu) (push) Blocked by required conditions
Build PSX and PSP version / generate-progress-report (us, us) (push) Blocked by required conditions
Build PSX and PSP version / generate-duplicates-report (us, us) (push) Blocked by required conditions
Build PSX and PSP version / generate-duplicates-report-psp (pspeu, pspeu) (push) Blocked by required conditions
Simple change. Figured out that UNK40000 is either "Player has Zero HP" or "Player is dead", which is largely the same I think. The Faerie "Life Apple" ability triggers off of this status. Touches a lot of files so I didn't want to put it in my Faerie refactor. Also a small renaming in Faerie that I realized I forgot in my refactor
This commit is contained in:
parent
9927a518b9
commit
a3678181dc
@ -299,7 +299,7 @@ typedef enum {
|
||||
PLAYER_STATUS_CURSE = 0x8000,
|
||||
PLAYER_STATUS_UNK10000 = 0x10000, // possibly freezing?
|
||||
PLAYER_STATUS_UNK20000 = 0x20000,
|
||||
PLAYER_STATUS_UNK40000 = 0x40000, // possibly zero hp/dead
|
||||
PLAYER_STATUS_DEAD = 0x40000, // possibly just "dead"
|
||||
PLAYER_STATUS_UNK80000 = 0x80000,
|
||||
PLAYER_STATUS_UNK100000 = 0x100000,
|
||||
PLAYER_STATUS_UNK200000 = 0x200000,
|
||||
|
@ -317,7 +317,7 @@ s32 SetNextRoomToLoad(u32 x, u32 y) {
|
||||
RoomHeader* room;
|
||||
u32 stack[4];
|
||||
|
||||
if (g_Player.status & PLAYER_STATUS_UNK40000) {
|
||||
if (g_Player.status & PLAYER_STATUS_DEAD) {
|
||||
return 0;
|
||||
}
|
||||
res = func_800F087C(x, y);
|
||||
@ -1513,7 +1513,7 @@ void RunMainEngine(void) {
|
||||
D_8006BB00 = 0;
|
||||
}
|
||||
}
|
||||
if (!(g_Player.status & PLAYER_STATUS_UNK40000)) {
|
||||
if (!(g_Player.status & PLAYER_STATUS_DEAD)) {
|
||||
if ((g_pads[0].tapped & PAD_START) && g_PauseAllowed) {
|
||||
func_801027A4();
|
||||
if ((g_StageId == STAGE_ST0) ||
|
||||
|
@ -566,7 +566,7 @@ void EntityAlucard(void) {
|
||||
D_80137FB8 = g_unkGraphicsStruct.D_800973FC;
|
||||
var_s7 = 0;
|
||||
g_Player.unk72 = func_80110394();
|
||||
if (!(g_Player.status & PLAYER_STATUS_UNK40000)) {
|
||||
if (!(g_Player.status & PLAYER_STATUS_DEAD)) {
|
||||
var_s0 = GetTeleportToOtherCastle();
|
||||
if (var_s0 != 0) {
|
||||
func_8010E42C(var_s0);
|
||||
@ -1202,8 +1202,7 @@ block_160:
|
||||
g_Player.status |= PLAYER_STATUS_UNK100;
|
||||
}
|
||||
if ((g_Player.unk08 & 0x10000) &&
|
||||
!(g_Player.status &
|
||||
(PLAYER_STATUS_UNK10000 | PLAYER_STATUS_UNK40000))) {
|
||||
!(g_Player.status & (PLAYER_STATUS_UNK10000 | PLAYER_STATUS_DEAD))) {
|
||||
func_8010E168(1, 0xC);
|
||||
if (!(g_Player.status & (PLAYER_STATUS_POISON | PLAYER_STATUS_CURSE))) {
|
||||
g_Player.timers[4] = 0xC;
|
||||
@ -1212,7 +1211,7 @@ block_160:
|
||||
}
|
||||
}
|
||||
PlayAnimation(D_800B0130, D_800B01B8);
|
||||
if (g_Player.status & PLAYER_STATUS_UNK40000) {
|
||||
if (g_Player.status & PLAYER_STATUS_DEAD) {
|
||||
if (PLAYER.animFrameDuration < 0) {
|
||||
PLAYER.animCurFrame |= ANIM_FRAME_LOAD;
|
||||
}
|
||||
@ -1228,10 +1227,9 @@ block_160:
|
||||
func_801093C4();
|
||||
if (!(g_Player.status & (PLAYER_STATUS_UNK10 | PLAYER_STATUS_UNK40))) {
|
||||
if ((CheckEquipmentItemCount(0x58U, 4U) != 0) &&
|
||||
!(g_Player.status &
|
||||
(PLAYER_STATUS_TRANSFORM | PLAYER_STATUS_UNK10 |
|
||||
PLAYER_STATUS_UNK10000 | PLAYER_STATUS_UNK40000 |
|
||||
PLAYER_STATUS_AXEARMOR)) &&
|
||||
!(g_Player.status & (PLAYER_STATUS_TRANSFORM | PLAYER_STATUS_UNK10 |
|
||||
PLAYER_STATUS_UNK10000 | PLAYER_STATUS_DEAD |
|
||||
PLAYER_STATUS_AXEARMOR)) &&
|
||||
!(PLAYER.drawFlags & (FLAG_DRAW_ROTY | FLAG_DRAW_ROTZ))) {
|
||||
PLAYER.drawFlags |= FLAG_DRAW_ROTY;
|
||||
PLAYER.rotY = 0x110;
|
||||
|
@ -159,7 +159,7 @@ void UpdatePlayerEntities(void) {
|
||||
}
|
||||
}
|
||||
// Appears to be a temporary debugging block that was left in.
|
||||
if ((g_Player.status & (PLAYER_STATUS_UNK40000 | PLAYER_STATUS_UNK80000)) ||
|
||||
if ((g_Player.status & (PLAYER_STATUS_DEAD | PLAYER_STATUS_UNK80000)) ||
|
||||
(PLAYER.step == Player_Teleport && PLAYER.step_s == 0)) {
|
||||
#if defined(VERSION_US)
|
||||
// Japanese for "without hit".
|
||||
@ -1399,7 +1399,7 @@ void EntityPlayerOutline(Entity* self) {
|
||||
s16 selfX;
|
||||
s16 selfY;
|
||||
|
||||
if ((g_Player.status & (PLAYER_STATUS_AXEARMOR | PLAYER_STATUS_UNK40000 |
|
||||
if ((g_Player.status & (PLAYER_STATUS_AXEARMOR | PLAYER_STATUS_DEAD |
|
||||
PLAYER_STATUS_STONE | PLAYER_STATUS_TRANSFORM)) ||
|
||||
!(PLAYER.animCurFrame & 0x7FFF) || (!PLAYER.animSet) ||
|
||||
((PLAYER.step == Player_SpellHellfire) && (PLAYER.palette == 0x810D))) {
|
||||
|
@ -633,11 +633,10 @@ void RicMain(void) {
|
||||
RicSetInvincibilityFrames(1, 16);
|
||||
break;
|
||||
case PL_S_DEAD:
|
||||
var_s4 =
|
||||
NO_AFTERIMAGE | PLAYER_STATUS_UNK40000 | PLAYER_STATUS_UNK10000;
|
||||
var_s4 = NO_AFTERIMAGE | PLAYER_STATUS_DEAD | PLAYER_STATUS_UNK10000;
|
||||
if (PLAYER.step_s == 0x80) {
|
||||
var_s4 = NO_AFTERIMAGE | PLAYER_STATUS_UNK80000 |
|
||||
PLAYER_STATUS_UNK40000 | PLAYER_STATUS_UNK10000;
|
||||
PLAYER_STATUS_DEAD | PLAYER_STATUS_UNK10000;
|
||||
}
|
||||
RicSetInvincibilityFrames(1, 16);
|
||||
break;
|
||||
|
@ -1597,7 +1597,7 @@ void RicUpdatePlayerEntities(void) {
|
||||
if (func_8015FB84(&subwpn, true, false) >= 0) {
|
||||
g_Player.status |= PLAYER_STATUS_UNK200000;
|
||||
}
|
||||
if (g_Player.status & (PLAYER_STATUS_UNK40000 | PLAYER_STATUS_UNK80000)) {
|
||||
if (g_Player.status & (PLAYER_STATUS_DEAD | PLAYER_STATUS_UNK80000)) {
|
||||
FntPrint("dead player\n");
|
||||
entity = &g_Entities[17]; // Weird code here. Set entity to #17 but...
|
||||
entity -= 13; // then change to #4 before the for-loop starting with 4?
|
||||
|
@ -22,7 +22,7 @@ STATIC_PAD_BSS(2);
|
||||
static s16 s_HpCacheResetTimer;
|
||||
STATIC_PAD_BSS(2);
|
||||
static s32 s_RoomSpecialState;
|
||||
static s32 D_us_80179320;
|
||||
static s32 D_us_80179320; // Possibly when player is sitting
|
||||
static s32 s_TargetLocationX;
|
||||
static s32 s_TargetLocationY;
|
||||
static s32 s_TargetLocationX_calc;
|
||||
@ -51,7 +51,7 @@ extern s32 g_SfxEventRandomizer[];
|
||||
|
||||
extern HintTriggerMap g_FaerieHints[];
|
||||
|
||||
extern FaerieAnimIndex g_AnimIndexParams[];
|
||||
extern FaerieWingAnimationParams g_WingAnimationParams[];
|
||||
extern AnimationFrame* g_FaerieAnimationFrames[];
|
||||
|
||||
void SetAnimationFrame(Entity*, s32);
|
||||
@ -273,10 +273,9 @@ void CheckForValidAbility(Entity* self) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (g_Player.status & PLAYER_STATUS_UNK40000) {
|
||||
if (g_Player.status & PLAYER_STATUS_DEAD) {
|
||||
rnd = rand() % 100;
|
||||
// for faerie, this is always true. stats table.lifeAppleChance is
|
||||
// 0x00FF
|
||||
// for faerie, always true. stats table.lifeAppleChance is 0x00FF
|
||||
if (rnd <=
|
||||
g_FaerieAbilityStats[s_FaerieStats.level / 10].lifeAppleChance) {
|
||||
self->entityId = FAERIE_MODE_USE_LIFE_APPLE;
|
||||
@ -1416,7 +1415,7 @@ void UpdateServantAdditionalInit(Entity* arg0) {
|
||||
|
||||
void UpdateSubEntityWings(Entity* self) {
|
||||
s32 animIndex;
|
||||
s32 zPriorityFlag;
|
||||
s32 wingsInBackZ;
|
||||
s32 i;
|
||||
#ifdef VERSION_PSP
|
||||
s32 temp_zPriority;
|
||||
@ -1438,12 +1437,12 @@ void UpdateSubEntityWings(Entity* self) {
|
||||
break;
|
||||
}
|
||||
|
||||
animIndex = abs(g_AnimIndexParams[i - 6].animIndex);
|
||||
zPriorityFlag = g_AnimIndexParams[i - 6].zPriorityFlag;
|
||||
animIndex = abs(g_WingAnimationParams[i - 6].animIndex);
|
||||
wingsInBackZ = g_WingAnimationParams[i - 6].wingsInBackZ;
|
||||
|
||||
SetAnimationFrame(self, animIndex);
|
||||
|
||||
if (zPriorityFlag) {
|
||||
if (wingsInBackZ) {
|
||||
temp_zPriority = s_zPriority - 1;
|
||||
} else {
|
||||
temp_zPriority = s_zPriority + 1;
|
||||
@ -1659,7 +1658,6 @@ void UpdateServantSitOnShoulder(Entity* self) {
|
||||
s_AnimationStatus = ServantUpdateAnim(self, NULL, g_FaerieAnimationFrames);
|
||||
}
|
||||
|
||||
// Update code for Faerie offering hint.
|
||||
// self->param is index for g_FaerieHints for the type of hint
|
||||
void UpdateServantOfferHint(Entity* self) {
|
||||
char pad[2];
|
||||
|
@ -60,8 +60,8 @@
|
||||
|
||||
typedef struct {
|
||||
s16 animIndex;
|
||||
s16 zPriorityFlag;
|
||||
} FaerieAnimIndex;
|
||||
s16 wingsInBackZ;
|
||||
} FaerieWingAnimationParams;
|
||||
|
||||
typedef struct {
|
||||
s16 timer;
|
||||
|
@ -2,7 +2,10 @@
|
||||
#include "faerie.h"
|
||||
#include "items.h"
|
||||
|
||||
FaerieAnimIndex g_AnimIndexParams[] = {
|
||||
// Map is used in the wing animation selector. The Z index param is used
|
||||
// because sometimes the wings are in front of the faerie like when
|
||||
// her back it toward the player.
|
||||
FaerieWingAnimationParams g_WingAnimationParams[] = {
|
||||
{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {4, 1}, {4, 1}, {0, 0},
|
||||
{4, 1}, {4, 1}, {3, 0}, {5, 0}, {0, 0}, {0, 0}, {0, 0}, {4, 1},
|
||||
{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {4, 1}, {0, 0},
|
||||
|
@ -574,7 +574,7 @@ void EntitySuccubus(Entity* self) {
|
||||
}
|
||||
|
||||
if (!(g_Player.status &
|
||||
(PLAYER_STATUS_AXEARMOR | PLAYER_STATUS_UNK40000 |
|
||||
(PLAYER_STATUS_AXEARMOR | PLAYER_STATUS_DEAD |
|
||||
PLAYER_STATUS_UNK100 | PLAYER_STATUS_STONE |
|
||||
PLAYER_STATUS_UNK_20 | PLAYER_STATUS_MIST_FORM))) {
|
||||
if ((posY < 12) && (posX < 24)) {
|
||||
|
@ -36,7 +36,7 @@ void EntityCtulhu(Entity* self) {
|
||||
u16 temp_v0_13;
|
||||
u16 temp_v0_15;
|
||||
|
||||
if ((g_Player.status & PLAYER_STATUS_UNK40000) && (self->step < 9)) {
|
||||
if ((g_Player.status & PLAYER_STATUS_DEAD) && (self->step < 9)) {
|
||||
SetStep(9);
|
||||
}
|
||||
if ((self->flags & FLAG_DEAD) && (self->step < 10)) {
|
||||
@ -311,7 +311,7 @@ void EntityCtulhu(Entity* self) {
|
||||
PlaySfxPositional(0x759);
|
||||
}
|
||||
AnimateEntity(D_us_801823B0, self);
|
||||
if ((g_Player.status & PLAYER_STATUS_UNK40000) == 0) {
|
||||
if ((g_Player.status & PLAYER_STATUS_DEAD) == 0) {
|
||||
SetStep(2);
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ s32 WarpBackgroundBrightness;
|
||||
/* 0xC0000000 */ PLAYER_STATUS_UNK80000000 | PLAYER_STATUS_UNK40000000 | \
|
||||
/* 0x05000000 */ PLAYER_STATUS_UNK4000000 | PLAYER_STATUS_AXEARMOR | \
|
||||
/* 0x00C00000 */ PLAYER_STATUS_UNK800000 | PLAYER_STATUS_UNK400000 | \
|
||||
/* 0x000F0000 */ PLAYER_STATUS_UNK80000 | PLAYER_STATUS_UNK40000 | PLAYER_STATUS_UNK20000 | PLAYER_STATUS_UNK10000 | \
|
||||
/* 0x000F0000 */ PLAYER_STATUS_UNK80000 | PLAYER_STATUS_DEAD | PLAYER_STATUS_UNK20000 | PLAYER_STATUS_UNK10000 | \
|
||||
/* 0x00003000 */ PLAYER_STATUS_UNK2000 | PLAYER_STATUS_UNK1000 | \
|
||||
/* 0x00000E00 */ PLAYER_STATUS_UNK800 | PLAYER_STATUS_UNK400 | PLAYER_STATUS_UNK200 | \
|
||||
/* 0x000000F0 */ PLAYER_STATUS_STONE | PLAYER_STATUS_UNK40 | PLAYER_STATUS_UNK_20 | PLAYER_STATUS_UNK10 | \
|
||||
|
@ -59,7 +59,7 @@ static s32 WarpBackgroundBrightness;
|
||||
/* 0xC0000000 */ PLAYER_STATUS_UNK80000000 | PLAYER_STATUS_UNK40000000 | \
|
||||
/* 0x05000000 */ PLAYER_STATUS_UNK4000000 | PLAYER_STATUS_AXEARMOR | \
|
||||
/* 0x00C00000 */ PLAYER_STATUS_UNK800000 | PLAYER_STATUS_UNK400000 | \
|
||||
/* 0x000F0000 */ PLAYER_STATUS_UNK80000 | PLAYER_STATUS_UNK40000 | PLAYER_STATUS_UNK20000 | PLAYER_STATUS_UNK10000 | \
|
||||
/* 0x000F0000 */ PLAYER_STATUS_UNK80000 | PLAYER_STATUS_DEAD | PLAYER_STATUS_UNK20000 | PLAYER_STATUS_UNK10000 | \
|
||||
/* 0x00003000 */ PLAYER_STATUS_UNK2000 | PLAYER_STATUS_UNK1000 | \
|
||||
/* 0x00000E00 */ PLAYER_STATUS_UNK800 | PLAYER_STATUS_UNK400 | PLAYER_STATUS_UNK200 | \
|
||||
/* 0x000000F0 */ PLAYER_STATUS_STONE | PLAYER_STATUS_UNK40 | PLAYER_STATUS_UNK_20 | PLAYER_STATUS_UNK10 | \
|
||||
|
@ -27,7 +27,7 @@ lazy_static! {
|
||||
(1 << 15, "PLAYER_STATUS_CURSE"),
|
||||
(1 << 16, "PLAYER_STATUS_UNK10000"),
|
||||
(1 << 17, "PLAYER_STATUS_UNK20000"),
|
||||
(1 << 18, "PLAYER_STATUS_UNK40000"),
|
||||
(1 << 18, "PLAYER_STATUS_DEAD"),
|
||||
(1 << 19, "PLAYER_STATUS_UNK80000"),
|
||||
(1 << 20, "PLAYER_STATUS_UNK100000"),
|
||||
(1 << 21, "PLAYER_STATUS_UNK200000"),
|
||||
|
Loading…
Reference in New Issue
Block a user