Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more functions from SethBarberee #88

Merged
merged 4 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions asm/include/main_02000C6C.inc → asm/include/main_02000DE0.inc
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#pragma once
.public CardPullOut
.public ClearIrqFlag
.public Debug_FatalError
.public Debug_Init
.public Debug_Print0
.public GX_DispOff
.public GX_VBlankIntr
Expand All @@ -26,8 +24,6 @@
.public _02090BC8
.public _02090BFC
.public _02090C48
.public _02092448
.public _02092460
.public _02092464
.public _020924D8
.public _020924E8
Expand Down Expand Up @@ -67,16 +63,13 @@
.public _fadd
.public _fflt
.public _fmul
.public sub_02003ECC
.public sub_020059A8
.public sub_02005EAC
.public sub_02006098
.public sub_02006D4C
.public sub_02006DEC
.public sub_020081C8
.public sub_020082E0
.public sub_020082F4
.public sub_02008DAC
.public sub_02017D20
.public sub_02017DB4
.public sub_02017FF0
Expand All @@ -85,8 +78,6 @@
.public sub_02018278
.public sub_02018428
.public sub_0201849C
.public sub_0204A5D0
.public sub_02076070
.public sub_02078A98
.public sub_02078C68
.public sub_02079844
Expand All @@ -102,26 +93,13 @@
.public sub_0207A048
.public sub_0207A0CC
.public sub_0207A164
.public sub_0207A220
.public sub_0207A30C
.public sub_0207A36C
.public sub_0207A524
.public sub_0207A538
.public sub_0207A6EC
.public sub_0207A95C
.public sub_0207A98C
.public sub_0207AA34
.public sub_0207AD54
.public sub_0207B370
.public sub_0207B4A4
.public sub_0207B4B8
.public sub_0207B584
.public sub_0207B930
.public sub_0207B9EC
.public sub_0207F3BC
.public sub_020820E8
.public sub_02082420
.public sub_020833F8
.public sub_02083434
.public sub_02083450
.public sub_0208346C
Expand Down
84 changes: 72 additions & 12 deletions asm/include/overlay_03.inc → asm/include/overlay_03_0233CA98.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once
.public _ll_udiv
.public _ull_mod
.public AddItemToStorage
.public CanSendItem
.public CloseAdvancedMenu
Expand Down Expand Up @@ -43,10 +41,21 @@
.public ItemZInit
.public LoadFileFromRom
.public MemAlloc
.public MemcpySimple
.public MemFree
.public MemZero
.public MemcpySimple
.public NoteSaveBase
.public PlaySeVolumeWrapper
.public PrintIqSkillsMenu
.public RandInt
.public SetQuestionMarks
.public ShowKeyboard
.public StrcpyName
.public StringFromId
.public StrncpySimpleNoPadSafe
.public UnloadFile
.public _ll_udiv
.public _ull_mod
.public ov00_022BCA80
.public ov00_022BCBAC
.public ov00_022BCCF4
Expand Down Expand Up @@ -113,14 +122,66 @@
.public ov01_023398B0
.public ov01_02339988
.public ov01_0233C1B4
.public PlaySeVolumeWrapper
.public PrintIqSkillsMenu
.public RandInt
.public SetQuestionMarks
.public ShowKeyboard
.public StrcpyName
.public StringFromId
.public StrncpySimpleNoPadSafe
.public ov03_0233CA80
.public ov03_02346738
.public ov03_0234673C
.public ov03_0234674C
.public ov03_0234675C
.public ov03_02346774
.public ov03_0234678C
.public ov03_023467A4
.public ov03_023467BC
.public ov03_023467C0
.public ov03_023467D4
.public ov03_023467EC
.public ov03_02346804
.public ov03_02346824
.public ov03_02346844
.public ov03_02346848
.public ov03_02346864
.public ov03_02346884
.public ov03_023468A4
.public ov03_023468C4
.public ov03_023468E4
.public ov03_023468E8
.public ov03_02346904
.public ov03_02346908
.public ov03_0234692C
.public ov03_02346930
.public ov03_02346954
.public ov03_02346958
.public ov03_0234697C
.public ov03_023469A4
.public ov03_023469A8
.public ov03_023469D4
.public ov03_023469D8
.public ov03_02346A04
.public ov03_02346A34
.public ov03_02346A38
.public ov03_02346A64
.public ov03_02346A68
.public ov03_02346A6C
.public ov03_02346A84
.public ov03_02346A90
.public ov03_02346A9C
.public ov03_02346AAC
.public ov03_02346ABC
.public ov03_02346AC8
.public ov03_02346AD8
.public ov03_02346AE8
.public ov03_02346AF8
.public ov03_02346B20
.public ov03_02346BB8
.public ov03_02346BBC
.public ov03_02346BC0
.public ov03_02346BC4
.public ov03_02346BC8
.public ov03_02346BCC
.public ov03_02346BD4
.public ov03_02346BD8
.public ov03_02346BDC
.public ov03_02346BE0
.public ov03_02346BF0
.public sub_02003B94
.public sub_02003BC8
.public sub_02003BFC
Expand Down Expand Up @@ -243,4 +304,3 @@
.public sub_020698B8
.public sub_02069904
.public sub_02069940
.public UnloadFile
47 changes: 29 additions & 18 deletions asm/include/overlay_13.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#pragma once
.public _s32_div_f
.public CloseAdvancedMenu
.public CloseDialogueBox
.public ClosePortraitBox
Expand All @@ -11,15 +10,15 @@
.public CreateSimpleMenuFromStringIds
.public CreateTextBox
.public Debug_GetDebugFlag
.public DrawTextInWindow
.public ExitOverlay13
.public FemaleToMaleForm
.public GetAdvancedMenuCurrentOption
.public GetAdvancedMenuResult
.public GetKeyboardStatus
.public GetKeyboardStringResult
.public GetMonsterGenderVeneer
.public GetNameRaw
.public GetOptionStringFromID
.public GetPersonality
.public GetPressedButtons
.public GetReleasedStylus
.public GetSimpleMenuResult
Expand All @@ -32,19 +31,27 @@
.public IsAdvancedMenuActive
.public IsDialogueBoxActive
.public IsSimpleMenuActive
.public MemAlloc
.public MemFree
.public ov11_022E6E68
.public ov11_022E6E8C
.public ov11_022E6EC8
.public ov11_022EB3C8
.public ov11_023039D4
.public ov11_02303D80
.public ov11_0230D71C
.public Overlay13SwitchFunctionNa238A1C8
.public PreprocessString
.public PreprocessStringFromId
.public OVERLAY13_UNKNOWN_POINTER__NA_238CEA0
.public PORTRAIT_ATTRIBUTES
.public QUIZ_ANSWER_POINTS
.public QUIZ_ANSWER_STRINGS
.public QUIZ_BORDER_COLOR_TABLE
.public QUIZ_DEBUG_MENU_ITEMS
.public QUIZ_MALE_FEMALE_BOOST_TABLE
.public QUIZ_MENU_ITEMS_1
.public QUIZ_QUESTION_ANSWER_ASSOCIATIONS
.public QUIZ_QUESTION_STRINGS
.public QUIZ_WINDOW_PARAMS_1
.public QUIZ_WINDOW_PARAMS_2
.public QUIZ_WINDOW_PARAMS_3
.public QUIZ_WINDOW_PARAMS_4
.public QUIZ_WINDOW_PARAMS_5
.public QUIZ_WINDOW_PARAMS_6
.public RandInt
.public STARTERS_HERO_IDS
.public STARTERS_PARTNER_IDS
.public STARTERS_STRINGS
.public STARTERS_TYPE_INCOMPATIBILITY_TABLE
.public SaveScriptVariableValue
.public SetBothScreensWindowsColor
.public SetPortraitEmotion
Expand All @@ -57,22 +64,26 @@
.public StrcpyName
.public StrcpySimple
.public StrncpySimpleNoPadSafe
.public WaitForNextStep
.public _s32_div_f
.public ov11_022EB3C8
.public ov11_023039D4
.public ov11_02303D80
.public ov11_0230D71C
.public ov13_0238BE6C
.public sub_02004F74
.public sub_02017B7C
.public sub_02017C74
.public sub_02017CB4
.public sub_0201F2E4
.public sub_02025304_JP
.public sub_02027B1C
.public sub_0202836C
.public sub_02028770
.public sub_0202F2C4
.public sub_020348E4
.public sub_02037468
.public sub_0203909C
.public sub_02039218
.public sub_0203931C
.public sub_02048764
.public sub_02048794
.public sub_0204A198
.public UpdateWindow
4 changes: 4 additions & 0 deletions asm/include/overlay_13_0238BDF0.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#pragma once
.public OVERLAY13_UNKNOWN_POINTER__NA_238CEA0
.public PreprocessString
.public ov13_0238CE70
9 changes: 9 additions & 0 deletions asm/include/overlay_13_0238BE6C.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
.public DrawTextInWindow
.public ExitOverlay13
.public InitPreprocessorArgs
.public OVERLAY13_UNKNOWN_POINTER__NA_238CEA0
.public Overlay13SwitchFunctionNa238A1C8
.public PreprocessStringFromId
.public UpdateWindow
.public sub_02027B1C
102 changes: 1 addition & 101 deletions asm/main_02000C6C.s → asm/main_02000DE0.s
Original file line number Diff line number Diff line change
@@ -1,108 +1,8 @@
.include "asm/macros.inc"
.include "main_02000C6C.inc"
.include "main_02000DE0.inc"

.text

arm_func_start NitroMain
NitroMain: ; 0x02000C6C
stmdb sp!, {r4, lr}
sub sp, sp, #8
bl sub_0207A36C
mov r0, #0x12
bl sub_020833F8
ldr r0, _02000DD0 ; =sub_020024D4
bl sub_020845D8
bl sub_0207AD54
bl sub_02076070
mvn r0, #0
bl sub_0207F3BC
bl sub_0207A220
bl sub_0207A30C
mov r0, #0
bl sub_0207A524
mov r4, r0
mov r0, #0
bl sub_0207A538
mov r2, r4
mov r1, r0
ldr r0, _02000DD4 ; =_02092448
bl Debug_Print0
mov r0, #0
bl sub_0207A524
mov r4, r0
mov r0, #0
bl sub_0207A538
cmp r0, r4
bhs _02000D44
mov r0, #0
bl sub_0207A524
mov r4, r0
mov r0, #0
bl sub_0207A538
mov r1, r0
mov r2, r4
mov r0, #0
mov r3, #1
bl sub_0207A98C
mov r1, r0
mov r0, #0
bl sub_0207A6EC
mov r0, #0
bl sub_0207A524
mov r4, r0
mov r0, #0
bl sub_0207A538
mov r2, r4
mov r1, r0
mov r0, #0
bl sub_0207AA34
mov r1, r0
mov r0, #0
bl sub_0207A95C
_02000D44:
ldr r2, _02000DD8 ; =0x04000208
mov r0, #1
ldrh r1, [r2]
strh r0, [r2]
bl ClearIrqFlag
bl sub_02008DAC
add r0, sp, #0
bl sub_0207B9EC
ldrb r1, [sp, #2]
ldrb r0, [sp, #3]
ldrb r3, [sp]
ldrb r2, [sp, #1]
smulbb r0, r1, r0
mla r0, r3, r2, r0
ldrb r2, [sp, #4]
ldrb r1, [sp, #5]
mla r0, r2, r1, r0
bl sub_02002228
bl sub_020024E4
bl sub_020028AC
bl sub_0200294C
bl sub_02002A98
bl sub_02002C2C
bl sub_02002F0C
bl InitMemAllocTableVeneer
bl Debug_Init
bl sub_02002FB8
ldr r0, _02000DDC ; =_02092460
bl sub_020082F4
bl sub_0204A5D0
bl sub_02003ECC
bl TaskProcBoot
bl sub_02079C14
_02000DC8:
bl WaitForInterrupt
b _02000DC8
.align 2, 0
_02000DD0: .word sub_020024D4
_02000DD4: .word _02092448
_02000DD8: .word 0x04000208
_02000DDC: .word _02092460
arm_func_end NitroMain

arm_func_start InitMemAllocTable
InitMemAllocTable: ; 0x02000DE0
stmdb sp!, {r3, lr}
Expand Down
Loading