diff --git a/Makefile b/Makefile index 0fd96513fd6..280aaf53f6c 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,7 @@ $(crystal_au_obj): RGBASMFLAGS = -D _CRYSTAL11 -D _CRYSTAL_AU # It doesn't look like $(shell) can be deferred so there might not be a better way. define DEP $1: $2 $$(shell tools/scan_includes $2) - $$(RGBASM) $$(RGBASMFLAGS) -L -o $$@ $$< + $$(RGBASM) $$(RGBASMFLAGS) -L -Wall -Wextra -o $$@ $$< endef # Build tools when building the rom. diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 1009177ff57..d221b74458e 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -750,13 +750,13 @@ Script_AskWaterfall: EscapeRopeFunction: call FieldMoveJumptableReset ld a, $1 - jr dig_incave + jr EscapeRopeOrDig DigFunction: call FieldMoveJumptableReset ld a, $2 -dig_incave +EscapeRopeOrDig: ld [wBuffer2], a .loop ld hl, .DigTable diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm index 7f2fc8fa133..aa29d413ba8 100644 --- a/engine/gfx/color.asm +++ b/engine/gfx/color.asm @@ -241,21 +241,21 @@ LoadTrainerClassPaletteAsNthBGPal: ld a, [wTrainerClass] call GetTrainerPalettePointer ld a, e - jr got_palette_pointer_8bd7 + jr LoadNthMiddleBGPal LoadMonPaletteAsNthBGPal: ld a, [wCurPartySpecies] call _GetMonPalettePointer ld a, e bit 7, a - jr z, got_palette_pointer_8bd7 + jr z, LoadNthMiddleBGPal and $7f inc hl inc hl inc hl inc hl -got_palette_pointer_8bd7 +LoadNthMiddleBGPal: push hl ld hl, wBGPals1 ld de, 1 palettes diff --git a/engine/gfx/load_pics.asm b/engine/gfx/load_pics.asm index bf8e697788d..6367bffe6a4 100644 --- a/engine/gfx/load_pics.asm +++ b/engine/gfx/load_pics.asm @@ -247,7 +247,7 @@ FixPicBank: ; This is a thing for some reason. PICS_FIX EQU $36 -GLOBAL PICS_FIX +EXPORT PICS_FIX push hl push bc diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm index 24228d97f3c..6f500bc374e 100644 --- a/engine/pokedex/pokedex.asm +++ b/engine/pokedex/pokedex.asm @@ -16,7 +16,7 @@ const DEXSTATE_EXIT POKEDEX_SCX EQU 5 -GLOBAL POKEDEX_SCX +EXPORT POKEDEX_SCX Pokedex: ldh a, [hWX]