mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Move radio channel data into data/
This commit is contained in:
parent
16eb97ae9c
commit
22b607b664
@ -1,93 +1,97 @@
|
|||||||
; PlayRadioShow arguments, RadioJumptable indexes (see engine/radio.asm)
|
; radio channel ids
|
||||||
|
; indexes for:
|
||||||
|
; - PlayRadioShow/RadioJumptable (see engine/radio.asm)
|
||||||
|
; - RadioChannelSongs (see data/radio/channel_music.asm)
|
||||||
const_def
|
const_def
|
||||||
const OAKS_POKEMON_TALK ; $00
|
const OAKS_POKEMON_TALK ; 00
|
||||||
const POKEDEX_SHOW ; $01
|
const POKEDEX_SHOW ; 01
|
||||||
const POKEMON_MUSIC ; $02
|
const POKEMON_MUSIC ; 02
|
||||||
const LUCKY_CHANNEL ; $03
|
const LUCKY_CHANNEL ; 03
|
||||||
const BUENAS_PASSWORD ; $04
|
const BUENAS_PASSWORD ; 04
|
||||||
const PLACES_AND_PEOPLE ; $05
|
const PLACES_AND_PEOPLE ; 05
|
||||||
const LETS_ALL_SING ; $06
|
const LETS_ALL_SING ; 06
|
||||||
const ROCKET_RADIO ; $07
|
const ROCKET_RADIO ; 07
|
||||||
const POKE_FLUTE_RADIO ; $08
|
const POKE_FLUTE_RADIO ; 08
|
||||||
const UNOWN_RADIO ; $09
|
const UNOWN_RADIO ; 09
|
||||||
const EVOLUTION_RADIO ; $0a
|
const EVOLUTION_RADIO ; 0a
|
||||||
const OAKS_POKEMON_TALK_2 ; $0b
|
; internal indexes for channel segments
|
||||||
const OAKS_POKEMON_TALK_3 ; $0c
|
const OAKS_POKEMON_TALK_2 ; 0b
|
||||||
const OAKS_POKEMON_TALK_4 ; $0d
|
const OAKS_POKEMON_TALK_3 ; 0c
|
||||||
const OAKS_POKEMON_TALK_5 ; $0e
|
const OAKS_POKEMON_TALK_4 ; 0d
|
||||||
const OAKS_POKEMON_TALK_6 ; $0f
|
const OAKS_POKEMON_TALK_5 ; 0e
|
||||||
const OAKS_POKEMON_TALK_7 ; $10
|
const OAKS_POKEMON_TALK_6 ; 0f
|
||||||
const OAKS_POKEMON_TALK_8 ; $11
|
const OAKS_POKEMON_TALK_7 ; 10
|
||||||
const OAKS_POKEMON_TALK_9 ; $12
|
const OAKS_POKEMON_TALK_8 ; 11
|
||||||
const POKEDEX_SHOW_2 ; $13
|
const OAKS_POKEMON_TALK_9 ; 12
|
||||||
const POKEDEX_SHOW_3 ; $14
|
const POKEDEX_SHOW_2 ; 13
|
||||||
const POKEDEX_SHOW_4 ; $15
|
const POKEDEX_SHOW_3 ; 14
|
||||||
const POKEDEX_SHOW_5 ; $16
|
const POKEDEX_SHOW_4 ; 15
|
||||||
const POKEMON_MUSIC_2 ; $17
|
const POKEDEX_SHOW_5 ; 16
|
||||||
const POKEMON_MUSIC_3 ; $18
|
const POKEMON_MUSIC_2 ; 17
|
||||||
const POKEMON_MUSIC_4 ; $19
|
const POKEMON_MUSIC_3 ; 18
|
||||||
const POKEMON_MUSIC_5 ; $1a
|
const POKEMON_MUSIC_4 ; 19
|
||||||
const POKEMON_MUSIC_6 ; $1b
|
const POKEMON_MUSIC_5 ; 1a
|
||||||
const POKEMON_MUSIC_7 ; $1c
|
const POKEMON_MUSIC_6 ; 1b
|
||||||
const LETS_ALL_SING_2 ; $1d
|
const POKEMON_MUSIC_7 ; 1c
|
||||||
const LUCKY_NUMBER_SHOW_2 ; $1e
|
const LETS_ALL_SING_2 ; 1d
|
||||||
const LUCKY_NUMBER_SHOW_3 ; $1f
|
const LUCKY_NUMBER_SHOW_2 ; 1e
|
||||||
const LUCKY_NUMBER_SHOW_4 ; $20
|
const LUCKY_NUMBER_SHOW_3 ; 1f
|
||||||
const LUCKY_NUMBER_SHOW_5 ; $21
|
const LUCKY_NUMBER_SHOW_4 ; 20
|
||||||
const LUCKY_NUMBER_SHOW_6 ; $22
|
const LUCKY_NUMBER_SHOW_5 ; 21
|
||||||
const LUCKY_NUMBER_SHOW_7 ; $23
|
const LUCKY_NUMBER_SHOW_6 ; 22
|
||||||
const LUCKY_NUMBER_SHOW_8 ; $24
|
const LUCKY_NUMBER_SHOW_7 ; 23
|
||||||
const LUCKY_NUMBER_SHOW_9 ; $25
|
const LUCKY_NUMBER_SHOW_8 ; 24
|
||||||
const LUCKY_NUMBER_SHOW_10 ; $26
|
const LUCKY_NUMBER_SHOW_9 ; 25
|
||||||
const LUCKY_NUMBER_SHOW_11 ; $27
|
const LUCKY_NUMBER_SHOW_10 ; 26
|
||||||
const LUCKY_NUMBER_SHOW_12 ; $28
|
const LUCKY_NUMBER_SHOW_11 ; 27
|
||||||
const LUCKY_NUMBER_SHOW_13 ; $29
|
const LUCKY_NUMBER_SHOW_12 ; 28
|
||||||
const LUCKY_NUMBER_SHOW_14 ; $2a
|
const LUCKY_NUMBER_SHOW_13 ; 29
|
||||||
const LUCKY_NUMBER_SHOW_15 ; $2b
|
const LUCKY_NUMBER_SHOW_14 ; 2a
|
||||||
const PLACES_AND_PEOPLE_2 ; $2c
|
const LUCKY_NUMBER_SHOW_15 ; 2b
|
||||||
const PLACES_AND_PEOPLE_3 ; $2d
|
const PLACES_AND_PEOPLE_2 ; 2c
|
||||||
const PLACES_AND_PEOPLE_4 ; $2e
|
const PLACES_AND_PEOPLE_3 ; 2d
|
||||||
const PLACES_AND_PEOPLE_5 ; $2f
|
const PLACES_AND_PEOPLE_4 ; 2e
|
||||||
const PLACES_AND_PEOPLE_6 ; $30
|
const PLACES_AND_PEOPLE_5 ; 2f
|
||||||
const PLACES_AND_PEOPLE_7 ; $31
|
const PLACES_AND_PEOPLE_6 ; 30
|
||||||
const ROCKET_RADIO_2 ; $32
|
const PLACES_AND_PEOPLE_7 ; 31
|
||||||
const ROCKET_RADIO_3 ; $33
|
const ROCKET_RADIO_2 ; 32
|
||||||
const ROCKET_RADIO_4 ; $34
|
const ROCKET_RADIO_3 ; 33
|
||||||
const ROCKET_RADIO_5 ; $35
|
const ROCKET_RADIO_4 ; 34
|
||||||
const ROCKET_RADIO_6 ; $36
|
const ROCKET_RADIO_5 ; 35
|
||||||
const ROCKET_RADIO_7 ; $37
|
const ROCKET_RADIO_6 ; 36
|
||||||
const ROCKET_RADIO_8 ; $38
|
const ROCKET_RADIO_7 ; 37
|
||||||
const ROCKET_RADIO_9 ; $39
|
const ROCKET_RADIO_8 ; 38
|
||||||
const ROCKET_RADIO_10 ; $3a
|
const ROCKET_RADIO_9 ; 39
|
||||||
const OAKS_POKEMON_TALK_10 ; $3b
|
const ROCKET_RADIO_10 ; 3a
|
||||||
const OAKS_POKEMON_TALK_11 ; $3c
|
const OAKS_POKEMON_TALK_10 ; 3b
|
||||||
const OAKS_POKEMON_TALK_12 ; $3d
|
const OAKS_POKEMON_TALK_11 ; 3c
|
||||||
const OAKS_POKEMON_TALK_13 ; $3e
|
const OAKS_POKEMON_TALK_12 ; 3d
|
||||||
const OAKS_POKEMON_TALK_14 ; $3f
|
const OAKS_POKEMON_TALK_13 ; 3e
|
||||||
const BUENAS_PASSWORD_2 ; $40
|
const OAKS_POKEMON_TALK_14 ; 3f
|
||||||
const BUENAS_PASSWORD_3 ; $41
|
const BUENAS_PASSWORD_2 ; 40
|
||||||
const BUENAS_PASSWORD_4 ; $42
|
const BUENAS_PASSWORD_3 ; 41
|
||||||
const BUENAS_PASSWORD_5 ; $43
|
const BUENAS_PASSWORD_4 ; 42
|
||||||
const BUENAS_PASSWORD_6 ; $44
|
const BUENAS_PASSWORD_5 ; 43
|
||||||
const BUENAS_PASSWORD_7 ; $45
|
const BUENAS_PASSWORD_6 ; 44
|
||||||
const BUENAS_PASSWORD_8 ; $46
|
const BUENAS_PASSWORD_7 ; 45
|
||||||
const BUENAS_PASSWORD_9 ; $47
|
const BUENAS_PASSWORD_8 ; 46
|
||||||
const BUENAS_PASSWORD_10 ; $48
|
const BUENAS_PASSWORD_9 ; 47
|
||||||
const BUENAS_PASSWORD_11 ; $49
|
const BUENAS_PASSWORD_10 ; 48
|
||||||
const BUENAS_PASSWORD_12 ; $4a
|
const BUENAS_PASSWORD_11 ; 49
|
||||||
const BUENAS_PASSWORD_13 ; $4b
|
const BUENAS_PASSWORD_12 ; 4a
|
||||||
const BUENAS_PASSWORD_14 ; $4c
|
const BUENAS_PASSWORD_13 ; 4b
|
||||||
const BUENAS_PASSWORD_15 ; $4d
|
const BUENAS_PASSWORD_14 ; 4c
|
||||||
const BUENAS_PASSWORD_16 ; $4e
|
const BUENAS_PASSWORD_15 ; 4d
|
||||||
const BUENAS_PASSWORD_17 ; $4f
|
const BUENAS_PASSWORD_16 ; 4e
|
||||||
const BUENAS_PASSWORD_18 ; $50
|
const BUENAS_PASSWORD_17 ; 4f
|
||||||
const BUENAS_PASSWORD_19 ; $51
|
const BUENAS_PASSWORD_18 ; 50
|
||||||
const BUENAS_PASSWORD_20 ; $52
|
const BUENAS_PASSWORD_19 ; 51
|
||||||
const BUENAS_PASSWORD_21 ; $53
|
const BUENAS_PASSWORD_20 ; 52
|
||||||
const RADIO_SCROLL ; $54
|
const BUENAS_PASSWORD_21 ; 53
|
||||||
const POKEDEX_SHOW_6 ; $55
|
const RADIO_SCROLL ; 54
|
||||||
const POKEDEX_SHOW_7 ; $56
|
const POKEDEX_SHOW_6 ; 55
|
||||||
const POKEDEX_SHOW_8 ; $57
|
const POKEDEX_SHOW_7 ; 56
|
||||||
|
const POKEDEX_SHOW_8 ; 57
|
||||||
|
|
||||||
; PlayRadio arguments (see engine/pokegear.asm)
|
; PlayRadio arguments (see engine/pokegear.asm)
|
||||||
const_def
|
const_def
|
||||||
@ -101,23 +105,11 @@
|
|||||||
const MAPRADIO_LETS_ALL_SING
|
const MAPRADIO_LETS_ALL_SING
|
||||||
const MAPRADIO_ROCKET
|
const MAPRADIO_ROCKET
|
||||||
|
|
||||||
; PasswordTable indexes (see engine/radio.asm)
|
; BuenasPasswordTable sizes (see data/radio/buenas_passwords.asm)
|
||||||
const_def
|
NUM_PASSWORD_CATEGORIES EQU 11
|
||||||
const BUENA_STARTERS
|
|
||||||
const BUENA_DRINKS
|
|
||||||
const BUENA_ITEMS
|
|
||||||
const BUENA_BALLS
|
|
||||||
const BUENA_MON1
|
|
||||||
const BUENA_MON2
|
|
||||||
const BUENA_TOWNS
|
|
||||||
const BUENA_TYPES
|
|
||||||
const BUENA_MOVES
|
|
||||||
const BUENA_XITEMS
|
|
||||||
const BUENA_STATIONS
|
|
||||||
NUM_PASSWORD_CATEGORIES EQU const_value
|
|
||||||
NUM_PASSWORDS_PER_CATEGORY EQU 3
|
NUM_PASSWORDS_PER_CATEGORY EQU 3
|
||||||
|
|
||||||
; PasswordTable string types (see engine/radio.asm)
|
; GetBuenasPassword.StringFunctionJumpTable indexes (see engine/radio.asm)
|
||||||
const_def
|
const_def
|
||||||
const BUENA_MON
|
const BUENA_MON
|
||||||
const BUENA_ITEM
|
const BUENA_ITEM
|
||||||
|
26
data/radio/buenas_passwords.asm
Normal file
26
data/radio/buenas_passwords.asm
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
BuenasPasswordTable:
|
||||||
|
; there are NUM_PASSWORD_CATEGORIES entries
|
||||||
|
dw .JohtoStarters
|
||||||
|
dw .Beverages
|
||||||
|
dw .HealingItems
|
||||||
|
dw .Balls
|
||||||
|
dw .Pokemon1
|
||||||
|
dw .Pokemon2
|
||||||
|
dw .JohtoTowns
|
||||||
|
dw .Types
|
||||||
|
dw .Moves
|
||||||
|
dw .XItems
|
||||||
|
dw .RadioStations
|
||||||
|
|
||||||
|
; string type, points, option 1, option 2, option 3
|
||||||
|
.JohtoStarters: db BUENA_MON, 10, CYNDAQUIL, TOTODILE, CHIKORITA
|
||||||
|
.Beverages: db BUENA_ITEM, 12, FRESH_WATER, SODA_POP, LEMONADE
|
||||||
|
.HealingItems: db BUENA_ITEM, 12, POTION, ANTIDOTE, PARLYZ_HEAL
|
||||||
|
.Balls: db BUENA_ITEM, 12, POKE_BALL, GREAT_BALL, ULTRA_BALL
|
||||||
|
.Pokemon1: db BUENA_MON, 10, PIKACHU, RATTATA, GEODUDE
|
||||||
|
.Pokemon2: db BUENA_MON, 10, HOOTHOOT, SPINARAK, DROWZEE
|
||||||
|
.JohtoTowns: db BUENA_STRING, 16, "NEW BARK TOWN@", "CHERRYGROVE CITY@", "AZALEA TOWN@"
|
||||||
|
.Types: db BUENA_STRING, 6, "FLYING@", "BUG@", "GRASS@"
|
||||||
|
.Moves: db BUENA_MOVE, 12, TACKLE, GROWL, MUD_SLAP
|
||||||
|
.XItems: db BUENA_ITEM, 12, X_ATTACK, X_DEFEND, X_SPEED
|
||||||
|
.RadioStations: db BUENA_STRING, 13, "#MON Talk@", "#MON Music@", "Lucky Channel@"
|
13
data/radio/channel_music.asm
Normal file
13
data/radio/channel_music.asm
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
RadioChannelSongs:
|
||||||
|
; entries correspond to radio channel ids
|
||||||
|
dw MUSIC_POKEMON_TALK
|
||||||
|
dw MUSIC_POKEMON_CENTER
|
||||||
|
dw MUSIC_TITLE
|
||||||
|
dw MUSIC_GAME_CORNER
|
||||||
|
dw MUSIC_BUENAS_PASSWORD
|
||||||
|
dw MUSIC_VIRIDIAN_CITY
|
||||||
|
dw MUSIC_BICYCLE
|
||||||
|
dw MUSIC_ROCKET_OVERTURE
|
||||||
|
dw MUSIC_POKE_FLUTE_CHANNEL
|
||||||
|
dw MUSIC_RUINS_OF_ALPH_RADIO
|
||||||
|
dw MUSIC_LAKE_OF_RAGE_ROCKET_RADIO
|
19
data/radio/oaks_pkmn_talk_routes.asm
Normal file
19
data/radio/oaks_pkmn_talk_routes.asm
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
; Oak's Pokémon Talk will list wild Pokémon on these maps.
|
||||||
|
|
||||||
|
OaksPkmnTalkRoutes:
|
||||||
|
map ROUTE_29
|
||||||
|
map ROUTE_46
|
||||||
|
map ROUTE_30
|
||||||
|
map ROUTE_32
|
||||||
|
map ROUTE_34
|
||||||
|
map ROUTE_35
|
||||||
|
map ROUTE_37
|
||||||
|
map ROUTE_38
|
||||||
|
map ROUTE_39
|
||||||
|
map ROUTE_42
|
||||||
|
map ROUTE_43
|
||||||
|
map ROUTE_44
|
||||||
|
map ROUTE_45
|
||||||
|
map ROUTE_36
|
||||||
|
map ROUTE_31
|
||||||
|
OaksPkmnTalkRoutesEnd
|
26
data/radio/pnp_hidden_people.asm
Normal file
26
data/radio/pnp_hidden_people.asm
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
; Places and People will not describe these trainers.
|
||||||
|
|
||||||
|
PnP_HiddenPeople:
|
||||||
|
db WILL
|
||||||
|
db BRUNO
|
||||||
|
db KAREN
|
||||||
|
db KOGA
|
||||||
|
db CHAMPION
|
||||||
|
; fallthrough
|
||||||
|
PnP_HiddenPeople_BeatE4:
|
||||||
|
db BROCK
|
||||||
|
db MISTY
|
||||||
|
db LT_SURGE
|
||||||
|
db ERIKA
|
||||||
|
db JANINE
|
||||||
|
db SABRINA
|
||||||
|
db BLAINE
|
||||||
|
db BLUE
|
||||||
|
; fallthrough
|
||||||
|
PnP_HiddenPeople_BeatKanto:
|
||||||
|
db RIVAL1
|
||||||
|
db POKEMON_PROF
|
||||||
|
db CAL
|
||||||
|
db RIVAL2
|
||||||
|
db RED
|
||||||
|
db -1
|
13
data/radio/pnp_hidden_places.asm
Normal file
13
data/radio/pnp_hidden_places.asm
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
; Places and People will not describe these maps.
|
||||||
|
|
||||||
|
PnP_HiddenPlaces:
|
||||||
|
map PALLET_TOWN
|
||||||
|
map ROUTE_22
|
||||||
|
map PEWTER_CITY
|
||||||
|
map CERULEAN_POLICE_STATION
|
||||||
|
map ROUTE_12
|
||||||
|
map ROUTE_11
|
||||||
|
map ROUTE_16
|
||||||
|
map ROUTE_14
|
||||||
|
map CINNABAR_POKECENTER_2F_BETA
|
||||||
|
PnP_HiddenPlacesEnd
|
136
engine/radio.asm
136
engine/radio.asm
@ -28,6 +28,7 @@ PlayRadioShow:
|
|||||||
jp hl
|
jp hl
|
||||||
|
|
||||||
RadioJumptable:
|
RadioJumptable:
|
||||||
|
; entries correspond to constants/radio_constants.asm
|
||||||
dw OaksPkmnTalk1 ; $00
|
dw OaksPkmnTalk1 ; $00
|
||||||
dw PokedexShow1 ; $01
|
dw PokedexShow1 ; $01
|
||||||
dw BenMonMusic1 ; $02
|
dw BenMonMusic1 ; $02
|
||||||
@ -203,11 +204,11 @@ OaksPkmnTalk4:
|
|||||||
; Choose a random route, and a random Pokemon from that route.
|
; Choose a random route, and a random Pokemon from that route.
|
||||||
.sample
|
.sample
|
||||||
call Random
|
call Random
|
||||||
and $1f
|
and %11111
|
||||||
cp $f ; so wasteful
|
cp (OaksPkmnTalkRoutesEnd - OaksPkmnTalkRoutes) / 2
|
||||||
jr nc, .sample
|
jr nc, .sample
|
||||||
; We now have a number between 0 and 14.
|
; We now have a number between 0 and 14.
|
||||||
ld hl, .routes
|
ld hl, OaksPkmnTalkRoutes
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -239,14 +240,15 @@ OaksPkmnTalk4:
|
|||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
.done
|
.done
|
||||||
|
; Point hl to the list of morning Pokémon., skipping percentages
|
||||||
rept 4
|
rept 4
|
||||||
inc hl
|
inc hl
|
||||||
endr
|
endr
|
||||||
; Generate a number, either 0, 1, or 2, to choose a time of day.
|
; Generate a number, either 0, 1, or 2, to choose a time of day.
|
||||||
.loop2
|
.loop2
|
||||||
call Random
|
call Random
|
||||||
and 3
|
and $3
|
||||||
cp 3
|
cp DARKNESS_F
|
||||||
jr z, .loop2
|
jr z, .loop2
|
||||||
|
|
||||||
ld bc, 2 * NUM_GRASSMON
|
ld bc, 2 * NUM_GRASSMON
|
||||||
@ -273,6 +275,7 @@ endr
|
|||||||
ld de, wMonOrItemNameBuffer
|
ld de, wMonOrItemNameBuffer
|
||||||
ld bc, PKMN_NAME_LENGTH
|
ld bc, PKMN_NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
; Now that we've chosen our wild Pokemon,
|
; Now that we've chosen our wild Pokemon,
|
||||||
; let's recover the map index info and get its name.
|
; let's recover the map index info and get its name.
|
||||||
pop bc
|
pop bc
|
||||||
@ -289,22 +292,7 @@ endr
|
|||||||
ld a, OAKS_POKEMON_TALK
|
ld a, OAKS_POKEMON_TALK
|
||||||
jp PrintRadioLine
|
jp PrintRadioLine
|
||||||
|
|
||||||
.routes
|
INCLUDE "data/radio/oaks_pkmn_talk_routes.asm"
|
||||||
map ROUTE_29
|
|
||||||
map ROUTE_46
|
|
||||||
map ROUTE_30
|
|
||||||
map ROUTE_32
|
|
||||||
map ROUTE_34
|
|
||||||
map ROUTE_35
|
|
||||||
map ROUTE_37
|
|
||||||
map ROUTE_38
|
|
||||||
map ROUTE_39
|
|
||||||
map ROUTE_42
|
|
||||||
map ROUTE_43
|
|
||||||
map ROUTE_44
|
|
||||||
map ROUTE_45
|
|
||||||
map ROUTE_36
|
|
||||||
map ROUTE_31
|
|
||||||
|
|
||||||
OaksPkmnTalk5:
|
OaksPkmnTalk5:
|
||||||
ld hl, OPT_OakText2
|
ld hl, OPT_OakText2
|
||||||
@ -361,7 +349,7 @@ OPT_MaryText1:
|
|||||||
|
|
||||||
OaksPkmnTalk8:
|
OaksPkmnTalk8:
|
||||||
call Random
|
call Random
|
||||||
and $f
|
and $f ; 0-15 are all the valid indexes into .Descriptors
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, .Descriptors
|
ld hl, .Descriptors
|
||||||
@ -473,7 +461,7 @@ OaksPkmnTalk8:
|
|||||||
|
|
||||||
OaksPkmnTalk9:
|
OaksPkmnTalk9:
|
||||||
call Random
|
call Random
|
||||||
and $f
|
and $f ; 0-15 are all the valid indexes into .Descriptors
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, .Descriptors
|
ld hl, .Descriptors
|
||||||
@ -652,7 +640,7 @@ OaksPkmnTalk14:
|
|||||||
ld hl, wRadioTextDelay
|
ld hl, wRadioTextDelay
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret nz
|
ret nz
|
||||||
ld de, $1d
|
ld de, MUSIC_POKEMON_TALK
|
||||||
callfar RadioMusicRestartDE
|
callfar RadioMusicRestartDE
|
||||||
ld hl, .terminator
|
ld hl, .terminator
|
||||||
call PrintText
|
call PrintText
|
||||||
@ -1146,7 +1134,7 @@ PeoplePlaces2:
|
|||||||
PeoplePlaces3:
|
PeoplePlaces3:
|
||||||
ld hl, PnP_Text3
|
ld hl, PnP_Text3
|
||||||
call Random
|
call Random
|
||||||
cp $7b ; 48 percent
|
cp 49 percent - 1
|
||||||
ld a, PLACES_AND_PEOPLE_4 ; People
|
ld a, PLACES_AND_PEOPLE_4 ; People
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
ld a, PLACES_AND_PEOPLE_6 ; Places
|
ld a, PLACES_AND_PEOPLE_6 ; Places
|
||||||
@ -1175,15 +1163,15 @@ PeoplePlaces4: ; People
|
|||||||
cp NUM_TRAINER_CLASSES - 1
|
cp NUM_TRAINER_CLASSES - 1
|
||||||
jr nc, PeoplePlaces4
|
jr nc, PeoplePlaces4
|
||||||
push af
|
push af
|
||||||
ld hl, .E4Names
|
ld hl, PnP_HiddenPeople
|
||||||
ld a, [wStatusFlags]
|
ld a, [wStatusFlags]
|
||||||
bit 6, a ; ENGINE_CREDITS_SKIP
|
bit 6, a ; ENGINE_CREDITS_SKIP
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
ld hl, .KantoLeaderNames
|
ld hl, PnP_HiddenPeople_BeatE4
|
||||||
ld a, [wKantoBadges]
|
ld a, [wKantoBadges]
|
||||||
cp %11111111
|
cp %11111111 ; all badges
|
||||||
jr nz, .ok
|
jr nz, .ok
|
||||||
ld hl, .MiscNames
|
ld hl, PnP_HiddenPeople_BeatKanto
|
||||||
.ok
|
.ok
|
||||||
pop af
|
pop af
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -1203,10 +1191,7 @@ PeoplePlaces4: ; People
|
|||||||
ld a, PLACES_AND_PEOPLE_5
|
ld a, PLACES_AND_PEOPLE_5
|
||||||
jp NextRadioLine
|
jp NextRadioLine
|
||||||
|
|
||||||
.E4Names: db WILL, BRUNO, KAREN, KOGA, CHAMPION
|
INCLUDE "data/radio/pnp_hidden_people.asm"
|
||||||
.KantoLeaderNames: db BROCK, MISTY, LT_SURGE, ERIKA, JANINE, SABRINA, BLAINE, BLUE
|
|
||||||
.MiscNames: db RIVAL1, POKEMON_PROF, CAL, RIVAL2, RED
|
|
||||||
db -1
|
|
||||||
|
|
||||||
PnP_Text4:
|
PnP_Text4:
|
||||||
; @ @ @
|
; @ @ @
|
||||||
@ -1215,7 +1200,7 @@ PnP_Text4:
|
|||||||
|
|
||||||
PeoplePlaces5:
|
PeoplePlaces5:
|
||||||
call Random
|
call Random
|
||||||
and $f
|
and $f ; 0-15 are all the valid indexes into .Descriptors
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, .Descriptors
|
ld hl, .Descriptors
|
||||||
@ -1225,11 +1210,11 @@ PeoplePlaces5:
|
|||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
call Random
|
call Random
|
||||||
cp $a ; 6.25 percent
|
cp 4 percent
|
||||||
ld a, PLACES_AND_PEOPLE
|
ld a, PLACES_AND_PEOPLE
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
call Random
|
call Random
|
||||||
cp $7b ; 48 percent
|
cp 49 percent - 1
|
||||||
ld a, PLACES_AND_PEOPLE_4 ; People
|
ld a, PLACES_AND_PEOPLE_4 ; People
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
ld a, PLACES_AND_PEOPLE_6 ; Places
|
ld a, PLACES_AND_PEOPLE_6 ; Places
|
||||||
@ -1336,9 +1321,9 @@ PnP_odd:
|
|||||||
|
|
||||||
PeoplePlaces6: ; Places
|
PeoplePlaces6: ; Places
|
||||||
call Random
|
call Random
|
||||||
cp 9
|
cp (PnP_HiddenPlacesEnd - PnP_HiddenPlaces) / 2
|
||||||
jr nc, PeoplePlaces6
|
jr nc, PeoplePlaces6
|
||||||
ld hl, .Maps
|
ld hl, PnP_HiddenPlaces
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -1353,16 +1338,7 @@ PeoplePlaces6: ; Places
|
|||||||
ld a, PLACES_AND_PEOPLE_7
|
ld a, PLACES_AND_PEOPLE_7
|
||||||
jp NextRadioLine
|
jp NextRadioLine
|
||||||
|
|
||||||
.Maps:
|
INCLUDE "data/radio/pnp_hidden_places.asm"
|
||||||
map PALLET_TOWN
|
|
||||||
map ROUTE_22
|
|
||||||
map PEWTER_CITY
|
|
||||||
map CERULEAN_POLICE_STATION
|
|
||||||
map ROUTE_12
|
|
||||||
map ROUTE_11
|
|
||||||
map ROUTE_16
|
|
||||||
map ROUTE_14
|
|
||||||
map CINNABAR_POKECENTER_2F_BETA
|
|
||||||
|
|
||||||
PnP_Text5:
|
PnP_Text5:
|
||||||
; @ @
|
; @ @
|
||||||
@ -1371,7 +1347,7 @@ PnP_Text5:
|
|||||||
|
|
||||||
PeoplePlaces7:
|
PeoplePlaces7:
|
||||||
call Random
|
call Random
|
||||||
and $f
|
and $f ; 0-15 are all the valid indexes into .Descriptors
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, .Descriptors
|
ld hl, .Descriptors
|
||||||
@ -1386,7 +1362,7 @@ PeoplePlaces7:
|
|||||||
ld a, PLACES_AND_PEOPLE
|
ld a, PLACES_AND_PEOPLE
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
call Random
|
call Random
|
||||||
cp 1 + 48 percent
|
cp 49 percent - 1
|
||||||
ld a, PLACES_AND_PEOPLE_4 ; People
|
ld a, PLACES_AND_PEOPLE_4 ; People
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
ld a, PLACES_AND_PEOPLE_6 ; Places
|
ld a, PLACES_AND_PEOPLE_6 ; Places
|
||||||
@ -1572,7 +1548,7 @@ BuenasPassword4:
|
|||||||
ld a, [wBuenasPassword]
|
ld a, [wBuenasPassword]
|
||||||
; If we already generated the password today, we don't need to generate a new one.
|
; If we already generated the password today, we don't need to generate a new one.
|
||||||
ld hl, wWeeklyFlags
|
ld hl, wWeeklyFlags
|
||||||
bit 7, [hl]
|
bit 7, [hl] ; ENGINE_BUENAS_PASSWORD
|
||||||
jr nz, .AlreadyGotIt
|
jr nz, .AlreadyGotIt
|
||||||
; There are only 11 groups to choose from.
|
; There are only 11 groups to choose from.
|
||||||
.greater_than_11
|
.greater_than_11
|
||||||
@ -1586,7 +1562,7 @@ BuenasPassword4:
|
|||||||
; For each group, choose one of the three passwords.
|
; For each group, choose one of the three passwords.
|
||||||
.greater_than_three
|
.greater_than_three
|
||||||
call Random
|
call Random
|
||||||
and $3
|
maskbits NUM_PASSWORDS_PER_CATEGORY
|
||||||
cp NUM_PASSWORDS_PER_CATEGORY
|
cp NUM_PASSWORDS_PER_CATEGORY
|
||||||
jr nc, .greater_than_three
|
jr nc, .greater_than_three
|
||||||
; The high nybble of wBuenasPassword will now contain the password group index, and the low nybble contains the actual password.
|
; The high nybble of wBuenasPassword will now contain the password group index, and the low nybble contains the actual password.
|
||||||
@ -1594,7 +1570,7 @@ BuenasPassword4:
|
|||||||
ld [wBuenasPassword], a
|
ld [wBuenasPassword], a
|
||||||
; Set the flag so that we don't generate a new password this week.
|
; Set the flag so that we don't generate a new password this week.
|
||||||
ld hl, wWeeklyFlags
|
ld hl, wWeeklyFlags
|
||||||
set 7, [hl]
|
set 7, [hl] ; ENGINE_BUENAS_PASSWORD
|
||||||
.AlreadyGotIt:
|
.AlreadyGotIt:
|
||||||
ld c, a
|
ld c, a
|
||||||
call GetBuenasPassword
|
call GetBuenasPassword
|
||||||
@ -1608,7 +1584,7 @@ GetBuenasPassword:
|
|||||||
ld a, c
|
ld a, c
|
||||||
swap a
|
swap a
|
||||||
and $f
|
and $f
|
||||||
ld hl, PasswordTable
|
ld hl, BuenasPasswordTable
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld e, a
|
ld e, a
|
||||||
add hl, de
|
add hl, de
|
||||||
@ -1640,11 +1616,11 @@ GetBuenasPassword:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.StringFunctionJumpTable:
|
.StringFunctionJumpTable:
|
||||||
dw .Mon
|
; entries correspond to BUENA_* constants
|
||||||
dw .Item
|
dw .Mon ; BUENA_MON
|
||||||
dw .Move
|
dw .Item ; BUENA_ITEM
|
||||||
dw .RawString
|
dw .Move ; BUENA_MOVE
|
||||||
|
dw .RawString ; BUENA_STRING
|
||||||
|
|
||||||
.Mon:
|
.Mon:
|
||||||
call .GetTheIndex
|
call .GetTheIndex
|
||||||
@ -1693,30 +1669,7 @@ GetBuenasPassword:
|
|||||||
ld de, StringBuffer1
|
ld de, StringBuffer1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
PasswordTable:
|
INCLUDE "data/radio/buenas_passwords.asm"
|
||||||
dw .JohtoStarters
|
|
||||||
dw .Beverages
|
|
||||||
dw .HealingItems
|
|
||||||
dw .Balls
|
|
||||||
dw .Pokemon1
|
|
||||||
dw .Pokemon2
|
|
||||||
dw .JohtoTowns
|
|
||||||
dw .Types
|
|
||||||
dw .Moves
|
|
||||||
dw .XItems
|
|
||||||
dw .RadioStations
|
|
||||||
; string type, points, option 1, option 2, option 3
|
|
||||||
.JohtoStarters: db BUENA_MON, 10, CYNDAQUIL, TOTODILE, CHIKORITA
|
|
||||||
.Beverages: db BUENA_ITEM, 12, FRESH_WATER, SODA_POP, LEMONADE
|
|
||||||
.HealingItems: db BUENA_ITEM, 12, POTION, ANTIDOTE, PARLYZ_HEAL
|
|
||||||
.Balls: db BUENA_ITEM, 12, POKE_BALL, GREAT_BALL, ULTRA_BALL
|
|
||||||
.Pokemon1: db BUENA_MON, 10, PIKACHU, RATTATA, GEODUDE
|
|
||||||
.Pokemon2: db BUENA_MON, 10, HOOTHOOT, SPINARAK, DROWZEE
|
|
||||||
.JohtoTowns: db BUENA_STRING, 16, "NEW BARK TOWN@", "CHERRYGROVE CITY@", "AZALEA TOWN@"
|
|
||||||
.Types: db BUENA_STRING, 6, "FLYING@", "BUG@", "GRASS@"
|
|
||||||
.Moves: db BUENA_MOVE, 12, TACKLE, GROWL, MUD_SLAP
|
|
||||||
.XItems: db BUENA_ITEM, 12, X_ATTACK, X_DEFEND, X_SPEED
|
|
||||||
.RadioStations: db BUENA_STRING, 13, "#MON Talk@", "#MON Music@", "Lucky Channel@"
|
|
||||||
|
|
||||||
BuenasPassword5:
|
BuenasPassword5:
|
||||||
ld hl, BuenaRadioText5
|
ld hl, BuenaRadioText5
|
||||||
@ -1738,14 +1691,14 @@ BuenasPassword7:
|
|||||||
BuenasPasswordAfterMidnight:
|
BuenasPasswordAfterMidnight:
|
||||||
push hl
|
push hl
|
||||||
ld hl, wWeeklyFlags
|
ld hl, wWeeklyFlags
|
||||||
res 7, [hl]
|
res 7, [hl] ; ENGINE_BUENAS_PASSWORD
|
||||||
pop hl
|
pop hl
|
||||||
ld a, BUENAS_PASSWORD_8
|
ld a, BUENAS_PASSWORD_8
|
||||||
jp NextRadioLine
|
jp NextRadioLine
|
||||||
|
|
||||||
BuenasPassword8:
|
BuenasPassword8:
|
||||||
ld hl, wWeeklyFlags
|
ld hl, wWeeklyFlags
|
||||||
res 7, [hl]
|
res 7, [hl] ; ENGINE_BUENAS_PASSWORD
|
||||||
ld hl, BuenaRadioMidnightText10
|
ld hl, BuenaRadioMidnightText10
|
||||||
ld a, BUENAS_PASSWORD_9
|
ld a, BUENAS_PASSWORD_9
|
||||||
jp NextRadioLine
|
jp NextRadioLine
|
||||||
@ -1958,18 +1911,7 @@ StartRadioStation:
|
|||||||
callfar RadioMusicRestartDE
|
callfar RadioMusicRestartDE
|
||||||
ret
|
ret
|
||||||
|
|
||||||
RadioChannelSongs:
|
INCLUDE "data/radio/channel_music.asm"
|
||||||
dw MUSIC_POKEMON_TALK
|
|
||||||
dw MUSIC_POKEMON_CENTER
|
|
||||||
dw MUSIC_TITLE
|
|
||||||
dw MUSIC_GAME_CORNER
|
|
||||||
dw MUSIC_BUENAS_PASSWORD
|
|
||||||
dw MUSIC_VIRIDIAN_CITY
|
|
||||||
dw MUSIC_BICYCLE
|
|
||||||
dw MUSIC_ROCKET_OVERTURE
|
|
||||||
dw MUSIC_POKE_FLUTE_CHANNEL
|
|
||||||
dw MUSIC_RUINS_OF_ALPH_RADIO
|
|
||||||
dw MUSIC_LAKE_OF_RAGE_ROCKET_RADIO
|
|
||||||
|
|
||||||
NextRadioLine:
|
NextRadioLine:
|
||||||
push af
|
push af
|
||||||
|
Loading…
Reference in New Issue
Block a user