cow voice weekeventflag

This commit is contained in:
engineer124
2023-06-13 11:58:13 +10:00
parent 721d097c10
commit db5335c42a
3 changed files with 7 additions and 6 deletions
+2 -1
View File
@@ -1299,7 +1299,8 @@ typedef enum {
#define WEEKEVENTREG_86_20 PACK_WEEKEVENTREG_FLAG(86, 0x20)
#define WEEKEVENTREG_86_40 PACK_WEEKEVENTREG_FLAG(86, 0x40)
#define WEEKEVENTREG_86_80 PACK_WEEKEVENTREG_FLAG(86, 0x80)
#define WEEKEVENTREG_87_01 PACK_WEEKEVENTREG_FLAG(87, 0x01)
// Currently talking to a cow using the voice recognition unit
#define WEEKEVENTREG_TALKING_TO_COW_WITH_VOICE PACK_WEEKEVENTREG_FLAG(87, 0x01)
#define WEEKEVENTREG_87_02 PACK_WEEKEVENTREG_FLAG(87, 0x02)
#define WEEKEVENTREG_87_04 PACK_WEEKEVENTREG_FLAG(87, 0x04)
#define WEEKEVENTREG_87_08 PACK_WEEKEVENTREG_FLAG(87, 0x08)
+4 -4
View File
@@ -159,7 +159,7 @@ void EnCow_Init(Actor* thisx, PlayState* play) {
Actor_SetScale(&this->actor, 0.01f);
this->flags = 0;
CLEAR_WEEKEVENTREG(WEEKEVENTREG_87_01);
CLEAR_WEEKEVENTREG(WEEKEVENTREG_TALKING_TO_COW_WITH_VOICE);
}
void EnCow_Destroy(Actor* thisx, PlayState* play) {
@@ -295,8 +295,8 @@ void EnCow_Idle(EnCow* this, PlayState* play) {
if (this->actor.xzDistToPlayer < 150.0f &&
ABS_ALT((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) < 25000) {
if (AudioVoice_GetWord() == VOICE_WORD_ID_MILK) {
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_87_01)) {
SET_WEEKEVENTREG(WEEKEVENTREG_87_01);
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_TALKING_TO_COW_WITH_VOICE)) {
SET_WEEKEVENTREG(WEEKEVENTREG_TALKING_TO_COW_WITH_VOICE);
if (Inventory_HasEmptyBottle()) {
this->actor.textId = 0x32C9; // Text to give milk.
} else {
@@ -307,7 +307,7 @@ void EnCow_Idle(EnCow* this, PlayState* play) {
this->actionFunc = EnCow_Talk;
}
} else {
CLEAR_WEEKEVENTREG(WEEKEVENTREG_87_01);
CLEAR_WEEKEVENTREG(WEEKEVENTREG_TALKING_TO_COW_WITH_VOICE);
}
}
+1 -1
View File
@@ -700,7 +700,7 @@ weekEventReg = {
(86 << 8) | 0x20: "WEEKEVENTREG_86_20",
(86 << 8) | 0x40: "WEEKEVENTREG_86_40",
(86 << 8) | 0x80: "WEEKEVENTREG_86_80",
(87 << 8) | 0x01: "WEEKEVENTREG_87_01",
(87 << 8) | 0x01: "WEEKEVENTREG_TALKING_TO_COW_WITH_VOICE",
(87 << 8) | 0x02: "WEEKEVENTREG_87_02",
(87 << 8) | 0x04: "WEEKEVENTREG_87_04",
(87 << 8) | 0x08: "WEEKEVENTREG_87_08",