Skip to content

Commit

Permalink
sync warnings and some funcs with pokeheartgold
Browse files Browse the repository at this point in the history
  • Loading branch information
red031000 committed May 29, 2023
1 parent 64f5b41 commit bd0eb68
Show file tree
Hide file tree
Showing 129 changed files with 883 additions and 654 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ OBJCOPY := $(CROSS)objcopy

# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
MWASFLAGS = -proc arm5te
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i include -ir include-mw -ir arm9/lib/libc/include -ir arm9/lib/libnns/include -ir arm9/lib/NitroSDK/include -W all -W noimpl_signedunsigned
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i include -ir include-mw -ir arm9/lib/libc/include -ir arm9/lib/libnns/include -ir arm9/lib/NitroSDK/include -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
MWLDFLAGS = -map -nodead -w off -proc v5te -interworking -map -symtab -m _start -msgstyle gcc

####################### Other Tools #########################
Expand Down
2 changes: 1 addition & 1 deletion arm7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ OBJCOPY := $(CROSS)objcopy

# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm7_thumb.s -o arm7.o
MWASFLAGS = -proc arm4t -i ..
MWCFLAGS = -O4,s -proc arm7tdmi -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/include -interworking -DFS_IMPLEMENT -enum int -W all -W noimpl_signedunsigned
MWCFLAGS = -O4,s -proc arm7tdmi -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/include -interworking -DFS_IMPLEMENT -enum int -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
MWLDFLAGS = -map -nodead -w off -proc v4t -interworking -map -symtab -m _start -msgstyle gcc

####################### Other Tools #########################
Expand Down
6 changes: 3 additions & 3 deletions arm9/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ ASM_PROCESSOR := $(ASM_PROCESSOR_DIR)/compile.sh

# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
MWASFLAGS = -proc arm5te -i ../include -i .. -D$(GAME_VERSION) -D$(GAME_LANGUAGE)
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -ipa file -fp soft -lang c99 -Cpp_exceptions off $(foreach dir,$(INCLUDE_DIRS),-i $(dir)) $(foreach dir,$(INCLUDE_RECURSIVE_DIRS),-ir $(dir)) -interworking -DFS_IMPLEMENT -enum int -W all -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W noimpl_signedunsigned
MWCXXFLAGS = -O4,p -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off $(foreach dir,$(INCLUDE_DIRS),-i $(dir)) $(foreach dir,$(INCLUDE_RECURSIVE_DIRS),-ir $(dir)) -interworking -DFS_IMPLEMENT -enum int -W all -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W noimpl_signedunsigned
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -ipa file -fp soft -lang c99 -Cpp_exceptions off $(foreach dir,$(INCLUDE_DIRS),-i $(dir)) $(foreach dir,$(INCLUDE_RECURSIVE_DIRS),-ir $(dir)) -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
MWCXXFLAGS = -O4,p -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off $(foreach dir,$(INCLUDE_DIRS),-i $(dir)) $(foreach dir,$(INCLUDE_RECURSIVE_DIRS),-ir $(dir)) -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
MWLDFLAGS = -w off -proc v5te -interworking -map closure,unused -symtab sort -m _start -msgstyle gcc
LIBS := -Llib -lsyscall
ARFLAGS = rcS
Expand Down Expand Up @@ -204,7 +204,7 @@ ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS) $(LIB

# TODO: Move out to lib/Makefile
$(BUILD_DIR)/lib/%.o: MWCCVERSION = 1.2/sp2p3
$(BUILD_DIR)/lib/%.o: MWCFLAGS = -O4,p -gccext,on -proc arm946e -fp soft -lang c99 -Cpp_exceptions off -interworking -DFS_IMPLEMENT -enum int -W all -i ../include -ir ../include-mw -ir lib/libc/include -ir lib/libnns/include -ir lib/NitroSDK/include
$(BUILD_DIR)/lib/%.o: MWCFLAGS = -O4,p -gccext,on -proc arm946e -fp soft -lang c99 -Cpp_exceptions off -interworking -DFS_IMPLEMENT -enum int -i ../include -ir ../include-mw -ir lib/libc/include -ir lib/libnns/include -ir lib/NitroSDK/include -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error

$(BUILD_DIR)/lib/libnns/%.o: MWCCVERSION = 1.2/sp3
$(BUILD_DIR)/lib/libc/%.o: MWCCVERSION = 2.0/sp1
Expand Down
16 changes: 8 additions & 8 deletions arm9/asm/scrcmd_asm.s
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ ScrCmd_Unk0208: ; 0x0203BD28
ldr r0, [r0, #0x8]
mov r1, #0x3
mov r3, #0xb
bl FUN_0200CB00
bl LoadUserFrameGfx1
mov r0, #0xb
str r0, [sp, #0x0]
ldr r0, _0203BDB4 ; =0x000003D9
Expand Down Expand Up @@ -249,7 +249,7 @@ ScrCmd_Unk028C: ; 0x0203BDB8
ldr r0, [r0, #0x8]
mov r1, #0x3
mov r3, #0xb
bl FUN_0200CB00
bl LoadUserFrameGfx1
mov r0, #0xb
str r0, [sp, #0x0]
ldr r0, _0203BE4C ; =0x000003D9
Expand Down Expand Up @@ -1327,7 +1327,7 @@ ScrCmd_Unk0245: ; 0x0203C680
add r2, r0, #0x0
ldr r0, [r4, #0x0]
add r1, r6, #0x0
bl FUN_0200B518
bl BufferECWord
mov r0, #0x0
pop {r4-r6, pc}
.balign 4
Expand Down Expand Up @@ -6966,7 +6966,7 @@ _0203F3FE:
add r2, r0, #0x0
ldr r0, [r6, #0x0]
add r1, r7, #0x0
bl FUN_0200B518
bl BufferECWord
mov r0, #0x0
pop {r3-r7, pc}
nop
Expand Down Expand Up @@ -7818,19 +7818,19 @@ ScrCmd_Unk02AA: ; 0x0203FA58
ldr r2, [sp, #0x4]
add r0, r4, #0x0
mov r1, #0x0
bl FUN_0200B518
bl BufferECWord
ldr r2, [sp, #0x8]
add r0, r4, #0x0
mov r1, #0x1
bl FUN_0200B518
bl BufferECWord
ldr r2, [sp, #0xc]
add r0, r4, #0x0
mov r1, #0x2
bl FUN_0200B518
bl BufferECWord
add r0, r4, #0x0
mov r1, #0x3
add r2, r7, #0x0
bl FUN_0200B518
bl BufferECWord
add r0, r4, #0x0
add r1, r5, #0x0
mov r2, #0x1
Expand Down
6 changes: 3 additions & 3 deletions arm9/asm/unk_0200E1D0_s.s
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ FUN_0200E388: ; 0x0200E388
.balign 4
_0200E390: .word FUN_02011480

thumb_func_start FUN_0200E394
FUN_0200E394: ; 0x0200E394
thumb_func_start SetMasterBrightnessNeutral
SetMasterBrightnessNeutral: ; 0x0200E394
ldr r3, _0200E39C ; =FUN_0200E440
mov r1, #0x0
bx r3
Expand Down Expand Up @@ -657,7 +657,7 @@ _0200E658:
bne _0200E672
ldr r0, _0200E698 ; =FUN_0200E610
add r1, r5, #0x0
bl FUN_02015F34
bl Main_SetHBlankIntrCB
lsl r0, r0, #0x18
lsr r0, r0, #0x18
str r0, [sp, #0x4]
Expand Down
6 changes: 3 additions & 3 deletions arm9/asm/unk_02029CEC.s
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ FUN_02029E0C: ; 0x02029E0C
_02029E14:
add r0, r6, #0x0
add r1, r4, #0x0
bl FUN_02029E2C
bl SealCase_CountSealOccurrenceAnywhere
cmp r0, #0x0
beq _02029E22
add r5, r5, #0x1
Expand All @@ -204,8 +204,8 @@ _02029E22:
add r0, r5, #0x0
pop {r4-r6, pc}

thumb_func_start FUN_02029E2C
FUN_02029E2C: ; 0x02029E2C
thumb_func_start SealCase_CountSealOccurrenceAnywhere
SealCase_CountSealOccurrenceAnywhere: ; 0x02029E2C
push {r3-r5, lr}
add r5, r1, #0x0
sub r1, r5, #0x1
Expand Down
4 changes: 2 additions & 2 deletions arm9/asm/unk_02035068.s
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ FUN_0203549C: ; 0x0203549C
ldr r0, [r0, #0x8]
ldr r2, _0203565C ; =0x000003D9
mov r1, #0x3
bl FUN_0200CB00
bl LoadUserFrameGfx1
ldr r2, _0203565C ; =0x000003D9
add r0, r4, #0x0
mov r1, #0x1
Expand Down Expand Up @@ -956,7 +956,7 @@ _0203576C:
ldr r0, [r4, #0x8]
ldr r2, _02035898 ; =0x000003D9
mov r1, #0x3
bl FUN_0200CB00
bl LoadUserFrameGfx1
add r0, r5, #0x0
ldr r2, _02035898 ; =0x000003D9
add r0, #0x10
Expand Down
6 changes: 3 additions & 3 deletions arm9/asm/unk_02048120.s
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,12 @@ _0204840C:
mvn r0, r0
mov r1, #0x37
mov r2, #0x1
bl SetBrightness
bl SetBlendBrightness
mov r0, #0xf
mvn r0, r0
mov r1, #0x3f
mov r2, #0x2
bl SetBrightness
bl SetBlendBrightness
add r0, r6, #0x0
add r1, r5, #0x0
bl FUN_02048164
Expand All @@ -400,7 +400,7 @@ _02048442:
mov r0, #0x0
mov r1, #0x3f
mov r2, #0x3
bl SetBrightness
bl SetBlendBrightness
bl FUN_02034E8C
add r7, r0, #0x0
ldr r0, [r6, #0xc]
Expand Down
2 changes: 1 addition & 1 deletion arm9/asm/unk_02048904.s
Original file line number Diff line number Diff line change
Expand Up @@ -2034,7 +2034,7 @@ _020498DC:
ldr r0, [r5, #0x8]
ldr r2, _02049AB8 ; =0x000003D9
mov r1, #0x3
bl FUN_0200CB00
bl LoadUserFrameGfx1
mov r3, #0xb
str r3, [sp, #0x0]
ldr r0, [r5, #0x8]
Expand Down
4 changes: 2 additions & 2 deletions arm9/asm/unk_02050E48.s
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ FUN_02051B68: ; 0x02051B68
ldr r0, [r0, #0x8]
mov r2, #0x1
mov r3, #0xb
bl FUN_0200CB00
bl LoadUserFrameGfx1
ldr r0, [sp, #0x20]
mov r1, #0xf
bl FillWindowPixelBuffer
Expand Down Expand Up @@ -1834,7 +1834,7 @@ FUN_02051C88: ; 0x02051C88
ldr r0, [r0, #0x8]
mov r2, #0x1
mov r3, #0xb
bl FUN_0200CB00
bl LoadUserFrameGfx1
add r0, r7, #0x0
mov r1, #0xf
bl FillWindowPixelBuffer
Expand Down
2 changes: 1 addition & 1 deletion arm9/asm/unk_020520AC.s
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@ _02052C8A:
beq _02052CA6
add r0, r6, #0x0
mov r1, #0x0
bl FUN_0200B518
bl BufferECWord
_02052CA6:
ldr r0, _02052CB4 ; =UNK_020F5A74
lsl r1, r4, #0x2
Expand Down
2 changes: 1 addition & 1 deletion arm9/asm/unk_0205CE48.s
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ FUN_0205D8B8: ; 0x0205D8B8
ldr r1, [r4, #0x10]
lsr r2, r2, #0x10
mov r3, #0xb
bl FUN_0206E3F8
bl TryFormatRegisteredKeyItemUseMessage
ldr r0, [r5, #0x0]
ldr r1, _0205D900 ; =FUN_0205D904
add r2, r4, #0x0
Expand Down
22 changes: 11 additions & 11 deletions arm9/asm/unk_02060CCC.s
Original file line number Diff line number Diff line change
Expand Up @@ -2142,7 +2142,7 @@ FUN_02061C00: ; 0x02061C00
ldrh r2, [r4, #0x4]
add r0, r5, #0x0
mov r1, #0x2
bl FUN_0200B518
bl BufferECWord
ldrb r0, [r4, #0x1]
cmp r0, #0x1
bne _02061C42
Expand Down Expand Up @@ -2238,7 +2238,7 @@ FUN_02061CA8: ; 0x02061CA8
ldrh r2, [r4, #0x1c]
add r0, r5, #0x0
mov r1, #0x3
bl FUN_0200B518
bl BufferECWord
add sp, #0x8
mov r0, #0xa
pop {r4-r6, pc}
Expand All @@ -2259,7 +2259,7 @@ _02061D00:
ldrh r2, [r4, #0x1c]
add r0, r5, #0x0
mov r1, #0x3
bl FUN_0200B518
bl BufferECWord
mov r0, #0xb
add sp, #0x8
pop {r4-r6, pc}
Expand Down Expand Up @@ -2319,7 +2319,7 @@ FUN_02061D74: ; 0x02061D74
ldrh r2, [r4, #0x4]
add r0, r5, #0x0
mov r1, #0x2
bl FUN_0200B518
bl BufferECWord
mov r0, #0x10
pop {r4-r6, pc}

Expand Down Expand Up @@ -2400,7 +2400,7 @@ FUN_02061DE4: ; 0x02061DE4
ldrh r2, [r4, #0xa]
add r0, r5, #0x0
mov r1, #0x5
bl FUN_0200B518
bl BufferECWord
ldrb r0, [r4, #0x9]
cmp r0, #0x1
bne _02061E5A
Expand Down Expand Up @@ -2468,7 +2468,7 @@ FUN_02061EAC: ; 0x02061EAC
ldrh r2, [r4, #0x2]
add r0, r5, #0x0
mov r1, #0x2
bl FUN_0200B518
bl BufferECWord
mov r0, #0x14
pop {r4-r6, pc}

Expand Down Expand Up @@ -2561,7 +2561,7 @@ FUN_02061F60: ; 0x02061F60
ldrh r2, [r6, #0x2]
add r0, r5, #0x0
mov r1, #0x2
bl FUN_0200B518
bl BufferECWord
sub r4, #0x19
cmp r4, #0x3
bhi _02061FB8
Expand Down Expand Up @@ -2652,7 +2652,7 @@ FUN_02061FF8: ; 0x02061FF8
ldrh r2, [r4, #0x24]
add r0, r5, #0x0
mov r1, #0x5
bl FUN_0200B518
bl BufferECWord
ldrb r0, [r4, #0x1f]
cmp r0, #0x0
beq _0206204A
Expand Down Expand Up @@ -2783,15 +2783,15 @@ _0206211E:
ldr r1, [r1, #0xc]
ldr r2, [sp, #0xc]
mov r3, #0x0
bl BufferEasyChatWord
bl BufferGroupName
mov r0, #0x0
str r0, [sp, #0x0]
ldr r1, [sp, #0x4]
ldr r0, [sp, #0x8]
ldr r1, [r1, #0xc]
ldr r2, [sp, #0xc]
mov r3, #0x1
bl BufferEasyChatWord
bl BufferGroupName
ldr r0, [sp, #0x8]
mov r1, #0x2
add r2, r4, #0x0
Expand Down Expand Up @@ -3396,7 +3396,7 @@ _0206257A:
add r2, r0, #0x0
add r0, r7, #0x0
mov r1, #0x1
bl FUN_0200B518
bl BufferECWord
mov r0, #0x32
add sp, #0xc
pop {r4-r7, pc}
Expand Down
6 changes: 3 additions & 3 deletions arm9/asm/unk_020625EC.s
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ FUN_02062DB0: ; 0x02062DB0
ldr r0, [r0, #0x0]
mov r1, #0x3
mov r3, #0xb
bl FUN_0200CB00
bl LoadUserFrameGfx1
mov r0, #0x0
str r0, [sp, #0x0]
ldr r0, [r4, #0x0]
Expand All @@ -1141,12 +1141,12 @@ FUN_02062DB0: ; 0x02062DB0
ldr r0, [r0, #0x0]
mov r1, #0x1
mov r3, #0xb
bl FUN_0200CB00
bl LoadUserFrameGfx1
mov r1, #0x1a
ldr r2, [r4, #0x0]
mov r0, #0x0
lsl r1, r1, #0x4
bl FUN_02002ED0
bl LoadFontPal0
mov r1, #0x6
ldr r2, [r4, #0x0]
mov r0, #0x0
Expand Down
4 changes: 2 additions & 2 deletions arm9/asm/unk_020653EC.s
Original file line number Diff line number Diff line change
Expand Up @@ -1973,12 +1973,12 @@ FUN_02066334: ; 0x02066334
ldr r0, [r4, r0]
mov r1, #0x3
mov r3, #0xb
bl FUN_0200CB00
bl LoadUserFrameGfx1
mov r1, #0x1a
ldr r2, [r4, #0x0]
mov r0, #0x0
lsl r1, r1, #0x4
bl FUN_02002ED0
bl LoadFontPal0
mov r1, #0x6
ldr r2, [r4, #0x0]
mov r0, #0x0
Expand Down
8 changes: 4 additions & 4 deletions arm9/asm/unk_0206C700.s
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,9 @@ _0206CB48:
pop {r3-r4, pc}
_0206CB70:
mov r0, #0x0
bl FUN_0200E394
bl SetMasterBrightnessNeutral
mov r0, #0x1
bl FUN_0200E394
bl SetMasterBrightnessNeutral
ldr r0, [r4, #0x58]
mov r1, #0x0
bl FUN_020143A8
Expand Down Expand Up @@ -1480,9 +1480,9 @@ _0206D2EE:
pop {r3-r4, pc}
_0206D360:
mov r0, #0x0
bl FUN_0200E394
bl SetMasterBrightnessNeutral
mov r0, #0x1
bl FUN_0200E394
bl SetMasterBrightnessNeutral
ldr r0, [r4, #0x14]
bl FUN_020038E4
cmp r0, #0x0
Expand Down
2 changes: 1 addition & 1 deletion arm9/asm/unk_0206F3FC.s
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ FUN_0206FD24: ; 0x0206FD24
ldr r0, [r5, #0x0]
mov r2, #0x1
mov r3, #0xe
bl FUN_0200CB00
bl LoadUserFrameGfx1
ldr r0, _0206FE70 ; =0x000005A4
ldr r0, [r5, r0]
ldr r0, [r0, #0xc]
Expand Down
Loading

0 comments on commit bd0eb68

Please sign in to comment.