Skip to content

Commit

Permalink
December hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Admentus64 committed Dec 15, 2024
1 parent e03ea17 commit 15a4ebf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ASM/c/buttons.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ void interface_raise_button_alphas(z64_game_t* game, u8 rising_alpha) {
*button_alphas[i] = rising_alpha;
}

if (!CAN_USE_DPAD) {
if ((z64_link.state_flags_1 & PLAYER_STATE1_CLIMBING) || (z64_link.state_flags_2 & PLAYER_STATE2_CRAWLING)) {
if (dpad_alpha != 70)
dpad_alpha = 70;
}
Expand Down
6 changes: 5 additions & 1 deletion ASM/c/dpad.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ bool init_done = false;
u8 compare_frames;

void handle_dpad() {
if (z64_file.game_mode != 0)
if (z64_file.game_mode != 0) {
init_done = false;
return;
}

compare_frames = 60 / fps_limit;

Expand Down Expand Up @@ -116,6 +118,8 @@ void handle_dpad() {

if (CFG_TYCOON_WALLET && z64_file.gs_tokens >= 40 && z64_file.wallet == 2 && TYCOON_WALLET)
z64_file.wallet = 3;

run_default_options_setup();
}
}

Expand Down
3 changes: 2 additions & 1 deletion ASM/c/dpad_actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ void player_process_item_buttons(z64_link_t* link, z64_game_t* game) {

if (link->current_mask != PLAYER_MASK_NONE) {
u8 mask_item_action = link->current_mask - 1 + PLAYER_IA_MASK_KEATON;
if (!player_item_is_item_action(C_BTN_ITEM(0), mask_item_action) && !player_item_is_item_action(C_BTN_ITEM(1), mask_item_action) && !player_item_is_item_action(C_BTN_ITEM(2), mask_item_action))
if (!player_item_is_item_action(C_BTN_ITEM(0), mask_item_action) && !player_item_is_item_action(C_BTN_ITEM(1), mask_item_action) && !player_item_is_item_action(C_BTN_ITEM(2), mask_item_action) && \
!player_item_is_item_action(get_dpad_btn_item(0), mask_item_action) && !player_item_is_item_action(get_dpad_btn_item(1), mask_item_action) && !player_item_is_item_action(get_dpad_btn_item(2), mask_item_action) && !player_item_is_item_action(get_dpad_btn_item(3), mask_item_action))
link->current_mask = PLAYER_MASK_NONE;
}

Expand Down
1 change: 0 additions & 1 deletion ASM/c/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ void before_skybox_init(z64_game_t* game, s16 skyboxId) {

void after_scene_init() {
last_scene = z64_game.scene_index;
run_default_options_setup();
}
2 changes: 1 addition & 1 deletion ASM/c/z64_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ typedef enum {
/* D-Pad & Controls Availability */
#define BLOCK_DPAD (PLAYER_STATE1_EXITING | PLAYER_STATE1_SWINGING_BOTTLE | PLAYER_STATE1_DEATH | PLAYER_STATE1_OPENING_CHEST | PLAYER_STATE1_PLAYING_OCARINA | PLAYER_STATE1_NO_CONTROL)
#define CAN_USE_DPAD ( (z64_link.state_flags_1 & BLOCK_DPAD) == 0 && (u32)z64_ctxt.state_dtor == z64_state_ovl_tab[3].vram_dtor && z64_file.game_mode == 0 && (z64_event_state_1 & 0x20) == 0)
#define CAN_DRAW_HUD ( ( (u32)z64_ctxt.state_dtor==z64_state_ovl_tab[3].vram_dtor) && (z64_file.game_mode == 0) && ( (z64_event_state_1 & 0x20) == 0) )
#define CAN_DRAW_HUD ( ( (u32)z64_ctxt.state_dtor==z64_state_ovl_tab[3].vram_dtor) && (z64_file.game_mode == 0) )
#define CAN_USE_SWAP(index) (IS_PAUSE_SCREEN_CURSOR && (z64_game.pause_ctxt.mainState == 0 || z64_game.pause_ctxt.mainState == 3) && z64_game.pause_ctxt.pageIndex == index)
#define CAN_USE_MASK_SWAP (CAN_USE_SWAP(0) && z64_game.pause_ctxt.cursorPoint[PAUSE_ITEM] == Z64_SLOT_CHILD_TRADE && OPTION_ACTIVE(2, SAVE_SWAP_ITEM, CFG_DEFAULT_SWAP_ITEM) && GET_INFTABLE(INFTABLE_GIVEN_ZELDAS_LETTER) && \
z64_file.items[Z64_SLOT_CHILD_TRADE] >= Z64_ITEM_KEATON_MASK && z64_file.items[Z64_SLOT_CHILD_TRADE] <= Z64_ITEM_MASK_OF_TRUTH)
Expand Down

0 comments on commit 15a4ebf

Please sign in to comment.