Merge pull request #277 from Rangi42/master

Miscellaneous constant and label updates
This commit is contained in:
Rangi 2020-07-16 17:00:57 -04:00 committed by GitHub
commit d44c7c305c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
130 changed files with 1142 additions and 1127 deletions

View file

@ -41,7 +41,7 @@ Audio1_ApplyMusicAffects:
ld hl, wChannelNoteDelayCounters ; delay until next note ld hl, wChannelNoteDelayCounters ; delay until next note
add hl, bc add hl, bc
ld a, [hl] 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 jp z, Audio1_PlayNextNote
dec a ; otherwise, decrease the delay timer dec a ; otherwise, decrease the delay timer
ld [hl], a ld [hl], a
@ -163,8 +163,8 @@ Audio1_PlayNextNote:
Audio1_sound_ret: Audio1_sound_ret:
call Audio1_GetNextMusicByte call Audio1_GetNextMusicByte
ld d, a ld d, a
cp $ff ; is this command a sound_ret? cp sound_ret_cmd
jp nz, Audio1_sound_call ; no jp nz, Audio1_sound_call
ld b, 0 ld b, 0
ld hl, wChannelFlags1 ld hl, wChannelFlags1
add hl, bc add hl, bc
@ -251,8 +251,8 @@ Audio1_sound_ret:
ret ret
Audio1_sound_call: Audio1_sound_call:
cp $fd ; is this command a sound_call? cp sound_call_cmd
jp nz, Audio1_sound_loop ; no jp nz, Audio1_sound_loop
call Audio1_GetNextMusicByte call Audio1_GetNextMusicByte
push af push af
call Audio1_GetNextMusicByte call Audio1_GetNextMusicByte
@ -288,8 +288,8 @@ Audio1_sound_call:
jp Audio1_sound_ret jp Audio1_sound_ret
Audio1_sound_loop: Audio1_sound_loop:
cp $fe ; is this command a sound_loop? cp sound_loop_cmd
jp nz, Audio1_note_type ; no jp nz, Audio1_note_type
call Audio1_GetNextMusicByte call Audio1_GetNextMusicByte
ld e, a ld e, a
and a and a
@ -327,8 +327,8 @@ Audio1_sound_loop:
Audio1_note_type: Audio1_note_type:
and $f0 and $f0
cp $d0 ; is this command a note_type? cp note_type_cmd
jp nz, Audio1_toggle_perfect_pitch ; no jp nz, Audio1_toggle_perfect_pitch
ld a, d ld a, d
and $f and $f
ld b, $0 ld b, $0
@ -371,8 +371,8 @@ Audio1_note_type:
Audio1_toggle_perfect_pitch: Audio1_toggle_perfect_pitch:
ld a, d ld a, d
cp $e8 ; is this command a toggle_perfect_pitch? cp toggle_perfect_pitch_cmd
jr nz, Audio1_vibrato ; no jr nz, Audio1_vibrato
ld b, 0 ld b, 0
ld hl, wChannelFlags1 ld hl, wChannelFlags1
add hl, bc add hl, bc
@ -382,8 +382,8 @@ Audio1_toggle_perfect_pitch:
jp Audio1_sound_ret jp Audio1_sound_ret
Audio1_vibrato: Audio1_vibrato:
cp $ea ; is this command a vibrato? cp vibrato_cmd
jr nz, Audio1_pitch_slide ; no jr nz, Audio1_pitch_slide
call Audio1_GetNextMusicByte call Audio1_GetNextMusicByte
ld b, 0 ld b, 0
ld hl, wChannelVibratoDelayCounters ld hl, wChannelVibratoDelayCounters
@ -430,8 +430,8 @@ Audio1_vibrato:
jp Audio1_sound_ret jp Audio1_sound_ret
Audio1_pitch_slide: Audio1_pitch_slide:
cp $eb ; is this command a pitch_slide? cp pitch_slide_cmd
jr nz, Audio1_duty_cycle ; no jr nz, Audio1_duty_cycle
call Audio1_GetNextMusicByte call Audio1_GetNextMusicByte
ld b, 0 ld b, 0
ld hl, wChannelPitchSlideLengthModifiers ld hl, wChannelPitchSlideLengthModifiers
@ -461,8 +461,8 @@ Audio1_pitch_slide:
jp Audio1_note_length jp Audio1_note_length
Audio1_duty_cycle: Audio1_duty_cycle:
cp $ec ; is this command a duty_cycle? cp duty_cycle_cmd
jr nz, Audio1_tempo ; no jr nz, Audio1_tempo
call Audio1_GetNextMusicByte call Audio1_GetNextMusicByte
rrca rrca
rrca rrca
@ -474,8 +474,8 @@ Audio1_duty_cycle:
jp Audio1_sound_ret jp Audio1_sound_ret
Audio1_tempo: Audio1_tempo:
cp $ed ; is this command a tempo? cp tempo_cmd
jr nz, Audio1_stereo_panning ; no jr nz, Audio1_stereo_panning
ld a, c ld a, c
cp Ch5 cp Ch5
jr nc, .sfxChannel jr nc, .sfxChannel
@ -503,16 +503,16 @@ Audio1_tempo:
jp Audio1_sound_ret jp Audio1_sound_ret
Audio1_stereo_panning: Audio1_stereo_panning:
cp $ee ; is this command a stereo_panning? cp stereo_panning_cmd
jr nz, Audio1_unknownmusic0xef ; no jr nz, Audio1_unknownmusic0xef
call Audio1_GetNextMusicByte call Audio1_GetNextMusicByte
ld [wStereoPanning], a ; store panning ld [wStereoPanning], a ; store panning
jp Audio1_sound_ret jp Audio1_sound_ret
; this appears to never be used ; this appears to never be used
Audio1_unknownmusic0xef: Audio1_unknownmusic0xef:
cp $ef ; is this command an unknownmusic0xef? cp unknownmusic0xef_cmd
jr nz, Audio1_duty_cycle_pattern ; no jr nz, Audio1_duty_cycle_pattern
call Audio1_GetNextMusicByte call Audio1_GetNextMusicByte
push bc push bc
call Audio1_PlaySound call Audio1_PlaySound
@ -528,8 +528,8 @@ Audio1_unknownmusic0xef:
jp Audio1_sound_ret jp Audio1_sound_ret
Audio1_duty_cycle_pattern: Audio1_duty_cycle_pattern:
cp $fc ; is this command a duty_cycle_pattern? cp duty_cycle_pattern_cmd
jr nz, Audio1_volume ; no jr nz, Audio1_volume
call Audio1_GetNextMusicByte call Audio1_GetNextMusicByte
ld b, 0 ld b, 0
ld hl, wChannelDutyCyclePatterns ld hl, wChannelDutyCyclePatterns
@ -545,15 +545,15 @@ Audio1_duty_cycle_pattern:
jp Audio1_sound_ret jp Audio1_sound_ret
Audio1_volume: Audio1_volume:
cp $f0 ; is this command a volume? cp volume_cmd
jr nz, Audio1_execute_music ; no jr nz, Audio1_execute_music
call Audio1_GetNextMusicByte call Audio1_GetNextMusicByte
ldh [rNR50], a ; store volume ldh [rNR50], a ; store volume
jp Audio1_sound_ret jp Audio1_sound_ret
Audio1_execute_music: Audio1_execute_music:
cp $f8 ; is this command an execute_music? cp execute_music_cmd
jr nz, Audio1_octave ; no jr nz, Audio1_octave
ld b, $0 ld b, $0
ld hl, wChannelFlags2 ld hl, wChannelFlags2
add hl, bc add hl, bc
@ -562,8 +562,8 @@ Audio1_execute_music:
Audio1_octave: Audio1_octave:
and $f0 and $f0
cp $e0 ; is this command an octave? cp octave_cmd
jr nz, Audio1_sfx_note ; no jr nz, Audio1_sfx_note
ld hl, wChannelOctaves ld hl, wChannelOctaves
ld b, 0 ld b, 0
add hl, bc add hl, bc
@ -574,7 +574,7 @@ Audio1_octave:
; sfx_note is either square_note or noise_note depending on the channel ; sfx_note is either square_note or noise_note depending on the channel
Audio1_sfx_note: Audio1_sfx_note:
cp $20 ; is this command a sfx_note? cp sfx_note_cmd
jr nz, Audio1_pitch_sweep jr nz, Audio1_pitch_sweep
ld a, c ld a, c
cp Ch4 ; is this a noise or sfx channel? cp Ch4 ; is this a noise or sfx channel?
@ -630,8 +630,8 @@ Audio1_pitch_sweep:
cp Ch5 cp Ch5
jr c, Audio1_note ; if not a sfx jr c, Audio1_note ; if not a sfx
ld a, d ld a, d
cp $10 ; is this command a pitch_sweep? cp pitch_sweep_cmd
jr nz, Audio1_note ; no jr nz, Audio1_note
ld b, $0 ld b, $0
ld hl, wChannelFlags2 ld hl, wChannelFlags2
add hl, bc add hl, bc
@ -647,12 +647,12 @@ Audio1_note:
jr nz, Audio1_note_length ; if not noise channel jr nz, Audio1_note_length ; if not noise channel
ld a, d ld a, d
and $f0 and $f0
cp $b0 ; is this command a drum_note? cp drum_note_cmd
jr z, .drum_note jr z, .drum_note
jr nc, Audio1_note_length ; no jr nc, Audio1_note_length
; this executes when on the noise channel and ; 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) ; 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) ; and the lower nybble is the length minus 1 (0-15)
; however, this doesn't work for instrument #2 because the command id ; however, this doesn't work for instrument #2 because the command id
@ -748,7 +748,7 @@ Audio1_note_length:
Audio1_note_pitch: Audio1_note_pitch:
pop af pop af
and $f0 and $f0
cp $c0 ; compare to rest cp rest_cmd
jr nz, .notRest jr nz, .notRest
ld a, c ld a, c
cp Ch5 cp Ch5
@ -1330,7 +1330,7 @@ Audio1_CalculateFrequency:
Audio1_PlaySound:: Audio1_PlaySound::
ld [wSoundID], a ld [wSoundID], a
cp $ff cp SFX_STOP_ALL_MUSIC
jp z, .stopAllAudio jp z, .stopAllAudio
cp MAX_SFX_ID_1 cp MAX_SFX_ID_1
jp z, .playSfx jp z, .playSfx

View file

@ -43,7 +43,7 @@ Audio2_ApplyMusicAffects:
ld hl, wChannelNoteDelayCounters ; delay until next note ld hl, wChannelNoteDelayCounters ; delay until next note
add hl, bc add hl, bc
ld a, [hl] 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 jp z, Audio2_PlayNextNote
dec a ; otherwise, decrease the delay timer dec a ; otherwise, decrease the delay timer
ld [hl], a ld [hl], a
@ -174,8 +174,8 @@ Audio2_PlayNextNote:
Audio2_sound_ret: Audio2_sound_ret:
call Audio2_GetNextMusicByte call Audio2_GetNextMusicByte
ld d, a ld d, a
cp $ff ; is this command a sound_ret? cp sound_ret_cmd
jp nz, Audio2_sound_call ; no jp nz, Audio2_sound_call
ld b, 0 ld b, 0
ld hl, wChannelFlags1 ld hl, wChannelFlags1
add hl, bc add hl, bc
@ -262,8 +262,8 @@ Audio2_sound_ret:
ret ret
Audio2_sound_call: Audio2_sound_call:
cp $fd ; is this command a sound_call? cp sound_call_cmd
jp nz, Audio2_sound_loop ; no jp nz, Audio2_sound_loop
call Audio2_GetNextMusicByte call Audio2_GetNextMusicByte
push af push af
call Audio2_GetNextMusicByte call Audio2_GetNextMusicByte
@ -299,8 +299,8 @@ Audio2_sound_call:
jp Audio2_sound_ret jp Audio2_sound_ret
Audio2_sound_loop: Audio2_sound_loop:
cp $fe ; is this command a sound_loop? cp sound_loop_cmd
jp nz, Audio2_note_type ; no jp nz, Audio2_note_type
call Audio2_GetNextMusicByte call Audio2_GetNextMusicByte
ld e, a ld e, a
and a and a
@ -338,8 +338,8 @@ Audio2_sound_loop:
Audio2_note_type: Audio2_note_type:
and $f0 and $f0
cp $d0 ; is this command a note_type? cp note_type_cmd
jp nz, Audio2_toggle_perfect_pitch ; no jp nz, Audio2_toggle_perfect_pitch
ld a, d ld a, d
and $f and $f
ld b, $0 ld b, $0
@ -382,8 +382,8 @@ Audio2_note_type:
Audio2_toggle_perfect_pitch: Audio2_toggle_perfect_pitch:
ld a, d ld a, d
cp $e8 ; is this command a toggle_perfect_pitch? cp toggle_perfect_pitch_cmd
jr nz, Audio2_vibrato ; no jr nz, Audio2_vibrato
ld b, 0 ld b, 0
ld hl, wChannelFlags1 ld hl, wChannelFlags1
add hl, bc add hl, bc
@ -393,8 +393,8 @@ Audio2_toggle_perfect_pitch:
jp Audio2_sound_ret jp Audio2_sound_ret
Audio2_vibrato: Audio2_vibrato:
cp $ea ; is this command a vibrato? cp vibrato_cmd
jr nz, Audio2_pitch_slide ; no jr nz, Audio2_pitch_slide
call Audio2_GetNextMusicByte call Audio2_GetNextMusicByte
ld b, 0 ld b, 0
ld hl, wChannelVibratoDelayCounters ld hl, wChannelVibratoDelayCounters
@ -441,8 +441,8 @@ Audio2_vibrato:
jp Audio2_sound_ret jp Audio2_sound_ret
Audio2_pitch_slide: Audio2_pitch_slide:
cp $eb ; is this command a pitch_slide? cp pitch_slide_cmd
jr nz, Audio2_duty_cycle ; no jr nz, Audio2_duty_cycle
call Audio2_GetNextMusicByte call Audio2_GetNextMusicByte
ld b, 0 ld b, 0
ld hl, wChannelPitchSlideLengthModifiers ld hl, wChannelPitchSlideLengthModifiers
@ -472,8 +472,8 @@ Audio2_pitch_slide:
jp Audio2_note_length jp Audio2_note_length
Audio2_duty_cycle: Audio2_duty_cycle:
cp $ec ; is this command a duty_cycle? cp duty_cycle_cmd
jr nz, Audio2_tempo ; no jr nz, Audio2_tempo
call Audio2_GetNextMusicByte call Audio2_GetNextMusicByte
rrca rrca
rrca rrca
@ -485,8 +485,8 @@ Audio2_duty_cycle:
jp Audio2_sound_ret jp Audio2_sound_ret
Audio2_tempo: Audio2_tempo:
cp $ed ; is this command a tempo? cp tempo_cmd
jr nz, Audio2_stereo_panning ; no jr nz, Audio2_stereo_panning
ld a, c ld a, c
cp Ch5 cp Ch5
jr nc, .sfxChannel jr nc, .sfxChannel
@ -514,16 +514,16 @@ Audio2_tempo:
jp Audio2_sound_ret jp Audio2_sound_ret
Audio2_stereo_panning: Audio2_stereo_panning:
cp $ee ; is this command a stereo_panning? cp stereo_panning_cmd
jr nz, Audio2_unknownmusic0xef ; no jr nz, Audio2_unknownmusic0xef
call Audio2_GetNextMusicByte call Audio2_GetNextMusicByte
ld [wStereoPanning], a ; store panning ld [wStereoPanning], a ; store panning
jp Audio2_sound_ret jp Audio2_sound_ret
; this appears to never be used ; this appears to never be used
Audio2_unknownmusic0xef: Audio2_unknownmusic0xef:
cp $ef ; is this command an unknownmusic0xef? cp unknownmusic0xef_cmd
jr nz, Audio2_duty_cycle_pattern ; no jr nz, Audio2_duty_cycle_pattern
call Audio2_GetNextMusicByte call Audio2_GetNextMusicByte
push bc push bc
call Audio2_PlaySound call Audio2_PlaySound
@ -539,8 +539,8 @@ Audio2_unknownmusic0xef:
jp Audio2_sound_ret jp Audio2_sound_ret
Audio2_duty_cycle_pattern: Audio2_duty_cycle_pattern:
cp $fc ; is this command a duty_cycle_pattern? cp duty_cycle_pattern_cmd
jr nz, Audio2_volume ; no jr nz, Audio2_volume
call Audio2_GetNextMusicByte call Audio2_GetNextMusicByte
ld b, 0 ld b, 0
ld hl, wChannelDutyCyclePatterns ld hl, wChannelDutyCyclePatterns
@ -556,15 +556,15 @@ Audio2_duty_cycle_pattern:
jp Audio2_sound_ret jp Audio2_sound_ret
Audio2_volume: Audio2_volume:
cp $f0 ; is this command a volume? cp volume_cmd
jr nz, Audio2_execute_music ; no jr nz, Audio2_execute_music
call Audio2_GetNextMusicByte call Audio2_GetNextMusicByte
ldh [rNR50], a ; store volume ldh [rNR50], a ; store volume
jp Audio2_sound_ret jp Audio2_sound_ret
Audio2_execute_music: Audio2_execute_music:
cp $f8 ; is this command an execute_music? cp execute_music_cmd
jr nz, Audio2_octave ; no jr nz, Audio2_octave
ld b, $0 ld b, $0
ld hl, wChannelFlags2 ld hl, wChannelFlags2
add hl, bc add hl, bc
@ -573,8 +573,8 @@ Audio2_execute_music:
Audio2_octave: Audio2_octave:
and $f0 and $f0
cp $e0 ; is this command an octave? cp octave_cmd
jr nz, Audio2_sfx_note ; no jr nz, Audio2_sfx_note
ld hl, wChannelOctaves ld hl, wChannelOctaves
ld b, 0 ld b, 0
add hl, bc add hl, bc
@ -585,7 +585,7 @@ Audio2_octave:
; sfx_note is either square_note or noise_note depending on the channel ; sfx_note is either square_note or noise_note depending on the channel
Audio2_sfx_note: Audio2_sfx_note:
cp $20 ; is this command a sfx_note? cp sfx_note_cmd
jr nz, Audio2_pitch_sweep jr nz, Audio2_pitch_sweep
ld a, c ld a, c
cp Ch4 ; is this a noise or sfx channel? cp Ch4 ; is this a noise or sfx channel?
@ -641,8 +641,8 @@ Audio2_pitch_sweep:
cp Ch5 cp Ch5
jr c, Audio2_note ; if not a sfx jr c, Audio2_note ; if not a sfx
ld a, d ld a, d
cp $10 ; is this command a pitch_sweep? cp pitch_sweep_cmd
jr nz, Audio2_note ; no jr nz, Audio2_note
ld b, $0 ld b, $0
ld hl, wChannelFlags2 ld hl, wChannelFlags2
add hl, bc add hl, bc
@ -658,12 +658,12 @@ Audio2_note:
jr nz, Audio2_note_length ; if not noise channel jr nz, Audio2_note_length ; if not noise channel
ld a, d ld a, d
and $f0 and $f0
cp $b0 ; is this command a drum_note? cp drum_note_cmd
jr z, .drum_note jr z, .drum_note
jr nc, Audio2_note_length ; no jr nc, Audio2_note_length
; this executes when on the noise channel and ; 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) ; 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) ; and the lower nybble is the length minus 1 (0-15)
; however, this doesn't work for instrument #2 because the command id ; however, this doesn't work for instrument #2 because the command id
@ -759,7 +759,7 @@ Audio2_note_length:
Audio2_note_pitch: Audio2_note_pitch:
pop af pop af
and $f0 and $f0
cp $c0 ; compare to rest cp rest_cmd
jr nz, .notRest jr nz, .notRest
ld a, c ld a, c
cp Ch5 cp Ch5
@ -1393,7 +1393,7 @@ Audio2_CalculateFrequency:
Audio2_PlaySound:: Audio2_PlaySound::
ld [wSoundID], a ld [wSoundID], a
cp $ff cp SFX_STOP_ALL_MUSIC
jp z, .stopAllAudio jp z, .stopAllAudio
cp MAX_SFX_ID_2 cp MAX_SFX_ID_2
jp z, .playSfx jp z, .playSfx

View file

@ -41,7 +41,7 @@ Audio3_ApplyMusicAffects:
ld hl, wChannelNoteDelayCounters ; delay until next note ld hl, wChannelNoteDelayCounters ; delay until next note
add hl, bc add hl, bc
ld a, [hl] 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 jp z, Audio3_PlayNextNote
dec a ; otherwise, decrease the delay timer dec a ; otherwise, decrease the delay timer
ld [hl], a ld [hl], a
@ -163,8 +163,8 @@ Audio3_PlayNextNote:
Audio3_sound_ret: Audio3_sound_ret:
call Audio3_GetNextMusicByte call Audio3_GetNextMusicByte
ld d, a ld d, a
cp $ff ; is this command a sound_ret? cp sound_ret_cmd
jp nz, Audio3_sound_call ; no jp nz, Audio3_sound_call
ld b, 0 ld b, 0
ld hl, wChannelFlags1 ld hl, wChannelFlags1
add hl, bc add hl, bc
@ -251,8 +251,8 @@ Audio3_sound_ret:
ret ret
Audio3_sound_call: Audio3_sound_call:
cp $fd ; is this command a sound_call? cp sound_call_cmd
jp nz, Audio3_sound_loop ; no jp nz, Audio3_sound_loop
call Audio3_GetNextMusicByte call Audio3_GetNextMusicByte
push af push af
call Audio3_GetNextMusicByte call Audio3_GetNextMusicByte
@ -288,8 +288,8 @@ Audio3_sound_call:
jp Audio3_sound_ret jp Audio3_sound_ret
Audio3_sound_loop: Audio3_sound_loop:
cp $fe ; is this command a sound_loop? cp sound_loop_cmd
jp nz, Audio3_note_type ; no jp nz, Audio3_note_type
call Audio3_GetNextMusicByte call Audio3_GetNextMusicByte
ld e, a ld e, a
and a and a
@ -327,8 +327,8 @@ Audio3_sound_loop:
Audio3_note_type: Audio3_note_type:
and $f0 and $f0
cp $d0 ; is this command a note_type? cp note_type_cmd
jp nz, Audio3_toggle_perfect_pitch ; no jp nz, Audio3_toggle_perfect_pitch
ld a, d ld a, d
and $f and $f
ld b, $0 ld b, $0
@ -371,8 +371,8 @@ Audio3_note_type:
Audio3_toggle_perfect_pitch: Audio3_toggle_perfect_pitch:
ld a, d ld a, d
cp $e8 ; is this command a toggle_perfect_pitch? cp toggle_perfect_pitch_cmd
jr nz, Audio3_vibrato ; no jr nz, Audio3_vibrato
ld b, 0 ld b, 0
ld hl, wChannelFlags1 ld hl, wChannelFlags1
add hl, bc add hl, bc
@ -382,8 +382,8 @@ Audio3_toggle_perfect_pitch:
jp Audio3_sound_ret jp Audio3_sound_ret
Audio3_vibrato: Audio3_vibrato:
cp $ea ; is this command a vibrato? cp vibrato_cmd
jr nz, Audio3_pitch_slide ; no jr nz, Audio3_pitch_slide
call Audio3_GetNextMusicByte call Audio3_GetNextMusicByte
ld b, 0 ld b, 0
ld hl, wChannelVibratoDelayCounters ld hl, wChannelVibratoDelayCounters
@ -430,8 +430,8 @@ Audio3_vibrato:
jp Audio3_sound_ret jp Audio3_sound_ret
Audio3_pitch_slide: Audio3_pitch_slide:
cp $eb ; is this command a pitch_slide? cp pitch_slide_cmd
jr nz, Audio3_duty_cycle ; no jr nz, Audio3_duty_cycle
call Audio3_GetNextMusicByte call Audio3_GetNextMusicByte
ld b, 0 ld b, 0
ld hl, wChannelPitchSlideLengthModifiers ld hl, wChannelPitchSlideLengthModifiers
@ -461,8 +461,8 @@ Audio3_pitch_slide:
jp Audio3_note_length jp Audio3_note_length
Audio3_duty_cycle: Audio3_duty_cycle:
cp $ec ; is this command a duty_cycle? cp duty_cycle_cmd
jr nz, Audio3_tempo ; no jr nz, Audio3_tempo
call Audio3_GetNextMusicByte call Audio3_GetNextMusicByte
rrca rrca
rrca rrca
@ -474,8 +474,8 @@ Audio3_duty_cycle:
jp Audio3_sound_ret jp Audio3_sound_ret
Audio3_tempo: Audio3_tempo:
cp $ed ; is this command a tempo? cp tempo_cmd
jr nz, Audio3_stereo_panning ; no jr nz, Audio3_stereo_panning
ld a, c ld a, c
cp Ch5 cp Ch5
jr nc, .sfxChannel jr nc, .sfxChannel
@ -503,16 +503,16 @@ Audio3_tempo:
jp Audio3_sound_ret jp Audio3_sound_ret
Audio3_stereo_panning: Audio3_stereo_panning:
cp $ee ; is this command a stereo_panning? cp stereo_panning_cmd
jr nz, Audio3_unknownmusic0xef ; no jr nz, Audio3_unknownmusic0xef
call Audio3_GetNextMusicByte call Audio3_GetNextMusicByte
ld [wStereoPanning], a ; store panning ld [wStereoPanning], a ; store panning
jp Audio3_sound_ret jp Audio3_sound_ret
; this appears to never be used ; this appears to never be used
Audio3_unknownmusic0xef: Audio3_unknownmusic0xef:
cp $ef ; is this command an unknownmusic0xef? cp unknownmusic0xef_cmd
jr nz, Audio3_duty_cycle_pattern ; no jr nz, Audio3_duty_cycle_pattern
call Audio3_GetNextMusicByte call Audio3_GetNextMusicByte
push bc push bc
call Audio3_PlaySound call Audio3_PlaySound
@ -528,8 +528,8 @@ Audio3_unknownmusic0xef:
jp Audio3_sound_ret jp Audio3_sound_ret
Audio3_duty_cycle_pattern: Audio3_duty_cycle_pattern:
cp $fc ; is this command a duty_cycle_pattern? cp duty_cycle_pattern_cmd
jr nz, Audio3_volume ; no jr nz, Audio3_volume
call Audio3_GetNextMusicByte call Audio3_GetNextMusicByte
ld b, 0 ld b, 0
ld hl, wChannelDutyCyclePatterns ld hl, wChannelDutyCyclePatterns
@ -545,15 +545,15 @@ Audio3_duty_cycle_pattern:
jp Audio3_sound_ret jp Audio3_sound_ret
Audio3_volume: Audio3_volume:
cp $f0 ; is this command a volume? cp volume_cmd
jr nz, Audio3_execute_music ; no jr nz, Audio3_execute_music
call Audio3_GetNextMusicByte call Audio3_GetNextMusicByte
ldh [rNR50], a ; store volume ldh [rNR50], a ; store volume
jp Audio3_sound_ret jp Audio3_sound_ret
Audio3_execute_music: Audio3_execute_music:
cp $f8 ; is this command an execute_music? cp execute_music_cmd
jr nz, Audio3_octave ; no jr nz, Audio3_octave
ld b, $0 ld b, $0
ld hl, wChannelFlags2 ld hl, wChannelFlags2
add hl, bc add hl, bc
@ -562,8 +562,8 @@ Audio3_execute_music:
Audio3_octave: Audio3_octave:
and $f0 and $f0
cp $e0 ; is this command an octave? cp octave_cmd
jr nz, Audio3_sfx_note ; no jr nz, Audio3_sfx_note
ld hl, wChannelOctaves ld hl, wChannelOctaves
ld b, 0 ld b, 0
add hl, bc add hl, bc
@ -574,7 +574,7 @@ Audio3_octave:
; sfx_note is either square_note or noise_note depending on the channel ; sfx_note is either square_note or noise_note depending on the channel
Audio3_sfx_note: Audio3_sfx_note:
cp $20 ; is this command a sfx_note? cp sfx_note_cmd
jr nz, Audio3_pitch_sweep jr nz, Audio3_pitch_sweep
ld a, c ld a, c
cp Ch4 ; is this a noise or sfx channel? cp Ch4 ; is this a noise or sfx channel?
@ -630,8 +630,8 @@ Audio3_pitch_sweep:
cp Ch5 cp Ch5
jr c, Audio3_note ; if not a sfx jr c, Audio3_note ; if not a sfx
ld a, d ld a, d
cp $10 ; is this command a pitch_sweep? cp pitch_sweep_cmd
jr nz, Audio3_note ; no jr nz, Audio3_note
ld b, $0 ld b, $0
ld hl, wChannelFlags2 ld hl, wChannelFlags2
add hl, bc add hl, bc
@ -647,12 +647,12 @@ Audio3_note:
jr nz, Audio3_note_length ; if not noise channel jr nz, Audio3_note_length ; if not noise channel
ld a, d ld a, d
and $f0 and $f0
cp $b0 ; is this command a drum_note? cp drum_note_cmd
jr z, .drum_note jr z, .drum_note
jr nc, Audio3_note_length ; no jr nc, Audio3_note_length
; this executes when on the noise channel and ; 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) ; 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) ; and the lower nybble is the length minus 1 (0-15)
; however, this doesn't work for instrument #2 because the command id ; however, this doesn't work for instrument #2 because the command id
@ -748,7 +748,7 @@ Audio3_note_length:
Audio3_note_pitch: Audio3_note_pitch:
pop af pop af
and $f0 and $f0
cp $c0 ; compare to rest cp rest_cmd
jr nz, .notRest jr nz, .notRest
ld a, c ld a, c
cp Ch5 cp Ch5
@ -1330,7 +1330,7 @@ Audio3_CalculateFrequency:
Audio3_PlaySound:: Audio3_PlaySound::
ld [wSoundID], a ld [wSoundID], a
cp $ff cp SFX_STOP_ALL_MUSIC
jp z, .stopAllAudio jp z, .stopAllAudio
cp MAX_SFX_ID_3 cp MAX_SFX_ID_3
jp z, .playSfx jp z, .playSfx

View file

@ -39,6 +39,10 @@ SLP EQU %111 ; sleep counter
MAX_STAT_VALUE EQU 999 MAX_STAT_VALUE EQU 999
; trainer dvs
ATKDEFDV_TRAINER EQU $98
SPDSPCDV_TRAINER EQU $88
; volatile statuses 1 ; volatile statuses 1
const_def const_def
const STORING_ENERGY ; 0 ; Bide const STORING_ENERGY ; 0 ; Bide

View file

@ -8,6 +8,7 @@
const BIT_D_UP const BIT_D_UP
const BIT_D_DOWN const BIT_D_DOWN
NO_INPUT EQU 0
A_BUTTON EQU 1 << BIT_A_BUTTON A_BUTTON EQU 1 << BIT_A_BUTTON
B_BUTTON EQU 1 << BIT_B_BUTTON B_BUTTON EQU 1 << BIT_B_BUTTON
SELECT EQU 1 << BIT_SELECT SELECT EQU 1 << BIT_SELECT

View file

@ -12,6 +12,19 @@ SLOTSFISH EQU $0E0C
SLOTSBIRD EQU $1210 SLOTSBIRD EQU $1210
SLOTSMOUSE EQU $1614 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 ; in game trade dialog sets
const_def const_def
const TRADE_DIALOGSET_CASUAL const TRADE_DIALOGSET_CASUAL
@ -30,3 +43,9 @@ SLOTSMOUSE EQU $1614
const BIT_VOLCANOBADGE ; 6 const BIT_VOLCANOBADGE ; 6
const BIT_EARTHBADGE ; 7 const BIT_EARTHBADGE ; 7
NUM_BADGES EQU const_value 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

View file

@ -11,6 +11,8 @@
const NPC_MOVEMENT_LEFT ; $80 const NPC_MOVEMENT_LEFT ; $80
const NPC_MOVEMENT_RIGHT ; $C0 const NPC_MOVEMENT_RIGHT ; $C0
NPC_CHANGE_FACING EQU $E0
; player direction constants ; player direction constants
const_def const_def
const PLAYER_DIR_BIT_RIGHT ; 0 const PLAYER_DIR_BIT_RIGHT ; 0

View file

@ -6104,8 +6104,8 @@ LoadEnemyMonData:
ld a, [wIsInBattle] ld a, [wIsInBattle]
cp $2 ; is it a trainer battle? cp $2 ; is it a trainer battle?
; fixed DVs for trainer mon ; fixed DVs for trainer mon
ld a, $98 ld a, ATKDEFDV_TRAINER
ld b, $88 ld b, SPDSPCDV_TRAINER
jr z, .storeDVs jr z, .storeDVs
; random DVs for wild mon ; random DVs for wild mon
call BattleRandom call BattleRandom

View file

@ -3,7 +3,7 @@ OpenPokemonCenterPC:
cp SPRITE_FACING_UP cp SPRITE_FACING_UP
ret nz ret nz
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $1 ld a, TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
tx_pre_jump PokemonCenterPCText tx_pre_jump PokemonCenterPCText

View file

@ -25,22 +25,22 @@ OaksAideScript:
jr nc, .bagFull jr nc, .bagFull
ld hl, OaksAideGotItemText ld hl, OaksAideGotItemText
call PrintText call PrintText
ld a, $1 ld a, OAKS_AIDE_GOT_ITEM
jr .done jr .done
.bagFull .bagFull
ld hl, OaksAideNoRoomText ld hl, OaksAideNoRoomText
call PrintText call PrintText
xor a xor a ; OAKS_AIDE_BAG_FULL
jr .done jr .done
.notEnoughOwnedMons .notEnoughOwnedMons
ld hl, OaksAideUhOhText ld hl, OaksAideUhOhText
call PrintText call PrintText
ld a, $80 ld a, OAKS_AIDE_NOT_ENOUGH_MONS
jr .done jr .done
.choseNo .choseNo
ld hl, OaksAideComeBackText ld hl, OaksAideComeBackText
call PrintText call PrintText
ld a, $ff ld a, OAKS_AIDE_REFUSED
.done .done
ldh [hOaksAideResult], a ldh [hOaksAideResult], a
ret ret

View file

@ -222,9 +222,9 @@ LinkMenu:
ld a, START_TRANSFER_INTERNAL_CLOCK ld a, START_TRANSFER_INTERNAL_CLOCK
ldh [rSC], a ldh [rSC], a
.skipStartingTransfer .skipStartingTransfer
ld b, $7f ld b, " "
ld c, $7f ld c, " "
ld d, $ec ld d, "▷"
ld a, [wLinkMenuSelectionSendBuffer] ld a, [wLinkMenuSelectionSendBuffer]
and (B_BUTTON << 2) ; was B button pressed? and (B_BUTTON << 2) ; was B button pressed?
jr nz, .updateCursorPosition jr nz, .updateCursorPosition
@ -670,7 +670,7 @@ SetCursorPositionsFromOptions:
ld e, a ld e, a
ld d, 0 ld d, 0
add hl, de add hl, de
ld [hl], $ec ; unfilled right arrow menu cursor ld [hl], "▷"
ret ret
; table that indicates how the 3 text speed options affect frame delays ; table that indicates how the 3 text speed options affect frame delays

View file

@ -128,21 +128,21 @@ PalletMovementScript_WalkToLab:
ret ret
RLEList_ProfOakWalkToLab: RLEList_ProfOakWalkToLab:
db NPC_MOVEMENT_DOWN, $05 db NPC_MOVEMENT_DOWN, 5
db NPC_MOVEMENT_LEFT, $01 db NPC_MOVEMENT_LEFT, 1
db NPC_MOVEMENT_DOWN, $05 db NPC_MOVEMENT_DOWN, 5
db NPC_MOVEMENT_RIGHT, $03 db NPC_MOVEMENT_RIGHT, 3
db NPC_MOVEMENT_UP, $01 db NPC_MOVEMENT_UP, 1
db $E0, $01 ; stand still db NPC_CHANGE_FACING, 1
db $FF db -1 ; end
RLEList_PlayerWalkToLab: RLEList_PlayerWalkToLab:
db D_UP, $02 db D_UP, 2
db D_RIGHT, $03 db D_RIGHT, 3
db D_DOWN, $05 db D_DOWN, 5
db D_LEFT, $01 db D_LEFT, 1
db D_DOWN, $06 db D_DOWN, 6
db $FF db -1 ; end
PalletMovementScript_Done: PalletMovementScript_Done:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]
@ -190,18 +190,18 @@ PewterMovementScript_WalkToMuseum:
ret ret
RLEList_PewterMuseumPlayer: RLEList_PewterMuseumPlayer:
db 0, $01 db NO_INPUT, 1
db D_UP, $03 db D_UP, 3
db D_LEFT, $0D db D_LEFT, 13
db D_UP, $06 db D_UP, 6
db $FF db -1 ; end
RLEList_PewterMuseumGuy: RLEList_PewterMuseumGuy:
db NPC_MOVEMENT_UP, $06 db NPC_MOVEMENT_UP, 6
db NPC_MOVEMENT_LEFT, $0D db NPC_MOVEMENT_LEFT, 13
db NPC_MOVEMENT_UP, $03 db NPC_MOVEMENT_UP, 3
db NPC_MOVEMENT_LEFT, $01 db NPC_MOVEMENT_LEFT, 1
db $FF db -1 ; end
PewterMovementScript_Done: PewterMovementScript_Done:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]
@ -249,22 +249,22 @@ PewterMovementScript_WalkToGym:
ret ret
RLEList_PewterGymPlayer: RLEList_PewterGymPlayer:
db 0, $01 db NO_INPUT, 1
db D_RIGHT, $02 db D_RIGHT, 2
db D_DOWN, $05 db D_DOWN, 5
db D_LEFT, $0B db D_LEFT, 11
db D_UP, $05 db D_UP, 5
db D_LEFT, $0F db D_LEFT, 15
db $FF db -1 ; end
RLEList_PewterGymGuy: RLEList_PewterGymGuy:
db NPC_MOVEMENT_DOWN, $02 db NPC_MOVEMENT_DOWN, 2
db NPC_MOVEMENT_LEFT, $0F db NPC_MOVEMENT_LEFT, 15
db NPC_MOVEMENT_UP, $05 db NPC_MOVEMENT_UP, 5
db NPC_MOVEMENT_LEFT, $0B db NPC_MOVEMENT_LEFT, 11
db NPC_MOVEMENT_DOWN, $05 db NPC_MOVEMENT_DOWN, 5
db NPC_MOVEMENT_RIGHT, $03 db NPC_MOVEMENT_RIGHT, 3
db $FF db -1 ; end
FreezeEnemyTrainerSprite:: FreezeEnemyTrainerSprite::
ld a, [wCurMap] ld a, [wCurMap]
@ -275,7 +275,7 @@ FreezeEnemyTrainerSprite::
ld b, a ld b, a
.loop .loop
ld a, [hli] ld a, [hli]
cp $ff cp -1
jr z, .notRival jr z, .notRival
cp b cp b
ret z ; the rival leaves after battling, so don't freeze him ret z ; the rival leaves after battling, so don't freeze him
@ -289,4 +289,4 @@ RivalIDs:
db OPP_SONY1 db OPP_SONY1
db OPP_SONY2 db OPP_SONY2
db OPP_SONY3 db OPP_SONY3
db $ff db -1 ; end

View file

@ -169,7 +169,7 @@ UpdateNPCSprite:
pop hl pop hl
ld de, wNPCMovementDirections ld de, wNPCMovementDirections
call LoadDEPlusA ; a = [wNPCMovementDirections + movement byte 1] call LoadDEPlusA ; a = [wNPCMovementDirections + movement byte 1]
cp $e0 cp NPC_CHANGE_FACING
jp z, ChangeFacingDirection jp z, ChangeFacingDirection
cp STAY cp STAY
jr nz, .next jr nz, .next

View file

@ -75,8 +75,8 @@ _AddPartyMon::
push hl push hl
ld a, [wMonDataLocation] ld a, [wMonDataLocation]
and $f and $f
ld a, $98 ; set enemy trainer mon IVs to fixed average values ld a, ATKDEFDV_TRAINER ; set enemy trainer mon IVs to fixed average values
ld b, $88 ld b, SPDSPCDV_TRAINER
jr nz, .next4 jr nz, .next4
; If the mon is being added to the player's party, update the pokedex. ; If the mon is being added to the player's party, update the pokedex.

View file

@ -1,6 +1,6 @@
PromptUserToPlaySlots: PromptUserToPlaySlots:
call SaveScreenTilesToBuffer2 call SaveScreenTilesToBuffer2
ld a, BANK(DisplayTextIDInit) ld a, BANK(DisplayTextIDInit) ; TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
ld b, a ld b, a
ld hl, DisplayTextIDInit ld hl, DisplayTextIDInit

View file

@ -504,7 +504,7 @@ PrintListMenuEntries::
cp c ; is it this item? cp c ; is it this item?
jr nz, .nextListEntry jr nz, .nextListEntry
dec hl dec hl
ld a, $ec ; unfilled right arrow menu cursor to indicate an item being swapped ld a, "▷"
ld [hli], a ld [hli], a
.nextListEntry .nextListEntry
ld bc, 2 * SCREEN_WIDTH ; 2 rows ld bc, 2 * SCREEN_WIDTH ; 2 rows

View file

@ -25,7 +25,7 @@ MoveSprite_::
ld [hli], a ld [hli], a
inc de inc de
inc c 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 jr nz, .loop
ld a, c ld a, c

View file

@ -201,7 +201,7 @@ PlaceUnfilledArrowMenuCursor::
ld l, a ld l, a
ld a, [wMenuCursorLocation + 1] ld a, [wMenuCursorLocation + 1]
ld h, a ld h, a
ld [hl], $ec ; outline of right arrow ld [hl], "▷"
ld a, b ld a, b
ret ret
@ -272,7 +272,7 @@ EnableAutoTextBoxDrawing::
jr AutoTextBoxDrawingCommon jr AutoTextBoxDrawingCommon
DisableAutoTextBoxDrawing:: DisableAutoTextBoxDrawing::
ld a, $01 ld a, TRUE
AutoTextBoxDrawingCommon:: AutoTextBoxDrawingCommon::
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a

View file

@ -83,3 +83,8 @@ lda_coord: MACRO
ld a, [(\2) * SCREEN_WIDTH + (\1) + wTileMap] ld a, [(\2) * SCREEN_WIDTH + (\1) + wTileMap]
ENDC ENDC
ENDM ENDM
dbmapcoord: MACRO
; x, y
db \2, \1
ENDM

View file

@ -15,14 +15,17 @@ audio_header: MACRO
ENDC ENDC
ENDM ENDM
const_def $10
; arguments: length [0, 7], pitch change [-7, 7] ; arguments: length [0, 7], pitch change [-7, 7]
; length: length of time between pitch shifts ; length: length of time between pitch shifts
; sometimes used with a value >7 in which case the MSB is ignored ; sometimes used with a value >7 in which case the MSB is ignored
; pitch change: positive value means increase in pitch, negative value means decrease in pitch ; pitch change: positive value means increase in pitch, negative value means decrease in pitch
; small magnitude means quick change, large magnitude means slow change ; 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 ; in signed magnitude representation, so a value of 8 is the same as (negative) 0
const pitch_sweep_cmd ; $10
pitch_sweep: MACRO pitch_sweep: MACRO
db $10 db pitch_sweep_cmd
IF \2 < 0 IF \2 < 0
db (\1 << 4) | (%1000 | (\2 * -1)) db (\1 << 4) | (%1000 | (\2 * -1))
ELSE ELSE
@ -30,12 +33,17 @@ pitch_sweep: MACRO
ENDC ENDC
ENDM ENDM
const_next $20
const sfx_note_cmd ; $20
; arguments: length [0, 15], volume [0, 15], fade [-7, 7], frequency ; arguments: length [0, 15], volume [0, 15], fade [-7, 7], frequency
; fade: positive value means decrease in volume, negative value means increase in volume ; fade: positive value means decrease in volume, negative value means increase in volume
; small magnitude means quick change, large magnitude means slow change ; 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 ; 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 square_note: MACRO
db $20 | \1 db square_note_cmd | \1
IF \3 < 0 IF \3 < 0
db (\2 << 4) | (%1000 | (\3 * -1)) db (\2 << 4) | (%1000 | (\3 * -1))
ELSE ELSE
@ -48,8 +56,9 @@ ENDM
; fade: positive value means decrease in volume, negative value means increase in volume ; fade: positive value means decrease in volume, negative value means increase in volume
; small magnitude means quick change, large magnitude means slow change ; 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 ; 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 noise_note: MACRO
db $20 | \1 db noise_note_cmd | \1
IF \3 < 0 IF \3 < 0
db (\2 << 4) | (%1000 | (\3 * -1)) db (\2 << 4) | (%1000 | (\3 * -1))
ELSE ELSE
@ -63,9 +72,12 @@ note: MACRO
db (\1 << 4) | (\2 - 1) db (\1 << 4) | (\2 - 1)
ENDM ENDM
const_next $b0
; arguments: instrument [1, 19], length [1, 16] ; arguments: instrument [1, 19], length [1, 16]
const drum_note_cmd ; $b0
drum_note: MACRO drum_note: MACRO
db $B0 | (\2 - 1) db drum_note_cmd | (\2 - 1)
db \1 db \1
ENDM ENDM
@ -77,17 +89,23 @@ drum_note_short: MACRO
db (\1 << 4) | (\2 - 1) db (\1 << 4) | (\2 - 1)
ENDM ENDM
const_next $c0
; arguments: length [1, 16] ; arguments: length [1, 16]
const rest_cmd ; $c0
rest: MACRO rest: MACRO
db $C0 | (\1 - 1) db rest_cmd | (\1 - 1)
ENDM ENDM
const_next $d0
; arguments: speed [0, 15], volume [0, 15], fade [-7, 7] ; arguments: speed [0, 15], volume [0, 15], fade [-7, 7]
; fade: positive value means decrease in volume, negative value means increase in volume ; fade: positive value means decrease in volume, negative value means increase in volume
; small magnitude means quick change, large magnitude means slow change ; 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 ; in signed magnitude representation, so a value of 8 is the same as (negative) 0
const note_type_cmd ; $d0
note_type: MACRO note_type: MACRO
db $D0 | \1 db note_type_cmd | \1
IF \3 < 0 IF \3 < 0
db (\2 << 4) | (%1000 | (\3 * -1)) db (\2 << 4) | (%1000 | (\3 * -1))
ELSE ELSE
@ -96,40 +114,52 @@ note_type: MACRO
ENDM ENDM
; arguments: speed [0, 15] ; arguments: speed [0, 15]
drum_speed_cmd EQU note_type_cmd ; $d0
drum_speed: MACRO drum_speed: MACRO
db $D0 | \1 db drum_speed_cmd | \1
ENDM ENDM
const_next $e0
; arguments: octave [1, 8] ; arguments: octave [1, 8]
const octave_cmd ; $e0
octave: MACRO octave: MACRO
db $E8 - \1 db octave_cmd | (8 - \1)
ENDM ENDM
const_next $e8
; when enabled, effective frequency used is incremented by 1 ; when enabled, effective frequency used is incremented by 1
const toggle_perfect_pitch_cmd ; $e8
toggle_perfect_pitch: MACRO toggle_perfect_pitch: MACRO
db $E8 db toggle_perfect_pitch_cmd
ENDM ENDM
const_skip ; $e9
; arguments: delay [0, 255], depth [0, 15], rate [0, 15] ; arguments: delay [0, 255], depth [0, 15], rate [0, 15]
; delay: time delay until vibrato effect begins ; delay: time delay until vibrato effect begins
; depth: amplitude of vibrato wave ; depth: amplitude of vibrato wave
; rate: frequency of vibrato wave ; rate: frequency of vibrato wave
const vibrato_cmd ; $ea
vibrato: MACRO vibrato: MACRO
db $EA db vibrato_cmd
db \1 db \1
db (\2 << 4) | \3 db (\2 << 4) | \3
ENDM ENDM
; arguments: length [1, 256], octave [1, 8], pitch ; arguments: length [1, 256], octave [1, 8], pitch
const pitch_slide_cmd ; $eb
pitch_slide: MACRO pitch_slide: MACRO
db $EB db pitch_slide_cmd
db \1 - 1 db \1 - 1
db ((8 - \2) << 4) | \3 db ((8 - \2) << 4) | \3
ENDM ENDM
; arguments: duty cycle [0, 3] (12.5%, 25%, 50%, 75%) ; arguments: duty cycle [0, 3] (12.5%, 25%, 50%, 75%)
const duty_cycle_cmd ; $ec
duty_cycle: MACRO duty_cycle: MACRO
db $EC db duty_cycle_cmd
db \1 db \1
ENDM ENDM
@ -139,47 +169,65 @@ ENDM
; ideally should be set to $100 or less to guarantee no overflow ; 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 ; if larger than $100, large note speed or note length values might cause overflow
; stored in big endian ; stored in big endian
const tempo_cmd ; $ed
tempo: MACRO tempo: MACRO
db $ED db tempo_cmd
db HIGH(\1), LOW(\1) db HIGH(\1), LOW(\1)
ENDM ENDM
; arguments: left output enable mask, right output enable mask ; arguments: left output enable mask, right output enable mask
const stereo_panning_cmd ; $ee
stereo_panning: MACRO stereo_panning: MACRO
db $EE db stereo_panning_cmd
db (\1 << 4) | \2 db (\1 << 4) | \2
ENDM ENDM
const unknownmusic0xef_cmd ; $ef
unknownmusic0xef: MACRO
db unknownmusic0xef_cmd
db \1
ENDM
; arguments: left master volume [0, 7], right master volume [0, 7] ; arguments: left master volume [0, 7], right master volume [0, 7]
const volume_cmd ; $f0
volume: MACRO volume: MACRO
db $F0 db volume_cmd
db (\1 << 4) | \2 db (\1 << 4) | \2
ENDM ENDM
const_next $f8
; when enabled, the sfx data is interpreted as music data ; when enabled, the sfx data is interpreted as music data
const execute_music_cmd ; $f8
execute_music: MACRO execute_music: MACRO
db $F8 db execute_music_cmd
ENDM ENDM
const_next $fc
; arguments: duty cycle 1, duty cycle 2, duty cycle 3, duty cycle 4 ; arguments: duty cycle 1, duty cycle 2, duty cycle 3, duty cycle 4
const duty_cycle_pattern_cmd ; $fc
duty_cycle_pattern: MACRO duty_cycle_pattern: MACRO
db $FC db duty_cycle_pattern_cmd
db \1 << 6 | \2 << 4 | \3 << 2 | \4 db \1 << 6 | \2 << 4 | \3 << 2 | \4
ENDM ENDM
; arguments: address ; arguments: address
const sound_call_cmd ; $fd
sound_call: MACRO sound_call: MACRO
db $FD db sound_call_cmd
dw \1 dw \1
ENDM ENDM
; arguments: count, address ; arguments: count, address
const sound_loop_cmd ; $fe
sound_loop: MACRO sound_loop: MACRO
db $FE db sound_loop_cmd
db \1 db \1
dw \2 dw \2
ENDM ENDM
const sound_ret_cmd ; $ff
sound_ret: MACRO sound_ret: MACRO
db $FF db sound_ret_cmd
ENDM ENDM

View file

@ -67,6 +67,14 @@ trainer: MACRO
dw \3, \5, \4, \4 dw \3, \5, \4, \4
ENDM ENDM
;\1 x position
;\2 y position
;\3 movement data
map_coord_movement: MACRO
dbmapcoord \1, \2
dw \3
ENDM
;\1 map name ;\1 map name
;\2 map id ;\2 map id

View file

@ -87,11 +87,11 @@ AgathaScript0:
ret ret
AgathaEntranceCoords: AgathaEntranceCoords:
db $0A,$04 dbmapcoord 4, 10
db $0A,$05 dbmapcoord 5, 10
db $0B,$04 dbmapcoord 4, 11
db $0B,$05 dbmapcoord 5, 11
db $FF db -1 ; end
AgathaScript3: AgathaScript3:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -33,7 +33,7 @@ MovementData_1e79c:
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db $FF db -1 ; end
; make Bill walk around the player ; make Bill walk around the player
MovementData_1e7a0: MovementData_1e7a0:
@ -42,7 +42,7 @@ MovementData_1e7a0:
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db $FF db -1 ; end
BillsHouseScript2: BillsHouseScript2:
ld a, [wd730] ld a, [wd730]
@ -93,7 +93,7 @@ MovementData_1e807:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
db $FF db -1 ; end
BillsHouseScript4: BillsHouseScript4:
ld a, [wd730] ld a, [wd730]

View file

@ -10,9 +10,7 @@ BluesHouse_ScriptPointers:
BluesHouseScript0: BluesHouseScript0:
SetEvent EVENT_ENTERED_BLUES_HOUSE SetEvent EVENT_ENTERED_BLUES_HOUSE
ld a, $1
; trigger the next script
ld a, 1
ld [wBluesHouseCurScript], a ld [wBluesHouseCurScript], a
ret ret
@ -20,40 +18,40 @@ BluesHouseScript1:
ret ret
BluesHouse_TextPointers: BluesHouse_TextPointers:
dw BluesHouseText1 dw BluesHouseDaisySittingText
dw BluesHouseText2 dw BluesHouseDaisyWalkingText
dw BluesHouseText3 dw BluesHouseTownMapText
BluesHouseText1: BluesHouseDaisySittingText:
text_asm text_asm
CheckEvent EVENT_GOT_TOWN_MAP CheckEvent EVENT_GOT_TOWN_MAP
jr nz, .GotMap jr nz, .got_town_map
CheckEvent EVENT_GOT_POKEDEX CheckEvent EVENT_GOT_POKEDEX
jr nz, .GiveMap jr nz, .give_town_map
ld hl, DaisyInitialText ld hl, DaisyInitialText
call PrintText call PrintText
jr .done jr .done
.GiveMap .give_town_map
ld hl, DaisyOfferMapText ld hl, DaisyOfferMapText
call PrintText call PrintText
lb bc, TOWN_MAP, 1 lb bc, TOWN_MAP, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld a, HS_TOWN_MAP ld a, HS_TOWN_MAP
ld [wMissableObjectIndex], a ld [wMissableObjectIndex], a
predef HideObject ; hide table map object predef HideObject
ld hl, GotMapText ld hl, GotMapText
call PrintText call PrintText
SetEvent EVENT_GOT_TOWN_MAP SetEvent EVENT_GOT_TOWN_MAP
jr .done jr .done
.GotMap .got_town_map
ld hl, DaisyUseMapText ld hl, DaisyUseMapText
call PrintText call PrintText
jr .done jr .done
.BagFull .bag_full
ld hl, DaisyBagFullText ld hl, DaisyBagFullText
call PrintText call PrintText
.done .done
@ -80,10 +78,10 @@ DaisyUseMapText:
text_far _DaisyUseMapText text_far _DaisyUseMapText
text_end text_end
BluesHouseText2: ; Daisy, walking around BluesHouseDaisyWalkingText:
text_far _BluesHouseText2 text_far _BluesHouseDaisyWalkingText
text_end text_end
BluesHouseText3: ; map on table BluesHouseTownMapText:
text_far _BluesHouseText3 text_far _BluesHouseTownMapText
text_end text_end

View file

@ -87,11 +87,11 @@ BrunoScript0:
ret ret
BrunoEntranceCoords: BrunoEntranceCoords:
db $0A,$04 dbmapcoord 4, 10
db $0A,$05 dbmapcoord 5, 10
db $0B,$04 dbmapcoord 4, 11
db $0B,$05 dbmapcoord 5, 11
db $FF db -1 ; end
BrunoScript3: BrunoScript3:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -28,24 +28,24 @@ CeladonDinerText4:
CeladonDinerText5: CeladonDinerText5:
text_asm text_asm
CheckEvent EVENT_GOT_COIN_CASE CheckEvent EVENT_GOT_COIN_CASE
jr nz, .asm_eb14d jr nz, .got_item
ld hl, CeladonDinerText_491a7 ld hl, CeladonDinerText_491a7
call PrintText call PrintText
lb bc, COIN_CASE, 1 lb bc, COIN_CASE, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
SetEvent EVENT_GOT_COIN_CASE SetEvent EVENT_GOT_COIN_CASE
ld hl, ReceivedCoinCaseText ld hl, ReceivedCoinCaseText
call PrintText call PrintText
jr .asm_68b61 jr .done
.BagFull .bag_full
ld hl, CoinCaseNoRoomText ld hl, CoinCaseNoRoomText
call PrintText call PrintText
jr .asm_68b61 jr .done
.asm_eb14d .got_item
ld hl, CeladonDinerText_491b7 ld hl, CeladonDinerText_491b7
call PrintText call PrintText
.asm_68b61 .done
jp TextScriptEnd jp TextScriptEnd
CeladonDinerText_491a7: CeladonDinerText_491a7:

View file

@ -8,7 +8,7 @@ CeladonMansion1F_TextPointers:
dw CeladonMansion1Text4 dw CeladonMansion1Text4
dw CeladonMansion1Text5 dw CeladonMansion1Text5
CeladonMansion1_486a1: CeladonMansion1_PlayCryScript:
call PlayCry call PlayCry
jp TextScriptEnd jp TextScriptEnd
@ -16,7 +16,7 @@ CeladonMansion1Text1:
text_far _CeladonMansion1Text1 text_far _CeladonMansion1Text1
text_asm text_asm
ld a, MEOWTH ld a, MEOWTH
jp CeladonMansion1_486a1 jp CeladonMansion1_PlayCryScript
CeladonMansion1Text2: CeladonMansion1Text2:
text_far _CeladonMansion1Text2 text_far _CeladonMansion1Text2
@ -26,13 +26,13 @@ CeladonMansion1Text3:
text_far _CeladonMansion1Text3 text_far _CeladonMansion1Text3
text_asm text_asm
ld a, CLEFAIRY ld a, CLEFAIRY
jp CeladonMansion1_486a1 jp CeladonMansion1_PlayCryScript
CeladonMansion1Text4: CeladonMansion1Text4:
text_far _CeladonMansion1Text4 text_far _CeladonMansion1Text4
text_asm text_asm
ld a, NIDORAN_F ld a, NIDORAN_F
jp CeladonMansion1_486a1 jp CeladonMansion1_PlayCryScript
CeladonMansion1Text5: CeladonMansion1Text5:
text_far _CeladonMansion1Text5 text_far _CeladonMansion1Text5

View file

@ -25,32 +25,30 @@ WriterText:
DirectorText: DirectorText:
text_asm text_asm
; check pokédex
ld hl, wPokedexOwned ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits call CountSetBits
ld a, [wNumSetBits] ld a, [wNumSetBits]
cp 150 cp NUM_POKEMON - 1 ; discount Mew
jr nc, .CompletedDex jr nc, .completed_dex
ld hl, .GameDesigner ld hl, .GameDesignerText
jr .done jr .done
.CompletedDex .completed_dex
ld hl, .CompletedDexText ld hl, .CompletedDexText
.done .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd
.GameDesigner .GameDesignerText:
text_far _GameDesignerText text_far _GameDesignerText
text_end text_end
.CompletedDexText .CompletedDexText:
text_far _CompletedDexText text_far _CompletedDexText
text_promptbutton text_promptbutton
text_asm text_asm
callfar DisplayDiploma callfar DisplayDiploma
ld a, $1 ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
jp TextScriptEnd jp TextScriptEnd

View file

@ -13,9 +13,9 @@ CeladonMansion5Text2:
text_asm text_asm
lb bc, EEVEE, 25 lb bc, EEVEE, 25
call GivePokemon call GivePokemon
jr nc, .asm_24365 jr nc, .party_full
ld a, HS_CELADON_MANSION_EEVEE_GIFT ld a, HS_CELADON_MANSION_EEVEE_GIFT
ld [wMissableObjectIndex], a ld [wMissableObjectIndex], a
predef HideObject predef HideObject
.asm_24365 .party_full
jp TextScriptEnd jp TextScriptEnd

View file

@ -23,21 +23,21 @@ CeladonMart3F_TextPointers:
CeladonMart3Text1: CeladonMart3Text1:
text_asm text_asm
CheckEvent EVENT_GOT_TM18 CheckEvent EVENT_GOT_TM18
jr nz, .asm_a5463 jr nz, .got_item
ld hl, TM18PreReceiveText ld hl, TM18PreReceiveText
call PrintText call PrintText
lb bc, TM_COUNTER, 1 lb bc, TM_COUNTER, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
SetEvent EVENT_GOT_TM18 SetEvent EVENT_GOT_TM18
ld hl, ReceivedTM18Text ld hl, ReceivedTM18Text
jr .asm_81359 jr .done
.BagFull .bag_full
ld hl, TM18NoRoomText ld hl, TM18NoRoomText
jr .asm_81359 jr .done
.asm_a5463 .got_item
ld hl, TM18ExplanationText ld hl, TM18ExplanationText
.asm_81359 .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -40,23 +40,22 @@ CeladonMartElevatorScript_48631:
jp CopyData jp CopyData
CeladonMartElevatorFloors: CeladonMartElevatorFloors:
db 5 ; number of elements in list db 5 ; #
db FLOOR_1F db FLOOR_1F
db FLOOR_2F db FLOOR_2F
db FLOOR_3F db FLOOR_3F
db FLOOR_4F db FLOOR_4F
db FLOOR_5F 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. ; These specify where the player goes after getting out of the elevator.
db $05, CELADON_MART_1F CeladonMartElevatorWarpMaps:
db $02, CELADON_MART_2F ; warp number, map id
db $02, CELADON_MART_3F db 5, CELADON_MART_1F
db $02, CELADON_MART_4F db 2, CELADON_MART_2F
db $02, CELADON_MART_5F db 2, CELADON_MART_3F
db 2, CELADON_MART_4F
db 2, CELADON_MART_5F
CeladonMartElevatorWarpMapsEnd: CeladonMartElevatorWarpMapsEnd:
CeladonMartElevatorScript_48654: CeladonMartElevatorScript_48654:

View file

@ -38,7 +38,7 @@ CeladonMartRoofDrinkList:
db FRESH_WATER db FRESH_WATER
db SODA_POP db SODA_POP
db LEMONADE db LEMONADE
db $00 db 0 ; end
CeladonMartRoofScript_GiveDrinkToGirl: CeladonMartRoofScript_GiveDrinkToGirl:
ld hl, wd730 ld hl, wd730

View file

@ -1,5 +1,5 @@
CeruleanBadgeHouse_Script: CeruleanBadgeHouse_Script:
ld a, $1 ld a, TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
dec a dec a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@ -34,7 +34,7 @@ CeruleanHouse2Text1:
jr c, .asm_74e60 jr c, .asm_74e60
ld hl, TextPointers_74e86 ld hl, TextPointers_74e86
ld a, [wcf91] ld a, [wcf91]
sub $15 sub BOULDERBADGE
add a add a
ld d, $0 ld d, $0
ld e, a ld e, a
@ -52,7 +52,16 @@ CeruleanHouse2Text1:
jp TextScriptEnd jp TextScriptEnd
BadgeItemList: 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: CeruleanHouse2Text_74e77:
text_far _CeruleanHouse2Text_74e77 text_far _CeruleanHouse2Text_74e77

View file

@ -101,20 +101,20 @@ ENDC
ret ret
CeruleanCityCoords1: CeruleanCityCoords1:
db $07,$1e dbmapcoord 30, 7
db $09,$1e dbmapcoord 30, 9
db $ff db -1 ; end
CeruleanCityCoords2: CeruleanCityCoords2:
db $06,$14 dbmapcoord 20, 6
db $06,$15 dbmapcoord 21, 6
db $ff db -1 ; end
CeruleanCityMovement1: CeruleanCityMovement1:
db NPC_MOVEMENT_DOWN 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
CeruleanCityScript_1955d: CeruleanCityScript_1955d:
ld a, 1 ld a, 1
@ -205,7 +205,7 @@ CeruleanCityMovement3:
db NPC_MOVEMENT_DOWN 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
CeruleanCityMovement4: CeruleanCityMovement4:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
@ -215,7 +215,7 @@ CeruleanCityMovement4:
db NPC_MOVEMENT_DOWN 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
CeruleanCityScript3: CeruleanCityScript3:
ld a, [wd730] ld a, [wd730]

View file

@ -11,7 +11,7 @@ CeruleanHouse1Text1:
CeruleanHouse1Text2: CeruleanHouse1Text2:
text_asm text_asm
ld a, $6 ld a, TRADE_FOR_LOLA
ld [wWhichTrade], a ld [wWhichTrade], a
predef DoInGameTradeDialogue predef DoInGameTradeDialogue
jp TextScriptEnd jp TextScriptEnd

View file

@ -9,17 +9,17 @@ CeruleanTrashedHouse_TextPointers:
CeruleanHouseTrashedText1: CeruleanHouseTrashedText1:
text_asm text_asm
ld b, $e4 ld b, TM_DIG
predef GetQuantityOfItemInBag predef GetQuantityOfItemInBag
and b and b
jr z, .asm_f8734 jr z, .no_dig_tm
ld hl, CeruleanHouseTrashedText_1d6b0 ld hl, CeruleanHouseTrashedText_1d6b0
call PrintText call PrintText
jr .asm_8dfe9 jr .done
.asm_f8734 .no_dig_tm
ld hl, CeruleanHouseTrashedText_1d6ab ld hl, CeruleanHouseTrashedText_1d6ab
call PrintText call PrintText
.asm_8dfe9 .done
jp TextScriptEnd jp TextScriptEnd
CeruleanHouseTrashedText_1d6ab: CeruleanHouseTrashedText_1d6ab:

View file

@ -40,10 +40,10 @@ GaryScript1:
ret ret
GaryEntrance_RLEMovement: GaryEntrance_RLEMovement:
db D_UP,1 db D_UP, 1
db D_RIGHT,1 db D_RIGHT, 1
db D_UP,3 db D_UP, 3
db $ff db -1 ; end
GaryScript2: GaryScript2:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]
@ -132,7 +132,7 @@ OakEntranceAfterVictoryMovement:
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db $FF db -1 ; end
GaryScript5: GaryScript5:
ld a, [wd730] ld a, [wd730]
@ -190,7 +190,7 @@ GaryScript7:
OakExitGaryRoomMovement: OakExitGaryRoomMovement:
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db $FF db -1 ; end
GaryScript8: GaryScript8:
ld a, [wd730] ld a, [wd730]
@ -217,9 +217,9 @@ GaryScript9:
ret ret
WalkToHallOfFame_RLEMovment: WalkToHallOfFame_RLEMovment:
db D_UP,4 db D_UP, 4
db D_LEFT,1 db D_LEFT, 1
db $ff db -1 ; end
GaryScript10: GaryScript10:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -71,11 +71,11 @@ CinnabarGymScript0:
MovementData_757d7: MovementData_757d7:
db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db $FF db -1 ; end
MovementData_757da: MovementData_757da:
db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_LEFT
db $FF db -1 ; end
CinnabarGymScript1: CinnabarGymScript1:
ld a, [wd730] ld a, [wd730]

View file

@ -44,7 +44,7 @@ FossilsList:
db DOME_FOSSIL db DOME_FOSSIL
db HELIX_FOSSIL db HELIX_FOSSIL
db OLD_AMBER db OLD_AMBER
db $00 db 0 ; end
Lab4Text1: Lab4Text1:
text_asm text_asm
@ -100,7 +100,7 @@ Lab4Text_75dd5:
Lab4Text2: Lab4Text2:
text_asm text_asm
ld a, $3 ld a, TRADE_FOR_SAILOR
ld [wWhichTrade], a ld [wWhichTrade], a
predef DoInGameTradeDialogue predef DoInGameTradeDialogue
jp TextScriptEnd jp TextScriptEnd

View file

@ -11,24 +11,24 @@ CinnabarLabMetronomeRoom_TextPointers:
Lab3Text1: Lab3Text1:
text_asm text_asm
CheckEvent EVENT_GOT_TM35 CheckEvent EVENT_GOT_TM35
jr nz, .asm_e551a jr nz, .got_item
ld hl, TM35PreReceiveText ld hl, TM35PreReceiveText
call PrintText call PrintText
lb bc, TM_METRONOME, 1 lb bc, TM_METRONOME, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedTM35Text ld hl, ReceivedTM35Text
call PrintText call PrintText
SetEvent EVENT_GOT_TM35 SetEvent EVENT_GOT_TM35
jr .asm_eb896 jr .done
.BagFull .bag_full
ld hl, TM35NoRoomText ld hl, TM35NoRoomText
call PrintText call PrintText
jr .asm_eb896 jr .done
.asm_e551a .got_item
ld hl, TM35ExplanationText ld hl, TM35ExplanationText
call PrintText call PrintText
.asm_eb896 .done
jp TextScriptEnd jp TextScriptEnd
TM35PreReceiveText: TM35PreReceiveText:

View file

@ -12,13 +12,13 @@ Lab2Text1:
Lab2Text2: Lab2Text2:
text_asm text_asm
ld a, $7 ld a, TRADE_FOR_DORIS
ld [wWhichTrade], a ld [wWhichTrade], a
jr Lab2DoTrade jr Lab2DoTrade
Lab2Text3: Lab2Text3:
text_asm text_asm
ld a, $8 ld a, TRADE_FOR_CRINKLES
ld [wWhichTrade], a ld [wWhichTrade], a
Lab2DoTrade: Lab2DoTrade:
predef DoInGameTradeDialogue predef DoInGameTradeDialogue

View file

@ -13,34 +13,34 @@ CopycatsHouse2F_TextPointers:
CopycatsHouse2FText1: CopycatsHouse2FText1:
text_asm text_asm
CheckEvent EVENT_GOT_TM31 CheckEvent EVENT_GOT_TM31
jr nz, .asm_7ccf3 jr nz, .got_item
ld a, $1 ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CopycatsHouse2FText_5ccd4 ld hl, CopycatsHouse2FText_5ccd4
call PrintText call PrintText
ld b, POKE_DOLL ld b, POKE_DOLL
call IsItemInBag call IsItemInBag
jr z, .asm_62ecd jr z, .done
ld hl, TM31PreReceiveText ld hl, TM31PreReceiveText
call PrintText call PrintText
lb bc, TM_MIMIC, 1 lb bc, TM_MIMIC, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedTM31Text ld hl, ReceivedTM31Text
call PrintText call PrintText
ld a, POKE_DOLL ld a, POKE_DOLL
ldh [hItemToRemoveID], a ldh [hItemToRemoveID], a
farcall RemoveItemByID farcall RemoveItemByID
SetEvent EVENT_GOT_TM31 SetEvent EVENT_GOT_TM31
jr .asm_62ecd jr .done
.BagFull .bag_full
ld hl, TM31NoRoomText ld hl, TM31NoRoomText
call PrintText call PrintText
jr .asm_62ecd jr .done
.asm_7ccf3 .got_item
ld hl, TM31ExplanationText2 ld hl, TM31ExplanationText2
call PrintText call PrintText
.asm_62ecd .done
jp TextScriptEnd jp TextScriptEnd
CopycatsHouse2FText_5ccd4: CopycatsHouse2FText_5ccd4:

View file

@ -2,4 +2,5 @@ DiglettsCave_Script:
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
DiglettsCave_TextPointers: DiglettsCave_TextPointers:
text_end
text_end ; unused

View file

@ -7,39 +7,30 @@ FuchsiaGoodRodHouse_TextPointers:
FuchsiaHouse3Text1: FuchsiaHouse3Text1:
text_asm text_asm
ld a, [wd728] ld a, [wd728]
bit 4, a bit 4, a ; got good rod?
jr nz, .after jr nz, .got_item
ld hl, FuchsiaHouse3Text_561bd ld hl, FuchsiaHouse3Text_561bd
call PrintText call PrintText
call YesNoChoice call YesNoChoice
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr nz, .refused jr nz, .refused
lb bc, GOOD_ROD, 1 lb bc, GOOD_ROD, 1
call GiveItem call GiveItem
jr nc, .full jr nc, .bag_full
ld hl, wd728 ld hl, wd728
set 4, [hl] set 4, [hl] ; got good rod
ld hl, FuchsiaHouse3Text_561c2 ld hl, FuchsiaHouse3Text_561c2
jr .talk jr .done
.bag_full
.full
ld hl, FuchsiaHouse3Text_5621c ld hl, FuchsiaHouse3Text_5621c
jr .talk jr .done
.refused .refused
ld hl, FuchsiaHouse3Text_56212 ld hl, FuchsiaHouse3Text_56212
jr .talk jr .done
.got_item
.after
ld hl, FuchsiaHouse3Text_56217 ld hl, FuchsiaHouse3Text_56217
.done
.talk
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -90,7 +90,7 @@ MovementData_48c5a:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db $FF db -1 ; end
MovementData_48c63: MovementData_48c63:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
@ -98,7 +98,7 @@ MovementData_48c63:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db $FF db -1 ; end
CeladonGameCornerScript2: CeladonGameCornerScript2:
ld a, [wd730] ld a, [wd730]

View file

@ -69,8 +69,8 @@ HallofFameRoomScript0:
ret ret
RLEMovement5a528: RLEMovement5a528:
db D_UP,$5 db D_UP, 5
db $ff db -1 ; end
HallofFameRoomScript1: HallofFameRoomScript1:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -78,12 +78,12 @@ LanceScript0:
jp LanceShowOrHideEntranceBlocks jp LanceShowOrHideEntranceBlocks
LanceTriggerMovementCoords: LanceTriggerMovementCoords:
db $01,$05 dbmapcoord 5, 1
db $02,$06 dbmapcoord 6, 2
db $0B,$05 dbmapcoord 5, 11
db $0B,$06 dbmapcoord 6, 11
db $10,$18 dbmapcoord 24, 16
db $FF db -1 ; end
LanceScript2: LanceScript2:
call EndTrainerBattle call EndTrainerBattle
@ -110,11 +110,11 @@ WalkToLance:
ret ret
WalkToLance_RLEList: WalkToLance_RLEList:
db D_UP, $0C db D_UP, 12
db D_LEFT, $0C db D_LEFT, 12
db D_DOWN, $07 db D_DOWN, 7
db D_LEFT, $06 db D_LEFT, 6
db $FF db -1 ; end
LanceScript3: LanceScript3:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -16,14 +16,14 @@ LavenderHouse2Text1:
LavenderHouse2Text2: LavenderHouse2Text2:
text_asm text_asm
CheckEvent EVENT_RESCUED_MR_FUJI CheckEvent EVENT_RESCUED_MR_FUJI
jr nz, .asm_65711 jr nz, .rescued_mr_fuji
ld hl, LavenderHouse2Text_1d9dc ld hl, LavenderHouse2Text_1d9dc
call PrintText call PrintText
jr .asm_64be1 jr .done
.asm_65711 .rescued_mr_fuji
ld hl, LavenderHouse2Text_1d9e1 ld hl, LavenderHouse2Text_1d9e1
call PrintText call PrintText
.asm_64be1 .done
jp TextScriptEnd jp TextScriptEnd
LavenderHouse2Text_1d9dc: LavenderHouse2Text_1d9dc:

View file

@ -20,9 +20,9 @@ LavenderTownText1:
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
ld hl, LavenderTownText_44146 ld hl, LavenderTownText_44146
jr nz, .asm_40831 jr nz, .got_text
ld hl, LavenderTownText_44141 ld hl, LavenderTownText_44141
.asm_40831 .got_text
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -89,11 +89,11 @@ LoreleiScript0:
ret ret
LoreleiEntranceCoords: LoreleiEntranceCoords:
db $0A,$04 dbmapcoord 4, 10
db $0A,$05 dbmapcoord 5, 10
db $0B,$04 dbmapcoord 4, 11
db $0B,$05 dbmapcoord 5, 11
db $FF db -1 ; end
LoreleiScript3: LoreleiScript3:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -13,14 +13,14 @@ MrFujisHouse_TextPointers:
LavenderHouse1Text1: LavenderHouse1Text1:
text_asm text_asm
CheckEvent EVENT_RESCUED_MR_FUJI CheckEvent EVENT_RESCUED_MR_FUJI
jr nz, .asm_72e5d jr nz, .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8d1 ld hl, LavenderHouse1Text_1d8d1
call PrintText call PrintText
jr .asm_6957f jr .done
.asm_72e5d .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8d6 ld hl, LavenderHouse1Text_1d8d6
call PrintText call PrintText
.asm_6957f .done
jp TextScriptEnd jp TextScriptEnd
LavenderHouse1Text_1d8d1: LavenderHouse1Text_1d8d1:
@ -34,14 +34,14 @@ LavenderHouse1Text_1d8d6:
LavenderHouse1Text2: LavenderHouse1Text2:
text_asm text_asm
CheckEvent EVENT_RESCUED_MR_FUJI CheckEvent EVENT_RESCUED_MR_FUJI
jr nz, .asm_06470 jr nz, .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8f4 ld hl, LavenderHouse1Text_1d8f4
call PrintText call PrintText
jr .asm_3d208 jr .done
.asm_06470 .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8f9 ld hl, LavenderHouse1Text_1d8f9
call PrintText call PrintText
.asm_3d208 .done
jp TextScriptEnd jp TextScriptEnd
LavenderHouse1Text_1d8f4: LavenderHouse1Text_1d8f4:
@ -69,24 +69,24 @@ LavenderHouse1Text4:
LavenderHouse1Text5: LavenderHouse1Text5:
text_asm text_asm
CheckEvent EVENT_GOT_POKE_FLUTE CheckEvent EVENT_GOT_POKE_FLUTE
jr nz, .asm_15ac2 jr nz, .got_item
ld hl, LavenderHouse1Text_1d94c ld hl, LavenderHouse1Text_1d94c
call PrintText call PrintText
lb bc, POKE_FLUTE, 1 lb bc, POKE_FLUTE, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedFluteText ld hl, ReceivedFluteText
call PrintText call PrintText
SetEvent EVENT_GOT_POKE_FLUTE SetEvent EVENT_GOT_POKE_FLUTE
jr .asm_da749 jr .done
.BagFull .bag_full
ld hl, FluteNoRoomText ld hl, FluteNoRoomText
call PrintText call PrintText
jr .asm_da749 jr .done
.asm_15ac2 .got_item
ld hl, MrFujiAfterFluteText ld hl, MrFujiAfterFluteText
call PrintText call PrintText
.asm_da749 .done
jp TextScriptEnd jp TextScriptEnd
LavenderHouse1Text_1d94c: LavenderHouse1Text_1d94c:

View file

@ -7,24 +7,24 @@ MrPsychicsHouse_TextPointers:
SaffronHouse2Text1: SaffronHouse2Text1:
text_asm text_asm
CheckEvent EVENT_GOT_TM29 CheckEvent EVENT_GOT_TM29
jr nz, .asm_9e72b jr nz, .got_item
ld hl, TM29PreReceiveText ld hl, TM29PreReceiveText
call PrintText call PrintText
lb bc, TM_PSYCHIC_M, 1 lb bc, TM_PSYCHIC_M, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedTM29Text ld hl, ReceivedTM29Text
call PrintText call PrintText
SetEvent EVENT_GOT_TM29 SetEvent EVENT_GOT_TM29
jr .asm_fe4e1 jr .done
.BagFull .bag_full
ld hl, TM29NoRoomText ld hl, TM29NoRoomText
call PrintText call PrintText
jr .asm_fe4e1 jr .done
.asm_9e72b .got_item
ld hl, TM29ExplanationText ld hl, TM29ExplanationText
call PrintText call PrintText
.asm_fe4e1 .done
jp TextScriptEnd jp TextScriptEnd
TM29PreReceiveText: TM29PreReceiveText:

View file

@ -19,23 +19,23 @@ MtMoonB2F_Script:
ret ret
CoordsData_49d37: CoordsData_49d37:
db $05,$0B dbmapcoord 11, 5
db $05,$0C dbmapcoord 12, 5
db $05,$0D dbmapcoord 13, 5
db $05,$0E dbmapcoord 14, 5
db $06,$0B dbmapcoord 11, 6
db $06,$0C dbmapcoord 12, 6
db $06,$0D dbmapcoord 13, 6
db $06,$0E dbmapcoord 14, 6
db $07,$0B dbmapcoord 11, 7
db $07,$0C dbmapcoord 12, 7
db $07,$0D dbmapcoord 13, 7
db $07,$0E dbmapcoord 14, 7
db $08,$0B dbmapcoord 11, 8
db $08,$0C dbmapcoord 12, 8
db $08,$0D dbmapcoord 13, 8
db $08,$0E dbmapcoord 14, 8
db $FF db -1 ; end
MtMoon3Script_49d58: MtMoon3Script_49d58:
xor a xor a
@ -110,22 +110,22 @@ MtMoon3Script4:
ret ret
CoordsData_49dea: CoordsData_49dea:
db $07,$0C dbmapcoord 12, 7
db $06,$0B dbmapcoord 11, 6
db $05,$0C dbmapcoord 12, 5
db $FF db -1 ; end
CoordsData_49df1: CoordsData_49df1:
db $07,$0D dbmapcoord 13, 7
db $06,$0E dbmapcoord 14, 6
db $05,$0E dbmapcoord 14, 5
db $FF db -1 ; end
MovementData_49df8: MovementData_49df8:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
MovementData_49df9: MovementData_49df9:
db NPC_MOVEMENT_UP,$FF db NPC_MOVEMENT_UP
db -1 ; end
MtMoon3Script5: MtMoon3Script5:
ld a, [wd730] ld a, [wd730]

View file

@ -11,7 +11,7 @@ MtMoonPokecenter_TextPointers:
dw MtMoonTradeNurseText dw MtMoonTradeNurseText
MtMoonHealNurseText: MtMoonHealNurseText:
db $ff script_pokecenter_nurse
MtMoonPokecenterText2: MtMoonPokecenterText2:
text_far _MtMoonPokecenterText1 text_far _MtMoonPokecenterText1

View file

@ -1,5 +1,5 @@
Museum1F_Script: Museum1F_Script:
ld a, $1 ld a, TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
xor a xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@ -188,24 +188,24 @@ Museum1FText_5c251:
Museum1FText3: Museum1FText3:
text_asm text_asm
CheckEvent EVENT_GOT_OLD_AMBER CheckEvent EVENT_GOT_OLD_AMBER
jr nz, .asm_5c285 jr nz, .got_item
ld hl, Museum1FText_5c28e ld hl, Museum1FText_5c28e
call PrintText call PrintText
lb bc, OLD_AMBER, 1 lb bc, OLD_AMBER, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
SetEvent EVENT_GOT_OLD_AMBER SetEvent EVENT_GOT_OLD_AMBER
ld a, HS_OLD_AMBER ld a, HS_OLD_AMBER
ld [wMissableObjectIndex], a ld [wMissableObjectIndex], a
predef HideObject predef HideObject
ld hl, ReceivedOldAmberText ld hl, ReceivedOldAmberText
jr .asm_5c288 jr .done
.BagFull .bag_full
ld hl, Museum1FText_5c29e ld hl, Museum1FText_5c29e
jr .asm_5c288 jr .done
.asm_5c285 .got_item
ld hl, Museum1FText_5c299 ld hl, Museum1FText_5c299
.asm_5c288 .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -1,7 +1,7 @@
OaksLab_Script: OaksLab_Script:
CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2 CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2
call nz, OaksLabScript_1d076 call nz, OaksLabScript_1d076
ld a, $1 ld a, TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
xor a xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@ -60,7 +60,7 @@ OakEntryMovement:
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db $FF db -1 ; end
OaksLabScript2: OaksLabScript2:
ld a, [wd730] ld a, [wd730]
@ -101,8 +101,8 @@ OaksLabScript3:
ret ret
PlayerEntryMovementRLE: PlayerEntryMovementRLE:
db D_UP,$8 db D_UP, 8
db $ff db -1 ; end
OaksLabScript4: OaksLabScript4:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]
@ -212,14 +212,14 @@ OaksLabScript8:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db $FF db -1 ; end
.MiddleBallMovement2 .MiddleBallMovement2
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db $FF db -1 ; end
.Squirtle .Squirtle
ld de, .RightBallMovement1 ld de, .RightBallMovement1
@ -237,7 +237,7 @@ OaksLabScript8:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
db $FF db -1 ; end
.RightBallMovement2 .RightBallMovement2
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
@ -245,7 +245,7 @@ OaksLabScript8:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db $FF db -1 ; end
.Bulbasaur .Bulbasaur
ld de, .LeftBallMovement1 ld de, .LeftBallMovement1
@ -274,10 +274,10 @@ OaksLabScript8:
.LeftBallMovement1 .LeftBallMovement1
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_RIGHT ; not yet terminated! db NPC_MOVEMENT_RIGHT
.LeftBallMovement2 .LeftBallMovement2
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db $FF db -1 ; end
.moveBlue .moveBlue
ld a, $1 ld a, $1
@ -462,13 +462,13 @@ OaksLabScript13:
ret ret
.RivalExitMovement .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 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: OaksLabScript14:
ld a, [wd730] ld a, [wd730]

View file

@ -37,11 +37,11 @@ ENDC
jp DisplayTextID jp DisplayTextID
CoordsData_19277: CoordsData_19277:
db $11,$23 dbmapcoord 35, 17
db $11,$24 dbmapcoord 36, 17
db $12,$25 dbmapcoord 37, 18
db $13,$25 dbmapcoord 37, 19
db $ff db -1 ; end
PewterCityScript1: PewterCityScript1:
ld a, [wNPCMovementScriptPointerTableNum] ld a, [wNPCMovementScriptPointerTableNum]
@ -85,7 +85,7 @@ MovementData_PewterMuseumGuyExit:
db NPC_MOVEMENT_DOWN 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
PewterCityScript2: PewterCityScript2:
ld a, [wd730] ld a, [wd730]
@ -154,7 +154,7 @@ MovementData_PewterGymGuyExit:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db $FF db -1 ; end
PewterCityScript5: PewterCityScript5:
ld a, [wd730] ld a, [wd730]

View file

@ -1,6 +1,6 @@
PewterMart_Script: PewterMart_Script:
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $1 ld a, TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
ret ret

View file

@ -17,14 +17,16 @@ PewterPokecenterText2:
PewterJigglypuffText: PewterJigglypuffText:
text_asm text_asm
ld a, $1 ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, .Text ld hl, .JigglypuffText
call PrintText call PrintText
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
call PlaySound call PlaySound
ld c, 32 ld c, 32
call DelayFrames call DelayFrames
ld hl, JigglypuffFacingDirections ld hl, JigglypuffFacingDirections
ld de, wJigglypuffFacingDirections ld de, wJigglypuffFacingDirections
ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
@ -37,15 +39,16 @@ PewterJigglypuffText:
inc hl inc hl
jr nz, .findMatchingFacingDirectionLoop jr nz, .findMatchingFacingDirectionLoop
dec hl dec hl
push hl push hl
ld c, BANK(Music_JigglypuffSong) ld c, BANK(Music_JigglypuffSong)
ld a, MUSIC_JIGGLYPUFF_SONG ld a, MUSIC_JIGGLYPUFF_SONG
call PlayMusic call PlayMusic
pop hl pop hl
.loop
.spinMovementLoop
ld a, [hl] ld a, [hl]
ld [wSprite03StateData1ImageIndex], a ld [wSprite03StateData1ImageIndex], a
; rotate the array ; rotate the array
push hl push hl
ld hl, wJigglypuffFacingDirections ld hl, wJigglypuffFacingDirections
@ -55,22 +58,20 @@ PewterJigglypuffText:
ld a, [wJigglypuffFacingDirections - 1] ld a, [wJigglypuffFacingDirections - 1]
ld [wJigglypuffFacingDirections + 3], a ld [wJigglypuffFacingDirections + 3], a
pop hl pop hl
ld c, 24 ld c, 24
call DelayFrames call DelayFrames
ld a, [wChannelSoundIDs] ld a, [wChannelSoundIDs]
ld b, a ld b, a
ld a, [wChannelSoundIDs + Ch2] ld a, [wChannelSoundIDs + Ch2]
or b or b
jr nz, .loop jr nz, .spinMovementLoop
ld c, 48 ld c, 48
call DelayFrames call DelayFrames
call PlayDefaultMusic call PlayDefaultMusic
jp TextScriptEnd jp TextScriptEnd
.Text .JigglypuffText:
text_far _PewterJigglypuffText text_far _PewterJigglypuffText
text_end text_end

View file

@ -115,12 +115,12 @@ FanClubText5:
call PrintText call PrintText
lb bc, BIKE_VOUCHER, 1 lb bc, BIKE_VOUCHER, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, .receivedvouchertext ld hl, .receivedvouchertext
call PrintText call PrintText
SetEvent EVENT_GOT_BIKE_VOUCHER SetEvent EVENT_GOT_BIKE_VOUCHER
jr .done jr .done
.BagFull .bag_full
ld hl, .bagfulltext ld hl, .bagfulltext
call PrintText call PrintText
jr .done jr .done

View file

@ -51,10 +51,10 @@ Mansion3Script0:
ret ret
CoordsData_52254: CoordsData_52254:
db $0E,$10 dbmapcoord 16, 14
db $0E,$11 dbmapcoord 17, 14
db $0E,$13 dbmapcoord 19, 14
db $FF db -1 ; end
Mansion3Script_5225b: Mansion3Script_5225b:
xor a xor a

View file

@ -58,9 +58,9 @@ ENDC
ret ret
CoordsData_6055e: CoordsData_6055e:
db $05,$0F dbmapcoord 15, 5
db $06,$0E dbmapcoord 14, 6
db $0F ; isn't this supposed to end in $ff? db $0F ; end? (should be $ff?)
PokemonTower2Script1: PokemonTower2Script1:
ld a, [wIsInBattle] ld a, [wIsInBattle]
@ -98,7 +98,7 @@ MovementData_605a9:
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db $FF db -1 ; end
MovementData_605b2: MovementData_605b2:
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
@ -109,7 +109,7 @@ MovementData_605b2:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
db $FF db -1 ; end
PokemonTower2Script2: PokemonTower2Script2:
ld a, [wd730] ld a, [wd730]

View file

@ -42,11 +42,11 @@ PokemonTower5Script0:
ret ret
CoordsData_60992: CoordsData_60992:
db $08,$0A dbmapcoord 10, 8
db $08,$0B dbmapcoord 11, 8
db $09,$0A dbmapcoord 10, 9
db $09,$0B dbmapcoord 11, 9
db $FF db -1 ; end
PokemonTower5F_TextPointers: PokemonTower5F_TextPointers:
dw PokemonTower5Text1 dw PokemonTower5Text1

View file

@ -42,7 +42,8 @@ PokemonTower6Script0:
ret ret
CoordsData_60b45: CoordsData_60b45:
db $10,$0A,$FF dbmapcoord 10, 16
db -1 ; end
PokemonTower6Script4: PokemonTower6Script4:
ld a, [wIsInBattle] ld a, [wIsInBattle]

View file

@ -117,30 +117,18 @@ PokemonTower7Script_60db6:
jr .asm_60dcb jr .asm_60dcb
CoordsData_60de3: CoordsData_60de3:
db $0C,$09 map_coord_movement 9, 12, MovementData_60e13
dw MovementData_60e13 map_coord_movement 10, 11, MovementData_60e1b
db $0B,$0A map_coord_movement 11, 11, MovementData_60e22
dw MovementData_60e1b map_coord_movement 12, 11, MovementData_60e22
db $0B,$0B map_coord_movement 12, 10, MovementData_60e28
dw MovementData_60e22 map_coord_movement 11, 9, MovementData_60e30
db $0B,$0C map_coord_movement 10, 9, MovementData_60e22
dw MovementData_60e22 map_coord_movement 9, 9, MovementData_60e22
db $0A,$0C map_coord_movement 9, 8, MovementData_60e37
dw MovementData_60e28 map_coord_movement 10, 7, MovementData_60e22
db $09,$0B map_coord_movement 11, 7, MovementData_60e22
dw MovementData_60e30 map_coord_movement 12, 7, MovementData_60e22
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
MovementData_60e13: MovementData_60e13:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
@ -150,7 +138,7 @@ MovementData_60e13:
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_LEFT
db $FF db -1 ; end
MovementData_60e1b: MovementData_60e1b:
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
@ -159,7 +147,7 @@ MovementData_60e1b:
db NPC_MOVEMENT_DOWN 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
MovementData_60e22: MovementData_60e22:
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
@ -167,7 +155,7 @@ MovementData_60e22:
db NPC_MOVEMENT_DOWN 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
MovementData_60e28: MovementData_60e28:
db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_LEFT
@ -177,7 +165,7 @@ MovementData_60e28:
db NPC_MOVEMENT_DOWN 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
MovementData_60e30: MovementData_60e30:
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
@ -186,7 +174,7 @@ MovementData_60e30:
db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
db $FF db -1 ; end
MovementData_60e37: MovementData_60e37:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
@ -196,7 +184,7 @@ MovementData_60e37:
db NPC_MOVEMENT_DOWN 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
PokemonTower7F_TextPointers: PokemonTower7F_TextPointers:
dw PokemonTower7Text1 dw PokemonTower7Text1

View file

@ -2,14 +2,14 @@ RedsHouse1F_Script:
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
RedsHouse1F_TextPointers: RedsHouse1F_TextPointers:
dw RedsHouse1FText1 dw RedsHouse1FMomText
dw RedsHouse1FText2 dw RedsHouse1FTVText
RedsHouse1FText1: ; Mom RedsHouse1FMomText:
text_asm text_asm
ld a, [wd72e] ld a, [wd72e]
bit 3, a bit 3, a ; received a Pokémon from Oak?
jr nz, .heal ; if player has received a Pokémon from Oak, heal team jr nz, .heal
ld hl, MomWakeUpText ld hl, MomWakeUpText
call PrintText call PrintText
jr .done jr .done
@ -49,14 +49,14 @@ MomHealText2:
text_far _MomHealText2 text_far _MomHealText2
text_end text_end
RedsHouse1FText2: ; TV RedsHouse1FTVText:
text_asm text_asm
ld a, [wSpritePlayerStateData1FacingDirection] ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP cp SPRITE_FACING_UP
ld hl, TVWrongSideText ld hl, TVWrongSideText
jr nz, .notUp jr nz, .got_text
ld hl, StandByMeText ld hl, StandByMeText
.notUp .got_text
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -21,4 +21,5 @@ RedsHouse2FScript1:
ret ret
RedsHouse2F_TextPointers: RedsHouse2F_TextPointers:
text_end
text_end ; unused

View file

@ -9,7 +9,7 @@ RockTunnelPokecenter_TextPointers:
dw RockTunnelTradeNurseText dw RockTunnelTradeNurseText
RockTunnelHealNurseText: RockTunnelHealNurseText:
db $ff script_pokecenter_nurse
RockTunnelPokecenterText2: RockTunnelPokecenterText2:
text_far _RockTunnelPokecenterText2 text_far _RockTunnelPokecenterText2
@ -20,4 +20,4 @@ RockTunnelPokecenterText3:
text_end text_end
RockTunnelTradeNurseText: RockTunnelTradeNurseText:
db $f6 script_cable_club_receptionist

View file

@ -33,273 +33,227 @@ RocketHideout2Script0:
ld [wCurMapScript], a ld [wCurMapScript], a
ret ret
;format:
;db y,x
;dw pointer to movement
RocketHideout2ArrowTilePlayerMovement: RocketHideout2ArrowTilePlayerMovement:
db $9,$4 map_coord_movement 4, 9, RocketHideout2ArrowMovement1
dw RocketHideout2ArrowMovement1 map_coord_movement 4, 11, RocketHideout2ArrowMovement2
db $b,$4 map_coord_movement 4, 15, RocketHideout2ArrowMovement3
dw RocketHideout2ArrowMovement2 map_coord_movement 4, 16, RocketHideout2ArrowMovement4
db $f,$4 map_coord_movement 4, 19, RocketHideout2ArrowMovement1
dw RocketHideout2ArrowMovement3 map_coord_movement 4, 22, RocketHideout2ArrowMovement5
db $10,$4 map_coord_movement 5, 14, RocketHideout2ArrowMovement6
dw RocketHideout2ArrowMovement4 map_coord_movement 6, 22, RocketHideout2ArrowMovement7
db $13,$4 map_coord_movement 6, 24, RocketHideout2ArrowMovement8
dw RocketHideout2ArrowMovement1 map_coord_movement 8, 9, RocketHideout2ArrowMovement9
db $16,$4 map_coord_movement 8, 12, RocketHideout2ArrowMovement10
dw RocketHideout2ArrowMovement5 map_coord_movement 8, 15, RocketHideout2ArrowMovement8
db $e,$5 map_coord_movement 8, 19, RocketHideout2ArrowMovement9
dw RocketHideout2ArrowMovement6 map_coord_movement 8, 23, RocketHideout2ArrowMovement11
db $16,$6 map_coord_movement 9, 14, RocketHideout2ArrowMovement12
dw RocketHideout2ArrowMovement7 map_coord_movement 9, 22, RocketHideout2ArrowMovement12
db $18,$6 map_coord_movement 10, 9, RocketHideout2ArrowMovement13
dw RocketHideout2ArrowMovement8 map_coord_movement 10, 10, RocketHideout2ArrowMovement14
db $9,$8 map_coord_movement 10, 15, RocketHideout2ArrowMovement15
dw RocketHideout2ArrowMovement9 map_coord_movement 10, 17, RocketHideout2ArrowMovement16
db $c,$8 map_coord_movement 10, 19, RocketHideout2ArrowMovement17
dw RocketHideout2ArrowMovement10 map_coord_movement 10, 25, RocketHideout2ArrowMovement2
db $f,$8 map_coord_movement 11, 14, RocketHideout2ArrowMovement18
dw RocketHideout2ArrowMovement8 map_coord_movement 11, 16, RocketHideout2ArrowMovement19
db $13,$8 map_coord_movement 11, 18, RocketHideout2ArrowMovement12
dw RocketHideout2ArrowMovement9 map_coord_movement 12, 9, RocketHideout2ArrowMovement20
db $17,$8 map_coord_movement 12, 11, RocketHideout2ArrowMovement21
dw RocketHideout2ArrowMovement11 map_coord_movement 12, 13, RocketHideout2ArrowMovement22
db $e,$9 map_coord_movement 12, 17, RocketHideout2ArrowMovement23
dw RocketHideout2ArrowMovement12 map_coord_movement 13, 10, RocketHideout2ArrowMovement24
db $16,$9 map_coord_movement 13, 12, RocketHideout2ArrowMovement25
dw RocketHideout2ArrowMovement12 map_coord_movement 13, 16, RocketHideout2ArrowMovement26
db $9,$a map_coord_movement 13, 18, RocketHideout2ArrowMovement27
dw RocketHideout2ArrowMovement13 map_coord_movement 13, 19, RocketHideout2ArrowMovement28
db $a,$a map_coord_movement 13, 22, RocketHideout2ArrowMovement29
dw RocketHideout2ArrowMovement14 map_coord_movement 13, 23, RocketHideout2ArrowMovement30
db $f,$a map_coord_movement 14, 17, RocketHideout2ArrowMovement31
dw RocketHideout2ArrowMovement15 map_coord_movement 15, 16, RocketHideout2ArrowMovement12
db $11,$a map_coord_movement 16, 14, RocketHideout2ArrowMovement32
dw RocketHideout2ArrowMovement16 map_coord_movement 16, 16, RocketHideout2ArrowMovement33
db $13,$a map_coord_movement 16, 18, RocketHideout2ArrowMovement34
dw RocketHideout2ArrowMovement17 map_coord_movement 17, 10, RocketHideout2ArrowMovement35
db $19,$a map_coord_movement 17, 11, RocketHideout2ArrowMovement36
dw RocketHideout2ArrowMovement2 db -1 ; end
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
;format: direction, count ;format: direction, count
;each list is read starting from the $FF and working backwards ;each list is read starting from the $FF and working backwards
RocketHideout2ArrowMovement1: RocketHideout2ArrowMovement1:
db D_LEFT,$02 db D_LEFT, 2
db $FF db -1 ; end
RocketHideout2ArrowMovement2: RocketHideout2ArrowMovement2:
db D_RIGHT,$04 db D_RIGHT, 4
db $FF db -1 ; end
RocketHideout2ArrowMovement3: RocketHideout2ArrowMovement3:
db D_UP,$04 db D_UP, 4
db D_RIGHT,$04 db D_RIGHT, 4
db $FF db -1 ; end
RocketHideout2ArrowMovement4: RocketHideout2ArrowMovement4:
db D_UP,$04 db D_UP, 4
db D_RIGHT,$04 db D_RIGHT, 4
db D_UP,$01 db D_UP, 1
db $FF db -1 ; end
RocketHideout2ArrowMovement5: RocketHideout2ArrowMovement5:
db D_LEFT,$02 db D_LEFT, 2
db D_UP,$03 db D_UP, 3
db $FF db -1 ; end
RocketHideout2ArrowMovement6: RocketHideout2ArrowMovement6:
db D_DOWN,$02 db D_DOWN, 2
db D_RIGHT,$04 db D_RIGHT, 4
db $FF db -1 ; end
RocketHideout2ArrowMovement7: RocketHideout2ArrowMovement7:
db D_UP,$02 db D_UP, 2
db $FF db -1 ; end
RocketHideout2ArrowMovement8: RocketHideout2ArrowMovement8:
db D_UP,$04 db D_UP, 4
db $FF db -1 ; end
RocketHideout2ArrowMovement9: RocketHideout2ArrowMovement9:
db D_LEFT,$06 db D_LEFT, 6
db $FF db -1 ; end
RocketHideout2ArrowMovement10: RocketHideout2ArrowMovement10:
db D_UP,$01 db D_UP, 1
db $FF db -1 ; end
RocketHideout2ArrowMovement11: RocketHideout2ArrowMovement11:
db D_LEFT,$06 db D_LEFT, 6
db D_UP,$04 db D_UP, 4
db $FF db -1 ; end
RocketHideout2ArrowMovement12: RocketHideout2ArrowMovement12:
db D_DOWN,$02 db D_DOWN, 2
db $FF db -1 ; end
RocketHideout2ArrowMovement13: RocketHideout2ArrowMovement13:
db D_LEFT,$08 db D_LEFT, 8
db $FF db -1 ; end
RocketHideout2ArrowMovement14: RocketHideout2ArrowMovement14:
db D_LEFT,$08 db D_LEFT, 8
db D_UP,$01 db D_UP, 1
db $FF db -1 ; end
RocketHideout2ArrowMovement15: RocketHideout2ArrowMovement15:
db D_LEFT,$08 db D_LEFT, 8
db D_UP,$06 db D_UP, 6
db $FF db -1 ; end
RocketHideout2ArrowMovement16: RocketHideout2ArrowMovement16:
db D_UP,$02 db D_UP, 2
db D_RIGHT,$04 db D_RIGHT, 4
db $FF db -1 ; end
RocketHideout2ArrowMovement17: RocketHideout2ArrowMovement17:
db D_UP,$02 db D_UP, 2
db D_RIGHT,$04 db D_RIGHT, 4
db D_UP,$02 db D_UP, 2
db $FF db -1 ; end
RocketHideout2ArrowMovement18: RocketHideout2ArrowMovement18:
db D_DOWN,$02 db D_DOWN, 2
db D_RIGHT,$04 db D_RIGHT, 4
db D_DOWN,$02 db D_DOWN, 2
db $FF db -1 ; end
RocketHideout2ArrowMovement19: RocketHideout2ArrowMovement19:
db D_DOWN,$02 db D_DOWN, 2
db D_RIGHT,$04 db D_RIGHT, 4
db $FF db -1 ; end
RocketHideout2ArrowMovement20: RocketHideout2ArrowMovement20:
db D_LEFT,$0A db D_LEFT, 10
db $FF db -1 ; end
RocketHideout2ArrowMovement21: RocketHideout2ArrowMovement21:
db D_LEFT,$0A db D_LEFT, 10
db D_UP,$02 db D_UP, 2
db $FF db -1 ; end
RocketHideout2ArrowMovement22: RocketHideout2ArrowMovement22:
db D_LEFT,$0A db D_LEFT, 10
db D_UP,$04 db D_UP, 4
db $FF db -1 ; end
RocketHideout2ArrowMovement23: RocketHideout2ArrowMovement23:
db D_UP,$02 db D_UP, 2
db D_RIGHT,$02 db D_RIGHT, 2
db $FF db -1 ; end
RocketHideout2ArrowMovement24: RocketHideout2ArrowMovement24:
db D_RIGHT,$01 db D_RIGHT, 1
db D_DOWN,$02 db D_DOWN, 2
db $FF db -1 ; end
RocketHideout2ArrowMovement25: RocketHideout2ArrowMovement25:
db D_RIGHT,$01 db D_RIGHT, 1
db $FF db -1 ; end
RocketHideout2ArrowMovement26: RocketHideout2ArrowMovement26:
db D_DOWN,$02 db D_DOWN, 2
db D_RIGHT,$02 db D_RIGHT, 2
db $FF db -1 ; end
RocketHideout2ArrowMovement27: RocketHideout2ArrowMovement27:
db D_DOWN,$02 db D_DOWN, 2
db D_LEFT,$02 db D_LEFT, 2
db $FF db -1 ; end
RocketHideout2ArrowMovement28: RocketHideout2ArrowMovement28:
db D_UP,$02 db D_UP, 2
db D_RIGHT,$04 db D_RIGHT, 4
db D_UP,$02 db D_UP, 2
db D_LEFT,$03 db D_LEFT, 3
db $FF db -1 ; end
RocketHideout2ArrowMovement29: RocketHideout2ArrowMovement29:
db D_DOWN,$02 db D_DOWN, 2
db D_LEFT,$04 db D_LEFT, 4
db $FF db -1 ; end
RocketHideout2ArrowMovement30: RocketHideout2ArrowMovement30:
db D_LEFT,$06 db D_LEFT, 6
db D_UP,$04 db D_UP, 4
db D_LEFT,$05 db D_LEFT, 5
db $FF db -1 ; end
RocketHideout2ArrowMovement31: RocketHideout2ArrowMovement31:
db D_UP,$02 db D_UP, 2
db $FF db -1 ; end
RocketHideout2ArrowMovement32: RocketHideout2ArrowMovement32:
db D_UP,$01 db D_UP, 1
db $FF db -1 ; end
RocketHideout2ArrowMovement33: RocketHideout2ArrowMovement33:
db D_UP,$03 db D_UP, 3
db $FF db -1 ; end
RocketHideout2ArrowMovement34: RocketHideout2ArrowMovement34:
db D_UP,$05 db D_UP, 5
db $FF db -1 ; end
RocketHideout2ArrowMovement35: RocketHideout2ArrowMovement35:
db D_RIGHT,$01 db D_RIGHT, 1
db D_DOWN,$02 db D_DOWN, 2
db D_LEFT,$04 db D_LEFT, 4
db $FF db -1 ; end
RocketHideout2ArrowMovement36: RocketHideout2ArrowMovement36:
db D_LEFT,$0A db D_LEFT, 10
db D_UP,$02 db D_UP, 2
db D_LEFT,$05 db D_LEFT, 5
db $FF db -1 ; end
RocketHideout2Script3: RocketHideout2Script3:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -33,103 +33,84 @@ RocketHideout3Script0:
ld [wCurMapScript], a ld [wCurMapScript], a
ret ret
;format:
;db y,x
;dw pointer to movement
RocketHideout3ArrowTilePlayerMovement: RocketHideout3ArrowTilePlayerMovement:
db $d,$a map_coord_movement 10, 13, RocketHideout3ArrowMovement6
dw RocketHideout3ArrowMovement6 map_coord_movement 10, 19, RocketHideout3ArrowMovement1
db $13,$a map_coord_movement 11, 18, RocketHideout3ArrowMovement2
dw RocketHideout3ArrowMovement1 map_coord_movement 12, 11, RocketHideout3ArrowMovement3
db $12,$b map_coord_movement 12, 17, RocketHideout3ArrowMovement4
dw RocketHideout3ArrowMovement2 map_coord_movement 12, 20, RocketHideout3ArrowMovement5
db $b,$c map_coord_movement 13, 16, RocketHideout3ArrowMovement6
dw RocketHideout3ArrowMovement3 map_coord_movement 14, 11, RocketHideout3ArrowMovement7
db $11,$c map_coord_movement 14, 15, RocketHideout3ArrowMovement6
dw RocketHideout3ArrowMovement4 map_coord_movement 14, 17, RocketHideout3ArrowMovement8
db $14,$c map_coord_movement 14, 19, RocketHideout3ArrowMovement9
dw RocketHideout3ArrowMovement5 map_coord_movement 15, 16, RocketHideout3ArrowMovement7
db $10,$d map_coord_movement 15, 18, RocketHideout3ArrowMovement10
dw RocketHideout3ArrowMovement6 map_coord_movement 16, 13, RocketHideout3ArrowMovement11
db $b,$e map_coord_movement 17, 12, RocketHideout3ArrowMovement10
dw RocketHideout3ArrowMovement7 map_coord_movement 18, 16, RocketHideout3ArrowMovement12
db $f,$e db -1 ; end
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
;format: direction, count ;format: direction, count
;each list is read starting from the $FF and working backwards ;each list is read starting from the $FF and working backwards
RocketHideout3ArrowMovement1: RocketHideout3ArrowMovement1:
db D_RIGHT,$04 db D_RIGHT, 4
db D_UP,$04 db D_UP, 4
db D_RIGHT,$04 db D_RIGHT, 4
db $FF db -1 ; end
RocketHideout3ArrowMovement2: RocketHideout3ArrowMovement2:
db D_DOWN,$04 db D_DOWN, 4
db D_RIGHT,$04 db D_RIGHT, 4
db $FF db -1 ; end
RocketHideout3ArrowMovement3: RocketHideout3ArrowMovement3:
db D_LEFT,$02 db D_LEFT, 2
db $FF db -1 ; end
RocketHideout3ArrowMovement4: RocketHideout3ArrowMovement4:
db D_RIGHT,$04 db D_RIGHT, 4
db D_UP,$02 db D_UP, 2
db D_RIGHT,$02 db D_RIGHT, 2
db $FF db -1 ; end
RocketHideout3ArrowMovement5: RocketHideout3ArrowMovement5:
db D_RIGHT,$04 db D_RIGHT, 4
db D_UP,$02 db D_UP, 2
db D_RIGHT,$02 db D_RIGHT, 2
db D_UP,$03 db D_UP, 3
db $FF db -1 ; end
RocketHideout3ArrowMovement6: RocketHideout3ArrowMovement6:
db D_RIGHT,$04 db D_RIGHT, 4
db $FF db -1 ; end
RocketHideout3ArrowMovement7: RocketHideout3ArrowMovement7:
db D_RIGHT,$02 db D_RIGHT, 2
db $FF db -1 ; end
RocketHideout3ArrowMovement8: RocketHideout3ArrowMovement8:
db D_RIGHT,$04 db D_RIGHT, 4
db D_UP,$02 db D_UP, 2
db $FF db -1 ; end
RocketHideout3ArrowMovement9: RocketHideout3ArrowMovement9:
db D_RIGHT,$04 db D_RIGHT, 4
db D_UP,$04 db D_UP, 4
db $FF db -1 ; end
RocketHideout3ArrowMovement10: RocketHideout3ArrowMovement10:
db D_DOWN,$04 db D_DOWN, 4
db $FF db -1 ; end
RocketHideout3ArrowMovement11: RocketHideout3ArrowMovement11:
db D_UP,$02 db D_UP, 2
db $FF db -1 ; end
RocketHideout3ArrowMovement12: RocketHideout3ArrowMovement12:
db D_UP,$01 db D_UP, 1
db $FF db -1 ; end
RocketHideout3Script3: RocketHideout3Script3:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -41,19 +41,18 @@ RocketHideoutElevatorScript_45741:
ret ret
RocketHideoutElavatorFloors: RocketHideoutElavatorFloors:
db $03 ; num elements in list db 3 ; #
db FLOOR_B1F db FLOOR_B1F
db FLOOR_B2F db FLOOR_B2F
db FLOOR_B4F 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. ; These specify where the player goes after getting out of the elevator.
db $04, ROCKET_HIDEOUT_B1F RocketHideoutElevatorWarpMaps:
db $04, ROCKET_HIDEOUT_B2F ; warp number, map id
db $02, ROCKET_HIDEOUT_B4F db 4, ROCKET_HIDEOUT_B1F
db 4, ROCKET_HIDEOUT_B2F
db 2, ROCKET_HIDEOUT_B4F
RocketHideoutElevatorWarpMapsEnd: RocketHideoutElevatorWarpMapsEnd:
RocketHideoutElevatorScript_4575f: RocketHideoutElevatorScript_4575f:

View file

@ -9,20 +9,20 @@ Route1_TextPointers:
Route1Text1: Route1Text1:
text_asm text_asm
CheckAndSetEvent EVENT_GOT_POTION_SAMPLE CheckAndSetEvent EVENT_GOT_POTION_SAMPLE
jr nz, .asm_1cada jr nz, .got_item
ld hl, Route1ViridianMartSampleText ld hl, Route1ViridianMartSampleText
call PrintText call PrintText
lb bc, POTION, 1 lb bc, POTION, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, Route1Text_1cae8 ld hl, Route1Text_1cae8
jr .asm_1cadd jr .done
.BagFull .bag_full
ld hl, Route1Text_1caf3 ld hl, Route1Text_1caf3
jr .asm_1cadd jr .done
.asm_1cada .got_item
ld hl, Route1Text_1caee ld hl, Route1Text_1caee
.asm_1cadd .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -9,7 +9,7 @@ Route11Gate2F_TextPointers:
Route11GateUpstairsText1: Route11GateUpstairsText1:
text_asm text_asm
xor a xor a ; TRADE_FOR_TERRY
ld [wWhichTrade], a ld [wWhichTrade], a
predef DoInGameTradeDialogue predef DoInGameTradeDialogue
Route11GateUpstairsScriptEnd: Route11GateUpstairsScriptEnd:
@ -18,10 +18,10 @@ Route11GateUpstairsScriptEnd:
Route11GateUpstairsText2: Route11GateUpstairsText2:
text_asm text_asm
CheckEvent EVENT_GOT_ITEMFINDER, 1 CheckEvent EVENT_GOT_ITEMFINDER, 1
jr c, .asm_4949b jr c, .got_item
ld a, 30 ; pokemon needed ld a, 30
ldh [hOaksAideRequirement], a ldh [hOaksAideRequirement], a
ld a, ITEMFINDER ; oak's aide reward ld a, ITEMFINDER
ldh [hOaksAideRewardItem], a ldh [hOaksAideRewardItem], a
ld [wd11e], a ld [wd11e], a
call GetItemName call GetItemName
@ -32,13 +32,13 @@ Route11GateUpstairsText2:
call CopyData call CopyData
predef OaksAideScript predef OaksAideScript
ldh a, [hOaksAideResult] ldh a, [hOaksAideResult]
dec a dec a ; OAKS_AIDE_GOT_ITEM?
jr nz, .asm_494a1 jr nz, .no_item
SetEvent EVENT_GOT_ITEMFINDER SetEvent EVENT_GOT_ITEMFINDER
.asm_4949b .got_item
ld hl, Route11GateUpstairsText_494a3 ld hl, Route11GateUpstairsText_494a3
call PrintText call PrintText
.asm_494a1 .no_item
jr Route11GateUpstairsScriptEnd jr Route11GateUpstairsScriptEnd
Route11GateUpstairsText_494a3: Route11GateUpstairsText_494a3:

View file

@ -9,24 +9,24 @@ Route12Gate2F_TextPointers:
Route12GateUpstairsText1: Route12GateUpstairsText1:
text_asm text_asm
CheckEvent EVENT_GOT_TM39, 1 CheckEvent EVENT_GOT_TM39, 1
jr c, .asm_0ad3c jr c, .got_item
ld hl, TM39PreReceiveText ld hl, TM39PreReceiveText
call PrintText call PrintText
lb bc, TM_SWIFT, 1 lb bc, TM_SWIFT, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedTM39Text ld hl, ReceivedTM39Text
call PrintText call PrintText
SetEvent EVENT_GOT_TM39 SetEvent EVENT_GOT_TM39
jr .asm_4ba56 jr .done
.BagFull .bag_full
ld hl, TM39NoRoomText ld hl, TM39NoRoomText
call PrintText call PrintText
jr .asm_4ba56 jr .done
.asm_0ad3c .got_item
ld hl, TM39ExplanationText ld hl, TM39ExplanationText
call PrintText call PrintText
.asm_4ba56 .done
jp TextScriptEnd jp TextScriptEnd
TM39PreReceiveText: TM39PreReceiveText:
@ -68,7 +68,7 @@ GateUpstairsScript_PrintIfFacingUp:
ld a, [wSpritePlayerStateData1FacingDirection] ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP cp SPRITE_FACING_UP
jr z, .up jr z, .up
ld a, $1 ld a, TRUE
jr .done jr .done
.up .up
call PrintText call PrintText

View file

@ -7,30 +7,30 @@ Route12SuperRodHouse_TextPointers:
Route12HouseText1: Route12HouseText1:
text_asm text_asm
ld a, [wd728] ld a, [wd728]
bit 5, a bit 5, a ; received super rod?
jr nz, .asm_b4cad jr nz, .got_item
ld hl, Route12HouseText_564c0 ld hl, Route12HouseText_564c0
call PrintText call PrintText
call YesNoChoice call YesNoChoice
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr nz, .asm_a2d76 jr nz, .refused
lb bc, SUPER_ROD, 1 lb bc, SUPER_ROD, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, wd728 ld hl, wd728
set 5, [hl] set 5, [hl] ; received super rod
ld hl, Route12HouseText_564c5 ld hl, Route12HouseText_564c5
jr .asm_df984 jr .done
.BagFull .bag_full
ld hl, Route12HouseText_564d9 ld hl, Route12HouseText_564d9
jr .asm_df984 jr .done
.asm_a2d76 .refused
ld hl, Route12HouseText_564cf ld hl, Route12HouseText_564cf
jr .asm_df984 jr .done
.asm_b4cad .got_item
ld hl, Route12HouseText_564d4 ld hl, Route12HouseText_564d4
.asm_df984 .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -8,10 +8,10 @@ Route15Gate2F_TextPointers:
Route15GateUpstairsText1: Route15GateUpstairsText1:
text_asm text_asm
CheckEvent EVENT_GOT_EXP_ALL CheckEvent EVENT_GOT_EXP_ALL
jr nz, .asm_49683 jr nz, .got_item
ld a, 50 ; pokemon needed ld a, 50
ldh [hOaksAideRequirement], a ldh [hOaksAideRequirement], a
ld a, EXP_ALL ; oak's aide reward ld a, EXP_ALL
ldh [hOaksAideRewardItem], a ldh [hOaksAideRewardItem], a
ld [wd11e], a ld [wd11e], a
call GetItemName call GetItemName
@ -21,13 +21,13 @@ Route15GateUpstairsText1:
call CopyData call CopyData
predef OaksAideScript predef OaksAideScript
ldh a, [hOaksAideResult] ldh a, [hOaksAideResult]
cp $1 cp OAKS_AIDE_GOT_ITEM
jr nz, .asm_49689 jr nz, .no_item
SetEvent EVENT_GOT_EXP_ALL SetEvent EVENT_GOT_EXP_ALL
.asm_49683 .got_item
ld hl, Route15GateUpstairsText_4968c ld hl, Route15GateUpstairsText_4968c
call PrintText call PrintText
.asm_49689 .no_item
jp TextScriptEnd jp TextScriptEnd
Route15GateUpstairsText_4968c: Route15GateUpstairsText_4968c:

View file

@ -9,18 +9,18 @@ Route16HouseText1:
text_asm text_asm
CheckEvent EVENT_GOT_HM02 CheckEvent EVENT_GOT_HM02
ld hl, HM02ExplanationText ld hl, HM02ExplanationText
jr nz, .asm_13616 jr nz, .got_item
ld hl, Route16HouseText3 ld hl, Route16HouseText3
call PrintText call PrintText
lb bc, HM_FLY, 1 lb bc, HM_FLY, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
SetEvent EVENT_GOT_HM02 SetEvent EVENT_GOT_HM02
ld hl, ReceivedHM02Text ld hl, ReceivedHM02Text
jr .asm_13616 jr .got_item
.BagFull .bag_full
ld hl, HM02NoRoomText ld hl, HM02NoRoomText
.asm_13616 .got_item
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -44,11 +44,11 @@ Route16GateScript0:
ret ret
CoordsData_49714: CoordsData_49714:
db $07,$04 dbmapcoord 4, 7
db $08,$04 dbmapcoord 4, 8
db $09,$04 dbmapcoord 4, 9
db $0A,$04 dbmapcoord 4, 10
db $FF db -1 ; end
Route16GateScript1: Route16GateScript1:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -44,11 +44,11 @@ Route18GateScript0:
ret ret
CoordsData_498cc: CoordsData_498cc:
db $03,$04 dbmapcoord 4, 3
db $04,$04 dbmapcoord 4, 4
db $05,$04 dbmapcoord 4, 5
db $06,$04 dbmapcoord 4, 6
db $FF db -1 ; end
Route18GateScript1: Route18GateScript1:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -8,7 +8,7 @@ Route18Gate2F_TextPointers:
Route18GateUpstairsText1: Route18GateUpstairsText1:
text_asm text_asm
ld a, $5 ld a, TRADE_FOR_MARC
ld [wWhichTrade], a ld [wWhichTrade], a
predef DoInGameTradeDialogue predef DoInGameTradeDialogue
jp TextScriptEnd jp TextScriptEnd

View file

@ -33,7 +33,7 @@ Route20Script_50cc6:
db HS_SEAFOAM_ISLANDS_B2F_BOULDER_2 db HS_SEAFOAM_ISLANDS_B2F_BOULDER_2
db HS_SEAFOAM_ISLANDS_B3F_BOULDER_3 db HS_SEAFOAM_ISLANDS_B3F_BOULDER_3
db HS_SEAFOAM_ISLANDS_B3F_BOULDER_4 db HS_SEAFOAM_ISLANDS_B3F_BOULDER_4
db $FF db -1 ; end
.asm_50cef .asm_50cef
CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE

View file

@ -52,7 +52,7 @@ Route22RivalMovementData:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db $FF db -1 ; end
Route22Script0: Route22Script0:
CheckEvent EVENT_ROUTE22_RIVAL_WANTS_BATTLE CheckEvent EVENT_ROUTE22_RIVAL_WANTS_BATTLE
@ -75,9 +75,9 @@ Route22Script0:
ret ret
.Route22RivalBattleCoords .Route22RivalBattleCoords
db $04, $1D dbmapcoord 29, 4
db $05, $1D dbmapcoord 29, 5
db $FF db -1 ; end
.firstRivalBattle .firstRivalBattle
ld a, $1 ld a, $1
@ -141,9 +141,9 @@ Route22Script1:
StarterMons_50faf: StarterMons_50faf:
; starter the rival picked, rival trainer number ; starter the rival picked, rival trainer number
db STARTER2,$04 db STARTER2, 4
db STARTER3,$05 db STARTER3, 5
db STARTER1,$06 db STARTER1, 6
Route22Script2: Route22Script2:
ld a, [wIsInBattle] ld a, [wIsInBattle]
@ -202,7 +202,7 @@ Route22RivalExitMovementData1:
db NPC_MOVEMENT_DOWN 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
Route22RivalExitMovementData2: Route22RivalExitMovementData2:
db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP
@ -215,7 +215,7 @@ Route22RivalExitMovementData2:
db NPC_MOVEMENT_DOWN 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
Route22Script3: Route22Script3:
ld a, [wd730] ld a, [wd730]
@ -296,9 +296,9 @@ Route22Script4:
ret ret
StarterMons_510d9: StarterMons_510d9:
db STARTER2,$0a db STARTER2, 10
db STARTER3,$0b db STARTER3, 11
db STARTER1,$0c db STARTER1, 12
Route22Script5: Route22Script5:
ld a, [wIsInBattle] ld a, [wIsInBattle]
@ -355,12 +355,11 @@ Route22MoveRival2:
MovementData_5114c: MovementData_5114c:
db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_LEFT
MovementData_5114d: MovementData_5114d:
db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_LEFT
db $FF db -1 ; end
Route22Script6: Route22Script6:
ld a, [wd730] ld a, [wd730]

View file

@ -28,9 +28,9 @@ Route22GateScript0:
jp DisplayTextID jp DisplayTextID
Route22GateScriptCoords: Route22GateScriptCoords:
db 2,4 dbmapcoord 4, 2
db 2,5 dbmapcoord 5, 2
db $ff db -1 ; end
Route22GateScript_1e6ba: Route22GateScript_1e6ba:
ld a, $1 ld a, $1

View file

@ -32,16 +32,16 @@ Route23Script0:
EventFlagBit c, EVENT_PASSED_EARTHBADGE_CHECK + 1, EVENT_PASSED_CASCADEBADGE_CHECK EventFlagBit c, EVENT_PASSED_EARTHBADGE_CHECK + 1, EVENT_PASSED_CASCADEBADGE_CHECK
.asm_51224 .asm_51224
ld a, [hli] ld a, [hli]
cp $ff cp -1
ret z ret z
inc e inc e
dec c dec c
cp b cp b
jr nz, .asm_51224 jr nz, .asm_51224
cp $23 cp 35
jr nz, .asm_51237 jr nz, .asm_51237
ld a, [wXCoord] ld a, [wXCoord]
cp $e cp 14
ret nc ret nc
.asm_51237 .asm_51237
ld a, e ld a, e
@ -61,7 +61,14 @@ Route23Script0:
ret ret
YCoordsData_51255: 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: Route23Script_5125d:
ld hl, BadgeTextPointers ld hl, BadgeTextPointers

View file

@ -45,7 +45,8 @@ Route24Script0:
ret ret
CoordsData_5140e: CoordsData_5140e:
db $0F,$0A,$FF dbmapcoord 10, 15
db -1 ; end
Route24Script4: Route24Script4:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]
@ -103,12 +104,12 @@ Route24Text1:
text_asm text_asm
ResetEvent EVENT_NUGGET_REWARD_AVAILABLE ResetEvent EVENT_NUGGET_REWARD_AVAILABLE
CheckEvent EVENT_GOT_NUGGET CheckEvent EVENT_GOT_NUGGET
jr nz, .asm_514f9 jr nz, .got_item
ld hl, Route24Text_51510 ld hl, Route24Text_51510
call PrintText call PrintText
lb bc, NUGGET, 1 lb bc, NUGGET, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
SetEvent EVENT_GOT_NUGGET SetEvent EVENT_GOT_NUGGET
ld hl, Route24Text_5151a ld hl, Route24Text_5151a
call PrintText call PrintText
@ -130,11 +131,11 @@ Route24Text1:
ld [wRoute24CurScript], a ld [wRoute24CurScript], a
ld [wCurMapScript], a ld [wCurMapScript], a
jp TextScriptEnd jp TextScriptEnd
.asm_514f9 .got_item
ld hl, Route24Text_51530 ld hl, Route24Text_51530
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd
.BagFull .bag_full
ld hl, Route24Text_51521 ld hl, Route24Text_51521
call PrintText call PrintText
SetEvent EVENT_NUGGET_REWARD_AVAILABLE SetEvent EVENT_NUGGET_REWARD_AVAILABLE

View file

@ -8,10 +8,10 @@ Route2Gate_TextPointers:
Route2GateText1: Route2GateText1:
text_asm text_asm
CheckEvent EVENT_GOT_HM05 CheckEvent EVENT_GOT_HM05
jr nz, .asm_5d60d jr nz, .got_item
ld a, 10 ; pokemon needed ld a, 10
ldh [hOaksAideRequirement], a ldh [hOaksAideRequirement], a
ld a, HM_FLASH ; oak's aide reward ld a, HM_FLASH
ldh [hOaksAideRewardItem], a ldh [hOaksAideRewardItem], a
ld [wd11e], a ld [wd11e], a
call GetItemName call GetItemName
@ -21,13 +21,13 @@ Route2GateText1:
call CopyData call CopyData
predef OaksAideScript predef OaksAideScript
ldh a, [hOaksAideResult] ldh a, [hOaksAideResult]
cp $1 cp OAKS_AIDE_GOT_ITEM
jr nz, .asm_5d613 jr nz, .no_item
SetEvent EVENT_GOT_HM05 SetEvent EVENT_GOT_HM05
.asm_5d60d .got_item
ld hl, Route2GateText_5d616 ld hl, Route2GateText_5d616
call PrintText call PrintText
.asm_5d613 .no_item
jp TextScriptEnd jp TextScriptEnd
Route2GateText_5d616: Route2GateText_5d616:

View file

@ -11,7 +11,7 @@ Route2HouseText1:
Route2HouseText2: Route2HouseText2:
text_asm text_asm
ld a, $1 ld a, TRADE_FOR_MARCEL
ld [wWhichTrade], a ld [wWhichTrade], a
predef DoInGameTradeDialogue predef DoInGameTradeDialogue
jp TextScriptEnd jp TextScriptEnd

View file

@ -46,9 +46,9 @@ Route5GateScript0:
ret ret
CoordsData_1df8f: CoordsData_1df8f:
db 3,3 dbmapcoord 3, 3
db 3,4 dbmapcoord 4, 3
db $ff db -1 ; end
Route5GateScript1: Route5GateScript1:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -39,8 +39,9 @@ Route6GateScript0:
jp DisplayTextID jp DisplayTextID
CoordsData_1e08c: CoordsData_1e08c:
db $02,$03 dbmapcoord 3, 2
db $02,$04,$FF dbmapcoord 4, 2
db -1 ; end
Route6GateScript1: Route6GateScript1:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -52,9 +52,9 @@ Route7GateScript0:
ret ret
CoordsData_1e167: CoordsData_1e167:
db 3,3 dbmapcoord 3, 3
db 4,3 dbmapcoord 3, 4
db $ff db -1 ; end
Route7GateScript1: Route7GateScript1:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -50,9 +50,9 @@ Route8GateScript0:
jp DisplayTextID jp DisplayTextID
CoordsData_1e22c: CoordsData_1e22c:
db 3,2 dbmapcoord 2, 3
db 4,2 dbmapcoord 2, 4
db $ff db -1 ; end
Route8GateScript1: Route8GateScript1:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -58,17 +58,16 @@ SSAnne2Script0:
MovementData_6140c: MovementData_6140c:
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
MovementData_6140d: MovementData_6140d:
db NPC_MOVEMENT_DOWN 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
CoordsData_61411: CoordsData_61411:
db $08,$24 dbmapcoord 36, 8
db $08,$25 dbmapcoord 37, 8
db $FF db -1 ; end
SSAnne2Script_61416: SSAnne2Script_61416:
ld a, [wXCoord] ld a, [wXCoord]
@ -156,13 +155,12 @@ SSAnne2Script2:
MovementData_614b7: MovementData_614b7:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
MovementData_614b9: MovementData_614b9:
db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN 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
SSAnne2Script3: SSAnne2Script3:
ld a, [wd730] ld a, [wd730]

View file

@ -1,5 +1,5 @@
SSAnne2FRooms_Script: SSAnne2FRooms_Script:
ld a, $1 ld a, TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
xor a xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a

View file

@ -2,4 +2,5 @@ SSAnneB1F_Script:
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
SSAnneB1F_TextPointers: SSAnneB1F_TextPointers:
text_end
text_end ; unused

View file

@ -17,28 +17,28 @@ SSAnneCaptainsRoom_TextPointers:
SSAnne7Text1: SSAnne7Text1:
text_asm text_asm
CheckEvent EVENT_GOT_HM01 CheckEvent EVENT_GOT_HM01
jr nz, .asm_797c4 jr nz, .got_item
ld hl, SSAnne7RubText ld hl, SSAnne7RubText
call PrintText call PrintText
ld hl, ReceivingHM01Text ld hl, ReceivingHM01Text
call PrintText call PrintText
lb bc, HM_CUT, 1 lb bc, HM_CUT, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedHM01Text ld hl, ReceivedHM01Text
call PrintText call PrintText
SetEvent EVENT_GOT_HM01 SetEvent EVENT_GOT_HM01
jr .asm_0faf5 jr .done
.BagFull .bag_full
ld hl, HM01NoRoomText ld hl, HM01NoRoomText
call PrintText call PrintText
ld hl, wd72d ld hl, wd72d
set 5, [hl] set 5, [hl]
jr .asm_0faf5 jr .done
.asm_797c4 .got_item
ld hl, SSAnne7Text_61932 ld hl, SSAnne7Text_61932
call PrintText call PrintText
.asm_0faf5 .done
jp TextScriptEnd jp TextScriptEnd
SSAnne7RubText: SSAnne7RubText:

View file

@ -41,17 +41,17 @@ SSAnne6Text7:
call PrintText call PrintText
ldh a, [hRandomAdd] ldh a, [hRandomAdd]
bit 7, a bit 7, a
jr z, .asm_93eb1 jr z, .not_dialog_1
ld hl, SSAnne6Text_6180c ld hl, SSAnne6Text_6180c
jr .asm_63292 jr .done
.asm_93eb1 .not_dialog_1
bit 4, a bit 4, a
jr z, .asm_7436c jr z, .not_dialog_2
ld hl, SSAnne6Text_61811 ld hl, SSAnne6Text_61811
jr .asm_63292 jr .done
.asm_7436c .not_dialog_2
ld hl, SSAnne6Text_61816 ld hl, SSAnne6Text_61816
.asm_63292 .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -43,9 +43,9 @@ SafariZoneGate_ScriptPointers:
ret ret
.CoordsData_75221: .CoordsData_75221:
db $02,$03 dbmapcoord 3, 2
db $02,$04 dbmapcoord 4, 2
db $FF db -1 ; end
.SafariZoneEntranceScript1 .SafariZoneEntranceScript1
call SafariZoneEntranceScript_752b4 call SafariZoneEntranceScript_752b4

View file

@ -7,24 +7,24 @@ SafariZoneSecretHouse_TextPointers:
SafariZoneSecretHouseText1: SafariZoneSecretHouseText1:
text_asm text_asm
CheckEvent EVENT_GOT_HM03 CheckEvent EVENT_GOT_HM03
jr nz, .asm_20a9b jr nz, .got_item
ld hl, SafariZoneSecretHouseText_4a350 ld hl, SafariZoneSecretHouseText_4a350
call PrintText call PrintText
lb bc, HM_SURF, 1 lb bc, HM_SURF, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedHM03Text ld hl, ReceivedHM03Text
call PrintText call PrintText
SetEvent EVENT_GOT_HM03 SetEvent EVENT_GOT_HM03
jr .asm_8f1fc jr .done
.BagFull .bag_full
ld hl, HM03NoRoomText ld hl, HM03NoRoomText
call PrintText call PrintText
jr .asm_8f1fc jr .done
.asm_20a9b .got_item
ld hl, HM03ExplanationText ld hl, HM03ExplanationText
call PrintText call PrintText
.asm_8f1fc .done
jp TextScriptEnd jp TextScriptEnd
SafariZoneSecretHouseText_4a350: SafariZoneSecretHouseText_4a350:

View file

@ -38,9 +38,9 @@ SeafoamIslands1F_Script:
jp IsPlayerOnDungeonWarp jp IsPlayerOnDungeonWarp
Seafoam1HolesCoords: Seafoam1HolesCoords:
db $06,$11 dbmapcoord 17, 6
db $06,$18 dbmapcoord 24, 6
db $ff db -1 ; end
SeafoamIslands1F_TextPointers: SeafoamIslands1F_TextPointers:
dw BoulderText dw BoulderText

View file

@ -37,9 +37,9 @@ SeafoamIslandsB1F_Script:
jp IsPlayerOnDungeonWarp jp IsPlayerOnDungeonWarp
Seafoam2HolesCoords: Seafoam2HolesCoords:
db $06,$12 dbmapcoord 18, 6
db $06,$17 dbmapcoord 23, 6
db $ff db -1 ; end
SeafoamIslandsB1F_TextPointers: SeafoamIslandsB1F_TextPointers:
dw BoulderText dw BoulderText

Some files were not shown because too many files have changed in this diff Show more