Skip to content

Commit 6185070

Browse files
committed
Fix agressive fish
1 parent 7c38715 commit 6185070

8 files changed

Lines changed: 21150 additions & 21126 deletions

File tree

ASM/build/asm_symbols.txt

Lines changed: 739 additions & 738 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ASM/build/bundle.o

104 Bytes
Binary file not shown.

ASM/build/c_symbols.txt

Lines changed: 525 additions & 524 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ASM/c/inputviewer.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,10 @@ void draw_input_viewer(z64_disp_buf_t* db) {
170170
draw_y_stick(db);
171171
}
172172
}
173+
174+
uint8_t is_hook_static() {
175+
if (z64_game.common.input[0].raw.pad.a || z64_game.common.input[0].raw.x != 0 || z64_game.common.input[0].raw.y != 0) {
176+
return 0;
177+
}
178+
return 1;
179+
}

ASM/c/inputviewer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ extern colorRGB16_t CFG_C_BUTTON_COLOR;
1111

1212
void draw_input_viewer(z64_disp_buf_t* db);
1313

14+
uint8_t is_hook_static();
15+
1416
#endif

ASM/src/fishing.asm

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,19 @@ cast_fishing_rod_if_equipped:
4040
nop
4141

4242
fishing_bite_when_stable:
43-
lui t0, 0x801F
44-
addiu t0, t0, 0x5DE0 ; BSS fishing data pointer
45-
lw at, 0x009C(t0) ; at = current hook movement
46-
bnez at, @@return
43+
addiu sp, sp, -0x18
44+
sw ra, 0x14(sp)
45+
46+
jal is_hook_static
47+
nop
48+
beqz v0, @@return
4749
mul.s f4, f10, f2 ; if the hook is not stable, use the default code (set bite chance)
4850
lui t0, 0x3F80 ; else, guarantee bite
4951
mtc1 t0, f4 ; f4 = 1.00
5052
@@return:
53+
lw ra, 0x14(sp)
5154
jr ra
52-
nop
55+
addiu sp, sp, 0x18
5356

5457
give_loach_reward:
5558
la at, SAVE_CONTEXT

0 commit comments

Comments
 (0)