summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/copy2.asm12
-rw-r--r--home/overworld.asm15
-rw-r--r--home/serial.asm2
3 files changed, 15 insertions, 14 deletions
diff --git a/home/copy2.asm b/home/copy2.asm
index 318ed882..ad82260a 100644
--- a/home/copy2.asm
+++ b/home/copy2.asm
@@ -14,11 +14,11 @@ FarCopyDataDouble:: ; 15d4 (0:15d4)
ld e,a
ld a,b
and a
- jr z,.8bitcopyamount
+ jr z,.eightbitcopyamount
ld a,c
and a ; multiple of $100
jr z, .expandloop ; if so, do not increment b because the first instance of dec c results in underflow
-.8bitcopyamount
+.eightbitcopyamount
inc b
.expandloop
ld a,[de]
@@ -134,13 +134,13 @@ FillMemory:: ; 166e (0:166e)
push af
ld a,b
and a
- jr z, .8bitcopyamount
+ jr z, .eightbitcopyamount
ld a,c
and a
- jr z, .mulitpleof$100
-.8bitcopyamount
+ jr z, .mulitpleof0x100
+.eightbitcopyamount
inc b
-.multipleof$100
+.mulitpleof0x100
pop af
.loop
ld [hli],a
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
diff --git a/home/serial.asm b/home/serial.asm
index a199de57..1f0146d9 100644
--- a/home/serial.asm
+++ b/home/serial.asm
@@ -309,4 +309,4 @@ Serial_TryEstablishingExternallyClockedConnection:: ; 22fa (0:22fa)
ld [hSerialReceiveData], a
ld a, START_TRANSFER_EXTERNAL_CLOCK
ld [rSC], a
- ret \ No newline at end of file
+ ret