Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename EVENTCHKINF flags for payments to Happy Mask salesman #2331

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/z64save.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,10 +559,10 @@ typedef enum LinkAge {
#define EVENTCHKINF_78 0x78
#define EVENTCHKINF_80 0x80
#define EVENTCHKINF_82 0x82
#define EVENTCHKINF_8C 0x8C
#define EVENTCHKINF_8D 0x8D
#define EVENTCHKINF_8E 0x8E
#define EVENTCHKINF_8F 0x8F
#define EVENTCHKINF_PAID_BACK_KEATON_MASK 0x8C
#define EVENTCHKINF_PAID_BACK_SKULL_MASK 0x8D
#define EVENTCHKINF_PAID_BACK_SPOOKY_MASK 0x8E
#define EVENTCHKINF_PAID_BACK_BUNNY_HOOD 0x8F

// 0x90-0x93
// carpenters freed from the gerudo
Expand Down
16 changes: 8 additions & 8 deletions src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,18 +877,18 @@ void EnOssan_TryPaybackMask(EnOssan* this, PlayState* play) {
Rupees_ChangeBy(-price);

if (this->happyMaskShopState == OSSAN_HAPPY_STATE_REQUEST_PAYMENT_BUNNY_HOOD) {
SET_EVENTCHKINF(EVENTCHKINF_8F);
SET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_BUNNY_HOOD);
Message_ContinueTextbox(play, 0x70A9);
this->happyMaskShopState = OSSAN_HAPPY_STATE_ALL_MASKS_SOLD;
return;
}

if (this->happyMaskShopState == OSSAN_HAPPY_STATE_REQUEST_PAYMENT_KEATON_MASK) {
SET_EVENTCHKINF(EVENTCHKINF_8C);
SET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_KEATON_MASK);
} else if (this->happyMaskShopState == OSSAN_HAPPY_STATE_REQUEST_PAYMENT_SPOOKY_MASK) {
SET_EVENTCHKINF(EVENTCHKINF_8E);
SET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_SPOOKY_MASK);
} else if (this->happyMaskShopState == OSSAN_HAPPY_STATE_REQUEST_PAYMENT_SKULL_MASK) {
SET_EVENTCHKINF(EVENTCHKINF_8D);
SET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_SKULL_MASK);
}

Message_ContinueTextbox(play, 0x70A7);
Expand Down Expand Up @@ -2059,7 +2059,7 @@ u16 EnOssan_SetupHelloDialog(EnOssan* this) {
if (this->actor.params == OSSAN_TYPE_MASK) {
if (INV_CONTENT(ITEM_TRADE_CHILD) == ITEM_SOLD_OUT) {
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_8F)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_BUNNY_HOOD)) {
// Pay back Bunny Hood
this->happyMaskShopState = OSSAN_HAPPY_STATE_REQUEST_PAYMENT_BUNNY_HOOD;
return 0x70C6;
Expand All @@ -2068,7 +2068,7 @@ u16 EnOssan_SetupHelloDialog(EnOssan* this) {
}
}
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_8E)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_SPOOKY_MASK)) {
// Pay back Spooky Mask
this->happyMaskShopState = OSSAN_HAPPY_STATE_REQUEST_PAYMENT_SPOOKY_MASK;
return 0x70C5;
Expand All @@ -2077,7 +2077,7 @@ u16 EnOssan_SetupHelloDialog(EnOssan* this) {
}
}
if (GET_ITEMGETINF(ITEMGETINF_39)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_8D)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_SKULL_MASK)) {
// Pay back Skull Mask
this->happyMaskShopState = OSSAN_HAPPY_STATE_REQUEST_PAYMENT_SKULL_MASK;
return 0x70C4;
Expand All @@ -2086,7 +2086,7 @@ u16 EnOssan_SetupHelloDialog(EnOssan* this) {
}
}
if (GET_ITEMGETINF(ITEMGETINF_38)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_8C)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_KEATON_MASK)) {
// Pay back Keaton Mask
this->happyMaskShopState = OSSAN_HAPPY_STATE_REQUEST_PAYMENT_KEATON_MASK;
return 0x70A5;
Expand Down