diff options
| author | dannye <33dannye@gmail.com> | 2025-09-06 16:54:17 -0500 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2025-09-06 16:54:17 -0500 |
| commit | 377749ca4efac05b6c57dfed049899891af6c35a (patch) | |
| tree | 4b429403935c4a7c2de710a6cbf7310246874539 /engine/events | |
| parent | Fix .tilemap file extension, fix some typos (#138) (diff) | |
| parent | Document visual glitch with Pewter City Gym guy (#526) (diff) | |
| download | pokeyellow-377749ca4efac05b6c57dfed049899891af6c35a.tar.gz pokeyellow-377749ca4efac05b6c57dfed049899891af6c35a.tar.xz pokeyellow-377749ca4efac05b6c57dfed049899891af6c35a.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/events')
| -rw-r--r-- | engine/events/give_pokemon.asm | 2 | ||||
| -rw-r--r-- | engine/events/hidden_objects/bench_guys.asm | 9 | ||||
| -rw-r--r-- | engine/events/in_game_trades.asm | 2 | ||||
| -rw-r--r-- | engine/events/prize_menu.asm | 12 |
4 files changed, 17 insertions, 8 deletions
diff --git a/engine/events/give_pokemon.asm b/engine/events/give_pokemon.asm index e33d5165..5d7d0661 100644 --- a/engine/events/give_pokemon.asm +++ b/engine/events/give_pokemon.asm @@ -20,7 +20,7 @@ _GivePokemon:: callfar SendNewMonToBox ld hl, wStringBuffer ld a, [wCurrentBoxNum] - and $7f + and BOX_NUM_MASK cp 9 jr c, .singleDigitBoxNum sub 9 diff --git a/engine/events/hidden_objects/bench_guys.asm b/engine/events/hidden_objects/bench_guys.asm index 55090c01..e5a2a724 100644 --- a/engine/events/hidden_objects/bench_guys.asm +++ b/engine/events/hidden_objects/bench_guys.asm @@ -17,6 +17,15 @@ PrintBenchGuyText: ld b, a ld a, [wSpritePlayerStateData1FacingDirection] cp b + + ; bug: an 'inc hl' instruction is needed before looping back. When trying to + ; talk to a bench guy from above, this Sprite Facing test will fail, and the + ; next loop iteration will be misaligned within BenchGuyTextPointers table. + ; As a result, the routine will miss the terminator byte, and continue to + ; process data beyond the table boundary. + ; It seems that it will only return after starting to read data from VRAM + ; (According to Pan Docs, during PPU mode 3, reads return garbage value, + ; usually $FF). jr nz, .loop ; player isn't facing the bench guy ld a, [hl] jp PrintPredefTextID diff --git a/engine/events/in_game_trades.asm b/engine/events/in_game_trades.asm index 3671dba8..8c5f4e5c 100644 --- a/engine/events/in_game_trades.asm +++ b/engine/events/in_game_trades.asm @@ -259,7 +259,7 @@ InGameTrade_CheckForTradeEvo: jp PlayDefaultMusic InGameTrade_TrainerString: - db "<TRAINER>@@@@@@@@@@" + dname "<TRAINER>", NAME_LENGTH InGameTradeTextPointers: ; entries correspond to TRADE_DIALOGSET_* constants diff --git a/engine/events/prize_menu.asm b/engine/events/prize_menu.asm index 4285b7d6..16ada216 100644 --- a/engine/events/prize_menu.asm +++ b/engine/events/prize_menu.asm @@ -2,12 +2,12 @@ CeladonPrizeMenu:: ld b, COIN_CASE call IsItemInBag jr nz, .havingCoinCase - ld hl, RequireCoinCaseTextPtr + ld hl, RequireCoinCaseText jp PrintText .havingCoinCase ld hl, wStatusFlags5 set BIT_NO_TEXT_DELAY, [hl] - ld hl, ExchangeCoinsForPrizesTextPtr + ld hl, ExchangeCoinsForPrizesText call PrintText ; the following are the menu settings xor a @@ -27,7 +27,7 @@ CeladonPrizeMenu:: call TextBoxBorder call GetPrizeMenuId call UpdateSprites - ld hl, WhichPrizeTextPtr + ld hl, WhichPrizeText call PrintText call HandleMenuInput ; menu choice handler bit B_PAD_B, a @@ -41,16 +41,16 @@ CeladonPrizeMenu:: res BIT_NO_TEXT_DELAY, [hl] ret -RequireCoinCaseTextPtr: +RequireCoinCaseText: text_far _RequireCoinCaseText text_waitbutton text_end -ExchangeCoinsForPrizesTextPtr: +ExchangeCoinsForPrizesText: text_far _ExchangeCoinsForPrizesText text_end -WhichPrizeTextPtr: +WhichPrizeText: text_far _WhichPrizeText text_end |
