From 1840af8b4f02d6b8f748ea917344c64cb1c5ff2d Mon Sep 17 00:00:00 2001 From: Rangi Date: Wed, 23 May 2018 22:01:21 -0400 Subject: Identify more sprite move data flag bits --- docs/bugs_and_glitches.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index f7675ae78..b78244d4c 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -1194,11 +1194,11 @@ In [engine/overworld/npc_movement.asm](/engine/overworld/npc_movement.asm): ```asm ld hl, OBJECT_FLAGS1 add hl, bc - bit 4, [hl] ; lost, uncomment next line to fix -; jr nz, .resume + bit NOCLIP_TILES_F, [hl] ; lost, uncomment next line to fix + ; jr nz, .noclip_tiles ``` -**Fix:** Uncomment `jr nz, .resume`. +**Fix:** Uncomment `jr nz, .noclip_tiles`. ## `CheckOwnMon` only checks the first five letters of OT names -- cgit v1.2.3 From 3927bcdb9d0429b5ff303cb787e522878bd01749 Mon Sep 17 00:00:00 2001 From: Rangi Date: Thu, 24 May 2018 12:36:35 -0400 Subject: =?UTF-8?q?Function6ec1=20=E2=86=92=20CanObjectMoveInDirection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/bugs_and_glitches.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index b78244d4c..2b5a6a152 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -44,7 +44,7 @@ These are known bugs and glitches in the original Pokémon Crystal game: code th - [Two tiles in the `port` tileset are drawn incorrectly](#two-tiles-in-the-port-tileset-are-drawn-incorrectly) - [`LoadMetatiles` wraps around past 128 blocks](#loadmetatiles-wraps-around-past-128-blocks) - [Surfing directly across a map connection does not load the new map](#surfing-directly-across-a-map-connection-does-not-load-the-new-map) -- [`Function6ec1` does not correctly limit object movement](#function6ec1-does-not-correctly-limit-object-movement) +- [Swimming NPCs aren't limited by their movement radius](#swimming-npcs-arent-limited-by-their-movement-radius) - [`CheckOwnMon` only checks the first five letters of OT names](#checkownmon-only-checks-the-first-five-letters-of-ot-names) - [Catching a Transformed Pokémon always catches a Ditto](#catching-a-transformed-pokémon-always-catches-a-ditto) - [Using a Park Ball in normal battles has a corrupt animation](#using-a-park-ball-in-normal-battles-has-a-corrupt-animation) @@ -1185,11 +1185,11 @@ In [home/map.asm](/home/map.asm): *To do:* Identify specific code causing this bug and fix it. -## `Function6ec1` does not correctly limit object movement +## Swimming NPCs aren't limited by their movement radius This bug is why the Lapras in [maps/UnionCaveB2F.asm](/maps/UnionCaveB2F.asm), which uses `SPRITEMOVEDATA_SWIM_WANDER`, is not restricted by its `1, 1` movement radius. -In [engine/overworld/npc_movement.asm](/engine/overworld/npc_movement.asm): +This is a bug with `CanObjectMoveInDirection` in [engine/overworld/npc_movement.asm](/engine/overworld/npc_movement.asm): ```asm ld hl, OBJECT_FLAGS1 -- cgit v1.2.3 From 7cd5bcbae4a35471fe8473a63526d73e71b193cc Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 3 Jun 2018 23:18:31 -0400 Subject: Change FixPicBank bank array --- docs/design_flaws.md | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'docs') diff --git a/docs/design_flaws.md b/docs/design_flaws.md index e4a81123b..aee6a1daa 100644 --- a/docs/design_flaws.md +++ b/docs/design_flaws.md @@ -36,7 +36,7 @@ GLOBAL PICS_FIX push hl push bc - sub BANK(Pics_1) - PICS_FIX + sub BANK("Pics 1") - PICS_FIX ld c, a ld b, 0 ld hl, .PicsBanks @@ -47,33 +47,33 @@ GLOBAL PICS_FIX ret .PicsBanks: ; 511d4 - db BANK(Pics_1) + 0 - db BANK(Pics_1) + 1 - db BANK(Pics_1) + 2 - db BANK(Pics_1) + 3 - db BANK(Pics_1) + 4 - db BANK(Pics_1) + 5 - db BANK(Pics_1) + 6 - db BANK(Pics_1) + 7 - db BANK(Pics_1) + 8 - db BANK(Pics_1) + 9 - db BANK(Pics_1) + 10 - db BANK(Pics_1) + 11 - db BANK(Pics_1) + 12 - db BANK(Pics_1) + 13 - db BANK(Pics_1) + 14 - db BANK(Pics_1) + 15 - db BANK(Pics_1) + 16 - db BANK(Pics_1) + 17 - db BANK(Pics_1) + 18 - db BANK(Pics_1) + 19 - db BANK(Pics_1) + 20 - db BANK(Pics_1) + 21 - db BANK(Pics_1) + 22 - db BANK(Pics_1) + 23 + db BANK("Pics 1") ; BANK("Pics 1") + 0 + db BANK("Pics 2") ; BANK("Pics 1") + 1 + db BANK("Pics 3") ; BANK("Pics 1") + 2 + db BANK("Pics 4") ; BANK("Pics 1") + 3 + db BANK("Pics 5") ; BANK("Pics 1") + 4 + db BANK("Pics 6") ; BANK("Pics 1") + 5 + db BANK("Pics 7") ; BANK("Pics 1") + 6 + db BANK("Pics 8") ; BANK("Pics 1") + 7 + db BANK("Pics 9") ; BANK("Pics 1") + 8 + db BANK("Pics 10") ; BANK("Pics 1") + 9 + db BANK("Pics 11") ; BANK("Pics 1") + 10 + db BANK("Pics 12") ; BANK("Pics 1") + 11 + db BANK("Pics 13") ; BANK("Pics 1") + 12 + db BANK("Pics 14") ; BANK("Pics 1") + 13 + db BANK("Pics 15") ; BANK("Pics 1") + 14 + db BANK("Pics 16") ; BANK("Pics 1") + 15 + db BANK("Pics 17") ; BANK("Pics 1") + 16 + db BANK("Pics 18") ; BANK("Pics 1") + 17 + db BANK("Pics 19") ; BANK("Pics 1") + 18 + db BANK("Pics 1") + 19 + db BANK("Pics 1") + 20 + db BANK("Pics 1") + 21 + db BANK("Pics 1") + 22 + db BANK("Pics 1") + 23 ``` -**Fix:** Use `dba` instead of `dba_pic`, and don't call `FixPicBank` to modify `a`. +**Fix:** Use `dba` instead of `dba_pic`, delete `FixPicBank`, and remove all four calls to `FixPicBank`. ## `PokemonPicPointers` and `UnownPicPointers` are assumed to start at the same address -- cgit v1.2.3 From c7bb2d15cfb32a5e965933b90e0acb497c7bf7b2 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 3 Jun 2018 23:25:21 -0400 Subject: Create empty sections for the remaining FixPicBank array entries --- docs/design_flaws.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/design_flaws.md b/docs/design_flaws.md index aee6a1daa..6b015a56a 100644 --- a/docs/design_flaws.md +++ b/docs/design_flaws.md @@ -66,11 +66,11 @@ GLOBAL PICS_FIX db BANK("Pics 17") ; BANK("Pics 1") + 16 db BANK("Pics 18") ; BANK("Pics 1") + 17 db BANK("Pics 19") ; BANK("Pics 1") + 18 - db BANK("Pics 1") + 19 - db BANK("Pics 1") + 20 - db BANK("Pics 1") + 21 - db BANK("Pics 1") + 22 - db BANK("Pics 1") + 23 + db BANK("Pics 20") ; BANK("Pics 1") + 19 + db BANK("Pics 21") ; BANK("Pics 1") + 20 + db BANK("Pics 22") ; BANK("Pics 1") + 21 + db BANK("Pics 23") ; BANK("Pics 1") + 22 + db BANK("Pics 24") ; BANK("Pics 1") + 23 ``` **Fix:** Use `dba` instead of `dba_pic`, delete `FixPicBank`, and remove all four calls to `FixPicBank`. -- cgit v1.2.3