ref: d44c7c305c3f94b59e3e2c008408779836a0020a
parent: b9a113a9f4712771e37313a4c8a76f7ef23cebb2
parent: 7306c1dc2dca5666a5276a6758d1a64e1ddeae20
author: Rangi <35663410+Rangi42@users.noreply.github.com>
date: Thu Jul 16 13:00:57 EDT 2020
Merge pull request #277 from Rangi42/master Miscellaneous constant and label updates
--- a/audio/engine_1.asm
+++ b/audio/engine_1.asm
@@ -41,7 +41,7 @@
ld hl, wChannelNoteDelayCounters ; delay until next note
add hl, bc
ld a, [hl]
- cp $1 ; if the delay is 1, play next note
+ cp 1 ; if the delay is 1, play next note
jp z, Audio1_PlayNextNote
dec a ; otherwise, decrease the delay timer
ld [hl], a
@@ -163,8 +163,8 @@
Audio1_sound_ret:
call Audio1_GetNextMusicByte
ld d, a
- cp $ff ; is this command a sound_ret?
- jp nz, Audio1_sound_call ; no
+ cp sound_ret_cmd
+ jp nz, Audio1_sound_call
ld b, 0
ld hl, wChannelFlags1
add hl, bc
@@ -251,8 +251,8 @@
ret
Audio1_sound_call:
- cp $fd ; is this command a sound_call?
- jp nz, Audio1_sound_loop ; no
+ cp sound_call_cmd
+ jp nz, Audio1_sound_loop
call Audio1_GetNextMusicByte
push af
call Audio1_GetNextMusicByte
@@ -288,8 +288,8 @@
jp Audio1_sound_ret
Audio1_sound_loop:
- cp $fe ; is this command a sound_loop?
- jp nz, Audio1_note_type ; no
+ cp sound_loop_cmd
+ jp nz, Audio1_note_type
call Audio1_GetNextMusicByte
ld e, a
and a
@@ -327,8 +327,8 @@
Audio1_note_type:
and $f0
- cp $d0 ; is this command a note_type?
- jp nz, Audio1_toggle_perfect_pitch ; no
+ cp note_type_cmd
+ jp nz, Audio1_toggle_perfect_pitch
ld a, d
and $f
ld b, $0
@@ -371,8 +371,8 @@
Audio1_toggle_perfect_pitch:
ld a, d
- cp $e8 ; is this command a toggle_perfect_pitch?
- jr nz, Audio1_vibrato ; no
+ cp toggle_perfect_pitch_cmd
+ jr nz, Audio1_vibrato
ld b, 0
ld hl, wChannelFlags1
add hl, bc
@@ -382,8 +382,8 @@
jp Audio1_sound_ret
Audio1_vibrato:
- cp $ea ; is this command a vibrato?
- jr nz, Audio1_pitch_slide ; no
+ cp vibrato_cmd
+ jr nz, Audio1_pitch_slide
call Audio1_GetNextMusicByte
ld b, 0
ld hl, wChannelVibratoDelayCounters
@@ -430,8 +430,8 @@
jp Audio1_sound_ret
Audio1_pitch_slide:
- cp $eb ; is this command a pitch_slide?
- jr nz, Audio1_duty_cycle ; no
+ cp pitch_slide_cmd
+ jr nz, Audio1_duty_cycle
call Audio1_GetNextMusicByte
ld b, 0
ld hl, wChannelPitchSlideLengthModifiers
@@ -461,8 +461,8 @@
jp Audio1_note_length
Audio1_duty_cycle:
- cp $ec ; is this command a duty_cycle?
- jr nz, Audio1_tempo ; no
+ cp duty_cycle_cmd
+ jr nz, Audio1_tempo
call Audio1_GetNextMusicByte
rrca
rrca
@@ -474,8 +474,8 @@
jp Audio1_sound_ret
Audio1_tempo:
- cp $ed ; is this command a tempo?
- jr nz, Audio1_stereo_panning ; no
+ cp tempo_cmd
+ jr nz, Audio1_stereo_panning
ld a, c
cp Ch5
jr nc, .sfxChannel
@@ -503,8 +503,8 @@
jp Audio1_sound_ret
Audio1_stereo_panning:
- cp $ee ; is this command a stereo_panning?
- jr nz, Audio1_unknownmusic0xef ; no
+ cp stereo_panning_cmd
+ jr nz, Audio1_unknownmusic0xef
call Audio1_GetNextMusicByte
ld [wStereoPanning], a ; store panning
jp Audio1_sound_ret
@@ -511,8 +511,8 @@
; this appears to never be used
Audio1_unknownmusic0xef:
- cp $ef ; is this command an unknownmusic0xef?
- jr nz, Audio1_duty_cycle_pattern ; no
+ cp unknownmusic0xef_cmd
+ jr nz, Audio1_duty_cycle_pattern
call Audio1_GetNextMusicByte
push bc
call Audio1_PlaySound
@@ -528,8 +528,8 @@
jp Audio1_sound_ret
Audio1_duty_cycle_pattern:
- cp $fc ; is this command a duty_cycle_pattern?
- jr nz, Audio1_volume ; no
+ cp duty_cycle_pattern_cmd
+ jr nz, Audio1_volume
call Audio1_GetNextMusicByte
ld b, 0
ld hl, wChannelDutyCyclePatterns
@@ -545,15 +545,15 @@
jp Audio1_sound_ret
Audio1_volume:
- cp $f0 ; is this command a volume?
- jr nz, Audio1_execute_music ; no
+ cp volume_cmd
+ jr nz, Audio1_execute_music
call Audio1_GetNextMusicByte
ldh [rNR50], a ; store volume
jp Audio1_sound_ret
Audio1_execute_music:
- cp $f8 ; is this command an execute_music?
- jr nz, Audio1_octave ; no
+ cp execute_music_cmd
+ jr nz, Audio1_octave
ld b, $0
ld hl, wChannelFlags2
add hl, bc
@@ -562,8 +562,8 @@
Audio1_octave:
and $f0
- cp $e0 ; is this command an octave?
- jr nz, Audio1_sfx_note ; no
+ cp octave_cmd
+ jr nz, Audio1_sfx_note
ld hl, wChannelOctaves
ld b, 0
add hl, bc
@@ -574,7 +574,7 @@
; sfx_note is either square_note or noise_note depending on the channel
Audio1_sfx_note:
- cp $20 ; is this command a sfx_note?
+ cp sfx_note_cmd
jr nz, Audio1_pitch_sweep
ld a, c
cp Ch4 ; is this a noise or sfx channel?
@@ -630,8 +630,8 @@
cp Ch5
jr c, Audio1_note ; if not a sfx
ld a, d
- cp $10 ; is this command a pitch_sweep?
- jr nz, Audio1_note ; no
+ cp pitch_sweep_cmd
+ jr nz, Audio1_note
ld b, $0
ld hl, wChannelFlags2
add hl, bc
@@ -647,12 +647,12 @@
jr nz, Audio1_note_length ; if not noise channel
ld a, d
and $f0
- cp $b0 ; is this command a drum_note?
+ cp drum_note_cmd
jr z, .drum_note
- jr nc, Audio1_note_length ; no
+ jr nc, Audio1_note_length
; this executes when on the noise channel and
- ; the command id is less than $b0
+ ; the command id is less than drum_note_cmd ($b0)
; in this case, the upper nybble is used as the noise instrument ($1-$a)
; and the lower nybble is the length minus 1 (0-15)
; however, this doesn't work for instrument #2 because the command id
@@ -748,7 +748,7 @@
Audio1_note_pitch:
pop af
and $f0
- cp $c0 ; compare to rest
+ cp rest_cmd
jr nz, .notRest
ld a, c
cp Ch5
@@ -1330,7 +1330,7 @@
Audio1_PlaySound::
ld [wSoundID], a
- cp $ff
+ cp SFX_STOP_ALL_MUSIC
jp z, .stopAllAudio
cp MAX_SFX_ID_1
jp z, .playSfx
--- a/audio/engine_2.asm
+++ b/audio/engine_2.asm
@@ -43,7 +43,7 @@
ld hl, wChannelNoteDelayCounters ; delay until next note
add hl, bc
ld a, [hl]
- cp $1 ; if the delay is 1, play next note
+ cp 1 ; if the delay is 1, play next note
jp z, Audio2_PlayNextNote
dec a ; otherwise, decrease the delay timer
ld [hl], a
@@ -174,8 +174,8 @@
Audio2_sound_ret:
call Audio2_GetNextMusicByte
ld d, a
- cp $ff ; is this command a sound_ret?
- jp nz, Audio2_sound_call ; no
+ cp sound_ret_cmd
+ jp nz, Audio2_sound_call
ld b, 0
ld hl, wChannelFlags1
add hl, bc
@@ -262,8 +262,8 @@
ret
Audio2_sound_call:
- cp $fd ; is this command a sound_call?
- jp nz, Audio2_sound_loop ; no
+ cp sound_call_cmd
+ jp nz, Audio2_sound_loop
call Audio2_GetNextMusicByte
push af
call Audio2_GetNextMusicByte
@@ -299,8 +299,8 @@
jp Audio2_sound_ret
Audio2_sound_loop:
- cp $fe ; is this command a sound_loop?
- jp nz, Audio2_note_type ; no
+ cp sound_loop_cmd
+ jp nz, Audio2_note_type
call Audio2_GetNextMusicByte
ld e, a
and a
@@ -338,8 +338,8 @@
Audio2_note_type:
and $f0
- cp $d0 ; is this command a note_type?
- jp nz, Audio2_toggle_perfect_pitch ; no
+ cp note_type_cmd
+ jp nz, Audio2_toggle_perfect_pitch
ld a, d
and $f
ld b, $0
@@ -382,8 +382,8 @@
Audio2_toggle_perfect_pitch:
ld a, d
- cp $e8 ; is this command a toggle_perfect_pitch?
- jr nz, Audio2_vibrato ; no
+ cp toggle_perfect_pitch_cmd
+ jr nz, Audio2_vibrato
ld b, 0
ld hl, wChannelFlags1
add hl, bc
@@ -393,8 +393,8 @@
jp Audio2_sound_ret
Audio2_vibrato:
- cp $ea ; is this command a vibrato?
- jr nz, Audio2_pitch_slide ; no
+ cp vibrato_cmd
+ jr nz, Audio2_pitch_slide
call Audio2_GetNextMusicByte
ld b, 0
ld hl, wChannelVibratoDelayCounters
@@ -441,8 +441,8 @@
jp Audio2_sound_ret
Audio2_pitch_slide:
- cp $eb ; is this command a pitch_slide?
- jr nz, Audio2_duty_cycle ; no
+ cp pitch_slide_cmd
+ jr nz, Audio2_duty_cycle
call Audio2_GetNextMusicByte
ld b, 0
ld hl, wChannelPitchSlideLengthModifiers
@@ -472,8 +472,8 @@
jp Audio2_note_length
Audio2_duty_cycle:
- cp $ec ; is this command a duty_cycle?
- jr nz, Audio2_tempo ; no
+ cp duty_cycle_cmd
+ jr nz, Audio2_tempo
call Audio2_GetNextMusicByte
rrca
rrca
@@ -485,8 +485,8 @@
jp Audio2_sound_ret
Audio2_tempo:
- cp $ed ; is this command a tempo?
- jr nz, Audio2_stereo_panning ; no
+ cp tempo_cmd
+ jr nz, Audio2_stereo_panning
ld a, c
cp Ch5
jr nc, .sfxChannel
@@ -514,8 +514,8 @@
jp Audio2_sound_ret
Audio2_stereo_panning:
- cp $ee ; is this command a stereo_panning?
- jr nz, Audio2_unknownmusic0xef ; no
+ cp stereo_panning_cmd
+ jr nz, Audio2_unknownmusic0xef
call Audio2_GetNextMusicByte
ld [wStereoPanning], a ; store panning
jp Audio2_sound_ret
@@ -522,8 +522,8 @@
; this appears to never be used
Audio2_unknownmusic0xef:
- cp $ef ; is this command an unknownmusic0xef?
- jr nz, Audio2_duty_cycle_pattern ; no
+ cp unknownmusic0xef_cmd
+ jr nz, Audio2_duty_cycle_pattern
call Audio2_GetNextMusicByte
push bc
call Audio2_PlaySound
@@ -539,8 +539,8 @@
jp Audio2_sound_ret
Audio2_duty_cycle_pattern:
- cp $fc ; is this command a duty_cycle_pattern?
- jr nz, Audio2_volume ; no
+ cp duty_cycle_pattern_cmd
+ jr nz, Audio2_volume
call Audio2_GetNextMusicByte
ld b, 0
ld hl, wChannelDutyCyclePatterns
@@ -556,15 +556,15 @@
jp Audio2_sound_ret
Audio2_volume:
- cp $f0 ; is this command a volume?
- jr nz, Audio2_execute_music ; no
+ cp volume_cmd
+ jr nz, Audio2_execute_music
call Audio2_GetNextMusicByte
ldh [rNR50], a ; store volume
jp Audio2_sound_ret
Audio2_execute_music:
- cp $f8 ; is this command an execute_music?
- jr nz, Audio2_octave ; no
+ cp execute_music_cmd
+ jr nz, Audio2_octave
ld b, $0
ld hl, wChannelFlags2
add hl, bc
@@ -573,8 +573,8 @@
Audio2_octave:
and $f0
- cp $e0 ; is this command an octave?
- jr nz, Audio2_sfx_note ; no
+ cp octave_cmd
+ jr nz, Audio2_sfx_note
ld hl, wChannelOctaves
ld b, 0
add hl, bc
@@ -585,7 +585,7 @@
; sfx_note is either square_note or noise_note depending on the channel
Audio2_sfx_note:
- cp $20 ; is this command a sfx_note?
+ cp sfx_note_cmd
jr nz, Audio2_pitch_sweep
ld a, c
cp Ch4 ; is this a noise or sfx channel?
@@ -641,8 +641,8 @@
cp Ch5
jr c, Audio2_note ; if not a sfx
ld a, d
- cp $10 ; is this command a pitch_sweep?
- jr nz, Audio2_note ; no
+ cp pitch_sweep_cmd
+ jr nz, Audio2_note
ld b, $0
ld hl, wChannelFlags2
add hl, bc
@@ -658,12 +658,12 @@
jr nz, Audio2_note_length ; if not noise channel
ld a, d
and $f0
- cp $b0 ; is this command a drum_note?
+ cp drum_note_cmd
jr z, .drum_note
- jr nc, Audio2_note_length ; no
+ jr nc, Audio2_note_length
; this executes when on the noise channel and
- ; the command id is less than $b0
+ ; the command id is less than drum_note_cmd ($b0)
; in this case, the upper nybble is used as the noise instrument ($1-$a)
; and the lower nybble is the length minus 1 (0-15)
; however, this doesn't work for instrument #2 because the command id
@@ -759,7 +759,7 @@
Audio2_note_pitch:
pop af
and $f0
- cp $c0 ; compare to rest
+ cp rest_cmd
jr nz, .notRest
ld a, c
cp Ch5
@@ -1393,7 +1393,7 @@
Audio2_PlaySound::
ld [wSoundID], a
- cp $ff
+ cp SFX_STOP_ALL_MUSIC
jp z, .stopAllAudio
cp MAX_SFX_ID_2
jp z, .playSfx
--- a/audio/engine_3.asm
+++ b/audio/engine_3.asm
@@ -41,7 +41,7 @@
ld hl, wChannelNoteDelayCounters ; delay until next note
add hl, bc
ld a, [hl]
- cp $1 ; if the delay is 1, play next note
+ cp 1 ; if the delay is 1, play next note
jp z, Audio3_PlayNextNote
dec a ; otherwise, decrease the delay timer
ld [hl], a
@@ -163,8 +163,8 @@
Audio3_sound_ret:
call Audio3_GetNextMusicByte
ld d, a
- cp $ff ; is this command a sound_ret?
- jp nz, Audio3_sound_call ; no
+ cp sound_ret_cmd
+ jp nz, Audio3_sound_call
ld b, 0
ld hl, wChannelFlags1
add hl, bc
@@ -251,8 +251,8 @@
ret
Audio3_sound_call:
- cp $fd ; is this command a sound_call?
- jp nz, Audio3_sound_loop ; no
+ cp sound_call_cmd
+ jp nz, Audio3_sound_loop
call Audio3_GetNextMusicByte
push af
call Audio3_GetNextMusicByte
@@ -288,8 +288,8 @@
jp Audio3_sound_ret
Audio3_sound_loop:
- cp $fe ; is this command a sound_loop?
- jp nz, Audio3_note_type ; no
+ cp sound_loop_cmd
+ jp nz, Audio3_note_type
call Audio3_GetNextMusicByte
ld e, a
and a
@@ -327,8 +327,8 @@
Audio3_note_type:
and $f0
- cp $d0 ; is this command a note_type?
- jp nz, Audio3_toggle_perfect_pitch ; no
+ cp note_type_cmd
+ jp nz, Audio3_toggle_perfect_pitch
ld a, d
and $f
ld b, $0
@@ -371,8 +371,8 @@
Audio3_toggle_perfect_pitch:
ld a, d
- cp $e8 ; is this command a toggle_perfect_pitch?
- jr nz, Audio3_vibrato ; no
+ cp toggle_perfect_pitch_cmd
+ jr nz, Audio3_vibrato
ld b, 0
ld hl, wChannelFlags1
add hl, bc
@@ -382,8 +382,8 @@
jp Audio3_sound_ret
Audio3_vibrato:
- cp $ea ; is this command a vibrato?
- jr nz, Audio3_pitch_slide ; no
+ cp vibrato_cmd
+ jr nz, Audio3_pitch_slide
call Audio3_GetNextMusicByte
ld b, 0
ld hl, wChannelVibratoDelayCounters
@@ -430,8 +430,8 @@
jp Audio3_sound_ret
Audio3_pitch_slide:
- cp $eb ; is this command a pitch_slide?
- jr nz, Audio3_duty_cycle ; no
+ cp pitch_slide_cmd
+ jr nz, Audio3_duty_cycle
call Audio3_GetNextMusicByte
ld b, 0
ld hl, wChannelPitchSlideLengthModifiers
@@ -461,8 +461,8 @@
jp Audio3_note_length
Audio3_duty_cycle:
- cp $ec ; is this command a duty_cycle?
- jr nz, Audio3_tempo ; no
+ cp duty_cycle_cmd
+ jr nz, Audio3_tempo
call Audio3_GetNextMusicByte
rrca
rrca
@@ -474,8 +474,8 @@
jp Audio3_sound_ret
Audio3_tempo:
- cp $ed ; is this command a tempo?
- jr nz, Audio3_stereo_panning ; no
+ cp tempo_cmd
+ jr nz, Audio3_stereo_panning
ld a, c
cp Ch5
jr nc, .sfxChannel
@@ -503,8 +503,8 @@
jp Audio3_sound_ret
Audio3_stereo_panning:
- cp $ee ; is this command a stereo_panning?
- jr nz, Audio3_unknownmusic0xef ; no
+ cp stereo_panning_cmd
+ jr nz, Audio3_unknownmusic0xef
call Audio3_GetNextMusicByte
ld [wStereoPanning], a ; store panning
jp Audio3_sound_ret
@@ -511,8 +511,8 @@
; this appears to never be used
Audio3_unknownmusic0xef:
- cp $ef ; is this command an unknownmusic0xef?
- jr nz, Audio3_duty_cycle_pattern ; no
+ cp unknownmusic0xef_cmd
+ jr nz, Audio3_duty_cycle_pattern
call Audio3_GetNextMusicByte
push bc
call Audio3_PlaySound
@@ -528,8 +528,8 @@
jp Audio3_sound_ret
Audio3_duty_cycle_pattern:
- cp $fc ; is this command a duty_cycle_pattern?
- jr nz, Audio3_volume ; no
+ cp duty_cycle_pattern_cmd
+ jr nz, Audio3_volume
call Audio3_GetNextMusicByte
ld b, 0
ld hl, wChannelDutyCyclePatterns
@@ -545,15 +545,15 @@
jp Audio3_sound_ret
Audio3_volume:
- cp $f0 ; is this command a volume?
- jr nz, Audio3_execute_music ; no
+ cp volume_cmd
+ jr nz, Audio3_execute_music
call Audio3_GetNextMusicByte
ldh [rNR50], a ; store volume
jp Audio3_sound_ret
Audio3_execute_music:
- cp $f8 ; is this command an execute_music?
- jr nz, Audio3_octave ; no
+ cp execute_music_cmd
+ jr nz, Audio3_octave
ld b, $0
ld hl, wChannelFlags2
add hl, bc
@@ -562,8 +562,8 @@
Audio3_octave:
and $f0
- cp $e0 ; is this command an octave?
- jr nz, Audio3_sfx_note ; no
+ cp octave_cmd
+ jr nz, Audio3_sfx_note
ld hl, wChannelOctaves
ld b, 0
add hl, bc
@@ -574,7 +574,7 @@
; sfx_note is either square_note or noise_note depending on the channel
Audio3_sfx_note:
- cp $20 ; is this command a sfx_note?
+ cp sfx_note_cmd
jr nz, Audio3_pitch_sweep
ld a, c
cp Ch4 ; is this a noise or sfx channel?
@@ -630,8 +630,8 @@
cp Ch5
jr c, Audio3_note ; if not a sfx
ld a, d
- cp $10 ; is this command a pitch_sweep?
- jr nz, Audio3_note ; no
+ cp pitch_sweep_cmd
+ jr nz, Audio3_note
ld b, $0
ld hl, wChannelFlags2
add hl, bc
@@ -647,12 +647,12 @@
jr nz, Audio3_note_length ; if not noise channel
ld a, d
and $f0
- cp $b0 ; is this command a drum_note?
+ cp drum_note_cmd
jr z, .drum_note
- jr nc, Audio3_note_length ; no
+ jr nc, Audio3_note_length
; this executes when on the noise channel and
- ; the command id is less than $b0
+ ; the command id is less than drum_note_cmd ($b0)
; in this case, the upper nybble is used as the noise instrument ($1-$a)
; and the lower nybble is the length minus 1 (0-15)
; however, this doesn't work for instrument #2 because the command id
@@ -748,7 +748,7 @@
Audio3_note_pitch:
pop af
and $f0
- cp $c0 ; compare to rest
+ cp rest_cmd
jr nz, .notRest
ld a, c
cp Ch5
@@ -1330,7 +1330,7 @@
Audio3_PlaySound::
ld [wSoundID], a
- cp $ff
+ cp SFX_STOP_ALL_MUSIC
jp z, .stopAllAudio
cp MAX_SFX_ID_3
jp z, .playSfx
--- a/constants/battle_constants.asm
+++ b/constants/battle_constants.asm
@@ -39,6 +39,10 @@
MAX_STAT_VALUE EQU 999
+; trainer dvs
+ATKDEFDV_TRAINER EQU $98
+SPDSPCDV_TRAINER EQU $88
+
; volatile statuses 1
const_def
const STORING_ENERGY ; 0 ; Bide
--- a/constants/input_constants.asm
+++ b/constants/input_constants.asm
@@ -8,6 +8,7 @@
const BIT_D_UP
const BIT_D_DOWN
+NO_INPUT EQU 0
A_BUTTON EQU 1 << BIT_A_BUTTON
B_BUTTON EQU 1 << BIT_B_BUTTON
SELECT EQU 1 << BIT_SELECT
--- a/constants/script_constants.asm
+++ b/constants/script_constants.asm
@@ -12,6 +12,19 @@
SLOTSBIRD EQU $1210
SLOTSMOUSE EQU $1614
+; in game trades
+ const_def
+ const TRADE_FOR_TERRY
+ const TRADE_FOR_MARCEL
+ const TRADE_FOR_CHIKUCHIKU
+ const TRADE_FOR_SAILOR
+ const TRADE_FOR_DUX
+ const TRADE_FOR_MARC
+ const TRADE_FOR_LOLA
+ const TRADE_FOR_DORIS
+ const TRADE_FOR_CRINKLES
+ const TRADE_FOR_SPOT
+
; in game trade dialog sets
const_def
const TRADE_DIALOGSET_CASUAL
@@ -30,3 +43,9 @@
const BIT_VOLCANOBADGE ; 6
const BIT_EARTHBADGE ; 7
NUM_BADGES EQU const_value
+
+; OaksAideScript results
+OAKS_AIDE_BAG_FULL EQU $00
+OAKS_AIDE_GOT_ITEM EQU $01
+OAKS_AIDE_NOT_ENOUGH_MONS EQU $80
+OAKS_AIDE_REFUSED EQU $ff
--- a/constants/sprite_data_constants.asm
+++ b/constants/sprite_data_constants.asm
@@ -11,6 +11,8 @@
const NPC_MOVEMENT_LEFT ; $80
const NPC_MOVEMENT_RIGHT ; $C0
+NPC_CHANGE_FACING EQU $E0
+
; player direction constants
const_def
const PLAYER_DIR_BIT_RIGHT ; 0
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -6104,8 +6104,8 @@
ld a, [wIsInBattle]
cp $2 ; is it a trainer battle?
; fixed DVs for trainer mon
- ld a, $98
- ld b, $88
+ ld a, ATKDEFDV_TRAINER
+ ld b, SPDSPCDV_TRAINER
jr z, .storeDVs
; random DVs for wild mon
call BattleRandom
--- a/engine/events/hidden_objects/pokecenter_pc.asm
+++ b/engine/events/hidden_objects/pokecenter_pc.asm
@@ -3,7 +3,7 @@
cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
tx_pre_jump PokemonCenterPCText
--- a/engine/events/oaks_aide.asm
+++ b/engine/events/oaks_aide.asm
@@ -25,22 +25,22 @@
jr nc, .bagFull
ld hl, OaksAideGotItemText
call PrintText
- ld a, $1
+ ld a, OAKS_AIDE_GOT_ITEM
jr .done
.bagFull
ld hl, OaksAideNoRoomText
call PrintText
- xor a
+ xor a ; OAKS_AIDE_BAG_FULL
jr .done
.notEnoughOwnedMons
ld hl, OaksAideUhOhText
call PrintText
- ld a, $80
+ ld a, OAKS_AIDE_NOT_ENOUGH_MONS
jr .done
.choseNo
ld hl, OaksAideComeBackText
call PrintText
- ld a, $ff
+ ld a, OAKS_AIDE_REFUSED
.done
ldh [hOaksAideResult], a
ret
--- a/engine/menus/main_menu.asm
+++ b/engine/menus/main_menu.asm
@@ -222,9 +222,9 @@
ld a, START_TRANSFER_INTERNAL_CLOCK
ldh [rSC], a
.skipStartingTransfer
- ld b, $7f
- ld c, $7f
- ld d, $ec
+ ld b, " "
+ ld c, " "
+ ld d, "▷"
ld a, [wLinkMenuSelectionSendBuffer]
and (B_BUTTON << 2) ; was B button pressed?
jr nz, .updateCursorPosition
@@ -670,7 +670,7 @@
ld e, a
ld d, 0
add hl, de
- ld [hl], $ec ; unfilled right arrow menu cursor
+ ld [hl], "▷"
ret
; table that indicates how the 3 text speed options affect frame delays
--- a/engine/overworld/auto_movement.asm
+++ b/engine/overworld/auto_movement.asm
@@ -128,21 +128,21 @@
ret
RLEList_ProfOakWalkToLab:
- db NPC_MOVEMENT_DOWN, $05
- db NPC_MOVEMENT_LEFT, $01
- db NPC_MOVEMENT_DOWN, $05
- db NPC_MOVEMENT_RIGHT, $03
- db NPC_MOVEMENT_UP, $01
- db $E0, $01 ; stand still
- db $FF
+ db NPC_MOVEMENT_DOWN, 5
+ db NPC_MOVEMENT_LEFT, 1
+ db NPC_MOVEMENT_DOWN, 5
+ db NPC_MOVEMENT_RIGHT, 3
+ db NPC_MOVEMENT_UP, 1
+ db NPC_CHANGE_FACING, 1
+ db -1 ; end
RLEList_PlayerWalkToLab:
- db D_UP, $02
- db D_RIGHT, $03
- db D_DOWN, $05
- db D_LEFT, $01
- db D_DOWN, $06
- db $FF
+ db D_UP, 2
+ db D_RIGHT, 3
+ db D_DOWN, 5
+ db D_LEFT, 1
+ db D_DOWN, 6
+ db -1 ; end
PalletMovementScript_Done:
ld a, [wSimulatedJoypadStatesIndex]
@@ -190,18 +190,18 @@
ret
RLEList_PewterMuseumPlayer:
- db 0, $01
- db D_UP, $03
- db D_LEFT, $0D
- db D_UP, $06
- db $FF
+ db NO_INPUT, 1
+ db D_UP, 3
+ db D_LEFT, 13
+ db D_UP, 6
+ db -1 ; end
RLEList_PewterMuseumGuy:
- db NPC_MOVEMENT_UP, $06
- db NPC_MOVEMENT_LEFT, $0D
- db NPC_MOVEMENT_UP, $03
- db NPC_MOVEMENT_LEFT, $01
- db $FF
+ db NPC_MOVEMENT_UP, 6
+ db NPC_MOVEMENT_LEFT, 13
+ db NPC_MOVEMENT_UP, 3
+ db NPC_MOVEMENT_LEFT, 1
+ db -1 ; end
PewterMovementScript_Done:
ld a, [wSimulatedJoypadStatesIndex]
@@ -249,22 +249,22 @@
ret
RLEList_PewterGymPlayer:
- db 0, $01
- db D_RIGHT, $02
- db D_DOWN, $05
- db D_LEFT, $0B
- db D_UP, $05
- db D_LEFT, $0F
- db $FF
+ db NO_INPUT, 1
+ db D_RIGHT, 2
+ db D_DOWN, 5
+ db D_LEFT, 11
+ db D_UP, 5
+ db D_LEFT, 15
+ db -1 ; end
RLEList_PewterGymGuy:
- db NPC_MOVEMENT_DOWN, $02
- db NPC_MOVEMENT_LEFT, $0F
- db NPC_MOVEMENT_UP, $05
- db NPC_MOVEMENT_LEFT, $0B
- db NPC_MOVEMENT_DOWN, $05
- db NPC_MOVEMENT_RIGHT, $03
- db $FF
+ db NPC_MOVEMENT_DOWN, 2
+ db NPC_MOVEMENT_LEFT, 15
+ db NPC_MOVEMENT_UP, 5
+ db NPC_MOVEMENT_LEFT, 11
+ db NPC_MOVEMENT_DOWN, 5
+ db NPC_MOVEMENT_RIGHT, 3
+ db -1 ; end
FreezeEnemyTrainerSprite::
ld a, [wCurMap]
@@ -275,7 +275,7 @@
ld b, a
.loop
ld a, [hli]
- cp $ff
+ cp -1
jr z, .notRival
cp b
ret z ; the rival leaves after battling, so don't freeze him
@@ -289,4 +289,4 @@
db OPP_SONY1
db OPP_SONY2
db OPP_SONY3
- db $ff
+ db -1 ; end
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -169,7 +169,7 @@
pop hl
ld de, wNPCMovementDirections
call LoadDEPlusA ; a = [wNPCMovementDirections + movement byte 1]
- cp $e0
+ cp NPC_CHANGE_FACING
jp z, ChangeFacingDirection
cp STAY
jr nz, .next
--- a/engine/pokemon/add_mon.asm
+++ b/engine/pokemon/add_mon.asm
@@ -75,8 +75,8 @@
push hl
ld a, [wMonDataLocation]
and $f
- ld a, $98 ; set enemy trainer mon IVs to fixed average values
- ld b, $88
+ ld a, ATKDEFDV_TRAINER ; set enemy trainer mon IVs to fixed average values
+ ld b, SPDSPCDV_TRAINER
jr nz, .next4
; If the mon is being added to the player's party, update the pokedex.
--- a/engine/slots/slot_machine.asm
+++ b/engine/slots/slot_machine.asm
@@ -1,6 +1,6 @@
PromptUserToPlaySlots:
call SaveScreenTilesToBuffer2
- ld a, BANK(DisplayTextIDInit)
+ ld a, BANK(DisplayTextIDInit) ; TRUE
ld [wAutoTextBoxDrawingControl], a
ld b, a
ld hl, DisplayTextIDInit
--- a/home/list_menu.asm
+++ b/home/list_menu.asm
@@ -504,7 +504,7 @@
cp c ; is it this item?
jr nz, .nextListEntry
dec hl
- ld a, $ec ; unfilled right arrow menu cursor to indicate an item being swapped
+ ld a, "▷"
ld [hli], a
.nextListEntry
ld bc, 2 * SCREEN_WIDTH ; 2 rows
--- a/home/pathfinding.asm
+++ b/home/pathfinding.asm
@@ -25,7 +25,7 @@
ld [hli], a
inc de
inc c
- cp $FF ; have we reached the end of the movement data?
+ cp -1 ; have we reached the end of the movement data?
jr nz, .loop
ld a, c
--- a/home/window.asm
+++ b/home/window.asm
@@ -201,7 +201,7 @@
ld l, a
ld a, [wMenuCursorLocation + 1]
ld h, a
- ld [hl], $ec ; outline of right arrow
+ ld [hl], "▷"
ld a, b
ret
@@ -272,7 +272,7 @@
jr AutoTextBoxDrawingCommon
DisableAutoTextBoxDrawing::
- ld a, $01
+ ld a, TRUE
AutoTextBoxDrawingCommon::
ld [wAutoTextBoxDrawingControl], a
--- a/macros/coords.asm
+++ b/macros/coords.asm
@@ -83,3 +83,8 @@
ld a, [(\2) * SCREEN_WIDTH + (\1) + wTileMap]
ENDC
ENDM
+
+dbmapcoord: MACRO
+; x, y
+ db \2, \1
+ENDM
--- a/macros/scripts/audio.asm
+++ b/macros/scripts/audio.asm
@@ -15,6 +15,8 @@
ENDC
ENDM
+ const_def $10
+
; arguments: length [0, 7], pitch change [-7, 7]
; length: length of time between pitch shifts
; sometimes used with a value >7 in which case the MSB is ignored
@@ -21,8 +23,9 @@
; pitch change: positive value means increase in pitch, negative value means decrease in pitch
; small magnitude means quick change, large magnitude means slow change
; in signed magnitude representation, so a value of 8 is the same as (negative) 0
+ const pitch_sweep_cmd ; $10
pitch_sweep: MACRO
- db $10
+ db pitch_sweep_cmd
IF \2 < 0
db (\1 << 4) | (%1000 | (\2 * -1))
ELSE
@@ -30,12 +33,17 @@
ENDC
ENDM
+ const_next $20
+
+ const sfx_note_cmd ; $20
+
; arguments: length [0, 15], volume [0, 15], fade [-7, 7], frequency
; fade: positive value means decrease in volume, negative value means increase in volume
; small magnitude means quick change, large magnitude means slow change
; in signed magnitude representation, so a value of 8 is the same as (negative) 0
+square_note_cmd EQU sfx_note_cmd ; $20
square_note: MACRO
- db $20 | \1
+ db square_note_cmd | \1
IF \3 < 0
db (\2 << 4) | (%1000 | (\3 * -1))
ELSE
@@ -48,8 +56,9 @@
; fade: positive value means decrease in volume, negative value means increase in volume
; small magnitude means quick change, large magnitude means slow change
; in signed magnitude representation, so a value of 8 is the same as (negative) 0
+noise_note_cmd EQU sfx_note_cmd ; $20
noise_note: MACRO
- db $20 | \1
+ db noise_note_cmd | \1
IF \3 < 0
db (\2 << 4) | (%1000 | (\3 * -1))
ELSE
@@ -63,9 +72,12 @@
db (\1 << 4) | (\2 - 1)
ENDM
+ const_next $b0
+
; arguments: instrument [1, 19], length [1, 16]
+ const drum_note_cmd ; $b0
drum_note: MACRO
- db $B0 | (\2 - 1)
+ db drum_note_cmd | (\2 - 1)
db \1
ENDM
@@ -77,17 +89,23 @@
db (\1 << 4) | (\2 - 1)
ENDM
+ const_next $c0
+
; arguments: length [1, 16]
+ const rest_cmd ; $c0
rest: MACRO
- db $C0 | (\1 - 1)
+ db rest_cmd | (\1 - 1)
ENDM
+ const_next $d0
+
; arguments: speed [0, 15], volume [0, 15], fade [-7, 7]
; fade: positive value means decrease in volume, negative value means increase in volume
; small magnitude means quick change, large magnitude means slow change
; in signed magnitude representation, so a value of 8 is the same as (negative) 0
+ const note_type_cmd ; $d0
note_type: MACRO
- db $D0 | \1
+ db note_type_cmd | \1
IF \3 < 0
db (\2 << 4) | (%1000 | (\3 * -1))
ELSE
@@ -96,40 +114,52 @@
ENDM
; arguments: speed [0, 15]
+drum_speed_cmd EQU note_type_cmd ; $d0
drum_speed: MACRO
- db $D0 | \1
+ db drum_speed_cmd | \1
ENDM
+ const_next $e0
+
; arguments: octave [1, 8]
+ const octave_cmd ; $e0
octave: MACRO
- db $E8 - \1
+ db octave_cmd | (8 - \1)
ENDM
+ const_next $e8
+
; when enabled, effective frequency used is incremented by 1
+ const toggle_perfect_pitch_cmd ; $e8
toggle_perfect_pitch: MACRO
- db $E8
+ db toggle_perfect_pitch_cmd
ENDM
+ const_skip ; $e9
+
; arguments: delay [0, 255], depth [0, 15], rate [0, 15]
; delay: time delay until vibrato effect begins
; depth: amplitude of vibrato wave
; rate: frequency of vibrato wave
+ const vibrato_cmd ; $ea
vibrato: MACRO
- db $EA
+ db vibrato_cmd
db \1
db (\2 << 4) | \3
ENDM
; arguments: length [1, 256], octave [1, 8], pitch
+ const pitch_slide_cmd ; $eb
pitch_slide: MACRO
- db $EB
+ db pitch_slide_cmd
db \1 - 1
db ((8 - \2) << 4) | \3
ENDM
; arguments: duty cycle [0, 3] (12.5%, 25%, 50%, 75%)
+ const duty_cycle_cmd ; $ec
duty_cycle: MACRO
- db $EC
+ db duty_cycle_cmd
db \1
ENDM
@@ -139,47 +169,65 @@
; ideally should be set to $100 or less to guarantee no overflow
; if larger than $100, large note speed or note length values might cause overflow
; stored in big endian
+ const tempo_cmd ; $ed
tempo: MACRO
- db $ED
+ db tempo_cmd
db HIGH(\1), LOW(\1)
ENDM
; arguments: left output enable mask, right output enable mask
+ const stereo_panning_cmd ; $ee
stereo_panning: MACRO
- db $EE
+ db stereo_panning_cmd
db (\1 << 4) | \2
ENDM
+ const unknownmusic0xef_cmd ; $ef
+unknownmusic0xef: MACRO
+ db unknownmusic0xef_cmd
+ db \1
+ENDM
+
; arguments: left master volume [0, 7], right master volume [0, 7]
+ const volume_cmd ; $f0
volume: MACRO
- db $F0
+ db volume_cmd
db (\1 << 4) | \2
ENDM
+ const_next $f8
+
; when enabled, the sfx data is interpreted as music data
+ const execute_music_cmd ; $f8
execute_music: MACRO
- db $F8
+ db execute_music_cmd
ENDM
+ const_next $fc
+
; arguments: duty cycle 1, duty cycle 2, duty cycle 3, duty cycle 4
+ const duty_cycle_pattern_cmd ; $fc
duty_cycle_pattern: MACRO
- db $FC
+ db duty_cycle_pattern_cmd
db \1 << 6 | \2 << 4 | \3 << 2 | \4
ENDM
; arguments: address
+ const sound_call_cmd ; $fd
sound_call: MACRO
- db $FD
+ db sound_call_cmd
dw \1
ENDM
; arguments: count, address
+ const sound_loop_cmd ; $fe
sound_loop: MACRO
- db $FE
+ db sound_loop_cmd
db \1
dw \2
ENDM
+ const sound_ret_cmd ; $ff
sound_ret: MACRO
- db $FF
+ db sound_ret_cmd
ENDM
--- a/macros/scripts/maps.asm
+++ b/macros/scripts/maps.asm
@@ -67,6 +67,14 @@
dw \3, \5, \4, \4
ENDM
+;\1 x position
+;\2 y position
+;\3 movement data
+map_coord_movement: MACRO
+ dbmapcoord \1, \2
+ dw \3
+ENDM
+
;\1 map name
;\2 map id
--- a/scripts/AgathasRoom.asm
+++ b/scripts/AgathasRoom.asm
@@ -87,11 +87,11 @@
ret
AgathaEntranceCoords:
- db $0A,$04
- db $0A,$05
- db $0B,$04
- db $0B,$05
- db $FF
+ dbmapcoord 4, 10
+ dbmapcoord 5, 10
+ dbmapcoord 4, 11
+ dbmapcoord 5, 11
+ db -1 ; end
AgathaScript3:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/BillsHouse.asm
+++ b/scripts/BillsHouse.asm
@@ -33,7 +33,7 @@
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
; make Bill walk around the player
MovementData_1e7a0:
@@ -42,7 +42,7 @@
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
BillsHouseScript2:
ld a, [wd730]
@@ -93,7 +93,7 @@
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
BillsHouseScript4:
ld a, [wd730]
--- a/scripts/BluesHouse.asm
+++ b/scripts/BluesHouse.asm
@@ -10,9 +10,7 @@
BluesHouseScript0:
SetEvent EVENT_ENTERED_BLUES_HOUSE
-
- ; trigger the next script
- ld a, 1
+ ld a, $1
ld [wBluesHouseCurScript], a
ret
@@ -20,40 +18,40 @@
ret
BluesHouse_TextPointers:
- dw BluesHouseText1
- dw BluesHouseText2
- dw BluesHouseText3
+ dw BluesHouseDaisySittingText
+ dw BluesHouseDaisyWalkingText
+ dw BluesHouseTownMapText
-BluesHouseText1:
+BluesHouseDaisySittingText:
text_asm
CheckEvent EVENT_GOT_TOWN_MAP
- jr nz, .GotMap
+ jr nz, .got_town_map
CheckEvent EVENT_GOT_POKEDEX
- jr nz, .GiveMap
+ jr nz, .give_town_map
ld hl, DaisyInitialText
call PrintText
jr .done
-.GiveMap
+.give_town_map
ld hl, DaisyOfferMapText
call PrintText
lb bc, TOWN_MAP, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld a, HS_TOWN_MAP
ld [wMissableObjectIndex], a
- predef HideObject ; hide table map object
+ predef HideObject
ld hl, GotMapText
call PrintText
SetEvent EVENT_GOT_TOWN_MAP
jr .done
-.GotMap
+.got_town_map
ld hl, DaisyUseMapText
call PrintText
jr .done
-.BagFull
+.bag_full
ld hl, DaisyBagFullText
call PrintText
.done
@@ -80,10 +78,10 @@
text_far _DaisyUseMapText
text_end
-BluesHouseText2: ; Daisy, walking around
- text_far _BluesHouseText2
+BluesHouseDaisyWalkingText:
+ text_far _BluesHouseDaisyWalkingText
text_end
-BluesHouseText3: ; map on table
- text_far _BluesHouseText3
+BluesHouseTownMapText:
+ text_far _BluesHouseTownMapText
text_end
--- a/scripts/BrunosRoom.asm
+++ b/scripts/BrunosRoom.asm
@@ -87,11 +87,11 @@
ret
BrunoEntranceCoords:
- db $0A,$04
- db $0A,$05
- db $0B,$04
- db $0B,$05
- db $FF
+ dbmapcoord 4, 10
+ dbmapcoord 5, 10
+ dbmapcoord 4, 11
+ dbmapcoord 5, 11
+ db -1 ; end
BrunoScript3:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/CeladonDiner.asm
+++ b/scripts/CeladonDiner.asm
@@ -28,24 +28,24 @@
CeladonDinerText5:
text_asm
CheckEvent EVENT_GOT_COIN_CASE
- jr nz, .asm_eb14d
+ jr nz, .got_item
ld hl, CeladonDinerText_491a7
call PrintText
lb bc, COIN_CASE, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_COIN_CASE
ld hl, ReceivedCoinCaseText
call PrintText
- jr .asm_68b61
-.BagFull
+ jr .done
+.bag_full
ld hl, CoinCaseNoRoomText
call PrintText
- jr .asm_68b61
-.asm_eb14d
+ jr .done
+.got_item
ld hl, CeladonDinerText_491b7
call PrintText
-.asm_68b61
+.done
jp TextScriptEnd
CeladonDinerText_491a7:
--- a/scripts/CeladonMansion1F.asm
+++ b/scripts/CeladonMansion1F.asm
@@ -8,7 +8,7 @@
dw CeladonMansion1Text4
dw CeladonMansion1Text5
-CeladonMansion1_486a1:
+CeladonMansion1_PlayCryScript:
call PlayCry
jp TextScriptEnd
@@ -16,7 +16,7 @@
text_far _CeladonMansion1Text1
text_asm
ld a, MEOWTH
- jp CeladonMansion1_486a1
+ jp CeladonMansion1_PlayCryScript
CeladonMansion1Text2:
text_far _CeladonMansion1Text2
@@ -26,13 +26,13 @@
text_far _CeladonMansion1Text3
text_asm
ld a, CLEFAIRY
- jp CeladonMansion1_486a1
+ jp CeladonMansion1_PlayCryScript
CeladonMansion1Text4:
text_far _CeladonMansion1Text4
text_asm
ld a, NIDORAN_F
- jp CeladonMansion1_486a1
+ jp CeladonMansion1_PlayCryScript
CeladonMansion1Text5:
text_far _CeladonMansion1Text5
--- a/scripts/CeladonMansion3F.asm
+++ b/scripts/CeladonMansion3F.asm
@@ -25,32 +25,30 @@
DirectorText:
text_asm
-
- ; check pokédex
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
ld a, [wNumSetBits]
- cp 150
- jr nc, .CompletedDex
- ld hl, .GameDesigner
+ cp NUM_POKEMON - 1 ; discount Mew
+ jr nc, .completed_dex
+ ld hl, .GameDesignerText
jr .done
-.CompletedDex
+.completed_dex
ld hl, .CompletedDexText
.done
call PrintText
jp TextScriptEnd
-.GameDesigner
+.GameDesignerText:
text_far _GameDesignerText
text_end
-.CompletedDexText
+.CompletedDexText:
text_far _CompletedDexText
text_promptbutton
text_asm
callfar DisplayDiploma
- ld a, $1
+ ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
jp TextScriptEnd
--- a/scripts/CeladonMansionRoofHouse.asm
+++ b/scripts/CeladonMansionRoofHouse.asm
@@ -13,9 +13,9 @@
text_asm
lb bc, EEVEE, 25
call GivePokemon
- jr nc, .asm_24365
+ jr nc, .party_full
ld a, HS_CELADON_MANSION_EEVEE_GIFT
ld [wMissableObjectIndex], a
predef HideObject
-.asm_24365
+.party_full
jp TextScriptEnd
--- a/scripts/CeladonMart3F.asm
+++ b/scripts/CeladonMart3F.asm
@@ -23,21 +23,21 @@
CeladonMart3Text1:
text_asm
CheckEvent EVENT_GOT_TM18
- jr nz, .asm_a5463
+ jr nz, .got_item
ld hl, TM18PreReceiveText
call PrintText
lb bc, TM_COUNTER, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_TM18
ld hl, ReceivedTM18Text
- jr .asm_81359
-.BagFull
+ jr .done
+.bag_full
ld hl, TM18NoRoomText
- jr .asm_81359
-.asm_a5463
+ jr .done
+.got_item
ld hl, TM18ExplanationText
-.asm_81359
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/CeladonMartElevator.asm
+++ b/scripts/CeladonMartElevator.asm
@@ -40,23 +40,22 @@
jp CopyData
CeladonMartElevatorFloors:
- db 5 ; number of elements in list
+ db 5 ; #
db FLOOR_1F
db FLOOR_2F
db FLOOR_3F
db FLOOR_4F
db FLOOR_5F
- db $FF
+ db -1 ; end
-CeladonMartElevatorWarpMaps:
-; first byte is warp number
-; second byte is map number
; These specify where the player goes after getting out of the elevator.
- db $05, CELADON_MART_1F
- db $02, CELADON_MART_2F
- db $02, CELADON_MART_3F
- db $02, CELADON_MART_4F
- db $02, CELADON_MART_5F
+CeladonMartElevatorWarpMaps:
+ ; warp number, map id
+ db 5, CELADON_MART_1F
+ db 2, CELADON_MART_2F
+ db 2, CELADON_MART_3F
+ db 2, CELADON_MART_4F
+ db 2, CELADON_MART_5F
CeladonMartElevatorWarpMapsEnd:
CeladonMartElevatorScript_48654:
--- a/scripts/CeladonMartRoof.asm
+++ b/scripts/CeladonMartRoof.asm
@@ -38,7 +38,7 @@
db FRESH_WATER
db SODA_POP
db LEMONADE
- db $00
+ db 0 ; end
CeladonMartRoofScript_GiveDrinkToGirl:
ld hl, wd730
--- a/scripts/CeruleanBadgeHouse.asm
+++ b/scripts/CeruleanBadgeHouse.asm
@@ -1,5 +1,5 @@
CeruleanBadgeHouse_Script:
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
dec a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -34,7 +34,7 @@
jr c, .asm_74e60
ld hl, TextPointers_74e86
ld a, [wcf91]
- sub $15
+ sub BOULDERBADGE
add a
ld d, $0
ld e, a
@@ -52,7 +52,16 @@
jp TextScriptEnd
BadgeItemList:
- db $8,BOULDERBADGE,CASCADEBADGE,THUNDERBADGE,RAINBOWBADGE,SOULBADGE,MARSHBADGE,VOLCANOBADGE,EARTHBADGE,$FF
+ db 8 ; #
+ db BOULDERBADGE
+ db CASCADEBADGE
+ db THUNDERBADGE
+ db RAINBOWBADGE
+ db SOULBADGE
+ db MARSHBADGE
+ db VOLCANOBADGE
+ db EARTHBADGE
+ db -1 ; end
CeruleanHouse2Text_74e77:
text_far _CeruleanHouse2Text_74e77
--- a/scripts/CeruleanCity.asm
+++ b/scripts/CeruleanCity.asm
@@ -101,20 +101,20 @@
ret
CeruleanCityCoords1:
- db $07,$1e
- db $09,$1e
- db $ff
+ dbmapcoord 30, 7
+ dbmapcoord 30, 9
+ db -1 ; end
CeruleanCityCoords2:
- db $06,$14
- db $06,$15
- db $ff
+ dbmapcoord 20, 6
+ dbmapcoord 21, 6
+ db -1 ; end
CeruleanCityMovement1:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
CeruleanCityScript_1955d:
ld a, 1
@@ -205,7 +205,7 @@
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
CeruleanCityMovement4:
db NPC_MOVEMENT_RIGHT
@@ -215,7 +215,7 @@
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
CeruleanCityScript3:
ld a, [wd730]
--- a/scripts/CeruleanTradeHouse.asm
+++ b/scripts/CeruleanTradeHouse.asm
@@ -11,7 +11,7 @@
CeruleanHouse1Text2:
text_asm
- ld a, $6
+ ld a, TRADE_FOR_LOLA
ld [wWhichTrade], a
predef DoInGameTradeDialogue
jp TextScriptEnd
--- a/scripts/CeruleanTrashedHouse.asm
+++ b/scripts/CeruleanTrashedHouse.asm
@@ -9,17 +9,17 @@
CeruleanHouseTrashedText1:
text_asm
- ld b, $e4
+ ld b, TM_DIG
predef GetQuantityOfItemInBag
and b
- jr z, .asm_f8734
+ jr z, .no_dig_tm
ld hl, CeruleanHouseTrashedText_1d6b0
call PrintText
- jr .asm_8dfe9
-.asm_f8734
+ jr .done
+.no_dig_tm
ld hl, CeruleanHouseTrashedText_1d6ab
call PrintText
-.asm_8dfe9
+.done
jp TextScriptEnd
CeruleanHouseTrashedText_1d6ab:
--- a/scripts/ChampionsRoom.asm
+++ b/scripts/ChampionsRoom.asm
@@ -40,10 +40,10 @@
ret
GaryEntrance_RLEMovement:
- db D_UP,1
- db D_RIGHT,1
- db D_UP,3
- db $ff
+ db D_UP, 1
+ db D_RIGHT, 1
+ db D_UP, 3
+ db -1 ; end
GaryScript2:
ld a, [wSimulatedJoypadStatesIndex]
@@ -132,7 +132,7 @@
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
GaryScript5:
ld a, [wd730]
@@ -190,7 +190,7 @@
OakExitGaryRoomMovement:
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
GaryScript8:
ld a, [wd730]
@@ -217,9 +217,9 @@
ret
WalkToHallOfFame_RLEMovment:
- db D_UP,4
- db D_LEFT,1
- db $ff
+ db D_UP, 4
+ db D_LEFT, 1
+ db -1 ; end
GaryScript10:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/CinnabarGym.asm
+++ b/scripts/CinnabarGym.asm
@@ -71,11 +71,11 @@
MovementData_757d7:
db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
MovementData_757da:
db NPC_MOVEMENT_LEFT
- db $FF
+ db -1 ; end
CinnabarGymScript1:
ld a, [wd730]
--- a/scripts/CinnabarLabFossilRoom.asm
+++ b/scripts/CinnabarLabFossilRoom.asm
@@ -44,7 +44,7 @@
db DOME_FOSSIL
db HELIX_FOSSIL
db OLD_AMBER
- db $00
+ db 0 ; end
Lab4Text1:
text_asm
@@ -100,7 +100,7 @@
Lab4Text2:
text_asm
- ld a, $3
+ ld a, TRADE_FOR_SAILOR
ld [wWhichTrade], a
predef DoInGameTradeDialogue
jp TextScriptEnd
--- a/scripts/CinnabarLabMetronomeRoom.asm
+++ b/scripts/CinnabarLabMetronomeRoom.asm
@@ -11,24 +11,24 @@
Lab3Text1:
text_asm
CheckEvent EVENT_GOT_TM35
- jr nz, .asm_e551a
+ jr nz, .got_item
ld hl, TM35PreReceiveText
call PrintText
lb bc, TM_METRONOME, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM35Text
call PrintText
SetEvent EVENT_GOT_TM35
- jr .asm_eb896
-.BagFull
+ jr .done
+.bag_full
ld hl, TM35NoRoomText
call PrintText
- jr .asm_eb896
-.asm_e551a
+ jr .done
+.got_item
ld hl, TM35ExplanationText
call PrintText
-.asm_eb896
+.done
jp TextScriptEnd
TM35PreReceiveText:
--- a/scripts/CinnabarLabTradeRoom.asm
+++ b/scripts/CinnabarLabTradeRoom.asm
@@ -12,13 +12,13 @@
Lab2Text2:
text_asm
- ld a, $7
+ ld a, TRADE_FOR_DORIS
ld [wWhichTrade], a
jr Lab2DoTrade
Lab2Text3:
text_asm
- ld a, $8
+ ld a, TRADE_FOR_CRINKLES
ld [wWhichTrade], a
Lab2DoTrade:
predef DoInGameTradeDialogue
--- a/scripts/CopycatsHouse2F.asm
+++ b/scripts/CopycatsHouse2F.asm
@@ -13,19 +13,19 @@
CopycatsHouse2FText1:
text_asm
CheckEvent EVENT_GOT_TM31
- jr nz, .asm_7ccf3
- ld a, $1
+ jr nz, .got_item
+ ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CopycatsHouse2FText_5ccd4
call PrintText
ld b, POKE_DOLL
call IsItemInBag
- jr z, .asm_62ecd
+ jr z, .done
ld hl, TM31PreReceiveText
call PrintText
lb bc, TM_MIMIC, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM31Text
call PrintText
ld a, POKE_DOLL
@@ -32,15 +32,15 @@
ldh [hItemToRemoveID], a
farcall RemoveItemByID
SetEvent EVENT_GOT_TM31
- jr .asm_62ecd
-.BagFull
+ jr .done
+.bag_full
ld hl, TM31NoRoomText
call PrintText
- jr .asm_62ecd
-.asm_7ccf3
+ jr .done
+.got_item
ld hl, TM31ExplanationText2
call PrintText
-.asm_62ecd
+.done
jp TextScriptEnd
CopycatsHouse2FText_5ccd4:
--- a/scripts/DiglettsCave.asm
+++ b/scripts/DiglettsCave.asm
@@ -2,4 +2,5 @@
jp EnableAutoTextBoxDrawing
DiglettsCave_TextPointers:
- text_end
+
+ text_end ; unused
--- a/scripts/FuchsiaGoodRodHouse.asm
+++ b/scripts/FuchsiaGoodRodHouse.asm
@@ -7,39 +7,30 @@
FuchsiaHouse3Text1:
text_asm
ld a, [wd728]
- bit 4, a
- jr nz, .after
-
+ bit 4, a ; got good rod?
+ jr nz, .got_item
ld hl, FuchsiaHouse3Text_561bd
call PrintText
-
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
jr nz, .refused
-
lb bc, GOOD_ROD, 1
call GiveItem
- jr nc, .full
-
+ jr nc, .bag_full
ld hl, wd728
- set 4, [hl]
-
+ set 4, [hl] ; got good rod
ld hl, FuchsiaHouse3Text_561c2
- jr .talk
-
-.full
+ jr .done
+.bag_full
ld hl, FuchsiaHouse3Text_5621c
- jr .talk
-
+ jr .done
.refused
ld hl, FuchsiaHouse3Text_56212
- jr .talk
-
-.after
+ jr .done
+.got_item
ld hl, FuchsiaHouse3Text_56217
-
-.talk
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/GameCorner.asm
+++ b/scripts/GameCorner.asm
@@ -90,7 +90,7 @@
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
MovementData_48c63:
db NPC_MOVEMENT_RIGHT
@@ -98,7 +98,7 @@
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
CeladonGameCornerScript2:
ld a, [wd730]
--- a/scripts/HallOfFame.asm
+++ b/scripts/HallOfFame.asm
@@ -69,8 +69,8 @@
ret
RLEMovement5a528:
- db D_UP,$5
- db $ff
+ db D_UP, 5
+ db -1 ; end
HallofFameRoomScript1:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/LancesRoom.asm
+++ b/scripts/LancesRoom.asm
@@ -78,12 +78,12 @@
jp LanceShowOrHideEntranceBlocks
LanceTriggerMovementCoords:
- db $01,$05
- db $02,$06
- db $0B,$05
- db $0B,$06
- db $10,$18
- db $FF
+ dbmapcoord 5, 1
+ dbmapcoord 6, 2
+ dbmapcoord 5, 11
+ dbmapcoord 6, 11
+ dbmapcoord 24, 16
+ db -1 ; end
LanceScript2:
call EndTrainerBattle
@@ -110,11 +110,11 @@
ret
WalkToLance_RLEList:
- db D_UP, $0C
- db D_LEFT, $0C
- db D_DOWN, $07
- db D_LEFT, $06
- db $FF
+ db D_UP, 12
+ db D_LEFT, 12
+ db D_DOWN, 7
+ db D_LEFT, 6
+ db -1 ; end
LanceScript3:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/LavenderCuboneHouse.asm
+++ b/scripts/LavenderCuboneHouse.asm
@@ -16,14 +16,14 @@
LavenderHouse2Text2:
text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
- jr nz, .asm_65711
+ jr nz, .rescued_mr_fuji
ld hl, LavenderHouse2Text_1d9dc
call PrintText
- jr .asm_64be1
-.asm_65711
+ jr .done
+.rescued_mr_fuji
ld hl, LavenderHouse2Text_1d9e1
call PrintText
-.asm_64be1
+.done
jp TextScriptEnd
LavenderHouse2Text_1d9dc:
--- a/scripts/LavenderTown.asm
+++ b/scripts/LavenderTown.asm
@@ -20,9 +20,9 @@
ld a, [wCurrentMenuItem]
and a
ld hl, LavenderTownText_44146
- jr nz, .asm_40831
+ jr nz, .got_text
ld hl, LavenderTownText_44141
-.asm_40831
+.got_text
call PrintText
jp TextScriptEnd
--- a/scripts/LoreleisRoom.asm
+++ b/scripts/LoreleisRoom.asm
@@ -89,11 +89,11 @@
ret
LoreleiEntranceCoords:
- db $0A,$04
- db $0A,$05
- db $0B,$04
- db $0B,$05
- db $FF
+ dbmapcoord 4, 10
+ dbmapcoord 5, 10
+ dbmapcoord 4, 11
+ dbmapcoord 5, 11
+ db -1 ; end
LoreleiScript3:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/MrFujisHouse.asm
+++ b/scripts/MrFujisHouse.asm
@@ -13,14 +13,14 @@
LavenderHouse1Text1:
text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
- jr nz, .asm_72e5d
+ jr nz, .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8d1
call PrintText
- jr .asm_6957f
-.asm_72e5d
+ jr .done
+.rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8d6
call PrintText
-.asm_6957f
+.done
jp TextScriptEnd
LavenderHouse1Text_1d8d1:
@@ -34,14 +34,14 @@
LavenderHouse1Text2:
text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
- jr nz, .asm_06470
+ jr nz, .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8f4
call PrintText
- jr .asm_3d208
-.asm_06470
+ jr .done
+.rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8f9
call PrintText
-.asm_3d208
+.done
jp TextScriptEnd
LavenderHouse1Text_1d8f4:
@@ -69,24 +69,24 @@
LavenderHouse1Text5:
text_asm
CheckEvent EVENT_GOT_POKE_FLUTE
- jr nz, .asm_15ac2
+ jr nz, .got_item
ld hl, LavenderHouse1Text_1d94c
call PrintText
lb bc, POKE_FLUTE, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedFluteText
call PrintText
SetEvent EVENT_GOT_POKE_FLUTE
- jr .asm_da749
-.BagFull
+ jr .done
+.bag_full
ld hl, FluteNoRoomText
call PrintText
- jr .asm_da749
-.asm_15ac2
+ jr .done
+.got_item
ld hl, MrFujiAfterFluteText
call PrintText
-.asm_da749
+.done
jp TextScriptEnd
LavenderHouse1Text_1d94c:
--- a/scripts/MrPsychicsHouse.asm
+++ b/scripts/MrPsychicsHouse.asm
@@ -7,24 +7,24 @@
SaffronHouse2Text1:
text_asm
CheckEvent EVENT_GOT_TM29
- jr nz, .asm_9e72b
+ jr nz, .got_item
ld hl, TM29PreReceiveText
call PrintText
lb bc, TM_PSYCHIC_M, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM29Text
call PrintText
SetEvent EVENT_GOT_TM29
- jr .asm_fe4e1
-.BagFull
+ jr .done
+.bag_full
ld hl, TM29NoRoomText
call PrintText
- jr .asm_fe4e1
-.asm_9e72b
+ jr .done
+.got_item
ld hl, TM29ExplanationText
call PrintText
-.asm_fe4e1
+.done
jp TextScriptEnd
TM29PreReceiveText:
--- a/scripts/MtMoonB2F.asm
+++ b/scripts/MtMoonB2F.asm
@@ -19,23 +19,23 @@
ret
CoordsData_49d37:
- db $05,$0B
- db $05,$0C
- db $05,$0D
- db $05,$0E
- db $06,$0B
- db $06,$0C
- db $06,$0D
- db $06,$0E
- db $07,$0B
- db $07,$0C
- db $07,$0D
- db $07,$0E
- db $08,$0B
- db $08,$0C
- db $08,$0D
- db $08,$0E
- db $FF
+ dbmapcoord 11, 5
+ dbmapcoord 12, 5
+ dbmapcoord 13, 5
+ dbmapcoord 14, 5
+ dbmapcoord 11, 6
+ dbmapcoord 12, 6
+ dbmapcoord 13, 6
+ dbmapcoord 14, 6
+ dbmapcoord 11, 7
+ dbmapcoord 12, 7
+ dbmapcoord 13, 7
+ dbmapcoord 14, 7
+ dbmapcoord 11, 8
+ dbmapcoord 12, 8
+ dbmapcoord 13, 8
+ dbmapcoord 14, 8
+ db -1 ; end
MtMoon3Script_49d58:
xor a
@@ -110,22 +110,22 @@
ret
CoordsData_49dea:
- db $07,$0C
- db $06,$0B
- db $05,$0C
- db $FF
+ dbmapcoord 12, 7
+ dbmapcoord 11, 6
+ dbmapcoord 12, 5
+ db -1 ; end
CoordsData_49df1:
- db $07,$0D
- db $06,$0E
- db $05,$0E
- db $FF
+ dbmapcoord 13, 7
+ dbmapcoord 14, 6
+ dbmapcoord 14, 5
+ db -1 ; end
MovementData_49df8:
db NPC_MOVEMENT_RIGHT
-
MovementData_49df9:
- db NPC_MOVEMENT_UP,$FF
+ db NPC_MOVEMENT_UP
+ db -1 ; end
MtMoon3Script5:
ld a, [wd730]
--- a/scripts/MtMoonPokecenter.asm
+++ b/scripts/MtMoonPokecenter.asm
@@ -11,7 +11,7 @@
dw MtMoonTradeNurseText
MtMoonHealNurseText:
- db $ff
+ script_pokecenter_nurse
MtMoonPokecenterText2:
text_far _MtMoonPokecenterText1
--- a/scripts/Museum1F.asm
+++ b/scripts/Museum1F.asm
@@ -1,5 +1,5 @@
Museum1F_Script:
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -188,24 +188,24 @@
Museum1FText3:
text_asm
CheckEvent EVENT_GOT_OLD_AMBER
- jr nz, .asm_5c285
+ jr nz, .got_item
ld hl, Museum1FText_5c28e
call PrintText
lb bc, OLD_AMBER, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_OLD_AMBER
ld a, HS_OLD_AMBER
ld [wMissableObjectIndex], a
predef HideObject
ld hl, ReceivedOldAmberText
- jr .asm_5c288
-.BagFull
+ jr .done
+.bag_full
ld hl, Museum1FText_5c29e
- jr .asm_5c288
-.asm_5c285
+ jr .done
+.got_item
ld hl, Museum1FText_5c299
-.asm_5c288
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/OaksLab.asm
+++ b/scripts/OaksLab.asm
@@ -1,7 +1,7 @@
OaksLab_Script:
CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2
call nz, OaksLabScript_1d076
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -60,7 +60,7 @@
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
OaksLabScript2:
ld a, [wd730]
@@ -101,8 +101,8 @@
ret
PlayerEntryMovementRLE:
- db D_UP,$8
- db $ff
+ db D_UP, 8
+ db -1 ; end
OaksLabScript4:
ld a, [wSimulatedJoypadStatesIndex]
@@ -212,7 +212,7 @@
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
.MiddleBallMovement2
db NPC_MOVEMENT_DOWN
@@ -219,7 +219,7 @@
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
.Squirtle
ld de, .RightBallMovement1
@@ -237,7 +237,7 @@
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
.RightBallMovement2
db NPC_MOVEMENT_DOWN
@@ -245,7 +245,7 @@
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
.Bulbasaur
ld de, .LeftBallMovement1
@@ -274,10 +274,10 @@
.LeftBallMovement1
db NPC_MOVEMENT_DOWN
- db NPC_MOVEMENT_RIGHT ; not yet terminated!
+ db NPC_MOVEMENT_RIGHT
.LeftBallMovement2
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
.moveBlue
ld a, $1
@@ -462,13 +462,13 @@
ret
.RivalExitMovement
- db $E0 ; change sprite facing direction
+ db NPC_CHANGE_FACING
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
OaksLabScript14:
ld a, [wd730]
--- a/scripts/PewterCity.asm
+++ b/scripts/PewterCity.asm
@@ -37,11 +37,11 @@
jp DisplayTextID
CoordsData_19277:
- db $11,$23
- db $11,$24
- db $12,$25
- db $13,$25
- db $ff
+ dbmapcoord 35, 17
+ dbmapcoord 36, 17
+ dbmapcoord 37, 18
+ dbmapcoord 37, 19
+ db -1 ; end
PewterCityScript1:
ld a, [wNPCMovementScriptPointerTableNum]
@@ -85,7 +85,7 @@
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
PewterCityScript2:
ld a, [wd730]
@@ -154,7 +154,7 @@
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
PewterCityScript5:
ld a, [wd730]
--- a/scripts/PewterMart.asm
+++ b/scripts/PewterMart.asm
@@ -1,6 +1,6 @@
PewterMart_Script:
call EnableAutoTextBoxDrawing
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
ret
--- a/scripts/PewterPokecenter.asm
+++ b/scripts/PewterPokecenter.asm
@@ -17,14 +17,16 @@
PewterJigglypuffText:
text_asm
- ld a, $1
+ ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, .Text
+ ld hl, .JigglypuffText
call PrintText
+
ld a, SFX_STOP_ALL_MUSIC
call PlaySound
ld c, 32
call DelayFrames
+
ld hl, JigglypuffFacingDirections
ld de, wJigglypuffFacingDirections
ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
@@ -37,15 +39,16 @@
inc hl
jr nz, .findMatchingFacingDirectionLoop
dec hl
+
push hl
ld c, BANK(Music_JigglypuffSong)
ld a, MUSIC_JIGGLYPUFF_SONG
call PlayMusic
pop hl
-.loop
+
+.spinMovementLoop
ld a, [hl]
ld [wSprite03StateData1ImageIndex], a
-
; rotate the array
push hl
ld hl, wJigglypuffFacingDirections
@@ -55,15 +58,13 @@
ld a, [wJigglypuffFacingDirections - 1]
ld [wJigglypuffFacingDirections + 3], a
pop hl
-
ld c, 24
call DelayFrames
-
ld a, [wChannelSoundIDs]
ld b, a
ld a, [wChannelSoundIDs + Ch2]
or b
- jr nz, .loop
+ jr nz, .spinMovementLoop
ld c, 48
call DelayFrames
@@ -70,7 +71,7 @@
call PlayDefaultMusic
jp TextScriptEnd
-.Text
+.JigglypuffText:
text_far _PewterJigglypuffText
text_end
--- a/scripts/PokemonFanClub.asm
+++ b/scripts/PokemonFanClub.asm
@@ -115,12 +115,12 @@
call PrintText
lb bc, BIKE_VOUCHER, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, .receivedvouchertext
call PrintText
SetEvent EVENT_GOT_BIKE_VOUCHER
jr .done
-.BagFull
+.bag_full
ld hl, .bagfulltext
call PrintText
jr .done
--- a/scripts/PokemonMansion3F.asm
+++ b/scripts/PokemonMansion3F.asm
@@ -51,10 +51,10 @@
ret
CoordsData_52254:
- db $0E,$10
- db $0E,$11
- db $0E,$13
- db $FF
+ dbmapcoord 16, 14
+ dbmapcoord 17, 14
+ dbmapcoord 19, 14
+ db -1 ; end
Mansion3Script_5225b:
xor a
--- a/scripts/PokemonTower2F.asm
+++ b/scripts/PokemonTower2F.asm
@@ -58,9 +58,9 @@
ret
CoordsData_6055e:
- db $05,$0F
- db $06,$0E
- db $0F ; isn't this supposed to end in $ff?
+ dbmapcoord 15, 5
+ dbmapcoord 14, 6
+ db $0F ; end? (should be $ff?)
PokemonTower2Script1:
ld a, [wIsInBattle]
@@ -98,7 +98,7 @@
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
MovementData_605b2:
db NPC_MOVEMENT_DOWN
@@ -109,7 +109,7 @@
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
PokemonTower2Script2:
ld a, [wd730]
--- a/scripts/PokemonTower5F.asm
+++ b/scripts/PokemonTower5F.asm
@@ -42,11 +42,11 @@
ret
CoordsData_60992:
- db $08,$0A
- db $08,$0B
- db $09,$0A
- db $09,$0B
- db $FF
+ dbmapcoord 10, 8
+ dbmapcoord 11, 8
+ dbmapcoord 10, 9
+ dbmapcoord 11, 9
+ db -1 ; end
PokemonTower5F_TextPointers:
dw PokemonTower5Text1
--- a/scripts/PokemonTower6F.asm
+++ b/scripts/PokemonTower6F.asm
@@ -42,7 +42,8 @@
ret
CoordsData_60b45:
- db $10,$0A,$FF
+ dbmapcoord 10, 16
+ db -1 ; end
PokemonTower6Script4:
ld a, [wIsInBattle]
--- a/scripts/PokemonTower7F.asm
+++ b/scripts/PokemonTower7F.asm
@@ -117,30 +117,18 @@
jr .asm_60dcb
CoordsData_60de3:
- db $0C,$09
- dw MovementData_60e13
- db $0B,$0A
- dw MovementData_60e1b
- db $0B,$0B
- dw MovementData_60e22
- db $0B,$0C
- dw MovementData_60e22
- db $0A,$0C
- dw MovementData_60e28
- db $09,$0B
- dw MovementData_60e30
- db $09,$0A
- dw MovementData_60e22
- db $09,$09
- dw MovementData_60e22
- db $08,$09
- dw MovementData_60e37
- db $07,$0A
- dw MovementData_60e22
- db $07,$0B
- dw MovementData_60e22
- db $07,$0C
- dw MovementData_60e22
+ map_coord_movement 9, 12, MovementData_60e13
+ map_coord_movement 10, 11, MovementData_60e1b
+ map_coord_movement 11, 11, MovementData_60e22
+ map_coord_movement 12, 11, MovementData_60e22
+ map_coord_movement 12, 10, MovementData_60e28
+ map_coord_movement 11, 9, MovementData_60e30
+ map_coord_movement 10, 9, MovementData_60e22
+ map_coord_movement 9, 9, MovementData_60e22
+ map_coord_movement 9, 8, MovementData_60e37
+ map_coord_movement 10, 7, MovementData_60e22
+ map_coord_movement 11, 7, MovementData_60e22
+ map_coord_movement 12, 7, MovementData_60e22
MovementData_60e13:
db NPC_MOVEMENT_RIGHT
@@ -150,7 +138,7 @@
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_LEFT
- db $FF
+ db -1 ; end
MovementData_60e1b:
db NPC_MOVEMENT_DOWN
@@ -159,7 +147,7 @@
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
MovementData_60e22:
db NPC_MOVEMENT_DOWN
@@ -167,7 +155,7 @@
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
MovementData_60e28:
db NPC_MOVEMENT_LEFT
@@ -177,7 +165,7 @@
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
MovementData_60e30:
db NPC_MOVEMENT_DOWN
@@ -186,7 +174,7 @@
db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
MovementData_60e37:
db NPC_MOVEMENT_RIGHT
@@ -196,7 +184,7 @@
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
PokemonTower7F_TextPointers:
dw PokemonTower7Text1
--- a/scripts/RedsHouse1F.asm
+++ b/scripts/RedsHouse1F.asm
@@ -2,14 +2,14 @@
jp EnableAutoTextBoxDrawing
RedsHouse1F_TextPointers:
- dw RedsHouse1FText1
- dw RedsHouse1FText2
+ dw RedsHouse1FMomText
+ dw RedsHouse1FTVText
-RedsHouse1FText1: ; Mom
+RedsHouse1FMomText:
text_asm
ld a, [wd72e]
- bit 3, a
- jr nz, .heal ; if player has received a Pokémon from Oak, heal team
+ bit 3, a ; received a Pokémon from Oak?
+ jr nz, .heal
ld hl, MomWakeUpText
call PrintText
jr .done
@@ -49,14 +49,14 @@
text_far _MomHealText2
text_end
-RedsHouse1FText2: ; TV
+RedsHouse1FTVText:
text_asm
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ld hl, TVWrongSideText
- jr nz, .notUp
+ jr nz, .got_text
ld hl, StandByMeText
-.notUp
+.got_text
call PrintText
jp TextScriptEnd
--- a/scripts/RedsHouse2F.asm
+++ b/scripts/RedsHouse2F.asm
@@ -21,4 +21,5 @@
ret
RedsHouse2F_TextPointers:
- text_end
+
+ text_end ; unused
--- a/scripts/RockTunnelPokecenter.asm
+++ b/scripts/RockTunnelPokecenter.asm
@@ -9,7 +9,7 @@
dw RockTunnelTradeNurseText
RockTunnelHealNurseText:
- db $ff
+ script_pokecenter_nurse
RockTunnelPokecenterText2:
text_far _RockTunnelPokecenterText2
@@ -20,4 +20,4 @@
text_end
RockTunnelTradeNurseText:
- db $f6
+ script_cable_club_receptionist
--- a/scripts/RocketHideoutB2F.asm
+++ b/scripts/RocketHideoutB2F.asm
@@ -33,273 +33,227 @@
ld [wCurMapScript], a
ret
-;format:
-;db y,x
-;dw pointer to movement
RocketHideout2ArrowTilePlayerMovement:
- db $9,$4
- dw RocketHideout2ArrowMovement1
- db $b,$4
- dw RocketHideout2ArrowMovement2
- db $f,$4
- dw RocketHideout2ArrowMovement3
- db $10,$4
- dw RocketHideout2ArrowMovement4
- db $13,$4
- dw RocketHideout2ArrowMovement1
- db $16,$4
- dw RocketHideout2ArrowMovement5
- db $e,$5
- dw RocketHideout2ArrowMovement6
- db $16,$6
- dw RocketHideout2ArrowMovement7
- db $18,$6
- dw RocketHideout2ArrowMovement8
- db $9,$8
- dw RocketHideout2ArrowMovement9
- db $c,$8
- dw RocketHideout2ArrowMovement10
- db $f,$8
- dw RocketHideout2ArrowMovement8
- db $13,$8
- dw RocketHideout2ArrowMovement9
- db $17,$8
- dw RocketHideout2ArrowMovement11
- db $e,$9
- dw RocketHideout2ArrowMovement12
- db $16,$9
- dw RocketHideout2ArrowMovement12
- db $9,$a
- dw RocketHideout2ArrowMovement13
- db $a,$a
- dw RocketHideout2ArrowMovement14
- db $f,$a
- dw RocketHideout2ArrowMovement15
- db $11,$a
- dw RocketHideout2ArrowMovement16
- db $13,$a
- dw RocketHideout2ArrowMovement17
- db $19,$a
- dw RocketHideout2ArrowMovement2
- db $e,$b
- dw RocketHideout2ArrowMovement18
- db $10,$b
- dw RocketHideout2ArrowMovement19
- db $12,$b
- dw RocketHideout2ArrowMovement12
- db $9,$c
- dw RocketHideout2ArrowMovement20
- db $b,$c
- dw RocketHideout2ArrowMovement21
- db $d,$c
- dw RocketHideout2ArrowMovement22
- db $11,$c
- dw RocketHideout2ArrowMovement23
- db $a,$d
- dw RocketHideout2ArrowMovement24
- db $c,$d
- dw RocketHideout2ArrowMovement25
- db $10,$d
- dw RocketHideout2ArrowMovement26
- db $12,$d
- dw RocketHideout2ArrowMovement27
- db $13,$d
- dw RocketHideout2ArrowMovement28
- db $16,$d
- dw RocketHideout2ArrowMovement29
- db $17,$d
- dw RocketHideout2ArrowMovement30
- db $11,$e
- dw RocketHideout2ArrowMovement31
- db $10,$f
- dw RocketHideout2ArrowMovement12
- db $e,$10
- dw RocketHideout2ArrowMovement32
- db $10,$10
- dw RocketHideout2ArrowMovement33
- db $12,$10
- dw RocketHideout2ArrowMovement34
- db $a,$11
- dw RocketHideout2ArrowMovement35
- db $b,$11
- dw RocketHideout2ArrowMovement36
- db $FF
+ map_coord_movement 4, 9, RocketHideout2ArrowMovement1
+ map_coord_movement 4, 11, RocketHideout2ArrowMovement2
+ map_coord_movement 4, 15, RocketHideout2ArrowMovement3
+ map_coord_movement 4, 16, RocketHideout2ArrowMovement4
+ map_coord_movement 4, 19, RocketHideout2ArrowMovement1
+ map_coord_movement 4, 22, RocketHideout2ArrowMovement5
+ map_coord_movement 5, 14, RocketHideout2ArrowMovement6
+ map_coord_movement 6, 22, RocketHideout2ArrowMovement7
+ map_coord_movement 6, 24, RocketHideout2ArrowMovement8
+ map_coord_movement 8, 9, RocketHideout2ArrowMovement9
+ map_coord_movement 8, 12, RocketHideout2ArrowMovement10
+ map_coord_movement 8, 15, RocketHideout2ArrowMovement8
+ map_coord_movement 8, 19, RocketHideout2ArrowMovement9
+ map_coord_movement 8, 23, RocketHideout2ArrowMovement11
+ map_coord_movement 9, 14, RocketHideout2ArrowMovement12
+ map_coord_movement 9, 22, RocketHideout2ArrowMovement12
+ map_coord_movement 10, 9, RocketHideout2ArrowMovement13
+ map_coord_movement 10, 10, RocketHideout2ArrowMovement14
+ map_coord_movement 10, 15, RocketHideout2ArrowMovement15
+ map_coord_movement 10, 17, RocketHideout2ArrowMovement16
+ map_coord_movement 10, 19, RocketHideout2ArrowMovement17
+ map_coord_movement 10, 25, RocketHideout2ArrowMovement2
+ map_coord_movement 11, 14, RocketHideout2ArrowMovement18
+ map_coord_movement 11, 16, RocketHideout2ArrowMovement19
+ map_coord_movement 11, 18, RocketHideout2ArrowMovement12
+ map_coord_movement 12, 9, RocketHideout2ArrowMovement20
+ map_coord_movement 12, 11, RocketHideout2ArrowMovement21
+ map_coord_movement 12, 13, RocketHideout2ArrowMovement22
+ map_coord_movement 12, 17, RocketHideout2ArrowMovement23
+ map_coord_movement 13, 10, RocketHideout2ArrowMovement24
+ map_coord_movement 13, 12, RocketHideout2ArrowMovement25
+ map_coord_movement 13, 16, RocketHideout2ArrowMovement26
+ map_coord_movement 13, 18, RocketHideout2ArrowMovement27
+ map_coord_movement 13, 19, RocketHideout2ArrowMovement28
+ map_coord_movement 13, 22, RocketHideout2ArrowMovement29
+ map_coord_movement 13, 23, RocketHideout2ArrowMovement30
+ map_coord_movement 14, 17, RocketHideout2ArrowMovement31
+ map_coord_movement 15, 16, RocketHideout2ArrowMovement12
+ map_coord_movement 16, 14, RocketHideout2ArrowMovement32
+ map_coord_movement 16, 16, RocketHideout2ArrowMovement33
+ map_coord_movement 16, 18, RocketHideout2ArrowMovement34
+ map_coord_movement 17, 10, RocketHideout2ArrowMovement35
+ map_coord_movement 17, 11, RocketHideout2ArrowMovement36
+ db -1 ; end
;format: direction, count
;each list is read starting from the $FF and working backwards
RocketHideout2ArrowMovement1:
- db D_LEFT,$02
- db $FF
+ db D_LEFT, 2
+ db -1 ; end
RocketHideout2ArrowMovement2:
- db D_RIGHT,$04
- db $FF
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout2ArrowMovement3:
- db D_UP,$04
- db D_RIGHT,$04
- db $FF
+ db D_UP, 4
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout2ArrowMovement4:
- db D_UP,$04
- db D_RIGHT,$04
- db D_UP,$01
- db $FF
+ db D_UP, 4
+ db D_RIGHT, 4
+ db D_UP, 1
+ db -1 ; end
RocketHideout2ArrowMovement5:
- db D_LEFT,$02
- db D_UP,$03
- db $FF
+ db D_LEFT, 2
+ db D_UP, 3
+ db -1 ; end
RocketHideout2ArrowMovement6:
- db D_DOWN,$02
- db D_RIGHT,$04
- db $FF
+ db D_DOWN, 2
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout2ArrowMovement7:
- db D_UP,$02
- db $FF
+ db D_UP, 2
+ db -1 ; end
RocketHideout2ArrowMovement8:
- db D_UP,$04
- db $FF
+ db D_UP, 4
+ db -1 ; end
RocketHideout2ArrowMovement9:
- db D_LEFT,$06
- db $FF
+ db D_LEFT, 6
+ db -1 ; end
RocketHideout2ArrowMovement10:
- db D_UP,$01
- db $FF
+ db D_UP, 1
+ db -1 ; end
RocketHideout2ArrowMovement11:
- db D_LEFT,$06
- db D_UP,$04
- db $FF
+ db D_LEFT, 6
+ db D_UP, 4
+ db -1 ; end
RocketHideout2ArrowMovement12:
- db D_DOWN,$02
- db $FF
+ db D_DOWN, 2
+ db -1 ; end
RocketHideout2ArrowMovement13:
- db D_LEFT,$08
- db $FF
+ db D_LEFT, 8
+ db -1 ; end
RocketHideout2ArrowMovement14:
- db D_LEFT,$08
- db D_UP,$01
- db $FF
+ db D_LEFT, 8
+ db D_UP, 1
+ db -1 ; end
RocketHideout2ArrowMovement15:
- db D_LEFT,$08
- db D_UP,$06
- db $FF
+ db D_LEFT, 8
+ db D_UP, 6
+ db -1 ; end
RocketHideout2ArrowMovement16:
- db D_UP,$02
- db D_RIGHT,$04
- db $FF
+ db D_UP, 2
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout2ArrowMovement17:
- db D_UP,$02
- db D_RIGHT,$04
- db D_UP,$02
- db $FF
+ db D_UP, 2
+ db D_RIGHT, 4
+ db D_UP, 2
+ db -1 ; end
RocketHideout2ArrowMovement18:
- db D_DOWN,$02
- db D_RIGHT,$04
- db D_DOWN,$02
- db $FF
+ db D_DOWN, 2
+ db D_RIGHT, 4
+ db D_DOWN, 2
+ db -1 ; end
RocketHideout2ArrowMovement19:
- db D_DOWN,$02
- db D_RIGHT,$04
- db $FF
+ db D_DOWN, 2
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout2ArrowMovement20:
- db D_LEFT,$0A
- db $FF
+ db D_LEFT, 10
+ db -1 ; end
RocketHideout2ArrowMovement21:
- db D_LEFT,$0A
- db D_UP,$02
- db $FF
+ db D_LEFT, 10
+ db D_UP, 2
+ db -1 ; end
RocketHideout2ArrowMovement22:
- db D_LEFT,$0A
- db D_UP,$04
- db $FF
+ db D_LEFT, 10
+ db D_UP, 4
+ db -1 ; end
RocketHideout2ArrowMovement23:
- db D_UP,$02
- db D_RIGHT,$02
- db $FF
+ db D_UP, 2
+ db D_RIGHT, 2
+ db -1 ; end
RocketHideout2ArrowMovement24:
- db D_RIGHT,$01
- db D_DOWN,$02
- db $FF
+ db D_RIGHT, 1
+ db D_DOWN, 2
+ db -1 ; end
RocketHideout2ArrowMovement25:
- db D_RIGHT,$01
- db $FF
+ db D_RIGHT, 1
+ db -1 ; end
RocketHideout2ArrowMovement26:
- db D_DOWN,$02
- db D_RIGHT,$02
- db $FF
+ db D_DOWN, 2
+ db D_RIGHT, 2
+ db -1 ; end
RocketHideout2ArrowMovement27:
- db D_DOWN,$02
- db D_LEFT,$02
- db $FF
+ db D_DOWN, 2
+ db D_LEFT, 2
+ db -1 ; end
RocketHideout2ArrowMovement28:
- db D_UP,$02
- db D_RIGHT,$04
- db D_UP,$02
- db D_LEFT,$03
- db $FF
+ db D_UP, 2
+ db D_RIGHT, 4
+ db D_UP, 2
+ db D_LEFT, 3
+ db -1 ; end
RocketHideout2ArrowMovement29:
- db D_DOWN,$02
- db D_LEFT,$04
- db $FF
+ db D_DOWN, 2
+ db D_LEFT, 4
+ db -1 ; end
RocketHideout2ArrowMovement30:
- db D_LEFT,$06
- db D_UP,$04
- db D_LEFT,$05
- db $FF
+ db D_LEFT, 6
+ db D_UP, 4
+ db D_LEFT, 5
+ db -1 ; end
RocketHideout2ArrowMovement31:
- db D_UP,$02
- db $FF
+ db D_UP, 2
+ db -1 ; end
RocketHideout2ArrowMovement32:
- db D_UP,$01
- db $FF
+ db D_UP, 1
+ db -1 ; end
RocketHideout2ArrowMovement33:
- db D_UP,$03
- db $FF
+ db D_UP, 3
+ db -1 ; end
RocketHideout2ArrowMovement34:
- db D_UP,$05
- db $FF
+ db D_UP, 5
+ db -1 ; end
RocketHideout2ArrowMovement35:
- db D_RIGHT,$01
- db D_DOWN,$02
- db D_LEFT,$04
- db $FF
+ db D_RIGHT, 1
+ db D_DOWN, 2
+ db D_LEFT, 4
+ db -1 ; end
RocketHideout2ArrowMovement36:
- db D_LEFT,$0A
- db D_UP,$02
- db D_LEFT,$05
- db $FF
+ db D_LEFT, 10
+ db D_UP, 2
+ db D_LEFT, 5
+ db -1 ; end
RocketHideout2Script3:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/RocketHideoutB3F.asm
+++ b/scripts/RocketHideoutB3F.asm
@@ -33,103 +33,84 @@
ld [wCurMapScript], a
ret
-;format:
-;db y,x
-;dw pointer to movement
RocketHideout3ArrowTilePlayerMovement:
- db $d,$a
- dw RocketHideout3ArrowMovement6
- db $13,$a
- dw RocketHideout3ArrowMovement1
- db $12,$b
- dw RocketHideout3ArrowMovement2
- db $b,$c
- dw RocketHideout3ArrowMovement3
- db $11,$c
- dw RocketHideout3ArrowMovement4
- db $14,$c
- dw RocketHideout3ArrowMovement5
- db $10,$d
- dw RocketHideout3ArrowMovement6
- db $b,$e
- dw RocketHideout3ArrowMovement7
- db $f,$e
- dw RocketHideout3ArrowMovement6
- db $11,$e
- dw RocketHideout3ArrowMovement8
- db $13,$e
- dw RocketHideout3ArrowMovement9
- db $10,$f
- dw RocketHideout3ArrowMovement7
- db $12,$f
- dw RocketHideout3ArrowMovement10
- db $d,$10
- dw RocketHideout3ArrowMovement11
- db $c,$11
- dw RocketHideout3ArrowMovement10
- db $10,$12
- dw RocketHideout3ArrowMovement12
- db $FF
+ map_coord_movement 10, 13, RocketHideout3ArrowMovement6
+ map_coord_movement 10, 19, RocketHideout3ArrowMovement1
+ map_coord_movement 11, 18, RocketHideout3ArrowMovement2
+ map_coord_movement 12, 11, RocketHideout3ArrowMovement3
+ map_coord_movement 12, 17, RocketHideout3ArrowMovement4
+ map_coord_movement 12, 20, RocketHideout3ArrowMovement5
+ map_coord_movement 13, 16, RocketHideout3ArrowMovement6
+ map_coord_movement 14, 11, RocketHideout3ArrowMovement7
+ map_coord_movement 14, 15, RocketHideout3ArrowMovement6
+ map_coord_movement 14, 17, RocketHideout3ArrowMovement8
+ map_coord_movement 14, 19, RocketHideout3ArrowMovement9
+ map_coord_movement 15, 16, RocketHideout3ArrowMovement7
+ map_coord_movement 15, 18, RocketHideout3ArrowMovement10
+ map_coord_movement 16, 13, RocketHideout3ArrowMovement11
+ map_coord_movement 17, 12, RocketHideout3ArrowMovement10
+ map_coord_movement 18, 16, RocketHideout3ArrowMovement12
+ db -1 ; end
;format: direction, count
;each list is read starting from the $FF and working backwards
RocketHideout3ArrowMovement1:
- db D_RIGHT,$04
- db D_UP,$04
- db D_RIGHT,$04
- db $FF
+ db D_RIGHT, 4
+ db D_UP, 4
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout3ArrowMovement2:
- db D_DOWN,$04
- db D_RIGHT,$04
- db $FF
+ db D_DOWN, 4
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout3ArrowMovement3:
- db D_LEFT,$02
- db $FF
+ db D_LEFT, 2
+ db -1 ; end
RocketHideout3ArrowMovement4:
- db D_RIGHT,$04
- db D_UP,$02
- db D_RIGHT,$02
- db $FF
+ db D_RIGHT, 4
+ db D_UP, 2
+ db D_RIGHT, 2
+ db -1 ; end
RocketHideout3ArrowMovement5:
- db D_RIGHT,$04
- db D_UP,$02
- db D_RIGHT,$02
- db D_UP,$03
- db $FF
+ db D_RIGHT, 4
+ db D_UP, 2
+ db D_RIGHT, 2
+ db D_UP, 3
+ db -1 ; end
RocketHideout3ArrowMovement6:
- db D_RIGHT,$04
- db $FF
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout3ArrowMovement7:
- db D_RIGHT,$02
- db $FF
+ db D_RIGHT, 2
+ db -1 ; end
RocketHideout3ArrowMovement8:
- db D_RIGHT,$04
- db D_UP,$02
- db $FF
+ db D_RIGHT, 4
+ db D_UP, 2
+ db -1 ; end
RocketHideout3ArrowMovement9:
- db D_RIGHT,$04
- db D_UP,$04
- db $FF
+ db D_RIGHT, 4
+ db D_UP, 4
+ db -1 ; end
RocketHideout3ArrowMovement10:
- db D_DOWN,$04
- db $FF
+ db D_DOWN, 4
+ db -1 ; end
RocketHideout3ArrowMovement11:
- db D_UP,$02
- db $FF
+ db D_UP, 2
+ db -1 ; end
RocketHideout3ArrowMovement12:
- db D_UP,$01
- db $FF
+ db D_UP, 1
+ db -1 ; end
RocketHideout3Script3:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/RocketHideoutElevator.asm
+++ b/scripts/RocketHideoutElevator.asm
@@ -41,19 +41,18 @@
ret
RocketHideoutElavatorFloors:
- db $03 ; num elements in list
+ db 3 ; #
db FLOOR_B1F
db FLOOR_B2F
db FLOOR_B4F
- db $FF ; terminator
+ db -1 ; end
-RocketHideoutElevatorWarpMaps:
-; first byte is warp number
-; second byte is map number
; These specify where the player goes after getting out of the elevator.
- db $04, ROCKET_HIDEOUT_B1F
- db $04, ROCKET_HIDEOUT_B2F
- db $02, ROCKET_HIDEOUT_B4F
+RocketHideoutElevatorWarpMaps:
+ ; warp number, map id
+ db 4, ROCKET_HIDEOUT_B1F
+ db 4, ROCKET_HIDEOUT_B2F
+ db 2, ROCKET_HIDEOUT_B4F
RocketHideoutElevatorWarpMapsEnd:
RocketHideoutElevatorScript_4575f:
--- a/scripts/Route1.asm
+++ b/scripts/Route1.asm
@@ -9,20 +9,20 @@
Route1Text1:
text_asm
CheckAndSetEvent EVENT_GOT_POTION_SAMPLE
- jr nz, .asm_1cada
+ jr nz, .got_item
ld hl, Route1ViridianMartSampleText
call PrintText
lb bc, POTION, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, Route1Text_1cae8
- jr .asm_1cadd
-.BagFull
+ jr .done
+.bag_full
ld hl, Route1Text_1caf3
- jr .asm_1cadd
-.asm_1cada
+ jr .done
+.got_item
ld hl, Route1Text_1caee
-.asm_1cadd
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/Route11Gate2F.asm
+++ b/scripts/Route11Gate2F.asm
@@ -9,7 +9,7 @@
Route11GateUpstairsText1:
text_asm
- xor a
+ xor a ; TRADE_FOR_TERRY
ld [wWhichTrade], a
predef DoInGameTradeDialogue
Route11GateUpstairsScriptEnd:
@@ -18,10 +18,10 @@
Route11GateUpstairsText2:
text_asm
CheckEvent EVENT_GOT_ITEMFINDER, 1
- jr c, .asm_4949b
- ld a, 30 ; pokemon needed
+ jr c, .got_item
+ ld a, 30
ldh [hOaksAideRequirement], a
- ld a, ITEMFINDER ; oak's aide reward
+ ld a, ITEMFINDER
ldh [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
@@ -32,13 +32,13 @@
call CopyData
predef OaksAideScript
ldh a, [hOaksAideResult]
- dec a
- jr nz, .asm_494a1
+ dec a ; OAKS_AIDE_GOT_ITEM?
+ jr nz, .no_item
SetEvent EVENT_GOT_ITEMFINDER
-.asm_4949b
+.got_item
ld hl, Route11GateUpstairsText_494a3
call PrintText
-.asm_494a1
+.no_item
jr Route11GateUpstairsScriptEnd
Route11GateUpstairsText_494a3:
--- a/scripts/Route12Gate2F.asm
+++ b/scripts/Route12Gate2F.asm
@@ -9,24 +9,24 @@
Route12GateUpstairsText1:
text_asm
CheckEvent EVENT_GOT_TM39, 1
- jr c, .asm_0ad3c
+ jr c, .got_item
ld hl, TM39PreReceiveText
call PrintText
lb bc, TM_SWIFT, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM39Text
call PrintText
SetEvent EVENT_GOT_TM39
- jr .asm_4ba56
-.BagFull
+ jr .done
+.bag_full
ld hl, TM39NoRoomText
call PrintText
- jr .asm_4ba56
-.asm_0ad3c
+ jr .done
+.got_item
ld hl, TM39ExplanationText
call PrintText
-.asm_4ba56
+.done
jp TextScriptEnd
TM39PreReceiveText:
@@ -68,7 +68,7 @@
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
jr z, .up
- ld a, $1
+ ld a, TRUE
jr .done
.up
call PrintText
--- a/scripts/Route12SuperRodHouse.asm
+++ b/scripts/Route12SuperRodHouse.asm
@@ -7,30 +7,30 @@
Route12HouseText1:
text_asm
ld a, [wd728]
- bit 5, a
- jr nz, .asm_b4cad
+ bit 5, a ; received super rod?
+ jr nz, .got_item
ld hl, Route12HouseText_564c0
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_a2d76
+ jr nz, .refused
lb bc, SUPER_ROD, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, wd728
- set 5, [hl]
+ set 5, [hl] ; received super rod
ld hl, Route12HouseText_564c5
- jr .asm_df984
-.BagFull
+ jr .done
+.bag_full
ld hl, Route12HouseText_564d9
- jr .asm_df984
-.asm_a2d76
+ jr .done
+.refused
ld hl, Route12HouseText_564cf
- jr .asm_df984
-.asm_b4cad
+ jr .done
+.got_item
ld hl, Route12HouseText_564d4
-.asm_df984
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/Route15Gate2F.asm
+++ b/scripts/Route15Gate2F.asm
@@ -8,10 +8,10 @@
Route15GateUpstairsText1:
text_asm
CheckEvent EVENT_GOT_EXP_ALL
- jr nz, .asm_49683
- ld a, 50 ; pokemon needed
+ jr nz, .got_item
+ ld a, 50
ldh [hOaksAideRequirement], a
- ld a, EXP_ALL ; oak's aide reward
+ ld a, EXP_ALL
ldh [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
@@ -21,13 +21,13 @@
call CopyData
predef OaksAideScript
ldh a, [hOaksAideResult]
- cp $1
- jr nz, .asm_49689
+ cp OAKS_AIDE_GOT_ITEM
+ jr nz, .no_item
SetEvent EVENT_GOT_EXP_ALL
-.asm_49683
+.got_item
ld hl, Route15GateUpstairsText_4968c
call PrintText
-.asm_49689
+.no_item
jp TextScriptEnd
Route15GateUpstairsText_4968c:
--- a/scripts/Route16FlyHouse.asm
+++ b/scripts/Route16FlyHouse.asm
@@ -9,18 +9,18 @@
text_asm
CheckEvent EVENT_GOT_HM02
ld hl, HM02ExplanationText
- jr nz, .asm_13616
+ jr nz, .got_item
ld hl, Route16HouseText3
call PrintText
lb bc, HM_FLY, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_HM02
ld hl, ReceivedHM02Text
- jr .asm_13616
-.BagFull
+ jr .got_item
+.bag_full
ld hl, HM02NoRoomText
-.asm_13616
+.got_item
call PrintText
jp TextScriptEnd
--- a/scripts/Route16Gate1F.asm
+++ b/scripts/Route16Gate1F.asm
@@ -44,11 +44,11 @@
ret
CoordsData_49714:
- db $07,$04
- db $08,$04
- db $09,$04
- db $0A,$04
- db $FF
+ dbmapcoord 4, 7
+ dbmapcoord 4, 8
+ dbmapcoord 4, 9
+ dbmapcoord 4, 10
+ db -1 ; end
Route16GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/Route18Gate1F.asm
+++ b/scripts/Route18Gate1F.asm
@@ -44,11 +44,11 @@
ret
CoordsData_498cc:
- db $03,$04
- db $04,$04
- db $05,$04
- db $06,$04
- db $FF
+ dbmapcoord 4, 3
+ dbmapcoord 4, 4
+ dbmapcoord 4, 5
+ dbmapcoord 4, 6
+ db -1 ; end
Route18GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/Route18Gate2F.asm
+++ b/scripts/Route18Gate2F.asm
@@ -8,7 +8,7 @@
Route18GateUpstairsText1:
text_asm
- ld a, $5
+ ld a, TRADE_FOR_MARC
ld [wWhichTrade], a
predef DoInGameTradeDialogue
jp TextScriptEnd
--- a/scripts/Route20.asm
+++ b/scripts/Route20.asm
@@ -33,7 +33,7 @@
db HS_SEAFOAM_ISLANDS_B2F_BOULDER_2
db HS_SEAFOAM_ISLANDS_B3F_BOULDER_3
db HS_SEAFOAM_ISLANDS_B3F_BOULDER_4
- db $FF
+ db -1 ; end
.asm_50cef
CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE
--- a/scripts/Route22.asm
+++ b/scripts/Route22.asm
@@ -52,7 +52,7 @@
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
Route22Script0:
CheckEvent EVENT_ROUTE22_RIVAL_WANTS_BATTLE
@@ -75,9 +75,9 @@
ret
.Route22RivalBattleCoords
- db $04, $1D
- db $05, $1D
- db $FF
+ dbmapcoord 29, 4
+ dbmapcoord 29, 5
+ db -1 ; end
.firstRivalBattle
ld a, $1
@@ -141,9 +141,9 @@
StarterMons_50faf:
; starter the rival picked, rival trainer number
- db STARTER2,$04
- db STARTER3,$05
- db STARTER1,$06
+ db STARTER2, 4
+ db STARTER3, 5
+ db STARTER1, 6
Route22Script2:
ld a, [wIsInBattle]
@@ -202,7 +202,7 @@
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
Route22RivalExitMovementData2:
db NPC_MOVEMENT_UP
@@ -215,7 +215,7 @@
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
Route22Script3:
ld a, [wd730]
@@ -296,9 +296,9 @@
ret
StarterMons_510d9:
- db STARTER2,$0a
- db STARTER3,$0b
- db STARTER1,$0c
+ db STARTER2, 10
+ db STARTER3, 11
+ db STARTER1, 12
Route22Script5:
ld a, [wIsInBattle]
@@ -355,12 +355,11 @@
MovementData_5114c:
db NPC_MOVEMENT_LEFT
-
MovementData_5114d:
db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_LEFT
- db $FF
+ db -1 ; end
Route22Script6:
ld a, [wd730]
--- a/scripts/Route22Gate.asm
+++ b/scripts/Route22Gate.asm
@@ -28,9 +28,9 @@
jp DisplayTextID
Route22GateScriptCoords:
- db 2,4
- db 2,5
- db $ff
+ dbmapcoord 4, 2
+ dbmapcoord 5, 2
+ db -1 ; end
Route22GateScript_1e6ba:
ld a, $1
--- a/scripts/Route23.asm
+++ b/scripts/Route23.asm
@@ -32,16 +32,16 @@
EventFlagBit c, EVENT_PASSED_EARTHBADGE_CHECK + 1, EVENT_PASSED_CASCADEBADGE_CHECK
.asm_51224
ld a, [hli]
- cp $ff
+ cp -1
ret z
inc e
dec c
cp b
jr nz, .asm_51224
- cp $23
+ cp 35
jr nz, .asm_51237
ld a, [wXCoord]
- cp $e
+ cp 14
ret nc
.asm_51237
ld a, e
@@ -61,7 +61,14 @@
ret
YCoordsData_51255:
- db $23,$38,$55,$60,$69,$77,$88,$FF
+ db 35
+ db 56
+ db 85
+ db 96
+ db 105
+ db 119
+ db 136
+ db -1 ; end
Route23Script_5125d:
ld hl, BadgeTextPointers
--- a/scripts/Route24.asm
+++ b/scripts/Route24.asm
@@ -45,7 +45,8 @@
ret
CoordsData_5140e:
- db $0F,$0A,$FF
+ dbmapcoord 10, 15
+ db -1 ; end
Route24Script4:
ld a, [wSimulatedJoypadStatesIndex]
@@ -103,12 +104,12 @@
text_asm
ResetEvent EVENT_NUGGET_REWARD_AVAILABLE
CheckEvent EVENT_GOT_NUGGET
- jr nz, .asm_514f9
+ jr nz, .got_item
ld hl, Route24Text_51510
call PrintText
lb bc, NUGGET, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_NUGGET
ld hl, Route24Text_5151a
call PrintText
@@ -130,11 +131,11 @@
ld [wRoute24CurScript], a
ld [wCurMapScript], a
jp TextScriptEnd
-.asm_514f9
+.got_item
ld hl, Route24Text_51530
call PrintText
jp TextScriptEnd
-.BagFull
+.bag_full
ld hl, Route24Text_51521
call PrintText
SetEvent EVENT_NUGGET_REWARD_AVAILABLE
--- a/scripts/Route2Gate.asm
+++ b/scripts/Route2Gate.asm
@@ -8,10 +8,10 @@
Route2GateText1:
text_asm
CheckEvent EVENT_GOT_HM05
- jr nz, .asm_5d60d
- ld a, 10 ; pokemon needed
+ jr nz, .got_item
+ ld a, 10
ldh [hOaksAideRequirement], a
- ld a, HM_FLASH ; oak's aide reward
+ ld a, HM_FLASH
ldh [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
@@ -21,13 +21,13 @@
call CopyData
predef OaksAideScript
ldh a, [hOaksAideResult]
- cp $1
- jr nz, .asm_5d613
+ cp OAKS_AIDE_GOT_ITEM
+ jr nz, .no_item
SetEvent EVENT_GOT_HM05
-.asm_5d60d
+.got_item
ld hl, Route2GateText_5d616
call PrintText
-.asm_5d613
+.no_item
jp TextScriptEnd
Route2GateText_5d616:
--- a/scripts/Route2TradeHouse.asm
+++ b/scripts/Route2TradeHouse.asm
@@ -11,7 +11,7 @@
Route2HouseText2:
text_asm
- ld a, $1
+ ld a, TRADE_FOR_MARCEL
ld [wWhichTrade], a
predef DoInGameTradeDialogue
jp TextScriptEnd
--- a/scripts/Route5Gate.asm
+++ b/scripts/Route5Gate.asm
@@ -46,9 +46,9 @@
ret
CoordsData_1df8f:
- db 3,3
- db 3,4
- db $ff
+ dbmapcoord 3, 3
+ dbmapcoord 4, 3
+ db -1 ; end
Route5GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/Route6Gate.asm
+++ b/scripts/Route6Gate.asm
@@ -39,8 +39,9 @@
jp DisplayTextID
CoordsData_1e08c:
- db $02,$03
- db $02,$04,$FF
+ dbmapcoord 3, 2
+ dbmapcoord 4, 2
+ db -1 ; end
Route6GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/Route7Gate.asm
+++ b/scripts/Route7Gate.asm
@@ -52,9 +52,9 @@
ret
CoordsData_1e167:
- db 3,3
- db 4,3
- db $ff
+ dbmapcoord 3, 3
+ dbmapcoord 3, 4
+ db -1 ; end
Route7GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/Route8Gate.asm
+++ b/scripts/Route8Gate.asm
@@ -50,9 +50,9 @@
jp DisplayTextID
CoordsData_1e22c:
- db 3,2
- db 4,2
- db $ff
+ dbmapcoord 2, 3
+ dbmapcoord 2, 4
+ db -1 ; end
Route8GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/SSAnne2F.asm
+++ b/scripts/SSAnne2F.asm
@@ -58,17 +58,16 @@
MovementData_6140c:
db NPC_MOVEMENT_DOWN
-
MovementData_6140d:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
CoordsData_61411:
- db $08,$24
- db $08,$25
- db $FF
+ dbmapcoord 36, 8
+ dbmapcoord 37, 8
+ db -1 ; end
SSAnne2Script_61416:
ld a, [wXCoord]
@@ -156,13 +155,12 @@
MovementData_614b7:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN
-
MovementData_614b9:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
SSAnne2Script3:
ld a, [wd730]
--- a/scripts/SSAnne2FRooms.asm
+++ b/scripts/SSAnne2FRooms.asm
@@ -1,5 +1,5 @@
SSAnne2FRooms_Script:
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
--- a/scripts/SSAnneB1F.asm
+++ b/scripts/SSAnneB1F.asm
@@ -2,4 +2,5 @@
jp EnableAutoTextBoxDrawing
SSAnneB1F_TextPointers:
- text_end
+
+ text_end ; unused
--- a/scripts/SSAnneCaptainsRoom.asm
+++ b/scripts/SSAnneCaptainsRoom.asm
@@ -17,7 +17,7 @@
SSAnne7Text1:
text_asm
CheckEvent EVENT_GOT_HM01
- jr nz, .asm_797c4
+ jr nz, .got_item
ld hl, SSAnne7RubText
call PrintText
ld hl, ReceivingHM01Text
@@ -24,21 +24,21 @@
call PrintText
lb bc, HM_CUT, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedHM01Text
call PrintText
SetEvent EVENT_GOT_HM01
- jr .asm_0faf5
-.BagFull
+ jr .done
+.bag_full
ld hl, HM01NoRoomText
call PrintText
ld hl, wd72d
set 5, [hl]
- jr .asm_0faf5
-.asm_797c4
+ jr .done
+.got_item
ld hl, SSAnne7Text_61932
call PrintText
-.asm_0faf5
+.done
jp TextScriptEnd
SSAnne7RubText:
--- a/scripts/SSAnneKitchen.asm
+++ b/scripts/SSAnneKitchen.asm
@@ -41,17 +41,17 @@
call PrintText
ldh a, [hRandomAdd]
bit 7, a
- jr z, .asm_93eb1
+ jr z, .not_dialog_1
ld hl, SSAnne6Text_6180c
- jr .asm_63292
-.asm_93eb1
+ jr .done
+.not_dialog_1
bit 4, a
- jr z, .asm_7436c
+ jr z, .not_dialog_2
ld hl, SSAnne6Text_61811
- jr .asm_63292
-.asm_7436c
+ jr .done
+.not_dialog_2
ld hl, SSAnne6Text_61816
-.asm_63292
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/SafariZoneGate.asm
+++ b/scripts/SafariZoneGate.asm
@@ -43,9 +43,9 @@
ret
.CoordsData_75221:
- db $02,$03
- db $02,$04
- db $FF
+ dbmapcoord 3, 2
+ dbmapcoord 4, 2
+ db -1 ; end
.SafariZoneEntranceScript1
call SafariZoneEntranceScript_752b4
--- a/scripts/SafariZoneSecretHouse.asm
+++ b/scripts/SafariZoneSecretHouse.asm
@@ -7,24 +7,24 @@
SafariZoneSecretHouseText1:
text_asm
CheckEvent EVENT_GOT_HM03
- jr nz, .asm_20a9b
+ jr nz, .got_item
ld hl, SafariZoneSecretHouseText_4a350
call PrintText
lb bc, HM_SURF, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedHM03Text
call PrintText
SetEvent EVENT_GOT_HM03
- jr .asm_8f1fc
-.BagFull
+ jr .done
+.bag_full
ld hl, HM03NoRoomText
call PrintText
- jr .asm_8f1fc
-.asm_20a9b
+ jr .done
+.got_item
ld hl, HM03ExplanationText
call PrintText
-.asm_8f1fc
+.done
jp TextScriptEnd
SafariZoneSecretHouseText_4a350:
--- a/scripts/SeafoamIslands1F.asm
+++ b/scripts/SeafoamIslands1F.asm
@@ -38,9 +38,9 @@
jp IsPlayerOnDungeonWarp
Seafoam1HolesCoords:
- db $06,$11
- db $06,$18
- db $ff
+ dbmapcoord 17, 6
+ dbmapcoord 24, 6
+ db -1 ; end
SeafoamIslands1F_TextPointers:
dw BoulderText
--- a/scripts/SeafoamIslandsB1F.asm
+++ b/scripts/SeafoamIslandsB1F.asm
@@ -37,9 +37,9 @@
jp IsPlayerOnDungeonWarp
Seafoam2HolesCoords:
- db $06,$12
- db $06,$17
- db $ff
+ dbmapcoord 18, 6
+ dbmapcoord 23, 6
+ db -1 ; end
SeafoamIslandsB1F_TextPointers:
dw BoulderText
--- a/scripts/SeafoamIslandsB2F.asm
+++ b/scripts/SeafoamIslandsB2F.asm
@@ -37,9 +37,9 @@
jp IsPlayerOnDungeonWarp
Seafoam3HolesCoords:
- db $06,$13
- db $06,$16
- db $ff
+ dbmapcoord 19, 6
+ dbmapcoord 22, 6
+ db -1 ; end
SeafoamIslandsB2F_TextPointers:
dw BoulderText
--- a/scripts/SeafoamIslandsB3F.asm
+++ b/scripts/SeafoamIslandsB3F.asm
@@ -45,9 +45,9 @@
jp CallFunctionInTable
Seafoam4HolesCoords:
- db $10,$03
- db $10,$06
- db $ff
+ dbmapcoord 3, 16
+ dbmapcoord 6, 16
+ db -1 ; end
SeafoamIslandsB3F_ScriptPointers:
dw SeafoamIslands4Script0
@@ -77,10 +77,10 @@
ret
RLEMovement46632:
- db D_DOWN,6
- db D_RIGHT,5
- db D_DOWN,3
- db $ff
+ db D_DOWN, 6
+ db D_RIGHT, 5
+ db D_DOWN, 3
+ db -1 ; end
SeafoamIslands4Script1:
ld a, [wSimulatedJoypadStatesIndex]
@@ -120,17 +120,17 @@
ret
RLEData_4667f:
- db D_DOWN,$06
- db D_RIGHT,$02
- db D_DOWN,$04
- db D_LEFT,$01
- db $FF
+ db D_DOWN, 6
+ db D_RIGHT, 2
+ db D_DOWN, 4
+ db D_LEFT, 1
+ db -1 ; end
RLEData_46688:
- db D_DOWN,$06
- db D_RIGHT,$02
- db D_DOWN,$04
- db $FF
+ db D_DOWN, 6
+ db D_RIGHT, 2
+ db D_DOWN, 4
+ db -1 ; end
SeafoamIslands4Script3:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/SeafoamIslandsB4F.asm
+++ b/scripts/SeafoamIslandsB4F.asm
@@ -53,11 +53,11 @@
ret
.Coords
- db $11,$14
- db $11,$15
- db $10,$14
- db $10,$15
- db $FF
+ dbmapcoord 20, 17
+ dbmapcoord 21, 17
+ dbmapcoord 20, 16
+ dbmapcoord 21, 16
+ db -1 ; end
SeafoamIslands5Script1:
ld a, [wSimulatedJoypadStatesIndex]
@@ -96,21 +96,21 @@
ret
.Coords
- db $0E,$04
- db $0E,$05
- db $FF
+ dbmapcoord 4, 14
+ dbmapcoord 5, 14
+ db -1 ; end
RLEMovementData_46852:
- db D_UP,$03
- db D_RIGHT,$02
- db D_UP,$01
- db $FF
+ db D_UP, 3
+ db D_RIGHT, 2
+ db D_UP, 1
+ db -1 ; end
RLEMovementData_46859:
- db D_UP,$03
- db D_RIGHT,$03
- db D_UP,$01
- db $FF
+ db D_UP, 3
+ db D_RIGHT, 3
+ db D_UP, 1
+ db -1 ; end
SeafoamIslands5Script3:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/SilphCo10F.asm
+++ b/scripts/SilphCo10F.asm
@@ -24,8 +24,8 @@
predef_jump ReplaceTileBlock
SilphCo10GateCoords:
- db $04,$05
- db $FF
+ dbmapcoord 5, 4
+ db -1 ; end
SilphCo10Text_5a176:
ldh a, [hUnlockedSilphCoDoors]
--- a/scripts/SilphCo11F.asm
+++ b/scripts/SilphCo11F.asm
@@ -24,8 +24,8 @@
predef_jump ReplaceTileBlock
SilphCo11GateCoords:
- db $06,$03
- db $FF
+ dbmapcoord 3, 6
+ db -1 ; end
SilphCo11Script_62137:
push hl
@@ -85,7 +85,7 @@
ld hl, MissableObjectIDs_62194
.asm_62184
ld a, [hli]
- cp $ff
+ cp -1
ret z
push hl
ld [wMissableObjectIndex], a
@@ -100,7 +100,7 @@
db HS_SAFFRON_CITY_B
db HS_SAFFRON_CITY_C
db HS_SAFFRON_CITY_D
- db $FF
+ db -1 ; end
MissableObjectIDs_6219b:
db HS_SAFFRON_CITY_1
@@ -143,7 +143,7 @@
db HS_SILPH_CO_11F_1
db HS_SILPH_CO_11F_2
db HS_SILPH_CO_11F_3
- db $FF
+ db -1 ; end
SilphCo11Script_621c4:
xor a
@@ -186,15 +186,15 @@
jp SilphCo11Script_621c8
CoordsData_62211:
- db $0D,$06
- db $0C,$07
- db $FF
+ dbmapcoord 6, 13
+ dbmapcoord 7, 12
+ db -1 ; end
MovementData_62216:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
SilphCo11Script_6221a:
ld [wPlayerMovingDirection], a
@@ -289,24 +289,24 @@
SilphCo11Text1:
text_asm
CheckEvent EVENT_GOT_MASTER_BALL
- jp nz, .asm_62308
+ jp nz, .got_item
ld hl, SilphCoPresidentText
call PrintText
lb bc, MASTER_BALL, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedSilphCoMasterBallText
call PrintText
SetEvent EVENT_GOT_MASTER_BALL
- jr .asm_6230e
-.BagFull
+ jr .done
+.bag_full
ld hl, SilphCoMasterBallNoRoomText
call PrintText
- jr .asm_6230e
-.asm_62308
+ jr .done
+.got_item
ld hl, SilphCo10Text_6231c
call PrintText
-.asm_6230e
+.done
jp TextScriptEnd
SilphCoPresidentText:
--- a/scripts/SilphCo2F.asm
+++ b/scripts/SilphCo2F.asm
@@ -33,9 +33,9 @@
predef_jump ReplaceTileBlock
SilphCo2GateCoords:
- db $02,$02
- db $05,$02
- db $FF
+ dbmapcoord 2, 2
+ dbmapcoord 2, 5
+ db -1 ; end
SilphCo2Script_59d43:
push hl
--- a/scripts/SilphCo3F.asm
+++ b/scripts/SilphCo3F.asm
@@ -33,9 +33,9 @@
predef_jump ReplaceTileBlock
SilphCo3GateCoords:
- db $04,$04
- db $04,$08
- db $FF
+ dbmapcoord 4, 4
+ dbmapcoord 8, 4
+ db -1 ; end
SilphCo3Script_59fad:
EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
--- a/scripts/SilphCo4F.asm
+++ b/scripts/SilphCo4F.asm
@@ -33,9 +33,9 @@
predef_jump ReplaceTileBlock
SilphCo4GateCoords:
- db $06,$02
- db $04,$06
- db $FF
+ dbmapcoord 2, 6
+ dbmapcoord 6, 4
+ db -1 ; end
SilphCo4Script_19d5d:
push hl
--- a/scripts/SilphCo5F.asm
+++ b/scripts/SilphCo5F.asm
@@ -42,10 +42,10 @@
predef_jump ReplaceTileBlock
SilphCo5GateCoords:
- db $02,$03
- db $06,$03
- db $05,$07
- db $FF
+ dbmapcoord 3, 2
+ dbmapcoord 3, 6
+ dbmapcoord 7, 5
+ db -1 ; end
SilphCo5Script_19f9e:
EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1
--- a/scripts/SilphCo6F.asm
+++ b/scripts/SilphCo6F.asm
@@ -24,8 +24,8 @@
predef_jump ReplaceTileBlock
SilphCo6GateCoords:
- db $06,$02
- db $FF
+ dbmapcoord 2, 6
+ db -1 ; end
SilphCo6Script_1a1e6:
ldh a, [hUnlockedSilphCoDoors]
--- a/scripts/SilphCo7F.asm
+++ b/scripts/SilphCo7F.asm
@@ -42,10 +42,10 @@
predef_jump ReplaceTileBlock
SilphCo7GateCoords:
- db $03,$05
- db $02,$0A
- db $06,$0A
- db $FF
+ dbmapcoord 5, 3
+ dbmapcoord 10, 2
+ dbmapcoord 10, 6
+ db -1 ; end
SilphCo7Text_51bc8:
push hl
@@ -156,9 +156,9 @@
jp SilphCo7Text_51c10
CoordsData_51c78:
- db $02,$03
- db $03,$03
- db $FF
+ dbmapcoord 3, 2
+ dbmapcoord 3, 3
+ db -1 ; end
MovementData_51c7d:
db NPC_MOVEMENT_UP
@@ -165,7 +165,7 @@
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
SilphCo7Script3:
ld a, [wd730]
@@ -238,7 +238,7 @@
MovementData_51d1a:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
MovementData_51d1d:
db NPC_MOVEMENT_LEFT
@@ -248,7 +248,7 @@
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
SilphCo7Script5:
ld a, [wd730]
--- a/scripts/SilphCo8F.asm
+++ b/scripts/SilphCo8F.asm
@@ -24,8 +24,8 @@
predef_jump ReplaceTileBlock
SilphCo8GateCoords:
- db $04,$03
- db $FF
+ dbmapcoord 3, 4
+ db -1 ; end
SilphCo8Script_56541:
push hl
--- a/scripts/SilphCo9F.asm
+++ b/scripts/SilphCo9F.asm
@@ -51,11 +51,11 @@
predef_jump ReplaceTileBlock
SilphCo9GateCoords:
- db $04,$01
- db $02,$09
- db $05,$09
- db $06,$05
- db $FF
+ dbmapcoord 1, 4
+ dbmapcoord 9, 2
+ dbmapcoord 9, 5
+ dbmapcoord 5, 6
+ db -1 ; end
SilphCo9Script_5d837:
push hl
--- a/scripts/SilphCoElevator.asm
+++ b/scripts/SilphCoElevator.asm
@@ -41,7 +41,7 @@
ret
SilphCoElevatorFloors:
- db $0B ; num elements in list
+ db 11 ; #
db FLOOR_1F
db FLOOR_2F
db FLOOR_3F
@@ -53,23 +53,22 @@
db FLOOR_9F
db FLOOR_10F
db FLOOR_11F
- db $FF ; terminator
+ db -1 ; end
-SilphCoElevatorWarpMaps:
-; first byte is warp number
-; second byte is map number
; These specify where the player goes after getting out of the elevator.
- db $03, SILPH_CO_1F
- db $02, SILPH_CO_2F
- db $02, SILPH_CO_3F
- db $02, SILPH_CO_4F
- db $02, SILPH_CO_5F
- db $02, SILPH_CO_6F
- db $02, SILPH_CO_7F
- db $02, SILPH_CO_8F
- db $02, SILPH_CO_9F
- db $02, SILPH_CO_10F
- db $01, SILPH_CO_11F
+SilphCoElevatorWarpMaps:
+ ; warp number, map id
+ db 3, SILPH_CO_1F
+ db 2, SILPH_CO_2F
+ db 2, SILPH_CO_3F
+ db 2, SILPH_CO_4F
+ db 2, SILPH_CO_5F
+ db 2, SILPH_CO_6F
+ db 2, SILPH_CO_7F
+ db 2, SILPH_CO_8F
+ db 2, SILPH_CO_9F
+ db 2, SILPH_CO_10F
+ db 1, SILPH_CO_11F
SilphCoElevatorWarpMapsEnd:
SilphCoElevatorScript_45827:
--- a/scripts/TradeCenter.asm
+++ b/scripts/TradeCenter.asm
@@ -15,9 +15,9 @@
set 0, [hl]
ret nz
ld hl, wSprite01StateData2MapY
- ld a, $8
+ ld a, 8 ; y
ld [hli], a
- ld a, $a
+ ld a, 10 ; x
ld [hl], a
ld a, SPRITE_FACING_LEFT
ld [wSprite01StateData1FacingDirection], a
@@ -24,7 +24,7 @@
ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
ret z
- ld a, $7
+ ld a, 7 ; x
ld [wSprite01StateData2MapX], a
ld a, SPRITE_FACING_RIGHT
ld [wSprite01StateData1FacingDirection], a
--- a/scripts/UndergroundPathNorthSouth.asm
+++ b/scripts/UndergroundPathNorthSouth.asm
@@ -2,4 +2,5 @@
jp EnableAutoTextBoxDrawing
UndergroundPathNorthSouth_TextPointers:
- text_end
+
+ text_end ; unused
--- a/scripts/UndergroundPathRoute5.asm
+++ b/scripts/UndergroundPathRoute5.asm
@@ -11,7 +11,7 @@
UndergroundPathEntranceRoute5Text1:
text_asm
- ld a, $9
+ ld a, TRADE_FOR_SPOT
ld [wWhichTrade], a
predef DoInGameTradeDialogue
ld hl, UndergroundPathEntranceRoute5_TextScriptEndingText
--- a/scripts/UndergroundPathWestEast.asm
+++ b/scripts/UndergroundPathWestEast.asm
@@ -2,4 +2,5 @@
jp EnableAutoTextBoxDrawing
UndergroundPathWestEast_TextPointers:
- text_end
+
+ text_end ; unused
--- a/scripts/VermilionCity.asm
+++ b/scripts/VermilionCity.asm
@@ -68,8 +68,8 @@
ret
SSAnneTicketCheckCoords:
- db $1e,$12 ; y, x
- db $ff
+ dbmapcoord 18, 30
+ db -1 ; end
VermilionCityScript4:
ld hl, SSAnneTicketCheckCoords
@@ -191,9 +191,9 @@
jp TextScriptEnd
.inFrontOfOrBehindGuardCoords
- db $1d,$13 ; y, x of tile in front of guard
- db $1f,$13 ; y, x of tile behind guard
- db $ff
+ dbmapcoord 19, 29 ; in front of guard
+ dbmapcoord 19, 31 ; behind guard
+ db -1 ; end
SSAnneWelcomeText4:
text_far _SSAnneWelcomeText4
--- a/scripts/VermilionDock.asm
+++ b/scripts/VermilionDock.asm
@@ -155,6 +155,7 @@
ret
VermilionDockOAMBlock:
+ ; tile id, attribute
db $fc, $10
db $fd, $10
db $fe, $10
--- a/scripts/VermilionOldRodHouse.asm
+++ b/scripts/VermilionOldRodHouse.asm
@@ -7,30 +7,30 @@
VermilionHouse2Text1:
text_asm
ld a, [wd728]
- bit 3, a
- jr nz, .asm_03ef5
+ bit 3, a ; got old rod?
+ jr nz, .got_item
ld hl, VermilionHouse2Text_560b1
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_eb1b7
+ jr nz, .refused
lb bc, OLD_ROD, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, wd728
- set 3, [hl]
+ set 3, [hl] ; got old rod
ld hl, VermilionHouse2Text_560b6
- jr .asm_5dd95
-.BagFull
+ jr .done
+.bag_full
ld hl, VermilionHouse2Text_560ca
- jr .asm_5dd95
-.asm_eb1b7
+ jr .done
+.refused
ld hl, VermilionHouse2Text_560c0
- jr .asm_5dd95
-.asm_03ef5
+ jr .done
+.got_item
ld hl, VermilionHouse2Text_560c5
-.asm_5dd95
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/VermilionTradeHouse.asm
+++ b/scripts/VermilionTradeHouse.asm
@@ -6,7 +6,7 @@
VermilionHouse3Text1:
text_asm
- ld a, $4
+ ld a, TRADE_FOR_DUX
ld [wWhichTrade], a
predef DoInGameTradeDialogue
jp TextScriptEnd
--- a/scripts/VictoryRoad1F.asm
+++ b/scripts/VictoryRoad1F.asm
@@ -35,7 +35,8 @@
ret
CoordsData_5da5c:
- db $0D,$11,$FF
+ dbmapcoord 17, 13
+ db -1 ; end
VictoryRoad1F_TextPointers:
dw VictoryRoad1Text1
--- a/scripts/VictoryRoad2F.asm
+++ b/scripts/VictoryRoad2F.asm
@@ -64,9 +64,9 @@
ret
CoordsData_51816:
- db $10,$01
- db $10,$09
- db $FF
+ dbmapcoord 1, 16
+ dbmapcoord 9, 16
+ db -1 ; end
VictoryRoad2F_TextPointers:
dw VictoryRoad2Text1
--- a/scripts/VictoryRoad3F.asm
+++ b/scripts/VictoryRoad3F.asm
@@ -51,9 +51,9 @@
predef_jump ShowObject
.coordsData_449f9:
- db $05,$03
- db $0F,$17
- db $FF
+ dbmapcoord 3, 5
+ dbmapcoord 23, 15
+ db -1 ; end
.asm_449fe
ld a, VICTORY_ROAD_2F
--- a/scripts/ViridianCity.asm
+++ b/scripts/ViridianCity.asm
@@ -18,11 +18,11 @@
CheckEvent EVENT_VIRIDIAN_GYM_OPEN
ret nz
ld a, [wObtainedBadges]
- cp %01111111
- jr nz, .gymClosed
+ cp $ff ^ (1 << BIT_EARTHBADGE)
+ jr nz, .gym_closed
SetEvent EVENT_VIRIDIAN_GYM_OPEN
ret
-.gymClosed
+.gym_closed
ld a, [wYCoord]
cp $8
ret nz
@@ -148,13 +148,13 @@
ViridianCityText2:
text_asm
ld a, [wObtainedBadges]
- cp %01111111
+ cp $ff ^ (1 << BIT_EARTHBADGE)
ld hl, ViridianCityText_19127
- jr z, .printAndDone
+ jr z, .done
CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
- jr nz, .printAndDone
+ jr nz, .done
ld hl, ViridianCityText_19122
-.printAndDone
+.done
call PrintText
jp TextScriptEnd
@@ -232,21 +232,21 @@
ViridianCityText6:
text_asm
CheckEvent EVENT_GOT_TM42
- jr nz, .gotTm42
+ jr nz, .got_item
ld hl, ViridianCityText_191ca
call PrintText
lb bc, TM_DREAM_EATER, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM42Text
call PrintText
SetEvent EVENT_GOT_TM42
jr .done
-.BagFull
+.bag_full
ld hl, TM42NoRoomText
call PrintText
jr .done
-.gotTm42
+.got_item
ld hl, TM42Explanation
call PrintText
.done
@@ -278,13 +278,13 @@
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr z, .hurry
+ jr z, .refused
ld hl, ViridianCityText_1920f
call PrintText
ld a, $1
ld [wViridianCityCurScript], a
jr .done
-.hurry
+.refused
ld hl, ViridianCityText_19214
call PrintText
.done
--- a/scripts/ViridianGym.asm
+++ b/scripts/ViridianGym.asm
@@ -49,72 +49,68 @@
ld [wCurMapScript], a
ret
-;format:
-;db y,x
-;dw pointer to movement
ViridianGymArrowTilePlayerMovement:
- db $b,$13
- dw ViridianGymArrowMovement1
- db $1,$13
- dw ViridianGymArrowMovement2
- db $2,$12
- dw ViridianGymArrowMovement3
- db $2,$b
- dw ViridianGymArrowMovement4
- db $a,$10
- dw ViridianGymArrowMovement5
- db $6,$4
- dw ViridianGymArrowMovement6
- db $d,$5
- dw ViridianGymArrowMovement7
- db $e,$4
- dw ViridianGymArrowMovement8
- db $f,$0
- dw ViridianGymArrowMovement9
- db $f,$1
- dw ViridianGymArrowMovement10
- db $10,$d
- dw ViridianGymArrowMovement11
- db $11,$d
- dw ViridianGymArrowMovement12
- db $FF
+ map_coord_movement 19, 11, ViridianGymArrowMovement1
+ map_coord_movement 19, 1, ViridianGymArrowMovement2
+ map_coord_movement 18, 2, ViridianGymArrowMovement3
+ map_coord_movement 11, 2, ViridianGymArrowMovement4
+ map_coord_movement 16, 10, ViridianGymArrowMovement5
+ map_coord_movement 4, 6, ViridianGymArrowMovement6
+ map_coord_movement 5, 13, ViridianGymArrowMovement7
+ map_coord_movement 4, 14, ViridianGymArrowMovement8
+ map_coord_movement 0, 15, ViridianGymArrowMovement9
+ map_coord_movement 1, 15, ViridianGymArrowMovement10
+ map_coord_movement 13, 16, ViridianGymArrowMovement11
+ map_coord_movement 13, 17, ViridianGymArrowMovement12
+ db -1 ; end
-;format: direction, count
ViridianGymArrowMovement1:
- db D_UP,$09,$FF
+ db D_UP, 9
+ db -1 ; end
ViridianGymArrowMovement2:
- db D_LEFT,$08,$FF
+ db D_LEFT, 8
+ db -1 ; end
ViridianGymArrowMovement3:
- db D_DOWN,$09,$FF
+ db D_DOWN, 9
+ db -1 ; end
ViridianGymArrowMovement4:
- db D_RIGHT,$06,$FF
+ db D_RIGHT, 6
+ db -1 ; end
ViridianGymArrowMovement5:
- db D_DOWN,$02,$FF
+ db D_DOWN, 2
+ db -1 ; end
ViridianGymArrowMovement6:
- db D_DOWN,$07,$FF
+ db D_DOWN, 7
+ db -1 ; end
ViridianGymArrowMovement7:
- db D_RIGHT,$08,$FF
+ db D_RIGHT, 8
+ db -1 ; end
ViridianGymArrowMovement8:
- db D_RIGHT,$09,$FF
+ db D_RIGHT, 9
+ db -1 ; end
ViridianGymArrowMovement9:
- db D_UP,$08,$FF
+ db D_UP, 8
+ db -1 ; end
ViridianGymArrowMovement10:
- db D_UP,$06,$FF
+ db D_UP, 6
+ db -1 ; end
ViridianGymArrowMovement11:
- db D_LEFT,$06,$FF
+ db D_LEFT, 6
+ db -1 ; end
ViridianGymArrowMovement12:
- db D_LEFT,$0C,$FF
+ db D_LEFT, 12
+ db -1 ; end
ViridianGymScript4:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/ViridianMart.asm
+++ b/scripts/ViridianMart.asm
@@ -7,12 +7,12 @@
ViridianMartScript_1d47d:
CheckEvent EVENT_OAK_GOT_PARCEL
- jr nz, .asm_1d489
+ jr nz, .delivered_parcel
ld hl, ViridianMart_TextPointers
- jr .asm_1d48c
-.asm_1d489
+ jr .done
+.delivered_parcel
ld hl, ViridianMart_TextPointers2
-.asm_1d48c
+.done
ld a, l
ld [wMapTextPtr], a
ld a, h
@@ -40,9 +40,9 @@
ret
RLEMovement1d4bb:
- db D_LEFT, $01
- db D_UP, $02
- db $ff
+ db D_LEFT, 1
+ db D_UP, 2
+ db -1 ; end
ViridianMartScript1:
ld a, [wSimulatedJoypadStatesIndex]
@@ -67,6 +67,7 @@
dw ViridianMartText3
dw ViridianMartText4
dw ViridianMartText5
+
ViridianMart_TextPointers2:
dw ViridianCashierText
dw ViridianMartText2
--- a/scripts/WardensHouse.asm
+++ b/scripts/WardensHouse.asm
@@ -11,12 +11,12 @@
FuchsiaHouse2Text1:
text_asm
CheckEvent EVENT_GOT_HM04
- jr nz, .subtract
+ jr nz, .got_item
ld b, GOLD_TEETH
call IsItemInBag
- jr nz, .asm_3f30f
+ jr nz, .have_gold_teeth
CheckEvent EVENT_GAVE_GOLD_TEETH
- jr nz, .asm_60cba
+ jr nz, .gave_gold_teeth
ld hl, WardenGibberishText1
call PrintText
call YesNoChoice
@@ -23,12 +23,12 @@
ld a, [wCurrentMenuItem]
and a
ld hl, WardenGibberishText3
- jr nz, .asm_61238
+ jr nz, .refused
ld hl, WardenGibberishText2
-.asm_61238
+.refused
call PrintText
- jr .asm_52039
-.asm_3f30f
+ jr .done
+.have_gold_teeth
ld hl, WardenTeethText1
call PrintText
ld a, GOLD_TEETH
@@ -35,24 +35,24 @@
ldh [hItemToRemoveID], a
farcall RemoveItemByID
SetEvent EVENT_GAVE_GOLD_TEETH
-.asm_60cba
+.gave_gold_teeth
ld hl, WardenThankYouText
call PrintText
lb bc, HM_STRENGTH, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedHM04Text
call PrintText
SetEvent EVENT_GOT_HM04
- jr .asm_52039
-.subtract
+ jr .done
+.got_item
ld hl, HM04ExplanationText
call PrintText
- jr .asm_52039
-.BagFull
+ jr .done
+.bag_full
ld hl, HM04NoRoomText
call PrintText
-.asm_52039
+.done
jp TextScriptEnd
WardenGibberishText1:
--- a/text/BluesHouse.asm
+++ b/text/BluesHouse.asm
@@ -29,7 +29,7 @@
cont "you are."
done
-_BluesHouseText2::
+_BluesHouseDaisyWalkingText::
text "#MON are living"
line "things! If they"
cont "get tired, give"
@@ -36,7 +36,7 @@
cont "them a rest!"
done
-_BluesHouseText3::
+_BluesHouseTownMapText::
text "It's a big map!"
line "This is useful!"
done