mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Harmonize engine/{movie, pokemon} with pokegold (renames GetSRAMBank to OpenSRAM)
To do: engine/{menus, overworld}
This commit is contained in:
parent
be93ab33a7
commit
cc460a17b0
@ -521,7 +521,7 @@ Then create two new routines, `InvalidateSave` and `InvalidateBackupSave`:
|
|||||||
```diff
|
```diff
|
||||||
ValidateSave:
|
ValidateSave:
|
||||||
ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
|
ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, SAVE_CHECK_VALUE_1
|
ld a, SAVE_CHECK_VALUE_1
|
||||||
ld [sCheckValue1], a
|
ld [sCheckValue1], a
|
||||||
ld a, SAVE_CHECK_VALUE_2
|
ld a, SAVE_CHECK_VALUE_2
|
||||||
@ -530,7 +530,7 @@ Then create two new routines, `InvalidateSave` and `InvalidateBackupSave`:
|
|||||||
|
|
||||||
+InvalidateSave:
|
+InvalidateSave:
|
||||||
+ ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
|
+ ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
|
||||||
+ call GetSRAMBank
|
+ call OpenSRAM
|
||||||
+ xor a
|
+ xor a
|
||||||
+ ld [sCheckValue1], a
|
+ ld [sCheckValue1], a
|
||||||
+ ld [sCheckValue2], a
|
+ ld [sCheckValue2], a
|
||||||
@ -540,7 +540,7 @@ Then create two new routines, `InvalidateSave` and `InvalidateBackupSave`:
|
|||||||
```diff
|
```diff
|
||||||
ValidateBackupSave:
|
ValidateBackupSave:
|
||||||
ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
|
ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, SAVE_CHECK_VALUE_1
|
ld a, SAVE_CHECK_VALUE_1
|
||||||
ld [sBackupCheckValue1], a
|
ld [sBackupCheckValue1], a
|
||||||
ld a, SAVE_CHECK_VALUE_2
|
ld a, SAVE_CHECK_VALUE_2
|
||||||
@ -549,7 +549,7 @@ Then create two new routines, `InvalidateSave` and `InvalidateBackupSave`:
|
|||||||
|
|
||||||
+InvalidateBackupSave:
|
+InvalidateBackupSave:
|
||||||
+ ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
|
+ ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
|
||||||
+ call GetSRAMBank
|
+ call OpenSRAM
|
||||||
+ xor a
|
+ xor a
|
||||||
+ ld [sBackupCheckValue1], a
|
+ ld [sBackupCheckValue1], a
|
||||||
+ ld [sBackupCheckValue2], a
|
+ ld [sBackupCheckValue2], a
|
||||||
@ -1924,7 +1924,7 @@ This bug can affect Mew or Pokémon other than Ditto that used Transform via Mir
|
|||||||
jr nz, .room_in_party
|
jr nz, .room_in_party
|
||||||
|
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
cp MONS_PER_BOX
|
cp MONS_PER_BOX
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
@ -20,7 +20,7 @@ CheckBattleScene:
|
|||||||
jr nz, .from_wram
|
jr nz, .from_wram
|
||||||
|
|
||||||
ld a, BANK(s4_a60c) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
ld a, BANK(s4_a60c) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s4_a60c]
|
ld a, [s4_a60c]
|
||||||
ld c, a
|
ld c, a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
@ -231,7 +231,7 @@ BattleTurn:
|
|||||||
Stubbed_Function3c1bf:
|
Stubbed_Function3c1bf:
|
||||||
ret
|
ret
|
||||||
ld a, BANK(s5_a89b) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
ld a, BANK(s5_a89b) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, s5_a89b ; address of MBC30 bank
|
ld hl, s5_a89b ; address of MBC30 bank
|
||||||
inc [hl]
|
inc [hl]
|
||||||
jr nz, .finish
|
jr nz, .finish
|
||||||
@ -8398,7 +8398,7 @@ DisplayLinkBattleResult:
|
|||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
||||||
ld a, BANK(sLinkBattleStats)
|
ld a, BANK(sLinkBattleStats)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
call AddLastLinkBattleToLinkRecord
|
call AddLastLinkBattleToLinkRecord
|
||||||
call ReadAndPrintLinkBattleRecord
|
call ReadAndPrintLinkBattleRecord
|
||||||
@ -8446,7 +8446,7 @@ NUM_LINK_BATTLE_RECORDS EQUS "((sLinkBattleStatsEnd - sLinkBattleRecord) / LINK_
|
|||||||
|
|
||||||
_DisplayLinkRecord:
|
_DisplayLinkRecord:
|
||||||
ld a, BANK(sLinkBattleStats)
|
ld a, BANK(sLinkBattleStats)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
call ReadAndPrintLinkBattleRecord
|
call ReadAndPrintLinkBattleRecord
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ ReadTrainerParty:
|
|||||||
|
|
||||||
.cal2
|
.cal2
|
||||||
ld a, BANK(sMysteryGiftTrainer)
|
ld a, BANK(sMysteryGiftTrainer)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, sMysteryGiftTrainer
|
ld de, sMysteryGiftTrainer
|
||||||
call TrainerType2
|
call TrainerType2
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -338,14 +338,14 @@ GetTrainerName::
|
|||||||
jr nz, .not_cal2
|
jr nz, .not_cal2
|
||||||
|
|
||||||
ld a, BANK(sMysteryGiftTrainerHouseFlag)
|
ld a, BANK(sMysteryGiftTrainerHouseFlag)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sMysteryGiftTrainerHouseFlag]
|
ld a, [sMysteryGiftTrainerHouseFlag]
|
||||||
and a
|
and a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
jr z, .not_cal2
|
jr z, .not_cal2
|
||||||
|
|
||||||
ld a, BANK(sMysteryGiftPartnerName)
|
ld a, BANK(sMysteryGiftPartnerName)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sMysteryGiftPartnerName
|
ld hl, sMysteryGiftPartnerName
|
||||||
call CopyTrainerName
|
call CopyTrainerName
|
||||||
jp CloseSRAM
|
jp CloseSRAM
|
||||||
|
@ -950,7 +950,7 @@ BattleAnimCmd_RaiseSub:
|
|||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
|
|
||||||
xor a ; BANK(sScratch)
|
xor a ; BANK(sScratch)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
GetSubstitutePic: ; used only for BANK(GetSubstitutePic)
|
GetSubstitutePic: ; used only for BANK(GetSubstitutePic)
|
||||||
ld hl, sScratch
|
ld hl, sScratch
|
||||||
@ -1025,7 +1025,7 @@ BattleAnimCmd_MinimizeOpp:
|
|||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
|
|
||||||
xor a ; BANK(sScratch)
|
xor a ; BANK(sScratch)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call GetMinimizePic
|
call GetMinimizePic
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1081,7 +1081,7 @@ BattleAnimCmd_Minimize:
|
|||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
|
|
||||||
xor a ; BANK(sScratch)
|
xor a ; BANK(sScratch)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call GetMinimizePic
|
call GetMinimizePic
|
||||||
ld hl, vTiles0 tile $00
|
ld hl, vTiles0 tile $00
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
|
@ -18,7 +18,7 @@ Function1700c4:
|
|||||||
call Function17042c
|
call Function17042c
|
||||||
|
|
||||||
ld a, BANK(s5_be45) ; aka BANK(s5_be46), BANK(s5_aa41), and BANK(s5_aa5d)
|
ld a, BANK(s5_be45) ; aka BANK(s5_be46), BANK(s5_aa41), and BANK(s5_aa5d)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [s5_be45], a
|
ld [s5_be45], a
|
||||||
xor a
|
xor a
|
||||||
@ -58,7 +58,7 @@ Function170114:
|
|||||||
|
|
||||||
.Function170121:
|
.Function170121:
|
||||||
ld a, BANK(s5_a948)
|
ld a, BANK(s5_a948)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, s5_a948
|
ld hl, s5_a948
|
||||||
ld de, wc608
|
ld de, wc608
|
||||||
ld bc, 246
|
ld bc, 246
|
||||||
@ -70,7 +70,7 @@ Function170114:
|
|||||||
Function170139:
|
Function170139:
|
||||||
; Convert the 4-digit decimal number at 5:aa41 into binary
|
; Convert the 4-digit decimal number at 5:aa41 into binary
|
||||||
ld a, BANK(s5_aa41)
|
ld a, BANK(s5_aa41)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, s5_aa41
|
ld de, s5_aa41
|
||||||
ld h, 0
|
ld h, 0
|
||||||
ld l, h
|
ld l, h
|
||||||
@ -147,14 +147,14 @@ Function170139:
|
|||||||
jr nz, .CopyLoop
|
jr nz, .CopyLoop
|
||||||
|
|
||||||
ld a, BANK(s4_a013)
|
ld a, BANK(s4_a013)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, s4_a013
|
ld hl, s4_a013
|
||||||
ld bc, 36
|
ld bc, 36
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
|
||||||
ld a, BANK(s5_a894) ; aka BANK(s5_a948)
|
ld a, BANK(s5_a894) ; aka BANK(s5_a948)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, s5_a894
|
ld hl, s5_a894
|
||||||
ld bc, NAME_LENGTH_JAPANESE
|
ld bc, NAME_LENGTH_JAPANESE
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -246,7 +246,7 @@ RunBattleTowerTrainer:
|
|||||||
and a ; WIN?
|
and a ; WIN?
|
||||||
jr nz, .lost
|
jr nz, .lost
|
||||||
ld a, BANK(sNrOfBeatenBattleTowerTrainers)
|
ld a, BANK(sNrOfBeatenBattleTowerTrainers)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sNrOfBeatenBattleTowerTrainers]
|
ld a, [sNrOfBeatenBattleTowerTrainers]
|
||||||
ld [wNrOfBeatenBattleTowerTrainers], a
|
ld [wNrOfBeatenBattleTowerTrainers], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -410,7 +410,7 @@ endr
|
|||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
call GetBaseData
|
call GetBaseData
|
||||||
ld a, BANK(s5_b2fb)
|
ld a, BANK(s5_b2fb)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_b2fb] ; s5_b2fb ; max level?
|
ld a, [s5_b2fb] ; s5_b2fb ; max level?
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -572,7 +572,7 @@ CopyBTTrainer_FromBT_OT_TowBT_OTTemp:
|
|||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
|
|
||||||
ld a, BANK(sBattleTowerChallengeState)
|
ld a, BANK(sBattleTowerChallengeState)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, BATTLETOWER_CHALLENGE_IN_PROGESS
|
ld a, BATTLETOWER_CHALLENGE_IN_PROGESS
|
||||||
ld [sBattleTowerChallengeState], a
|
ld [sBattleTowerChallengeState], a
|
||||||
ld hl, sNrOfBeatenBattleTowerTrainers
|
ld hl, sNrOfBeatenBattleTowerTrainers
|
||||||
@ -643,7 +643,7 @@ Function1704e1:
|
|||||||
|
|
||||||
.Jumptable_0:
|
.Jumptable_0:
|
||||||
ld a, BANK(s5_a89c)
|
ld a, BANK(s5_a89c)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
ld hl, s5_a89c
|
ld hl, s5_a89c
|
||||||
ld de, wStringBuffer3
|
ld de, wStringBuffer3
|
||||||
@ -917,7 +917,7 @@ BattleTowerAction:
|
|||||||
; Reset the save memory for BattleTower-Trainers (Counter and all 7 TrainerBytes)
|
; Reset the save memory for BattleTower-Trainers (Counter and all 7 TrainerBytes)
|
||||||
ResetBattleTowerTrainersSRAM:
|
ResetBattleTowerTrainersSRAM:
|
||||||
ld a, BANK(sBTTrainers)
|
ld a, BANK(sBTTrainers)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld hl, sBTTrainers
|
ld hl, sBTTrainers
|
||||||
@ -933,7 +933,7 @@ ResetBattleTowerTrainersSRAM:
|
|||||||
|
|
||||||
BattleTower_GiveReward:
|
BattleTower_GiveReward:
|
||||||
ld a, BANK(sBattleTowerReward)
|
ld a, BANK(sBattleTowerReward)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
ld a, [sBattleTowerReward]
|
ld a, [sBattleTowerReward]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -962,7 +962,7 @@ BattleTower_GiveReward:
|
|||||||
|
|
||||||
Function17071b:
|
Function17071b:
|
||||||
ld a, BANK(sBattleTowerChallengeState)
|
ld a, BANK(sBattleTowerChallengeState)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, BATTLETOWER_WON_CHALLENGE
|
ld a, BATTLETOWER_WON_CHALLENGE
|
||||||
ld [sBattleTowerChallengeState], a
|
ld [sBattleTowerChallengeState], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -970,7 +970,7 @@ Function17071b:
|
|||||||
|
|
||||||
Function170729:
|
Function170729:
|
||||||
ld a, BANK(sBattleTowerChallengeState)
|
ld a, BANK(sBattleTowerChallengeState)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, BATTLETOWER_RECEIVED_REWARD
|
ld a, BATTLETOWER_RECEIVED_REWARD
|
||||||
ld [sBattleTowerChallengeState], a
|
ld [sBattleTowerChallengeState], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -995,7 +995,7 @@ BattleTower_RandomlyChooseReward:
|
|||||||
jr z, .loop
|
jr z, .loop
|
||||||
push af
|
push af
|
||||||
ld a, BANK(sBattleTowerReward)
|
ld a, BANK(sBattleTowerReward)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
pop af
|
pop af
|
||||||
ld [sBattleTowerReward], a
|
ld [sBattleTowerReward], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1008,7 +1008,7 @@ BattleTowerAction_CheckExplanationRead:
|
|||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld a, BANK(sBattleTowerSaveFileFlags)
|
ld a, BANK(sBattleTowerSaveFileFlags)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBattleTowerSaveFileFlags]
|
ld a, [sBattleTowerSaveFileFlags]
|
||||||
and 2
|
and 2
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
@ -1018,7 +1018,7 @@ BattleTowerAction_CheckExplanationRead:
|
|||||||
BattleTowerAction_GetChallengeState:
|
BattleTowerAction_GetChallengeState:
|
||||||
ld hl, sBattleTowerChallengeState
|
ld hl, sBattleTowerChallengeState
|
||||||
ld a, BANK(sBattleTowerChallengeState)
|
ld a, BANK(sBattleTowerChallengeState)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1026,7 +1026,7 @@ BattleTowerAction_GetChallengeState:
|
|||||||
|
|
||||||
BattleTowerAction_SetExplanationRead:
|
BattleTowerAction_SetExplanationRead:
|
||||||
ld a, BANK(sBattleTowerSaveFileFlags)
|
ld a, BANK(sBattleTowerSaveFileFlags)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBattleTowerSaveFileFlags]
|
ld a, [sBattleTowerSaveFileFlags]
|
||||||
or 2
|
or 2
|
||||||
ld [sBattleTowerSaveFileFlags], a
|
ld [sBattleTowerSaveFileFlags], a
|
||||||
@ -1041,7 +1041,7 @@ BattleTowerAction_SetByteToCancelChallenge:
|
|||||||
ld c, BATTLETOWER_NO_CHALLENGE
|
ld c, BATTLETOWER_NO_CHALLENGE
|
||||||
asm_17079f:
|
asm_17079f:
|
||||||
ld a, BANK(sBattleTowerChallengeState)
|
ld a, BANK(sBattleTowerChallengeState)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [sBattleTowerChallengeState], a
|
ld [sBattleTowerChallengeState], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1049,7 +1049,7 @@ asm_17079f:
|
|||||||
|
|
||||||
Function1707ac:
|
Function1707ac:
|
||||||
ld a, BANK(s5_aa8c) ; aka BANK(s5_be46)
|
ld a, BANK(s5_aa8c) ; aka BANK(s5_be46)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_aa8c]
|
ld a, [s5_aa8c]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [s5_be46]
|
ld a, [s5_be46]
|
||||||
@ -1064,7 +1064,7 @@ Function1707ac:
|
|||||||
call UpdateTime
|
call UpdateTime
|
||||||
pop bc
|
pop bc
|
||||||
ld a, BANK(s5_aa8c)
|
ld a, BANK(s5_aa8c)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_aa8b]
|
ld a, [s5_aa8b]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -1090,7 +1090,7 @@ Function1707ac:
|
|||||||
|
|
||||||
Function1707f4:
|
Function1707f4:
|
||||||
ld a, BANK(s5_be46) ; aka BANK(s5_aa8b) and BANK(s5_aa8c)
|
ld a, BANK(s5_be46) ; aka BANK(s5_aa8b) and BANK(s5_aa8c)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [s5_be46], a
|
ld [s5_be46], a
|
||||||
ld [s5_aa8b], a
|
ld [s5_aa8b], a
|
||||||
@ -1101,7 +1101,7 @@ Function1707f4:
|
|||||||
Function170807:
|
Function170807:
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa)
|
ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wCurDay]
|
ld a, [wCurDay]
|
||||||
ld [s5_b2f9], a
|
ld [s5_b2f9], a
|
||||||
xor a
|
xor a
|
||||||
@ -1113,7 +1113,7 @@ Function17081d:
|
|||||||
xor a
|
xor a
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa)
|
ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_b2f9]
|
ld a, [s5_b2f9]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [s5_b2fa]
|
ld a, [s5_b2fa]
|
||||||
@ -1145,7 +1145,7 @@ Function17081d:
|
|||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa)
|
ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [s5_b2f9], a
|
ld [s5_b2f9], a
|
||||||
ld [s5_b2fa], a
|
ld [s5_b2fa], a
|
||||||
@ -1154,7 +1154,7 @@ Function17081d:
|
|||||||
|
|
||||||
SaveBattleTowerLevelGroup:
|
SaveBattleTowerLevelGroup:
|
||||||
ld a, BANK(sBTChoiceOfLevelGroup)
|
ld a, BANK(sBTChoiceOfLevelGroup)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ldh a, [rSVBK]
|
ldh a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(wBTChoiceOfLvlGroup)
|
ld a, BANK(wBTChoiceOfLvlGroup)
|
||||||
@ -1168,7 +1168,7 @@ SaveBattleTowerLevelGroup:
|
|||||||
|
|
||||||
LoadBattleTowerLevelGroup: ; Load level group choice
|
LoadBattleTowerLevelGroup: ; Load level group choice
|
||||||
ld a, BANK(sBTChoiceOfLevelGroup)
|
ld a, BANK(sBTChoiceOfLevelGroup)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ldh a, [rSVBK]
|
ldh a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(wBTChoiceOfLvlGroup)
|
ld a, BANK(wBTChoiceOfLvlGroup)
|
||||||
@ -1204,7 +1204,7 @@ Function1708b1: ; BattleTowerAction $0a
|
|||||||
|
|
||||||
CheckMobileEventIndex: ; BattleTowerAction $0b something to do with GS Ball
|
CheckMobileEventIndex: ; BattleTowerAction $0b something to do with GS Ball
|
||||||
ld a, BANK(sMobileEventIndex)
|
ld a, BANK(sMobileEventIndex)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sMobileEventIndex]
|
ld a, [sMobileEventIndex]
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1213,7 +1213,7 @@ CheckMobileEventIndex: ; BattleTowerAction $0b something to do with GS Ball
|
|||||||
Function1708c8: ; BattleTowerAction $0c
|
Function1708c8: ; BattleTowerAction $0c
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
ld a, BANK(s5_aa8b) ; aka BANK(s5_aa8c), BANK(s5_aa5d), BANK(s5_aa48), and BANK(s5_aa47)
|
ld a, BANK(s5_aa8b) ; aka BANK(s5_aa8c), BANK(s5_aa5d), BANK(s5_aa48), and BANK(s5_aa47)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wCurDay]
|
ld a, [wCurDay]
|
||||||
ld [s5_aa8b], a
|
ld [s5_aa8b], a
|
||||||
xor a
|
xor a
|
||||||
@ -1234,7 +1234,7 @@ Function1708f0: ; BattleTowerAction $0d
|
|||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
ld a, BANK(s5_aa48) ; aka BANK(s5_aa47)
|
ld a, BANK(s5_aa48) ; aka BANK(s5_aa47)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_aa48]
|
ld a, [s5_aa48]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [s5_aa47]
|
ld a, [s5_aa47]
|
||||||
@ -1246,7 +1246,7 @@ Function1708f0: ; BattleTowerAction $0d
|
|||||||
cp [hl]
|
cp [hl]
|
||||||
jr nz, Function170923
|
jr nz, Function170923
|
||||||
ld a, BANK(s5_aa5d)
|
ld a, BANK(s5_aa5d)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_aa5d]
|
ld a, [s5_aa5d]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
cp 5
|
cp 5
|
||||||
@ -1257,7 +1257,7 @@ Function1708f0: ; BattleTowerAction $0d
|
|||||||
|
|
||||||
Function170923:
|
Function170923:
|
||||||
ld a, BANK(s5_aa48) ; aka BANK(s5_aa47) and BANK(s5_aa5d)
|
ld a, BANK(s5_aa48) ; aka BANK(s5_aa47) and BANK(s5_aa5d)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [s5_aa48], a
|
ld [s5_aa48], a
|
||||||
ld [s5_aa47], a
|
ld [s5_aa47], a
|
||||||
@ -1352,7 +1352,7 @@ Function1709bb: ; BattleTowerAction $10
|
|||||||
xor a ; FALSE
|
xor a ; FALSE
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ld a, BANK(s5_a800)
|
ld a, BANK(s5_a800)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_a800]
|
ld a, [s5_a800]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
cp 6
|
cp 6
|
||||||
@ -1369,7 +1369,7 @@ Function1709bb: ; BattleTowerAction $10
|
|||||||
|
|
||||||
.invalid
|
.invalid
|
||||||
ld a, BANK(s5_a800)
|
ld a, BANK(s5_a800)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [s5_a800], a
|
ld [s5_a800], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1385,7 +1385,7 @@ Function1709bb: ; BattleTowerAction $10
|
|||||||
|
|
||||||
.DoAction1:
|
.DoAction1:
|
||||||
ld a, BANK(s5_a800)
|
ld a, BANK(s5_a800)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [s5_a800], a
|
ld [s5_a800], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1395,7 +1395,7 @@ Function1709bb: ; BattleTowerAction $10
|
|||||||
|
|
||||||
.Action4:
|
.Action4:
|
||||||
ld a, BANK(s5_b023) ; aka BANK(s5_a825) and BANK(s5_a826)
|
ld a, BANK(s5_b023) ; aka BANK(s5_a825) and BANK(s5_a826)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, s5_b023
|
ld hl, s5_b023
|
||||||
ld de, wc608
|
ld de, wc608
|
||||||
ld bc, 105
|
ld bc, 105
|
||||||
@ -1413,14 +1413,14 @@ Function1709bb: ; BattleTowerAction $10
|
|||||||
|
|
||||||
.Action5:
|
.Action5:
|
||||||
ld a, 0 ; ???
|
ld a, 0 ; ???
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wRTC
|
ld hl, wRTC
|
||||||
ld de, wc608
|
ld de, wc608
|
||||||
ld bc, 4
|
ld bc, 4
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, BANK(s5_b08c)
|
ld a, BANK(s5_b08c)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, s5_b08c
|
ld hl, s5_b08c
|
||||||
ld de, wc608
|
ld de, wc608
|
||||||
ld c, 4
|
ld c, 4
|
||||||
@ -1453,7 +1453,7 @@ Function1709bb: ; BattleTowerAction $10
|
|||||||
.different
|
.different
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, BANK(s5_a800)
|
ld a, BANK(s5_a800)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [s5_a800], a
|
ld [s5_a800], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1480,7 +1480,7 @@ Function170aa0:
|
|||||||
ld c, TRUE
|
ld c, TRUE
|
||||||
asm_170aa2:
|
asm_170aa2:
|
||||||
ld a, BANK(s5_aa8d)
|
ld a, BANK(s5_aa8d)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [s5_aa8d], a
|
ld [s5_aa8d], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1488,7 +1488,7 @@ asm_170aa2:
|
|||||||
|
|
||||||
Function170aaf:
|
Function170aaf:
|
||||||
ld a, BANK(s5_aa8d)
|
ld a, BANK(s5_aa8d)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_aa8d]
|
ld a, [s5_aa8d]
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1501,7 +1501,7 @@ Function170abe:
|
|||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld a, BANK(sBattleTowerSaveFileFlags)
|
ld a, BANK(sBattleTowerSaveFileFlags)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBattleTowerSaveFileFlags]
|
ld a, [sBattleTowerSaveFileFlags]
|
||||||
and 1
|
and 1
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
@ -1510,7 +1510,7 @@ Function170abe:
|
|||||||
|
|
||||||
Function170ad7:
|
Function170ad7:
|
||||||
ld a, BANK(sBattleTowerSaveFileFlags)
|
ld a, BANK(sBattleTowerSaveFileFlags)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBattleTowerSaveFileFlags]
|
ld a, [sBattleTowerSaveFileFlags]
|
||||||
or 1
|
or 1
|
||||||
ld [sBattleTowerSaveFileFlags], a
|
ld [sBattleTowerSaveFileFlags], a
|
||||||
@ -1519,7 +1519,7 @@ Function170ad7:
|
|||||||
|
|
||||||
BattleTowerAction_LevelCheck:
|
BattleTowerAction_LevelCheck:
|
||||||
ld a, BANK(s5_b2fb)
|
ld a, BANK(s5_b2fb)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_b2fb]
|
ld a, [s5_b2fb]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld c, 10
|
ld c, 10
|
||||||
@ -1531,7 +1531,7 @@ BattleTowerAction_LevelCheck:
|
|||||||
farcall BattleTower_LevelCheck
|
farcall BattleTower_LevelCheck
|
||||||
ret nc
|
ret nc
|
||||||
ld a, BANK(s5_b2fb)
|
ld a, BANK(s5_b2fb)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_b2fb]
|
ld a, [s5_b2fb]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
@ -1539,7 +1539,7 @@ BattleTowerAction_LevelCheck:
|
|||||||
|
|
||||||
BattleTowerAction_UbersCheck:
|
BattleTowerAction_UbersCheck:
|
||||||
ld a, BANK(s5_b2fb)
|
ld a, BANK(s5_b2fb)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_b2fb]
|
ld a, [s5_b2fb]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld c, 10
|
ld c, 10
|
||||||
@ -1551,7 +1551,7 @@ BattleTowerAction_UbersCheck:
|
|||||||
farcall BattleTower_UbersCheck
|
farcall BattleTower_UbersCheck
|
||||||
ret nc
|
ret nc
|
||||||
ld a, BANK(s5_b2fb)
|
ld a, BANK(s5_b2fb)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_b2fb]
|
ld a, [s5_b2fb]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
|
@ -39,7 +39,7 @@ endc
|
|||||||
ld b, a
|
ld b, a
|
||||||
|
|
||||||
ld a, BANK(sBTTrainers)
|
ld a, BANK(sBTTrainers)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
ld c, BATTLETOWER_STREAK_LENGTH
|
ld c, BATTLETOWER_STREAK_LENGTH
|
||||||
ld hl, sBTTrainers
|
ld hl, sBTTrainers
|
||||||
@ -96,7 +96,7 @@ Function_LoadRandomBattleTowerMon:
|
|||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
ld a, BANK(sBTMonPrevTrainer1)
|
ld a, BANK(sBTMonPrevTrainer1)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
.FindARandomBattleTowerMon:
|
.FindARandomBattleTowerMon:
|
||||||
; From Which LevelGroup are the mon loaded
|
; From Which LevelGroup are the mon loaded
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
CheckSave::
|
CheckSave::
|
||||||
ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
|
ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sCheckValue1]
|
ld a, [sCheckValue1]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [sCheckValue2]
|
ld a, [sCheckValue2]
|
||||||
|
@ -412,7 +412,7 @@ LoadHOFTeam:
|
|||||||
ld bc, wHallOfFameTempEnd - wHallOfFameTemp + 1
|
ld bc, wHallOfFameTempEnd - wHallOfFameTemp + 1
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, BANK(sHallOfFame)
|
ld a, BANK(sHallOfFame)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .absent
|
jr z, .absent
|
||||||
|
@ -20,7 +20,7 @@ CheckForLuckyNumberWinners:
|
|||||||
dec d
|
dec d
|
||||||
jr nz, .PartyLoop
|
jr nz, .PartyLoop
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
and a
|
and a
|
||||||
jr z, .SkipOpenBox
|
jr z, .SkipOpenBox
|
||||||
@ -59,7 +59,7 @@ CheckForLuckyNumberWinners:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a ; hl now contains the address of the loaded box in SRAM
|
ld l, a ; hl now contains the address of the loaded box in SRAM
|
||||||
|
@ -159,7 +159,7 @@ _UnownPrinter:
|
|||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
|
|
||||||
ld a, BANK(sScratch)
|
ld a, BANK(sScratch)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, wDecompressScratch
|
ld de, wDecompressScratch
|
||||||
ld hl, sScratch
|
ld hl, sScratch
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
@ -180,7 +180,7 @@ _UnownPrinter:
|
|||||||
ld de, UnownDexVacantString
|
ld de, UnownDexVacantString
|
||||||
call PlaceString
|
call PlaceString
|
||||||
xor a ; sScratch
|
xor a ; sScratch
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sScratch
|
ld hl, sScratch
|
||||||
ld bc, $31 tiles
|
ld bc, $31 tiles
|
||||||
xor a
|
xor a
|
||||||
|
@ -2,7 +2,7 @@ RotateUnownFrontpic:
|
|||||||
; something to do with Unown printer
|
; something to do with Unown printer
|
||||||
push de
|
push de
|
||||||
xor a ; BANK(sScratch)
|
xor a ; BANK(sScratch)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sScratch
|
ld hl, sScratch
|
||||||
ld bc, 0
|
ld bc, 0
|
||||||
.loop
|
.loop
|
||||||
|
@ -128,7 +128,7 @@ PlayersHousePC:
|
|||||||
|
|
||||||
CheckMysteryGift:
|
CheckMysteryGift:
|
||||||
ld a, BANK(sMysteryGiftItem)
|
ld a, BANK(sMysteryGiftItem)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sMysteryGiftItem]
|
ld a, [sMysteryGiftItem]
|
||||||
and a
|
and a
|
||||||
jr z, .no
|
jr z, .no
|
||||||
@ -141,7 +141,7 @@ CheckMysteryGift:
|
|||||||
|
|
||||||
GetMysteryGiftItem:
|
GetMysteryGiftItem:
|
||||||
ld a, BANK(sMysteryGiftItem)
|
ld a, BANK(sMysteryGiftItem)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sMysteryGiftItem]
|
ld a, [sMysteryGiftItem]
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
@ -420,7 +420,7 @@ PrintDiploma:
|
|||||||
|
|
||||||
TrainerHouse:
|
TrainerHouse:
|
||||||
ld a, BANK(sMysteryGiftTrainerHouseFlag)
|
ld a, BANK(sMysteryGiftTrainerHouseFlag)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sMysteryGiftTrainerHouseFlag]
|
ld a, [sMysteryGiftTrainerHouseFlag]
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
jp CloseSRAM
|
jp CloseSRAM
|
||||||
|
@ -221,7 +221,7 @@ DoAnimFrame:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.GameFreakLogo:
|
.GameFreakLogo:
|
||||||
callfar GameFreakLogoJumper
|
callfar PlaceGameFreakLogo
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.GSIntroStar
|
.GSIntroStar
|
||||||
|
@ -203,7 +203,7 @@ PokeBallEffect:
|
|||||||
jr nz, .room_in_party
|
jr nz, .room_in_party
|
||||||
|
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
cp MONS_PER_BOX
|
cp MONS_PER_BOX
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -605,7 +605,7 @@ PokeBallEffect:
|
|||||||
farcall SetBoxMonCaughtData
|
farcall SetBoxMonCaughtData
|
||||||
|
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
cp MONS_PER_BOX
|
cp MONS_PER_BOX
|
||||||
@ -641,7 +641,7 @@ PokeBallEffect:
|
|||||||
farcall NamingScreen
|
farcall NamingScreen
|
||||||
|
|
||||||
ld a, BANK(sBoxMonNicknames)
|
ld a, BANK(sBoxMonNicknames)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
ld hl, wMonOrItemNameBuffer
|
ld hl, wMonOrItemNameBuffer
|
||||||
ld de, sBoxMonNicknames
|
ld de, sBoxMonNicknames
|
||||||
@ -656,7 +656,7 @@ PokeBallEffect:
|
|||||||
|
|
||||||
.SkipBoxMonNickname:
|
.SkipBoxMonNickname:
|
||||||
ld a, BANK(sBoxMonNicknames)
|
ld a, BANK(sBoxMonNicknames)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
ld hl, sBoxMonNicknames
|
ld hl, sBoxMonNicknames
|
||||||
ld de, wMonOrItemNameBuffer
|
ld de, wMonOrItemNameBuffer
|
||||||
|
@ -835,7 +835,7 @@ Link_PrepPartyData_Gen2:
|
|||||||
|
|
||||||
; Copy all the mail messages to wc9f9
|
; Copy all the mail messages to wc9f9
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sPartyMail
|
ld hl, sPartyMail
|
||||||
ld b, PARTY_LENGTH
|
ld b, PARTY_LENGTH
|
||||||
.loop2
|
.loop2
|
||||||
@ -1706,7 +1706,7 @@ LinkTrade:
|
|||||||
ld bc, MAIL_STRUCT_LENGTH
|
ld bc, MAIL_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld bc, MAIL_STRUCT_LENGTH
|
ld bc, MAIL_STRUCT_LENGTH
|
||||||
@ -2508,7 +2508,7 @@ INCBIN "gfx/trade/unused_gs_border_tiles.2bpp"
|
|||||||
|
|
||||||
Unreferenced_Function29fe4:
|
Unreferenced_Function29fe4:
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld d, FALSE
|
ld d, FALSE
|
||||||
ld b, CHECK_FLAG
|
ld b, CHECK_FLAG
|
||||||
predef SmallFarFlagAction
|
predef SmallFarFlagAction
|
||||||
|
@ -1202,14 +1202,14 @@ MysteryGift_ClearTrainerData:
|
|||||||
|
|
||||||
GetMysteryGiftBank:
|
GetMysteryGiftBank:
|
||||||
ld a, BANK(sBackupMysteryGiftItem)
|
ld a, BANK(sBackupMysteryGiftItem)
|
||||||
jp GetSRAMBank
|
jp OpenSRAM
|
||||||
|
|
||||||
StagePartyDataForMysteryGift:
|
StagePartyDataForMysteryGift:
|
||||||
; You will be sending this data to your mystery gift partner.
|
; You will be sending this data to your mystery gift partner.
|
||||||
; Structure is the same as a trainer with species and moves
|
; Structure is the same as a trainer with species and moves
|
||||||
; defined.
|
; defined.
|
||||||
ld a, BANK(sPokemonData)
|
ld a, BANK(sPokemonData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, wMysteryGiftStaging
|
ld de, wMysteryGiftStaging
|
||||||
ld bc, sPokemonData + wPartyMons - wPokemonData
|
ld bc, sPokemonData + wPartyMons - wPokemonData
|
||||||
ld hl, sPokemonData + wPartySpecies - wPokemonData
|
ld hl, sPokemonData + wPartySpecies - wPokemonData
|
||||||
@ -1521,7 +1521,7 @@ Function105777:
|
|||||||
Function10578c:
|
Function10578c:
|
||||||
ld de, wLinkData
|
ld de, wLinkData
|
||||||
ld a, BANK(sPlayerData)
|
ld a, BANK(sPlayerData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sPlayerData + wPlayerName - wPlayerData
|
ld hl, sPlayerData + wPlayerName - wPlayerData
|
||||||
ld bc, NAME_LENGTH
|
ld bc, NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -1533,12 +1533,12 @@ Function10578c:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, BANK(sCrystalData)
|
ld a, BANK(sCrystalData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sCrystalData + 0]
|
ld a, [sCrystalData + 0]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
ld a, BANK(s4_a603) ; aka BANK(s4_a007) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
ld a, BANK(s4_a603) ; aka BANK(s4_a007) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, s4_a603 ; address of MBC30 bank
|
ld hl, s4_a603 ; address of MBC30 bank
|
||||||
ld bc, $8
|
ld bc, $8
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
@ -4,7 +4,7 @@ PrepMysteryGiftDataToSend:
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
inc de ; wc801
|
inc de ; wc801
|
||||||
ld a, BANK(sGameData)
|
ld a, BANK(sGameData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sPlayerData + wPlayerID - wPlayerData
|
ld hl, sPlayerData + wPlayerID - wPlayerData
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
@ -42,7 +42,7 @@ PrepMysteryGiftDataToSend:
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
inc de ; wc812
|
inc de ; wc812
|
||||||
ld a, BANK(sBackupMysteryGiftItem)
|
ld a, BANK(sBackupMysteryGiftItem)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBackupMysteryGiftItem]
|
ld a, [sBackupMysteryGiftItem]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
|
@ -10,7 +10,7 @@ EmptyAllSRAMBanks:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.EmptyBank:
|
.EmptyBank:
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, SRAM_Begin
|
ld hl, SRAM_Begin
|
||||||
ld bc, SRAM_End - SRAM_Begin
|
ld bc, SRAM_End - SRAM_Begin
|
||||||
xor a
|
xor a
|
||||||
|
@ -137,7 +137,7 @@ _ResetWRAM:
|
|||||||
call SetDefaultBoxNames
|
call SetDefaultBoxNames
|
||||||
|
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
call .InitList
|
call .InitList
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -167,7 +167,7 @@ _ResetWRAM:
|
|||||||
ld [wRoamMon3MapNumber], a
|
ld [wRoamMon3MapNumber], a
|
||||||
|
|
||||||
ld a, BANK(sMysteryGiftItem)
|
ld a, BANK(sMysteryGiftItem)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sMysteryGiftItem
|
ld hl, sMysteryGiftItem
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -304,7 +304,7 @@ InitializeWorld:
|
|||||||
|
|
||||||
LoadOrRegenerateLuckyIDNumber:
|
LoadOrRegenerateLuckyIDNumber:
|
||||||
ld a, BANK(sLuckyIDNumber)
|
ld a, BANK(sLuckyIDNumber)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wCurDay]
|
ld a, [wCurDay]
|
||||||
inc a
|
inc a
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -953,7 +953,7 @@ Intro_PlacePlayerSprite:
|
|||||||
db 10 * 8 + 4, 10 * 8, 3
|
db 10 * 8 + 4, 10 * 8, 3
|
||||||
|
|
||||||
CrystalIntroSequence:
|
CrystalIntroSequence:
|
||||||
callfar Copyright_GFPresents
|
callfar Copyright_GameFreakPresents
|
||||||
jr c, StartTitleScreen
|
jr c, StartTitleScreen
|
||||||
farcall CrystalIntro
|
farcall CrystalIntro
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ MainMenu_GetWhichMenu:
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BANK(sNumDailyMysteryGiftPartnerIDs)
|
ld a, BANK(sNumDailyMysteryGiftPartnerIDs)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sNumDailyMysteryGiftPartnerIDs]
|
ld a, [sNumDailyMysteryGiftPartnerIDs]
|
||||||
cp -1
|
cp -1
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
@ -697,7 +697,7 @@ Unreferenced_Function24423:
|
|||||||
bit 0, a
|
bit 0, a
|
||||||
ret z
|
ret z
|
||||||
xor a ; sScratch
|
xor a ; sScratch
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld de, sScratch
|
ld de, sScratch
|
||||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
@ -705,7 +705,7 @@ Unreferenced_Function24423:
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
call OverworldTextModeSwitch
|
call OverworldTextModeSwitch
|
||||||
xor a ; sScratch
|
xor a ; sScratch
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sScratch
|
ld hl, sScratch
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
|
@ -144,7 +144,7 @@ ResumeGameLogic:
|
|||||||
|
|
||||||
AddHallOfFameEntry:
|
AddHallOfFameEntry:
|
||||||
ld a, BANK(sHallOfFame)
|
ld a, BANK(sHallOfFame)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sHallOfFame + HOF_LENGTH * (NUM_HOF_TEAMS - 1) - 1
|
ld hl, sHallOfFame + HOF_LENGTH * (NUM_HOF_TEAMS - 1) - 1
|
||||||
ld de, sHallOfFame + HOF_LENGTH * NUM_HOF_TEAMS - 1
|
ld de, sHallOfFame + HOF_LENGTH * NUM_HOF_TEAMS - 1
|
||||||
ld bc, HOF_LENGTH * (NUM_HOF_TEAMS - 1)
|
ld bc, HOF_LENGTH * (NUM_HOF_TEAMS - 1)
|
||||||
@ -212,7 +212,7 @@ SaveTheGame_yesorno:
|
|||||||
|
|
||||||
CompareLoadedAndSavedPlayerID:
|
CompareLoadedAndSavedPlayerID:
|
||||||
ld a, BANK(sPlayerData)
|
ld a, BANK(sPlayerData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sPlayerData + (wPlayerID - wPlayerData)
|
ld hl, sPlayerData + (wPlayerID - wPlayerData)
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
@ -273,7 +273,7 @@ _SaveGameData:
|
|||||||
farcall BackupMobileEventIndex
|
farcall BackupMobileEventIndex
|
||||||
farcall SaveRTC
|
farcall SaveRTC
|
||||||
ld a, BANK(sBattleTowerChallengeState)
|
ld a, BANK(sBattleTowerChallengeState)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBattleTowerChallengeState]
|
ld a, [sBattleTowerChallengeState]
|
||||||
cp BATTLETOWER_RECEIVED_REWARD
|
cp BATTLETOWER_RECEIVED_REWARD
|
||||||
jr nz, .ok
|
jr nz, .ok
|
||||||
@ -288,7 +288,7 @@ UpdateStackTop:
|
|||||||
; It could have been used to debug stack overflow during saving.
|
; It could have been used to debug stack overflow during saving.
|
||||||
call FindStackTop
|
call FindStackTop
|
||||||
ld a, BANK(sStackTop)
|
ld a, BANK(sStackTop)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sStackTop + 0]
|
ld a, [sStackTop + 0]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [sStackTop + 1]
|
ld a, [sStackTop + 1]
|
||||||
@ -354,7 +354,7 @@ ErasePreviousSave:
|
|||||||
call SaveData
|
call SaveData
|
||||||
call EraseBattleTowerStatus
|
call EraseBattleTowerStatus
|
||||||
ld a, BANK(sStackTop)
|
ld a, BANK(sStackTop)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [sStackTop + 0], a
|
ld [sStackTop + 0], a
|
||||||
ld [sStackTop + 1], a
|
ld [sStackTop + 1], a
|
||||||
@ -365,7 +365,7 @@ ErasePreviousSave:
|
|||||||
|
|
||||||
EraseLinkBattleStats:
|
EraseLinkBattleStats:
|
||||||
ld a, BANK(sLinkBattleStats)
|
ld a, BANK(sLinkBattleStats)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sLinkBattleStats
|
ld hl, sLinkBattleStats
|
||||||
ld bc, sLinkBattleStatsEnd - sLinkBattleStats
|
ld bc, sLinkBattleStatsEnd - sLinkBattleStats
|
||||||
xor a
|
xor a
|
||||||
@ -374,7 +374,7 @@ EraseLinkBattleStats:
|
|||||||
|
|
||||||
EraseMysteryGift:
|
EraseMysteryGift:
|
||||||
ld a, BANK(sBackupMysteryGiftItem)
|
ld a, BANK(sBackupMysteryGiftItem)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBackupMysteryGiftItem
|
ld hl, sBackupMysteryGiftItem
|
||||||
ld bc, sBackupMysteryGiftItemEnd - sBackupMysteryGiftItem
|
ld bc, sBackupMysteryGiftItemEnd - sBackupMysteryGiftItem
|
||||||
xor a
|
xor a
|
||||||
@ -383,7 +383,7 @@ EraseMysteryGift:
|
|||||||
|
|
||||||
EraseHallOfFame:
|
EraseHallOfFame:
|
||||||
ld a, BANK(sHallOfFame)
|
ld a, BANK(sHallOfFame)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sHallOfFame
|
ld hl, sHallOfFame
|
||||||
ld bc, sHallOfFameEnd - sHallOfFame
|
ld bc, sHallOfFameEnd - sHallOfFame
|
||||||
xor a
|
xor a
|
||||||
@ -392,7 +392,7 @@ EraseHallOfFame:
|
|||||||
|
|
||||||
Unreferenced_Function14d18:
|
Unreferenced_Function14d18:
|
||||||
ld a, BANK(s4_a007)
|
ld a, BANK(s4_a007)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, .Data
|
ld hl, .Data
|
||||||
ld de, s4_a007
|
ld de, s4_a007
|
||||||
ld bc, .DataEnd - .Data
|
ld bc, .DataEnd - .Data
|
||||||
@ -412,7 +412,7 @@ Unreferenced_Function14d18:
|
|||||||
|
|
||||||
EraseBattleTowerStatus:
|
EraseBattleTowerStatus:
|
||||||
ld a, BANK(sBattleTowerChallengeState)
|
ld a, BANK(sBattleTowerChallengeState)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [sBattleTowerChallengeState], a
|
ld [sBattleTowerChallengeState], a
|
||||||
jp CloseSRAM
|
jp CloseSRAM
|
||||||
@ -423,7 +423,7 @@ SaveData:
|
|||||||
|
|
||||||
Unreferenced_Function14d6c:
|
Unreferenced_Function14d6c:
|
||||||
ld a, BANK(s4_a60b) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
ld a, BANK(s4_a60b) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s4_a60b] ; address of MBC30 bank
|
ld a, [s4_a60b] ; address of MBC30 bank
|
||||||
ld b, $0
|
ld b, $0
|
||||||
and a
|
and a
|
||||||
@ -438,7 +438,7 @@ Unreferenced_Function14d6c:
|
|||||||
|
|
||||||
Unreferenced_Function14d83:
|
Unreferenced_Function14d83:
|
||||||
ld a, BANK(s4_a60c) ; aka BANK(s4_a60d) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
ld a, BANK(s4_a60c) ; aka BANK(s4_a60d) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [s4_a60c], a ; address of MBC30 bank
|
ld [s4_a60c], a ; address of MBC30 bank
|
||||||
ld [s4_a60d], a ; address of MBC30 bank
|
ld [s4_a60d], a ; address of MBC30 bank
|
||||||
@ -447,7 +447,7 @@ Unreferenced_Function14d83:
|
|||||||
|
|
||||||
Unreferenced_Function14d93:
|
Unreferenced_Function14d93:
|
||||||
ld a, BANK(s7_a000) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
ld a, BANK(s7_a000) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [s7_a000], a ; address of MBC30 bank
|
ld [s7_a000], a ; address of MBC30 bank
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -462,7 +462,7 @@ HallOfFame_InitSaveIfNeeded:
|
|||||||
|
|
||||||
ValidateSave:
|
ValidateSave:
|
||||||
ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
|
ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, SAVE_CHECK_VALUE_1
|
ld a, SAVE_CHECK_VALUE_1
|
||||||
ld [sCheckValue1], a
|
ld [sCheckValue1], a
|
||||||
ld a, SAVE_CHECK_VALUE_2
|
ld a, SAVE_CHECK_VALUE_2
|
||||||
@ -471,7 +471,7 @@ ValidateSave:
|
|||||||
|
|
||||||
SaveOptions:
|
SaveOptions:
|
||||||
ld a, BANK(sOptions)
|
ld a, BANK(sOptions)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wOptions
|
ld hl, wOptions
|
||||||
ld de, sOptions
|
ld de, sOptions
|
||||||
ld bc, wOptionsEnd - wOptions
|
ld bc, wOptionsEnd - wOptions
|
||||||
@ -483,7 +483,7 @@ SaveOptions:
|
|||||||
|
|
||||||
SavePlayerData:
|
SavePlayerData:
|
||||||
ld a, BANK(sPlayerData)
|
ld a, BANK(sPlayerData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wPlayerData
|
ld hl, wPlayerData
|
||||||
ld de, sPlayerData
|
ld de, sPlayerData
|
||||||
ld bc, wPlayerDataEnd - wPlayerData
|
ld bc, wPlayerDataEnd - wPlayerData
|
||||||
@ -496,7 +496,7 @@ SavePlayerData:
|
|||||||
|
|
||||||
SavePokemonData:
|
SavePokemonData:
|
||||||
ld a, BANK(sPokemonData)
|
ld a, BANK(sPokemonData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wPokemonData
|
ld hl, wPokemonData
|
||||||
ld de, sPokemonData
|
ld de, sPokemonData
|
||||||
ld bc, wPokemonDataEnd - wPokemonData
|
ld bc, wPokemonDataEnd - wPokemonData
|
||||||
@ -513,7 +513,7 @@ SaveChecksum:
|
|||||||
ld hl, sGameData
|
ld hl, sGameData
|
||||||
ld bc, sGameDataEnd - sGameData
|
ld bc, sGameDataEnd - sGameData
|
||||||
ld a, BANK(sGameData)
|
ld a, BANK(sGameData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call Checksum
|
call Checksum
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [sChecksum + 0], a
|
ld [sChecksum + 0], a
|
||||||
@ -524,7 +524,7 @@ SaveChecksum:
|
|||||||
|
|
||||||
ValidateBackupSave:
|
ValidateBackupSave:
|
||||||
ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
|
ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, SAVE_CHECK_VALUE_1
|
ld a, SAVE_CHECK_VALUE_1
|
||||||
ld [sBackupCheckValue1], a
|
ld [sBackupCheckValue1], a
|
||||||
ld a, SAVE_CHECK_VALUE_2
|
ld a, SAVE_CHECK_VALUE_2
|
||||||
@ -534,7 +534,7 @@ ValidateBackupSave:
|
|||||||
|
|
||||||
SaveBackupOptions:
|
SaveBackupOptions:
|
||||||
ld a, BANK(sBackupOptions)
|
ld a, BANK(sBackupOptions)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wOptions
|
ld hl, wOptions
|
||||||
ld de, sBackupOptions
|
ld de, sBackupOptions
|
||||||
ld bc, wOptionsEnd - wOptions
|
ld bc, wOptionsEnd - wOptions
|
||||||
@ -544,7 +544,7 @@ SaveBackupOptions:
|
|||||||
|
|
||||||
SaveBackupPlayerData:
|
SaveBackupPlayerData:
|
||||||
ld a, BANK(sBackupPlayerData)
|
ld a, BANK(sBackupPlayerData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wPlayerData
|
ld hl, wPlayerData
|
||||||
ld de, sBackupPlayerData
|
ld de, sBackupPlayerData
|
||||||
ld bc, wPlayerDataEnd - wPlayerData
|
ld bc, wPlayerDataEnd - wPlayerData
|
||||||
@ -558,7 +558,7 @@ SaveBackupPlayerData:
|
|||||||
|
|
||||||
SaveBackupPokemonData:
|
SaveBackupPokemonData:
|
||||||
ld a, BANK(sBackupPokemonData)
|
ld a, BANK(sBackupPokemonData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wPokemonData
|
ld hl, wPokemonData
|
||||||
ld de, sBackupPokemonData
|
ld de, sBackupPokemonData
|
||||||
ld bc, wPokemonDataEnd - wPokemonData
|
ld bc, wPokemonDataEnd - wPokemonData
|
||||||
@ -570,7 +570,7 @@ SaveBackupChecksum:
|
|||||||
ld hl, sBackupGameData
|
ld hl, sBackupGameData
|
||||||
ld bc, sBackupGameDataEnd - sBackupGameData
|
ld bc, sBackupGameDataEnd - sBackupGameData
|
||||||
ld a, BANK(sBackupGameData)
|
ld a, BANK(sBackupGameData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call Checksum
|
call Checksum
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [sBackupChecksum + 0], a
|
ld [sBackupChecksum + 0], a
|
||||||
@ -634,7 +634,7 @@ TryLoadSaveData:
|
|||||||
jr z, .backup
|
jr z, .backup
|
||||||
|
|
||||||
ld a, BANK(sPlayerData)
|
ld a, BANK(sPlayerData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sPlayerData + wStartDay - wPlayerData
|
ld hl, sPlayerData + wStartDay - wPlayerData
|
||||||
ld de, wStartDay
|
ld de, wStartDay
|
||||||
ld bc, 8
|
ld bc, 8
|
||||||
@ -653,7 +653,7 @@ TryLoadSaveData:
|
|||||||
jr z, .corrupt
|
jr z, .corrupt
|
||||||
|
|
||||||
ld a, BANK(sBackupPlayerData)
|
ld a, BANK(sBackupPlayerData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBackupPlayerData + wStartDay - wPlayerData
|
ld hl, sBackupPlayerData + wStartDay - wPlayerData
|
||||||
ld de, wStartDay
|
ld de, wStartDay
|
||||||
ld bc, 8
|
ld bc, 8
|
||||||
@ -677,7 +677,7 @@ INCLUDE "data/default_options.asm"
|
|||||||
|
|
||||||
CheckPrimarySaveFile:
|
CheckPrimarySaveFile:
|
||||||
ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
|
ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sCheckValue1]
|
ld a, [sCheckValue1]
|
||||||
cp SAVE_CHECK_VALUE_1
|
cp SAVE_CHECK_VALUE_1
|
||||||
jr nz, .nope
|
jr nz, .nope
|
||||||
@ -698,7 +698,7 @@ CheckPrimarySaveFile:
|
|||||||
|
|
||||||
CheckBackupSaveFile:
|
CheckBackupSaveFile:
|
||||||
ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
|
ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBackupCheckValue1]
|
ld a, [sBackupCheckValue1]
|
||||||
cp SAVE_CHECK_VALUE_1
|
cp SAVE_CHECK_VALUE_1
|
||||||
jr nz, .nope
|
jr nz, .nope
|
||||||
@ -718,7 +718,7 @@ CheckBackupSaveFile:
|
|||||||
|
|
||||||
LoadPlayerData:
|
LoadPlayerData:
|
||||||
ld a, BANK(sPlayerData)
|
ld a, BANK(sPlayerData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sPlayerData
|
ld hl, sPlayerData
|
||||||
ld de, wPlayerData
|
ld de, wPlayerData
|
||||||
ld bc, wPlayerDataEnd - wPlayerData
|
ld bc, wPlayerDataEnd - wPlayerData
|
||||||
@ -729,7 +729,7 @@ LoadPlayerData:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, BANK(sBattleTowerChallengeState)
|
ld a, BANK(sBattleTowerChallengeState)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBattleTowerChallengeState]
|
ld a, [sBattleTowerChallengeState]
|
||||||
cp BATTLETOWER_RECEIVED_REWARD
|
cp BATTLETOWER_RECEIVED_REWARD
|
||||||
jr nz, .not_4
|
jr nz, .not_4
|
||||||
@ -741,7 +741,7 @@ LoadPlayerData:
|
|||||||
|
|
||||||
LoadPokemonData:
|
LoadPokemonData:
|
||||||
ld a, BANK(sPokemonData)
|
ld a, BANK(sPokemonData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sPokemonData
|
ld hl, sPokemonData
|
||||||
ld de, wPokemonData
|
ld de, wPokemonData
|
||||||
ld bc, wPokemonDataEnd - wPokemonData
|
ld bc, wPokemonDataEnd - wPokemonData
|
||||||
@ -758,7 +758,7 @@ VerifyChecksum:
|
|||||||
ld hl, sGameData
|
ld hl, sGameData
|
||||||
ld bc, sGameDataEnd - sGameData
|
ld bc, sGameDataEnd - sGameData
|
||||||
ld a, BANK(sGameData)
|
ld a, BANK(sGameData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call Checksum
|
call Checksum
|
||||||
ld a, [sChecksum + 0]
|
ld a, [sChecksum + 0]
|
||||||
cp e
|
cp e
|
||||||
@ -773,7 +773,7 @@ VerifyChecksum:
|
|||||||
|
|
||||||
LoadBackupPlayerData:
|
LoadBackupPlayerData:
|
||||||
ld a, BANK(sBackupPlayerData)
|
ld a, BANK(sBackupPlayerData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBackupPlayerData
|
ld hl, sBackupPlayerData
|
||||||
ld de, wPlayerData
|
ld de, wPlayerData
|
||||||
ld bc, wPlayerDataEnd - wPlayerData
|
ld bc, wPlayerDataEnd - wPlayerData
|
||||||
@ -787,7 +787,7 @@ LoadBackupPlayerData:
|
|||||||
|
|
||||||
LoadBackupPokemonData:
|
LoadBackupPokemonData:
|
||||||
ld a, BANK(sBackupPokemonData)
|
ld a, BANK(sBackupPokemonData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBackupPokemonData
|
ld hl, sBackupPokemonData
|
||||||
ld de, wPokemonData
|
ld de, wPokemonData
|
||||||
ld bc, wPokemonDataEnd - wPokemonData
|
ld bc, wPokemonDataEnd - wPokemonData
|
||||||
@ -799,7 +799,7 @@ VerifyBackupChecksum:
|
|||||||
ld hl, sBackupGameData
|
ld hl, sBackupGameData
|
||||||
ld bc, sBackupGameDataEnd - sBackupGameData
|
ld bc, sBackupGameDataEnd - sBackupGameData
|
||||||
ld a, BANK(sBackupGameData)
|
ld a, BANK(sBackupGameData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call Checksum
|
call Checksum
|
||||||
ld a, [sBackupChecksum + 0]
|
ld a, [sBackupChecksum + 0]
|
||||||
cp e
|
cp e
|
||||||
@ -819,7 +819,7 @@ _SaveData:
|
|||||||
; It is not part of a regular save.
|
; It is not part of a regular save.
|
||||||
|
|
||||||
ld a, BANK(sCrystalData)
|
ld a, BANK(sCrystalData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wCrystalData
|
ld hl, wCrystalData
|
||||||
ld de, sCrystalData
|
ld de, sCrystalData
|
||||||
ld bc, wCrystalDataEnd - wCrystalData
|
ld bc, wCrystalDataEnd - wCrystalData
|
||||||
@ -840,7 +840,7 @@ _SaveData:
|
|||||||
|
|
||||||
_LoadData:
|
_LoadData:
|
||||||
ld a, BANK(sCrystalData)
|
ld a, BANK(sCrystalData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sCrystalData
|
ld hl, sCrystalData
|
||||||
ld de, wCrystalData
|
ld de, wCrystalData
|
||||||
ld bc, wCrystalDataEnd - wCrystalData
|
ld bc, wCrystalDataEnd - wCrystalData
|
||||||
@ -892,7 +892,7 @@ SaveBoxAddress:
|
|||||||
push af
|
push af
|
||||||
push de
|
push de
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBox
|
ld hl, sBox
|
||||||
ld de, wBoxPartialData
|
ld de, wBoxPartialData
|
||||||
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
||||||
@ -903,7 +903,7 @@ SaveBoxAddress:
|
|||||||
; Save it to the target box.
|
; Save it to the target box.
|
||||||
push af
|
push af
|
||||||
push de
|
push de
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wBoxPartialData
|
ld hl, wBoxPartialData
|
||||||
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -911,7 +911,7 @@ SaveBoxAddress:
|
|||||||
|
|
||||||
; Load the second part of the active box.
|
; Load the second part of the active box.
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBox + (wBoxPartialDataEnd - wBoxPartialData)
|
ld hl, sBox + (wBoxPartialDataEnd - wBoxPartialData)
|
||||||
ld de, wBoxPartialData
|
ld de, wBoxPartialData
|
||||||
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
||||||
@ -927,7 +927,7 @@ SaveBoxAddress:
|
|||||||
; Save it to the next part of the target box.
|
; Save it to the next part of the target box.
|
||||||
push af
|
push af
|
||||||
push de
|
push de
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wBoxPartialData
|
ld hl, wBoxPartialData
|
||||||
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -935,7 +935,7 @@ SaveBoxAddress:
|
|||||||
|
|
||||||
; Load the third and final part of the active box.
|
; Load the third and final part of the active box.
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2
|
ld hl, sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2
|
||||||
ld de, wBoxPartialData
|
ld de, wBoxPartialData
|
||||||
ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e
|
ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e
|
||||||
@ -949,7 +949,7 @@ SaveBoxAddress:
|
|||||||
ld e, l
|
ld e, l
|
||||||
ld d, h
|
ld d, h
|
||||||
; Save it to the final part of the target box.
|
; Save it to the final part of the target box.
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wBoxPartialData
|
ld hl, wBoxPartialData
|
||||||
ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e
|
ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -968,13 +968,13 @@ LoadBoxAddress:
|
|||||||
; Load part 1
|
; Load part 1
|
||||||
push af
|
push af
|
||||||
push hl
|
push hl
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, wBoxPartialData
|
ld de, wBoxPartialData
|
||||||
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wBoxPartialData
|
ld hl, wBoxPartialData
|
||||||
ld de, sBox
|
ld de, sBox
|
||||||
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
||||||
@ -988,13 +988,13 @@ LoadBoxAddress:
|
|||||||
; Load part 2
|
; Load part 2
|
||||||
push af
|
push af
|
||||||
push hl
|
push hl
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, wBoxPartialData
|
ld de, wBoxPartialData
|
||||||
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wBoxPartialData
|
ld hl, wBoxPartialData
|
||||||
ld de, sBox + (wBoxPartialDataEnd - wBoxPartialData)
|
ld de, sBox + (wBoxPartialDataEnd - wBoxPartialData)
|
||||||
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
ld bc, (wBoxPartialDataEnd - wBoxPartialData)
|
||||||
@ -1005,13 +1005,13 @@ LoadBoxAddress:
|
|||||||
; Load part 3
|
; Load part 3
|
||||||
ld de, (wBoxPartialDataEnd - wBoxPartialData)
|
ld de, (wBoxPartialDataEnd - wBoxPartialData)
|
||||||
add hl, de
|
add hl, de
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, wBoxPartialData
|
ld de, wBoxPartialData
|
||||||
ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e
|
ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wBoxPartialData
|
ld hl, wBoxPartialData
|
||||||
ld de, sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2
|
ld de, sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2
|
||||||
ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e
|
ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e
|
||||||
@ -1027,7 +1027,7 @@ EraseBoxes:
|
|||||||
.next
|
.next
|
||||||
push bc
|
push bc
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
|
@ -80,7 +80,7 @@ Credits::
|
|||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ldh [hVBlank], a
|
ldh [hVBlank], a
|
||||||
ld a, $1
|
ld a, TRUE
|
||||||
ldh [hInMenu], a
|
ldh [hInMenu], a
|
||||||
xor a
|
xor a
|
||||||
ldh [hBGMapMode], a
|
ldh [hBGMapMode], a
|
||||||
@ -198,7 +198,7 @@ Credits_UpdateGFXRequestPath:
|
|||||||
Credits_RequestGFX:
|
Credits_RequestGFX:
|
||||||
xor a
|
xor a
|
||||||
ldh [hBGMapMode], a
|
ldh [hBGMapMode], a
|
||||||
ld a, $8
|
ld a, 8
|
||||||
ld [wRequested2bpp], a
|
ld [wRequested2bpp], a
|
||||||
jp Credits_Next
|
jp Credits_Next
|
||||||
|
|
||||||
@ -572,14 +572,17 @@ Credits_LoadBorderGFX:
|
|||||||
dw CreditsPichuGFX + 16 tiles
|
dw CreditsPichuGFX + 16 tiles
|
||||||
dw CreditsPichuGFX + 32 tiles
|
dw CreditsPichuGFX + 32 tiles
|
||||||
dw CreditsPichuGFX + 48 tiles
|
dw CreditsPichuGFX + 48 tiles
|
||||||
|
|
||||||
dw CreditsSmoochumGFX
|
dw CreditsSmoochumGFX
|
||||||
dw CreditsSmoochumGFX + 16 tiles
|
dw CreditsSmoochumGFX + 16 tiles
|
||||||
dw CreditsSmoochumGFX + 32 tiles
|
dw CreditsSmoochumGFX + 32 tiles
|
||||||
dw CreditsSmoochumGFX + 48 tiles
|
dw CreditsSmoochumGFX + 48 tiles
|
||||||
|
|
||||||
dw CreditsDittoGFX
|
dw CreditsDittoGFX
|
||||||
dw CreditsDittoGFX + 16 tiles
|
dw CreditsDittoGFX + 16 tiles
|
||||||
dw CreditsDittoGFX + 32 tiles
|
dw CreditsDittoGFX + 32 tiles
|
||||||
dw CreditsDittoGFX + 48 tiles
|
dw CreditsDittoGFX + 48 tiles
|
||||||
|
|
||||||
dw CreditsIgglybuffGFX
|
dw CreditsIgglybuffGFX
|
||||||
dw CreditsIgglybuffGFX + 16 tiles
|
dw CreditsIgglybuffGFX + 16 tiles
|
||||||
dw CreditsIgglybuffGFX + 32 tiles
|
dw CreditsIgglybuffGFX + 32 tiles
|
||||||
|
@ -47,11 +47,13 @@ EvolutionAnimation:
|
|||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
xor a
|
xor a
|
||||||
ldh [hBGMapMode], a
|
ldh [hBGMapMode], a
|
||||||
|
|
||||||
ld a, [wEvolutionOldSpecies]
|
ld a, [wEvolutionOldSpecies]
|
||||||
ld [wPlayerHPPal], a
|
ld [wPlayerHPPal], a
|
||||||
|
|
||||||
ld c, $0
|
ld c, FALSE
|
||||||
call .GetSGBLayout
|
call .GetSGBLayout
|
||||||
|
|
||||||
ld a, [wEvolutionOldSpecies]
|
ld a, [wEvolutionOldSpecies]
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
@ -69,41 +71,45 @@ EvolutionAnimation:
|
|||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
call .LoadFrontpic
|
call .LoadFrontpic
|
||||||
|
|
||||||
ld a, [wEvolutionOldSpecies]
|
ld a, [wEvolutionOldSpecies]
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
|
|
||||||
ld a, $1
|
ld a, 1
|
||||||
ldh [hBGMapMode], a
|
ldh [hBGMapMode], a
|
||||||
|
|
||||||
call .check_statused
|
call .check_statused
|
||||||
jr c, .skip_cry
|
jr c, .skip_cry
|
||||||
|
|
||||||
ld a, [wEvolutionOldSpecies]
|
ld a, [wEvolutionOldSpecies]
|
||||||
call PlayMonCry
|
call PlayMonCry
|
||||||
|
|
||||||
.skip_cry
|
.skip_cry
|
||||||
|
|
||||||
ld de, MUSIC_EVOLUTION
|
ld de, MUSIC_EVOLUTION
|
||||||
call PlayMusic
|
call PlayMusic
|
||||||
|
|
||||||
ld c, 80
|
ld c, 80
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
||||||
ld c, $1
|
ld c, TRUE
|
||||||
call .GetSGBLayout
|
call .GetSGBLayout
|
||||||
|
|
||||||
call .AnimationSequence
|
call .AnimationSequence
|
||||||
jr c, .cancel_evo
|
jr c, .cancel_evo
|
||||||
|
|
||||||
ld a, -7 * 7
|
ld a, -7 * 7
|
||||||
ld [wEvolutionPicOffset], a
|
ld [wEvolutionPicOffset], a
|
||||||
call .ReplaceFrontpic
|
call .ReplaceFrontpic
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wEvolutionCanceled], a
|
ld [wEvolutionCanceled], a
|
||||||
|
|
||||||
ld a, [wEvolutionNewSpecies]
|
ld a, [wEvolutionNewSpecies]
|
||||||
ld [wPlayerHPPal], a
|
ld [wPlayerHPPal], a
|
||||||
|
|
||||||
ld c, $0
|
ld c, FALSE
|
||||||
call .GetSGBLayout
|
call .GetSGBLayout
|
||||||
|
|
||||||
call .PlayEvolvedSFX
|
call .PlayEvolvedSFX
|
||||||
farcall ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call .check_statused
|
call .check_statused
|
||||||
@ -133,14 +139,15 @@ EvolutionAnimation:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.cancel_evo
|
.cancel_evo
|
||||||
ld a, $1
|
ld a, TRUE
|
||||||
ld [wEvolutionCanceled], a
|
ld [wEvolutionCanceled], a
|
||||||
|
|
||||||
ld a, [wEvolutionOldSpecies]
|
ld a, [wEvolutionOldSpecies]
|
||||||
ld [wPlayerHPPal], a
|
ld [wPlayerHPPal], a
|
||||||
|
|
||||||
ld c, $0
|
ld c, FALSE
|
||||||
call .GetSGBLayout
|
call .GetSGBLayout
|
||||||
|
|
||||||
call .PlayEvolvedSFX
|
call .PlayEvolvedSFX
|
||||||
farcall ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call .check_statused
|
call .check_statused
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Copyright_GFPresents:
|
Copyright_GameFreakPresents:
|
||||||
; Play the copyright screen and GameFreak Presents sequence.
|
; Play the copyright screen and GameFreak Presents sequence.
|
||||||
; Return carry if user cancels animation by pressing a button.
|
; Return carry if user cancels animation by pressing a button.
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ Copyright_GFPresents:
|
|||||||
ldh [hJoyDown], a
|
ldh [hJoyDown], a
|
||||||
ldh [hSCX], a
|
ldh [hSCX], a
|
||||||
ldh [hSCY], a
|
ldh [hSCY], a
|
||||||
ld a, $90
|
ld a, SCREEN_HEIGHT_PX
|
||||||
ldh [hWY], a
|
ldh [hWY], a
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
ld b, SCGB_GAMEFREAK_LOGO
|
ld b, SCGB_GAMEFREAK_LOGO
|
||||||
@ -116,32 +116,23 @@ Copyright_GFPresents:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
PlaceGameFreakPresents:
|
PlaceGameFreakPresents:
|
||||||
ld a, [wJumptableIndex]
|
jumptable .scenes, wJumptableIndex
|
||||||
ld e, a
|
|
||||||
ld d, 0
|
|
||||||
ld hl, .dw
|
|
||||||
add hl, de
|
|
||||||
add hl, de
|
|
||||||
ld a, [hli]
|
|
||||||
ld h, [hl]
|
|
||||||
ld l, a
|
|
||||||
jp hl
|
|
||||||
|
|
||||||
.dw
|
.scenes
|
||||||
dw PlaceGameFreakPresents_0
|
dw GameFreakPresentsScene0
|
||||||
dw PlaceGameFreakPresents_1
|
dw GameFreakPresentsScene1
|
||||||
dw PlaceGameFreakPresents_2
|
dw GameFreakPresentsScene2
|
||||||
dw PlaceGameFreakPresents_3
|
dw GameFreakPresentsScene3
|
||||||
|
|
||||||
PlaceGameFreakPresents_AdvanceIndex:
|
PlaceGameFreakPresents_NextScene:
|
||||||
ld hl, wJumptableIndex
|
ld hl, wJumptableIndex
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
PlaceGameFreakPresents_0:
|
GameFreakPresentsScene0:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
PlaceGameFreakPresents_1:
|
GameFreakPresentsScene1:
|
||||||
ld hl, wIntroSceneTimer
|
ld hl, wIntroSceneTimer
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $20
|
cp $20
|
||||||
@ -155,7 +146,7 @@ PlaceGameFreakPresents_1:
|
|||||||
decoord 5, 10
|
decoord 5, 10
|
||||||
ld bc, .end - .GAME_FREAK
|
ld bc, .end - .GAME_FREAK
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call PlaceGameFreakPresents_AdvanceIndex
|
call PlaceGameFreakPresents_NextScene
|
||||||
ld de, SFX_GAME_FREAK_PRESENTS
|
ld de, SFX_GAME_FREAK_PRESENTS
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
ret
|
ret
|
||||||
@ -166,7 +157,7 @@ PlaceGameFreakPresents_1:
|
|||||||
.end
|
.end
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
PlaceGameFreakPresents_2:
|
GameFreakPresentsScene2:
|
||||||
ld hl, wIntroSceneTimer
|
ld hl, wIntroSceneTimer
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $40
|
cp $40
|
||||||
@ -180,7 +171,7 @@ PlaceGameFreakPresents_2:
|
|||||||
decoord 7, 11
|
decoord 7, 11
|
||||||
ld bc, .end - .presents
|
ld bc, .end - .presents
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call PlaceGameFreakPresents_AdvanceIndex
|
call PlaceGameFreakPresents_NextScene
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.presents
|
.presents
|
||||||
@ -188,7 +179,7 @@ PlaceGameFreakPresents_2:
|
|||||||
.end
|
.end
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
PlaceGameFreakPresents_3:
|
GameFreakPresentsScene3:
|
||||||
ld hl, wIntroSceneTimer
|
ld hl, wIntroSceneTimer
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $80
|
cp $80
|
||||||
@ -201,12 +192,12 @@ PlaceGameFreakPresents_3:
|
|||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GameFreakLogoJumper:
|
PlaceGameFreakLogo:
|
||||||
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, GameFreakLogoScenes
|
ld hl, .scenes
|
||||||
add hl, de
|
add hl, de
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -214,7 +205,7 @@ GameFreakLogoJumper:
|
|||||||
ld l, a
|
ld l, a
|
||||||
jp hl
|
jp hl
|
||||||
|
|
||||||
GameFreakLogoScenes:
|
.scenes:
|
||||||
dw GameFreakLogoScene1
|
dw GameFreakLogoScene1
|
||||||
dw GameFreakLogoScene2
|
dw GameFreakLogoScene2
|
||||||
dw GameFreakLogoScene3
|
dw GameFreakLogoScene3
|
||||||
@ -325,7 +316,7 @@ GameFreakLogoScene4:
|
|||||||
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
||||||
add hl, bc
|
add hl, bc
|
||||||
inc [hl]
|
inc [hl]
|
||||||
call PlaceGameFreakPresents_AdvanceIndex
|
call PlaceGameFreakPresents_NextScene
|
||||||
GameFreakLogoScene5:
|
GameFreakLogoScene5:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -2450,7 +2450,7 @@ Script_warpfacing:
|
|||||||
set PLAYERSPRITESETUP_CUSTOM_FACING_F, a
|
set PLAYERSPRITESETUP_CUSTOM_FACING_F, a
|
||||||
or c
|
or c
|
||||||
ld [wPlayerSpriteSetupFlags], a
|
ld [wPlayerSpriteSetupFlags], a
|
||||||
; fall through
|
; fallthrough
|
||||||
|
|
||||||
Script_warp:
|
Script_warp:
|
||||||
; script command 0x3c
|
; script command 0x3c
|
||||||
|
@ -244,7 +244,7 @@ _CheckLuckyNumberShowFlag:
|
|||||||
|
|
||||||
DoMysteryGiftIfDayHasPassed:
|
DoMysteryGiftIfDayHasPassed:
|
||||||
ld a, BANK(sMysteryGiftTimer)
|
ld a, BANK(sMysteryGiftTimer)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sMysteryGiftTimer
|
ld hl, sMysteryGiftTimer
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wBuffer1], a
|
ld [wBuffer1], a
|
||||||
@ -262,7 +262,7 @@ DoMysteryGiftIfDayHasPassed:
|
|||||||
|
|
||||||
.not_timed_out
|
.not_timed_out
|
||||||
ld a, BANK(sMysteryGiftTimer)
|
ld a, BANK(sMysteryGiftTimer)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wBuffer1
|
ld hl, wBuffer1
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [sMysteryGiftTimer], a
|
ld [sMysteryGiftTimer], a
|
||||||
|
@ -126,7 +126,7 @@ _GetVarAction::
|
|||||||
.BoxFreeSpace:
|
.BoxFreeSpace:
|
||||||
; Remaining slots in the current box.
|
; Remaining slots in the current box.
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
ld a, MONS_PER_BOX
|
ld a, MONS_PER_BOX
|
||||||
sub [hl]
|
sub [hl]
|
||||||
|
@ -2362,7 +2362,7 @@ Pokedex_LoadSelectedMonTiles:
|
|||||||
|
|
||||||
.QuestionMark:
|
.QuestionMark:
|
||||||
ld a, BANK(sScratch)
|
ld a, BANK(sScratch)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
farcall LoadQuestionMarkPic
|
farcall LoadQuestionMarkPic
|
||||||
ld hl, vTiles2
|
ld hl, vTiles2
|
||||||
ld de, sScratch
|
ld de, sScratch
|
||||||
@ -2478,7 +2478,7 @@ Pokedex_CheckSGB:
|
|||||||
|
|
||||||
Pokedex_LoadUnownFont:
|
Pokedex_LoadUnownFont:
|
||||||
ld a, BANK(sScratch)
|
ld a, BANK(sScratch)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, UnownFont
|
ld hl, UnownFont
|
||||||
ld de, sScratch + $188
|
ld de, sScratch + $188
|
||||||
ld bc, 39 tiles
|
ld bc, 39 tiles
|
||||||
|
@ -1127,7 +1127,7 @@ BillsPC_LoadMonStats:
|
|||||||
ld b, a
|
ld b, a
|
||||||
call GetBoxPointer
|
call GetBoxPointer
|
||||||
ld a, b
|
ld a, b
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
push hl
|
push hl
|
||||||
ld bc, sBoxMon1Level - sBox
|
ld bc, sBoxMon1Level - sBox
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -1187,7 +1187,7 @@ BillsPC_LoadMonStats:
|
|||||||
|
|
||||||
.sBox
|
.sBox
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxMon1Level
|
ld hl, sBoxMon1Level
|
||||||
ld bc, BOXMON_STRUCT_LENGTH
|
ld bc, BOXMON_STRUCT_LENGTH
|
||||||
ld a, e
|
ld a, e
|
||||||
@ -1282,7 +1282,7 @@ BillsPC_RefreshTextboxes:
|
|||||||
push hl
|
push hl
|
||||||
call GetBoxPointer
|
call GetBoxPointer
|
||||||
ld a, b
|
ld a, b
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
push hl
|
push hl
|
||||||
ld bc, sBoxMons - sBox
|
ld bc, sBoxMons - sBox
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -1339,7 +1339,7 @@ BillsPC_RefreshTextboxes:
|
|||||||
.sBox
|
.sBox
|
||||||
push hl
|
push hl
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxSpecies
|
ld hl, sBoxSpecies
|
||||||
ld d, $0
|
ld d, $0
|
||||||
add hl, de
|
add hl, de
|
||||||
@ -1421,7 +1421,7 @@ CopyBoxmonSpecies:
|
|||||||
ld b, a
|
ld b, a
|
||||||
call GetBoxPointer
|
call GetBoxPointer
|
||||||
ld a, b
|
ld a, b
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
inc hl
|
inc hl
|
||||||
copy_box_data 1
|
copy_box_data 1
|
||||||
ret
|
ret
|
||||||
@ -1433,7 +1433,7 @@ CopyBoxmonSpecies:
|
|||||||
|
|
||||||
.sBox
|
.sBox
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxSpecies
|
ld hl, sBoxSpecies
|
||||||
copy_box_data 1
|
copy_box_data 1
|
||||||
ret
|
ret
|
||||||
@ -1652,7 +1652,7 @@ BillsPC_IsMonAnEgg:
|
|||||||
BillsPC_StatsScreen:
|
BillsPC_StatsScreen:
|
||||||
call LowVolume
|
call LowVolume
|
||||||
call BillsPC_CopyMon
|
call BillsPC_CopyMon
|
||||||
ld a, $3
|
ld a, TEMPMON
|
||||||
ld [wMonType], a
|
ld [wMonType], a
|
||||||
predef StatsScreenInit
|
predef StatsScreenInit
|
||||||
call BillsPC_InitGFX
|
call BillsPC_InitGFX
|
||||||
@ -1704,7 +1704,7 @@ BillsPC_CopyMon:
|
|||||||
cp NUM_BOXES + 1
|
cp NUM_BOXES + 1
|
||||||
jr nz, .box
|
jr nz, .box
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxSpecies
|
ld hl, sBoxSpecies
|
||||||
call CopySpeciesToTemp
|
call CopySpeciesToTemp
|
||||||
ld hl, sBoxMonNicknames
|
ld hl, sBoxMonNicknames
|
||||||
@ -1742,7 +1742,7 @@ BillsPC_CopyMon:
|
|||||||
ld b, a
|
ld b, a
|
||||||
call GetBoxPointer
|
call GetBoxPointer
|
||||||
ld a, b
|
ld a, b
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
push hl
|
push hl
|
||||||
inc hl
|
inc hl
|
||||||
call CopySpeciesToTemp
|
call CopySpeciesToTemp
|
||||||
@ -1823,7 +1823,7 @@ TryWithdrawPokemon:
|
|||||||
add [hl]
|
add [hl]
|
||||||
ld [wCurPartyMon], a
|
ld [wCurPartyMon], a
|
||||||
ld a, BANK(sBoxMonNicknames)
|
ld a, BANK(sBoxMonNicknames)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wCurPartyMon]
|
ld a, [wCurPartyMon]
|
||||||
ld hl, sBoxMonNicknames
|
ld hl, sBoxMonNicknames
|
||||||
call GetNick
|
call GetNick
|
||||||
@ -2046,7 +2046,7 @@ MovePKMNWitoutMail_InsertMon:
|
|||||||
add [hl]
|
add [hl]
|
||||||
ld [wCurPartyMon], a
|
ld [wCurPartyMon], a
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxSpecies
|
ld hl, sBoxSpecies
|
||||||
call CopySpeciesToTemp
|
call CopySpeciesToTemp
|
||||||
ld hl, sBoxMonNicknames
|
ld hl, sBoxMonNicknames
|
||||||
@ -2348,7 +2348,7 @@ GetBoxCount:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
@ -2368,7 +2368,7 @@ GetBoxCount:
|
|||||||
.activebox
|
.activebox
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
ld b, a
|
ld b, a
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
@ -209,11 +209,11 @@ BillsPC_WithdrawMenu:
|
|||||||
Unreferenced_Functione56d:
|
Unreferenced_Functione56d:
|
||||||
ld a, [wPartyCount]
|
ld a, [wPartyCount]
|
||||||
cp PARTY_LENGTH
|
cp PARTY_LENGTH
|
||||||
jr nc, .asm_e576
|
jr nc, .party_full
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_e576
|
.party_full
|
||||||
ld hl, PCCantTakeText
|
ld hl, PCCantTakeText
|
||||||
call MenuTextboxBackup
|
call MenuTextboxBackup
|
||||||
scf
|
scf
|
||||||
@ -256,7 +256,7 @@ CopyBoxmonToTempMon:
|
|||||||
ld de, wTempMonSpecies
|
ld de, wTempMonSpecies
|
||||||
ld bc, BOXMON_STRUCT_LENGTH
|
ld bc, BOXMON_STRUCT_LENGTH
|
||||||
ld a, BANK(sBoxMon1Species)
|
ld a, BANK(sBoxMon1Species)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
@ -282,7 +282,7 @@ Unreferenced_LoadBoxMonListing:
|
|||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
|
|
||||||
.okay
|
.okay
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld bc, sBoxMons - sBox
|
ld bc, sBoxMons - sBox
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
CheckPartyFullAfterContest:
|
CheckPartyFullAfterContest:
|
||||||
ld a, [wContestMon]
|
ld a, [wContestMonSpecies]
|
||||||
and a
|
and a
|
||||||
jp z, .DidntCatchAnything
|
jp z, .DidntCatchAnything
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
@ -14,7 +14,7 @@ CheckPartyFullAfterContest:
|
|||||||
ld c, a
|
ld c, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [wContestMon]
|
ld a, [wContestMonSpecies]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld a, -1
|
ld a, -1
|
||||||
@ -80,14 +80,14 @@ CheckPartyFullAfterContest:
|
|||||||
or b
|
or b
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
xor a
|
xor a
|
||||||
ld [wContestMon], a
|
ld [wContestMonSpecies], a
|
||||||
and a ; BUGCONTEST_CAUGHT_MON
|
and a ; BUGCONTEST_CAUGHT_MON
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.TryAddToBox:
|
.TryAddToBox:
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp MONS_PER_BOX
|
cp MONS_PER_BOX
|
||||||
@ -118,7 +118,7 @@ CheckPartyFullAfterContest:
|
|||||||
|
|
||||||
.Box_SkipNickname:
|
.Box_SkipNickname:
|
||||||
ld a, BANK(sBoxMonNicknames)
|
ld a, BANK(sBoxMonNicknames)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, sBoxMonNicknames
|
ld de, sBoxMonNicknames
|
||||||
ld bc, MON_NAME_LENGTH
|
ld bc, MON_NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -126,13 +126,13 @@ CheckPartyFullAfterContest:
|
|||||||
|
|
||||||
.BoxFull:
|
.BoxFull:
|
||||||
ld a, BANK(sBoxMon1Level)
|
ld a, BANK(sBoxMon1Level)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBoxMon1Level]
|
ld a, [sBoxMon1Level]
|
||||||
ld [wCurPartyLevel], a
|
ld [wCurPartyLevel], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
call SetBoxMonCaughtData
|
call SetBoxMonCaughtData
|
||||||
ld a, BANK(sBoxMon1CaughtLocation)
|
ld a, BANK(sBoxMon1CaughtLocation)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxMon1CaughtLocation
|
ld hl, sBoxMon1CaughtLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and CAUGHT_GENDER_MASK
|
and CAUGHT_GENDER_MASK
|
||||||
@ -200,7 +200,7 @@ SetBoxmonOrEggmonCaughtData:
|
|||||||
|
|
||||||
SetBoxMonCaughtData:
|
SetBoxMonCaughtData:
|
||||||
ld a, BANK(sBoxMon1CaughtLevel)
|
ld a, BANK(sBoxMon1CaughtLevel)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxMon1CaughtLevel
|
ld hl, sBoxMon1CaughtLevel
|
||||||
call SetBoxmonOrEggmonCaughtData
|
call SetBoxmonOrEggmonCaughtData
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -209,7 +209,7 @@ SetBoxMonCaughtData:
|
|||||||
SetGiftBoxMonCaughtData:
|
SetGiftBoxMonCaughtData:
|
||||||
push bc
|
push bc
|
||||||
ld a, BANK(sBoxMon1CaughtLevel)
|
ld a, BANK(sBoxMon1CaughtLevel)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxMon1CaughtLevel
|
ld hl, sBoxMon1CaughtLevel
|
||||||
pop bc
|
pop bc
|
||||||
call SetGiftMonCaughtData
|
call SetGiftMonCaughtData
|
||||||
|
@ -93,7 +93,7 @@ CalcExpAtLevel:
|
|||||||
ldh a, [hProduct + 3]
|
ldh a, [hProduct + 3]
|
||||||
sub b
|
sub b
|
||||||
ldh [hMultiplicand + 2], a
|
ldh [hMultiplicand + 2], a
|
||||||
ld b, $0
|
ld b, 0
|
||||||
ldh a, [hProduct + 2]
|
ldh a, [hProduct + 2]
|
||||||
sbc b
|
sbc b
|
||||||
ldh [hMultiplicand + 1], a
|
ldh [hMultiplicand + 1], a
|
||||||
|
@ -18,7 +18,7 @@ SendMailToPC:
|
|||||||
call AddNTimes
|
call AddNTimes
|
||||||
push hl
|
push hl
|
||||||
ld a, BANK(sMailboxCount)
|
ld a, BANK(sMailboxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld bc, MAIL_STRUCT_LENGTH
|
ld bc, MAIL_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop hl
|
pop hl
|
||||||
@ -41,7 +41,7 @@ SendMailToPC:
|
|||||||
DeleteMailFromPC:
|
DeleteMailFromPC:
|
||||||
; Shift all mail messages in the mailbox
|
; Shift all mail messages in the mailbox
|
||||||
ld a, BANK(sMailboxCount)
|
ld a, BANK(sMailboxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, b
|
ld a, b
|
||||||
push bc
|
push bc
|
||||||
ld hl, sMailbox
|
ld hl, sMailbox
|
||||||
@ -83,7 +83,7 @@ ReadMailMessage:
|
|||||||
|
|
||||||
MoveMailFromPCToParty:
|
MoveMailFromPCToParty:
|
||||||
ld a, BANK(sMailboxCount)
|
ld a, BANK(sMailboxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
push bc
|
push bc
|
||||||
ld a, b
|
ld a, b
|
||||||
ld bc, MAIL_STRUCT_LENGTH
|
ld bc, MAIL_STRUCT_LENGTH
|
||||||
@ -115,7 +115,7 @@ MoveMailFromPCToParty:
|
|||||||
|
|
||||||
GetMailboxCount:
|
GetMailboxCount:
|
||||||
ld a, BANK(sMailboxCount)
|
ld a, BANK(sMailboxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sMailboxCount]
|
ld a, [sMailboxCount]
|
||||||
ld c, a
|
ld c, a
|
||||||
jp CloseSRAM
|
jp CloseSRAM
|
||||||
@ -137,7 +137,7 @@ CheckPokeMail::
|
|||||||
jr nc, .pop_return
|
jr nc, .pop_return
|
||||||
|
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wCurPartyMon]
|
ld a, [wCurPartyMon]
|
||||||
ld hl, sPartyMail
|
ld hl, sPartyMail
|
||||||
ld bc, MAIL_STRUCT_LENGTH
|
ld bc, MAIL_STRUCT_LENGTH
|
||||||
@ -209,7 +209,7 @@ GivePokeMail::
|
|||||||
ld hl, wd002
|
ld hl, wd002
|
||||||
ld bc, MAIL_MSG_LENGTH + 1
|
ld bc, MAIL_MSG_LENGTH + 1
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop af
|
pop af
|
||||||
push af
|
push af
|
||||||
@ -238,7 +238,7 @@ GivePokeMail::
|
|||||||
|
|
||||||
BackupPartyMonMail:
|
BackupPartyMonMail:
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sPartyMail
|
ld hl, sPartyMail
|
||||||
ld de, sPartyMailBackup
|
ld de, sPartyMailBackup
|
||||||
ld bc, 6 * MAIL_STRUCT_LENGTH
|
ld bc, 6 * MAIL_STRUCT_LENGTH
|
||||||
@ -251,7 +251,7 @@ BackupPartyMonMail:
|
|||||||
|
|
||||||
RestorePartyMonMail:
|
RestorePartyMonMail:
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sPartyMailBackup
|
ld hl, sPartyMailBackup
|
||||||
ld de, sPartyMail
|
ld de, sPartyMail
|
||||||
ld bc, 6 * MAIL_STRUCT_LENGTH
|
ld bc, 6 * MAIL_STRUCT_LENGTH
|
||||||
@ -264,7 +264,7 @@ RestorePartyMonMail:
|
|||||||
|
|
||||||
DeletePartyMonMail:
|
DeletePartyMonMail:
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld hl, sPartyMail
|
ld hl, sPartyMail
|
||||||
ld bc, 6 * MAIL_STRUCT_LENGTH
|
ld bc, 6 * MAIL_STRUCT_LENGTH
|
||||||
@ -317,7 +317,7 @@ InitMail:
|
|||||||
; initialize wMailboxCount and beyond with incrementing values, one per mail
|
; initialize wMailboxCount and beyond with incrementing values, one per mail
|
||||||
; set z if no mail
|
; set z if no mail
|
||||||
ld a, BANK(sMailboxCount)
|
ld a, BANK(sMailboxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sMailboxCount]
|
ld a, [sMailboxCount]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld hl, wMailboxCount
|
ld hl, wMailboxCount
|
||||||
@ -347,7 +347,7 @@ MailboxPC_GetMailAuthor:
|
|||||||
ld bc, MAIL_STRUCT_LENGTH
|
ld bc, MAIL_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, BANK(sMailboxCount)
|
ld a, BANK(sMailboxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, wStringBuffer2
|
ld de, wStringBuffer2
|
||||||
push de
|
push de
|
||||||
ld bc, NAME_LENGTH - 1
|
ld bc, NAME_LENGTH - 1
|
||||||
@ -467,7 +467,7 @@ MailboxPC:
|
|||||||
.GetMailType:
|
.GetMailType:
|
||||||
push af
|
push af
|
||||||
ld a, BANK(sMailboxCount)
|
ld a, BANK(sMailboxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
pop af
|
pop af
|
||||||
ld hl, sMailbox1Type
|
ld hl, sMailbox1Type
|
||||||
ld bc, MAIL_STRUCT_LENGTH
|
ld bc, MAIL_STRUCT_LENGTH
|
||||||
|
@ -15,7 +15,7 @@ ReadAnyMail:
|
|||||||
pop de
|
pop de
|
||||||
push de
|
push de
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
farcall IsMailEuropean
|
farcall IsMailEuropean
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, c
|
ld a, c
|
||||||
@ -69,7 +69,7 @@ ReadAnyMail:
|
|||||||
ld l, e
|
ld l, e
|
||||||
push hl
|
push hl
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, sPartyMon1MailAuthorID - sPartyMon1Mail
|
ld de, sPartyMon1MailAuthorID - sPartyMon1Mail
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -680,7 +680,7 @@ MailGFX_PlaceMessage:
|
|||||||
ld bc, MAIL_STRUCT_LENGTH
|
ld bc, MAIL_STRUCT_LENGTH
|
||||||
ld de, wTempMail
|
ld de, wTempMail
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld hl, wTempMailAuthor
|
ld hl, wTempMailAuthor
|
||||||
|
@ -466,7 +466,7 @@ ComposeMailMessage:
|
|||||||
ld hl, wTempMail
|
ld hl, wTempMail
|
||||||
ld bc, MAIL_STRUCT_LENGTH
|
ld bc, MAIL_STRUCT_LENGTH
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
@ -174,7 +174,7 @@ GetGender:
|
|||||||
ld a, [wMonType]
|
ld a, [wMonType]
|
||||||
cp BOXMON
|
cp BOXMON
|
||||||
ld a, BANK(sBox)
|
ld a, BANK(sBox)
|
||||||
call z, GetSRAMBank
|
call z, OpenSRAM
|
||||||
|
|
||||||
; Attack DV
|
; Attack DV
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
|
@ -485,7 +485,7 @@ SendGetMonIntoFromBox:
|
|||||||
; wPokemonWithdrawDepositParameter == 3: put mon into DayCare
|
; wPokemonWithdrawDepositParameter == 3: put mon into DayCare
|
||||||
|
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wPokemonWithdrawDepositParameter]
|
ld a, [wPokemonWithdrawDepositParameter]
|
||||||
and a
|
and a
|
||||||
jr z, .check_IfPartyIsFull
|
jr z, .check_IfPartyIsFull
|
||||||
@ -942,7 +942,7 @@ SendMonIntoBox:
|
|||||||
; Sends the mon into one of Bills Boxes
|
; Sends the mon into one of Bills Boxes
|
||||||
; the data comes mainly from 'wEnemyMon:'
|
; the data comes mainly from 'wEnemyMon:'
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, sBoxCount
|
ld de, sBoxCount
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
cp MONS_PER_BOX
|
cp MONS_PER_BOX
|
||||||
@ -1226,7 +1226,7 @@ RemoveMonFromPartyOrBox:
|
|||||||
jr z, .okay
|
jr z, .okay
|
||||||
|
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
|
|
||||||
.okay
|
.okay
|
||||||
@ -1336,7 +1336,7 @@ RemoveMonFromPartyOrBox:
|
|||||||
ret nz
|
ret nz
|
||||||
; Shift mail
|
; Shift mail
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
; If this is the last mon in our party, no need to shift mail.
|
; If this is the last mon in our party, no need to shift mail.
|
||||||
ld hl, wPartyCount
|
ld hl, wPartyCount
|
||||||
ld a, [wCurPartyMon]
|
ld a, [wCurPartyMon]
|
||||||
@ -1735,7 +1735,7 @@ GivePoke::
|
|||||||
|
|
||||||
.send_to_box
|
.send_to_box
|
||||||
ld a, BANK(sBoxMonOT)
|
ld a, BANK(sBoxMonOT)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, sBoxMonOT
|
ld de, sBoxMonOT
|
||||||
.loop
|
.loop
|
||||||
ld a, [wScriptBank]
|
ld a, [wScriptBank]
|
||||||
@ -1785,7 +1785,7 @@ GivePoke::
|
|||||||
ld hl, WasSentToBillsPCText
|
ld hl, WasSentToBillsPCText
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, BANK(sBoxMonNicknames)
|
ld a, BANK(sBoxMonNicknames)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wMonOrItemNameBuffer
|
ld hl, wMonOrItemNameBuffer
|
||||||
ld de, sBoxMonNicknames
|
ld de, sBoxMonNicknames
|
||||||
ld bc, MON_NAME_LENGTH
|
ld bc, MON_NAME_LENGTH
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
InsertPokemonIntoBox:
|
InsertPokemonIntoBox:
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
call InsertSpeciesIntoBoxOrParty
|
call InsertSpeciesIntoBoxOrParty
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
|
@ -75,7 +75,7 @@ CheckOwnMonAnywhere:
|
|||||||
|
|
||||||
; Run CheckOwnMon on each Pokémon in the PC.
|
; Run CheckOwnMon on each Pokémon in the PC.
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
and a
|
and a
|
||||||
jr z, .boxes
|
jr z, .boxes
|
||||||
@ -119,7 +119,7 @@ CheckOwnMonAnywhere:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
|
@ -224,7 +224,7 @@ StatsScreenWaitCry:
|
|||||||
StatsScreen_CopyToTempMon:
|
StatsScreen_CopyToTempMon:
|
||||||
ld a, [wMonType]
|
ld a, [wMonType]
|
||||||
cp TEMPMON
|
cp TEMPMON
|
||||||
jr nz, .breedmon
|
jr nz, .not_tempmon
|
||||||
ld a, [wBufferMonSpecies]
|
ld a, [wBufferMonSpecies]
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
call GetBaseData
|
call GetBaseData
|
||||||
@ -234,7 +234,7 @@ StatsScreen_CopyToTempMon:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.breedmon
|
.not_tempmon
|
||||||
farcall CopyMonToTempMon
|
farcall CopyMonToTempMon
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
cp EGG
|
cp EGG
|
||||||
@ -251,7 +251,7 @@ StatsScreen_GetJoypad:
|
|||||||
call GetJoypad
|
call GetJoypad
|
||||||
ld a, [wMonType]
|
ld a, [wMonType]
|
||||||
cp TEMPMON
|
cp TEMPMON
|
||||||
jr nz, .notbreedmon
|
jr nz, .not_tempmon
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
@ -263,11 +263,11 @@ StatsScreen_GetJoypad:
|
|||||||
and D_DOWN | D_UP
|
and D_DOWN | D_UP
|
||||||
jr nz, .set_carry
|
jr nz, .set_carry
|
||||||
ld a, [wMenuJoypad]
|
ld a, [wMenuJoypad]
|
||||||
jr .clear_flags
|
jr .clear_carry
|
||||||
|
|
||||||
.notbreedmon
|
.not_tempmon
|
||||||
ldh a, [hJoyPressed]
|
ldh a, [hJoyPressed]
|
||||||
.clear_flags
|
.clear_carry
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -532,11 +532,11 @@ StatsScreen_LoadGFX:
|
|||||||
|
|
||||||
.Jumptable:
|
.Jumptable:
|
||||||
; entries correspond to *_PAGE constants
|
; entries correspond to *_PAGE constants
|
||||||
dw .PinkPage
|
dw LoadPinkPage
|
||||||
dw .GreenPage
|
dw LoadGreenPage
|
||||||
dw .BluePage
|
dw LoadBluePage
|
||||||
|
|
||||||
.PinkPage:
|
LoadPinkPage:
|
||||||
hlcoord 0, 9
|
hlcoord 0, 9
|
||||||
ld b, $0
|
ld b, $0
|
||||||
predef DrawPlayerHP
|
predef DrawPlayerHP
|
||||||
@ -678,7 +678,7 @@ StatsScreen_LoadGFX:
|
|||||||
.PkrsStr:
|
.PkrsStr:
|
||||||
db "#RUS@"
|
db "#RUS@"
|
||||||
|
|
||||||
.GreenPage:
|
LoadGreenPage:
|
||||||
ld de, .Item
|
ld de, .Item
|
||||||
hlcoord 0, 8
|
hlcoord 0, 8
|
||||||
call PlaceString
|
call PlaceString
|
||||||
@ -723,17 +723,17 @@ StatsScreen_LoadGFX:
|
|||||||
.Move:
|
.Move:
|
||||||
db "MOVE@"
|
db "MOVE@"
|
||||||
|
|
||||||
.BluePage:
|
LoadBluePage:
|
||||||
call .PlaceOTInfo
|
call .PlaceOTInfo
|
||||||
hlcoord 10, 8
|
hlcoord 10, 8
|
||||||
ld de, SCREEN_WIDTH
|
ld de, SCREEN_WIDTH
|
||||||
ld b, 10
|
ld b, 10
|
||||||
ld a, $31 ; vertical divider
|
ld a, $31 ; vertical divider
|
||||||
.BluePageVerticalDivider:
|
.vertical_divider
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
add hl, de
|
add hl, de
|
||||||
dec b
|
dec b
|
||||||
jr nz, .BluePageVerticalDivider
|
jr nz, .vertical_divider
|
||||||
hlcoord 11, 8
|
hlcoord 11, 8
|
||||||
ld bc, 6
|
ld bc, 6
|
||||||
predef PrintTempMonStats
|
predef PrintTempMonStats
|
||||||
@ -890,7 +890,7 @@ StatsScreen_GetAnimationParam:
|
|||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
ld a, BANK(sBoxMons)
|
ld a, BANK(sBoxMons)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call .CheckEggFaintedFrzSlp
|
call .CheckEggFaintedFrzSlp
|
||||||
push af
|
push af
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1095,7 +1095,7 @@ CopyNickname:
|
|||||||
cp BOXMON
|
cp BOXMON
|
||||||
jr nz, .partymon
|
jr nz, .partymon
|
||||||
ld a, BANK(sBoxMonNicknames)
|
ld a, BANK(sBoxMonNicknames)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
push de
|
push de
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop de
|
pop de
|
||||||
|
@ -116,7 +116,7 @@ _SwitchPartyMons:
|
|||||||
ld de, wd002
|
ld de, wd002
|
||||||
ld bc, MAIL_STRUCT_LENGTH
|
ld bc, MAIL_STRUCT_LENGTH
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld hl, sPartyMail
|
ld hl, sPartyMail
|
||||||
ld a, [wBuffer3]
|
ld a, [wBuffer3]
|
||||||
|
@ -107,7 +107,7 @@ GetMonSpecies:
|
|||||||
|
|
||||||
.boxmon
|
.boxmon
|
||||||
ld a, BANK(sBoxSpecies)
|
ld a, BANK(sBoxSpecies)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sBoxSpecies
|
ld hl, sBoxSpecies
|
||||||
call .done
|
call .done
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
@ -716,7 +716,7 @@ PrintPCBox_Page4:
|
|||||||
|
|
||||||
Printer_PrintBoxListSegment:
|
Printer_PrintBoxListSegment:
|
||||||
ld a, [wBankOfBoxToPrint]
|
ld a, [wBankOfBoxToPrint]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
.loop
|
.loop
|
||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
|
@ -18,7 +18,7 @@ _ResetClock:
|
|||||||
call ClockResetPassword
|
call ClockResetPassword
|
||||||
jr c, .wrongpassword
|
jr c, .wrongpassword
|
||||||
ld a, BANK(sRTCStatusFlags)
|
ld a, BANK(sRTCStatusFlags)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld [sRTCStatusFlags], a
|
ld [sRTCStatusFlags], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -216,7 +216,7 @@ ClockResetPassword:
|
|||||||
|
|
||||||
.CalculatePassword:
|
.CalculatePassword:
|
||||||
ld a, BANK(sPlayerData)
|
ld a, BANK(sPlayerData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, 0
|
ld de, 0
|
||||||
ld hl, sPlayerData + (wPlayerID - wPlayerData)
|
ld hl, sPlayerData + (wPlayerID - wPlayerData)
|
||||||
ld c, 2
|
ld c, 2
|
||||||
|
@ -137,7 +137,7 @@ ClockContinue:
|
|||||||
farcall ClearDailyTimers
|
farcall ClearDailyTimers
|
||||||
farcall Function170923
|
farcall Function170923
|
||||||
ld a, BANK(s5_aa8c) ; aka BANK(s5_b2fa)
|
ld a, BANK(s5_aa8c) ; aka BANK(s5_b2fa)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_aa8c]
|
ld a, [s5_aa8c]
|
||||||
inc a
|
inc a
|
||||||
ld [s5_aa8c], a
|
ld [s5_aa8c], a
|
||||||
|
@ -118,7 +118,7 @@ LoadFontsExtra2:
|
|||||||
DecompressRequest2bpp::
|
DecompressRequest2bpp::
|
||||||
push de
|
push de
|
||||||
ld a, BANK(sScratch)
|
ld a, BANK(sScratch)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
push bc
|
push bc
|
||||||
|
|
||||||
ld de, sScratch
|
ld de, sScratch
|
||||||
|
@ -205,7 +205,7 @@ ClearsScratch::
|
|||||||
; Wipe the first 32 bytes of sScratch
|
; Wipe the first 32 bytes of sScratch
|
||||||
|
|
||||||
ld a, BANK(sScratch)
|
ld a, BANK(sScratch)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sScratch
|
ld hl, sScratch
|
||||||
ld bc, $20
|
ld bc, $20
|
||||||
xor a
|
xor a
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
GetSRAMBank::
|
OpenSRAM::
|
||||||
; load sram bank a
|
|
||||||
; if invalid bank, sram is disabled
|
; if invalid bank, sram is disabled
|
||||||
cp NUM_SRAM_BANKS
|
cp NUM_SRAM_BANKS
|
||||||
jr c, OpenSRAM
|
jr c, .valid
|
||||||
jr CloseSRAM
|
jr CloseSRAM
|
||||||
|
|
||||||
OpenSRAM::
|
.valid:
|
||||||
; switch to sram bank a
|
; switch to sram bank a
|
||||||
push af
|
push af
|
||||||
; latch clock data
|
; latch clock data
|
||||||
|
@ -261,7 +261,7 @@ UnreferencedClearRTCStatus::
|
|||||||
xor a
|
xor a
|
||||||
push af
|
push af
|
||||||
ld a, BANK(sRTCStatusFlags)
|
ld a, BANK(sRTCStatusFlags)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
pop af
|
pop af
|
||||||
ld [sRTCStatusFlags], a
|
ld [sRTCStatusFlags], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -272,7 +272,7 @@ RecordRTCStatus::
|
|||||||
ld hl, sRTCStatusFlags
|
ld hl, sRTCStatusFlags
|
||||||
push af
|
push af
|
||||||
ld a, BANK(sRTCStatusFlags)
|
ld a, BANK(sRTCStatusFlags)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
pop af
|
pop af
|
||||||
or [hl]
|
or [hl]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
@ -282,7 +282,7 @@ RecordRTCStatus::
|
|||||||
CheckRTCStatus::
|
CheckRTCStatus::
|
||||||
; check sRTCStatusFlags
|
; check sRTCStatusFlags
|
||||||
ld a, BANK(sRTCStatusFlags)
|
ld a, BANK(sRTCStatusFlags)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sRTCStatusFlags]
|
ld a, [sRTCStatusFlags]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
@ -340,7 +340,7 @@ Function11c1b9:
|
|||||||
Function11c254:
|
Function11c254:
|
||||||
push af
|
push af
|
||||||
ld a, $4
|
ld a, $4
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, s4_a007
|
ld hl, s4_a007
|
||||||
pop af
|
pop af
|
||||||
sla a
|
sla a
|
||||||
@ -1763,7 +1763,7 @@ Function11cb66:
|
|||||||
and a
|
and a
|
||||||
jr nz, .asm_11cbd4
|
jr nz, .asm_11cbd4
|
||||||
ld a, $4
|
ld a, $4
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, s4_a007
|
ld hl, s4_a007
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
dec a
|
dec a
|
||||||
|
@ -21,7 +21,7 @@ MobileCheckOwnMonAnywhere:
|
|||||||
dec d
|
dec d
|
||||||
jr nz, .asm_4a851
|
jr nz, .asm_4a851
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_4a888
|
jr z, .asm_4a888
|
||||||
@ -57,7 +57,7 @@ MobileCheckOwnMonAnywhere:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
|
@ -15,7 +15,7 @@ String_89153:
|
|||||||
OpenSRAMBank4:
|
OpenSRAMBank4:
|
||||||
push af
|
push af
|
||||||
ld a, $4
|
ld a, $4
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
pop af
|
pop af
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -1092,7 +1092,7 @@ Function1006dc:
|
|||||||
MobileBattleResetTimer:
|
MobileBattleResetTimer:
|
||||||
ld a, BANK(sMobileBattleTimer)
|
ld a, BANK(sMobileBattleTimer)
|
||||||
ld hl, sMobileBattleTimer
|
ld hl, sMobileBattleTimer
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -1103,7 +1103,7 @@ MobileBattleResetTimer:
|
|||||||
MobileBattleFixTimer:
|
MobileBattleFixTimer:
|
||||||
ld a, BANK(sMobileBattleTimer)
|
ld a, BANK(sMobileBattleTimer)
|
||||||
ld hl, sMobileBattleTimer
|
ld hl, sMobileBattleTimer
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a ; MOBILE_BATTLE_ALLOWED_SECONDS
|
xor a ; MOBILE_BATTLE_ALLOWED_SECONDS
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, MOBILE_BATTLE_ALLOWED_MINUTES
|
ld a, MOBILE_BATTLE_ALLOWED_MINUTES
|
||||||
@ -1125,7 +1125,7 @@ Function100720:
|
|||||||
ld [wcd74], a
|
ld [wcd74], a
|
||||||
ld a, BANK(sMobileBattleTimer)
|
ld a, BANK(sMobileBattleTimer)
|
||||||
ld hl, sMobileBattleTimer
|
ld hl, sMobileBattleTimer
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wcd6c], a
|
ld [wcd6c], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -1248,7 +1248,7 @@ Function1007f6:
|
|||||||
ld de, wcd71
|
ld de, wcd71
|
||||||
call Function1006dc
|
call Function1006dc
|
||||||
ld a, $04
|
ld a, $04
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $a802
|
ld hl, $a802
|
||||||
call Function100826
|
call Function100826
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1338,7 +1338,7 @@ MobileBattleGetRemainingTime:
|
|||||||
; Returns minutes in c and seconds in b
|
; Returns minutes in c and seconds in b
|
||||||
ld a, BANK(sMobileBattleTimer)
|
ld a, BANK(sMobileBattleTimer)
|
||||||
ld hl, sMobileBattleTimer
|
ld hl, sMobileBattleTimer
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wStringBuffer2], a
|
ld [wStringBuffer2], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -2374,7 +2374,7 @@ Function100f8d:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.sram
|
.sram
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
@ -2428,7 +2428,7 @@ endr
|
|||||||
inc hl
|
inc hl
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
ld a, $07
|
ld a, $07
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wc608
|
ld hl, wc608
|
||||||
ld de, $a001
|
ld de, $a001
|
||||||
ld bc, wc7bd - wc608
|
ld bc, wc7bd - wc608
|
||||||
@ -2654,7 +2654,7 @@ LoadSelectedPartiesForColosseum:
|
|||||||
|
|
||||||
Function1011f1:
|
Function1011f1:
|
||||||
ld a, BANK(s4_a60c)
|
ld a, BANK(s4_a60c)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s4_a60c]
|
ld a, [s4_a60c]
|
||||||
ld [wdc41], a
|
ld [wdc41], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -4659,7 +4659,7 @@ Function1020bf:
|
|||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld a, $04
|
ld a, $04
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call Function10208e
|
call Function10208e
|
||||||
call Function102068
|
call Function102068
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -4695,7 +4695,7 @@ Function1020ea:
|
|||||||
|
|
||||||
Function102112:
|
Function102112:
|
||||||
ld a, $04
|
ld a, $04
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $a041
|
ld hl, $a041
|
||||||
ld c, 40
|
ld c, 40
|
||||||
.outer_loop
|
.outer_loop
|
||||||
@ -6254,7 +6254,7 @@ Function102c3b:
|
|||||||
Function102c48:
|
Function102c48:
|
||||||
farcall Function10165a
|
farcall Function10165a
|
||||||
ld a, 0
|
ld a, 0
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $a600
|
ld hl, $a600
|
||||||
ld de, wc608
|
ld de, wc608
|
||||||
ld bc, $2f
|
ld bc, $2f
|
||||||
@ -6364,7 +6364,7 @@ Function102d34:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function102d3e:
|
Function102d3e:
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
@ -6909,7 +6909,7 @@ Function103309:
|
|||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld a, BANK(s4_a60c)
|
ld a, BANK(s4_a60c)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wdc41]
|
ld a, [wdc41]
|
||||||
ld [s4_a60c], a
|
ld [s4_a60c], a
|
||||||
ld [wBuffer1], a
|
ld [wBuffer1], a
|
||||||
@ -6961,7 +6961,7 @@ Function103362:
|
|||||||
bit 6, [hl]
|
bit 6, [hl]
|
||||||
jr z, .asm_103398
|
jr z, .asm_103398
|
||||||
ld a, BANK(s4_a60c)
|
ld a, BANK(s4_a60c)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wBuffer1]
|
ld a, [wBuffer1]
|
||||||
ld [s4_a60c], a
|
ld [s4_a60c], a
|
||||||
ld [wdc41], a
|
ld [wdc41], a
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
StubbedTrainerRankings_HallOfFame2::
|
StubbedTrainerRankings_HallOfFame2::
|
||||||
ret
|
ret
|
||||||
ld a, BANK(sTrainerRankingGameTimeHOF)
|
ld a, BANK(sTrainerRankingGameTimeHOF)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
ld hl, wGameTimeHours
|
ld hl, wGameTimeHours
|
||||||
ld de, sTrainerRankingGameTimeHOF
|
ld de, sTrainerRankingGameTimeHOF
|
||||||
@ -36,7 +36,7 @@ StubbedTrainerRankings_HallOfFame2::
|
|||||||
StubbedTrainerRankings_MagikarpLength:
|
StubbedTrainerRankings_MagikarpLength:
|
||||||
ret
|
ret
|
||||||
ld a, BANK(sTrainerRankingLongestMagikarp)
|
ld a, BANK(sTrainerRankingLongestMagikarp)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, wBuffer1
|
ld de, wBuffer1
|
||||||
ld hl, sTrainerRankingLongestMagikarp
|
ld hl, sTrainerRankingLongestMagikarp
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ StubbedTrainerRankings_MagikarpLength:
|
|||||||
StubbedTrainerRankings_BugContestScore:
|
StubbedTrainerRankings_BugContestScore:
|
||||||
ret
|
ret
|
||||||
ld a, BANK(sTrainerRankingBugContestScore)
|
ld a, BANK(sTrainerRankingBugContestScore)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ldh a, [hProduct]
|
ldh a, [hProduct]
|
||||||
ld hl, sTrainerRankingBugContestScore
|
ld hl, sTrainerRankingBugContestScore
|
||||||
cp [hl]
|
cp [hl]
|
||||||
@ -133,7 +133,7 @@ StubbedTrainerRankings_BugContestScore:
|
|||||||
StubbedTrainerRankings_AddToSlotsWinStreak:
|
StubbedTrainerRankings_AddToSlotsWinStreak:
|
||||||
ret
|
ret
|
||||||
ld a, BANK(sTrainerRankingCurrentSlotsStreak)
|
ld a, BANK(sTrainerRankingCurrentSlotsStreak)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
; Increment the current streak
|
; Increment the current streak
|
||||||
ld hl, sTrainerRankingCurrentSlotsStreak + 1
|
ld hl, sTrainerRankingCurrentSlotsStreak + 1
|
||||||
@ -173,7 +173,7 @@ StubbedTrainerRankings_AddToSlotsWinStreak:
|
|||||||
StubbedTrainerRankings_EndSlotsWinStreak:
|
StubbedTrainerRankings_EndSlotsWinStreak:
|
||||||
ret
|
ret
|
||||||
ld a, BANK(sTrainerRankingCurrentSlotsStreak)
|
ld a, BANK(sTrainerRankingCurrentSlotsStreak)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sTrainerRankingCurrentSlotsStreak
|
ld hl, sTrainerRankingCurrentSlotsStreak
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -185,7 +185,7 @@ StubbedTrainerRankings_EndSlotsWinStreak:
|
|||||||
StubbedTrainerRankings_AddToSlotsPayouts:
|
StubbedTrainerRankings_AddToSlotsPayouts:
|
||||||
ret
|
ret
|
||||||
ld a, BANK(sTrainerRankingTotalSlotsPayouts)
|
ld a, BANK(sTrainerRankingTotalSlotsPayouts)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sTrainerRankingTotalSlotsPayouts + 3
|
ld hl, sTrainerRankingTotalSlotsPayouts + 3
|
||||||
ld a, e
|
ld a, e
|
||||||
add [hl]
|
add [hl]
|
||||||
@ -213,7 +213,7 @@ StubbedTrainerRankings_AddToSlotsPayouts:
|
|||||||
StubbedTrainerRankings_AddToBattlePayouts:
|
StubbedTrainerRankings_AddToBattlePayouts:
|
||||||
ret
|
ret
|
||||||
ld a, BANK(sTrainerRankingTotalBattlePayouts)
|
ld a, BANK(sTrainerRankingTotalBattlePayouts)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sTrainerRankingTotalBattlePayouts + 3
|
ld hl, sTrainerRankingTotalBattlePayouts + 3
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
dec bc
|
dec bc
|
||||||
@ -248,7 +248,7 @@ StubbedTrainerRankings_StepCount:
|
|||||||
Unreferenced_StubbedTrainerRankings_BattleTowerWins:
|
Unreferenced_StubbedTrainerRankings_BattleTowerWins:
|
||||||
ret
|
ret
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [$aa8d]
|
ld a, [$aa8d]
|
||||||
and a
|
and a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -439,7 +439,7 @@ StubbedTrainerRankings_Increment1Byte:
|
|||||||
; Increments a big-endian value of bc + 1 bytes at hl
|
; Increments a big-endian value of bc + 1 bytes at hl
|
||||||
StubbedTrainerRankings_Increment:
|
StubbedTrainerRankings_Increment:
|
||||||
ld a, BANK(sTrainerRankings)
|
ld a, BANK(sTrainerRankings)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ld e, c
|
ld e, c
|
||||||
@ -476,7 +476,7 @@ StubbedTrainerRankings_Increment:
|
|||||||
UpdateTrainerRankingsChecksum2:
|
UpdateTrainerRankingsChecksum2:
|
||||||
ret
|
ret
|
||||||
ld a, BANK(sTrainerRankings)
|
ld a, BANK(sTrainerRankings)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call UpdateTrainerRankingsChecksum
|
call UpdateTrainerRankingsChecksum
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
@ -515,11 +515,11 @@ CalculateTrainerRankingsChecksum:
|
|||||||
|
|
||||||
BackupMobileEventIndex:
|
BackupMobileEventIndex:
|
||||||
ld a, BANK(sMobileEventIndex)
|
ld a, BANK(sMobileEventIndex)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sMobileEventIndex]
|
ld a, [sMobileEventIndex]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(sMobileEventIndexBackup)
|
ld a, BANK(sMobileEventIndexBackup)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
pop af
|
pop af
|
||||||
ld [sMobileEventIndexBackup], a
|
ld [sMobileEventIndexBackup], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -527,11 +527,11 @@ BackupMobileEventIndex:
|
|||||||
|
|
||||||
RestoreMobileEventIndex:
|
RestoreMobileEventIndex:
|
||||||
ld a, BANK(sMobileEventIndexBackup)
|
ld a, BANK(sMobileEventIndexBackup)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sMobileEventIndexBackup]
|
ld a, [sMobileEventIndexBackup]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(sMobileEventIndex)
|
ld a, BANK(sMobileEventIndex)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
pop af
|
pop af
|
||||||
ld [sMobileEventIndex], a
|
ld [sMobileEventIndex], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -550,7 +550,7 @@ Unreferenced_VerifyTrainerRankingsChecksum:
|
|||||||
|
|
||||||
DeleteMobileEventIndex:
|
DeleteMobileEventIndex:
|
||||||
ld a, BANK(sMobileEventIndex)
|
ld a, BANK(sMobileEventIndex)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [sMobileEventIndex], a
|
ld [sMobileEventIndex], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -791,13 +791,13 @@ Mobile_DummyReturnFalse:
|
|||||||
Stubbed_Function106314:
|
Stubbed_Function106314:
|
||||||
ret
|
ret
|
||||||
ld a, $4
|
ld a, $4
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, c
|
ld a, c
|
||||||
cpl
|
cpl
|
||||||
ld [$b000], a
|
ld [$b000], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, $7
|
ld a, $7
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [$a800], a
|
ld [$a800], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -811,13 +811,13 @@ Function106331:
|
|||||||
; called by Mobile_DummyReturnFalse in Crystal-J
|
; called by Mobile_DummyReturnFalse in Crystal-J
|
||||||
; check ~[4:b000] == [7:a800]
|
; check ~[4:b000] == [7:a800]
|
||||||
ld a, $4
|
ld a, $4
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [$b000]
|
ld a, [$b000]
|
||||||
cpl
|
cpl
|
||||||
ld b, a
|
ld b, a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, $7
|
ld a, $7
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [$a800]
|
ld a, [$a800]
|
||||||
ld c, a
|
ld c, a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
@ -20,7 +20,7 @@ Function11766b:
|
|||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
call Function1176ee
|
call Function1176ee
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $b1f3
|
ld hl, $b1f3
|
||||||
ld de, wcd49
|
ld de, wcd49
|
||||||
ld bc, $8
|
ld bc, $8
|
||||||
@ -35,7 +35,7 @@ Function11766b:
|
|||||||
|
|
||||||
Function117699:
|
Function117699:
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wcd49
|
ld hl, wcd49
|
||||||
ld de, $b1f3
|
ld de, $b1f3
|
||||||
ld bc, $8
|
ld bc, $8
|
||||||
@ -408,7 +408,7 @@ Function117942:
|
|||||||
ld a, $1e
|
ld a, $1e
|
||||||
ld [wcd4e], a
|
ld [wcd4e], a
|
||||||
ld a, BANK(sMobileLoginPassword)
|
ld a, BANK(sMobileLoginPassword)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wcd4f]
|
ld a, [wcd4f]
|
||||||
ld [sMobileLoginPassword], a
|
ld [sMobileLoginPassword], a
|
||||||
ld hl, $c708
|
ld hl, $c708
|
||||||
@ -729,7 +729,7 @@ Function117bb6:
|
|||||||
ld a, $3
|
ld a, $3
|
||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
ld a, $7
|
ld a, $7
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, w3_d002
|
ld hl, w3_d002
|
||||||
ld de, $b000
|
ld de, $b000
|
||||||
ld bc, $1000
|
ld bc, $1000
|
||||||
@ -773,7 +773,7 @@ Function117c4a:
|
|||||||
|
|
||||||
Function117c89:
|
Function117c89:
|
||||||
ld a, $7
|
ld a, $7
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld l, $0
|
ld l, $0
|
||||||
ld h, l
|
ld h, l
|
||||||
ld de, $b000
|
ld de, $b000
|
||||||
|
@ -184,7 +184,7 @@ Function118180:
|
|||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld a, BANK(s5_a89c) ; aka BANK(s5_a8b2)
|
ld a, BANK(s5_a89c) ; aka BANK(s5_a8b2)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wcd69
|
ld hl, wcd69
|
||||||
ld de, s5_a89c
|
ld de, s5_a89c
|
||||||
ld bc, 22
|
ld bc, 22
|
||||||
@ -478,7 +478,7 @@ BattleTowerRoomMenu_InitRAM:
|
|||||||
farcall Function115d99
|
farcall Function115d99
|
||||||
farcall Function11615a
|
farcall Function11615a
|
||||||
ld a, BANK(s5_bfff)
|
ld a, BANK(s5_bfff)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [s5_bfff], a
|
ld [s5_bfff], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -487,7 +487,7 @@ BattleTowerRoomMenu_InitRAM:
|
|||||||
Function118440:
|
Function118440:
|
||||||
push af
|
push af
|
||||||
ld a, BANK(s5_bfff)
|
ld a, BANK(s5_bfff)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_bfff]
|
ld a, [s5_bfff]
|
||||||
inc a
|
inc a
|
||||||
ld [s5_bfff], a
|
ld [s5_bfff], a
|
||||||
@ -1091,7 +1091,7 @@ Function1188c8:
|
|||||||
Function1188e7:
|
Function1188e7:
|
||||||
ld de, wc346
|
ld de, wc346
|
||||||
ld a, BANK(s5_aa4a)
|
ld a, BANK(s5_aa4a)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_aa4a]
|
ld a, [s5_aa4a]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
and a
|
and a
|
||||||
@ -1521,7 +1521,7 @@ Unreferenced_Function118d35:
|
|||||||
add b
|
add b
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, BANK(s5_b2fb)
|
ld a, BANK(s5_b2fb)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [s5_b2fb], a
|
ld [s5_b2fb], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1942,7 +1942,7 @@ Function119009:
|
|||||||
|
|
||||||
Function119054:
|
Function119054:
|
||||||
ld a, $6
|
ld a, $6
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wd002
|
ld hl, wd002
|
||||||
ld a, [wcd4f]
|
ld a, [wcd4f]
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -1972,7 +1972,7 @@ Function119054:
|
|||||||
ld a, $3 ; ???
|
ld a, $3 ; ???
|
||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
ld a, BANK(s5_b1b3) ; aka BANK(s5_b1b4) and BANK(s5_aa7f) and BANK(s5_b2f3) and BANK(s5_b2f4)
|
ld a, BANK(s5_b1b3) ; aka BANK(s5_b1b4) and BANK(s5_aa7f) and BANK(s5_b2f3) and BANK(s5_b2f4)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wcd4f]
|
ld a, [wcd4f]
|
||||||
ld [s5_b1b3], a
|
ld [s5_b1b3], a
|
||||||
ld a, [wcd50]
|
ld a, [wcd50]
|
||||||
@ -2012,19 +2012,19 @@ Function1190d0:
|
|||||||
|
|
||||||
Function1190ec:
|
Function1190ec:
|
||||||
ld a, BANK(s5_aa73)
|
ld a, BANK(s5_aa73)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wBGMapBuffer
|
ld hl, wBGMapBuffer
|
||||||
ld de, s5_aa73
|
ld de, s5_aa73
|
||||||
ld bc, 12
|
ld bc, 12
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, BANK(s5_aa72)
|
ld a, BANK(s5_aa72)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [s5_aa72], a
|
ld [s5_aa72], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, BANK(s6_a000)
|
ld a, BANK(s6_a000)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [w3_d000]
|
ld a, [w3_d000]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [w3_d000 + 1]
|
ld a, [w3_d000 + 1]
|
||||||
@ -2069,7 +2069,7 @@ Function11915d:
|
|||||||
ld bc, 12
|
ld bc, 12
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, BANK(s5_aa7f)
|
ld a, BANK(s5_aa7f)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wBGMapBuffer
|
ld hl, wBGMapBuffer
|
||||||
ld de, s5_aa7f
|
ld de, s5_aa7f
|
||||||
ld c, 12
|
ld c, 12
|
||||||
@ -2201,7 +2201,7 @@ Function119223:
|
|||||||
ld [wcd4b], a
|
ld [wcd4b], a
|
||||||
ld [wcd4c], a
|
ld [wcd4c], a
|
||||||
ld a, BANK(s5_b092) ; aka BANK(s5_b1b1) and BANK(s5_b1b2) and BANK(s5_b1d3)
|
ld a, BANK(s5_b092) ; aka BANK(s5_b1b1) and BANK(s5_b1b2) and BANK(s5_b1d3)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wc3cd
|
ld hl, wc3cd
|
||||||
ld de, s5_b092
|
ld de, s5_b092
|
||||||
ld bc, 31
|
ld bc, 31
|
||||||
@ -2237,7 +2237,7 @@ Function119223:
|
|||||||
jr z, .asm_1192c2
|
jr z, .asm_1192c2
|
||||||
cp $fe
|
cp $fe
|
||||||
jr z, .asm_1192a5
|
jr z, .asm_1192a5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -2308,7 +2308,7 @@ Function119223:
|
|||||||
|
|
||||||
Function1192cc:
|
Function1192cc:
|
||||||
ld a, BANK(s5_aa73)
|
ld a, BANK(s5_aa73)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, s5_aa73
|
ld hl, s5_aa73
|
||||||
ld de, wc608
|
ld de, wc608
|
||||||
ld bc, 12
|
ld bc, 12
|
||||||
@ -2369,7 +2369,7 @@ Function119300:
|
|||||||
ld [wcd4c], a
|
ld [wcd4c], a
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -2499,7 +2499,7 @@ Function1193fb:
|
|||||||
|
|
||||||
Function119413:
|
Function119413:
|
||||||
ld a, $6 ; ???
|
ld a, $6 ; ???
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [w3_d000]
|
ld a, [w3_d000]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [w3_d000 + 1]
|
ld a, [w3_d000 + 1]
|
||||||
@ -3580,7 +3580,7 @@ Function119b52:
|
|||||||
cp $1
|
cp $1
|
||||||
jr nz, .asm_119b66
|
jr nz, .asm_119b66
|
||||||
ld a, BANK(s5_a800)
|
ld a, BANK(s5_a800)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [s5_a800], a
|
ld [s5_a800], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -3680,7 +3680,7 @@ Function119b6b:
|
|||||||
ld a, $19
|
ld a, $19
|
||||||
ld [wBattleTowerRoomMenuJumptableIndex], a
|
ld [wBattleTowerRoomMenuJumptableIndex], a
|
||||||
ld a, BANK(s5_a800)
|
ld a, BANK(s5_a800)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [s5_a800], a
|
ld [s5_a800], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -3700,7 +3700,7 @@ Function119b6b:
|
|||||||
cp HIGH(w3_d869)
|
cp HIGH(w3_d869)
|
||||||
jr nz, .asm_119be3
|
jr nz, .asm_119be3
|
||||||
ld a, BANK(s5_b090) ; aka BANK(s5_b091) and BANK(s5_b023)
|
ld a, BANK(s5_b090) ; aka BANK(s5_b091) and BANK(s5_b023)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
ld [s5_b090], a
|
ld [s5_b090], a
|
||||||
ld a, [wcf65]
|
ld a, [wcf65]
|
||||||
@ -3750,7 +3750,7 @@ popc
|
|||||||
ld a, $19
|
ld a, $19
|
||||||
ld [wBattleTowerRoomMenuJumptableIndex], a
|
ld [wBattleTowerRoomMenuJumptableIndex], a
|
||||||
ld a, BANK(s5_a800)
|
ld a, BANK(s5_a800)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [s5_a800], a
|
ld [s5_a800], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -4123,7 +4123,7 @@ Function119eb4:
|
|||||||
|
|
||||||
Function119ec2:
|
Function119ec2:
|
||||||
ld a, BANK(sMobileLoginPassword)
|
ld a, BANK(sMobileLoginPassword)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [sMobileLoginPassword + MOBILE_LOGIN_PASSWORD_LENGTH], a
|
ld [sMobileLoginPassword + MOBILE_LOGIN_PASSWORD_LENGTH], a
|
||||||
ld de, sMobileLoginPassword + 1
|
ld de, sMobileLoginPassword + 1
|
||||||
@ -4288,7 +4288,7 @@ Function119f98:
|
|||||||
|
|
||||||
Function11a00e:
|
Function11a00e:
|
||||||
ld a, BANK(sMobileLoginPassword)
|
ld a, BANK(sMobileLoginPassword)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sMobileLoginPassword]
|
ld a, [sMobileLoginPassword]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_11a02a
|
jr z, .asm_11a02a
|
||||||
@ -4297,7 +4297,7 @@ Function11a00e:
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BANK(sMobileLoginPassword)
|
ld a, BANK(sMobileLoginPassword)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [sMobileLoginPassword], a
|
ld [sMobileLoginPassword], a
|
||||||
|
|
||||||
@ -6955,7 +6955,7 @@ Function11b483:
|
|||||||
|
|
||||||
.okay4
|
.okay4
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, MAIL_STRUCT_LENGTH
|
ld a, MAIL_STRUCT_LENGTH
|
||||||
.loop9
|
.loop9
|
||||||
push af
|
push af
|
||||||
@ -7033,7 +7033,7 @@ Function11b570:
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
ld a, BANK(s5_a800)
|
ld a, BANK(s5_a800)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
ld de, s5_a800
|
ld de, s5_a800
|
||||||
ld a, $1
|
ld a, $1
|
||||||
@ -7079,14 +7079,14 @@ Function11b5e7:
|
|||||||
|
|
||||||
Function11b5e8:
|
Function11b5e8:
|
||||||
ld a, $0
|
ld a, $0
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wRTC
|
ld hl, wRTC
|
||||||
ld de, $c608
|
ld de, $c608
|
||||||
ld bc, 4
|
ld bc, 4
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $c608
|
ld hl, $c608
|
||||||
ld de, $b08c
|
ld de, $b08c
|
||||||
ld bc, 4
|
ld bc, 4
|
||||||
@ -7174,7 +7174,7 @@ Function11b6b3:
|
|||||||
|
|
||||||
Function11b6b4:
|
Function11b6b4:
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wcd30]
|
ld a, [wcd30]
|
||||||
ld [$c708], a
|
ld [$c708], a
|
||||||
ld a, [wcd31]
|
ld a, [wcd31]
|
||||||
@ -7347,7 +7347,7 @@ Function11b7e5:
|
|||||||
ld [wLinkMode], a
|
ld [wLinkMode], a
|
||||||
farcall SaveAfterLinkTrade
|
farcall SaveAfterLinkTrade
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [$a800], a
|
ld [$a800], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -7373,7 +7373,7 @@ Function11b879:
|
|||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [$a800]
|
ld a, [$a800]
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ld a, [$a890]
|
ld a, [$a890]
|
||||||
@ -7462,7 +7462,7 @@ Function11b879:
|
|||||||
Function11b920:
|
Function11b920:
|
||||||
call Mobile46_InitJumptable
|
call Mobile46_InitJumptable
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $a81f
|
ld hl, $a81f
|
||||||
ld de, $c626
|
ld de, $c626
|
||||||
ld bc, 8
|
ld bc, 8
|
||||||
@ -7473,7 +7473,7 @@ Function11b920:
|
|||||||
|
|
||||||
Function11b93b:
|
Function11b93b:
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [$a800], a
|
ld [$a800], a
|
||||||
ld hl, $a823
|
ld hl, $a823
|
||||||
@ -7600,7 +7600,7 @@ AddMobileMonToParty:
|
|||||||
and a
|
and a
|
||||||
jr nz, .loop5
|
jr nz, .loop5
|
||||||
ld a, BANK(sPartyMail)
|
ld a, BANK(sPartyMail)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld e, l
|
ld e, l
|
||||||
ld d, h
|
ld d, h
|
||||||
ld a, [wMobileMonMailPointerBuffer]
|
ld a, [wMobileMonMailPointerBuffer]
|
||||||
|
@ -37,7 +37,7 @@ Function170000:
|
|||||||
|
|
||||||
Function17005a:
|
Function17005a:
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [$a824]
|
ld a, [$a824]
|
||||||
ld [wOTTrademonSpecies], a
|
ld [wOTTrademonSpecies], a
|
||||||
ld hl, $a827
|
ld hl, $a827
|
||||||
@ -75,7 +75,7 @@ INCLUDE "engine/events/battle_tower/battle_tower.asm"
|
|||||||
|
|
||||||
Function170be4:
|
Function170be4:
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld hl, $a894
|
ld hl, $a894
|
||||||
ld bc, $0008
|
ld bc, $0008
|
||||||
@ -85,7 +85,7 @@ Function170be4:
|
|||||||
|
|
||||||
Clears5_a89a:
|
Clears5_a89a:
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $a89a
|
ld hl, $a89a
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -95,7 +95,7 @@ Clears5_a89a:
|
|||||||
|
|
||||||
Function170c06:
|
Function170c06:
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $a894
|
ld hl, $a894
|
||||||
ld a, [wBattleResult]
|
ld a, [wBattleResult]
|
||||||
and a ; WIN?
|
and a ; WIN?
|
||||||
@ -589,7 +589,7 @@ Function171bdc:
|
|||||||
|
|
||||||
Function171beb:
|
Function171beb:
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [wcd4a]
|
ld a, [wcd4a]
|
||||||
ld [$aa4a], a
|
ld [$aa4a], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
@ -302,7 +302,7 @@ Function17d0f3:
|
|||||||
ld [wLinkMode], a
|
ld [wLinkMode], a
|
||||||
farcall SaveAfterLinkTrade
|
farcall SaveAfterLinkTrade
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [$a800], a
|
ld [$a800], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -508,7 +508,7 @@ Function17d2c0:
|
|||||||
|
|
||||||
Function17d2ce:
|
Function17d2ce:
|
||||||
ld a, BANK(s5_aa72)
|
ld a, BANK(s5_aa72)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_aa72]
|
ld a, [s5_aa72]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
and a
|
and a
|
||||||
@ -543,13 +543,13 @@ Function17d2ce:
|
|||||||
|
|
||||||
Function17d314:
|
Function17d314:
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [$b1b1]
|
ld a, [$b1b1]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
cp $21
|
cp $21
|
||||||
jr nc, .asm_17d354
|
jr nc, .asm_17d354
|
||||||
ld a, $6
|
ld a, $6
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld l, $0
|
ld l, $0
|
||||||
ld h, l
|
ld h, l
|
||||||
ld de, $a006
|
ld de, $a006
|
||||||
@ -582,7 +582,7 @@ Function17d314:
|
|||||||
.asm_17d354
|
.asm_17d354
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld hl, $aa73
|
ld hl, $aa73
|
||||||
ld bc, $c
|
ld bc, $c
|
||||||
@ -636,7 +636,7 @@ Function17d370:
|
|||||||
ld a, $d0
|
ld a, $d0
|
||||||
ld [wcd21], a
|
ld [wcd21], a
|
||||||
ld a, $6
|
ld a, $6
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $a006
|
ld hl, $a006
|
||||||
ld de, wBGPals1
|
ld de, wBGPals1
|
||||||
ld bc, $1000
|
ld bc, $1000
|
||||||
@ -948,7 +948,7 @@ Function17d5f6:
|
|||||||
|
|
||||||
Function17d60b:
|
Function17d60b:
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $b1d3
|
ld hl, $b1d3
|
||||||
ld de, wc608
|
ld de, wc608
|
||||||
ld bc, $20
|
ld bc, $20
|
||||||
@ -963,7 +963,7 @@ Function17d60b:
|
|||||||
ld h, a
|
ld h, a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, $6
|
ld a, $6
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, wc708
|
ld de, wc708
|
||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
@ -1023,7 +1023,7 @@ Function17d60b:
|
|||||||
.asm_17d684
|
.asm_17d684
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wc708
|
ld hl, wc708
|
||||||
ld de, $b1b3
|
ld de, $b1b3
|
||||||
ld a, [$b1b1]
|
ld a, [$b1b1]
|
||||||
@ -1040,7 +1040,7 @@ Function17d6a1:
|
|||||||
ld c, a
|
ld c, a
|
||||||
ld b, $0
|
ld b, $0
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $b1d3
|
ld hl, $b1d3
|
||||||
add hl, bc
|
add hl, bc
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -1058,7 +1058,7 @@ Function17d6a1:
|
|||||||
ld l, c
|
ld l, c
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, $6
|
ld a, $6
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wcd5e], a
|
ld [wcd5e], a
|
||||||
ld a, h
|
ld a, h
|
||||||
@ -1177,7 +1177,7 @@ Function17d78d:
|
|||||||
ld b, a
|
ld b, a
|
||||||
call HlToCrashCheckPointer
|
call HlToCrashCheckPointer
|
||||||
ld a, $6
|
ld a, $6
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $a006
|
ld hl, $a006
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld de, wBGPals1
|
ld de, wBGPals1
|
||||||
@ -1330,7 +1330,7 @@ Function17d85d:
|
|||||||
|
|
||||||
.asm_17d89b
|
.asm_17d89b
|
||||||
ld a, [wcd4f]
|
ld a, [wcd4f]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
.asm_17d8a1
|
.asm_17d8a1
|
||||||
push hl
|
push hl
|
||||||
@ -1511,7 +1511,7 @@ Function17d9e3:
|
|||||||
|
|
||||||
.asm_17da01
|
.asm_17da01
|
||||||
ld a, [wc70c]
|
ld a, [wc70c]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
.asm_17da07
|
.asm_17da07
|
||||||
ld a, [wc708]
|
ld a, [wc708]
|
||||||
@ -1556,7 +1556,7 @@ Function17da31:
|
|||||||
|
|
||||||
.asm_17da4f
|
.asm_17da4f
|
||||||
ld a, [wc70a]
|
ld a, [wc70a]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
.asm_17da55
|
.asm_17da55
|
||||||
ld a, [wc708]
|
ld a, [wc708]
|
||||||
@ -2021,7 +2021,7 @@ Function17dd49:
|
|||||||
|
|
||||||
.sram
|
.sram
|
||||||
ld a, [wc708]
|
ld a, [wc708]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
.got_bank
|
.got_bank
|
||||||
ld a, [wc709]
|
ld a, [wc709]
|
||||||
@ -2097,7 +2097,7 @@ Function17ddcd:
|
|||||||
|
|
||||||
.asm_17dde7
|
.asm_17dde7
|
||||||
ld a, [wc708]
|
ld a, [wc708]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
.asm_17dded
|
.asm_17dded
|
||||||
ld a, [wc709]
|
ld a, [wc709]
|
||||||
@ -2154,7 +2154,7 @@ Function17de32:
|
|||||||
ld b, $0
|
ld b, $0
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, $6
|
ld a, $6
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call Function17f4f6
|
call Function17f4f6
|
||||||
ld a, [wc708]
|
ld a, [wc708]
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -2208,7 +2208,7 @@ Function17de91:
|
|||||||
ld bc, $7
|
ld bc, $7
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, $6
|
ld a, $6
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
call Function17f4f6
|
call Function17f4f6
|
||||||
ld a, [wc708]
|
ld a, [wc708]
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -2452,7 +2452,7 @@ Function17ded9:
|
|||||||
|
|
||||||
Function17e026:
|
Function17e026:
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
cp $14
|
cp $14
|
||||||
@ -2467,7 +2467,7 @@ Function17e026:
|
|||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
ld a, BANK(sBoxMonNicknames)
|
ld a, BANK(sBoxMonNicknames)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
bit 1, b
|
bit 1, b
|
||||||
jr z, .asm_17e067
|
jr z, .asm_17e067
|
||||||
push bc
|
push bc
|
||||||
@ -2494,7 +2494,7 @@ Function17e026:
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
farcall SetGiftBoxMonCaughtData
|
farcall SetGiftBoxMonCaughtData
|
||||||
ld a, $1
|
ld a, $1
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
jr .asm_17e092
|
jr .asm_17e092
|
||||||
@ -2696,7 +2696,7 @@ Function17e1a1:
|
|||||||
|
|
||||||
.asm_17e1bb
|
.asm_17e1bb
|
||||||
ld a, [wc708]
|
ld a, [wc708]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
.asm_17e1c1
|
.asm_17e1c1
|
||||||
ld a, [wc709]
|
ld a, [wc709]
|
||||||
@ -2728,7 +2728,7 @@ Function17e1a1:
|
|||||||
|
|
||||||
.asm_17e1f3
|
.asm_17e1f3
|
||||||
ld a, [wc70c]
|
ld a, [wc70c]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
.asm_17e1f9
|
.asm_17e1f9
|
||||||
ld a, [wc70d]
|
ld a, [wc70d]
|
||||||
@ -2890,7 +2890,7 @@ Function17e2a7:
|
|||||||
xor a
|
xor a
|
||||||
ld [wcd7a], a
|
ld [wcd7a], a
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $aa73
|
ld hl, $aa73
|
||||||
ld de, $aa7f
|
ld de, $aa7f
|
||||||
ld bc, $c
|
ld bc, $c
|
||||||
@ -2926,7 +2926,7 @@ Function17e309:
|
|||||||
|
|
||||||
Function17e32b:
|
Function17e32b:
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, wc608
|
ld hl, wc608
|
||||||
ld de, $b0b1
|
ld de, $b0b1
|
||||||
ld bc, $40
|
ld bc, $40
|
||||||
@ -2939,7 +2939,7 @@ Function17e32b:
|
|||||||
|
|
||||||
Function17e349:
|
Function17e349:
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, $b0b1
|
ld hl, $b0b1
|
||||||
ld de, wc608
|
ld de, wc608
|
||||||
ld bc, $40
|
ld bc, $40
|
||||||
@ -3541,7 +3541,7 @@ INCLUDE "gfx/mobile/pokemon_news.pal"
|
|||||||
|
|
||||||
RunMobileScript::
|
RunMobileScript::
|
||||||
ld a, $6
|
ld a, $6
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
inc de
|
inc de
|
||||||
.loop
|
.loop
|
||||||
call _RunMobileScript
|
call _RunMobileScript
|
||||||
@ -4082,13 +4082,13 @@ MobileScript_Prefecture:
|
|||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_17f355
|
jr nz, .asm_17f355
|
||||||
ld a, BANK(sCrystalData)
|
ld a, BANK(sCrystalData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [sCrystalData + 2]
|
ld a, [sCrystalData + 2]
|
||||||
jr .asm_17f35d
|
jr .asm_17f35d
|
||||||
|
|
||||||
.asm_17f355
|
.asm_17f355
|
||||||
ld a, BANK(s5_b2f3)
|
ld a, BANK(s5_b2f3)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [s5_b2f3]
|
ld a, [s5_b2f3]
|
||||||
|
|
||||||
.asm_17f35d
|
.asm_17f35d
|
||||||
@ -4125,13 +4125,13 @@ Function17f382:
|
|||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_17f3a3
|
jr nz, .asm_17f3a3
|
||||||
ld a, BANK(sCrystalData)
|
ld a, BANK(sCrystalData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, sCrystalData + 3
|
ld de, sCrystalData + 3
|
||||||
jr .asm_17f3ab
|
jr .asm_17f3ab
|
||||||
|
|
||||||
.asm_17f3a3
|
.asm_17f3a3
|
||||||
ld a, BANK(s5_b2f4)
|
ld a, BANK(s5_b2f4)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld de, s5_b2f4
|
ld de, s5_b2f4
|
||||||
|
|
||||||
.asm_17f3ab
|
.asm_17f3ab
|
||||||
@ -4299,7 +4299,7 @@ Function17f44f:
|
|||||||
|
|
||||||
.asm_17f488
|
.asm_17f488
|
||||||
ld a, [wcd54]
|
ld a, [wcd54]
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
.asm_17f48e
|
.asm_17f48e
|
||||||
ld a, [wcd55]
|
ld a, [wcd55]
|
||||||
@ -4321,7 +4321,7 @@ Function17f44f:
|
|||||||
.asm_17f4af
|
.asm_17f4af
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, $6
|
ld a, $6
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
|
|
||||||
.asm_17f4b7
|
.asm_17f4b7
|
||||||
ld de, wc608
|
ld de, wc608
|
||||||
@ -4491,7 +4491,7 @@ DisplayMobileError:
|
|||||||
|
|
||||||
.asm_17f5a1
|
.asm_17f5a1
|
||||||
ld a, BANK(sMobileLoginPassword)
|
ld a, BANK(sMobileLoginPassword)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [sMobileLoginPassword], a
|
ld [sMobileLoginPassword], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
@ -180,7 +180,7 @@ Function4a0c2:
|
|||||||
ld a, 2
|
ld a, 2
|
||||||
call MenuClickSound
|
call MenuClickSound
|
||||||
ld a, BANK(sPlayerData)
|
ld a, BANK(sPlayerData)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sPlayerData + wPlayerName - wPlayerData
|
ld hl, sPlayerData + wPlayerName - wPlayerData
|
||||||
ld de, wPlayerName
|
ld de, wPlayerName
|
||||||
ld bc, NAME_LENGTH_JAPANESE
|
ld bc, NAME_LENGTH_JAPANESE
|
||||||
@ -378,7 +378,7 @@ Function4a28a:
|
|||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call LoadStandardMenuHeader
|
call LoadStandardMenuHeader
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld a, [$aa4b]
|
ld a, [$aa4b]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
and a
|
and a
|
||||||
@ -429,7 +429,7 @@ Function4a28a:
|
|||||||
cp $2
|
cp $2
|
||||||
jr z, .dont_delete_password
|
jr z, .dont_delete_password
|
||||||
ld a, BANK(sMobileLoginPassword)
|
ld a, BANK(sMobileLoginPassword)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, sMobileLoginPassword
|
ld hl, sMobileLoginPassword
|
||||||
xor a
|
xor a
|
||||||
ld bc, MOBILE_LOGIN_PASSWORD_LENGTH
|
ld bc, MOBILE_LOGIN_PASSWORD_LENGTH
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Unreferenced_Function1f4003:
|
Unreferenced_Function1f4003:
|
||||||
ld a, BANK(s6_a000)
|
ld a, BANK(s6_a000)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, .news_data
|
ld hl, .news_data
|
||||||
ld de, s6_a000
|
ld de, s6_a000
|
||||||
ld bc, $1000
|
ld bc, $1000
|
||||||
@ -17,7 +17,7 @@ INCBIN "mobile/news/news_1.bin"
|
|||||||
|
|
||||||
Unreferenced_Function1f4dbe:
|
Unreferenced_Function1f4dbe:
|
||||||
ld a, BANK(s6_a000)
|
ld a, BANK(s6_a000)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, .news_data
|
ld hl, .news_data
|
||||||
ld de, s6_a000
|
ld de, s6_a000
|
||||||
ld bc, $1000
|
ld bc, $1000
|
||||||
@ -30,7 +30,7 @@ INCBIN "mobile/news/news_2.bin"
|
|||||||
|
|
||||||
Function1f5d9f:
|
Function1f5d9f:
|
||||||
ld a, BANK(s6_a000)
|
ld a, BANK(s6_a000)
|
||||||
call GetSRAMBank
|
call OpenSRAM
|
||||||
ld hl, .news_data
|
ld hl, .news_data
|
||||||
ld de, s6_a000
|
ld de, s6_a000
|
||||||
ld bc, $1000
|
ld bc, $1000
|
||||||
|
Loading…
Reference in New Issue
Block a user