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

View file

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

View file

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

View file

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

View file

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

View file

@ -12,6 +12,19 @@ SLOTSFISH EQU $0E0C
SLOTSBIRD EQU $1210
SLOTSMOUSE EQU $1614
; in game trades
const_def
const TRADE_FOR_TERRY
const TRADE_FOR_MARCEL
const TRADE_FOR_CHIKUCHIKU
const TRADE_FOR_SAILOR
const TRADE_FOR_DUX
const TRADE_FOR_MARC
const TRADE_FOR_LOLA
const TRADE_FOR_DORIS
const TRADE_FOR_CRINKLES
const TRADE_FOR_SPOT
; in game trade dialog sets
const_def
const TRADE_DIALOGSET_CASUAL
@ -30,3 +43,9 @@ SLOTSMOUSE EQU $1614
const BIT_VOLCANOBADGE ; 6
const BIT_EARTHBADGE ; 7
NUM_BADGES EQU const_value
; OaksAideScript results
OAKS_AIDE_BAG_FULL EQU $00
OAKS_AIDE_GOT_ITEM EQU $01
OAKS_AIDE_NOT_ENOUGH_MONS EQU $80
OAKS_AIDE_REFUSED EQU $ff

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -25,7 +25,7 @@ MoveSprite_::
ld [hli], a
inc de
inc c
cp $FF ; have we reached the end of the movement data?
cp -1 ; have we reached the end of the movement data?
jr nz, .loop
ld a, c

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -40,23 +40,22 @@ CeladonMartElevatorScript_48631:
jp CopyData
CeladonMartElevatorFloors:
db 5 ; number of elements in list
db 5 ; #
db FLOOR_1F
db FLOOR_2F
db FLOOR_3F
db FLOOR_4F
db FLOOR_5F
db $FF
db -1 ; end
CeladonMartElevatorWarpMaps:
; first byte is warp number
; second byte is map number
; These specify where the player goes after getting out of the elevator.
db $05, CELADON_MART_1F
db $02, CELADON_MART_2F
db $02, CELADON_MART_3F
db $02, CELADON_MART_4F
db $02, CELADON_MART_5F
CeladonMartElevatorWarpMaps:
; warp number, map id
db 5, CELADON_MART_1F
db 2, CELADON_MART_2F
db 2, CELADON_MART_3F
db 2, CELADON_MART_4F
db 2, CELADON_MART_5F
CeladonMartElevatorWarpMapsEnd:
CeladonMartElevatorScript_48654:

View file

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

View file

@ -1,5 +1,5 @@
CeruleanBadgeHouse_Script:
ld a, $1
ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
dec a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@ -34,7 +34,7 @@ CeruleanHouse2Text1:
jr c, .asm_74e60
ld hl, TextPointers_74e86
ld a, [wcf91]
sub $15
sub BOULDERBADGE
add a
ld d, $0
ld e, a
@ -52,7 +52,16 @@ CeruleanHouse2Text1:
jp TextScriptEnd
BadgeItemList:
db $8,BOULDERBADGE,CASCADEBADGE,THUNDERBADGE,RAINBOWBADGE,SOULBADGE,MARSHBADGE,VOLCANOBADGE,EARTHBADGE,$FF
db 8 ; #
db BOULDERBADGE
db CASCADEBADGE
db THUNDERBADGE
db RAINBOWBADGE
db SOULBADGE
db MARSHBADGE
db VOLCANOBADGE
db EARTHBADGE
db -1 ; end
CeruleanHouse2Text_74e77:
text_far _CeruleanHouse2Text_74e77

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -41,19 +41,18 @@ RocketHideoutElevatorScript_45741:
ret
RocketHideoutElavatorFloors:
db $03 ; num elements in list
db 3 ; #
db FLOOR_B1F
db FLOOR_B2F
db FLOOR_B4F
db $FF ; terminator
db -1 ; end
RocketHideoutElevatorWarpMaps:
; first byte is warp number
; second byte is map number
; These specify where the player goes after getting out of the elevator.
db $04, ROCKET_HIDEOUT_B1F
db $04, ROCKET_HIDEOUT_B2F
db $02, ROCKET_HIDEOUT_B4F
RocketHideoutElevatorWarpMaps:
; warp number, map id
db 4, ROCKET_HIDEOUT_B1F
db 4, ROCKET_HIDEOUT_B2F
db 2, ROCKET_HIDEOUT_B4F
RocketHideoutElevatorWarpMapsEnd:
RocketHideoutElevatorScript_4575f:

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -32,16 +32,16 @@ Route23Script0:
EventFlagBit c, EVENT_PASSED_EARTHBADGE_CHECK + 1, EVENT_PASSED_CASCADEBADGE_CHECK
.asm_51224
ld a, [hli]
cp $ff
cp -1
ret z
inc e
dec c
cp b
jr nz, .asm_51224
cp $23
cp 35
jr nz, .asm_51237
ld a, [wXCoord]
cp $e
cp 14
ret nc
.asm_51237
ld a, e
@ -61,7 +61,14 @@ Route23Script0:
ret
YCoordsData_51255:
db $23,$38,$55,$60,$69,$77,$88,$FF
db 35
db 56
db 85
db 96
db 105
db 119
db 136
db -1 ; end
Route23Script_5125d:
ld hl, BadgeTextPointers

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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