diff options
Diffstat (limited to 'engine/mart.asm')
-rwxr-xr-x | engine/mart.asm | 64 |
1 files changed, 20 insertions, 44 deletions
diff --git a/engine/mart.asm b/engine/mart.asm index 7002902cc..55c184737 100755 --- a/engine/mart.asm +++ b/engine/mart.asm @@ -99,23 +99,7 @@ RooftopSale: ; 15ac4 ret ; 15aee -RooftopSaleData1: ; 15aee - db 5 - dbw POKE_BALL, 150 - dbw GREAT_BALL, 500 - dbw SUPER_POTION, 500 - dbw FULL_HEAL, 500 - dbw REVIVE, 1200 - db -1 -RooftopSaleData2: ; 15aff - db 5 - dbw HYPER_POTION, 1000 - dbw FULL_RESTORE, 2000 - dbw FULL_HEAL, 500 - dbw ULTRA_BALL, 1000 - dbw PROTEIN, 7800 - db -1 -; 15b10 +INCLUDE "data/items/rooftop_sale.asm" LoadMartPointer: ; 15b10 ld a, b @@ -268,7 +252,7 @@ GetMartItemPrice: ; 15be5 ; Return the price of item a in BCD at hl and in tiles at StringBuffer1. push hl ld [CurItem], a - callba GetItemPrice + farcall GetItemPrice pop hl GetMartPrice: ; 15bf0 @@ -355,24 +339,16 @@ ReadMart: ; 15c25 ret ; 15c51 -BargainShopData: ; 15c51 - db 5 - dbw NUGGET, 4500 - dbw PEARL, 650 - dbw BIG_PEARL, 3500 - dbw STARDUST, 900 - dbw STAR_PIECE, 4600 - db -1 -; 15c62 +INCLUDE "data/items/bargain_shop.asm" BuyMenu: ; 15c62 call FadeToMenu - callba BlankScreen + farcall BlankScreen xor a - ld [wd045 + 1], a + ld [wMenuScrollPositionBackup], a ld a, 1 - ld [wd045], a + ld [wMenuCursorBufferBackup], a .loop call BuyMenuLoop ; menu loop jr nc, .loop @@ -467,19 +443,19 @@ GetMartDialogGroup: ; 15ca3 BuyMenuLoop: ; 15cef - callba PlaceMoneyTopRight + farcall PlaceMoneyTopRight call UpdateSprites ld hl, MenuDataHeader_Buy call CopyMenuDataHeader - ld a, [wd045] + ld a, [wMenuCursorBufferBackup] ld [wMenuCursorBuffer], a - ld a, [wd045 + 1] + ld a, [wMenuScrollPositionBackup] ld [wMenuScrollPosition], a call ScrollingMenu ld a, [wMenuScrollPosition] - ld [wd045 + 1], a + ld [wMenuScrollPositionBackup], a ld a, [wMenuCursorY] - ld [wd045], a + ld [wMenuCursorBufferBackup], a call SpeechTextBox ld a, [wMenuJoypad] cp B_BUTTON @@ -543,7 +519,7 @@ StandardMartAskPurchaseQuantity: ld [wItemQuantityBuffer], a ld a, MARTTEXT_HOW_MANY call LoadBuyMenuText - callba SelectQuantityToBuy + farcall SelectQuantityToBuy call ExitMenu ret ; 15d97 @@ -603,7 +579,7 @@ RooftopSaleAskPurchaseQuantity: call .GetSalePrice ld a, 99 ld [wItemQuantityBuffer], a - callba RooftopSale_SelectQuantityToBuy + farcall RooftopSale_SelectQuantityToBuy call ExitMenu ret ; 15df9 @@ -806,9 +782,9 @@ Text_Pharmacist_ComeAgain: ; 0x15eae SellMenu: ; 15eb3 call DisableSpriteUpdates - callba DepositSellInitPackBuffers + farcall DepositSellInitPackBuffers .loop - callba DepositSellPack + farcall DepositSellPack ld a, [wcf66] and a jp z, .quit @@ -836,7 +812,7 @@ SellMenu: ; 15eb3 .TryToSellItem: ; 15ee0 - callba CheckItemMenu + farcall CheckItemMenu ld a, [wItemAttributeParamBuffer] ld hl, .dw rst JumpTable @@ -859,7 +835,7 @@ SellMenu: ; 15eb3 .try_sell ; 15efd - callba _CheckTossableItem + farcall _CheckTossableItem ld a, [wItemAttributeParamBuffer] and a jr z, .okay_to_sell @@ -871,8 +847,8 @@ SellMenu: ; 15eb3 .okay_to_sell ld hl, Text_Mart_SellHowMany call PrintText - callba PlaceMoneyAtTopLeftOfTextbox - callba SelectQuantityToSell + farcall PlaceMoneyAtTopLeftOfTextbox + farcall SelectQuantityToSell call ExitMenu jr c, .declined hlcoord 1, 14 @@ -895,7 +871,7 @@ SellMenu: ; 15eb3 ld hl, Text_Mart_SoldForAmount call PrintTextBoxText call PlayTransactionSound - callba PlaceMoneyBottomLeft + farcall PlaceMoneyBottomLeft call JoyWaitAorB .declined |