From 93c32e35806af6c0a8b731c5322ee5df58c797f9 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 12 Dec 2017 20:15:07 -0500 Subject: Document bugs and glitches --- engine/items.asm | 2 +- engine/search.asm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'engine') diff --git a/engine/items.asm b/engine/items.asm index 0124489e5..b0bffb6d6 100755 --- a/engine/items.asm +++ b/engine/items.asm @@ -554,7 +554,7 @@ GetItemAttr: ; d460 ld a, [CurItem] dec a ld c, a - ld a, NUM_ITEMATTRS + ld a, ITEMATTR_STRUCT_LENGTH call AddNTimes ld a, BANK(ItemAttributes) call GetFarByte diff --git a/engine/search.asm b/engine/search.asm index 9543ecfbb..72b734e36 100755 --- a/engine/search.asm +++ b/engine/search.asm @@ -219,7 +219,7 @@ CheckOwnMon: ; 0x4a7ba ld hl, PlayerName - rept 4 +rept PLAYER_NAME_LENGTH_JAPANESE - 1 ; should be PLAYER_NAME_LENGTH - 1 ld a, [de] cp [hl] jr nz, .notfound @@ -227,7 +227,7 @@ CheckOwnMon: ; 0x4a7ba jr z, .found ; reached end of string inc hl inc de - endr +endr ld a, [de] cp [hl] -- cgit v1.2.3 From ad620243d937bf241a1feca8c96b18f805b946af Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 12 Dec 2017 20:21:08 -0500 Subject: Fix `make compare` --- engine/search.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine') diff --git a/engine/search.asm b/engine/search.asm index 72b734e36..76be0e159 100755 --- a/engine/search.asm +++ b/engine/search.asm @@ -219,7 +219,7 @@ CheckOwnMon: ; 0x4a7ba ld hl, PlayerName -rept PLAYER_NAME_LENGTH_JAPANESE - 1 ; should be PLAYER_NAME_LENGTH - 1 +rept NAME_LENGTH_JAPANESE +- 2 ; should be PLAYER_NAME_LENGTH +- 2 ld a, [de] cp [hl] jr nz, .notfound -- cgit v1.2.3 From 10eb426e40f48df3ae9b40e3ea3aa7e92f890090 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 12 Dec 2017 22:58:20 -0500 Subject: Document more bugs --- engine/anim_hp_bar.asm | 4 ++++ engine/battle_start.asm | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'engine') diff --git a/engine/anim_hp_bar.asm b/engine/anim_hp_bar.asm index 6272ff7ea..a26c40b91 100755 --- a/engine/anim_hp_bar.asm +++ b/engine/anim_hp_bar.asm @@ -382,7 +382,10 @@ ShortHPBar_CalcPixelFrame: ; d839 and a jr z, .return_zero call AddNTimes + ld b, 0 +; This routine is buggy. If [wCurHPAnimMaxHP] * [wCurHPBarPixels] is divisible +; by 48, the loop runs one extra time. To fix, uncomment the line below. .loop ld a, l sub 6 * 8 @@ -390,6 +393,7 @@ ShortHPBar_CalcPixelFrame: ; d839 ld a, h sbc $0 ld h, a + ; jr z, .done jr c, .done inc b jr .loop diff --git a/engine/battle_start.asm b/engine/battle_start.asm index b16bbbd67..7a16c3b82 100644 --- a/engine/battle_start.asm +++ b/engine/battle_start.asm @@ -196,9 +196,10 @@ FlashyTransitionToBattle: ; 8c314 StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365) -; The screen flashes a different number of -; times depending on the level of your lead -; Pokemon relative to the opponent's. +; The screen flashes a different number of times depending on the level of +; your lead Pokemon relative to the opponent's. +; BUG: BattleMonLevel and EnemyMonLevel are not set at this point, so whatever +; values happen to be there will determine the animation. ld de, 0 ld a, [BattleMonLevel] add 3 -- cgit v1.2.3