summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormid-kid <esteve.varela@gmail.com>2019-06-10 01:52:46 +0200
committermid-kid <esteve.varela@gmail.com>2019-06-10 01:52:46 +0200
commitad299b16358b5d73e24e0c12d2746936aad7f2ce (patch)
treea27a7f42aa201fc0207174c6840c1d0589653c08
parentd6db0104294aa5f449dac69e1965f552d95440fa (diff)
Apply suggested changes
-rw-r--r--docs/bugs_and_glitches.md50
-rw-r--r--engine/pokedex/pokedex_2.asm4
-rw-r--r--engine/pokegear/pokegear.asm8
3 files changed, 33 insertions, 29 deletions
diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md
index dd0ed6290..d1cbf0dee 100644
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -1337,30 +1337,10 @@ This is a mistake with the “`…`” tile in [gfx/battle/hp_exp_bar_border.png
## Move selection menu doesn't handle joypad properly
-This is an oversight, where `hInMenu` isn't set properly in the menu that handles selecting moves in a battle. Because of this, your cursor is rendered unable to keep scrolling when one of the directional keys is being held.
+([Video](https://www.youtube.com/watch?v=vjFUo6Jr4po&t=438))
-**Fix:** Edit `BattleTurn` in [engine/battle/core.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm):
-
-```diff
- BattleTurn:
-+ ldh a, [hInMenu]
-+ push af
-+ ld a, 1
-+ ldh [hInMenu], a
-+
- .loop
-
- ...
-
- jp .loop
-
- .quit
-+ pop af
-+ ldh [hInMenu], a
- ret
-```
-
-There existed one way in which this bug would be temporarily "fixed" in-game, and that's when the credits sequence is triggered, `hInMenu` will be set but never unset. This has no bad effect upon the rest of the game, but you might want to fix it regardless.
+`hInMenu` isn't defined in the menu that handles selecting moves in a battle. Because of this, your cursor is usually rendered unable to keep scrolling when one of the directional keys is being held. It's up for debate whether this behavior was intentional or not, but this value should be defined when in the move selection menu. A value of 1 will allow it to keep scrolling, though it's usually 0 by default.
+There exists one way in which this behaviour would be temporarily changed in-game, and that's when the credits sequence is triggered, `hInMenu` will be set but never unset. This can be fixed with the following:
**Fix:** Edit `Credits` in [engine/movie/credits.asm](https://github.com/pret/pokecrystal/blob/master/engine/movie/credits.asm):
@@ -1387,6 +1367,30 @@ There existed one way in which this bug would be temporarily "fixed" in-game, an
```
+If you want to make sure `hInMenu` always has a defined value in the move selection menu, the following code will set it to 1:
+
+**Fix:** Edit `BattleTurn` in [engine/battle/core.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm):
+
+```diff
+ BattleTurn:
++ ldh a, [hInMenu]
++ push af
++ ld a, 1
++ ldh [hInMenu], a
++
+ .loop
+
+ ...
+
+ jp .loop
+
+ .quit
++ pop af
++ ldh [hInMenu], a
+ ret
+```
+
+
## Two tiles in the `port` tileset are drawn incorrectly
This is a mistake with the left-hand warp carpet corner tiles in [gfx/tilesets/port.png](https://github.com/pret/pokecrystal/blob/master/gfx/tilesets/port.png):
diff --git a/engine/pokedex/pokedex_2.asm b/engine/pokedex/pokedex_2.asm
index 0f42aea3a..ac47bd484 100644
--- a/engine/pokedex/pokedex_2.asm
+++ b/engine/pokedex/pokedex_2.asm
@@ -124,7 +124,7 @@ DisplayDexEntry:
jr z, .skip_height
push hl
push de
-; Print the height with two of the four digits will be in front of the decimal point
+; Print the height, with two of the four digits in front of the decimal point
ld hl, sp+$0
ld d, h
ld e, l
@@ -150,7 +150,7 @@ DisplayDexEntry:
or d
jr z, .skip_weight
push de
-; Print the height with four of the five digits will be in front of the decimal point
+; Print the weight, with four of the five digits in front of the decimal point
ld hl, sp+$0
ld d, h
ld e, l
diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm
index 13b561d4b..d0e7e8ca0 100644
--- a/engine/pokegear/pokegear.asm
+++ b/engine/pokegear/pokegear.asm
@@ -335,7 +335,7 @@ InitPokegearTilemap:
.ok
farcall PokegearMap
ld a, $07
- ld bc, $12
+ ld bc, SCREEN_WIDTH - 2
hlcoord 1, 2
call ByteFill
hlcoord 0, 2
@@ -2165,7 +2165,7 @@ TownMapBubble:
hlcoord 1, 1
; Middle row
- ld bc, 18
+ ld bc, SCREEN_WIDTH - 2
ld a, " "
call ByteFill
@@ -2481,10 +2481,10 @@ Pokedex_GetArea:
ld a, " "
call ByteFill
hlcoord 0, 1
- ld a, $6
+ ld a, $06
ld [hli], a
ld bc, SCREEN_WIDTH - 2
- ld a, $7
+ ld a, $07
call ByteFill
ld [hl], $17
call GetPokemonName