From 17d3a1a8aeddda5d134ea0c9c57e7a7d90ca2a8c Mon Sep 17 00:00:00 2001 From: xCrystal Date: Sun, 28 Jan 2024 21:19:32 +0100 Subject: [PATCH] Address PR suggestions (#1078) --- engine/events/sweet_scent.asm | 2 +- engine/overworld/events.asm | 4 ++-- engine/overworld/load_map_part.asm | 2 ++ engine/tilesets/map_palettes.asm | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/engine/events/sweet_scent.asm b/engine/events/sweet_scent.asm index c6c6896c331..4fc03b936a8 100644 --- a/engine/events/sweet_scent.asm +++ b/engine/events/sweet_scent.asm @@ -30,7 +30,7 @@ SweetScentNothing: end SweetScentEncounter: - farcall CanEncounterWildMonInThisTile + farcall CanEncounterWildMon jr nc, .no_battle ld hl, wStatusFlags2 bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] diff --git a/engine/overworld/events.asm b/engine/overworld/events.asm index 5c36665c640..f593e8cc759 100644 --- a/engine/overworld/events.asm +++ b/engine/overworld/events.asm @@ -1133,7 +1133,7 @@ TryTileCollisionEvent:: RandomEncounter:: call CheckWildEncounterCooldown jr c, .nope - call CanEncounterWildMonInThisTile + call CanEncounterWildMon jr nc, .nope ld hl, wStatusFlags2 bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] @@ -1173,7 +1173,7 @@ WildBattleScript: reloadmapafterbattle end -CanEncounterWildMonInThisTile:: +CanEncounterWildMon:: ld hl, wStatusFlags bit STATUSFLAGS_NO_WILD_ENCOUNTERS_F, [hl] jr nz, .no diff --git a/engine/overworld/load_map_part.asm b/engine/overworld/load_map_part.asm index d9bdbd7cc39..3c32f3f45d8 100644 --- a/engine/overworld/load_map_part.asm +++ b/engine/overworld/load_map_part.asm @@ -1,6 +1,8 @@ _LoadOverworldTilemap:: ; From the metatile-based 24x20 map in wSurroundingTiles, ; load the corresponding 20x18 tiles to wTilemap. +; This function is only used for the initial loading of the map; incremental +; loads while moving happen through UpdateBGMapRow and UpdateBGMapColumn. ld hl, wSurroundingTiles ld a, [wPlayerMetatileY] and a diff --git a/engine/tilesets/map_palettes.asm b/engine/tilesets/map_palettes.asm index 84a03f99a52..de6bf1d374e 100644 --- a/engine/tilesets/map_palettes.asm +++ b/engine/tilesets/map_palettes.asm @@ -1,5 +1,7 @@ _LoadOverworldAttrmapPals:: ; Load wAttrmap palette numbers based on the tileset palettes of current map. +; This function is only used for the initial loading of the map; incremental +; loads while moving happen through ScrollBGMapPalettes. hlcoord 0, 0 decoord 0, 0, wAttrmap ld b, SCREEN_HEIGHT