More radio labels

This commit is contained in:
PikalaxALT 2015-10-09 23:09:03 -04:00
parent 96b0e448c4
commit b68913a782
9 changed files with 1006 additions and 918 deletions

View File

@ -113,3 +113,6 @@ BATTLETOWER_NROFPKMNS EQU 3
BATTLETOWER_TRAINERDATALENGTH EQU $24
BATTLETOWER_NROFTRAINERS EQU 7
NUM_WILDMONS_PER_AREA_TIME_OF_DAY EQU 7
WILDMON_GRASS_STRUCTURE_LENGTH EQU 2 + 3 * (1 + 2 * NUM_WILDMONS_PER_AREA_TIME_OF_DAY)

View File

@ -1,15 +1,92 @@
const_def
const OAKS_POKEMON_TALK
const POKEDEX_SHOW
const POKEMON_MUSIC
const LUCKY_CHANNEL
const BUENAS_PASSWORD
const PLACES_AND_PEOPLE
const LETS_ALL_SING
const ROCKET_RADIO
const POKE_FLUTE_RADIO
const UNOWN_RADIO
const EVOLUTION_RADIO
const OAKS_POKEMON_TALK ; $00
const POKEDEX_SHOW ; $01
const POKEMON_MUSIC ; $02
const LUCKY_CHANNEL ; $03
const BUENAS_PASSWORD ; $04
const PLACES_AND_PEOPLE ; $05
const LETS_ALL_SING ; $06
const ROCKET_RADIO ; $07
const POKE_FLUTE_RADIO ; $08
const UNOWN_RADIO ; $09
const EVOLUTION_RADIO ; $0a
const OAKS_POKEMON_TALK_2 ; $0b
const OAKS_POKEMON_TALK_3 ; $0c
const OAKS_POKEMON_TALK_4 ; $0d
const OAKS_POKEMON_TALK_5 ; $0e
const OAKS_POKEMON_TALK_6 ; $0f
const OAKS_POKEMON_TALK_7 ; $10
const OAKS_POKEMON_TALK_8 ; $11
const OAKS_POKEMON_TALK_9 ; $12
const POKEDEX_SHOW_2 ; $13
const POKEDEX_SHOW_3 ; $14
const POKEDEX_SHOW_4 ; $15
const POKEDEX_SHOW_5 ; $16
const POKEMON_MUSIC_2 ; $17
const POKEMON_MUSIC_3 ; $18
const POKEMON_MUSIC_4 ; $19
const POKEMON_MUSIC_5 ; $1a
const POKEMON_MUSIC_6 ; $1b
const POKEMON_MUSIC_7 ; $1c
const LETS_ALL_SING_2 ; $1d
const LUCKY_NUMBER_SHOW_2 ; $1e
const LUCKY_NUMBER_SHOW_3 ; $1f
const LUCKY_NUMBER_SHOW_4 ; $20
const LUCKY_NUMBER_SHOW_5 ; $21
const LUCKY_NUMBER_SHOW_6 ; $22
const LUCKY_NUMBER_SHOW_7 ; $23
const LUCKY_NUMBER_SHOW_8 ; $24
const LUCKY_NUMBER_SHOW_9 ; $25
const LUCKY_NUMBER_SHOW_10 ; $26
const LUCKY_NUMBER_SHOW_11 ; $27
const LUCKY_NUMBER_SHOW_12 ; $28
const LUCKY_NUMBER_SHOW_13 ; $29
const LUCKY_NUMBER_SHOW_14 ; $2a
const LUCKY_NUMBER_SHOW_15 ; $2b
const PLACES_AND_PEOPLE_2 ; $2c
const PLACES_AND_PEOPLE_3 ; $2d
const PLACES_AND_PEOPLE_4 ; $2e
const PLACES_AND_PEOPLE_5 ; $2f
const PLACES_AND_PEOPLE_6 ; $30
const PLACES_AND_PEOPLE_7 ; $31
const ROCKET_RADIO_2 ; $32
const ROCKET_RADIO_3 ; $33
const ROCKET_RADIO_4 ; $34
const ROCKET_RADIO_5 ; $35
const ROCKET_RADIO_6 ; $36
const ROCKET_RADIO_7 ; $37
const ROCKET_RADIO_8 ; $38
const ROCKET_RADIO_9 ; $39
const ROCKET_RADIO_10 ; $3a
const OAKS_POKEMON_TALK_10 ; $3b
const OAKS_POKEMON_TALK_11 ; $3c
const OAKS_POKEMON_TALK_12 ; $3d
const OAKS_POKEMON_TALK_13 ; $3e
const OAKS_POKEMON_TALK_14 ; $3f
const BUENAS_PASSWORD_2 ; $40
const BUENAS_PASSWORD_3 ; $41
const BUENAS_PASSWORD_4 ; $42
const BUENAS_PASSWORD_5 ; $43
const BUENAS_PASSWORD_6 ; $44
const BUENAS_PASSWORD_7 ; $45
const BUENAS_PASSWORD_8 ; $46
const BUENAS_PASSWORD_9 ; $47
const BUENAS_PASSWORD_10 ; $48
const BUENAS_PASSWORD_11 ; $49
const BUENAS_PASSWORD_12 ; $4a
const BUENAS_PASSWORD_13 ; $4b
const BUENAS_PASSWORD_14 ; $4c
const BUENAS_PASSWORD_15 ; $4d
const BUENAS_PASSWORD_16 ; $4e
const BUENAS_PASSWORD_17 ; $4f
const BUENAS_PASSWORD_18 ; $50
const BUENAS_PASSWORD_19 ; $51
const BUENAS_PASSWORD_20 ; $52
const BUENAS_PASSWORD_21 ; $53
const RADIO_SCROLL ; $54
const POKEDEX_SHOW_6 ; $55
const POKEDEX_SHOW_7 ; $56
const POKEDEX_SHOW_8 ; $57
const_def
const BUENA_MON

File diff suppressed because it is too large Load Diff

404
engine/radio2.asm Normal file
View File

@ -0,0 +1,404 @@
_UpdateRadioStation: ; 9163e (24:563e)
jr UpdateRadioStation
Function91640: ; 91640 (24:5640)
push bc
call .TuningKnob
pop bc
ld a, [wRadioTuningKnob]
ld hl, $6
add hl, bc
ld [hl], a
ret
.TuningKnob: ; 9164e (24:564e)
ld hl, hJoyLast
ld a, [hl]
and D_DOWN
jr nz, .down
ld a, [hl]
and D_UP
jr nz, .up
ret
.down
ld hl, wRadioTuningKnob
ld a, [hl]
and a
ret z
rept 2
dec [hl]
endr
jr .update
.up
ld hl, wRadioTuningKnob
ld a, [hl]
cp 80
ret nc
rept 2
inc [hl]
endr
.update
UpdateRadioStation: ; 9166f (24:566f)
ld hl, wRadioTuningKnob
ld d, [hl]
ld hl, RadioChannels
.loop
ld a, [hli]
cp -1
jr z, .nostation
cp d
jr z, .foundstation
rept 2
inc hl
endr
jr .loop
.nostation
call NoRadioStation
ret
.foundstation
ld a, [hli]
ld h, [hl]
ld l, a
ld de, .returnafterstation
push de
jp [hl]
.returnafterstation
ld a, [wc6d9]
and a
ret z
xor a
ld [hBGMapMode], a
hlcoord 2, 9
call PlaceString
ld a, $1
ld [hBGMapMode], a
ret
; 916a1 (24:56a1)
Function916a1: ; 916a1
ld [wc6d9], a
ld a, [hli]
ld [wc6da], a
ld a, [hli]
ld [wc6db], a
ret
; 916ad
RadioChannels:
; frequencies and the shows that play on them.
; frequency value given here = 4 × ingame_frequency 2
dbw 16, .PkmnTalkAndPokedexShow
dbw 28, .PokemonMusic
dbw 32, .LuckyChannel
dbw 40, .BuenasPassword
dbw 52, .RuinsOfAlphRadio
dbw 64, .PlacesAndPeople
dbw 72, .LetsAllSing
dbw 78, .PokeFluteRadio
dbw 80, .EvolutionRadio
db $ff
.PkmnTalkAndPokedexShow
; Pokédex Show in the morning
; Oak's Pokémon Talk in the afternoon and evening
call .InJohto
jr nc, .NoSignal
ld a, [TimeOfDay]
and a
jp z, LoadStation_PokedexShow
jp LoadStation_OaksPokemonTalk
.PokemonMusic
call .InJohto
jr nc, .NoSignal
jp LoadStation_PokemonMusic
.LuckyChannel
call .InJohto
jr nc, .NoSignal
jp LoadStation_LuckyChannel
.BuenasPassword
call .InJohto
jr nc, .NoSignal
jp LoadStation_BuenasPassword
.RuinsOfAlphRadio
ld a, [wc6d8]
cp RUINS_OF_ALPH
jr nz, .NoSignal
jp LoadStation_UnownRadio
.PlacesAndPeople
call .InJohto
jr c, .NoSignal
ld a, [wPokegearFlags]
bit 3, a
jr z, .NoSignal
jp LoadStation_PlacesAndPeople
.LetsAllSing
call .InJohto
jr c, .NoSignal
ld a, [wPokegearFlags]
bit 3, a
jr z, .NoSignal
jp LoadStation_LetsAllSing
.PokeFluteRadio
call .InJohto
jr c, .NoSignal
ld a, [wPokegearFlags]
bit 3, a
jr z, .NoSignal
jp LoadStation_PokeFluteRadio
.EvolutionRadio
; This station airs in the Lake of Rage area when Rocket are still in Mahogany.
ld a, [StatusFlags]
bit 4, a
jr z, .NoSignal
ld a, [wc6d8]
cp MAHOGANY_TOWN
jr z, .ok
cp ROUTE_43
jr z, .ok
cp LAKE_OF_RAGE
jr nz, .NoSignal
.ok
jp LoadStation_EvolutionRadio
.NoSignal
call NoRadioStation
ret
.InJohto
; if in Johto or on the S.S. Aqua, set carry
; otherwise clear carry
ld a, [wc6d8]
cp FAST_SHIP
jr z, .johto
cp KANTO_LANDMARK
jr c, .johto
.kanto
and a
ret
.johto
scf
ret
LoadStation_OaksPokemonTalk: ; 91753 (24:5753)
xor a ; OAKS_POKEMON_TALK
ld [wd002], a
ld [wd005], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, OaksPkmnTalkName
ret
LoadStation_PokedexShow: ; 91766 (24:5766)
ld a, POKEDEX_SHOW
ld [wd002], a
xor a
ld [wd005], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, PokedexShowName
ret
LoadStation_PokemonMusic: ; 9177b (24:577b)
ld a, POKEMON_MUSIC
ld [wd002], a
xor a
ld [wd005], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, PokemonMusicName
ret
LoadStation_LuckyChannel: ; 91790 (24:5790)
ld a, LUCKY_CHANNEL
ld [wd002], a
xor a
ld [wd005], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, LuckyChannelName
ret
LoadStation_BuenasPassword: ; 917a5 (24:57a5)
ld a, BUENAS_PASSWORD
ld [wd002], a
xor a
ld [wd005], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, NotBuenasPasswordName
ld a, [StatusFlags2]
bit 0, a
ret z
ld de, BuenasPasswordName
ret
; 917c3 (24:57c3)
BuenasPasswordName: db "BUENA'S PASSWORD@"
NotBuenasPasswordName: db "@"
LoadStation_UnownRadio: ; 917d5 (24:57d5)
ld a, UNOWN_RADIO
ld [wd002], a
xor a
ld [wd005], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, UnknownStationName
ret
LoadStation_PlacesAndPeople: ; 917ea (24:57ea)
ld a, PLACES_AND_PEOPLE
ld [wd002], a
xor a
ld [wd005], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, PlacesAndPeopleName
ret
LoadStation_LetsAllSing: ; 917ff (24:57ff)
ld a, LETS_ALL_SING
ld [wd002], a
xor a
ld [wd005], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, LetsAllSingName
ret
; 91814 (24:5814)
LoadStation_RocketRadio: ; 91814
ld a, ROCKET_RADIO
ld [wd002], a
xor a
ld [wd005], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, LetsAllSingName
ret
; 91829
LoadStation_PokeFluteRadio: ; 91829 (24:5829)
ld a, POKE_FLUTE_RADIO
ld [wd002], a
xor a
ld [wd005], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, PokeFluteStationName
ret
LoadStation_EvolutionRadio: ; 9183e (24:583e)
ld a, EVOLUTION_RADIO
ld [wd002], a
xor a
ld [wd005], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, UnknownStationName
ret
; 91853 (24:5853)
LoadStation_Dummy: ; 91853
ret
RadioMusicRestartDE: ; 91854 (24:5854)
push de
ld a, e
ld [wc6dc], a
ld de, MUSIC_NONE
call PlayMusic
pop de
ld a, e
ld [wMapMusic], a
call PlayMusic
ret
RadioMusicRestartPokemonChannel: ; 91868 (24:5868)
push de
ld a, $fe
ld [wc6dc], a
ld de, MUSIC_NONE
call PlayMusic
pop de
ld de, MUSIC_POKEMON_CHANNEL
call PlayMusic
ret
Radio_BackUpFarCallParams: ; 9187c (24:587c)
ld [wc6d9], a
ld a, l
ld [wc6da], a
ld a, h
ld [wc6db], a
ret
NoRadioStation: ; 91888 (24:5888)
call NoRadioMusic
call NoRadioName
xor a
ld [wc6d9], a
ld [wc6da], a
ld [wc6db], a
ld a, $1
ld [hBGMapMode], a ; $ff00+$d4
ret
NoRadioMusic: ; 9189d (24:589d)
ld de, MUSIC_NONE
call PlayMusic
ld a, $ff
ld [wc6dc], a
ret
NoRadioName: ; 918a9 (24:58a9)
xor a
ld [hBGMapMode], a ; $ff00+$d4
hlcoord 1, 8
ld bc, $312
call ClearBox
hlcoord 0, 12
ld bc, $412
call TextBox
ret
; 918bf
OaksPkmnTalkName: db "OAK's <PK><MN> Talk@"
PokedexShowName: db "#DEX Show@"
PokemonMusicName: db "#MON Music@"
LuckyChannelName: db "Lucky Channel@"
UnknownStationName: db "?????@"
PlacesAndPeopleName: db "Places & People@"
LetsAllSingName: db "Let's All Sing!@"
PokeFluteStationName: db "# FLUTE@"
; 9191c

View File

@ -273,7 +273,7 @@ endm
dict $24, PlacePOKE
dict $25, NextChar
dict2 $1f, " "
dict $5f, Char5F
dict "<DEXEND>", PlaceDexEnd
dict "<TARGET>", PlaceMoveTargetsName
dict "<USER>", PlaceMoveUsersName
dict "<ENEMY>", PlaceEnemysName
@ -590,7 +590,7 @@ ContText:: ; 1345
; 1356
Char5F:: ; 1356
PlaceDexEnd:: ; 1356
; Legacy: ends a Pokédex entry (Red).
; Dex entries are now regular strings.
ld [hl], "."

View File

@ -26,6 +26,7 @@ hJoypadSum EQU $ffa5
hJoyReleased EQU $ffa6
hJoyPressed EQU $ffa7
hJoyDown EQU $ffa8
hJoyLast EQU $ffa9
hConnectionStripLength EQU $ffaf
hConnectedMapWidth EQU $ffb0

View File

@ -301,3 +301,5 @@
charmap "<TRNER>", $5d
charmap "<ROCKET>", $5e
charmap "<......>", $56
charmap "<START>", $00
charmap "<DEXEND>", $5f

643
main.asm

File diff suppressed because it is too large Load Diff

View File

@ -2150,7 +2150,7 @@ PCItemsEnd::
ds 1
wPokegearFlags:: ds 1
wd958:: ds 1
wRadioTuningKnob:: ds 1
wd959:: ds 2
WhichRegisteredItem:: ; d95b
ds 1