diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-09-28 17:13:59 -0400 |
---|---|---|
committer | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-09-28 17:13:59 -0400 |
commit | 0cac170dfd3bfa9c2386b0b230655ace9dea7f11 (patch) | |
tree | 482835fe4eb9347f9f365b683cd188ed88d7f1b7 /src/field/shop.c | |
parent | eb1da945b499641e0e1eb0283a05a001df0bfd32 (diff) | |
parent | c1c2015f7046676b043641c0d1f9d9e29bc73647 (diff) |
merge
Diffstat (limited to 'src/field/shop.c')
-rw-r--r-- | src/field/shop.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/field/shop.c b/src/field/shop.c index 6a88f1394..22250b1c4 100644 --- a/src/field/shop.c +++ b/src/field/shop.c @@ -23,7 +23,7 @@ #include "decoration.h" #include "items.h" #include "songs.h" -#include "rom4.h" +#include "overworld.h" #include "decoration_inventory.h" #include "field_camera.h" @@ -60,7 +60,7 @@ EWRAM_DATA u8 gUnknown_02038730 = 0; EWRAM_DATA u8 gUnknown_02038731 = 0; // rodata -static const struct MenuAction2 gUnknown_083CC6D0[] = +static const struct MenuAction2 sBuySellQuitMenuActions[] = { { MartText_Buy, sub_80B2EFC }, { MartText_Sell, sub_80B2F30 }, @@ -88,13 +88,13 @@ u8 CreateShopMenu(u8 martType) { gMartInfo.numChoices = 2; MenuDrawTextWindow(0, 0, 10, 7); - PrintMenuItemsReordered(1, 1, 3, (struct MenuAction *)gUnknown_083CC6D0, (u8 *)gUnknown_083CC6E8); + PrintMenuItemsReordered(1, 1, 3, sBuySellQuitMenuActions, gUnknown_083CC6E8); } else { gMartInfo.numChoices = 1; MenuDrawTextWindow(0, 0, 10, 5); - PrintMenuItemsReordered(1, 1, 2, (struct MenuAction *)gUnknown_083CC6D0, (u8 *)gUnknown_083CC6EB); + PrintMenuItemsReordered(1, 1, 2, sBuySellQuitMenuActions, gUnknown_083CC6EB); } InitMenu(0, 1, 1, gMartInfo.numChoices + 1, 0, 9); // add 1 for cancel @@ -145,11 +145,11 @@ void sub_80B2E38(u8 var) PlaySE(SE_SELECT); if (gMartInfo.martType == MART_TYPE_0) { - gUnknown_083CC6D0[gUnknown_083CC6E8[gMartInfo.cursor]].func(local); + sBuySellQuitMenuActions[gUnknown_083CC6E8[gMartInfo.cursor]].func(local); } else { - gUnknown_083CC6D0[gUnknown_083CC6EB[gMartInfo.cursor]].func(local); + sBuySellQuitMenuActions[gUnknown_083CC6EB[gMartInfo.cursor]].func(local); } } else if (gMain.newKeys & B_BUTTON) @@ -294,7 +294,7 @@ void BuyMenuDrawGraphics(void) gMartInfo.cursor = zero; gMartInfo.choicesAbove = zero2; MenuZeroFillWindowRect(0, 0, 0x20, 0x20); - sub_80B7C14(gSaveBlock1.money, 0, 0); + OpenMoneyWindow(gSaveBlock1.money, 0, 0); sub_80B3764(0, 7); sub_80B37EC(); sub_80B3270(); @@ -530,7 +530,7 @@ void sub_80B37F8(u8 taskId) u16 itemId = gMartInfo.itemList[itemListIndex]; u32 price = (ItemId_GetPrice(itemId) >> GetPriceReduction(1)); - sub_80B7A94(gTasks[taskId].data[1] * price, 6, 6, 11); + PrintMoneyAmount(gTasks[taskId].data[1] * price, 6, 6, 11); gStringVar1[0] = EXT_CTRL_CODE_BEGIN; gStringVar1[1] = 0x14; gStringVar1[2] = 0x6; @@ -559,7 +559,7 @@ void sub_80B389C(u16 itemId, u8 var2, bool32 hasControlCode) if (hasControlCode != FALSE) stringPtr = &gStringVar1[3]; - sub_80B79F8(stringPtr, (ItemId_GetPrice(itemId) >> GetPriceReduction(1)), 0x4); + GetMoneyAmountText(stringPtr, (ItemId_GetPrice(itemId) >> GetPriceReduction(1)), 0x4); MenuPrint_PixelCoords(&gStringVar1[0], 0xCA, var2 << 3, 1); } @@ -588,7 +588,7 @@ void sub_80B3930(u16 itemId, u8 var2, bool32 hasControlCode) } else { - sub_80B79F8(stringPtr, gDecorations[itemId].price, 0x4); + GetMoneyAmountText(stringPtr, gDecorations[itemId].price, 0x4); MenuPrint_PixelCoords(&gStringVar1[0], 0xCA, var2 << 3, 0x1); } } @@ -648,9 +648,9 @@ void sub_80B3AEC(u8 taskId) void sub_80B3B80(u8 taskId) { IncrementGameStat(0x26); - sub_80B79E0(&gSaveBlock1.money, gMartTotalCost); + RemoveMoney(&gSaveBlock1.money, gMartTotalCost); PlaySE(SE_REGI); - sub_80B7BEC(gSaveBlock1.money, 0, 0); + UpdateMoneyWindow(gSaveBlock1.money, 0, 0); gTasks[taskId].func = sub_80B3AEC; } @@ -1165,7 +1165,7 @@ void Task_ExitBuyMenu(u8 taskId) { if (!gPaletteFade.active) { - RemoveMoneyLabelObject(0, 0); + CloseMoneyWindow(0, 0); BuyMenuFreeMemory(); SetMainCallback2(c2_exit_to_overworld_2_switch); DestroyTask(taskId); |