Apply suggested changes

This commit is contained in:
mid-kid 2019-06-10 01:52:46 +02:00
parent d6db010429
commit ad299b1635
3 changed files with 33 additions and 29 deletions

View File

@ -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):

View File

@ -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

View File

@ -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