mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-25 01:28:54 -05:00
Properly hatch pocket cucco using Sun's Song
This commit is contained in:
parent
947a97608c
commit
282192eb5e
@ -1055,6 +1055,7 @@ s32 Inventory_HasEmptyBottle(void);
|
|||||||
s32 Inventory_HasSpecificBottle(u8 bottleItem);
|
s32 Inventory_HasSpecificBottle(u8 bottleItem);
|
||||||
void Inventory_UpdateBottleItem(GlobalContext* globalCtx, u8 item, u8 cButton);
|
void Inventory_UpdateBottleItem(GlobalContext* globalCtx, u8 item, u8 cButton);
|
||||||
s32 Inventory_ConsumeFairy(GlobalContext* globalCtx);
|
s32 Inventory_ConsumeFairy(GlobalContext* globalCtx);
|
||||||
|
bool Inventory_HatchPocketCucco(GlobalContext* globalCtx);
|
||||||
void Interface_SetDoAction(GlobalContext* globalCtx, u16 action);
|
void Interface_SetDoAction(GlobalContext* globalCtx, u16 action);
|
||||||
void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState);
|
void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState);
|
||||||
void Interface_LoadActionLabelB(GlobalContext* globalCtx, u16 action);
|
void Interface_LoadActionLabelB(GlobalContext* globalCtx, u16 action);
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||||
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
|
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
|
||||||
#include "soh/frame_interpolation.h"
|
#include "soh/frame_interpolation.h"
|
||||||
#include "soh/Enhancements/randomizer/adult_trade_shuffle.h"
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/* 0 */ LENS_FLARE_CIRCLE0,
|
/* 0 */ LENS_FLARE_CIRCLE0,
|
||||||
@ -2049,21 +2048,6 @@ void Environment_PlaySceneSequence(GlobalContext* globalCtx) {
|
|||||||
Audio_SetEnvReverb(globalCtx->roomCtx.curRoom.echo);
|
Audio_SetEnvReverb(globalCtx->roomCtx.curRoom.echo);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HatchPocketEgg(GlobalContext* globalCtx) {
|
|
||||||
if (!gSaveContext.n64ddFlag) {
|
|
||||||
return Inventory_ReplaceItem(globalCtx, ITEM_POCKET_EGG, ITEM_POCKET_CUCCO);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(gSaveContext.adultTradeItems & ADULT_TRADE_FLAG(ITEM_POCKET_EGG))) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
gSaveContext.adultTradeItems &= ~ADULT_TRADE_FLAG(ITEM_POCKET_EGG);
|
|
||||||
gSaveContext.adultTradeItems |= ADULT_TRADE_FLAG(ITEM_POCKET_CUCCO);
|
|
||||||
Inventory_ReplaceItem(globalCtx, ITEM_POCKET_EGG, ITEM_POCKET_CUCCO);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// updates bgm/sfx and other things as the day progresses
|
// updates bgm/sfx and other things as the day progresses
|
||||||
void func_80075B44(GlobalContext* globalCtx) {
|
void func_80075B44(GlobalContext* globalCtx) {
|
||||||
switch (globalCtx->envCtx.unk_E0) {
|
switch (globalCtx->envCtx.unk_E0) {
|
||||||
@ -2117,7 +2101,7 @@ void func_80075B44(GlobalContext* globalCtx) {
|
|||||||
gSaveContext.dogIsLost = true;
|
gSaveContext.dogIsLost = true;
|
||||||
func_80078884(NA_SE_EV_CHICKEN_CRY_M);
|
func_80078884(NA_SE_EV_CHICKEN_CRY_M);
|
||||||
if ((Inventory_ReplaceItem(globalCtx, ITEM_WEIRD_EGG, ITEM_CHICKEN) ||
|
if ((Inventory_ReplaceItem(globalCtx, ITEM_WEIRD_EGG, ITEM_CHICKEN) ||
|
||||||
HatchPocketEgg(globalCtx)) &&
|
Inventory_HatchPocketCucco(globalCtx)) &&
|
||||||
globalCtx->csCtx.state == 0 && !Player_InCsMode(globalCtx)) {
|
globalCtx->csCtx.state == 0 && !Player_InCsMode(globalCtx)) {
|
||||||
Message_StartTextbox(globalCtx, 0x3066, NULL);
|
Message_StartTextbox(globalCtx, 0x3066, NULL);
|
||||||
}
|
}
|
||||||
|
@ -2573,6 +2573,21 @@ s32 Inventory_ConsumeFairy(GlobalContext* globalCtx) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Inventory_HatchPocketCucco(GlobalContext* globalCtx) {
|
||||||
|
if (!gSaveContext.n64ddFlag) {
|
||||||
|
return Inventory_ReplaceItem(globalCtx, ITEM_POCKET_EGG, ITEM_POCKET_CUCCO);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(gSaveContext.adultTradeItems & ADULT_TRADE_FLAG(ITEM_POCKET_EGG))) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
gSaveContext.adultTradeItems &= ~ADULT_TRADE_FLAG(ITEM_POCKET_EGG);
|
||||||
|
gSaveContext.adultTradeItems |= ADULT_TRADE_FLAG(ITEM_POCKET_CUCCO);
|
||||||
|
Inventory_ReplaceItem(globalCtx, ITEM_POCKET_EGG, ITEM_POCKET_CUCCO);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
void func_80086D5C(s32* buf, u16 size) {
|
void func_80086D5C(s32* buf, u16 size) {
|
||||||
u16 i;
|
u16 i;
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ void Gameplay_Init(GameState* thisx) {
|
|||||||
gSaveContext.bgsDayCount++;
|
gSaveContext.bgsDayCount++;
|
||||||
gSaveContext.dogIsLost = true;
|
gSaveContext.dogIsLost = true;
|
||||||
if (Inventory_ReplaceItem(globalCtx, ITEM_WEIRD_EGG, ITEM_CHICKEN) ||
|
if (Inventory_ReplaceItem(globalCtx, ITEM_WEIRD_EGG, ITEM_CHICKEN) ||
|
||||||
Inventory_ReplaceItem(globalCtx, ITEM_POCKET_EGG, ITEM_POCKET_CUCCO)) {
|
Inventory_HatchPocketCucco(globalCtx)) {
|
||||||
Message_StartTextbox(globalCtx, 0x3066, NULL);
|
Message_StartTextbox(globalCtx, 0x3066, NULL);
|
||||||
}
|
}
|
||||||
gSaveContext.nextDayTime = 0xFFFE;
|
gSaveContext.nextDayTime = 0xFFFE;
|
||||||
|
Loading…
Reference in New Issue
Block a user