menu stuff

This commit is contained in:
YamaArashi 2015-07-15 20:04:58 -07:00
parent ac78dda7d8
commit bd7d981593
26 changed files with 506 additions and 420 deletions

View file

@ -102,10 +102,10 @@ InitList: ; 39bd5 (e:5bd5)
ld [wItemPrices + 1], a
ret
; get species of mon e in list [wcc49] for LoadMonData
; get species of mon e in list [wMonDataLocation] for LoadMonData
GetMonSpecies: ; 39c37 (e:5c37)
ld hl, wPartySpecies
ld a, [wcc49]
ld a, [wMonDataLocation]
and a
jr z, .getSpecies
dec a

View file

@ -1809,7 +1809,7 @@ SendOutMon: ; 3cc91 (f:4c91)
predef LoadMonBackPic
xor a
ld [$ffe1], a
ld hl, wcc2d
ld hl, wBattleAndStartSavedMenuItem
ld [hli], a
ld [hl], a
ld [wBoostExpByExpAll], a
@ -2123,7 +2123,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
.oldManName
db "OLD MAN@"
.handleBattleMenuInput
ld a, [wcc2d]
ld a, [wBattleAndStartSavedMenuItem]
ld [wCurrentMenuItem], a
ld [wLastMenuItem], a
sub 2 ; check if the cursor is in the left column
@ -2206,7 +2206,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
ld a, [W_BATTLETYPE]
cp $2 ; is it a Safari battle?
ld a, [wCurrentMenuItem]
ld [wcc2d], a
ld [wBattleAndStartSavedMenuItem], a
jr z, .handleMenuSelection
; not Safari battle
; swap the IDs of the item menu and party menu (this is probably because they swapped the positions
@ -2299,11 +2299,11 @@ DisplayBagMenu:
ld [wPrintItemPrices], a
ld a, ITEMLISTMENU
ld [wListMenuID], a
ld a, [wcc2c]
ld a, [wBagSavedMenuItem]
ld [wCurrentMenuItem], a
call DisplayListMenuID
ld a, [wCurrentMenuItem]
ld [wcc2c], a
ld [wBagSavedMenuItem], a
ld a, $0
ld [wMenuWatchMovingOutOfBounds], a
ld [wMenuItemToSwap], a
@ -2435,8 +2435,8 @@ PartyMenuOrRockOrRun:
and a ; was Switch selected?
jr z, .switchMon ; if so, jump
; Stats was selected
xor a
ld [wcc49], a
xor a ; PLAYER_PARTY_DATA
ld [wMonDataLocation], a
ld hl, wPartyMon1
call ClearSprites
; display the two status screens
@ -2935,8 +2935,8 @@ PrintMenuItem: ; 3d4b6 (f:54b6)
; isn't actually selected (just pointed to by the cursor)
ld a, [wPlayerMonNumber]
ld [wWhichPokemon], a
ld a, $4
ld [wcc49], a
ld a, BATTLE_MON_DATA
ld [wMonDataLocation], a
callab GetMaxPP
ld hl, wCurrentMenuItem
ld c, [hl]
@ -8243,14 +8243,14 @@ ChargeEffect: ; 3f88c (f:788c)
ld a, b
call PlayBattleAnimation
ld a, [de]
ld [wWhichTrade], a
ld [wChargeMoveNum], a
ld hl, ChargeMoveEffectText
jp PrintText
ChargeMoveEffectText: ; 3f8c8 (f:78c8)
TX_FAR _ChargeMoveEffectText
TX_ASM
ld a, [wWhichTrade]
ld a, [wChargeMoveNum]
cp RAZOR_WIND
ld hl, MadeWhirlwindText
jr z, .asm_3f8f8

View file

@ -54,7 +54,7 @@ EndOfBattle: ; 137aa (4:77aa)
ld [wd11f], a
ld [wNumRunAttempts], a
ld [wEscapedFromBattle], a
ld hl, wcc2b
ld hl, wPartyAndBillsPCSavedMenuItem
ld [hli], a
ld [hli], a
ld [hli], a

View file

@ -148,8 +148,8 @@ GainExperience: ; 5524f (15:524f)
call GetPartyMonName
ld hl, GainedText
call PrintText
xor a ; party mon data
ld [wcc49], a
xor a ; PLAYER_PARTY_DATA
ld [wMonDataLocation], a
call LoadMonData
pop hl
ld bc, wPartyMon1Level - wPartyMon1Exp
@ -242,15 +242,15 @@ GainExperience: ; 5524f (15:524f)
.printGrewLevelText
ld hl, GrewLevelText
call PrintText
xor a ; party mon data
ld [wcc49], a
xor a ; PLAYER_PARTY_DATA
ld [wMonDataLocation], a
call LoadMonData
ld d, $1
callab PrintStatsBox
call WaitForTextScrollButtonPress
call LoadScreenTilesFromBuffer1
xor a
ld [wcc49], a
xor a ; PLAYER_PARTY_DATA
ld [wMonDataLocation], a
ld a, [wd0b5]
ld [wd11e], a
predef LearnMoveFromLevelUp

View file

@ -4,7 +4,7 @@ InitBattleVariables: ; 525af (14:65af)
xor a
ld [wActionResultOrTookBattleTurn], a
ld [wBattleResult], a
ld hl, wcc2b
ld hl, wPartyAndBillsPCSavedMenuItem
ld [hli], a
ld [hli], a
ld [hli], a

View file

@ -55,8 +55,8 @@ ReadTrainer: ; 39c53 (e:5c53)
and a ; have we reached the end of the trainer data?
jr z,.FinishUp
ld [wcf91],a ; write species somewhere (XXX why?)
ld a,1
ld [wcc49],a
ld a,ENEMY_PARTY_DATA
ld [wMonDataLocation],a
push hl
call AddPartyMon
pop hl
@ -72,8 +72,8 @@ ReadTrainer: ; 39c53 (e:5c53)
ld [W_CURENEMYLVL],a
ld a,[hli]
ld [wcf91],a
ld a,1
ld [wcc49],a
ld a,ENEMY_PARTY_DATA
ld [wMonDataLocation],a
push hl
call AddPartyMon
pop hl