Engine flag bit constants for wPokegearFlags

This commit is contained in:
Rangi 2018-01-22 12:03:18 -05:00
parent 2e0a9ea081
commit 6ecf18aa52
5 changed files with 171 additions and 141 deletions

View File

@ -76,16 +76,16 @@ $(foreach obj, $(crystal_obj), $(eval $(call DEP,$(obj),$(obj:.o=.asm))))
endif endif
pokecrystal11.gbc: $(crystal11_obj) pokecrystal.link
$(RGBLINK) -n pokecrystal11.sym -m pokecrystal11.map -l pokecrystal.link -o $@ $(crystal11_obj)
$(RGBFIX) -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@
tools/sort_symfile.sh pokecrystal11.sym
pokecrystal.gbc: $(crystal_obj) pokecrystal.link pokecrystal.gbc: $(crystal_obj) pokecrystal.link
$(RGBLINK) -n pokecrystal.sym -m pokecrystal.map -l pokecrystal.link -o $@ $(crystal_obj) $(RGBLINK) -n pokecrystal.sym -m pokecrystal.map -l pokecrystal.link -o $@ $(crystal_obj)
$(RGBFIX) -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@ $(RGBFIX) -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@
tools/sort_symfile.sh pokecrystal.sym tools/sort_symfile.sh pokecrystal.sym
pokecrystal11.gbc: $(crystal11_obj) pokecrystal.link
$(RGBLINK) -n pokecrystal11.sym -m pokecrystal11.map -l pokecrystal.link -o $@ $(crystal11_obj)
$(RGBFIX) -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@
tools/sort_symfile.sh pokecrystal11.sym
# For files that the compressor can't match, there will be a .lz file suffixed with the md5 hash of the correct uncompressed file. # For files that the compressor can't match, there will be a .lz file suffixed with the md5 hash of the correct uncompressed file.
# If the hash of the uncompressed file matches, use this .lz instead. # If the hash of the uncompressed file matches, use this .lz instead.

View File

@ -1,3 +1,13 @@
; InputType: ; c2c7
AUTO_INPUT EQU $ff
; wCurrentDexMode: ; c7d4
const_def
const DEXMODE_NEW
const DEXMODE_OLD
const DEXMODE_ABC
const DEXMODE_UNOWN
; MonType: ; cf5f ; MonType: ; cf5f
const_def const_def
const PARTYMON ; 0 const PARTYMON ; 0
@ -6,14 +16,14 @@
const TEMPMON ; 3 const TEMPMON ; 3
const WILDMON ; 4 const WILDMON ; 4
; Options: (bits) ; cfcc ; Options: ; cfcc
const_value set 4 const_value set 4
const NO_TEXT_SCROLL ; 4 const NO_TEXT_SCROLL ; 4
const STEREO ; 5 const STEREO ; 5
const BATTLE_SHIFT ; 6 const BATTLE_SHIFT ; 6
const BATTLE_SCENE ; 7 const BATTLE_SCENE ; 7
; Options: (bits 0-2)
TEXT_DELAY_FAST EQU 1 TEXT_DELAY_FAST EQU 1
TEXT_DELAY_MED EQU 3 TEXT_DELAY_MED EQU 3
TEXT_DELAY_SLOW EQU 5 TEXT_DELAY_SLOW EQU 5
@ -30,22 +40,22 @@ TEXT_DELAY_SLOW EQU 5
const FRAME_8 ; 7 const FRAME_8 ; 7
NUM_FRAMES EQU const_value NUM_FRAMES EQU const_value
; TextBoxFlags: ; TextBoxFlags: ; cfcf
const_def const_def
const FAST_TEXT_DELAY_F ; 0 const FAST_TEXT_DELAY_F ; 0
const NO_TEXT_DELAY_F ; 1 const NO_TEXT_DELAY_F ; 1
; Options2: ; GBPrinter: ; cfd0
const_def
const MENU_ACCOUNT ; 0
; GBPrinter:
GBPRINTER_LIGHTEST EQU $00 GBPRINTER_LIGHTEST EQU $00
GBPRINTER_LIGHTER EQU $20 GBPRINTER_LIGHTER EQU $20
GBPRINTER_NORMAL EQU $40 GBPRINTER_NORMAL EQU $40
GBPRINTER_DARKER EQU $60 GBPRINTER_DARKER EQU $60
GBPRINTER_DARKEST EQU $7f GBPRINTER_DARKEST EQU $7f
; Options2: ; cfd1
const_def
const MENU_ACCOUNT ; 0
; WalkingDirection: ; d043 ; WalkingDirection: ; d043
const_value set -1 const_value set -1
const STANDING ; -1 const STANDING ; -1
@ -62,10 +72,23 @@ RIGHT_MASK EQU 1 << RIGHT
; FacingDirection: ; d044 ; FacingDirection: ; d044
FACE_CURRENT EQU 0 FACE_CURRENT EQU 0
FACE_DOWN EQU 8 FACE_DOWN EQU 8
FACE_UP EQU 4 FACE_UP EQU 4
FACE_LEFT EQU 2 FACE_LEFT EQU 2
FACE_RIGHT EQU 1 FACE_RIGHT EQU 1
; wPokemonWithdrawDepositParameter: ; d10b
PC_WITHDRAW EQU 0
PC_DEPOSIT EQU 1
DAY_CARE_WITHDRAW EQU 2
DAY_CARE_DEPOSIT EQU 3
; wInitListType: ; d263
INIT_ENEMYOT_LIST EQU 1
INIT_BAG_ITEM_LIST EQU 2
INIT_OTHER_ITEM_LIST EQU 3
INIT_PLAYEROT_LIST EQU 4
INIT_MON_LIST EQU 5
; TimeOfDay: ; d269 ; TimeOfDay: ; d269
const_def const_def
@ -91,6 +114,10 @@ SCRIPT_READ EQU 1
SCRIPT_WAIT_MOVEMENT EQU 2 SCRIPT_WAIT_MOVEMENT EQU 2
SCRIPT_WAIT EQU 3 SCRIPT_WAIT EQU 3
; wSpawnAfterChampion: ; d4b5
SPAWN_LANCE EQU 1
SPAWN_RED EQU 2
; CurDay: ; d4cb ; CurDay: ; d4cb
const_def const_def
const SUNDAY ; 0 const SUNDAY ; 0
@ -102,43 +129,10 @@ SCRIPT_WAIT EQU 3
const SATURDAY ; 6 const SATURDAY ; 6
; MapObjects: ; d71e ; MapObjects: ; d71e
PLAYER_OBJECT EQU 0 PLAYER_OBJECT EQU 0
NUM_OBJECTS EQU $10 NUM_OBJECTS EQU $10
; InputType: ; c2c7 ; wJohtoBadges: ; d857
AUTO_INPUT EQU $ff
; WhichRegisteredItem: ; d95b
REGISTERED_POCKET EQU %11000000
REGISTERED_NUMBER EQU %00111111
; PlayerState: ; d95d
PLAYER_NORMAL EQU 0
PLAYER_BIKE EQU 1
PLAYER_SKATE EQU 2
PLAYER_SURF EQU 4
PLAYER_SURF_PIKA EQU 8
; After-Champion Spawn
SPAWN_LANCE EQU 1
SPAWN_RED EQU 2
; wPokemonWithdrawDepositParameter
PC_WITHDRAW EQU 0
PC_DEPOSIT EQU 1
DAY_CARE_WITHDRAW EQU 2
DAY_CARE_DEPOSIT EQU 3
; wCurrentDexMode
const_def
const DEXMODE_NEW
const DEXMODE_OLD
const DEXMODE_ABC
const DEXMODE_UNOWN
; wJohtoBadges:
const_def const_def
const ZEPHYRBADGE const ZEPHYRBADGE
const HIVEBADGE const HIVEBADGE
@ -150,7 +144,7 @@ DAY_CARE_DEPOSIT EQU 3
const RISINGBADGE const RISINGBADGE
NUM_JOHTO_BADGES EQU const_value NUM_JOHTO_BADGES EQU const_value
; wKantoBadges: ; wKantoBadges: ; d858
const_def const_def
const BOULDERBADGE const BOULDERBADGE
const CASCADEBADGE const CASCADEBADGE
@ -163,9 +157,22 @@ NUM_JOHTO_BADGES EQU const_value
NUM_KANTO_BADGES EQU const_value NUM_KANTO_BADGES EQU const_value
NUM_BADGES EQU NUM_JOHTO_BADGES + NUM_KANTO_BADGES NUM_BADGES EQU NUM_JOHTO_BADGES + NUM_KANTO_BADGES
; wInitListType: ; wPokegearFlags: ; d957
INIT_ENEMYOT_LIST EQU 1 const_def
INIT_BAG_ITEM_LIST EQU 2 const POKEGEAR_MAP_CARD_F ; 0
INIT_OTHER_ITEM_LIST EQU 3 const POKEGEAR_RADIO_CARD_F ; 1
INIT_PLAYEROT_LIST EQU 4 const POKEGEAR_PHONE_CARD_F ; 2
INIT_MON_LIST EQU 5 const POKEGEAR_EXPN_CARD_F ; 3
POKEGEAR_OBTAINED_F EQU 7
; WhichRegisteredItem: ; d95b
REGISTERED_POCKET EQU %11000000
REGISTERED_NUMBER EQU %00111111
; PlayerState: ; d95d
PLAYER_NORMAL EQU 0
PLAYER_BIKE EQU 1
PLAYER_SKATE EQU 2
PLAYER_SURF EQU 4
PLAYER_SURF_PIKA EQU 8

View File

@ -7,11 +7,11 @@ EngineFlags: ; 80462
; (all locations are in WRAM bank 1) ; (all locations are in WRAM bank 1)
; pokegear ; pokegear
engine_flag wPokegearFlags, 1 ; radio card ; $0 engine_flag wPokegearFlags, POKEGEAR_RADIO_CARD_F ; $0
engine_flag wPokegearFlags, 0 ; map card engine_flag wPokegearFlags, POKEGEAR_MAP_CARD_F
engine_flag wPokegearFlags, 2 ; phone card engine_flag wPokegearFlags, POKEGEAR_PHONE_CARD_F
engine_flag wPokegearFlags, 3 ; expn card engine_flag wPokegearFlags, POKEGEAR_EXPN_CARD_F
engine_flag wPokegearFlags, 7 ; on/off engine_flag wPokegearFlags, POKEGEAR_OBTAINED_F
; wDayCareMan, 7 ; day-care 1 on ; wDayCareMan, 7 ; day-care 1 on
engine_flag wDayCareMan, 6 ; egg is ready engine_flag wDayCareMan, 6 ; egg is ready
@ -44,23 +44,23 @@ EngineFlags: ; 80462
engine_flag wBikeFlags, 1 ; always on bike (cant surf) engine_flag wBikeFlags, 1 ; always on bike (cant surf)
engine_flag wBikeFlags, 2 ; downhill (cycling road) engine_flag wBikeFlags, 2 ; downhill (cycling road)
engine_flag wJohtoBadges, 0 ; zephyrbadge engine_flag wJohtoBadges, ZEPHYRBADGE
engine_flag wJohtoBadges, 1 ; hivebadge engine_flag wJohtoBadges, HIVEBADGE
engine_flag wJohtoBadges, 2 ; plainbadge engine_flag wJohtoBadges, PLAINBADGE
engine_flag wJohtoBadges, 3 ; fogbadge engine_flag wJohtoBadges, FOGBADGE
engine_flag wJohtoBadges, 4 ; mineralbadge engine_flag wJohtoBadges, MINERALBADGE
engine_flag wJohtoBadges, 5 ; stormbadge ; $20 engine_flag wJohtoBadges, STORMBADGE ; $20
engine_flag wJohtoBadges, 6 ; glacierbadge engine_flag wJohtoBadges, GLACIERBADGE
engine_flag wJohtoBadges, 7 ; risingbadge engine_flag wJohtoBadges, RISINGBADGE
engine_flag wKantoBadges, 0 ; boulderbadge engine_flag wKantoBadges, BOULDERBADGE
engine_flag wKantoBadges, 1 ; cascadebadge engine_flag wKantoBadges, CASCADEBADGE
engine_flag wKantoBadges, 2 ; thunderbadge engine_flag wKantoBadges, THUNDERBADGE
engine_flag wKantoBadges, 3 ; rainbowbadge engine_flag wKantoBadges, RAINBOWBADGE
engine_flag wKantoBadges, 4 ; soulbadge engine_flag wKantoBadges, SOULBADGE
engine_flag wKantoBadges, 5 ; marshbadge ; $28 engine_flag wKantoBadges, MARSHBADGE ; $28
engine_flag wKantoBadges, 6 ; volcanobadge engine_flag wKantoBadges, VOLCANOBADGE
engine_flag wKantoBadges, 7 ; earthbadge engine_flag wKantoBadges, EARTHBADGE
; unown sets ; unown sets
engine_flag wUnlockedUnowns, 0 ; 1 engine_flag wUnlockedUnowns, 0 ; 1

View File

@ -411,13 +411,13 @@ Pokegear_FinishTilemap: ; 90eb0 (24:4eb0)
call ByteFill call ByteFill
ld de, wPokegearFlags ld de, wPokegearFlags
ld a, [de] ld a, [de]
bit 0, a ; ENGINE_MAP_CARD bit POKEGEAR_MAP_CARD_F, a
call nz, .PlaceMapIcon call nz, .PlaceMapIcon
ld a, [de] ld a, [de]
bit 2, a ; ENGINE_PHONE_CARD bit POKEGEAR_PHONE_CARD_F, a
call nz, .PlacePhoneIcon call nz, .PlacePhoneIcon
ld a, [de] ld a, [de]
bit 1, a ; ENGINE_RADIO_CARD bit POKEGEAR_RADIO_CARD_F, a
call nz, .PlaceRadioIcon call nz, .PlaceRadioIcon
hlcoord 0, 0 hlcoord 0, 0
ld a, $46 ld a, $46
@ -496,7 +496,7 @@ PokegearClock_Joypad: ; 90f3e (24:4f3e)
and D_RIGHT and D_RIGHT
ret z ret z
ld a, [wPokegearFlags] ld a, [wPokegearFlags]
bit 0, a ; ENGINE_MAP_CARD bit POKEGEAR_MAP_CARD_F, a
jr z, .no_map_card jr z, .no_map_card
ld c, POKEGEARSTATE_MAPCHECKREGION ld c, POKEGEARSTATE_MAPCHECKREGION
ld b, POKEGEARCARD_MAP ld b, POKEGEARCARD_MAP
@ -504,7 +504,7 @@ PokegearClock_Joypad: ; 90f3e (24:4f3e)
.no_map_card .no_map_card
ld a, [wPokegearFlags] ld a, [wPokegearFlags]
bit 2, a ; ENGINE_PHONE_CARD bit POKEGEAR_PHONE_CARD_F, a
jr z, .no_phone_card jr z, .no_phone_card
ld c, POKEGEARSTATE_PHONEINIT ld c, POKEGEARSTATE_PHONEINIT
ld b, POKEGEARCARD_PHONE ld b, POKEGEARCARD_PHONE
@ -512,7 +512,7 @@ PokegearClock_Joypad: ; 90f3e (24:4f3e)
.no_phone_card .no_phone_card
ld a, [wPokegearFlags] ld a, [wPokegearFlags]
bit 1, a ; ENGINE_RADIO_CARD bit POKEGEAR_RADIO_CARD_F, a
ret z ret z
ld c, POKEGEARSTATE_RADIOINIT ld c, POKEGEARSTATE_RADIOINIT
ld b, POKEGEARCARD_RADIO ld b, POKEGEARCARD_RADIO
@ -613,7 +613,7 @@ PokegearMap_ContinueMap: ; 90ff2 (24:4ff2)
.right .right
ld a, [wPokegearFlags] ld a, [wPokegearFlags]
bit 2, a ; ENGINE_PHONE_CARD bit POKEGEAR_PHONE_CARD_F, a
jr z, .no_phone jr z, .no_phone
ld c, POKEGEARSTATE_PHONEINIT ld c, POKEGEARSTATE_PHONEINIT
ld b, POKEGEARCARD_PHONE ld b, POKEGEARCARD_PHONE
@ -621,7 +621,7 @@ PokegearMap_ContinueMap: ; 90ff2 (24:4ff2)
.no_phone .no_phone
ld a, [wPokegearFlags] ld a, [wPokegearFlags]
bit 1, a ; ENGINE_RADIO_CARD bit POKEGEAR_RADIO_CARD_F, a
ret z ret z
ld c, POKEGEARSTATE_RADIOINIT ld c, POKEGEARSTATE_RADIOINIT
ld b, POKEGEARCARD_RADIO ld b, POKEGEARCARD_RADIO
@ -810,7 +810,7 @@ PokegearRadio_Joypad: ; 91112 (24:5112)
.left .left
ld a, [wPokegearFlags] ld a, [wPokegearFlags]
bit 2, a ; ENGINE_PHONE_CARD bit POKEGEAR_PHONE_CARD_F, a
jr z, .no_phone jr z, .no_phone
ld c, POKEGEARSTATE_PHONEINIT ld c, POKEGEARSTATE_PHONEINIT
ld b, POKEGEARCARD_PHONE ld b, POKEGEARCARD_PHONE
@ -818,7 +818,7 @@ PokegearRadio_Joypad: ; 91112 (24:5112)
.no_phone .no_phone
ld a, [wPokegearFlags] ld a, [wPokegearFlags]
bit 0, a ; ENGINE_MAP_CARD bit POKEGEAR_MAP_CARD_F, a
jr z, .no_map jr z, .no_map
ld c, POKEGEARSTATE_MAPCHECKREGION ld c, POKEGEARSTATE_MAPCHECKREGION
ld b, POKEGEARCARD_MAP ld b, POKEGEARCARD_MAP
@ -869,7 +869,7 @@ PokegearPhone_Joypad: ; 91171 (24:5171)
.left .left
ld a, [wPokegearFlags] ld a, [wPokegearFlags]
bit 0, a ; ENGINE_MAP_CARD bit POKEGEAR_MAP_CARD_F, a
jr z, .no_map jr z, .no_map
ld c, POKEGEARSTATE_MAPCHECKREGION ld c, POKEGEARSTATE_MAPCHECKREGION
ld b, POKEGEARCARD_MAP ld b, POKEGEARCARD_MAP
@ -882,7 +882,7 @@ PokegearPhone_Joypad: ; 91171 (24:5171)
.right .right
ld a, [wPokegearFlags] ld a, [wPokegearFlags]
bit 1, a ; ENGINE_RADIO_CARD bit POKEGEAR_RADIO_CARD_F, a
ret z ret z
ld c, POKEGEARSTATE_RADIOINIT ld c, POKEGEARSTATE_RADIOINIT
ld b, POKEGEARCARD_RADIO ld b, POKEGEARCARD_RADIO
@ -1590,7 +1590,7 @@ RadioChannels:
call .InJohto call .InJohto
jr c, .NoSignal jr c, .NoSignal
ld a, [wPokegearFlags] ld a, [wPokegearFlags]
bit 3, a ; ENGINE_EXPN_CARD bit POKEGEAR_EXPN_CARD_F, a
jr z, .NoSignal jr z, .NoSignal
jp LoadStation_PlacesAndPeople jp LoadStation_PlacesAndPeople
@ -1598,7 +1598,7 @@ RadioChannels:
call .InJohto call .InJohto
jr c, .NoSignal jr c, .NoSignal
ld a, [wPokegearFlags] ld a, [wPokegearFlags]
bit 3, a ; ENGINE_EXPN_CARD bit POKEGEAR_EXPN_CARD_F, a
jr z, .NoSignal jr z, .NoSignal
jp LoadStation_LetsAllSing jp LoadStation_LetsAllSing
@ -1606,7 +1606,7 @@ RadioChannels:
call .InJohto call .InJohto
jr c, .NoSignal jr c, .NoSignal
ld a, [wPokegearFlags] ld a, [wPokegearFlags]
bit 3, a ; ENGINE_EXPN_CARD bit POKEGEAR_EXPN_CARD_F, a
jr z, .NoSignal jr z, .NoSignal
jp LoadStation_PokeFluteRadio jp LoadStation_PokeFluteRadio

View File

@ -1,3 +1,16 @@
; StartMenu.Items indexes
const_def
const STARTMENUITEM_POKEDEX ; 0
const STARTMENUITEM_POKEMON ; 1
const STARTMENUITEM_PACK ; 2
const STARTMENUITEM_STATUS ; 3
const STARTMENUITEM_SAVE ; 4
const STARTMENUITEM_OPTION ; 5
const STARTMENUITEM_EXIT ; 6
const STARTMENUITEM_POKEGEAR ; 7
const STARTMENUITEM_QUIT ; 8
StartMenu:: ; 125cd StartMenu:: ; 125cd
call ClearWindowData call ClearWindowData
@ -171,6 +184,7 @@ StartMenu:: ; 125cd
dw .Items dw .Items
.Items: .Items:
; entries correspond to STARTMENUITEM_* constants
dw StartMenu_Pokedex, .PokedexString, .PokedexDesc dw StartMenu_Pokedex, .PokedexString, .PokedexDesc
dw StartMenu_Pokemon, .PartyString, .PartyDesc dw StartMenu_Pokemon, .PartyString, .PartyDesc
dw StartMenu_Pack, .PackString, .PackDesc dw StartMenu_Pack, .PackString, .PackDesc
@ -181,41 +195,50 @@ StartMenu:: ; 125cd
dw StartMenu_Pokegear, .PokegearString, .PokegearDesc dw StartMenu_Pokegear, .PokegearString, .PokegearDesc
dw StartMenu_Quit, .QuitString, .QuitDesc dw StartMenu_Quit, .QuitString, .QuitDesc
.PokedexString: db "#DEX@" .PokedexString: db "#DEX@"
.PartyString: db "#MON@" .PartyString: db "#MON@"
.PackString: db "PACK@" .PackString: db "PACK@"
.StatusString: db "<PLAYER>@" .StatusString: db "<PLAYER>@"
.SaveString: db "SAVE@" .SaveString: db "SAVE@"
.OptionString: db "OPTION@" .OptionString: db "OPTION@"
.ExitString: db "EXIT@" .ExitString: db "EXIT@"
.PokegearString: db "<POKE>GEAR@" .PokegearString: db "<POKE>GEAR@"
.QuitString: db "QUIT@" .QuitString: db "QUIT@"
.PokedexDesc: db "#MON" .PokedexDesc:
db "#MON"
next "database@" next "database@"
.PartyDesc: db "Party <PKMN>" .PartyDesc:
db "Party <PKMN>"
next "status@" next "status@"
.PackDesc: db "Contains" .PackDesc:
db "Contains"
next "items@" next "items@"
.PokegearDesc: db "Trainer's" .PokegearDesc:
db "Trainer's"
next "key device@" next "key device@"
.StatusDesc: db "Your own" .StatusDesc:
db "Your own"
next "status@" next "status@"
.SaveDesc: db "Save your" .SaveDesc:
db "Save your"
next "progress@" next "progress@"
.OptionDesc: db "Change" .OptionDesc:
db "Change"
next "settings@" next "settings@"
.ExitDesc: db "Close this" .ExitDesc:
db "Close this"
next "menu@" next "menu@"
.QuitDesc: db "Quit and" .QuitDesc:
db "Quit and"
next "be judged.@" next "be judged.@"
@ -285,14 +308,14 @@ endr
ld hl, wStatusFlags ld hl, wStatusFlags
bit 0, [hl] bit 0, [hl]
jr z, .no_pokedex jr z, .no_pokedex
ld a, 0 ; pokedex ld a, STARTMENUITEM_POKEDEX
call .AppendMenuList call .AppendMenuList
.no_pokedex .no_pokedex
ld a, [PartyCount] ld a, [PartyCount]
and a and a
jr z, .no_pokemon jr z, .no_pokemon
ld a, 1 ; pokemon ld a, STARTMENUITEM_POKEMON
call .AppendMenuList call .AppendMenuList
.no_pokemon .no_pokemon
@ -302,14 +325,14 @@ endr
ld hl, wStatusFlags2 ld hl, wStatusFlags2
bit 2, [hl] ; bug catching contest bit 2, [hl] ; bug catching contest
jr nz, .no_pack jr nz, .no_pack
ld a, 2 ; pack ld a, STARTMENUITEM_PACK
call .AppendMenuList call .AppendMenuList
.no_pack .no_pack
ld hl, wPokegearFlags ld hl, wPokegearFlags
bit 7, [hl] bit POKEGEAR_OBTAINED_F, [hl]
jr z, .no_pokegear jr z, .no_pokegear
ld a, 7 ; pokegear ld a, STARTMENUITEM_POKEGEAR
call .AppendMenuList call .AppendMenuList
.no_pokegear .no_pokegear
@ -321,16 +344,16 @@ endr
jr nz, .no_save jr nz, .no_save
ld hl, wStatusFlags2 ld hl, wStatusFlags2
bit 2, [hl] ; bug catching contest bit 2, [hl] ; bug catching contest
ld a, 8 ; quit ld a, STARTMENUITEM_QUIT
jr nz, .write jr nz, .write
ld a, 4 ; save ld a, STARTMENUITEM_SAVE
.write .write
call .AppendMenuList call .AppendMenuList
.no_save .no_save
ld a, 5 ; option ld a, STARTMENUITEM_OPTION
call .AppendMenuList call .AppendMenuList
ld a, 6 ; exit ld a, STARTMENUITEM_EXIT
call .AppendMenuList call .AppendMenuList
ld a, c ld a, c
ld [MenuItemsList], a ld [MenuItemsList], a
@ -383,7 +406,7 @@ endr
.IsMenuAccountOn: ; 128cb .IsMenuAccountOn: ; 128cb
ld a, [Options2] ld a, [Options2]
and 1 and 1 << MENU_ACCOUNT
ret ret
; 128d1 ; 128d1
@ -706,26 +729,26 @@ PokemonActionSubmenu: ; 12a88
ret ret
.Actions: .Actions:
dbw MONMENU_CUT, MonMenu_Cut ; Cut dbw MONMENU_CUT, MonMenu_Cut
dbw MONMENU_FLY, MonMenu_Fly ; Fly dbw MONMENU_FLY, MonMenu_Fly
dbw MONMENU_SURF, MonMenu_Surf ; Surf dbw MONMENU_SURF, MonMenu_Surf
dbw MONMENU_STRENGTH, MonMenu_Strength ; Strength dbw MONMENU_STRENGTH, MonMenu_Strength
dbw MONMENU_FLASH, MonMenu_Flash ; Flash dbw MONMENU_FLASH, MonMenu_Flash
dbw MONMENU_WHIRLPOOL, MonMenu_Whirlpool ; Whirlpool dbw MONMENU_WHIRLPOOL, MonMenu_Whirlpool
dbw MONMENU_DIG, MonMenu_Dig ; Dig dbw MONMENU_DIG, MonMenu_Dig
dbw MONMENU_TELEPORT, MonMenu_Teleport ; Teleport dbw MONMENU_TELEPORT, MonMenu_Teleport
dbw MONMENU_SOFTBOILED, MonMenu_Softboiled_MilkDrink ; Softboiled dbw MONMENU_SOFTBOILED, MonMenu_Softboiled_MilkDrink
dbw MONMENU_MILKDRINK, MonMenu_Softboiled_MilkDrink ; MilkDrink dbw MONMENU_MILKDRINK, MonMenu_Softboiled_MilkDrink
dbw MONMENU_HEADBUTT, MonMenu_Headbutt ; Headbutt dbw MONMENU_HEADBUTT, MonMenu_Headbutt
dbw MONMENU_WATERFALL, MonMenu_Waterfall ; Waterfall dbw MONMENU_WATERFALL, MonMenu_Waterfall
dbw MONMENU_ROCKSMASH, MonMenu_RockSmash ; RockSmash dbw MONMENU_ROCKSMASH, MonMenu_RockSmash
dbw MONMENU_SWEETSCENT, MonMenu_SweetScent ; SweetScent dbw MONMENU_SWEETSCENT, MonMenu_SweetScent
dbw MONMENU_STATS, OpenPartyStats dbw MONMENU_STATS, OpenPartyStats
dbw MONMENU_SWITCH, SwitchPartyMons dbw MONMENU_SWITCH, SwitchPartyMons
dbw MONMENU_ITEM, GiveTakePartyMonItem dbw MONMENU_ITEM, GiveTakePartyMonItem
dbw MONMENU_CANCEL, CancelPokemonAction dbw MONMENU_CANCEL, CancelPokemonAction
dbw MONMENU_MOVE, ManagePokemonMoves ; move dbw MONMENU_MOVE, ManagePokemonMoves
dbw MONMENU_MAIL, MonMailAction ; mail dbw MONMENU_MAIL, MonMailAction
; 12aec ; 12aec
@ -749,7 +772,7 @@ SwitchPartyMons: ; 12aec
farcall PrintPartyMenuText farcall PrintPartyMenuText
hlcoord 0, 1 hlcoord 0, 1
ld bc, 20 * 2 ld bc, SCREEN_WIDTH * 2
ld a, [wSwitchMon] ld a, [wSwitchMon]
dec a dec a
call AddNTimes call AddNTimes
@ -1038,7 +1061,7 @@ GetPartyItemLocation: ; 12cd7
ReceiveItemFromPokemon: ; 12cdf ReceiveItemFromPokemon: ; 12cdf
ld a, $1 ld a, 1
ld [wItemQuantityChangeBuffer], a ld [wItemQuantityChangeBuffer], a
ld hl, NumItems ld hl, NumItems
jp ReceiveItem jp ReceiveItem
@ -1046,7 +1069,7 @@ ReceiveItemFromPokemon: ; 12cdf
GiveItemToPokemon: ; 12cea (4:6cea) GiveItemToPokemon: ; 12cea (4:6cea)
ld a, $1 ld a, 1
ld [wItemQuantityChangeBuffer], a ld [wItemQuantityChangeBuffer], a
ld hl, NumItems ld hl, NumItems
jp TossItem jp TossItem