summaryrefslogtreecommitdiff
path: root/home.asm
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2014-06-27 21:33:08 -0500
committerBryan Bishop <kanzure@gmail.com>2014-06-27 21:33:08 -0500
commit1ecfe6bd23bb9b4e1886342c082bd5c3a108abbb (patch)
tree8190d5b11ebec4505c5494baf74b339ae9c82078 /home.asm
parent1fbe471b74908be6e89777857bf7407ef427225b (diff)
parentd6fbdfb8decf6231d6b43fbfcba63f9ce60308dc (diff)
Merge pull request #256 from yenatch/master
Fix predefs and battle code.
Diffstat (limited to 'home.asm')
-rw-r--r--home.asm24
1 files changed, 11 insertions, 13 deletions
diff --git a/home.asm b/home.asm
index 5132351e1..872f14406 100644
--- a/home.asm
+++ b/home.asm
@@ -753,15 +753,14 @@ GetSGBLayout:: ; 3340
ld a, [hCGB]
and a
- jr nz, .dosgb
+ jr nz, .sgb
ld a, [hSGB]
and a
ret z
-.dosgb
- ld a, $31 ; LoadSGBLayout
- jp Predef
+.sgb
+ predef_jump Function864c ; LoadSGBLayout
; 334e
@@ -776,7 +775,7 @@ SetHPPal:: ; 334e
GetHPPal:: ; 3353
; Get palette for hp bar pixel length e in d.
- ld d, 0 ; green
+ ld d, HP_GREEN
ld a, e
cp 24
ret nc
@@ -1583,7 +1582,7 @@ Function36f5:: ; 36f5
Function3718:: ; 3718
ld a, [BattleType]
- cp $1
+ cp BATTLETYPE_CANLOSE
jr .asm_3724
ld hl, WalkingTile
@@ -1697,22 +1696,21 @@ Function3786:: ; 3786
Function378b:: ; 378b
ld a, [CurPartySpecies]
call IsAPokemon
- jr c, .asm_37ad
+ jr c, .not_pokemon
+
push hl
ld de, VTiles2
- ld a, $3c
- call Predef
+ predef GetFrontpic
pop hl
xor a
ld [$ffad], a
- ld bc, $0707
- ld a, $13
- call Predef
+ lb bc, 7, 7
+ predef FillBox
xor a
ld [$c2c6], a
ret
-.asm_37ad
+.not_pokemon
xor a
ld [$c2c6], a
inc a