Remove all address comments

This commit is contained in:
mid-kid
2018-06-24 16:09:41 +02:00
parent 131875d3e3
commit 1d9a68dbdd
616 changed files with 12133 additions and 20380 deletions

View File

@@ -1,13 +1,12 @@
SelectQuantityToToss: ; 24fbf
SelectQuantityToToss:
ld hl, TossItem_MenuHeader
call LoadMenuHeader
call Toss_Sell_Loop
ret
; 24fc9
SelectQuantityToBuy: ; 24fc9
SelectQuantityToBuy:
farcall GetItemPrice
RooftopSale_SelectQuantityToBuy: ; 24fcf
RooftopSale_SelectQuantityToBuy:
ld a, d
ld [wBuffer1], a
ld a, e
@@ -16,9 +15,8 @@ RooftopSale_SelectQuantityToBuy: ; 24fcf
call LoadMenuHeader
call Toss_Sell_Loop
ret
; 24fe1
SelectQuantityToSell: ; 24fe1
SelectQuantityToSell:
farcall GetItemPrice
ld a, d
ld [wBuffer1], a
@@ -28,9 +26,8 @@ SelectQuantityToSell: ; 24fe1
call LoadMenuHeader
call Toss_Sell_Loop
ret
; 24ff9
Toss_Sell_Loop: ; 24ff9
Toss_Sell_Loop:
ld a, 1
ld [wItemQuantityChangeBuffer], a
.loop
@@ -45,9 +42,8 @@ Toss_Sell_Loop: ; 24ff9
.nope
and a
ret
; 2500e
BuySellToss_InterpretJoypad: ; 2500e
BuySellToss_InterpretJoypad:
call JoyTextDelay_ForcehJoyDown ; get joypad
bit B_BUTTON_F, c
jr nz, .b
@@ -126,9 +122,8 @@ BuySellToss_InterpretJoypad: ; 2500e
ld [wItemQuantityChangeBuffer], a
and a
ret
; 25072
BuySellToss_UpdateQuantityDisplay: ; 25072
BuySellToss_UpdateQuantityDisplay:
call MenuBox
call MenuBoxCoord2Tile
ld de, SCREEN_WIDTH + 1
@@ -145,26 +140,22 @@ BuySellToss_UpdateQuantityDisplay: ; 25072
ld a, [wMenuDataBank]
call FarCall_de
ret
; 25097
ret_25097: ; 25097
ret_25097:
ret
; 25098
DisplayPurchasePrice: ; 25098
DisplayPurchasePrice:
call BuySell_MultiplyPrice
call BuySell_DisplaySubtotal
ret
; 2509f
DisplaySellingPrice: ; 2509f
DisplaySellingPrice:
call BuySell_MultiplyPrice
call Sell_HalvePrice
call BuySell_DisplaySubtotal
ret
; 250a9
BuySell_MultiplyPrice: ; 250a9
BuySell_MultiplyPrice:
xor a
ld [hMultiplicand + 0], a
ld a, [wBuffer1]
@@ -177,9 +168,8 @@ BuySell_MultiplyPrice: ; 250a9
call Multiply
pop hl
ret
; 250c1
Sell_HalvePrice: ; 250c1
Sell_HalvePrice:
push hl
ld hl, hProduct + 1
ld a, [hl]
@@ -193,9 +183,8 @@ Sell_HalvePrice: ; 250c1
ld [hl], a
pop hl
ret
; 250d1
BuySell_DisplaySubtotal: ; 250d1
BuySell_DisplaySubtotal:
push hl
ld hl, hMoneyTemp
ld a, [hProduct + 1]
@@ -211,7 +200,6 @@ BuySell_DisplaySubtotal: ; 250d1
call PrintNum
call WaitBGMap
ret
; 250ed
TossItem_MenuHeader: ; 0x250ed
db MENU_BACKUP_TILES ; flags

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
_ReceiveItem:: ; d1d5
_ReceiveItem::
call DoesHLEqualNumItems
jp nz, PutItemInPocket
push hl
@@ -10,28 +10,28 @@ _ReceiveItem:: ; d1d5
rst JumpTable
ret
.Pockets: ; d1e9
.Pockets:
; entries correspond to item types
dw .Item
dw .KeyItem
dw .Ball
dw .TMHM
.Item: ; d1f1
.Item:
ld h, d
ld l, e
jp PutItemInPocket
.KeyItem: ; d1f6
.KeyItem:
ld h, d
ld l, e
jp ReceiveKeyItem
.Ball: ; d1fb
.Ball:
ld hl, wNumBalls
jp PutItemInPocket
.TMHM: ; d201
.TMHM:
ld h, d
ld l, e
ld a, [wCurItem]
@@ -39,7 +39,7 @@ _ReceiveItem:: ; d1d5
call GetTMHMNumber
jp ReceiveTMHM
_TossItem:: ; d20d
_TossItem::
call DoesHLEqualNumItems
jr nz, .remove
push hl
@@ -58,11 +58,11 @@ _TossItem:: ; d20d
dw .Ball
dw .TMHM
.Ball: ; d228
.Ball:
ld hl, wNumBalls
jp RemoveItemFromPocket
.TMHM: ; d22e
.TMHM:
ld h, d
ld l, e
ld a, [wCurItem]
@@ -70,19 +70,19 @@ _TossItem:: ; d20d
call GetTMHMNumber
jp TossTMHM
.KeyItem: ; d23a
.KeyItem:
ld h, d
ld l, e
jp TossKeyItem
.Item: ; d23f
.Item:
ld h, d
ld l, e
.remove
jp RemoveItemFromPocket
_CheckItem:: ; d244
_CheckItem::
call DoesHLEqualNumItems
jr nz, .nope
push hl
@@ -101,11 +101,11 @@ _CheckItem:: ; d244
dw .Ball
dw .TMHM
.Ball: ; d25f
.Ball:
ld hl, wNumBalls
jp CheckTheItem
.TMHM: ; d265
.TMHM:
ld h, d
ld l, e
ld a, [wCurItem]
@@ -113,19 +113,19 @@ _CheckItem:: ; d244
call GetTMHMNumber
jp CheckTMHM
.KeyItem: ; d271
.KeyItem:
ld h, d
ld l, e
jp CheckKeyItems
.Item: ; d276
.Item:
ld h, d
ld l, e
.nope
jp CheckTheItem
DoesHLEqualNumItems: ; d27b
DoesHLEqualNumItems:
ld a, l
cp LOW(wNumItems)
ret nz
@@ -133,7 +133,7 @@ DoesHLEqualNumItems: ; d27b
cp HIGH(wNumItems)
ret
GetPocketCapacity: ; d283
GetPocketCapacity:
ld c, MAX_ITEMS
ld a, e
cp LOW(wNumItems)
@@ -155,7 +155,7 @@ GetPocketCapacity: ; d283
ld c, MAX_BALLS
ret
PutItemInPocket: ; d29c
PutItemInPocket:
ld d, h
ld e, l
inc hl
@@ -231,7 +231,7 @@ PutItemInPocket: ; d29c
scf
ret
RemoveItemFromPocket: ; d2ff
RemoveItemFromPocket:
ld d, h
ld e, l
ld a, [hli]
@@ -296,7 +296,7 @@ RemoveItemFromPocket: ; d2ff
and a
ret
CheckTheItem: ; d349
CheckTheItem:
ld a, [wCurItem]
ld c, a
.loop
@@ -313,7 +313,7 @@ CheckTheItem: ; d349
and a
ret
ReceiveKeyItem: ; d35a
ReceiveKeyItem:
ld hl, wNumKeyItems
ld a, [hli]
cp MAX_KEY_ITEMS
@@ -333,7 +333,7 @@ ReceiveKeyItem: ; d35a
and a
ret
TossKeyItem: ; d374
TossKeyItem:
ld a, [wCurItemQuantity]
ld e, a
ld d, 0
@@ -363,7 +363,7 @@ TossKeyItem: ; d374
scf
ret
.Toss: ; d396
.Toss:
ld hl, wNumKeyItems
ld a, [wCurItem]
ld c, a
@@ -384,7 +384,7 @@ TossKeyItem: ; d374
scf
ret
CheckKeyItems: ; d3b1
CheckKeyItems:
ld a, [wCurItem]
ld c, a
ld hl, wKeyItems
@@ -401,7 +401,7 @@ CheckKeyItems: ; d3b1
scf
ret
ReceiveTMHM: ; d3c4
ReceiveTMHM:
dec c
ld b, 0
ld hl, wTMsHMs
@@ -418,7 +418,7 @@ ReceiveTMHM: ; d3c4
and a
ret
TossTMHM: ; d3d8
TossTMHM:
dec c
ld b, 0
ld hl, wTMsHMs
@@ -445,7 +445,7 @@ TossTMHM: ; d3d8
and a
ret
CheckTMHM: ; d3fb
CheckTMHM:
dec c
ld b, $0
ld hl, wTMsHMs
@@ -456,7 +456,7 @@ CheckTMHM: ; d3fb
scf
ret
GetTMHMNumber:: ; d407
GetTMHMNumber::
; Return the number of a TM/HM by item id c.
ld a, c
; Skip any dummy items.
@@ -473,7 +473,7 @@ GetTMHMNumber:: ; d407
ld c, a
ret
GetNumberedTMHM: ; d417
GetNumberedTMHM:
; Return the item id of a TM/HM by number c.
ld a, c
; Skip any gaps.
@@ -491,7 +491,7 @@ GetNumberedTMHM: ; d417
ld c, a
ret
_CheckTossableItem:: ; d427
_CheckTossableItem::
; Return 1 in wItemAttributeParamBuffer and carry if wCurItem can't be removed from the bag.
ld a, ITEMATTR_PERMISSIONS
call GetItemAttr
@@ -500,7 +500,7 @@ _CheckTossableItem:: ; d427
and a
ret
CheckSelectableItem: ; d432
CheckSelectableItem:
; Return 1 in wItemAttributeParamBuffer and carry if wCurItem can't be selected.
ld a, ITEMATTR_PERMISSIONS
call GetItemAttr
@@ -509,7 +509,7 @@ CheckSelectableItem: ; d432
and a
ret
CheckItemPocket:: ; d43d
CheckItemPocket::
; Return the pocket for wCurItem in wItemAttributeParamBuffer.
ld a, ITEMATTR_POCKET
call GetItemAttr
@@ -517,7 +517,7 @@ CheckItemPocket:: ; d43d
ld [wItemAttributeParamBuffer], a
ret
CheckItemContext: ; d448
CheckItemContext:
; Return the context for wCurItem in wItemAttributeParamBuffer.
ld a, ITEMATTR_HELP
call GetItemAttr
@@ -525,7 +525,7 @@ CheckItemContext: ; d448
ld [wItemAttributeParamBuffer], a
ret
CheckItemMenu: ; d453
CheckItemMenu:
; Return the menu for wCurItem in wItemAttributeParamBuffer.
ld a, ITEMATTR_HELP
call GetItemAttr
@@ -534,7 +534,7 @@ CheckItemMenu: ; d453
ld [wItemAttributeParamBuffer], a
ret
GetItemAttr: ; d460
GetItemAttr:
; Get attribute a of wCurItem.
push hl
@@ -560,13 +560,13 @@ GetItemAttr: ; d460
pop hl
ret
ItemAttr_ReturnCarry: ; d47f
ItemAttr_ReturnCarry:
ld a, 1
ld [wItemAttributeParamBuffer], a
scf
ret
GetItemPrice: ; d486
GetItemPrice:
; Return the price of wCurItem in de.
push hl
push bc

View File

@@ -6,7 +6,7 @@
const MARTTEXT_HERE_YOU_GO
const MARTTEXT_SOLD_OUT
OpenMartDialog:: ; 15a45
OpenMartDialog::
call GetMart
ld a, c
ld [wEngineBuffer1], a
@@ -15,7 +15,6 @@ OpenMartDialog:: ; 15a45
ld hl, .dialogs
rst JumpTable
ret
; 15a57
.dialogs
dw MartDialog
@@ -23,18 +22,16 @@ OpenMartDialog:: ; 15a45
dw BargainShop
dw Pharmacist
dw RooftopSale
; 15a61
MartDialog: ; 15a61
MartDialog:
ld a, 0
ld [wEngineBuffer1], a
xor a
ld [wEngineBuffer5], a
call StandardMart
ret
; 15a6e
HerbShop: ; 15a6e
HerbShop:
call FarReadMart
call LoadStandardMenuHeader
ld hl, Text_HerbShop_Intro
@@ -43,9 +40,8 @@ HerbShop: ; 15a6e
ld hl, Text_HerbShop_ComeAgain
call MartTextBox
ret
; 15a84
BargainShop: ; 15a84
BargainShop:
ld b, BANK(BargainShopData)
ld de, BargainShopData
call LoadMartPointer
@@ -65,9 +61,8 @@ BargainShop: ; 15a84
ld hl, Text_BargainShop_ComeAgain
call MartTextBox
ret
; 15aae
Pharmacist: ; 15aae
Pharmacist:
call FarReadMart
call LoadStandardMenuHeader
ld hl, Text_Pharmacist_Intro
@@ -76,9 +71,8 @@ Pharmacist: ; 15aae
ld hl, Text_Pharmacist_ComeAgain
call MartTextBox
ret
; 15ac4
RooftopSale: ; 15ac4
RooftopSale:
ld b, BANK(RooftopSaleMart1)
ld de, RooftopSaleMart1
ld hl, wStatusFlags
@@ -97,11 +91,10 @@ RooftopSale: ; 15ac4
ld hl, Text_Mart_ComeAgain
call MartTextBox
ret
; 15aee
INCLUDE "data/items/rooftop_sale.asm"
LoadMartPointer: ; 15b10
LoadMartPointer:
ld a, b
ld [wMartPointerBank], a
ld a, e
@@ -117,9 +110,8 @@ LoadMartPointer: ; 15b10
ld [wBargainShopFlags], a
ld [wFacingDirection], a
ret
; 15b31
GetMart: ; 15b31
GetMart:
ld a, e
cp (Marts.End - Marts) / 2
jr c, .IsAMart
@@ -136,9 +128,8 @@ GetMart: ; 15b31
ld d, [hl]
ld b, BANK(Marts)
ret
; 15b47
StandardMart: ; 15b47
StandardMart:
.loop
ld a, [wEngineBuffer5]
ld hl, .MartFunctions
@@ -155,17 +146,15 @@ StandardMart: ; 15b47
dw .Sell
dw .Quit
dw .AnythingElse
; 15b62
.HowMayIHelpYou: ; 15b62
.HowMayIHelpYou:
call LoadStandardMenuHeader
ld hl, Text_Mart_HowMayIHelpYou
call PrintText
ld a, $1 ; top menu
ret
; 15b6e
.TopMenu: ; 15b6e
.TopMenu:
ld hl, MenuHeader_BuySell
call CopyMenuHeader
call VerticalMenu
@@ -184,41 +173,36 @@ StandardMart: ; 15b47
.sell
ld a, $3 ; sell
ret
; 15b8d
.Buy: ; 15b8d
.Buy:
call ExitMenu
call FarReadMart
call BuyMenu
and a
ld a, $5 ; Anything else?
ret
; 15b9a
.Sell: ; 15b9a
.Sell:
call ExitMenu
call SellMenu
ld a, $5 ; Anything else?
ret
; 15ba3
.Quit: ; 15ba3
.Quit:
call ExitMenu
ld hl, Text_Mart_ComeAgain
call MartTextBox
ld a, $ff ; exit
ret
; 15baf
.AnythingElse: ; 15baf
.AnythingElse:
call LoadStandardMenuHeader
ld hl, Text_Mart_AnythingElse
call PrintText
ld a, $1 ; top menu
ret
; 15bbb
FarReadMart: ; 15bbb
FarReadMart:
ld hl, wMartPointer
ld a, [hli]
ld h, [hl]
@@ -246,16 +230,15 @@ FarReadMart: ; 15bbb
.done
ret
; 15be5
GetMartItemPrice: ; 15be5
GetMartItemPrice:
; Return the price of item a in BCD at hl and in tiles at wStringBuffer1.
push hl
ld [wCurItem], a
farcall GetItemPrice
pop hl
GetMartPrice: ; 15bf0
GetMartPrice:
; Return price de in BCD at hl and in tiles at wStringBuffer1.
push hl
ld a, d
@@ -280,9 +263,8 @@ GetMartPrice: ; 15bf0
dec c
jr nz, .loop
ret
; 15c1a
.CharToNybble: ; 15c1a
.CharToNybble:
ld a, [de]
inc de
cp " "
@@ -292,9 +274,8 @@ GetMartPrice: ; 15bf0
.not_space
sub "0"
ret
; 15c25
ReadMart: ; 15c25
ReadMart:
; Load the mart pointer. Mart data is local (no need for bank).
ld hl, wMartPointer
ld a, [hli]
@@ -337,12 +318,11 @@ ReadMart: ; 15c25
ld a, [hl]
ld [wCurMart], a
ret
; 15c51
INCLUDE "data/items/bargain_shop.asm"
BuyMenu: ; 15c62
BuyMenu:
call FadeToMenu
farcall BlankScreen
xor a
@@ -354,9 +334,8 @@ BuyMenu: ; 15c62
jr nc, .loop
call CloseSubmenu
ret
; 15c7d
LoadBuyMenuText: ; 15c7d
LoadBuyMenuText:
; load text from a nested table
; which table is in wEngineBuffer1
; which entry is in register a
@@ -375,9 +354,8 @@ LoadBuyMenuText: ; 15c7d
ld l, a
call PrintText
ret
; 15c91
MartAskPurchaseQuantity: ; 15c91
MartAskPurchaseQuantity:
call GetMartDialogGroup ; gets a pointer from GetMartDialogGroup.MartTextFunctionPointers
inc hl
inc hl
@@ -387,9 +365,8 @@ MartAskPurchaseQuantity: ; 15c91
cp 1
jp z, BargainShopAskPurchaseQuantity
jp RooftopSaleAskPurchaseQuantity
; 15ca3
GetMartDialogGroup: ; 15ca3
GetMartDialogGroup:
ld a, [wEngineBuffer1]
ld e, a
ld d, 0
@@ -398,17 +375,15 @@ GetMartDialogGroup: ; 15ca3
add hl, de
add hl, de
ret
; 15cb0
.MartTextFunctionPointers: ; 15cb0
.MartTextFunctionPointers:
dwb .StandardMartPointers, 0
dwb .HerbShopPointers, 0
dwb .BargainShopPointers, 1
dwb .PharmacyPointers, 0
dwb .StandardMartPointers, 2
; 15cbf
.StandardMartPointers: ; 15cbf
.StandardMartPointers:
dw Text_Mart_HowMany
dw Text_Mart_CostsThisMuch
dw Text_Mart_InsufficientFunds
@@ -416,7 +391,7 @@ GetMartDialogGroup: ; 15ca3
dw Text_Mart_HereYouGo
dw BuyMenuLoop
.HerbShopPointers: ; 15ccb
.HerbShopPointers:
dw Text_HerbShop_HowMany
dw Text_HerbShop_CostsThisMuch
dw Text_HerbShop_InsufficientFunds
@@ -424,7 +399,7 @@ GetMartDialogGroup: ; 15ca3
dw Text_HerbShop_HereYouGo
dw BuyMenuLoop
.BargainShopPointers: ; 15cd7
.BargainShopPointers:
dw BuyMenuLoop
dw Text_BargainShop_CostsThisMuch
dw Text_BargainShop_InsufficientFunds
@@ -432,17 +407,16 @@ GetMartDialogGroup: ; 15ca3
dw Text_BargainShop_HereYouGo
dw Text_BargainShop_SoldOut
.PharmacyPointers: ; 15ce3
.PharmacyPointers:
dw Text_Pharmacy_HowMany
dw Text_Pharmacy_CostsThisMuch
dw Text_Pharmacy_InsufficientFunds
dw Text_Pharmacy_BagFull
dw Text_Pharmacy_HereYouGo
dw BuyMenuLoop
; 15cef
BuyMenuLoop: ; 15cef
BuyMenuLoop:
farcall PlaceMoneyTopRight
call UpdateSprites
ld hl, MenuHeader_Buy
@@ -512,7 +486,6 @@ BuyMenuLoop: ; 15cef
call JoyWaitAorB
and a
ret
; 15d83
StandardMartAskPurchaseQuantity:
ld a, 99
@@ -522,15 +495,13 @@ StandardMartAskPurchaseQuantity:
farcall SelectQuantityToBuy
call ExitMenu
ret
; 15d97
MartConfirmPurchase: ; 15d97
MartConfirmPurchase:
predef PartyMonItemName
ld a, MARTTEXT_COSTS_THIS_MUCH
call LoadBuyMenuText
call YesNoBox
ret
; 15da5
BargainShopAskPurchaseQuantity:
ld a, 1
@@ -571,7 +542,6 @@ BargainShopAskPurchaseQuantity:
call JoyWaitAorB
scf
ret
; 15de2
RooftopSaleAskPurchaseQuantity:
ld a, MARTTEXT_HOW_MANY
@@ -582,9 +552,8 @@ RooftopSaleAskPurchaseQuantity:
farcall RooftopSale_SelectQuantityToBuy
call ExitMenu
ret
; 15df9
.GetSalePrice: ; 15df9
.GetSalePrice:
ld a, [wMartItemID]
ld e, a
ld d, 0
@@ -601,7 +570,6 @@ RooftopSaleAskPurchaseQuantity:
inc hl
ld d, [hl]
ret
; 15e0e
Text_Mart_HowMany: ; 0x15e0e
@@ -631,9 +599,8 @@ MenuHeader_Buy: ; 0x15e18
dba PlaceMenuItemName
dba .PrintBCDPrices
dba UpdateItemDescription
; 15e30
.PrintBCDPrices: ; 15e30
.PrintBCDPrices:
ld a, [wScrollingMenuCursorPosition]
ld c, a
ld b, 0
@@ -650,7 +617,6 @@ MenuHeader_Buy: ; 0x15e18
ld c, PRINTNUM_LEADINGZEROS | PRINTNUM_MONEY | 3
call PrintBCDNumber
ret
; 15e4a (5:5e4a)
Text_HerbShop_Intro: ; 0x15e4a
; Hello, dear. I sell inexpensive herbal medicine. They're good, but a trifle bitter. Your #MON may not like them. Hehehehe…
@@ -779,7 +745,7 @@ Text_Pharmacist_ComeAgain: ; 0x15eae
; 0x15eb3
SellMenu: ; 15eb3
SellMenu:
call DisableSpriteUpdates
farcall DepositSellInitPackBuffers
.loop
@@ -794,14 +760,12 @@ SellMenu: ; 15eb3
call ReturnToMapWithSpeechTextbox
and a
ret
; 15ed3
.Unreferenced_NothingToSell:
ld hl, .NothingToSellText
call MenuTextBoxBackup
and a
ret
; 15edb
.NothingToSellText: ; 0x15edb
; You don't have anything to sell.
@@ -810,15 +774,14 @@ SellMenu: ; 15eb3
; 0x15ee0
.TryToSellItem: ; 15ee0
.TryToSellItem:
farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .dw
rst JumpTable
ret
; 15eee
.dw ; 15eee
.dw
dw .try_sell
dw .cant_buy
dw .cant_buy
@@ -826,14 +789,12 @@ SellMenu: ; 15eb3
dw .try_sell
dw .try_sell
dw .try_sell
; 15efc
.cant_buy ; 15efc
.cant_buy
ret
; 15efd
.try_sell ; 15efd
.try_sell
farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
@@ -877,7 +838,6 @@ SellMenu: ; 15eb3
call ExitMenu
and a
ret
; 15f73
Text_Mart_SellHowMany: ; 0x15f73
; How many?
@@ -891,7 +851,7 @@ Text_Mart_ICanPayThisMuch: ; 0x15f78
db "@"
; 0x15f7d
.UnusedString15f7d: ; 15f7d
.UnusedString15f7d:
db "!ダミー!@"
Text_Mart_HowMayIHelpYou: ; 0x15f83
@@ -955,16 +915,14 @@ Text_Mart_SoldForAmount: ; 0x15fbe
db "@"
; 0x15fc3
PlayTransactionSound: ; 15fc3
PlayTransactionSound:
call WaitSFX
ld de, SFX_TRANSACTION
call PlaySFX
ret
; 15fcd
MartTextBox: ; 15fcd
MartTextBox:
call MenuTextBox
call JoyWaitAorB
call ExitMenu
ret
; 15fd7

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
DrawKrisPackGFX: ; 48e81
DrawKrisPackGFX:
ld hl, PackFGFXPointers
add hl, de
add hl, de
@@ -10,11 +10,11 @@ DrawKrisPackGFX: ; 48e81
call Request2bpp
ret
PackFGFXPointers: ; 48e93
PackFGFXPointers:
dw PackFGFX + (15 tiles) * 1 ; ITEM_POCKET
dw PackFGFX + (15 tiles) * 3 ; BALL_POCKET
dw PackFGFX + (15 tiles) * 0 ; KEY_ITEM_POCKET
dw PackFGFX + (15 tiles) * 2 ; TM_HM_POCKET
PackFGFX: ; 48e9b
PackFGFX:
INCBIN "gfx/pack/pack_f.2bpp"

View File

@@ -1,4 +1,4 @@
SwitchItemsInBag: ; 2490c (9:490c)
SwitchItemsInBag:
ld a, [wSwitchItem]
and a
jr z, .init
@@ -84,7 +84,7 @@ SwitchItemsInBag: ; 2490c (9:490c)
ld [wSwitchItem], a
ret
Function249a7: ; 249a7 (9:49a7)
Function249a7:
ld a, [wSwitchItem]
call ItemSwitch_GetNthItem
ld d, h
@@ -110,7 +110,7 @@ Function249a7: ; 249a7 (9:49a7)
scf
ret
Function249d1: ; 249d1 (9:49d1)
Function249d1:
ld a, [wSwitchItem]
call ItemSwitch_GetNthItem
inc hl
@@ -180,14 +180,14 @@ Function249d1: ; 249d1 (9:49d1)
ld [wSwitchItem], a
ret
Function24a40: ; 24a40 (9:4a40)
Function24a40:
call ItemSwitch_GetNthItem
ld de, wd002
call ItemSwitch_ConvertSpacingToDW
call CopyBytes
ret
Function24a4d: ; 24a4d (9:4a4d)
Function24a4d:
call ItemSwitch_GetNthItem
ld d, h
ld e, l
@@ -196,7 +196,7 @@ Function24a4d: ; 24a4d (9:4a4d)
call CopyBytes
ret
ItemSwitch_GetNthItem: ; 24a5c (9:4a5c)
ItemSwitch_GetNthItem:
push af
call ItemSwitch_ConvertSpacingToDW
ld hl, wMenuData_ItemsPointerAddr
@@ -208,7 +208,7 @@ ItemSwitch_GetNthItem: ; 24a5c (9:4a5c)
call AddNTimes
ret
Function24a6c: ; 24a6c (9:4a6c)
Function24a6c:
push hl
call ItemSwitch_ConvertSpacingToDW
ld a, d
@@ -224,7 +224,7 @@ Function24a6c: ; 24a6c (9:4a6c)
pop hl
ret
ItemSwitch_ConvertSpacingToDW: ; 24a80 (9:4a80)
ItemSwitch_ConvertSpacingToDW:
; This function is absolutely idiotic.
push hl
ld a, [wMenuData_ScrollingMenuSpacing]
@@ -239,13 +239,11 @@ ItemSwitch_ConvertSpacingToDW: ; 24a80 (9:4a80)
pop hl
ret
; 24a91 (9:4a91)
.spacing_dws ; 24a91
.spacing_dws
dw 0, 1, 2
; 24a97
Function24a97: ; 24a97 (9:4a97)
Function24a97:
push af
call ItemSwitch_ConvertSpacingToDW
ld a, c
@@ -262,7 +260,7 @@ Function24a97: ; 24a97 (9:4a97)
ld a, $1
ret
Function24aab: ; 24aab (9:4aab)
Function24aab:
.loop
ld a, [hld]
ld [de], a

View File

@@ -1,4 +1,4 @@
TMHMPocket: ; 2c76f (b:476f)
TMHMPocket:
ld a, $1
ld [hInMenu], a
call TMHM_PocketLoop
@@ -20,7 +20,7 @@ TMHMPocket: ; 2c76f (b:476f)
scf
ret
.ConvertItemToTMHMNumber: ; 2c798 (b:4798)
.ConvertItemToTMHMNumber:
ld a, [wCurItem]
ld c, a
callfar GetNumberedTMHM
@@ -28,7 +28,7 @@ TMHMPocket: ; 2c76f (b:476f)
ld [wCurItem], a
ret
ConvertCurItemIntoCurTMHM: ; 2c7a7 (b:47a7)
ConvertCurItemIntoCurTMHM:
ld a, [wCurItem]
ld c, a
callfar GetTMHMNumber
@@ -36,12 +36,12 @@ ConvertCurItemIntoCurTMHM: ; 2c7a7 (b:47a7)
ld [wCurTMHM], a
ret
GetTMHMItemMove: ; 2c7b6 (b:47b6)
GetTMHMItemMove:
call ConvertCurItemIntoCurTMHM
predef GetTMHMMove
ret
AskTeachTMHM: ; 2c7bf (b:47bf)
AskTeachTMHM:
ld hl, wOptions
ld a, [hl]
push af
@@ -70,13 +70,13 @@ AskTeachTMHM: ; 2c7bf (b:47bf)
ld [wOptions], a
ret
ChooseMonToLearnTMHM: ; 2c7fb
ChooseMonToLearnTMHM:
ld hl, wStringBuffer2
ld de, wTMHMMoveNameBackup
ld bc, 12
call CopyBytes
call ClearBGPalettes
ChooseMonToLearnTMHM_NoRefresh: ; 2c80a
ChooseMonToLearnTMHM_NoRefresh:
farcall LoadPartyMenuGFX
farcall InitPartyMenuWithCancel
farcall InitPartyMenuGFX
@@ -115,9 +115,8 @@ ChooseMonToLearnTMHM_NoRefresh: ; 2c80a
pop de
pop hl
jr .loopback
; 2c867
TeachTMHM: ; 2c867
TeachTMHM:
predef CanLearnTMHMMove
push bc
@@ -166,7 +165,6 @@ TeachTMHM: ; 2c867
.learned_move
scf
ret
; 2c8bf (b:48bf)
Text_BootedTM: ; 0x2c8bf
; Booted up a TM.
@@ -192,7 +190,7 @@ Text_TMHMNotCompatible: ; 0x2c8ce
db "@"
; 0x2c8d3
TMHM_PocketLoop: ; 2c8d3 (b:48d3)
TMHM_PocketLoop:
xor a
ld [hBGMapMode], a
call TMHM_DisplayPocketItems
@@ -225,7 +223,7 @@ TMHM_PocketLoop: ; 2c8d3 (b:48d3)
ld [wMenuCursorX], a
jr TMHM_ShowTMMoveDescription
TMHM_JoypadLoop: ; 2c915 (b:4915)
TMHM_JoypadLoop:
call TMHM_DisplayPocketItems
call StaticMenuJoypad
ld b, a
@@ -247,7 +245,7 @@ TMHM_JoypadLoop: ; 2c915 (b:4915)
jp nz, TMHM_ExitPocket
bit D_LEFT_F, a
jp nz, TMHM_ExitPocket
TMHM_ShowTMMoveDescription: ; 2c946 (b:4946)
TMHM_ShowTMMoveDescription:
call TMHM_CheckHoveringOverCancel
jp nc, TMHM_ExitPocket
hlcoord 0, 12
@@ -265,7 +263,7 @@ TMHM_ShowTMMoveDescription: ; 2c946 (b:4946)
call PrintMoveDesc
jp TMHM_JoypadLoop
TMHM_ChooseTMorHM: ; 2c974 (b:4974)
TMHM_ChooseTMorHM:
call TMHM_PlaySFX_ReadText2
call CountTMsHMs ; This stores the count to wd265.
ld a, [wMenuCursorY]
@@ -277,7 +275,7 @@ TMHM_ChooseTMorHM: ; 2c974 (b:4974)
ld a, [wd265]
cp b
jr z, _TMHM_ExitPack ; our cursor was hovering over CANCEL
TMHM_CheckHoveringOverCancel: ; 2c98a (b:498a)
TMHM_CheckHoveringOverCancel:
call TMHM_GetCurrentPocketPosition
ld a, [wMenuCursorY]
ld b, a
@@ -297,19 +295,19 @@ TMHM_CheckHoveringOverCancel: ; 2c98a (b:498a)
cp -1
ret
TMHM_ExitPack: ; 2c9a5 (b:49a5)
TMHM_ExitPack:
call TMHM_PlaySFX_ReadText2
_TMHM_ExitPack: ; 2c9a8 (b:49a8)
_TMHM_ExitPack:
ld a, $2
ld [wMenuJoypad], a
and a
ret
TMHM_ExitPocket: ; 2c9af (b:49af)
TMHM_ExitPocket:
and a
ret
TMHM_ScrollPocket: ; 2c9b1 (b:49b1)
TMHM_ScrollPocket:
ld a, b
bit 7, a
jr nz, .skip
@@ -339,7 +337,7 @@ TMHM_ScrollPocket: ; 2c9b1 (b:49b1)
call TMHM_DisplayPocketItems
jp TMHM_ShowTMMoveDescription
TMHM_DisplayPocketItems: ; 2c9e2 (b:49e2)
TMHM_DisplayPocketItems:
ld a, [wBattleType]
cp BATTLETYPE_TUTORIAL
jp z, Tutorial_TMHMPocket
@@ -433,7 +431,7 @@ TMHM_DisplayPocketItems: ; 2c9e2 (b:49e2)
.done
ret
TMHMPocket_GetCurrentLineCoord: ; 2ca86 (b:4a86)
TMHMPocket_GetCurrentLineCoord:
hlcoord 5, 0
ld bc, 2 * SCREEN_WIDTH
ld a, 6
@@ -445,9 +443,8 @@ TMHMPocket_GetCurrentLineCoord: ; 2ca86 (b:4a86)
dec e
jr nz, .loop
ret
; 2ca95 (b:4a95)
Unreferenced_Function2ca95: ; 2ca95
Unreferenced_Function2ca95:
pop hl
ld bc, 3
add hl, bc
@@ -459,13 +456,11 @@ Unreferenced_Function2ca95: ; 2ca95
call PlaceString
pop hl
ret
; 2caae
TMHM_String_Cancel: ; 2caae
TMHM_String_Cancel:
db "CANCEL@"
; 2cab5
TMHM_GetCurrentPocketPosition: ; 2cab5 (b:4ab5)
TMHM_GetCurrentPocketPosition:
ld hl, wTMsHMs
ld a, [wTMHMPocketScrollPosition]
ld b, a
@@ -482,7 +477,7 @@ TMHM_GetCurrentPocketPosition: ; 2cab5 (b:4ab5)
dec c
ret
Tutorial_TMHMPocket: ; 2caca (b:4aca)
Tutorial_TMHMPocket:
hlcoord 9, 3
push de
ld de, TMHM_String_Cancel
@@ -490,15 +485,14 @@ Tutorial_TMHMPocket: ; 2caca (b:4aca)
pop de
ret
TMHM_PlaySFX_ReadText2: ; 2cad6 (b:4ad6)
TMHM_PlaySFX_ReadText2:
push de
ld de, SFX_READ_TEXT_2
call PlaySFX
pop de
ret
; 2cadf (b:4adf)
Unreferenced_Function2cadf: ; 2cadf
Unreferenced_Function2cadf:
call ConvertCurItemIntoCurTMHM
call .CheckHaveRoomForTMHM
ld hl, .NoRoomText
@@ -506,7 +500,6 @@ Unreferenced_Function2cadf: ; 2cadf
ld hl, .ReceivedText
.print
jp PrintText
; 2caf0
.NoRoomText: ; 0x2caf0
; You have no room for any more @ S.
@@ -520,7 +513,7 @@ Unreferenced_Function2cadf: ; 2cadf
db "@"
; 0x2cafa
.CheckHaveRoomForTMHM: ; 2cafa
.CheckHaveRoomForTMHM:
ld a, [wd265]
dec a
ld hl, wTMsHMs
@@ -533,9 +526,8 @@ Unreferenced_Function2cadf: ; 2cadf
ret nc
ld [hl], a
ret
; 2cb0c
ConsumeTM: ; 2cb0c (b:4b0c)
ConsumeTM:
call ConvertCurItemIntoCurTMHM
ld a, [wd265]
dec a
@@ -556,7 +548,7 @@ ConsumeTM: ; 2cb0c (b:4b0c)
ld [wTMHMPocketScrollPosition], a
ret
CountTMsHMs: ; 2cb2a (b:4b2a)
CountTMsHMs:
ld b, 0
ld c, NUM_TMS + NUM_HMS
ld hl, wTMsHMs
@@ -572,7 +564,7 @@ CountTMsHMs: ; 2cb2a (b:4b2a)
ld [wd265], a
ret
PrintMoveDesc: ; 2cb3e
PrintMoveDesc:
push hl
ld hl, MoveDescriptions
ld a, [wCurSpecies]
@@ -586,4 +578,3 @@ PrintMoveDesc: ; 2cb3e
ld d, [hl]
pop hl
jp PlaceString
; 2cb52

View File

@@ -1,4 +1,4 @@
CanLearnTMHMMove: ; 11639
CanLearnTMHMMove:
ld a, [wCurPartySpecies]
ld [wCurSpecies], a
call GetBaseData
@@ -31,9 +31,8 @@ CanLearnTMHMMove: ; 11639
pop hl
ld c, 0
ret
; 1166a
GetTMHMMove: ; 1166a
GetTMHMMove:
ld a, [wd265]
dec a
ld hl, TMHMMoves
@@ -43,7 +42,6 @@ GetTMHMMove: ; 1166a
ld a, [hl]
ld [wd265], a
ret
; 1167a
INCLUDE "data/moves/tmhm_moves.asm"