summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/audio.asm2
-rw-r--r--home/copy.asm6
-rwxr-xr-xhome/items.asm26
-rw-r--r--home/map.asm2
-rw-r--r--home/menu.asm2
-rw-r--r--home/misc_32c8.asm2
-rw-r--r--home/names.asm17
-rw-r--r--home/overworld.asm16
-rw-r--r--home/talk_to_npc.asm18
-rw-r--r--home/text.asm6
10 files changed, 57 insertions, 40 deletions
diff --git a/home/audio.asm b/home/audio.asm
index e50abc1..609c8dc 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -234,7 +234,7 @@ PlayMapMusic:: ; 3DE1
ret
SpecialMapMusic:: ; 3E05
- ld a, [wPlayerBikeSurfState]
+ ld a, [wPlayerState]
and a
jr z, .normal
cp $02
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 498edc6..dd4e8d3 100755
--- a/home/items.asm
+++ b/home/items.asm
@@ -1,12 +1,28 @@
INCLUDE "constants.asm"
if DEBUG
-SECTION "AddItemToInventory", ROM0[$3259]
+SECTION "TossItem", ROM0[$3243]
else
-SECTION "AddItemToInventory", ROM0[$321D]
+SECTION "TossItem", ROM0[$3207]
endc
-AddItemToInventory:: ; 3259
+TossItem: ; 00:3243
+ ldh a, [hROMBank]
+ push af
+ ld a, BANK(_TossItem)
+ call Bankswitch
+ push hl
+ push de
+ push bc
+ call _TossItem
+ pop bc
+ pop de
+ pop hl
+ pop af
+ call Bankswitch
+ ret
+
+ReceiveItem:: ; 3259
; function to add an item (in varying quantities) to the player's bag or PC box
; INPUT:
; HL = address of inventory (either wNumBagItems or wNumBoxItems)
@@ -45,9 +61,9 @@ GiveItem::
ld a, c
ld [wItemQuantity], a
ld hl, wNumBagItems
- call AddItemToInventory
+ call ReceiveItem
ret nc
call GetItemName
- call CopyStringToCD31
+ call CopyStringToStringBuffer2
scf
ret
diff --git a/home/map.asm b/home/map.asm
index e295894..7c691cb 100644
--- a/home/map.asm
+++ b/home/map.asm
@@ -331,7 +331,7 @@ MapSetup_Continue:: ; 22e6
call DisableLCD
call DisableAudio
call VolumeOff
- callab DebugWarp
+ callab LoadSpawnPoint
call CopyMapPartialAndAttributes
call SetUpMapBuffer
call InitUnknownBuffercc9e
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/misc_32c8.asm b/home/misc_32c8.asm
index bb19d59..00e41ce 100644
--- a/home/misc_32c8.asm
+++ b/home/misc_32c8.asm
@@ -7,7 +7,7 @@ SECTION "Unknown 32c8", ROM0[$328c]
endc
Function32c8::
- predef Functionce10
+ predef GetItemAmount
ld a, b
and a
ret
diff --git a/home/names.asm b/home/names.asm
index f0ee433..aacd285 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
diff --git a/home/overworld.asm b/home/overworld.asm
index e1e7dfb..51ba0f5 100644
--- a/home/overworld.asm
+++ b/home/overworld.asm
@@ -29,11 +29,11 @@ CheckStartmenuSelectHook:
ldh a, [hStartmenuCloseAndSelectHookEnable]
and a
ret z ; hook is disabled
- ld hl, StartmenuCloseAndSelectHookPtr
+ ld hl, wQueuedScriptAddr
ld a, [hli]
ld h, [hl]
ld l, a
- ld a, [StartmenuCloseAndSelectHookBank]
+ ld a, [wQueuedScriptBank]
call FarCall_hl
ld hl, hStartmenuCloseAndSelectHookEnable
xor a
@@ -178,18 +178,18 @@ ScheduleColumnRedrawHelper: ; 2d10 (0:2d10)
ret
if DEBUG
-SECTION "Install StartMenu Hook Function", ROM0[$35EC]
+SECTION "QueueScript", ROM0[$35EC]
else
-SECTION "Install StartMenu Hook Function", ROM0[$35B0]
+SECTION "QueueScript", ROM0[$35B0]
endc
-InstallStartmenuCloseAndSelectHook::
+QueueScript::
; Install a function that is called as soon as
; the start menu is closed or directly after
; the select button function ran
- ld [StartmenuCloseAndSelectHookBank], a
+ ld [wQueuedScriptBank], a
ld a, l
- ld [StartmenuCloseAndSelectHookPtr], a
+ ld [wQueuedScriptAddr], a
ld a, h
- ld [StartmenuCloseAndSelectHookPtr + 1], a
+ ld [wQueuedScriptAddr + 1], a
ret
diff --git a/home/talk_to_npc.asm b/home/talk_to_npc.asm
index 9edee7d..7f4452c 100644
--- a/home/talk_to_npc.asm
+++ b/home/talk_to_npc.asm
@@ -358,20 +358,4 @@ SetFFInAccumulator:: ; 3240
dec a
ret
-Function3243:: ; 3243
- ldh a, [hROMBank]
- push af
- ld a, $03
- call Bankswitch
- push hl
- push de
- push bc
- call _TossItem
- pop bc
- pop de
- pop hl
- pop af
- call Bankswitch
- ret
-
-;3259 \ No newline at end of file
+; 3243
diff --git a/home/text.asm b/home/text.asm
index 20119dd..5d5f607 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -156,7 +156,7 @@ ENDM
dict "<TM>", TMChar
dict "<TRAINER>", TrainerChar
dict "<CONT>", ContText
- dict "<……>", SixDotsChar
+ dict "<⋯⋯>", SixDotsChar
dict "<DONE>", DoneText
dict "<PROMPT>", PromptText
dict "<GA>", GaCharacter
@@ -287,7 +287,7 @@ TrainerCharText:: db "トレーナー@"
PCCharText:: db "パソコン@"
RocketCharText:: db "ロケットだん@"
POKeCharText:: db "ポケモン@"
-SixDotsCharText:: db "……@"
+SixDotsCharText:: db "⋯⋯@"
EnemyText:: db "てきの @"
GaCharacterTExt:: db "が @"
@@ -680,7 +680,7 @@ Text_TX_DOTS: ; 11e1 (0:11e1)
ld h, b
ld l, c
.loop
- ld a, "…"
+ ld a, "⋯"
ld [hli], a
push de
call GetJoypad