aboutsummaryrefslogtreecommitdiffstats
path: root/home/overworld.asm
diff options
context:
space:
mode:
authorluckytyphlosion <alan.rj.huang@gmail.com>2015-06-05 20:15:21 -0400
committerluckytyphlosion <alan.rj.huang@gmail.com>2015-06-05 20:15:21 -0400
commit5ecda4d2741cc8f43a0b172aefc8299e44687832 (patch)
tree7fbac7a8f1be0bcd6a877ea47ec73fd5dfbbc211 /home/overworld.asm
parentFix EOL to LF to make push requests more doable. (diff)
parentFix a lot of bugs (diff)
downloadpokeyellow-5ecda4d2741cc8f43a0b172aefc8299e44687832.tar.gz
pokeyellow-5ecda4d2741cc8f43a0b172aefc8299e44687832.tar.xz
pokeyellow-5ecda4d2741cc8f43a0b172aefc8299e44687832.zip
Merge git://github.com/dannye/pokeyellow into dannye-master
Conflicts: constants/connection_constants.asm constants/evolution_constants.asm constants/list_constants.asm constants/oam_constants.asm constants/sprite_constants.asm constants/type_constants.asm engine/bank3d/random.asm engine/bank3f/main.asm home.asm home/overworld.asm home/serial.asm macros.asm main.asm wram.asm
Diffstat (limited to 'home/overworld.asm')
-rw-r--r--home/overworld.asm15
1 files changed, 8 insertions, 7 deletions
diff --git a/home/overworld.asm b/home/overworld.asm
index b3008903..1530f8b3 100644
--- a/home/overworld.asm
+++ b/home/overworld.asm
@@ -287,16 +287,11 @@ OverworldLoopLessDelay:: ; 0245 (0:0245)
callab AnyPartyAlive
ld a,d
and a
- jr z,.allPokemonFainted
+ jr z,AllPokemonFainted
.noFaintCheck
ld c,$0a
call DelayFrames
jp EnterMap
-;.allPokemonFainted
-; ld a,$ff
-; ld [W_ISINBATTLE],a
-; call RunMapScript
-; jp HandleBlackOut
StepCountCheck:: ; 0457 (0:0457)
ld a,[wd730]
@@ -316,6 +311,12 @@ StepCountCheck:: ; 0457 (0:0457)
.doneStepCounting
ret
+AllPokemonFainted:: ; 0475 (0:0475)
+ ld a,$ff
+ ld [W_ISINBATTLE],a
+ call RunMapScript
+ jp HandleBlackOut
+
; function to determine if there will be a battle and execute it (either a trainer battle or wild battle)
; sets carry if a battle occurred and unsets carry if not
NewBattle:: ; 0480 (0:0480)
@@ -638,7 +639,7 @@ CheckMapConnections:: ; 05db (0:05db)
ld [wCurrentTileBlockMapViewPointer + 1],a
.loadNewMap ; 06ce (0:06ce)
; load the connected map that was entered
- ld hl,[wd430]
+ ld hl,wd430
set 4,[hl]
ld a,$2
ld [wd431],a