more game.c

This commit is contained in:
theo3
2022-01-03 20:16:58 -08:00
parent 0698806e00
commit f26b2e286a
12 changed files with 530 additions and 1067 deletions
+21
View File
@@ -256,6 +256,7 @@ void SurfaceAction_Water(Entity*);
void SurfaceAction_Ladder(Entity*);
void SurfaceAction_AutoLadder(Entity*);
extern void sub_080A4D88(void);
extern void RespawnPlayer();
extern void sub_080797EC();
extern void UpdatePlayerMovement();
@@ -319,6 +320,26 @@ extern u16 script_BedAtSimons;
extern Entity* gPlayerClones[];
extern ScriptExecutionContext gPlayerScriptExecutionContext;
NONMATCH("asm/non_matching/playerItemPacciCane/sub_080705AC.inc", u32 sub_080705AC(void)) {
if (!((gInput.newKeys & START_BUTTON) == 0 || gFadeControl.active || gUnk_02034490[0] ||
(gMessage.doTextBox & 0x7F) || gSave.stats.health == 0 || !gSave.fillerD0[34] ||
gPlayerState.controlMode != 0 || gPriorityHandler.priority_timer != 0)) {
u32 tmp = gPlayerState.framestate ? gPlayerState.framestate : gPlayerState.framestate_last;
switch (tmp) {
case PL_STATE_DIE:
case PL_STATE_TALKEZLO:
case PL_STATE_ITEMGET:
case PL_STATE_DROWN:
case PL_STATE_STAIRS:
return 0;
}
sub_080A4D88();
return 1;
}
return 0;
}
END_NONMATCH
void DoPlayerAction(Entity* this) {
static void (*const sPlayerActions[])(Entity*) = {
[PLAYER_INIT] = PlayerInit,