diff options
author | Daniel Harding <corrnondacqb@yahoo.com> | 2015-07-16 14:36:48 -0500 |
---|---|---|
committer | Daniel Harding <corrnondacqb@yahoo.com> | 2015-07-16 14:36:48 -0500 |
commit | 9e77982bc8658c09df187b4598f8cbabb427a271 (patch) | |
tree | d88ff7a45f7b8a80a02f099052da9b4eb2e14d21 /engine/overworld/emotion_bubbles.asm | |
parent | b1cb3788938fa981e65619f022a41f1c1d91ae3b (diff) | |
parent | bd7d9815936decc5b636f4235c0ee745812dcb48 (diff) |
Merge pull request #101 from YamaArashi/master
Misc changes
Diffstat (limited to 'engine/overworld/emotion_bubbles.asm')
-rwxr-xr-x | engine/overworld/emotion_bubbles.asm | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index 01b3ae85..22dfb24f 100755 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -1,7 +1,7 @@ EmotionBubble: ; 17c47 (5:7c47) - ld a, [wcd50] + ld a, [wWhichEmotionBubble] ld c, a - ld b, $0 + ld b, 0 ld hl, EmotionBubblesPointerTable add hl, bc add hl, bc @@ -16,15 +16,18 @@ EmotionBubble: ; 17c47 (5:7c47) ld a, $ff ld [wUpdateSpritesEnabled], a ld a, [wd736] - bit 6, a + bit 6, a ; are the last 4 OAM entries reserved for a shadow or fishing rod? ld hl, wOAMBuffer + $8f ld de, wOAMBuffer + $9f - jr z, .asm_17c7a + jr z, .next ld hl, wOAMBuffer + $7f ld de, wOAMBuffer + $8f -.asm_17c7a + +; Copy OAM data 16 bytes forward to make room for emotion bubble OAM data at the +; start of the OAM buffer. +.next ld bc, $90 -.asm_17c7d +.loop ld a, [hl] ld [de], a dec hl @@ -32,12 +35,14 @@ EmotionBubble: ; 17c47 (5:7c47) dec bc ld a, c or b - jr nz, .asm_17c7d + jr nz, .loop + +; get the screen coordinates of the sprite the bubble is to be displayed above ld hl, wSpriteStateData1 + 4 - ld a, [wcd4f] + ld a, [wEmotionBubbleSpriteIndex] swap a ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [hli] ld b, a @@ -45,6 +50,7 @@ EmotionBubble: ; 17c47 (5:7c47) ld a, [hl] add $8 ld c, a + ld de, EmotionBubblesOAM xor a call WriteOAMBlock |