summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorPokeglitch <pokeglitchx@gmail.com>2018-06-16 15:44:10 -0400
committerPokeglitch <pokeglitchx@gmail.com>2018-06-16 15:44:10 -0400
commit0ddae2eac07d890bad3bfe79fa9e59cb9d214040 (patch)
tree990df9c3f0eacd7bec9080e29f3e5a01c0632aa2 /home
parentf11e353fbb7d08f33ac58b49f586f65fb800cfba (diff)
More field moves, need to clean up names and constants
Diffstat (limited to 'home')
-rw-r--r--home/copy.asm6
-rwxr-xr-xhome/items.asm2
-rw-r--r--home/menu.asm2
-rwxr-xr-xhome/music.asm26
-rw-r--r--home/names.asm17
5 files changed, 48 insertions, 5 deletions
diff --git a/home/copy.asm b/home/copy.asm
index c916cbd..e5ba9cf 100644
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -99,9 +99,9 @@ ReloadTilesFromBuffer:: ; 3361
ldh [hBGMapMode], a
ret
-CopyStringToCD31::
-; copies a string from [de] to [wcd31]
- ld hl, wcd31
+CopyStringToStringBuffer2::
+; copies a string from [de] to [wStringBuffer2]
+ ld hl, wStringBuffer2
; fallthrough
CopyString::
diff --git a/home/items.asm b/home/items.asm
index 46f510c..dd4e8d3 100755
--- a/home/items.asm
+++ b/home/items.asm
@@ -64,6 +64,6 @@ GiveItem::
call ReceiveItem
ret nc
call GetItemName
- call CopyStringToCD31
+ call CopyStringToStringBuffer2
scf
ret
diff --git a/home/menu.asm b/home/menu.asm
index 4c8e957..f84554c 100644
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -92,7 +92,7 @@ CopyNameFromMenu::
call GetNthString
ld d, h
ld e, l
- call CopyStringToCD31
+ call CopyStringToStringBuffer2
pop bc
pop hl
ret
diff --git a/home/music.asm b/home/music.asm
new file mode 100755
index 0000000..79bffea
--- /dev/null
+++ b/home/music.asm
@@ -0,0 +1,26 @@
+SECTION "PlayMapMusic", ROM0[$3de1]
+
+PlayMapMusic: ; 00:3de1
+ push hl
+ push de
+ push bc
+ push af
+ call GetMapMusic
+ ld a, [wMapMusic]
+ cp e
+ jr z, .dont_play
+ push de
+ ld de, $0000
+ call PlayMusic
+ call DelayFrame
+ pop de
+ ld a, e
+ ld [wMapMusic], a
+ call PlayMusic
+
+.dont_play
+ pop af
+ pop bc
+ pop de
+ pop hl
+ ret \ No newline at end of file
diff --git a/home/names.asm b/home/names.asm
index f0ee433..162154d 100644
--- a/home/names.asm
+++ b/home/names.asm
@@ -243,3 +243,20 @@ Unreferenced_GetMoveName:: ; 00:37fc
ld de, wStringBuffer1
pop hl
ret
+
+SECTION "GetNick", ROM0[$3a97]
+
+GetNick: ; 00:3a97
+; Get nickname a from list hl.
+ push hl
+ push bc
+ call SkipNames
+ ld de, wStringBuffer1
+ push de
+ ld bc, MON_NAME_LENGTH
+ call CopyBytes
+ pop de
+ callab CorrectNickErrors
+ pop bc
+ pop hl
+ ret \ No newline at end of file