mirror of https://github.com/zeldaret/mm.git
Better rename for price fields
This commit is contained in:
parent
552e9d5e2c
commit
c624cbf187
|
|
@ -123,8 +123,8 @@
|
|||
{ __VA_ARGS__ END }
|
||||
|
||||
// Not a control command, used to define the data that begins every message
|
||||
#define HEADER(textBoxProperties, itemId, nextTextId, firstChoiceValue, secondChoiceValue, unk12074) \
|
||||
ARG2(textBoxProperties) ARG1(itemId) ARG2(nextTextId) ARG2(firstChoiceValue) ARG2(secondChoiceValue) ARG2(unk12074)
|
||||
#define HEADER(textBoxProperties, itemId, nextTextId, firstChoicePrice, secondChoicePrice, unk12074) \
|
||||
ARG2(textBoxProperties) ARG1(itemId) ARG2(nextTextId) ARG2(firstChoicePrice) ARG2(secondChoicePrice) ARG2(unk12074)
|
||||
|
||||
#define COLOR_DEFAULT CTRL_BASE(COLOR_DEFAULT)
|
||||
#define COLOR_RED CTRL_BASE(COLOR_RED)
|
||||
|
|
|
|||
|
|
@ -253,8 +253,8 @@ typedef struct MessageContext {
|
|||
/* 0x1205A */ UNK_TYPE1 unk12060[0x8];
|
||||
/* 0x12068 */ s16 textboxX;
|
||||
/* 0x1206A */ s16 textboxY;
|
||||
/* 0x1206C */ s32 firstChoiceValue;
|
||||
/* 0x12070 */ s32 secondChoiceValue;
|
||||
/* 0x1206C */ s32 firstChoicePrice;
|
||||
/* 0x12070 */ s32 secondChoicePrice;
|
||||
/* 0x12074 */ s32 unk12074;
|
||||
/* 0x12078 */ s32 rupeesSelected; // Used for bank and doggy racetrack bet
|
||||
/* 0x1207C */ s32 rupeesTotal; // Used for bank and doggy racetrack bet
|
||||
|
|
|
|||
|
|
@ -2008,11 +2008,11 @@ void Message_DecodeHeader(PlayState* play) {
|
|||
msgCtx->nextTextId = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||
msgCtx->nextTextId |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||
|
||||
msgCtx->firstChoiceValue = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||
msgCtx->firstChoiceValue |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||
msgCtx->firstChoicePrice = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||
msgCtx->firstChoicePrice |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||
|
||||
msgCtx->secondChoiceValue = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||
msgCtx->secondChoiceValue |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||
msgCtx->secondChoicePrice = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||
msgCtx->secondChoicePrice |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||
|
||||
msgCtx->unk12074 = font->msgBuf.schar[++msgCtx->msgBufPos] << 8;
|
||||
msgCtx->unk12074 |= font->msgBuf.schar[++msgCtx->msgBufPos];
|
||||
|
|
|
|||
|
|
@ -821,9 +821,9 @@ void EnBal_TryPurchaseMap(EnBal* this, PlayState* play) {
|
|||
if (play->msgCtx.choiceIndex != TINGLE_MAPCHOICE_CANCEL) {
|
||||
// Get price depending on which map player wants to buy
|
||||
if (play->msgCtx.choiceIndex == TINGLE_MAPCHOICE_PROXIMAL) {
|
||||
price = play->msgCtx.firstChoiceValue;
|
||||
price = play->msgCtx.firstChoicePrice;
|
||||
} else {
|
||||
price = play->msgCtx.secondChoiceValue;
|
||||
price = play->msgCtx.secondChoicePrice;
|
||||
}
|
||||
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < price) {
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, PlayState* play) {
|
|||
case 0x477:
|
||||
Message_StartTextbox(play, 0x471, &this->actor);
|
||||
this->curTextId = 0x471;
|
||||
this->serviceFee = play->msgCtx.firstChoiceValue;
|
||||
this->serviceFee = play->msgCtx.firstChoicePrice;
|
||||
break;
|
||||
|
||||
case 0x479:
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ s32 EnGirlA_CanBuyPotionRed(PlayState* play, EnGirlA* this) {
|
|||
if (!Inventory_HasEmptyBottle()) {
|
||||
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_2;
|
||||
|
|
@ -196,7 +196,7 @@ s32 EnGirlA_CanBuyPotionGreen(PlayState* play, EnGirlA* this) {
|
|||
if (!Inventory_HasEmptyBottle()) {
|
||||
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_2;
|
||||
|
|
@ -212,7 +212,7 @@ s32 EnGirlA_CanBuyPotionBlue(PlayState* play, EnGirlA* this) {
|
|||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_RECEIVED_FREE_BLUE_POTION)) {
|
||||
return CANBUY_RESULT_SUCCESS_2;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_2;
|
||||
|
|
@ -225,7 +225,7 @@ s32 EnGirlA_CanBuyArrows(PlayState* play, EnGirlA* this) {
|
|||
if (AMMO(ITEM_BOW) >= CUR_CAPACITY(UPG_QUIVER)) {
|
||||
return CANBUY_RESULT_NO_ROOM_2;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_2;
|
||||
|
|
@ -235,7 +235,7 @@ s32 EnGirlA_CanBuyNuts(PlayState* play, EnGirlA* this) {
|
|||
if ((CUR_CAPACITY(UPG_DEKU_NUTS) != 0) && (CUR_CAPACITY(UPG_DEKU_NUTS) <= AMMO(ITEM_DEKU_NUT))) {
|
||||
return CANBUY_RESULT_NO_ROOM;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
if (Item_CheckObtainability(ITEM_DEKU_NUT) == ITEM_NONE) {
|
||||
|
|
@ -248,7 +248,7 @@ s32 EnGirlA_CanBuyShieldHero(PlayState* play, EnGirlA* this) {
|
|||
if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) != EQUIP_VALUE_SHIELD_NONE) {
|
||||
return CANBUY_RESULT_NO_ROOM;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_1;
|
||||
|
|
@ -258,7 +258,7 @@ s32 EnGirlA_CanBuyStick(PlayState* play, EnGirlA* this) {
|
|||
if ((CUR_CAPACITY(UPG_DEKU_STICKS) != 0) && (AMMO(ITEM_DEKU_STICK) >= CUR_CAPACITY(UPG_DEKU_STICKS))) {
|
||||
return CANBUY_RESULT_NO_ROOM;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
if (Item_CheckObtainability(ITEM_DEKU_STICK) == ITEM_NONE) {
|
||||
|
|
@ -268,7 +268,7 @@ s32 EnGirlA_CanBuyStick(PlayState* play, EnGirlA* this) {
|
|||
}
|
||||
|
||||
s32 EnGirlA_CanBuyMaskAllNight(PlayState* play, EnGirlA* this) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_2;
|
||||
|
|
@ -278,7 +278,7 @@ s32 EnGirlA_CanBuyBombBagCuriosityShop(PlayState* play, EnGirlA* this) {
|
|||
if (GET_CUR_UPG_VALUE(UPG_BOMB_BAG) >= 2) {
|
||||
return CANBUY_RESULT_CANNOT_GET_NOW;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_2;
|
||||
|
|
@ -291,7 +291,7 @@ s32 EnGirlA_CanBuyBombBag20BombShop(PlayState* play, EnGirlA* this) {
|
|||
if (GET_CUR_UPG_VALUE(UPG_BOMB_BAG) >= 2) {
|
||||
return CANBUY_RESULT_HAVE_BETTER;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_1;
|
||||
|
|
@ -304,7 +304,7 @@ s32 EnGirlA_CanBuyBombBag30BombShop(PlayState* play, EnGirlA* this) {
|
|||
if (GET_CUR_UPG_VALUE(UPG_BOMB_BAG) == 3) {
|
||||
return CANBUY_RESULT_HAVE_BETTER;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_1;
|
||||
|
|
@ -317,7 +317,7 @@ s32 EnGirlA_CanBuyBombchus(PlayState* play, EnGirlA* this) {
|
|||
if (AMMO(ITEM_BOMBCHU) >= CUR_CAPACITY(UPG_BOMB_BAG)) {
|
||||
return CANBUY_RESULT_NO_ROOM;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
if (Item_CheckObtainability(ITEM_BOMBCHU) == ITEM_NONE) {
|
||||
|
|
@ -333,21 +333,21 @@ s32 EnGirlA_CanBuyBombs(PlayState* play, EnGirlA* this) {
|
|||
if (AMMO(ITEM_BOMB) >= CUR_CAPACITY(UPG_BOMB_BAG)) {
|
||||
return CANBUY_RESULT_NO_ROOM;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_2;
|
||||
}
|
||||
|
||||
s32 EnGirlA_CanBuyBottleStolen(PlayState* play, EnGirlA* this) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_1;
|
||||
}
|
||||
|
||||
s32 EnGirlA_CanBuySword(PlayState* play, EnGirlA* this) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_1;
|
||||
|
|
@ -357,7 +357,7 @@ s32 EnGirlA_CanBuyShieldMirror(PlayState* play, EnGirlA* this) {
|
|||
if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) != EQUIP_VALUE_SHIELD_NONE) {
|
||||
return CANBUY_RESULT_NO_ROOM;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_1;
|
||||
|
|
@ -367,7 +367,7 @@ s32 EnGirlA_CanBuyFairy(PlayState* play, EnGirlA* this) {
|
|||
if (!Inventory_HasEmptyBottle()) {
|
||||
return CANBUY_RESULT_NEED_EMPTY_BOTTLE;
|
||||
}
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
return CANBUY_RESULT_NEED_RUPEES;
|
||||
}
|
||||
return CANBUY_RESULT_SUCCESS_2;
|
||||
|
|
@ -402,12 +402,12 @@ void EnGirlA_BuyBottleItem(PlayState* play, EnGirlA* this) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
void EnGirlA_BuyArrows(PlayState* play, EnGirlA* this) {
|
||||
Inventory_ChangeAmmo(ITEM_BOW, this->itemParams);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
void EnGirlA_BuyNuts(PlayState* play, EnGirlA* this) {
|
||||
|
|
@ -423,22 +423,22 @@ void EnGirlA_BuyNuts(PlayState* play, EnGirlA* this) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
void EnGirlA_BuyShieldHero(PlayState* play, EnGirlA* this) {
|
||||
Item_Give(play, ITEM_SHIELD_HERO);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
void EnGirlA_BuyStick(PlayState* play, EnGirlA* this) {
|
||||
Item_Give(play, ITEM_DEKU_STICK);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
void EnGirlA_BuyMaskAllNight(PlayState* play, EnGirlA* this) {
|
||||
Item_Give(play, ITEM_MASK_ALL_NIGHT);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
void EnGirlA_BuyBombBag(PlayState* play, EnGirlA* this) {
|
||||
|
|
@ -459,14 +459,14 @@ void EnGirlA_BuyBombBag(PlayState* play, EnGirlA* this) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
void EnGirlA_BuyBombchus(PlayState* play, EnGirlA* this) {
|
||||
if (this->itemParams == 10) {
|
||||
Item_Give(play, ITEM_BOMBCHUS_10);
|
||||
}
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
void EnGirlA_BuyBombs(PlayState* play, EnGirlA* this) {
|
||||
|
|
@ -490,12 +490,12 @@ void EnGirlA_BuyBombs(PlayState* play, EnGirlA* this) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
void EnGirlA_BuyBottle(PlayState* play, EnGirlA* this) {
|
||||
Item_Give(play, ITEM_BOTTLE);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
void EnGirlA_BuySword(PlayState* play, EnGirlA* this) {
|
||||
|
|
@ -519,17 +519,17 @@ void EnGirlA_BuySword(PlayState* play, EnGirlA* this) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
void EnGirlA_BuyShieldMirror(PlayState* play, EnGirlA* this) {
|
||||
Item_Give(play, ITEM_SHIELD_MIRROR);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
// Fanfare is handled by the shopkeeper
|
||||
void EnGirlA_BuyFanfare(PlayState* play, EnGirlA* this) {
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
|
||||
void EnGirlA_DoNothing(EnGirlA* this, PlayState* play) {
|
||||
|
|
|
|||
|
|
@ -600,8 +600,8 @@ s32 func_808F4150(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx)
|
|||
|
||||
if (msgCtx->choiceIndex == 0) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoiceValue) {
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoicePrice) {
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_57_01)) {
|
||||
func_808F4108(this, play, 0x3474);
|
||||
} else if (this->unk4AC & 8) {
|
||||
|
|
@ -622,7 +622,7 @@ s32 func_808F4150(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx)
|
|||
|
||||
s32 func_808F4270(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx, s32 arg4) {
|
||||
s32 pad;
|
||||
s32 fee = (play->msgCtx.firstChoiceValue != 0xFFFF) ? play->msgCtx.firstChoiceValue : 10;
|
||||
s32 fee = (play->msgCtx.firstChoicePrice != 0xFFFF) ? play->msgCtx.firstChoicePrice : 10;
|
||||
|
||||
if (msgCtx->choiceIndex == 0) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
|
|
@ -795,11 +795,11 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
case 0x3466:
|
||||
if (msgCtx->choiceIndex == 0) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoicePrice) {
|
||||
if (Inventory_HasEmptyBottle()) {
|
||||
this->actionFunc = func_808F3C40;
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
ret = true;
|
||||
} else {
|
||||
Actor_ContinueText(play, &this->actor, 0x3469);
|
||||
|
|
@ -1098,11 +1098,11 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) {
|
|||
case 0x3490:
|
||||
if (msgCtx->choiceIndex == 0) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoicePrice) {
|
||||
if (Inventory_HasEmptyBottle()) {
|
||||
this->actionFunc = func_808F3C40;
|
||||
Actor_OfferGetItem(&this->actor, play, GI_MILK, 500.0f, 100.0f);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
ret = true;
|
||||
} else {
|
||||
Actor_ContinueText(play, &this->actor, 0x3469);
|
||||
|
|
|
|||
|
|
@ -231,13 +231,13 @@ void func_80B26758(EnKendoJs* this, PlayState* play) {
|
|||
Message_StartTextbox(play, 0x272C, &this->actor);
|
||||
this->unk_288 = 0x272C;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENKENDOJS_ANIM_2);
|
||||
} else if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
} else if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||
Message_StartTextbox(play, 0x2718, &this->actor);
|
||||
this->unk_288 = 0x2718;
|
||||
} else {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
Message_StartTextbox(play, 0x2719, &this->actor);
|
||||
this->unk_288 = 0x2719;
|
||||
}
|
||||
|
|
@ -249,13 +249,13 @@ void func_80B26758(EnKendoJs* this, PlayState* play) {
|
|||
Message_StartTextbox(play, 0x272C, &this->actor);
|
||||
this->unk_288 = 0x272C;
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, ENKENDOJS_ANIM_2);
|
||||
} else if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.secondChoiceValue) {
|
||||
} else if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.secondChoicePrice) {
|
||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||
Message_StartTextbox(play, 0x2718, &this->actor);
|
||||
this->unk_288 = 0x2718;
|
||||
} else {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
Rupees_ChangeBy(-play->msgCtx.secondChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.secondChoicePrice);
|
||||
Message_StartTextbox(play, 0x273A, &this->actor);
|
||||
this->unk_288 = 0x273A;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -651,13 +651,13 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
|
|||
case 0xC3B:
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||
func_80B40E74(this, play, 0xC3F);
|
||||
} else {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
func_80B40E74(this, play, 0xC42);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -789,7 +789,7 @@ void func_80B41E18(EnKgy* this, PlayState* play) {
|
|||
func_80B41368(this, play, 4);
|
||||
if (this->unk_29C & 0x10) {
|
||||
this->actor.textId = 0xC56;
|
||||
Rupees_ChangeBy(play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(play->msgCtx.firstChoicePrice);
|
||||
} else {
|
||||
this->actor.textId = 0xC42;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,7 +214,8 @@ void EnKitan_Talk(EnKitan* this, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
|
||||
if ((play->msgCtx.choiceIndex + 1) == play->msgCtx.firstChoiceValue) {
|
||||
// The "first choice price" field is used as the index of the correct answer for the quiz
|
||||
if ((play->msgCtx.choiceIndex + 1) == play->msgCtx.firstChoicePrice) {
|
||||
// Correct answer, continue quiz or end if enough questions have been answered correctly
|
||||
Audio_PlaySfx(NA_SE_SY_QUIZ_CORRECT);
|
||||
|
||||
|
|
|
|||
|
|
@ -157,11 +157,11 @@ void func_80A6F3B4(EnMm3* this, PlayState* play) {
|
|||
case 0x278E:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
if (this->unk_2B2 & 0x20) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoicePrice) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
Message_StartTextbox(play, 0x2790, &this->actor);
|
||||
this->unk_2B4 = 0x2790;
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
} else {
|
||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||
Message_StartTextbox(play, 0x279C, &this->actor);
|
||||
|
|
@ -183,11 +183,11 @@ void func_80A6F3B4(EnMm3* this, PlayState* play) {
|
|||
|
||||
case 0x279A:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.firstChoicePrice) {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
Message_StartTextbox(play, 0x2790, &this->actor);
|
||||
this->unk_2B4 = 0x2790;
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
} else {
|
||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||
Message_StartTextbox(play, 0x279C, &this->actor);
|
||||
|
|
|
|||
|
|
@ -679,7 +679,7 @@ u16 EnSGoro_BombshopGoron_NextTextId(EnSGoro* this, PlayState* play) {
|
|||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||
return 0x673;
|
||||
}
|
||||
this->powderKegPrice = play->msgCtx.firstChoiceValue;
|
||||
this->powderKegPrice = play->msgCtx.firstChoicePrice;
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < this->powderKegPrice) {
|
||||
this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE;
|
||||
this->actionFlags |= EN_S_GORO_ACTIONFLAG_TIRED;
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ void EnTakaraya_Talk(EnTakaraya* this, PlayState* play) {
|
|||
}
|
||||
} else if ((talkState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoiceValue) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.firstChoicePrice) {
|
||||
this->actor.textId = 0x77B;
|
||||
if (this->skelAnime.animation == &object_bg_Anim_009890) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_000968, 5.0f);
|
||||
|
|
@ -242,7 +242,7 @@ void EnTakaraya_Talk(EnTakaraya* this, PlayState* play) {
|
|||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||
} else {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoiceValue);
|
||||
Rupees_ChangeBy(-play->msgCtx.firstChoicePrice);
|
||||
EnTakaraya_SpawnWalls(this, play);
|
||||
this->actor.textId = 0x778;
|
||||
if (this->skelAnime.animation != &object_bg_Anim_009890) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue