mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Revise some constant definitions
This commit is contained in:
parent
52bcd78290
commit
3684296583
@ -1,4 +1,5 @@
|
|||||||
FrequencyTable:
|
FrequencyTable:
|
||||||
|
table_width 2, FrequencyTable
|
||||||
dw 0 ; __
|
dw 0 ; __
|
||||||
dw $f82c ; C_
|
dw $f82c ; C_
|
||||||
dw $f89d ; C#
|
dw $f89d ; C#
|
||||||
@ -12,6 +13,7 @@ FrequencyTable:
|
|||||||
dw $fb58 ; A_
|
dw $fb58 ; A_
|
||||||
dw $fb9b ; A#
|
dw $fb9b ; A#
|
||||||
dw $fbda ; B_
|
dw $fbda ; B_
|
||||||
|
assert_table_length NUM_NOTES + 1
|
||||||
dw $fc16 ; C_
|
dw $fc16 ; C_
|
||||||
dw $fc4e ; C#
|
dw $fc4e ; C#
|
||||||
dw $fc83 ; D_
|
dw $fc83 ; D_
|
||||||
@ -24,3 +26,4 @@ FrequencyTable:
|
|||||||
dw $fdac ; A_
|
dw $fdac ; A_
|
||||||
dw $fdcd ; A#
|
dw $fdcd ; A#
|
||||||
dw $fded ; B_
|
dw $fded ; B_
|
||||||
|
assert_table_length NUM_NOTES * 2 + 1
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
const A_ ; a
|
const A_ ; a
|
||||||
const A# ; b
|
const A# ; b
|
||||||
const B_ ; c
|
const B_ ; c
|
||||||
|
NUM_NOTES EQU const_value - 1
|
||||||
|
|
||||||
; channel
|
; channel
|
||||||
; ChannelPointers indexes (see audio/engine.asm)
|
; ChannelPointers indexes (see audio/engine.asm)
|
||||||
|
@ -41,15 +41,15 @@ BASE_AI_SWITCH_SCORE EQU 10
|
|||||||
NUM_LEVEL_STATS EQU const_value
|
NUM_LEVEL_STATS EQU const_value
|
||||||
|
|
||||||
; move struct members (see data/moves/moves.asm)
|
; move struct members (see data/moves/moves.asm)
|
||||||
const_def
|
rsreset
|
||||||
const MOVE_ANIM ; 0
|
MOVE_ANIM rb ; 0
|
||||||
const MOVE_EFFECT ; 1
|
MOVE_EFFECT rb ; 1
|
||||||
const MOVE_POWER ; 2
|
MOVE_POWER rb ; 2
|
||||||
const MOVE_TYPE ; 3
|
MOVE_TYPE rb ; 3
|
||||||
const MOVE_ACC ; 4
|
MOVE_ACC rb ; 4
|
||||||
const MOVE_PP ; 5
|
MOVE_PP rb ; 5
|
||||||
const MOVE_CHANCE ; 6
|
MOVE_CHANCE rb ; 6
|
||||||
MOVE_LENGTH EQU const_value
|
MOVE_LENGTH EQU _RS
|
||||||
|
|
||||||
; stat constants
|
; stat constants
|
||||||
; indexes for:
|
; indexes for:
|
||||||
@ -97,7 +97,7 @@ SPDSPCDV_SHINY EQU $AA
|
|||||||
const BATTLETYPE_CELEBI
|
const BATTLETYPE_CELEBI
|
||||||
const BATTLETYPE_SUICUNE
|
const BATTLETYPE_SUICUNE
|
||||||
|
|
||||||
; BattleVarPairs indexes (see home/battle.asm)
|
; BattleVarPairs indexes (see home/battle_vars.asm)
|
||||||
const_def
|
const_def
|
||||||
const BATTLE_VARS_SUBSTATUS1
|
const BATTLE_VARS_SUBSTATUS1
|
||||||
const BATTLE_VARS_SUBSTATUS2
|
const BATTLE_VARS_SUBSTATUS2
|
||||||
@ -122,7 +122,7 @@ SPDSPCDV_SHINY EQU $AA
|
|||||||
const BATTLE_VARS_LAST_MOVE_OPP
|
const BATTLE_VARS_LAST_MOVE_OPP
|
||||||
NUM_BATTLE_VARS EQU const_value
|
NUM_BATTLE_VARS EQU const_value
|
||||||
|
|
||||||
; BattleVarLocations indexes (see home/battle.asm)
|
; BattleVarLocations indexes (see home/battle_vars.asm)
|
||||||
const_def
|
const_def
|
||||||
const PLAYER_SUBSTATUS_1
|
const PLAYER_SUBSTATUS_1
|
||||||
const ENEMY_SUBSTATUS_1
|
const ENEMY_SUBSTATUS_1
|
||||||
|
@ -28,7 +28,7 @@ EXP_BAR_LENGTH EQU 8 ; tiles
|
|||||||
HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels
|
HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels
|
||||||
EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * TILE_WIDTH ; pixels
|
EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * TILE_WIDTH ; pixels
|
||||||
|
|
||||||
; GetHPPal return values (see home.asm)
|
; GetHPPal return values (see home/tilemap.asm)
|
||||||
HP_GREEN EQU 0
|
HP_GREEN EQU 0
|
||||||
HP_YELLOW EQU 1
|
HP_YELLOW EQU 1
|
||||||
HP_RED EQU 2
|
HP_RED EQU 2
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
; Graciously aped from:
|
; Graciously derived from:
|
||||||
; http://nocash.emubase.de/pandocs.htm
|
; https://gbdev.io/pandocs/
|
||||||
|
; https://github.com/gbdev/hardware.inc
|
||||||
; http://gameboy.mongenel.com/dmg/asmmemmap.html
|
; http://gameboy.mongenel.com/dmg/asmmemmap.html
|
||||||
|
|
||||||
; memory map
|
; memory map
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
; Landmarks indexes (see data/maps/landmarks.asm)
|
; Landmarks indexes (see data/maps/landmarks.asm)
|
||||||
const_def
|
const_def
|
||||||
; Johto landmarks
|
|
||||||
const LANDMARK_SPECIAL ; 00
|
const LANDMARK_SPECIAL ; 00
|
||||||
|
; Johto landmarks
|
||||||
const LANDMARK_NEW_BARK_TOWN ; 01
|
const LANDMARK_NEW_BARK_TOWN ; 01
|
||||||
const LANDMARK_ROUTE_29 ; 02
|
const LANDMARK_ROUTE_29 ; 02
|
||||||
const LANDMARK_CHERRYGROVE_CITY ; 03
|
const LANDMARK_CHERRYGROVE_CITY ; 03
|
||||||
|
@ -18,6 +18,7 @@ MAP_FISHGROUP rb ; 8
|
|||||||
MAP_LENGTH EQU _RS
|
MAP_LENGTH EQU _RS
|
||||||
|
|
||||||
; map environments (wEnvironment)
|
; map environments (wEnvironment)
|
||||||
|
; EnvironmentColorsPointers indexes (see data/maps/environment_colors.asm)
|
||||||
const_def 1
|
const_def 1
|
||||||
const TOWN
|
const TOWN
|
||||||
const ROUTE
|
const ROUTE
|
||||||
@ -26,6 +27,7 @@ MAP_LENGTH EQU _RS
|
|||||||
const ENVIRONMENT_5
|
const ENVIRONMENT_5
|
||||||
const GATE
|
const GATE
|
||||||
const DUNGEON
|
const DUNGEON
|
||||||
|
NUM_ENVIRONMENTS EQU const_value - 1
|
||||||
|
|
||||||
; map palettes (wEnvironment)
|
; map palettes (wEnvironment)
|
||||||
const_def
|
const_def
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
const MAPSETUP_SUBMENU ; fa
|
const MAPSETUP_SUBMENU ; fa
|
||||||
const MAPSETUP_BADWARP ; fb
|
const MAPSETUP_BADWARP ; fb
|
||||||
const MAPSETUP_FLY ; fc
|
const MAPSETUP_FLY ; fc
|
||||||
|
NUM_MAPSETUP_SCRIPTS EQU const_value - $f1
|
||||||
|
|
||||||
; callback types
|
; callback types
|
||||||
const_def 1
|
const_def 1
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
; song ids
|
; song ids
|
||||||
; Music indexes (see audio/music_pointers.asm)
|
; Music indexes (see audio/music_pointers.asm)
|
||||||
const_def
|
const_def
|
||||||
|
|
||||||
const MUSIC_NONE ; 00
|
const MUSIC_NONE ; 00
|
||||||
const MUSIC_TITLE ; 01
|
const MUSIC_TITLE ; 01
|
||||||
const MUSIC_ROUTE_1 ; 02
|
const MUSIC_ROUTE_1 ; 02
|
||||||
@ -95,7 +94,6 @@
|
|||||||
const MUSIC_LAKE_OF_RAGE_ROCKET_RADIO ; 5a
|
const MUSIC_LAKE_OF_RAGE_ROCKET_RADIO ; 5a
|
||||||
const MUSIC_PRINTER ; 5b
|
const MUSIC_PRINTER ; 5b
|
||||||
const MUSIC_POST_CREDITS ; 5c
|
const MUSIC_POST_CREDITS ; 5c
|
||||||
|
|
||||||
; new to Crystal
|
; new to Crystal
|
||||||
const MUSIC_CLAIR ; 5d
|
const MUSIC_CLAIR ; 5d
|
||||||
const MUSIC_MOBILE_ADAPTER_MENU ; 5e
|
const MUSIC_MOBILE_ADAPTER_MENU ; 5e
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; npctrade struct members (see data/events/npc_trades.asm)
|
; npctrade struct members (see data/events/npc_trades.asm)
|
||||||
rsreset
|
rsreset
|
||||||
NPCTRADE_DIALOG rb
|
NPCTRADE_DIALOG rb
|
||||||
NPCTRADE_GIVEMON rb
|
NPCTRADE_GIVEMON rb
|
||||||
|
@ -55,20 +55,18 @@ NUM_SPECIALCALLS EQU const_value - 1
|
|||||||
SPECIALCALL_SIZE EQU 6
|
SPECIALCALL_SIZE EQU 6
|
||||||
|
|
||||||
; phone struct members
|
; phone struct members
|
||||||
const_def
|
rsreset
|
||||||
const PHONE_CONTACT_TRAINER_CLASS
|
PHONE_CONTACT_TRAINER_CLASS rb
|
||||||
const PHONE_CONTACT_TRAINER_NUMBER
|
PHONE_CONTACT_TRAINER_NUMBER rb
|
||||||
const PHONE_CONTACT_MAP_GROUP
|
PHONE_CONTACT_MAP_GROUP rb
|
||||||
const PHONE_CONTACT_MAP_NUMBER
|
PHONE_CONTACT_MAP_NUMBER rb
|
||||||
const PHONE_CONTACT_SCRIPT1_TIME
|
PHONE_CONTACT_SCRIPT1_TIME rb
|
||||||
const PHONE_CONTACT_SCRIPT1_BANK
|
PHONE_CONTACT_SCRIPT1_BANK rb
|
||||||
const PHONE_CONTACT_SCRIPT1_ADDR
|
PHONE_CONTACT_SCRIPT1_ADDR rw
|
||||||
const_skip ; high PHONE_CONTACT_SCRIPT1_ADDR byte
|
PHONE_CONTACT_SCRIPT2_TIME rb
|
||||||
const PHONE_CONTACT_SCRIPT2_TIME
|
PHONE_CONTACT_SCRIPT2_BANK rb
|
||||||
const PHONE_CONTACT_SCRIPT2_BANK
|
PHONE_CONTACT_SCRIPT2_ADDR rw
|
||||||
const PHONE_CONTACT_SCRIPT2_ADDR
|
PHONE_CONTACT_SIZE EQU _RS
|
||||||
const_skip ; high PHONE_CONTACT_SCRIPT2_ADDR byte
|
|
||||||
PHONE_CONTACT_SIZE EQU const_value
|
|
||||||
|
|
||||||
; maximum number of pokegear contacts
|
; maximum number of pokegear contacts
|
||||||
CONTACT_LIST_SIZE EQU 10
|
CONTACT_LIST_SIZE EQU 10
|
||||||
|
@ -96,7 +96,7 @@ NUM_RADIO_CHANNELS EQU const_value
|
|||||||
const POKEDEX_SHOW_8 ; 57
|
const POKEDEX_SHOW_8 ; 57
|
||||||
NUM_RADIO_SEGMENTS EQU const_value
|
NUM_RADIO_SEGMENTS EQU const_value
|
||||||
|
|
||||||
; PlayRadio.StationPointers indexes (see engine/pokegear/pokegear.asm)
|
; PlayRadioStationPointers indexes (see engine/pokegear/pokegear.asm)
|
||||||
const_def
|
const_def
|
||||||
const MAPRADIO_POKEMON_CHANNEL
|
const MAPRADIO_POKEMON_CHANNEL
|
||||||
const MAPRADIO_OAKS_POKEMON_TALK
|
const MAPRADIO_OAKS_POKEMON_TALK
|
||||||
@ -107,6 +107,7 @@ NUM_RADIO_SEGMENTS EQU const_value
|
|||||||
const MAPRADIO_PLACES_PEOPLE
|
const MAPRADIO_PLACES_PEOPLE
|
||||||
const MAPRADIO_LETS_ALL_SING
|
const MAPRADIO_LETS_ALL_SING
|
||||||
const MAPRADIO_ROCKET
|
const MAPRADIO_ROCKET
|
||||||
|
NUM_MAP_RADIO_STATIONS EQU const_value
|
||||||
|
|
||||||
; These tables in engine/pokegear/radio.asm are all sized to a power of 2
|
; These tables in engine/pokegear/radio.asm are all sized to a power of 2
|
||||||
; so there's no need for a rejection sampling loop
|
; so there's no need for a rejection sampling loop
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; GetSGBLayout arguments (see engine/gfx/cgb_layouts.asm and engine/gfx/sgb_layouts.asm)
|
; CGBLayoutJumptable indexes (see engine/gfx/cgb_layouts.asm)
|
||||||
|
; SGBLayoutJumptable indexes (see engine/gfx/sgb_layouts.asm)
|
||||||
const_def
|
const_def
|
||||||
const SCGB_BATTLE_GRAYSCALE
|
const SCGB_BATTLE_GRAYSCALE
|
||||||
const SCGB_BATTLE_COLORS
|
const SCGB_BATTLE_COLORS
|
||||||
@ -31,6 +32,7 @@
|
|||||||
const SCGB_TRAINER_OR_MON_FRONTPIC_PALS
|
const SCGB_TRAINER_OR_MON_FRONTPIC_PALS
|
||||||
const SCGB_MYSTERY_GIFT
|
const SCGB_MYSTERY_GIFT
|
||||||
const SCGB_1E
|
const SCGB_1E
|
||||||
|
NUM_SCGB_LAYOUTS EQU const_value
|
||||||
|
|
||||||
SCGB_PARTY_MENU_HP_BARS EQU $fc
|
SCGB_PARTY_MENU_HP_BARS EQU $fc
|
||||||
SCGB_DEFAULT EQU $ff
|
SCGB_DEFAULT EQU $ff
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; person constants
|
; object constants
|
||||||
PLAYER EQU 0
|
PLAYER EQU 0
|
||||||
LAST_TALKED EQU -2
|
LAST_TALKED EQU -2
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
; SFX indexes (see audio/sfx_pointers.asm)
|
; SFX indexes (see audio/sfx_pointers.asm)
|
||||||
const_def
|
const_def
|
||||||
|
|
||||||
const SFX_DEX_FANFARE_50_79 ; 00
|
const SFX_DEX_FANFARE_50_79 ; 00
|
||||||
const SFX_ITEM ; 01
|
const SFX_ITEM ; 01
|
||||||
const SFX_CAUGHT_MON ; 02
|
const SFX_CAUGHT_MON ; 02
|
||||||
@ -189,7 +188,6 @@
|
|||||||
const SFX_TRAIN_ARRIVED ; b9
|
const SFX_TRAIN_ARRIVED ; b9
|
||||||
const SFX_STOP_SLOT ; ba
|
const SFX_STOP_SLOT ; ba
|
||||||
const SFX_2_BOOPS ; bb
|
const SFX_2_BOOPS ; bb
|
||||||
|
|
||||||
; new to Crystal
|
; new to Crystal
|
||||||
const SFX_GLASS_TING ; bc
|
const SFX_GLASS_TING ; bc
|
||||||
const SFX_GLASS_TING_2 ; bd
|
const SFX_GLASS_TING_2 ; bd
|
||||||
@ -210,5 +208,4 @@
|
|||||||
const SFX_TWO_PC_BEEPS ; cc
|
const SFX_TWO_PC_BEEPS ; cc
|
||||||
const SFX_4_NOTE_DITTY ; cd
|
const SFX_4_NOTE_DITTY ; cd
|
||||||
const SFX_TWINKLE ; ce
|
const SFX_TWINKLE ; ce
|
||||||
|
|
||||||
NUM_SFX EQU const_value
|
NUM_SFX EQU const_value
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
; overworld_sprite struct members (see data/sprites.asm)
|
; overworld_sprite struct members (see data/sprites/sprites.asm)
|
||||||
const_def
|
rsreset
|
||||||
const SPRITEDATA_ADDR ; 0
|
SPRITEDATA_ADDR rw ; 0
|
||||||
const_skip ; high SPRITEDATA_ADDR byte
|
SPRITEDATA_SIZE rb ; 2
|
||||||
const SPRITEDATA_SIZE ; 2
|
SPRITEDATA_BANK rb ; 3
|
||||||
const SPRITEDATA_BANK ; 3
|
SPRITEDATA_TYPE rb ; 4
|
||||||
const SPRITEDATA_TYPE ; 4
|
SPRITEDATA_PALETTE rb ; 5
|
||||||
const SPRITEDATA_PALETTE ; 5
|
NUM_SPRITEDATA_FIELDS EQU _RS
|
||||||
NUM_SPRITEDATA_FIELDS EQU const_value
|
|
||||||
|
|
||||||
; sprite types
|
; sprite types
|
||||||
const_def 1
|
const_def 1
|
||||||
|
@ -30,6 +30,9 @@ TEXTBOX_INNERX EQU TEXTBOX_X + 1
|
|||||||
TEXTBOX_Y EQU SCREEN_HEIGHT - TEXTBOX_HEIGHT
|
TEXTBOX_Y EQU SCREEN_HEIGHT - TEXTBOX_HEIGHT
|
||||||
TEXTBOX_INNERY EQU TEXTBOX_Y + 2
|
TEXTBOX_INNERY EQU TEXTBOX_Y + 2
|
||||||
|
|
||||||
|
; see gfx/frames/*.png
|
||||||
|
TEXTBOX_FRAME_TILES EQU 6
|
||||||
|
|
||||||
; PrintNum bit flags
|
; PrintNum bit flags
|
||||||
const_def 5
|
const_def 5
|
||||||
const PRINTNUM_MONEY_F ; 5
|
const PRINTNUM_MONEY_F ; 5
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
; TrainerClassAttributes struct members (see data/trainers/attributes.asm)
|
; TrainerClassAttributes struct members (see data/trainers/attributes.asm)
|
||||||
const_def
|
rsreset
|
||||||
const TRNATTR_ITEM1 ; 0
|
TRNATTR_ITEM1 rb ; 0
|
||||||
const TRNATTR_ITEM2 ; 1
|
TRNATTR_ITEM2 rb ; 1
|
||||||
const TRNATTR_BASEMONEY ; 2
|
TRNATTR_BASEMONEY rb ; 2
|
||||||
const TRNATTR_AI_MOVE_WEIGHTS ; 3
|
TRNATTR_AI_MOVE_WEIGHTS rw ; 3
|
||||||
const_skip ; high TRNATTR_AI_MOVE_WEIGHTS byte
|
TRNATTR_AI_ITEM_SWITCH rw ; 5
|
||||||
const TRNATTR_AI_ITEM_SWITCH ; 5
|
NUM_TRAINER_ATTRIBUTES EQU _RS
|
||||||
const_skip ; high TRNATTR_AI_ITEM_SWITCH byte
|
|
||||||
NUM_TRAINER_ATTRIBUTES EQU const_value
|
|
||||||
|
|
||||||
; TRNATTR_AI_MOVE_WEIGHTS bit flags (wEnemyTrainerAIFlags)
|
; TRNATTR_AI_MOVE_WEIGHTS bit flags (wEnemyTrainerAIFlags)
|
||||||
; AIScoringPointers indexes (see engine/battle/ai/move.asm)
|
; AIScoringPointers indexes (see engine/battle/ai/move.asm)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
EnvironmentColorsPointers:
|
EnvironmentColorsPointers:
|
||||||
; entries correspond to environment constants (see constants/map_data_constants.asm)
|
; entries correspond to environment constants (see constants/map_data_constants.asm)
|
||||||
|
table_width 2, EnvironmentColorsPointers
|
||||||
dw .OutdoorColors ; unused
|
dw .OutdoorColors ; unused
|
||||||
dw .OutdoorColors ; TOWN
|
dw .OutdoorColors ; TOWN
|
||||||
dw .OutdoorColors ; ROUTE
|
dw .OutdoorColors ; ROUTE
|
||||||
@ -8,6 +9,7 @@ EnvironmentColorsPointers:
|
|||||||
dw .Env5Colors ; ENVIRONMENT_5
|
dw .Env5Colors ; ENVIRONMENT_5
|
||||||
dw .IndoorColors ; GATE
|
dw .IndoorColors ; GATE
|
||||||
dw .DungeonColors ; DUNGEON
|
dw .DungeonColors ; DUNGEON
|
||||||
|
assert_table_length NUM_ENVIRONMENTS + 1
|
||||||
|
|
||||||
; Valid indices: $00 - $29 (see gfx/tilesets/bg_tiles.pal)
|
; Valid indices: $00 - $29 (see gfx/tilesets/bg_tiles.pal)
|
||||||
.OutdoorColors:
|
.OutdoorColors:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
MapSetupScripts:
|
MapSetupScripts:
|
||||||
; entries correspond to MAPSETUP_* constants (see constants/map_setup_constants.asm)
|
; entries correspond to MAPSETUP_* constants (see constants/map_setup_constants.asm)
|
||||||
|
table_width 2, MapSetupScripts
|
||||||
dw MapSetupScript_Warp
|
dw MapSetupScript_Warp
|
||||||
dw MapSetupScript_Continue
|
dw MapSetupScript_Continue
|
||||||
dw MapSetupScript_ReloadMap
|
dw MapSetupScript_ReloadMap
|
||||||
@ -12,6 +13,7 @@ MapSetupScripts:
|
|||||||
dw MapSetupScript_Submenu
|
dw MapSetupScript_Submenu
|
||||||
dw MapSetupScript_BadWarp
|
dw MapSetupScript_BadWarp
|
||||||
dw MapSetupScript_Fly
|
dw MapSetupScript_Fly
|
||||||
|
assert_table_length NUM_MAPSETUP_SCRIPTS
|
||||||
|
|
||||||
; valid commands are listed in MapSetupCommands (see data/maps/setup_script_pointers.asm)
|
; valid commands are listed in MapSetupCommands (see data/maps/setup_script_pointers.asm)
|
||||||
mapsetup: MACRO
|
mapsetup: MACRO
|
||||||
|
@ -17,7 +17,7 @@ LoadSGBLayoutCGB:
|
|||||||
ld l, a
|
ld l, a
|
||||||
ld h, 0
|
ld h, 0
|
||||||
add hl, hl
|
add hl, hl
|
||||||
ld de, .Jumptable
|
ld de, CGBLayoutJumptable
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
@ -28,7 +28,8 @@ LoadSGBLayoutCGB:
|
|||||||
.done:
|
.done:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.Jumptable:
|
CGBLayoutJumptable:
|
||||||
|
table_width 2, CGBLayoutJumptable
|
||||||
dw _CGB_BattleGrayscale
|
dw _CGB_BattleGrayscale
|
||||||
dw _CGB_BattleColors
|
dw _CGB_BattleColors
|
||||||
dw _CGB_PokegearPals
|
dw _CGB_PokegearPals
|
||||||
@ -60,6 +61,7 @@ LoadSGBLayoutCGB:
|
|||||||
dw _CGB_TrainerOrMonFrontpicPals
|
dw _CGB_TrainerOrMonFrontpicPals
|
||||||
dw _CGB_MysteryGift
|
dw _CGB_MysteryGift
|
||||||
dw _CGB_Unused1E
|
dw _CGB_Unused1E
|
||||||
|
assert_table_length NUM_SCGB_LAYOUTS
|
||||||
|
|
||||||
_CGB_BattleGrayscale:
|
_CGB_BattleGrayscale:
|
||||||
ld hl, PalPacket_BattleGrayscale + 1
|
ld hl, PalPacket_BattleGrayscale + 1
|
||||||
|
@ -74,13 +74,13 @@ _LoadFontsBattleExtra::
|
|||||||
LoadFrame:
|
LoadFrame:
|
||||||
ld a, [wTextboxFrame]
|
ld a, [wTextboxFrame]
|
||||||
maskbits NUM_FRAMES
|
maskbits NUM_FRAMES
|
||||||
ld bc, 6 * LEN_1BPP_TILE
|
ld bc, TEXTBOX_FRAME_TILES * LEN_1BPP_TILE
|
||||||
ld hl, Frames
|
ld hl, Frames
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld hl, vTiles2 tile "┌" ; $79
|
ld hl, vTiles2 tile "┌" ; $79
|
||||||
lb bc, BANK(Frames), 6 ; "┌" to "┘"
|
lb bc, BANK(Frames), TEXTBOX_FRAME_TILES ; "┌" to "┘"
|
||||||
call Get1bppViaHDMA
|
call Get1bppViaHDMA
|
||||||
ld hl, vTiles2 tile " " ; $7f
|
ld hl, vTiles2 tile " " ; $7f
|
||||||
ld de, TextboxSpaceGFX
|
ld de, TextboxSpaceGFX
|
||||||
|
@ -12,7 +12,7 @@ LoadSGBLayout:
|
|||||||
ld l, a
|
ld l, a
|
||||||
ld h, 0
|
ld h, 0
|
||||||
add hl, hl
|
add hl, hl
|
||||||
ld de, .Jumptable
|
ld de, SGBLayoutJumptable
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
@ -21,7 +21,8 @@ LoadSGBLayout:
|
|||||||
push de
|
push de
|
||||||
jp hl
|
jp hl
|
||||||
|
|
||||||
.Jumptable:
|
SGBLayoutJumptable:
|
||||||
|
table_width 2, SGBLayoutJumptable
|
||||||
dw .SGB_BattleGrayscale
|
dw .SGB_BattleGrayscale
|
||||||
dw .SGB_BattleColors
|
dw .SGB_BattleColors
|
||||||
dw .SGB_PokegearPals
|
dw .SGB_PokegearPals
|
||||||
@ -53,6 +54,7 @@ LoadSGBLayout:
|
|||||||
dw .SGB_TrainerOrMonFrontpicPals
|
dw .SGB_TrainerOrMonFrontpicPals
|
||||||
dw .SGB_MysteryGift
|
dw .SGB_MysteryGift
|
||||||
dw .SGB_Unused1E
|
dw .SGB_Unused1E
|
||||||
|
assert_table_length NUM_SCGB_LAYOUTS
|
||||||
|
|
||||||
.SGB_BattleGrayscale:
|
.SGB_BattleGrayscale:
|
||||||
ld hl, PalPacket_BattleGrayscale
|
ld hl, PalPacket_BattleGrayscale
|
||||||
|
@ -1956,7 +1956,7 @@ PlayRadio:
|
|||||||
.PlayStation:
|
.PlayStation:
|
||||||
ld a, ENTER_MAP_MUSIC
|
ld a, ENTER_MAP_MUSIC
|
||||||
ld [wPokegearRadioMusicPlaying], a
|
ld [wPokegearRadioMusicPlaying], a
|
||||||
ld hl, .StationPointers
|
ld hl, PlayRadioStationPointers
|
||||||
ld d, 0
|
ld d, 0
|
||||||
add hl, de
|
add hl, de
|
||||||
add hl, de
|
add hl, de
|
||||||
@ -1983,9 +1983,10 @@ PlayRadio:
|
|||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.StationPointers:
|
PlayRadioStationPointers:
|
||||||
; entries correspond to MAPRADIO_* constants
|
; entries correspond to MAPRADIO_* constants
|
||||||
dw .OakOrPnP
|
table_width 2, PlayRadioStationPointers
|
||||||
|
dw LoadStation_PokemonChannel
|
||||||
dw LoadStation_OaksPokemonTalk
|
dw LoadStation_OaksPokemonTalk
|
||||||
dw LoadStation_PokedexShow
|
dw LoadStation_PokedexShow
|
||||||
dw LoadStation_PokemonMusic
|
dw LoadStation_PokemonMusic
|
||||||
@ -1994,8 +1995,9 @@ PlayRadio:
|
|||||||
dw LoadStation_PlacesAndPeople
|
dw LoadStation_PlacesAndPeople
|
||||||
dw LoadStation_LetsAllSing
|
dw LoadStation_LetsAllSing
|
||||||
dw LoadStation_RocketRadio
|
dw LoadStation_RocketRadio
|
||||||
|
assert_table_length NUM_MAP_RADIO_STATIONS
|
||||||
|
|
||||||
.OakOrPnP:
|
LoadStation_PokemonChannel:
|
||||||
call IsInJohto
|
call IsInJohto
|
||||||
and a
|
and a
|
||||||
jr nz, .kanto
|
jr nz, .kanto
|
||||||
@ -2005,7 +2007,7 @@ PlayRadio:
|
|||||||
jp z, LoadStation_PokedexShow
|
jp z, LoadStation_PokedexShow
|
||||||
jp LoadStation_OaksPokemonTalk
|
jp LoadStation_OaksPokemonTalk
|
||||||
|
|
||||||
.kanto
|
.kanto:
|
||||||
jp LoadStation_PlacesAndPeople
|
jp LoadStation_PlacesAndPeople
|
||||||
|
|
||||||
PokegearMap:
|
PokegearMap:
|
||||||
|
@ -61,5 +61,4 @@ INCBIN "gfx/frames/map_entry_sign.2bpp"
|
|||||||
FontsExtra2_UpArrowGFX:
|
FontsExtra2_UpArrowGFX:
|
||||||
INCBIN "gfx/font/up_arrow.2bpp"
|
INCBIN "gfx/font/up_arrow.2bpp"
|
||||||
|
|
||||||
Footprints:
|
|
||||||
INCLUDE "gfx/footprints.asm"
|
INCLUDE "gfx/footprints.asm"
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
footprint_top EQUS "0, 2 * LEN_1BPP_TILE"
|
footprint_top EQUS "0, 2 * LEN_1BPP_TILE"
|
||||||
footprint_bottom EQUS "2 * LEN_1BPP_TILE, 2 * LEN_1BPP_TILE"
|
footprint_bottom EQUS "2 * LEN_1BPP_TILE, 2 * LEN_1BPP_TILE"
|
||||||
|
|
||||||
|
Footprints:
|
||||||
; Entries correspond to Pokémon species, two apiece, 8 tops then 8 bottoms
|
; Entries correspond to Pokémon species, two apiece, 8 tops then 8 bottoms
|
||||||
|
|
||||||
table_width LEN_1BPP_TILE * 4, Footprints
|
table_width LEN_1BPP_TILE * 4, Footprints
|
||||||
|
|
||||||
; 001-008 top halves
|
; 001-008 top halves
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
GetBattleVar::
|
GetBattleVar::
|
||||||
; Preserves hl.
|
|
||||||
push hl
|
push hl
|
||||||
call GetBattleVarAddr
|
call GetBattleVarAddr
|
||||||
pop hl
|
pop hl
|
||||||
@ -8,7 +7,6 @@ GetBattleVar::
|
|||||||
GetBattleVarAddr::
|
GetBattleVarAddr::
|
||||||
; Get variable from pair a, depending on whose turn it is.
|
; Get variable from pair a, depending on whose turn it is.
|
||||||
; There are 21 variable pairs.
|
; There are 21 variable pairs.
|
||||||
|
|
||||||
push bc
|
push bc
|
||||||
|
|
||||||
ld hl, BattleVarPairs
|
ld hl, BattleVarPairs
|
||||||
|
Loading…
Reference in New Issue
Block a user