Fix some mobile script and map sign things

This commit is contained in:
mid-kid 2019-09-23 15:09:49 +02:00
parent 29deef86f8
commit 7111ae8e58
6 changed files with 24 additions and 20 deletions

View File

@ -1364,7 +1364,7 @@ ParseMusicCommand:
jp hl jp hl
MusicCommands: MusicCommands:
; entries correspond to macros/sound.asm enumeration ; entries correspond to macros/scripts/audio.asm enumeration
dw Music_Octave8 ; octave 8 dw Music_Octave8 ; octave 8
dw Music_Octave7 ; octave 7 dw Music_Octave7 ; octave 7
dw Music_Octave6 ; octave 6 dw Music_Octave6 ; octave 6

View File

@ -15,13 +15,13 @@ ReturnFromMapSetupScript::
call GetWorldMapLocation call GetWorldMapLocation
ld [wCurLandmark], a ld [wCurLandmark], a
call .CheckNationalParkGate call .CheckNationalParkGate
jr z, .nationalparkgate jr z, .gate
call GetMapEnvironment call GetMapEnvironment
cp GATE cp GATE
jr nz, .not_gate jr nz, .not_gate
.nationalparkgate .gate
ld a, -1 ld a, -1
ld [wCurLandmark], a ld [wCurLandmark], a
@ -70,7 +70,7 @@ ReturnFromMapSetupScript::
; These landmarks do not get pop-up signs. ; These landmarks do not get pop-up signs.
cp -1 cp -1
ret z ret z
cp SPECIAL_MAP cp SPECIAL_MAP ; redundant check
ret z ret z
cp RADIO_TOWER cp RADIO_TOWER
ret z ret z
@ -105,11 +105,11 @@ PlaceMapNameSign::
cp 60 cp 60
ret z ret z
cp 59 cp 59
jr nz, .skip2 jr nz, .already_initialized
call InitMapNameFrame call InitMapNameFrame
call PlaceMapNameCenterAlign call PlaceMapNameCenterAlign
farcall HDMATransfer_OnlyTopFourRows farcall HDMATransfer_OnlyTopFourRows
.skip2 .already_initialized
ld a, $80 ld a, $80
ld a, $70 ld a, $70
ldh [rWY], a ldh [rWY], a

View File

@ -1,4 +1,3 @@
HandleNewMap: HandleNewMap:
call ClearUnusedMapBuffer call ClearUnusedMapBuffer
call ResetMapBufferEventFlags call ResetMapBufferEventFlags

View File

@ -330,7 +330,7 @@ CopyWarpData::
ld bc, 2 ; warp number ld bc, 2 ; warp number
add hl, bc add hl, bc
ld a, [hli] ld a, [hli]
cp $ff cp -1
jr nz, .skip jr nz, .skip
ld hl, wBackupWarpNumber ld hl, wBackupWarpNumber
ld a, [hli] ld a, [hli]
@ -679,7 +679,7 @@ endr
ld [wXCoord], a ld [wXCoord], a
; destination warp number ; destination warp number
ld a, [hli] ld a, [hli]
cp $ff cp -1
jr nz, .skip jr nz, .skip
call .backup call .backup

View File

@ -3615,8 +3615,8 @@ _RunMobileScript:
dw Function17f220 ; 5 dw Function17f220 ; 5
dw Function17f27b ; 6 dw Function17f27b ; 6
dw Function17f2cb ; 7 dw Function17f2cb ; 7
dw Function17f2ff ; 8 dw MobileScript_PlayerName ; 8
dw Function17f334 ; 9 dw MobileScript_Prefecture ; 9
dw Function17f382 ; a dw Function17f382 ; a
dw Function17f3c9 ; b dw Function17f3c9 ; b
dw Function17f3f0 ; c dw Function17f3f0 ; c
@ -4068,7 +4068,7 @@ Function17f2cb:
and a and a
ret ret
Function17f2ff: MobileScript_PlayerName:
pop hl pop hl
push bc push bc
ld a, [hli] ld a, [hli]
@ -4080,7 +4080,7 @@ Function17f2ff:
ldh [rSVBK], a ldh [rSVBK], a
ld hl, wPlayerName ld hl, wPlayerName
ld de, wc608 ld de, wc608
ld bc, $6 ld bc, NAME_LENGTH_JAPANESE
call CopyBytes call CopyBytes
ld a, $4 ld a, $4
ldh [rSVBK], a ldh [rSVBK], a
@ -4097,7 +4097,7 @@ Function17f2ff:
and a and a
ret ret
Function17f334: MobileScript_Prefecture:
pop hl pop hl
push bc push bc
ld a, [hli] ld a, [hli]
@ -4118,9 +4118,9 @@ Function17f334:
jr .asm_17f35d jr .asm_17f35d
.asm_17f355 .asm_17f355
ld a, $5 ld a, BANK(s5_b2f3)
call GetSRAMBank call GetSRAMBank
ld a, [$b2f3] ld a, [s5_b2f3]
.asm_17f35d .asm_17f35d
ld c, a ld c, a
@ -4161,9 +4161,9 @@ Function17f382:
jr .asm_17f3ab jr .asm_17f3ab
.asm_17f3a3 .asm_17f3a3
ld a, $5 ld a, BANK(s5_b2f4)
call GetSRAMBank call GetSRAMBank
ld de, $b2f4 ld de, s5_b2f4
.asm_17f3ab .asm_17f3ab
ld a, PRINTNUM_LEADINGZEROS | 2 ld a, PRINTNUM_LEADINGZEROS | 2
@ -4195,7 +4195,7 @@ Function17f3c9:
push hl push hl
ld hl, wc708 ld hl, wc708
ld de, wcd36 ld de, wcd36
ld bc, $c ld bc, 12
call CopyBytes call CopyBytes
pop bc pop bc
pop de pop de

View File

@ -348,7 +348,12 @@ s5_aa8e:: ds 7 * $cc ; aa8e
s5_b023:: ds 105 ; b023 s5_b023:: ds 105 ; b023
s5_b08c:: ds 4 ; b08c s5_b08c:: ds 4 ; b08c
ds $269 ds $263
s5_b2f3:: db ; b2f3
s5_b2f4:: db ; b2f4
ds 4
s5_b2f9:: db ; b2f9 s5_b2f9:: db ; b2f9
s5_b2fa:: db ; b2fa s5_b2fa:: db ; b2fa