diff options
Diffstat (limited to 'home.asm')
-rw-r--r-- | home.asm | 88 |
1 files changed, 44 insertions, 44 deletions
@@ -173,7 +173,7 @@ LoadDestinationWarpPosition:: ; 1313 (0:1313) DrawHPBar:: ; 1336 (0:1336) ; Draw an HP bar d tiles long, and fill it to e pixels. ; If c is nonzero, show at least a sliver regardless. -; The right end of the bar changes with [wListMenuID]. +; The right end of the bar changes with [wHPBarType]. push hl push de @@ -195,7 +195,7 @@ DrawHPBar:: ; 1336 (0:1336) jr nz, .draw ; Right - ld a,[wListMenuID] + ld a,[wHPBarType] dec a ld a, $6d ; status screen and battle jr z, .ok @@ -239,7 +239,7 @@ DrawHPBar:: ; 1336 (0:1336) ret -; loads pokemon data from one of multiple sources to wcf98 +; loads pokemon data from one of multiple sources to wLoadedMon ; loads base stats to W_MONHDEXNUM ; INPUT: ; [wWhichPokemon] = index of pokemon within party/box @@ -250,7 +250,7 @@ DrawHPBar:: ; 1336 (0:1336) ; 03: daycare ; OUTPUT: ; [wcf91] = pokemon ID -; wcf98 = base address of pokemon data +; wLoadedMon = base address of pokemon data ; W_MONHDEXNUM = base address of base stats LoadMonData:: ; 1372 (0:1372) ld hl, LoadMonData_ @@ -259,8 +259,8 @@ LoadMonData:: ; 1372 (0:1372) Func_137a:: ; 137a (0:137a) -; Write c to [wd0dc + b]. Unused. - ld hl, wd0dc +; Write c to [wMoves + b]. Unused. + ld hl, wMoves ld e, b ld d, 0 add hl, de @@ -515,12 +515,12 @@ PrintStatusConditionNotFainted ; 14f6 ; function to print pokemon level, leaving off the ":L" if the level is at least 100 ; INPUT: ; hl = destination address -; [wcfb9] = level +; [wLoadedMonLevel] = level PrintLevel:: ; 150b (0:150b) ld a,$6e ; ":L" tile ID ld [hli],a ld c,2 ; number of digits - ld a,[wcfb9] ; level + ld a,[wLoadedMonLevel] ; level cp a,100 jr c,PrintLevelCommon ; if level at least 100, write over the ":L" tile @@ -531,12 +531,12 @@ PrintLevel:: ; 150b (0:150b) ; prints the level without leaving off ":L" regardless of level ; INPUT: ; hl = destination address -; [wcfb9] = level +; [wLoadedMonLevel] = level PrintLevelFull:: ; 151b (0:151b) ld a,$6e ; ":L" tile ID ld [hli],a ld c,3 ; number of digits - ld a,[wcfb9] ; level + ld a,[wLoadedMonLevel] ; level PrintLevelCommon:: ; 1523 (0:1523) ld [wd11e],a @@ -546,7 +546,7 @@ PrintLevelCommon:: ; 1523 (0:1523) Func_152e:: ; 152e (0:152e) ; Unused. - ld hl,wd0dc + ld hl,wMoves ld c,a ld b,0 add hl,bc @@ -1183,7 +1183,7 @@ CloseTextDisplay:: ; 29e8 (0:29e8) ld [H_LOADEDROMBANK],a ld [$2000],a call InitMapSprites ; reload sprite tile pattern data (since it was partially overwritten by text tile patterns) - ld hl,wcfc4 + ld hl,wFontLoaded res 0,[hl] ld a,[wd732] bit 3,a ; used fly warp @@ -1325,7 +1325,7 @@ AddAmountSoldToMoney:: ; 2b9e (0:2b9e) ld hl,$ffa1 ; total price of items ld c,3 ; length of money in bytes predef AddBCDPredef ; add total price to money - ld a,$13 + ld a,MONEY_BOX ld [wTextBoxID],a call DisplayTextBoxID ; redraw money text box ld a, (SFX_02_5a - SFX_Headers_02) / 3 @@ -1372,7 +1372,7 @@ AddItemToInventory:: ; 2bcf (0:2bcf) ; INPUT: ; [wListMenuID] = list menu ID -; [wcf8b] = address of the list (2 bytes) +; [wList] = address of the list (2 bytes) DisplayListMenuID:: ; 2be6 (0:2be6) xor a ld [H_AUTOBGTRANSFERENABLED],a ; disable auto-transfer @@ -1392,13 +1392,13 @@ DisplayListMenuID:: ; 2be6 (0:2be6) xor a ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped ld [wd12a],a - ld a,[wcf8b] + ld a,[wList] ld l,a - ld a,[wcf8c] + ld a,[wList + 1] ld h,a ; hl = address of the list ld a,[hl] ld [wd12a],a ; [wd12a] = number of list entries - ld a,$0d ; list menu text box ID + ld a,LIST_MENU_BOX ld [wTextBoxID],a call DisplayTextBoxID ; draw the menu text box call UpdateSprites ; disable sprites behind the text box @@ -1485,9 +1485,9 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) ; if it's an item menu sla c ; item entries are 2 bytes long, so multiply by 2 .skipMultiplying - ld a,[wcf8b] + ld a,[wList] ld l,a - ld a,[wcf8c] + ld a,[wList + 1] ld h,a inc hl ; hl = beginning of list entries ld b,0 @@ -1516,7 +1516,7 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) jr .storeChosenEntry .pokemonList ld hl,wPartyCount - ld a,[wcf8b] + ld a,[wList] cp l ; is it a list of party pokemon or box pokemon? ld hl,wPartyMonNicks jr z,.getPokemonName @@ -1707,9 +1707,9 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) ld b,$09 ld c,$0e call ClearScreenArea - ld a,[wcf8b] + ld a,[wList] ld e,a - ld a,[wcf8c] + ld a,[wList + 1] ld d,a inc de ; de = beginning of list entries ld a,[wListScrollOffset] @@ -1753,7 +1753,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) .pokemonPCMenu push hl ld hl,wPartyCount - ld a,[wcf8b] + ld a,[wList] cp l ; is it a list of party pokemon or box pokemon? ld hl,wPartyMonNicks jr z,.getPokemonName @@ -1798,7 +1798,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) push af push hl ld hl,wPartyCount - ld a,[wcf8b] + ld a,[wList] cp l ; is it a list of party pokemon or box pokemon? ld a,$00 jr z,.next @@ -1819,8 +1819,8 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) and a ; is it a list of party pokemon or box pokemon? jr z,.skipCopyingLevel .copyLevel - ld a,[wcf9b] - ld [wcfb9],a + ld a,[wLoadedMonBoxLevel] + ld [wLoadedMonLevel],a .skipCopyingLevel pop hl ld bc,$001c @@ -1931,7 +1931,7 @@ GetItemName:: ; 2fcf (0:2fcf) ld [wd0b5],a ld a,ITEM_NAME - ld [W_LISTTYPE],a + ld [wNameListType],a ld a,BANK(ItemNames) ld [wPredefBank],a call GetName @@ -2028,7 +2028,7 @@ HMMoves:: ; 3052 (0:3052) GetMoveName:: ; 3058 (0:3058) push hl ld a,MOVE_NAME - ld [W_LISTTYPE],a + ld [wNameListType],a ld a,[wd11e] ld [wd0b5],a ld a,BANK(MoveNames) @@ -2996,7 +2996,7 @@ YesNoChoice:: ; 35ec (0:35ec) jr DisplayYesNoChoice Func_35f4:: ; 35f4 (0:35f4) - ld a, $14 + ld a, TWO_OPTION_MENU ld [wTextBoxID], a call InitYesNoTextBoxParameters jp DisplayTextBoxID @@ -3023,7 +3023,7 @@ Func_361a:: ; 361a (0:361a) hlCoord 12, 7 ld bc, $080d DisplayYesNoChoice:: ; 3628 (0:3628) - ld a, $14 + ld a, TWO_OPTION_MENU ld [wTextBoxID], a call DisplayTextBoxID jp LoadScreenTilesFromBuffer1 @@ -3252,7 +3252,7 @@ NamePointers:: ; 375d (0:375d) GetName:: ; 376b (0:376b) ; arguments: ; [wd0b5] = which name -; [wd0b6] = which list (W_LISTTYPE) +; [wNameListType] = which list ; [wPredefBank] = bank of list ; ; returns pointer to name in de @@ -3269,7 +3269,7 @@ GetName:: ; 376b (0:376b) push hl push bc push de - ld a,[W_LISTTYPE] ;List3759_entrySelector + ld a,[wNameListType] ;List3759_entrySelector dec a jr nz,.otherEntries ;1 = MON_NAMES @@ -3284,7 +3284,7 @@ GetName:: ; 376b (0:376b) ld a,[wPredefBank] ld [H_LOADEDROMBANK],a ld [$2000],a - ld a,[W_LISTTYPE] ;VariousNames' entryID + ld a,[wNameListType] ;VariousNames' entryID dec a add a ld d,0 @@ -3335,11 +3335,11 @@ GetName:: ; 376b (0:376b) ret GetItemPrice:: ; 37df (0:37df) -; Stores item's price as BCD in [H_DOWNARROWBLINKCNT1] and [[H_DOWNARROWBLINKCNT2] +; Stores item's price as BCD at hItemPrice (3 bytes) ; Input: [wcf91] = item id ld a, [H_LOADEDROMBANK] push af - ld a, [wListMenuID] ; wListMenuID + ld a, [wListMenuID] cp MOVESLISTMENU ld a, BANK(ItemPrices) jr nz, .asm_37ed @@ -3347,7 +3347,7 @@ GetItemPrice:: ; 37df (0:37df) .asm_37ed ld [H_LOADEDROMBANK], a ld [$2000], a - ld hl, wcf8f + ld hl, wItemPrices ld a, [hli] ld h, [hl] ld l, a @@ -3361,11 +3361,11 @@ GetItemPrice:: ; 37df (0:37df) jr nz, .asm_3802 dec hl ld a, [hld] - ld [$ff8d], a + ld [hItemPrice + 2], a ld a, [hld] - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hItemPrice + 1], a ld a, [hl] - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld [hItemPrice], a jr .asm_381c .getTMPrice ld a, Bank(GetMachinePrice) @@ -3373,7 +3373,7 @@ GetItemPrice:: ; 37df (0:37df) ld [$2000], a call GetMachinePrice .asm_381c - ld de, H_DOWNARROWBLINKCNT1 ; $ff8b + ld de, hItemPrice pop af ld [H_LOADEDROMBANK], a ld [$2000], a @@ -4046,7 +4046,7 @@ PlaceMenuCursor:: ; 3b7c (0:3b7c) and a ; was the previous menu id 0? jr z,.checkForArrow1 push af - ld a,[$fff6] + ld a,[hFlags_0xFFF6] bit 1,a ; is the menu double spaced? jr z,.doubleSpaced1 ld bc,20 @@ -4072,7 +4072,7 @@ PlaceMenuCursor:: ; 3b7c (0:3b7c) and a jr z,.checkForArrow2 push af - ld a,[$fff6] + ld a,[hFlags_0xFFF6] bit 1,a ; is the menu double spaced? jr z,.doubleSpaced2 ld bc,20 @@ -4193,7 +4193,7 @@ AutoTextBoxDrawingCommon:: ; 3c41 (0:3c41) PrintText:: ; 3c49 (0:3c49) ; Print text hl at (1, 14). push hl - ld a,1 + ld a,MESSAGE_BOX ld [wTextBoxID],a call DisplayTextBoxID call UpdateSprites @@ -4540,7 +4540,7 @@ GetHealthBarColor:: ; Copy the current map's sprites' tile patterns to VRAM again after they have ; been overwritten by other tile patterns. ReloadMapSpriteTilePatterns:: ; 3e08 (0:3e08) - ld hl, wcfc4 + ld hl, wFontLoaded ld a, [hl] push af res 0, [hl] |