diff options
author | YamaArashi <shadow962@live.com> | 2015-07-19 11:56:13 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2015-07-19 11:56:13 -0700 |
commit | 02bd91b7076165653a900a8e39c12a92a9bd2976 (patch) | |
tree | 90590dc9f3b05eb19697ba81ec3467ac533c8f1b /home.asm | |
parent | 64b4cf624fe2175e2c7539b91bc41b6dae28a00e (diff) |
jpab/jpba macros
Diffstat (limited to 'home.asm')
-rw-r--r-- | home.asm | 48 |
1 files changed, 12 insertions, 36 deletions
@@ -253,9 +253,7 @@ DrawHPBar:: ; 1336 (0:1336) ; wLoadedMon = base address of pokemon data ; W_MONHDEXNUM = base address of base stats LoadMonData:: ; 1372 (0:1372) - ld hl, LoadMonData_ - ld b, BANK(LoadMonData_) - jp Bankswitch + jpab LoadMonData_ OverwritewMoves:: ; 137a (0:137a) @@ -1317,9 +1315,7 @@ CountSetBits:: ; 2b7f (0:2b7f) ; subtracts the amount the player paid from their money ; sets carry flag if there is enough money and unsets carry flag if not SubtractAmountPaidFromMoney:: ; 2b96 (0:2b96) - ld b,BANK(SubtractAmountPaidFromMoney_) - ld hl,SubtractAmountPaidFromMoney_ - jp Bankswitch + jpba SubtractAmountPaidFromMoney_ ; adds the amount the player sold to their money AddAmountSoldToMoney:: ; 2b9e (0:2b9e) @@ -2077,9 +2073,7 @@ ReloadTilesetTilePatterns:: ; 3090 (0:3090) ChooseFlyDestination:: ; 30a9 (0:30a9) ld hl,wd72e res 4,[hl] - ld b, BANK(LoadTownMap_Fly) - ld hl, LoadTownMap_Fly - jp Bankswitch + jpba LoadTownMap_Fly ; causes the text box to close without waiting for a button press after displaying text DisableWaitingAfterTextDisplay:: ; 30b6 (0:30b6) @@ -2097,9 +2091,7 @@ DisableWaitingAfterTextDisplay:: ; 30b6 (0:30b6) ; 01: successful ; 02: not able to be used right now, no extra menu displayed (only certain items use this) UseItem:: ; 30bc (0:30bc) - ld b,BANK(UseItem_) - ld hl,UseItem_ - jp Bankswitch + jpba UseItem_ ; confirms the item toss and then tosses the item ; INPUT: @@ -2201,14 +2193,10 @@ RunNPCMovementScript:: ; 310e (0:310e) dw PewterMuseumGuyMovementScriptPointerTable dw PewterGymGuyMovementScriptPointerTable .playerStepOutFromDoor - ld b, BANK(PlayerStepOutFromDoor) - ld hl, PlayerStepOutFromDoor - jp Bankswitch + jpba PlayerStepOutFromDoor EndNPCMovementScript:: ; 314e (0:314e) - ld b, BANK(_EndNPCMovementScript) - ld hl, _EndNPCMovementScript - jp Bankswitch + jpba _EndNPCMovementScript EmptyFunc2:: ; 3156 (0:3156) ret @@ -2434,9 +2422,7 @@ ResetButtonPressedAndMapScript:: ; 32c1 (0:32c1) ; calls TrainerWalkUpToPlayer TrainerWalkUpToPlayer_Bank0:: ; 32cf (0:32cf) - ld b, BANK(TrainerWalkUpToPlayer) - ld hl, TrainerWalkUpToPlayer - jp Bankswitch + jpba TrainerWalkUpToPlayer ; sets opponent type and mon set/lvl based on the engaging trainer data InitBattleEnemyParameters:: ; 32d7 (0:32d7) @@ -2726,9 +2712,7 @@ IsItemInBag:: ; 3493 (0:3493) DisplayPokedex:: ; 349b (0:349b) ld [wd11e], a - ld b, BANK(_DisplayPokedex) - ld hl, _DisplayPokedex - jp Bankswitch + jpba _DisplayPokedex SetSpriteFacingDirectionAndDelay:: ; 34a6 (0:34a6) call SetSpriteFacingDirection @@ -2937,9 +2921,7 @@ GetTrainerInformation:: ; 3566 (0:3566) ret GetTrainerName:: ; 359e (0:359e) - ld b, BANK(GetTrainerName_) - ld hl, GetTrainerName_ - jp Bankswitch + jpba GetTrainerName_ HasEnoughMoney:: @@ -3604,9 +3586,7 @@ CopyDataUntil:: ; 3913 (0:3913) ; [wRemoveMonFromBox] == 0 specifies the party. ; [wRemoveMonFromBox] != 0 specifies the current box. RemovePokemon:: ; 391f (0:391f) - ld hl, _RemovePokemon - ld b, BANK(_RemovePokemon) - jp Bankswitch + jpab _RemovePokemon AddPartyMon:: ; 3927 (0:3927) push hl @@ -4590,9 +4570,7 @@ GivePokemon:: ld [W_CURENEMYLVL], a xor a ; PLAYER_PARTY_DATA ld [wMonDataLocation], a - ld b, BANK(_GivePokemon) - ld hl, _GivePokemon - jp Bankswitch + jpba _GivePokemon Random:: @@ -4613,9 +4591,7 @@ INCLUDE "home/predef.asm" Func_3ead:: ; 3ead (0:3ead) - ld b, BANK(CinnabarGymQuiz_1eb0a) - ld hl, CinnabarGymQuiz_1eb0a - jp Bankswitch + jpba CinnabarGymQuiz_1eb0a CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: ; 3eb5 (0:3eb5) ld a, [H_LOADEDROMBANK] |