summaryrefslogtreecommitdiff
path: root/home.asm
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2015-07-16 18:10:10 -0400
committerPikalaxALT <PikalaxALT@gmail.com>2015-07-16 18:10:10 -0400
commit894955f9d922de5fc33e6c0aa7af9795dbcbc158 (patch)
tree67dd99bdc03ba493937ed00876d5cd0229a83369 /home.asm
parent7054bfe71718d5b327bbd3725c82d2431c7fcfb1 (diff)
Special script annotation, trainer constant enumeration, person-event structure update
Diffstat (limited to 'home.asm')
-rw-r--r--home.asm13
1 files changed, 6 insertions, 7 deletions
diff --git a/home.asm b/home.asm
index a8f74dffe..cd6267436 100644
--- a/home.asm
+++ b/home.asm
@@ -499,13 +499,14 @@ Function31cf:: ; 31cf
StringCmp:: ; 31db
; Compare c bytes at de and hl.
; Return z if they all match.
+.loop
ld a, [de]
cp [hl]
ret nz
inc de
inc hl
dec c
- jr nz, StringCmp
+ jr nz, .loop
ret
; 0x31e4
@@ -866,9 +867,7 @@ GetName:: ; 33c3
ld e, a
ld d, 0
ld hl, NamesPointers
- add hl, de
- add hl, de
- add hl, de
+ add_n_times hl, de, 3
ld a, [hli]
rst Bankswitch
ld a, [hli]
@@ -880,7 +879,7 @@ GetName:: ; 33c3
call GetNthString
ld de, StringBuffer1
- ld bc, $000d
+ ld bc, ITEM_NAME_LENGTH
call CopyBytes
.done
@@ -1209,7 +1208,7 @@ Function3567:: ; 3567
ld a, [hROMBank]
push af
- call Function2c52
+ call SwitchToMapScriptHeaderBank
call Function3574
pop bc
@@ -1355,7 +1354,7 @@ CheckTrainerBattle2:: ; 3600
ld a, [hROMBank]
push af
- call Function2c52
+ call SwitchToMapScriptHeaderBank
call CheckTrainerBattle
pop bc