Starting message enum

This commit is contained in:
roeming
2025-06-19 15:34:57 -04:00
parent 3548520687
commit 3dd3cffc3c
5 changed files with 32 additions and 12 deletions
+1
View File
@@ -6,6 +6,7 @@
#include "m_play_h.h"
#include "m_lib.h"
#include "m_scene.h"
#include "m_msg_enum.h"
#ifdef __cplusplus
extern "C" {
+19
View File
@@ -0,0 +1,19 @@
#ifndef M_MSG_ENUM_H
#define M_MSG_ENUM_H
#define MSG_SHOP_OPEN 1997
#define MSG_SHOP_CLOSED_NORMAL 1998
#define MSG_SHOP_SPECIAL_PREEVENT 2002
#define MSG_REUSED_SOLD_OUT 2005
#define MSG_RAFFLE_TIME_ANNOUNCE 2006
#define MSG_RAFFLE_ENDED 2007
#define MSG_SHOP_RENEW 2008
#define MSG_SHOP_CLOSED_ENDEVENT 2009
#define MSG_HEM_INTRO 11344
#define MSG_HEM_GOLD_AXE1 11345
#endif // !M_MSG_ENUM_H
+1 -1
View File
@@ -152,7 +152,7 @@ static int aBRS_open_check(ACTOR* actor) {
static void aBRS_set_talk_info_close_wait(ACTOR* actor) {
rgba_t color;
mDemo_Set_msg_num(0x7D5);
mDemo_Set_msg_num(MSG_REUSED_SOLD_OUT);
mDemo_Set_talk_display_name(0);
mDemo_Set_camera(1);
mPlib_Set_able_hand_all_item_in_demo(1);
+1 -1
View File
@@ -183,7 +183,7 @@ static int aBGY_open_check() {
static void aBGY_set_talk_info_close_wait(ACTOR* actor) {
rgba_t window_color;
mDemo_Set_msg_num(0x7D5);
mDemo_Set_msg_num(MSG_REUSED_SOLD_OUT);
mDemo_Set_talk_display_name(FALSE);
mDemo_Set_ListenAble();
+10 -10
View File
@@ -68,8 +68,8 @@ static int aCNV_check_player(ACTOR* actorx, GAME_PLAY* play) {
dz = player->world.position.z - (actorx->world.position.z + 76.0f);
dist = SQ(dx) + SQ(dz);
if ((u16)player->shape_info.rotation.y > DEG2SHORT_ANGLE2(90.0f) && (u16)player->shape_info.rotation.y < DEG2SHORT_ANGLE2(180.f) &&
dist < 260.0f) {
if ((u16)player->shape_info.rotation.y > DEG2SHORT_ANGLE2(90.0f) &&
(u16)player->shape_info.rotation.y < DEG2SHORT_ANGLE2(180.f) && dist < 260.0f) {
ret = 2;
} else if (dist < 800.0f) {
ret = 1;
@@ -86,28 +86,28 @@ static void aCNV_set_talk_info_close_wait(ACTOR* actorx) {
now_sec = Common_Get(time.now_sec);
if (mSP_CheckFukubikiDay() != FALSE) {
if (now_sec >= (6 * mTM_SECONDS_IN_HOUR)) {
msg_no = mSP_ShopOpen() == mSP_SHOP_STATUS_PRE ? 0x7D6 : 0x7D7;
if (now_sec >= mTM_TIME2SEC(6, 0, 0)) {
msg_no = mSP_ShopOpen() == mSP_SHOP_STATUS_PRE ? MSG_RAFFLE_TIME_ANNOUNCE : MSG_RAFFLE_ENDED;
} else {
msg_no = 0x7CE;
msg_no = MSG_SHOP_CLOSED_NORMAL;
}
} else {
switch (mSP_ShopOpen()) {
case mSP_SHOP_STATUS_PRE: // 0
case mSP_SHOP_STATUS_END: // 1
msg_no = 0x7CE;
msg_no = MSG_SHOP_CLOSED_NORMAL;
break;
case mSP_SHOP_STATUS_PREEVENT: // 4
msg_no = 0x7D2;
msg_no = MSG_SHOP_SPECIAL_PREEVENT;
break;
case mSP_SHOP_STATUS_ENDEVENT: // 5
msg_no = 0x7D9;
msg_no = MSG_SHOP_CLOSED_ENDEVENT;
break;
case mSP_SHOP_STATUS_RENEW: // 3
msg_no = 0x7D8;
msg_no = MSG_SHOP_RENEW;
break;
default:
msg_no = 0x7CD;
msg_no = MSG_SHOP_OPEN;
break;
}
}