summaryrefslogtreecommitdiff
path: root/engine/overworld
diff options
context:
space:
mode:
Diffstat (limited to 'engine/overworld')
-rwxr-xr-xengine/overworld/healing_machine.asm17
-rwxr-xr-xengine/overworld/map_sprites.asm6
-rw-r--r--engine/overworld/movement.asm4
-rwxr-xr-xengine/overworld/pokemart.asm22
4 files changed, 25 insertions, 24 deletions
diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm
index 53174630..90d306c3 100755
--- a/engine/overworld/healing_machine.asm
+++ b/engine/overworld/healing_machine.asm
@@ -48,7 +48,7 @@ AnimateHealingMachine: ; 70433 (1c:4433)
ld [wc0ee], a
call PlaySound
ld d, $28
- call Func_704f3
+ call FlashSprite8Times
.asm_704a2
ld a, [wc026]
cp MUSIC_PKMN_HEALED
@@ -74,16 +74,17 @@ PokeCenterOAMData: ; 704d7 (1c:44d7)
db $35,$30,$7D,$10
db $35,$38,$7D,$30
-Func_704f3: ; 704f3 (1c:44f3)
- ld b, $8
-.asm_704f5
- ld a, [rOBP1] ; $ff49
+; d = value to xor with palette
+FlashSprite8Times: ; 704f3 (1c:44f3)
+ ld b, 8
+.loop
+ ld a, [rOBP1]
xor d
- ld [rOBP1], a ; $ff49
- ld c, $a
+ ld [rOBP1], a
+ ld c, 10
call DelayFrames
dec b
- jr nz, .asm_704f5
+ jr nz, .loop
ret
Func_70503: ; 70503 (1c:4503)
diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm
index 81443c9f..df39d112 100755
--- a/engine/overworld/map_sprites.asm
+++ b/engine/overworld/map_sprites.asm
@@ -159,7 +159,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
ld l,e
pop de
ld b,a
- ld a,[wcfc4]
+ ld a,[wFontLoaded]
bit 0,a ; reloading upper half of tile patterns after displaying text?
jr nz,.skipFirstLoad ; if so, skip loading data into the lower half
ld a,b
@@ -180,7 +180,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
jr nc,.noCarry3
inc d
.noCarry3
- ld a,[wcfc4]
+ ld a,[wFontLoaded]
bit 0,a ; reloading upper half of tile patterns after displaying text?
jr nz,.loadWhileLCDOn
pop af
@@ -264,7 +264,7 @@ InitOutsideMapSprites: ; 1797b (5:797b)
cp a,$f0 ; does the map have 2 sprite sets?
call nc,GetSplitMapSpriteSetID ; if so, choose the appropriate one
ld b,a ; b = spriteSetID
- ld a,[wcfc4]
+ ld a,[wFontLoaded]
bit 0,a ; reloading upper half of tile patterns after displaying text?
jr nz,.loadSpriteSet ; if so, forcibly reload the sprite set
ld a,[W_SPRITESETID]
diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm
index 3b9cac7d..c4482700 100644
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -52,7 +52,7 @@ UpdatePlayerSprite: ; 4e31 (1:4e31)
jr .asm_4eab
.asm_4e86
ld [wSpriteStateData1 + 9], a
- ld a, [wcfc4]
+ ld a, [wFontLoaded]
bit 0, a
jr nz, .asm_4e7d
.asm_4e90
@@ -130,7 +130,7 @@ Func_4ed1: ; 4ed1 (1:4ed1)
bit 7, a
jp nz, InitializeSpriteFacingDirection ; c1x1 >= $80
ld b, a
- ld a, [wcfc4]
+ ld a, [wFontLoaded]
bit 0, a
jp nz, notYetMoving
ld a, b
diff --git a/engine/overworld/pokemart.asm b/engine/overworld/pokemart.asm
index 644c155b..8325b93f 100755
--- a/engine/overworld/pokemart.asm
+++ b/engine/overworld/pokemart.asm
@@ -11,10 +11,10 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
ld [wPlayerMonNumber],a
inc a
ld [wcf93],a
- ld a,$13
+ ld a,MONEY_BOX
ld [wTextBoxID],a
call DisplayTextBoxID ; draw money text box
- ld a,$15
+ ld a,BUY_SELL_QUIT_MENU
ld [wTextBoxID],a
call DisplayTextBoxID ; do buy/sell/quit menu
ld hl,wd128 ; pointer to this pokemart's inventory
@@ -45,14 +45,14 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
call SaveScreenTilesToBuffer1 ; save screen
.sellMenuLoop
call LoadScreenTilesFromBuffer1 ; restore saved screen
- ld a,$13
+ ld a,MONEY_BOX
ld [wTextBoxID],a
call DisplayTextBoxID ; draw money text box
ld hl,wNumBagItems
ld a,l
- ld [wcf8b],a
+ ld [wList],a
ld a,h
- ld [wcf8c],a
+ ld [wList + 1],a
xor a
ld [wcf93],a
ld [wCurrentMenuItem],a
@@ -79,7 +79,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
call PrintText
hlCoord 14, 7
ld bc,$080f
- ld a,$14
+ ld a,TWO_OPTION_MENU
ld [wTextBoxID],a
call DisplayTextBoxID ; yes/no menu
ld a,[wd12e]
@@ -119,14 +119,14 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
call SaveScreenTilesToBuffer1 ; save screen
.buyMenuLoop
call LoadScreenTilesFromBuffer1 ; restore saved screen
- ld a,$13
+ ld a,MONEY_BOX
ld [wTextBoxID],a
call DisplayTextBoxID ; draw money text box
ld hl,wStringBuffer2 + 11
ld a,l
- ld [wcf8b],a
+ ld [wList],a
ld a,h
- ld [wcf8c],a
+ ld [wList + 1],a
xor a
ld [wCurrentMenuItem],a
inc a
@@ -150,7 +150,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
call PrintText
hlCoord 14, 7
ld bc,$080f
- ld a,$14
+ ld a,TWO_OPTION_MENU
ld [wTextBoxID],a
call DisplayTextBoxID ; yes/no menu
ld a,[wd12e]
@@ -180,7 +180,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
jp .buyMenuLoop
.returnToMainPokemartMenu
call LoadScreenTilesFromBuffer1
- ld a,$13
+ ld a,MONEY_BOX
ld [wTextBoxID],a
call DisplayTextBoxID ; draw money text box
ld hl,PokemartAnythingElseText