diff options
author | dannye <33dannye@gmail.com> | 2020-05-20 19:40:33 -0500 |
---|---|---|
committer | dannye <33dannye@gmail.com> | 2020-05-20 20:02:53 -0500 |
commit | 10f9559eab8c93b94abb8ae8d1083704ad4e169a (patch) | |
tree | 7dbe7b152dde8a6e9b56664b5b8cdfc0d6be1253 /home.asm | |
parent | b8954732a3eaa3a784a6e3eaaa68977a9ccd9816 (diff) |
Sync with pokered
Diffstat (limited to 'home.asm')
-rw-r--r-- | home.asm | 41 |
1 files changed, 18 insertions, 23 deletions
@@ -1,4 +1,3 @@ - ; The rst vectors are unused. SECTION "rst 00", ROM0 rst $38 @@ -22,7 +21,7 @@ SECTION "vblank", ROM0 jp VBlank SECTION "hblank", ROM0 jp LCDC -SECTION "timer", ROM0 +SECTION "timer", ROM0 jp Timer SECTION "serial", ROM0 jp Serial @@ -83,7 +82,6 @@ HideSprites:: INCLUDE "home/copy.asm" - SECTION "Entry", ROM0 nop @@ -98,7 +96,6 @@ SECTION "Header", ROM0 ds $150 - $104 - SECTION "Main", ROM0 PlayPikachuPCM:: @@ -488,7 +485,7 @@ HandlePartyMenuInput:: ld a, [wMenuItemToSwap] and a jp nz, .swappingPokemon - pop af ; double pop af? + pop af ld [hTilesetType], a bit 1, b jr nz, .noPokemonChosen @@ -784,7 +781,7 @@ UncompressMonSprite:: ; define (by index number) the bank that a pokemon's image is in ; index = Mew, bank 1 ; index = Kabutops fossil, bank $B -; index < $1F, bank 9 +; index < $1F, bank 9 ; $1F ≤ index < $4A, bank $A ; $4A ≤ index < $74, bank $B ; $74 ≤ index < $99, bank $C @@ -1330,7 +1327,7 @@ DisplayPlayerBlackedOutText:: ld [wSafariSteps + 1], a EventFlagAddressa EVENT_IN_SAFARI_ZONE ld [wcf0d], a - ld [wSafariZoneEntranceCurScript], a + ld [wSafariZoneGateCurScript], a .didnotblackoutinsafari jp HoldTextDisplayOpen @@ -1386,7 +1383,7 @@ SubtractAmountPaidFromMoney:: ; adds the amount the player sold to their money AddAmountSoldToMoney:: ld de, wPlayerMoney + 2 - ld hl, $ffa1 ; total price of items + ld hl, hMoney + 2 ; total price of items ld c, 3 ; length of money in bytes predef AddBCDPredef ; add total price to money ld a, MONEY_BOX @@ -1931,7 +1928,7 @@ PrintListMenuEntries:: jp nz, .loop ld bc, -8 add hl, bc - ld a, $ee ; down arrow + ld a, "▼" ld [hl], a ret .printCancelMenuItem @@ -2158,7 +2155,7 @@ DisableWaitingAfterTextDisplay:: ; [wcf91] = item ID ; OUTPUT: ; [wActionResultOrTookBattleTurn] = success -; 00: unsucessful +; 00: unsuccessful ; 01: successful ; 02: not able to be used right now, no extra menu displayed (only certain items use this) UseItem:: @@ -2327,7 +2324,7 @@ RunNPCMovementScript:: ld a, [wNPCMovementScriptBank] call BankswitchCommon ld a, [wNPCMovementScriptFunctionNum] - call JumpTable + call CallFunctionInTable pop af call BankswitchCommon ret @@ -2370,7 +2367,7 @@ ExecuteCurMapScriptInTable:: .useProvidedIndex pop hl ld [wCurMapScript], a - call JumpTable + call CallFunctionInTable ld a, [wCurMapScript] ret @@ -2539,7 +2536,7 @@ EndTrainerBattle:: ld b, FLAG_SET call TrainerFlagAction ; flag trainer as fought ld a, [wEnemyMonOrTrainerClass] - cp 200 + cp OPP_ID_OFFSET jr nc, .skipRemoveSprite ; test if trainer was fought (in that case skip removing the corresponding sprite) ld hl, wMissableObjectList ld de, $2 @@ -2573,7 +2570,7 @@ InitBattleEnemyParameters:: ld a, [wEngagedTrainerClass] ld [wCurOpponent], a ld [wEnemyMonOrTrainerClass], a - cp 200 + cp OPP_ID_OFFSET ld a, [wEngagedTrainerSet] jr c, .noTrainer ld [wTrainerNo], a @@ -2674,7 +2671,7 @@ EngageMapTrainer:: ld a, [hli] ; load trainer class ld [wEngagedTrainerClass], a ld a, [hl] ; load trainer mon set - ld [wEnemyMonAttackMod], a + ld [wEngagedTrainerSet], a jp PlayTrainerMusic PrintEndBattleText:: @@ -3403,7 +3400,7 @@ WaitForSoundToFinish:: ret nz push hl .waitLoop - ld hl, wChannelSoundIDs + CH4 + ld hl, wChannelSoundIDs + Ch5 xor a or [hl] inc hl @@ -3565,7 +3562,7 @@ CopyString:: ; this function is used when lower button sensitivity is wanted (e.g. menus) ; OUTPUT: [hJoy5] = pressed buttons in usual format ; there are two flags that control its functionality, [hJoy6] and [hJoy7] -; there are esentially three modes of operation +; there are essentially three modes of operation ; 1. Get newly pressed buttons only ; ([hJoy7] == 0, [hJoy6] == any) ; Just copies [hJoyPressed] to [hJoy5]. @@ -3910,7 +3907,7 @@ CalcStat:: ld a, b add e jr nc, .noCarry2 - inc d ; da = (Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4 + inc d ; de = (Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4 .noCarry2 ld [H_MULTIPLICAND + 2], a ld a, d @@ -4279,7 +4276,7 @@ EraseMenuCursor:: HandleDownArrowBlinkTiming:: ld a, [hl] ld b, a - ld a, $ee ; down arrow + ld a, "▼" cp b jr nz, .downArrowOff .downArrowOn @@ -4313,7 +4310,7 @@ HandleDownArrowBlinkTiming:: ret nz ld a, $06 ld [H_DOWNARROWBLINKCNT2], a - ld a, $ee ; down arrow + ld a, "▼" ld [hl], a ret @@ -4577,7 +4574,7 @@ endm ret -JumpTable:: +CallFunctionInTable:: ; Call function a in jumptable hl. ; de is not preserved. push hl @@ -4900,8 +4897,6 @@ const_value = 1 add_tx_pre PokemonCenterPCText ; 21 add_tx_pre ViridianSchoolNotebook ; 22 add_tx_pre ViridianSchoolBlackboard ; 23 - ; add_tx_pre FakeTextPredef22 - ; add_tx_pre FakeTextPredef23 add_tx_pre JustAMomentText ; 24 add_tx_pre OpenBillsPCText ; 25 add_tx_pre FoundHiddenItemText ; 26 |