diff options
Diffstat (limited to 'engine/overworld')
-rwxr-xr-x | engine/overworld/cinnabar_lab.asm | 2 | ||||
-rw-r--r-- | engine/overworld/movement.asm | 19 | ||||
-rwxr-xr-x | engine/overworld/pokemart.asm | 2 |
3 files changed, 18 insertions, 5 deletions
diff --git a/engine/overworld/cinnabar_lab.asm b/engine/overworld/cinnabar_lab.asm index 13313746..03974684 100755 --- a/engine/overworld/cinnabar_lab.asm +++ b/engine/overworld/cinnabar_lab.asm @@ -116,7 +116,7 @@ LoadFossilItemAndMonName: ld a, [wFossilMon] ld [wd11e], a call GetMonName - call CopyStringToCF4B + call CopyStringToCF50 ld a, [wFossilItem] ld [wd11e], a call GetItemName diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index bbfbbc39..3b351e58 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -444,6 +444,7 @@ InitializeSpriteStatus: ld a, $8 ld [hli], a ; $c2x2: set Y displacement to 8 ld [hl], a ; $c2x3: set X displacement to 8 + call InitializeSpriteScreenPosition ; could have done fallthrough here ret ; calculates the sprite's screen position form its map position and the player position @@ -456,7 +457,7 @@ InitializeSpriteScreenPosition: ld b, a ld a, [hl] ; c2x4 (Y position + 4) sub b ; relative to player position - swap a ; * 16 + call Func_515D sub $4 ; - 4 dec h ld [hli], a ; c1x4 (screen Y position) @@ -465,11 +466,23 @@ InitializeSpriteScreenPosition: ld b, a ld a, [hli] ; c2x6 (X position + 4) sub b ; relative to player position - swap a ; * 16 + call Func_515D dec h ld [hl], a ; c1x6 (screen X position) ret +Func_515D: ; 515D (1:515D) + jr nc, .asm_5166 + cpl + inc a + swap a + cpl + inc a + ret +.asm_5166 + swap a + ret + ; tests if sprite is off screen or otherwise unable to do anything CheckSpriteAvailability: predef IsObjectHidden @@ -695,7 +708,7 @@ GetTileSpriteStandsOn: ld l, a ld a, [hli] ; c1x4: screen Y position add $4 ; align to 2*2 tile blocks (Y position is always off 4 pixels to the top) - and $f0 ; in case object is currently moving + and $f8 ; in case object is currently moving srl a ; screen Y tile * 4 ld c, a ld b, $0 diff --git a/engine/overworld/pokemart.asm b/engine/overworld/pokemart.asm index 823939b1..606e0581 100755 --- a/engine/overworld/pokemart.asm +++ b/engine/overworld/pokemart.asm @@ -159,7 +159,7 @@ DisplayPokemartDialogue_: ld a,[wcf91] ; item ID ld [wd11e],a ; store item ID for GetItemName call GetItemName - call CopyStringToCF4B ; copy name to wcf4b + call CopyStringToCF50 ; copy name to wcf50 ld hl,PokemartTellBuyPriceText call PrintText coord hl, 14, 7 |