diff options
author | YamaArashi <shadow962@live.com> | 2014-09-08 23:32:33 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2014-09-08 23:32:33 -0700 |
commit | daf4fc87ae66e2c3d56840774efba10a9b903ee3 (patch) | |
tree | dfcafe62237afac0f3de7fef3b024de40e37a991 | |
parent | 59f0507e4cd0693eb89f5ab3e44cb3c442666140 (diff) |
Add comments regarding menus and sprites
-rw-r--r-- | engine/overworld/movement.asm | 17 | ||||
-rwxr-xr-x | engine/overworld/pokemart.asm | 6 | ||||
-rw-r--r-- | home.asm | 3 |
3 files changed, 15 insertions, 11 deletions
diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index dbec2e4f..d84079ad 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -1,22 +1,25 @@ UpdatePlayerSprite: ; 4e31 (1:4e31) ld a, [wSpriteStateData2] and a - jr z, .asm_4e41 + jr z, .checkIfTextBoxInFrontOfSprite cp $ff - jr z, .asm_4e4a + jr z, .disableSprite dec a ld [wSpriteStateData2], a - jr .asm_4e4a -.asm_4e41 + jr .disableSprite +; check if a text box is in front of the sprite by checking if the lower left +; background tile the sprite is standing on is greater than $5F, which is +; the maximum number for map tiles +.checkIfTextBoxInFrontOfSprite aCoord 8, 9 ld [$ff93], a cp $60 - jr c, .asm_4e50 -.asm_4e4a + jr c, .lowerLeftTileIsMapTile +.disableSprite ld a, $ff ld [wSpriteStateData1 + 2], a ret -.asm_4e50 +.lowerLeftTileIsMapTile call DetectCollisionBetweenSprites ld h, $c1 ld a, [wWalkCounter] ; wcfc5 diff --git a/engine/overworld/pokemart.asm b/engine/overworld/pokemart.asm index 3b06bd2c..1c2c23bf 100755 --- a/engine/overworld/pokemart.asm +++ b/engine/overworld/pokemart.asm @@ -173,13 +173,13 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) ld [wcf0a],a .skipSettingFlag2 ld a,(SFX_02_5a - SFX_Headers_02) / 3 - call PlaySoundWaitForCurrent ; play sound - call WaitForSoundToFinish ; wait until sound is done playing + call PlaySoundWaitForCurrent + call WaitForSoundToFinish ld hl,PokemartBoughtItemText call PrintText jp .buyMenuLoop .returnToMainPokemartMenu - call LoadScreenTilesFromBuffer1 ; restore save screen + call LoadScreenTilesFromBuffer1 ld a,$13 ld [wd125],a call DisplayTextBoxID ; draw money text box @@ -1936,7 +1936,8 @@ DisplayListMenuID:: ; 2be6 (0:2be6) ld a,$0d ; list menu text box ID ld [wd125],a call DisplayTextBoxID ; draw the menu text box - call UpdateSprites ; move sprites + call UpdateSprites ; disable sprites behind the text box +; the code up to .skipMovingSprites appears to be useless hlCoord 4, 2 ; coordinates of upper left corner of menu text box ld de,$090e ; height and width of menu text box ld a,[wListMenuID] |