1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 22:30:15 +00:00

Decompile Fishing and document object_fish (#856)

* Start decompiling Fishing

* Decompile more functions in Fishing

* Decompile a few more functions in Fishing

* Decompile func_80B6E9E0 and func_80B7825C (non matching)

* Minor Fishing cleanups

* Migrate fishing bss to C and match 3 functions

* Decompile and match Fishing_Update

* Migrate fishing data to C and minor cleanups

* Fix the object_fish xml and use its symbols in Fishing

* Partially document Fishing and object_fish

* Add more documentation/cleanups to Fishing and object_fish

* Use object_fish symbols in Demo_Ec and fix naming

* Minor fixes to Fishing docs

* Apply review suggestions for Fishing

* Apply 2 more review suggestions for Fishing

* Apply some review suggestions for Fishing
This commit is contained in:
Roman971 2021-07-04 19:42:17 +02:00 committed by GitHub
parent 89f684b026
commit fa0a0fe81b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 5814 additions and 20562 deletions

View file

@ -1,202 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .bss
.balign 16
glabel D_80B7E070
.space 0x04
glabel D_80B7E074
.space 0x01
glabel D_80B7E075
.space 0x01
glabel D_80B7E076
.space 0x01
glabel D_80B7E077
.space 0x01
glabel D_80B7E078
.space 0x04
glabel D_80B7E07C
.space 0x01
glabel D_80B7E07D
.space 0x01
glabel D_80B7E07E
.space 0x02
glabel D_80B7E080
.space 0x02
glabel D_80B7E082
.space 0x02
glabel D_80B7E084
.space 0x02
glabel D_80B7E086
.space 0x02
glabel D_80B7E088
.space 0x08
glabel D_80B7E090
.space 0x0C
glabel D_80B7E09C
.space 0x02
glabel D_80B7E09E
.space 0x02
glabel D_80B7E0A0
.space 0x02
glabel D_80B7E0A2
.space 0x02
glabel D_80B7E0A4
.space 0x02
glabel D_80B7E0A6
.space 0x02
glabel D_80B7E0A8
.space 0x04
glabel D_80B7E0AC
.space 0x02
glabel D_80B7E0AE
.space 0x02
glabel D_80B7E0B0
.space 0x02
glabel D_80B7E0B2
.space 0x02
glabel D_80B7E0B4
.space 0x02
glabel D_80B7E0B6
.space 0x02
glabel D_80B7E0B8
.space 0x04
glabel D_80B7E0BC
.space 0x04
glabel D_80B7E0C0
.space 0x08
glabel D_80B7E0C8
.space 0x10
glabel D_80B7E0D8
.space 0x04
glabel D_80B7E0DC
.space 0x0C
glabel D_80B7E0E8
.space 0x04
glabel D_80B7E0EC
.space 0x0C
glabel D_80B7E0F8
.space 0x0C
glabel D_80B7E104
.space 0x04
glabel D_80B7E108
.space 0x04
glabel D_80B7E10C
.space 0x04
glabel D_80B7E110
.space 0x04
glabel D_80B7E114
.space 0x02
glabel D_80B7E116
.space 0x02
glabel D_80B7E118
.space 0x04
glabel D_80B7E11C
.space 0x04
glabel D_80B7E120
.space 0x02
glabel D_80B7E122
.space 0x02
glabel D_80B7E124
.space 0x04
glabel D_80B7E128
.space 0x04
glabel D_80B7E12C
.space 0x08
glabel D_80B7E134
.space 0x04
glabel D_80B7E138
.space 0x04
glabel D_80B7E13C
.space 0x04
glabel D_80B7E140
.space 0x04
glabel D_80B7E144
.space 0x04
glabel D_80B7E148
.space 0x04
glabel D_80B7E14C
.space 0x04
glabel D_80B7E150
.space 0x04
glabel D_80B7E154
.space 0x04
glabel D_80B7E158
.space 0x10
glabel D_80B7E168
.space 0x954
glabel D_80B7EABC
.space 0x04
glabel D_80B7EAC0
.space 0x04
glabel D_80B7EAC4
.space 0x04
glabel D_80B7EAC8
.space 0x960
glabel D_80B7F428
.space 0x960
glabel D_80B7FD88
.space 0x0C
glabel D_80B7FD94
.space 0x0C
glabel D_80B7FDA0
.space 0x08
glabel D_80B7FDA8
.space 0x08
glabel D_80B7FDB0
.space 0xF0
glabel D_80B7FEA0
.space 0x04
glabel D_80B7FEA4
.space 0x04
glabel D_80B7FEA8
.space 0x04
glabel D_80B7FEAC
.space 0x04
glabel D_80B7FEB0
.space 0x08
glabel D_80B7FEB8
.space 0x04
glabel D_80B7FEBC
.space 0x04
glabel D_80B7FEC0
.space 0x04
glabel D_80B7FEC4
.space 0x04
glabel D_80B7FEC8
.space 0x04
glabel D_80B7FECC
.space 0x04
glabel D_80B7FED0
.space 0x08
glabel D_80B7FED8
.space 0x0C
glabel D_80B7FEE4
.space 0x04
glabel D_80B7FEE8
.space 0x04
glabel D_80B7FEEC
.space 0x04
glabel D_80B7FEF0
.space 0x08
glabel D_80B7FEF8
.space 0x20D0
glabel D_80B81FC8
.space 0x10E0
glabel D_80B830A8
.space 0x04
glabel D_80B830AC
.space 0x04
glabel D_80B830B0
.space 0x08
glabel D_80B830B8
.space 0x2080
glabel D_80B85138
.space 0x18

View file

@ -1,141 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .data
.balign 16
glabel Fishing_InitVars
.word 0x00FE0400, 0x00000010, 0x015B0000, 0x00000550
.word Fishing_Init
.word Fishing_Destroy
.word Fishing_Update
.word Fishing_Draw
glabel D_80B7A650
.word 0x00000000
glabel D_80B7A654
.word 0x00000000
glabel D_80B7A658
.word 0x00000000
glabel D_80B7A65C
.word 0x00000000, 0x00000000
glabel D_80B7A664
.word 0x00000000
glabel D_80B7A668
.word 0x00000000
glabel D_80B7A66C
.word 0x00000000
glabel D_80B7A670
.word 0x00000000
glabel D_80B7A674
.word 0x01000000
glabel D_80B7A678
.word 0x00000000
glabel D_80B7A67C
.word 0x00000000
glabel D_80B7A680
.word 0x00000000
glabel D_80B7A684
.word 0x00000000
glabel D_80B7A688
.word 0x00000000
glabel D_80B7A68C
.word 0x00000000
glabel D_80B7A690
.word 0x00000000
glabel D_80B7A694
.word 0x00000000
glabel D_80B7A698
.word 0x43FA0000
glabel D_80B7A69C
.word 0x43FA0000, 0x00000000
glabel D_80B7A6A4
.word 0x00000000
glabel D_80B7A6A8
.word 0x00000000
glabel D_80B7A6AC
.word 0x00000000
glabel D_80B7A6B0
.word 0x00000000
glabel D_80B7A6B4
.word 0x00000000
glabel D_80B7A6B8
.word 0x00000000
glabel D_80B7A6BC
.word 0x00000000
glabel D_80B7A6C0
.word 0x00000000
glabel D_80B7A6C4
.word 0x00000000
glabel D_80B7A6C8
.word 0x00000000
glabel D_80B7A6CC
.word 0x00000000
glabel D_80B7A6D0
.word 0x00000000
glabel D_80B7A6D4
.word 0x00000000
glabel D_80B7A6D8
.word 0x00000000, 0xFFCFFFFF, 0x00100000, 0xFFCFFFFF, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x001E0064, 0x00000000
glabel D_80B7A700
.word 0xFFCFFFFF, 0x00100000
glabel D_80B7A708
.word 0xFFCFFFFF
glabel D_80B7A70C
.word 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x001E0064, 0x00000000, 0xFFCFFFFF, 0x00100000, 0xFFCFFFFF, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x001E0064, 0x00000000, 0xFFCFFFFF, 0x00100000, 0xFFCFFFFF, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x001E0064, 0x00000000, 0xFFCFFFFF, 0x00100000, 0xFFCFFFFF, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x001E0064, 0x00000000, 0xFFCFFFFF, 0x00100000, 0xFFCFFFFF, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x001E0064, 0x00000000, 0xFFCFFFFF, 0x00100000, 0xFFCFFFFF, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x001E0064, 0x00000000, 0xFFCFFFFF, 0x00100000, 0xFFCFFFFF, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x001E0064, 0x00000000, 0xFFCFFFFF, 0x00100000, 0xFFCFFFFF, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x001E0064, 0x00000000, 0xFFCFFFFF, 0x00100000, 0xFFCFFFFF, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x001E0064, 0x00000000, 0xFFCFFFFF, 0x00100000, 0xFFCFFFFF, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x001E0064, 0x00000000, 0xFFCFFFFF, 0x00100000, 0xFFCFFFFF, 0x00000000, 0x00000100, 0x00000000, 0x00000000, 0x001E0064
glabel D_80B7A888
.word 0x0A100809, 0x10000000, 0x0000000C
.word D_80B7A6D8
glabel D_80B7A898
.word 0x00000000
glabel D_80B7A89C
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x44FA0000
glabel D_80B7A8B4
.word 0x00000000, 0xBF800000, 0x00000000
glabel D_80B7A8C0
.word 0x00000000, 0x3D4CCCCD, 0x00000000
glabel D_80B7A8CC
.word 0x00000000, 0x3F800000, 0x00000000
glabel D_80B7A8D8
.word 0x03000211, 0xFFCBFE0E, 0x030001CD, 0xFFBEFE20, 0x0300018E, 0xFFB7FE26, 0x0300FF1E, 0xFFCCFD4D, 0x0300FED4, 0xFFD7FD3A, 0x0300FEB3, 0xFFCEFD7D, 0x0300FE7D, 0xFFD2FD88, 0x0300FE1C, 0xFFD5FDAC, 0x0300FE67, 0xFFC7FDD0, 0x040001BC, 0xFFA9FEBE, 0x040001BF, 0xFFA5FEEE, 0x0400018B, 0xFF93FF43, 0x01000269, 0xFFE30286, 0x010002BA, 0xFFE60248, 0x010002C7, 0xFFE301F5, 0x010002F5, 0xFFE401C9, 0x0100032C, 0xFFE30155, 0x01000358, 0xFFE200EB, 0x0100034F, 0xFFE10053, 0x01000384, 0xFFE60077, 0x0200035D, 0xFFEA0089, 0x02000344, 0xFFEA0096, 0x0200033D, 0xFFEA00C8, 0x02000314, 0xFFEA00E8, 0x02000323, 0xFFEA013F, 0x020002F4, 0xFFEA015C, 0x020002DB, 0xFFEA0179, 0x020002BC, 0xFFEA0188, 0x020002C2, 0xFFEA015F, 0x020002A5, 0xFFEA011E, 0x020002B3, 0xFFEA00FA, 0x020002E8, 0xFFEA0122, 0x020002FE, 0xFFEA00C9, 0x0200030D, 0xFFEA0080, 0x02000331, 0xFFEA002E, 0x02000359, 0xFFEAFFCE, 0x020002D4, 0xFFEA006E, 0x020002D3, 0xFFEA0091, 0x020002D8, 0xFFEA00CA, 0x020002D1, 0xFFEA00ED, 0x020002BA, 0xFFEA0138, 0x02000294, 0xFFEA015D, 0x02000296, 0xFFEA0184, 0x0200029B, 0xFFEA01B0, 0x020002DC, 0xFFEA01AD, 0x0200025E, 0xFFEA016E, 0x0200025C, 0xFFEA011E, 0x0200026C, 0xFFEA00D9, 0x02000297, 0xFFEA009F, 0x020002AA, 0xFFEA0049, 0x02000309, 0xFFEA0053, 0x020002FE, 0xFFEA009E, 0x01000431, 0x0000FC94, 0x010003CA, 0x0000FCAB, 0x01000380, 0x0000FC8A, 0x01000286, 0xFFE5FD75, 0x01000255, 0xFFE3FD6F, 0x01000223, 0xFFE0FD75, 0x010002B2, 0xFFE3FDDE, 0x010002D0, 0xFFE3FE16, 0x0100FD0C, 0xFFE2FE67, 0x0100FD50, 0xFFDEFE36, 0x0100FD9B, 0xFFDEFDBB, 0x0200FDAF, 0xFFEAFE21, 0x0200FDA6, 0xFFEAFE5B, 0x0200FD68, 0xFFEAFE8D, 0x0200FD3C, 0xFFEAFEC4, 0x0200FD32, 0xFFEAFF13, 0x0100FCD9, 0xFFDCFF49, 0x0100FCA8, 0xFFE3FEFD, 0x0200FCD2, 0xFFEAFEC3, 0x0200FD09, 0xFFEAFE80, 0x0200FD32, 0xFFEAFE47, 0x0200FE26, 0xFFEAFDC9, 0x0200FDF9, 0xFFEAFDFB, 0x0200FDE5, 0xFFEAFE19, 0x0200FDC1, 0xFFEAFE46, 0x0200FDAE, 0xFFEAFDF3, 0x0200FD63, 0xFFEAFDFE, 0x0200FD73, 0xFFEAFE38, 0x0100FD69, 0xFFE4FDA2, 0x0100FD3C, 0xFFE6FDC9, 0x0100FD1D, 0xFFE5FE06, 0x0100FD10, 0xFFE4FE30, 0x0100FD3B, 0xFFE3FDFF, 0x0200FDE0, 0xFFEAFE4C, 0x0200FDD1, 0xFFEAFE73, 0x0200FD98, 0xFFEAFE9F, 0x0200FD38, 0xFFEAFE90, 0x0200FD5A, 0xFFEAFE6D, 0x0200FD68, 0xFFEAFEEF, 0x0200FD8A, 0xFFEAFEEC, 0x0200FDBD, 0xFFEAFEC9, 0x0200FDB4, 0xFFEAFEA1, 0x0200FDD5, 0xFFEAFDEA, 0x0200FDDD, 0xFFEAFDC9, 0x0200FDB0, 0xFFEAFDC5, 0x0200FDE3, 0xFFEAFD9E, 0x0200FE24, 0xFFEAFD8B, 0x0200FE49, 0xFFEAFDAA, 0x0200FE64, 0xFFEAFDDA, 0x0200FE65, 0xFFEAFDA2, 0x0200FE8E, 0xFFEAFD86, 0x0200FEA0, 0xFFEAFD6A, 0x0200FE63, 0xFFEAFD7F, 0x0200FE18, 0xFFEAFD66, 0x0200FDBE, 0xFFEAFD70, 0x0200FDD0, 0xFFEAFD80, 0x0200FDED, 0xFFEAFD72, 0x0200FE3D, 0xFFEAFD63, 0x0200FE49, 0xFFEAFD45, 0x0200FE1E, 0xFFEAFD31, 0x0200FDF4, 0xFFEAFD30, 0x0200FDC7, 0xFFEAFD36, 0x0100FDF8, 0xFFE5FD29, 0x0100FDC4, 0xFFE4FD52, 0x0100FDB4, 0xFFE0FD89, 0x0100FD92, 0xFFDEFDC5, 0x0100FD8C, 0xFFDCFE02, 0x0100FD71, 0xFFDCFE2E, 0x0100FD71, 0xFFD7FE77, 0x0100FD6B, 0xFFD1FEB8, 0x0100FD2D, 0xFFD8FEE1, 0x0100FD0C, 0xFFDFFEA3, 0x0100FD0D, 0xFFD5FF2E, 0x0200FCFE, 0xFFEAFEE7, 0x0200FD12, 0xFFEAFEC7, 0x0200FD20, 0xFFEAFEAB, 0x0200FD94, 0xFFEAFE5E, 0x0200FDA7, 0xFFEAFE8D, 0x0200FD85, 0xFFEAFE81, 0x0200FD8D, 0xFFEAFEC9, 0x0200FD67, 0xFFEAFEB9, 0x0200FDF4, 0xFFEAFDE7, 0x0200FDFE, 0xFFEAFDBD, 0x0200FE00, 0xFFEAFD91, 0x0200FDC0, 0xFFEAFDBA, 0x0200FDA8, 0xFFEAFDA0, 0x0200FD6F, 0xFFEAFDED, 0x0200FD7F, 0xFFEAFDDD, 0x23000000, 0x00000000
glabel D_80B7AD40
.word 0x0000029A, 0xFFD30162, 0x26000000, 0x3DCCCCCD, 0x000002A9, 0xFFD300F0, 0x24000000, 0x3DCCCCCD, 0x0000029E, 0xFFD3005A, 0x29000000, 0x3D4CCCCD, 0x00000267, 0xFFD3FE3E, 0x23000000, 0x3E4CCCCD, 0x000001F4, 0xFFD3FE5C, 0x27000000, 0x3DCCCCCD, 0x000001A4, 0xFFD3FDDA, 0x2C000000, 0x3D4CCCCD, 0x0000FEF8, 0xFFD3FD80, 0x28000000, 0x3DCCCCCD, 0x0000FE2A, 0xFFD3FDE4, 0x22000000, 0x3E4CCCCD, 0x0000FDD3, 0xFFD3FE52, 0x36000000, 0x3C23D70A, 0x0000FEFC, 0xFFC4FEB6, 0x2F000000, 0x3D4CCCCD, 0x0000FE0C, 0xFFC4014A, 0x2A000000, 0x3D75C28F, 0x000001AC, 0xFFD8FEE5, 0x21000000, 0x3E4CCCCD, 0x00000199, 0xFFBAFF1A, 0x39000000, 0x00000000, 0x000001C2, 0xFFBDFED4, 0x3F000000, 0x00000000, 0x0000FF78, 0xFFBFFF3C, 0x47000000, 0x00000000, 0x0100FDCF, 0xFFDDFDDD, 0x2D000000, 0x00000000, 0x0100029B, 0xFFDD013D, 0x2B000000, 0x00000000
glabel D_80B7AE50
.word 0x801F0005, 0x304C0000
glabel D_80B7AE58
.word 0x00000000, 0x00000000, 0x00000000
glabel D_80B7AE64
.word 0x00000000, 0x00000000, 0x00000000
glabel D_80B7AE70
.word 0x00000000, 0x00000000, 0x3F800000
glabel D_80B7AE7C
.word 0x00000000, 0x00000000, 0x00000000
glabel D_80B7AE88
.word 0x3F800000, 0x3FC00000, 0x3FE66666, 0x40000000, 0x3FE66666, 0x3FCCCCCD, 0x3FB33333, 0x3F99999A, 0x3F800000, 0x3F800000, 0x3F666666, 0x3F59999A, 0x3F4CCCCD, 0x3F333333, 0x3F4CCCCD, 0x3F800000, 0x3F99999A, 0x3F8CCCCD, 0x3F800000, 0x3F4CCCCD
glabel D_80B7AED8
.word 0x3F800000, 0x3F800000, 0x3F800000, 0x3F766666, 0x3F6CCCCD, 0x3F633333, 0x3F59999A, 0x3F500000, 0x3F466666, 0x3F3CCCCC, 0x3F333333, 0x3F29999A, 0x3F200000, 0x3F166666, 0x3F0CCCCC, 0x3F033333, 0x3EF33332, 0x3EE00000, 0x3ECCCCCC, 0x3EB99998, 0x3EA66666, 0x3E933332
glabel D_80B7AF30
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3D75C28F, 0x3DF5C28F, 0x3E3851EC, 0x3E75C28F, 0x3E99999A, 0x3EB851EC, 0x3ED70A3D, 0x3EF5C28F, 0x3F0A3D71, 0x3F19999A, 0x3F19999A, 0x3F03A29C, 0x3EDB645A, 0x3EAF837B, 0x3E83A29C, 0x3E2F837B, 0x3DAF837B
glabel D_80B7AF88
.word 0x00000000, 0x00000000, 0x00000000
glabel D_80B7AF94
.word 0x00000000, 0x00000000, 0x00000000
glabel D_80B7AFA0
.word 0x00000000, 0x00000000, 0x00000000
glabel D_80B7AFAC
.word 0x43FA0000, 0x43FA0000, 0x00000000
glabel D_80B7AFB8
.word 0x4096408D, 0x408E408F, 0x40944095
glabel D_80B7AFC4
.word 0x00000001, 0x00020002, 0x00010000
glabel D_80B7AFD0
.word 0x44278000, 0x00000000, 0xC4160000
glabel D_80B7AFDC
.word 0xFE94FFE2, 0xFEF30469, 0x0003FCA9, 0xFE200000, 0xFBE10229, 0xFFD0FE04
glabel D_80B7AFF4
.word 0x06009250, 0x06009650, 0x06009A50

View file

@ -1,13 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .rodata
.balign 16
glabel D_80B7B8F0
.incbin "baserom/ovl_Fishing", 0x11F50, 0x00002780