mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-04 10:26:19 -04:00
Merge pull request #504 from roeming/master
Start using `MSG_1234` macro for `mDemo_Set_msg_num` messages instead of ints
This commit is contained in:
@@ -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" {
|
||||
|
||||
+16288
File diff suppressed because it is too large
Load Diff
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -593,7 +593,7 @@ static void Cottage_demo_speak_go_out(ACTOR* actor) {
|
||||
island_villager = &Get_Island_Villager();
|
||||
|
||||
looks = mNpc_GetLooks(island_villager->id.npc_id);
|
||||
mDemo_Set_msg_num((looks & 0xFF) + 0x2AFF);
|
||||
mDemo_Set_msg_num((looks & 0xFF) + MSG_ISLANDER_NOENTRY_SLEEPING_BASE);
|
||||
mDemo_Set_talk_display_name(FALSE);
|
||||
mDemo_Set_camera(TRUE);
|
||||
mPlib_Set_able_hand_all_item_in_demo(TRUE);
|
||||
|
||||
@@ -68,8 +68,8 @@ static int aDPT_check_player(ACTOR* actorx, GAME_PLAY* play) {
|
||||
dz = player->world.position.z - (actorx->world.position.z + 96.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 < 240.0f) {
|
||||
if ((u16)player->shape_info.rotation.y > DEG2SHORT_ANGLE2(90.0f) &&
|
||||
(u16)player->shape_info.rotation.y < DEG2SHORT_ANGLE2(180.f) && dist < 240.0f) {
|
||||
ret = 2;
|
||||
} else if (dist < 820.0f) {
|
||||
ret = 1;
|
||||
@@ -87,27 +87,27 @@ static void aDPT_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;
|
||||
msg_no = mSP_ShopOpen() == mSP_SHOP_STATUS_PRE ? MSG_RAFFLE_TIME_ANNOUNCE : MSG_RAFFLE_ENDED;
|
||||
} else {
|
||||
msg_no = 0x7D0;
|
||||
msg_no = MSG_SHOP2_OPEN;
|
||||
}
|
||||
} else {
|
||||
switch (mSP_ShopOpen()) {
|
||||
case mSP_SHOP_STATUS_PRE: // 0
|
||||
case mSP_SHOP_STATUS_END: // 1
|
||||
msg_no = 0x7D0;
|
||||
msg_no = MSG_SHOP2_OPEN;
|
||||
break;
|
||||
case mSP_SHOP_STATUS_PREEVENT: // 4
|
||||
msg_no = 0x7D4;
|
||||
msg_no = MSG_SHOP2_SPECIAL_SALE;
|
||||
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 = 0x7D0;
|
||||
msg_no = MSG_SHOP2_OPEN;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ static void aDOU_set_talk_info(ACTOR* actor) {
|
||||
}
|
||||
|
||||
mDemo_Set_talk_turn(FALSE);
|
||||
mDemo_Set_msg_num(0x136B);
|
||||
mDemo_Set_msg_num(MSG_DOZOU);
|
||||
mDemo_Set_talk_display_name(FALSE);
|
||||
mDemo_Set_camera(TRUE);
|
||||
mPlib_Set_able_hand_all_item_in_demo(TRUE);
|
||||
|
||||
+47
-74
@@ -32,53 +32,34 @@ ACTOR_PROFILE Dump_Profile = {
|
||||
};
|
||||
|
||||
u8 aDUM_shadow_vtx_fix_flg_table[] = {
|
||||
1,0,0,1,
|
||||
1,0,0,1,
|
||||
1,0,0,1,
|
||||
1,0,0,1,
|
||||
1,0,0,1,
|
||||
1,0,0,1,
|
||||
1,0,0,1,
|
||||
1,0,0,1,
|
||||
1,0,0,1,
|
||||
1,0,0,1,
|
||||
1,0,0,1,
|
||||
1,0,0,1,
|
||||
1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1,
|
||||
1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1,
|
||||
};
|
||||
|
||||
bIT_ShadowData_c aDUM_shadow_data = {
|
||||
48,
|
||||
aDUM_shadow_vtx_fix_flg_table,
|
||||
60.0f,
|
||||
obj_dump_shadow_v,
|
||||
obj_dump_shadowT_model,
|
||||
48, aDUM_shadow_vtx_fix_flg_table, 60.0f, obj_dump_shadow_v, obj_dump_shadowT_model,
|
||||
};
|
||||
|
||||
static void aDUM_set_bgOffset(DUMP_ACTOR*, int);
|
||||
static void aDUM_setup_action(DUMP_ACTOR*, int);
|
||||
|
||||
static void aDUM_actor_ct(ACTOR* actor, GAME* game){
|
||||
static void aDUM_actor_ct(ACTOR* actor, GAME* game) {
|
||||
DUMP_ACTOR* dump = (DUMP_ACTOR*)actor;
|
||||
|
||||
dump->season = Common_Get(time.season);
|
||||
aDUM_set_bgOffset(dump,1);
|
||||
aDUM_setup_action(dump,0);
|
||||
dump->season = Common_Get(time.season);
|
||||
aDUM_set_bgOffset(dump, 1);
|
||||
aDUM_setup_action(dump, 0);
|
||||
actor->world.position.x -= 40.0f;
|
||||
}
|
||||
|
||||
static void aDUM_actor_dt(ACTOR* actor, GAME* game){
|
||||
static void aDUM_actor_dt(ACTOR* actor, GAME* game) {
|
||||
|
||||
actor->world.position.x += 40.0f;
|
||||
}
|
||||
|
||||
static void aDUM_set_bgOffset_sub(DUMP_ACTOR* dump, int x, int z, s16 mode){
|
||||
static void aDUM_set_bgOffset_sub(DUMP_ACTOR* dump, int x, int z, s16 mode) {
|
||||
static int flag_tbl[6][6] = {
|
||||
1,1,0,0,1,1,
|
||||
1,0,0,0,0,1,
|
||||
1,0,0,0,0,1,
|
||||
1,0,0,0,0,1,
|
||||
1,0,0,0,0,1,
|
||||
1,1,1,1,1,1,
|
||||
1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
|
||||
};
|
||||
xyz_t pos;
|
||||
|
||||
@@ -86,29 +67,28 @@ static void aDUM_set_bgOffset_sub(DUMP_ACTOR* dump, int x, int z, s16 mode){
|
||||
pos.y = dump->actor_class.home.position.y;
|
||||
pos.z = dump->actor_class.home.position.z - (z * 40);
|
||||
|
||||
if(flag_tbl[z][x] != 0){
|
||||
if (flag_tbl[z][x] != 0) {
|
||||
mCoBG_SetPlussOffset(pos, mode, 100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void aDUM_set_bgOffset(DUMP_ACTOR* dump, int s){
|
||||
static void aDUM_set_bgOffset(DUMP_ACTOR* dump, int s) {
|
||||
s16 mode = s ? 4 : 4;
|
||||
int i;
|
||||
for (i = 0; i < 6; i++) {
|
||||
aDUM_set_bgOffset_sub(dump,0,i,mode);
|
||||
aDUM_set_bgOffset_sub(dump,1,i,mode);
|
||||
aDUM_set_bgOffset_sub(dump,2,i,mode);
|
||||
aDUM_set_bgOffset_sub(dump,3,i,mode);
|
||||
aDUM_set_bgOffset_sub(dump,4,i,mode);
|
||||
aDUM_set_bgOffset_sub(dump,5,i,mode);
|
||||
aDUM_set_bgOffset_sub(dump, 0, i, mode);
|
||||
aDUM_set_bgOffset_sub(dump, 1, i, mode);
|
||||
aDUM_set_bgOffset_sub(dump, 2, i, mode);
|
||||
aDUM_set_bgOffset_sub(dump, 3, i, mode);
|
||||
aDUM_set_bgOffset_sub(dump, 4, i, mode);
|
||||
aDUM_set_bgOffset_sub(dump, 5, i, mode);
|
||||
}
|
||||
}
|
||||
|
||||
static void aDUM_set_talk_info(ACTOR* actor){
|
||||
static void aDUM_set_talk_info(ACTOR* actor) {
|
||||
rgba_t color;
|
||||
|
||||
mDemo_Set_msg_num(0x136A);
|
||||
|
||||
mDemo_Set_msg_num(MSG_4970);
|
||||
mDemo_Set_talk_display_name(0);
|
||||
mDemo_Set_camera(1);
|
||||
mPlib_Set_able_hand_all_item_in_demo(1);
|
||||
@@ -121,8 +101,7 @@ static void aDUM_set_talk_info(ACTOR* actor){
|
||||
mDemo_Set_talk_window_color(&color);
|
||||
}
|
||||
|
||||
|
||||
static void aDUM_wait(DUMP_ACTOR* dump, GAME_PLAY* play){
|
||||
static void aDUM_wait(DUMP_ACTOR* dump, GAME_PLAY* play) {
|
||||
ACTOR* actor = &dump->actor_class;
|
||||
|
||||
PLAYER_ACTOR* player = get_player_actor_withoutCheck(play);
|
||||
@@ -131,27 +110,26 @@ static void aDUM_wait(DUMP_ACTOR* dump, GAME_PLAY* play){
|
||||
xyz_t_move(&pos, &actor->world.position);
|
||||
|
||||
if ((mDemo_Check(7, actor) != 1) && (player != NULL) && (mDemo_Get_talk_actor() == NULL)) {
|
||||
|
||||
if(player->actor_class.world.position.z >= pos.z){
|
||||
|
||||
if(ABS(actor->player_angle_y) < 0x2000){
|
||||
if (player->actor_class.world.position.z >= pos.z) {
|
||||
|
||||
if (ABS(actor->player_angle_y) < 0x2000) {
|
||||
mDemo_Request(7, actor, aDUM_set_talk_info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aDUM_setup_action(DUMP_ACTOR* dump, int action){
|
||||
static DUMP_PROC process[] = {aDUM_wait};
|
||||
static void aDUM_setup_action(DUMP_ACTOR* dump, int action) {
|
||||
static DUMP_PROC process[] = { aDUM_wait };
|
||||
|
||||
dump->proc = process[action];
|
||||
dump->current_action = action;
|
||||
dump->current_action = action;
|
||||
}
|
||||
|
||||
|
||||
static void aDUM_actor_move(ACTOR* actor, GAME* game){
|
||||
static void aDUM_actor_move(ACTOR* actor, GAME* game) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
DUMP_ACTOR* dump = (DUMP_ACTOR*) actor;
|
||||
DUMP_ACTOR* dump = (DUMP_ACTOR*)actor;
|
||||
|
||||
PLAYER_ACTOR* player = get_player_actor_withoutCheck(play);
|
||||
|
||||
@@ -160,27 +138,25 @@ static void aDUM_actor_move(ACTOR* actor, GAME* game){
|
||||
mFI_Wpos2BlockNum(&dbx, &dbz, actor->world.position);
|
||||
mFI_Wpos2BlockNum(&pbx, &pbz, player->actor_class.world.position);
|
||||
|
||||
if ((mDemo_Check(1, &player->actor_class) == 0) && (mDemo_Check(5, &player->actor_class) == 0) && (mDemo_Check(0x10, &player->actor_class) == 0) && ((dbx != pbx) || (dbz != pbz))) {
|
||||
if ((mDemo_Check(1, &player->actor_class) == 0) && (mDemo_Check(5, &player->actor_class) == 0) &&
|
||||
(mDemo_Check(0x10, &player->actor_class) == 0) && ((dbx != pbx) || (dbz != pbz))) {
|
||||
Actor_delete(actor);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
dump->proc(dump, play);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aDUM_actor_init(ACTOR* actor, GAME* game){
|
||||
DUMP_ACTOR* dump = (DUMP_ACTOR*)actor;
|
||||
|
||||
static void aDUM_actor_init(ACTOR* actor, GAME* game) {
|
||||
DUMP_ACTOR* dump = (DUMP_ACTOR*)actor;
|
||||
|
||||
mFI_SetFG_common(0xF115, actor->home.position, 0);
|
||||
aDUM_actor_move(actor, game);
|
||||
actor->mv_proc = aDUM_actor_move;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void aDUM_actor_draw(ACTOR* actor, GAME* game){
|
||||
static Gfx* model[] = {dump_s_DL_model, dump_w_DL_model};
|
||||
DUMP_ACTOR* dump = (DUMP_ACTOR*)actor;
|
||||
static void aDUM_actor_draw(ACTOR* actor, GAME* game) {
|
||||
static Gfx* model[] = { dump_s_DL_model, dump_w_DL_model };
|
||||
DUMP_ACTOR* dump = (DUMP_ACTOR*)actor;
|
||||
|
||||
GRAPH* graph = game->graph;
|
||||
u16* pal;
|
||||
@@ -190,28 +166,25 @@ static void aDUM_actor_draw(ACTOR* actor, GAME* game){
|
||||
|
||||
type = dump->season == mTM_SEASON_WINTER;
|
||||
pal = Common_Get(clip.structure_clip)->get_pal_segment_proc(aSTR_PAL_DUMP);
|
||||
|
||||
|
||||
_texture_z_light_fog_prim_npc(graph);
|
||||
|
||||
OPEN_DISP(graph);
|
||||
|
||||
gfx = NOW_POLY_OPA_DISP;
|
||||
gSPSegment(gfx++, 0x8, pal);
|
||||
|
||||
gfx = NOW_POLY_OPA_DISP;
|
||||
gSPSegment(gfx++, 0x8, pal);
|
||||
|
||||
Matrix_translate(-6000.0f, 0.0f,-10000.0f, MTX_MULT);
|
||||
|
||||
cur =_Matrix_to_Mtx_new(graph);
|
||||
cur = _Matrix_to_Mtx_new(graph);
|
||||
|
||||
if(cur != NULL){
|
||||
gSPMatrix(gfx++, cur,G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
if (cur != NULL) {
|
||||
gSPMatrix(gfx++, cur, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfx++, model[type]);
|
||||
SET_POLY_OPA_DISP(gfx);
|
||||
}
|
||||
|
||||
(*Common_Get(clip).bg_item_clip->draw_shadow_proc)(game, &aDUM_shadow_data, FALSE);
|
||||
|
||||
|
||||
CLOSE_DISP(graph);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ static void aFLAG_actor_dt(ACTOR* actor, GAME* game) {
|
||||
static void aFLAG_set_talk_info(ACTOR* actor) {
|
||||
rgba_t window_color;
|
||||
|
||||
mDemo_Set_msg_num(0x3066);
|
||||
mDemo_Set_msg_num(MSG_12390);
|
||||
mDemo_Set_talk_display_name(FALSE);
|
||||
mDemo_Set_ListenAble();
|
||||
|
||||
|
||||
@@ -158,11 +158,11 @@ static int aHNW_decide_msg_idx_dance(ACTOR* actor) {
|
||||
|
||||
static void aHNW_set_talk_info_dance(ACTOR* actor) {
|
||||
static int msg_no[aHNW_MSG_NUM] = {
|
||||
0x0934, /* aHNW_MSG_NO_OWNER */
|
||||
0x0935, /* aHNW_MSG_PROCEEDS */
|
||||
0x0925, /* aHNW_MSG_NORMAL */
|
||||
0x0928, /* aHNW_MSG_OTHER_OWNER */
|
||||
0x092E /* aHNW_MSG_NEED_FRIEND */
|
||||
MSG_2356, /* aHNW_MSG_NO_OWNER */
|
||||
MSG_2357, /* aHNW_MSG_PROCEEDS */
|
||||
MSG_2341, /* aHNW_MSG_NORMAL */
|
||||
MSG_2344, /* aHNW_MSG_OTHER_OWNER */
|
||||
MSG_2350 /* aHNW_MSG_NEED_FRIEND */
|
||||
};
|
||||
|
||||
HANIWA_ACTOR* haniwa = (HANIWA_ACTOR*)actor;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
static void aHTC_ready(HATUMODE_CONTROL_ACTOR* hatumode_control, GAME_PLAY* play) {
|
||||
aEv_hatumode_save_c* hatumode_p = (aEv_hatumode_save_c*)mEv_get_save_area(1, 7);
|
||||
|
||||
|
||||
if (hatumode_p != NULL && hatumode_p->state == 1) {
|
||||
hatumode_control->actor_class.world.position.x = 20 + hatumode_p->yashiro_pos[0];
|
||||
hatumode_control->actor_class.world.position.z = 40 + hatumode_p->yashiro_pos[1];
|
||||
@@ -11,7 +11,7 @@ static void aHTC_ready(HATUMODE_CONTROL_ACTOR* hatumode_control, GAME_PLAY* play
|
||||
|
||||
static void aHTC_wait(HATUMODE_CONTROL_ACTOR* hatumode_control, GAME_PLAY* play) {
|
||||
aEv_hatumode_save_c* hatumode_p = (aEv_hatumode_save_c*)mEv_get_save_area(1, 7);
|
||||
|
||||
|
||||
if (hatumode_p->flags0 & 0x8000) {
|
||||
aHTC_setup_move_proc(hatumode_control, 2);
|
||||
}
|
||||
@@ -36,10 +36,10 @@ static void aHTC_request(HATUMODE_CONTROL_ACTOR* hatumode_control, GAME_PLAY* pl
|
||||
if (mDemo_Check(mDemo_TYPE_SPEAK, actorx) == TRUE) {
|
||||
if (mSP_money_check(50)) {
|
||||
aHTC_setup_move_proc(hatumode_control, 3);
|
||||
mDemo_Set_msg_num(0x112C);
|
||||
mDemo_Set_msg_num(MSG_4396);
|
||||
} else {
|
||||
aHTC_setup_move_proc(hatumode_control, 4);
|
||||
mDemo_Set_msg_num(0x112E);
|
||||
mDemo_Set_msg_num(MSG_4398);
|
||||
}
|
||||
} else {
|
||||
if (mDemo_Get_talk_actor() == NULL) {
|
||||
|
||||
@@ -40,7 +40,7 @@ static void aHUS_set_doorSE(HOUSE_ACTOR* house) {
|
||||
static f32 chk_pat_in[] = { 10.0f, 14.0f, 35.0f, 50.0f };
|
||||
static f32 chk_pat_out[] = { 2.0f, 8.0f, 33.0f, 40.0f };
|
||||
static u16 se_no[] = { NA_SE_6, NA_SE_7, NA_SE_8, NA_SE_9 };
|
||||
|
||||
|
||||
f32* chk_pat_p;
|
||||
int i;
|
||||
|
||||
@@ -98,13 +98,15 @@ static int aHUS_odekake_check(HOUSE_ACTOR* house, GAME_PLAY* play) {
|
||||
if (mEvNM_CheckJointEvent(name)) {
|
||||
house->arg0_f = 1.0f;
|
||||
ret = TRUE;
|
||||
} else if (mNpc_CheckNpcExistBlock(idx, play->block_table.block_x, play->block_table.block_z) && npc_actor_p != NULL) {
|
||||
} else if (mNpc_CheckNpcExistBlock(idx, play->block_table.block_x, play->block_table.block_z) &&
|
||||
npc_actor_p != NULL) {
|
||||
if (animal_p->is_home == TRUE) {
|
||||
if (house->arg3 == 2) {
|
||||
house->arg0_f = 2.0f;
|
||||
ret = TRUE;
|
||||
}
|
||||
} else if (mNpcW_GetWalkInfoStatusGoalAnimalIdx(&status, &goal, idx) && status == mNpcW_INFO_STATUS_WALKING && goal == mNpcW_GOAL_MY_HOME && !animal_p->is_home) {
|
||||
} else if (mNpcW_GetWalkInfoStatusGoalAnimalIdx(&status, &goal, idx) && status == mNpcW_INFO_STATUS_WALKING &&
|
||||
goal == mNpcW_GOAL_MY_HOME && !animal_p->is_home) {
|
||||
house->arg0_f = 1.0f;
|
||||
ret = TRUE;
|
||||
}
|
||||
@@ -196,7 +198,8 @@ static void aHUS_setup_animation(HOUSE_ACTOR* house, f32 speed) {
|
||||
start = start_idx[type];
|
||||
end = end_idx[type];
|
||||
|
||||
cKF_SkeletonInfo_R_init(&house->keyframe, house->keyframe.skeleton, anim_p, start, end, start, speed, 0.0f, cKF_FRAMECONTROL_STOP, NULL);
|
||||
cKF_SkeletonInfo_R_init(&house->keyframe, house->keyframe.skeleton, anim_p, start, end, start, speed, 0.0f,
|
||||
cKF_FRAMECONTROL_STOP, NULL);
|
||||
}
|
||||
|
||||
static void aHUS_rewrite_out_data(HOUSE_ACTOR* house, GAME_PLAY* play) {
|
||||
@@ -234,9 +237,9 @@ static void aHUS_set_talk_info_check_player(ACTOR* actorx) {
|
||||
int msg_no;
|
||||
|
||||
if (house->arg0_f == 2.0f) {
|
||||
msg_no = 0x1363 + aHUS_GET_LOOKS(house); // Sleeping
|
||||
msg_no = MSG_4963 + aHUS_GET_LOOKS(house); // Sleeping
|
||||
} else {
|
||||
msg_no = 0x2AFE; // I'm not in right now.
|
||||
msg_no = MSG_11006; // I'm not in right now.
|
||||
}
|
||||
|
||||
mDemo_Set_msg_num(msg_no);
|
||||
@@ -477,7 +480,7 @@ static void aHUS_actor_move(ACTOR* actorx, GAME* game) {
|
||||
static void aHUS_actor_init(ACTOR* actorx, GAME* game) {
|
||||
mActor_name_t name;
|
||||
|
||||
name =actorx->npc_id;
|
||||
name = actorx->npc_id;
|
||||
name = name - NPC_HOUSE_START + DUMMY_NPC_HOUSE_000;
|
||||
mFI_SetFG_common(name, actorx->home.position, FALSE);
|
||||
aHUS_actor_move(actorx, game);
|
||||
|
||||
@@ -98,7 +98,7 @@ static void aMSC_menu_close_wait(MSCORE_CONTROL_ACTOR* mscore_ctrl, GAME_PLAY* p
|
||||
}
|
||||
|
||||
static void aMSC_set_force_talk_info_talk_request(ACTOR* actorx) {
|
||||
mDemo_Set_msg_num(0x3DDA);
|
||||
mDemo_Set_msg_num(MSG_15834);
|
||||
mDemo_Set_talk_turn(FALSE);
|
||||
mDemo_Set_camera(CAMERA2_PROCESS_STOP);
|
||||
mDemo_Set_talk_display_name(FALSE);
|
||||
|
||||
+22
-56
@@ -615,8 +615,6 @@ void Museum_Fish_Actor_dt(ACTOR* actor, GAME* game) {
|
||||
}
|
||||
|
||||
int Museum_Fish_GetMsgNo(MUSEUM_FISH_ACTOR* actor) {
|
||||
// MUSEUM_FISH_ACTOR* actor = (MUSEUM_FISH_ACTOR*)actorx;
|
||||
|
||||
static u8 item_name[mIN_ITEM_NAME_LEN];
|
||||
int itemArticle;
|
||||
mMsg_Window_c* msg;
|
||||
@@ -633,16 +631,16 @@ int Museum_Fish_GetMsgNo(MUSEUM_FISH_ACTOR* actor) {
|
||||
|
||||
if (actor->fishDisplayMsgIter < actor->numFishDisplayed - 1) {
|
||||
if (fishInfo >= 1 && fishInfo <= 4) {
|
||||
return 0x2fa2;
|
||||
return MSG_12194;
|
||||
} else {
|
||||
return 0x2fa3;
|
||||
return MSG_12195;
|
||||
}
|
||||
}
|
||||
|
||||
if (fishInfo >= 1 && fishInfo <= 4) {
|
||||
return 0x2f9f;
|
||||
return MSG_12191;
|
||||
} else {
|
||||
return 0x2fa0;
|
||||
return MSG_12192;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -674,62 +672,30 @@ void Museum_Fish_Set_MsgFishInfo(MUSEUM_FISH_ACTOR* actor, int param2) {
|
||||
// defines how many fish are in each grouping of fish names
|
||||
static int group_max_num[5] = { 10, 9, 9, 6, 6 };
|
||||
static int group_A_fish_name[10] = {
|
||||
aGYO_TYPE_CRUCIAN_CARP,
|
||||
aGYO_TYPE_BROOK_TROUT,
|
||||
aGYO_TYPE_CARP,
|
||||
aGYO_TYPE_KOI,
|
||||
aGYO_TYPE_BARBEL_STEED,
|
||||
aGYO_TYPE_BITTERLING,
|
||||
aGYO_TYPE_EEL,
|
||||
aGYO_TYPE_GOLDFISH,
|
||||
aGYO_TYPE_POPEYED_GOLDFISH,
|
||||
aGYO_TYPE_KILLIFISH,
|
||||
aGYO_TYPE_CRUCIAN_CARP, aGYO_TYPE_BROOK_TROUT, aGYO_TYPE_CARP, aGYO_TYPE_KOI,
|
||||
aGYO_TYPE_BARBEL_STEED, aGYO_TYPE_BITTERLING, aGYO_TYPE_EEL, aGYO_TYPE_GOLDFISH,
|
||||
aGYO_TYPE_POPEYED_GOLDFISH, aGYO_TYPE_KILLIFISH,
|
||||
};
|
||||
static int group_B_fish_name[9] = {
|
||||
aGYO_TYPE_CATFISH,
|
||||
aGYO_TYPE_GIANT_CATFISH,
|
||||
aGYO_TYPE_LOACH,
|
||||
aGYO_TYPE_BLUEGILL,
|
||||
aGYO_TYPE_SMALL_BASS,
|
||||
aGYO_TYPE_BASS,
|
||||
aGYO_TYPE_LARGE_BASS,
|
||||
aGYO_TYPE_FRESHWATER_GOBY,
|
||||
aGYO_TYPE_FROG,
|
||||
aGYO_TYPE_CATFISH, aGYO_TYPE_GIANT_CATFISH, aGYO_TYPE_LOACH, aGYO_TYPE_BLUEGILL, aGYO_TYPE_SMALL_BASS,
|
||||
aGYO_TYPE_BASS, aGYO_TYPE_LARGE_BASS, aGYO_TYPE_FRESHWATER_GOBY, aGYO_TYPE_FROG,
|
||||
};
|
||||
static int group_C_fish_name[9] = {
|
||||
aGYO_TYPE_DACE,
|
||||
aGYO_TYPE_PALE_CHUB,
|
||||
aGYO_TYPE_POND_SMELT,
|
||||
aGYO_TYPE_SWEETFISH,
|
||||
aGYO_TYPE_CHERRY_SALMON,
|
||||
aGYO_TYPE_RAINBOW_TROUT,
|
||||
aGYO_TYPE_LARGE_CHAR,
|
||||
aGYO_TYPE_STRINGFISH,
|
||||
aGYO_TYPE_CRAWFISH,
|
||||
aGYO_TYPE_DACE, aGYO_TYPE_PALE_CHUB, aGYO_TYPE_POND_SMELT,
|
||||
aGYO_TYPE_SWEETFISH, aGYO_TYPE_CHERRY_SALMON, aGYO_TYPE_RAINBOW_TROUT,
|
||||
aGYO_TYPE_LARGE_CHAR, aGYO_TYPE_STRINGFISH, aGYO_TYPE_CRAWFISH,
|
||||
};
|
||||
static int group_D_fish_name[6] = {
|
||||
aGYO_TYPE_GIANT_SNAKEHEAD,
|
||||
aGYO_TYPE_GUPPY,
|
||||
aGYO_TYPE_ANGELFISH,
|
||||
aGYO_TYPE_PIRANHA,
|
||||
aGYO_TYPE_AROWANA,
|
||||
aGYO_TYPE_ARAPAIMA,
|
||||
aGYO_TYPE_GIANT_SNAKEHEAD, aGYO_TYPE_GUPPY, aGYO_TYPE_ANGELFISH,
|
||||
aGYO_TYPE_PIRANHA, aGYO_TYPE_AROWANA, aGYO_TYPE_ARAPAIMA,
|
||||
};
|
||||
static int group_E_fish_name[6] = {
|
||||
aGYO_TYPE_SALMON,
|
||||
aGYO_TYPE_COELACANTH,
|
||||
aGYO_TYPE_JELLYFISH,
|
||||
aGYO_TYPE_SEA_BASS,
|
||||
aGYO_TYPE_RED_SNAPPER,
|
||||
aGYO_TYPE_BARRED_KNIFEJAW,
|
||||
aGYO_TYPE_SALMON, aGYO_TYPE_COELACANTH, aGYO_TYPE_JELLYFISH,
|
||||
aGYO_TYPE_SEA_BASS, aGYO_TYPE_RED_SNAPPER, aGYO_TYPE_BARRED_KNIFEJAW,
|
||||
};
|
||||
|
||||
static int* group_fish_name[5] = {
|
||||
group_A_fish_name,
|
||||
group_B_fish_name,
|
||||
group_C_fish_name,
|
||||
group_D_fish_name,
|
||||
group_E_fish_name,
|
||||
group_A_fish_name, group_B_fish_name, group_C_fish_name, group_D_fish_name, group_E_fish_name,
|
||||
};
|
||||
|
||||
actor->numFishDisplayed = 0;
|
||||
@@ -751,15 +717,15 @@ void Museum_Fish_set_talk_info(ACTOR* actorx) {
|
||||
MUSEUM_FISH_ACTOR* actor = (MUSEUM_FISH_ACTOR*)actorx;
|
||||
|
||||
static rgba_t window_color = { 255, 255, 205, 255 };
|
||||
int r3;
|
||||
int msg_no;
|
||||
if (actor->numFishDisplayed > 0) { // maybe related to if there are fish in the tank
|
||||
r3 = Museum_Fish_GetMsgNo(actor);
|
||||
msg_no = Museum_Fish_GetMsgNo(actor);
|
||||
actor->fishDisplayMsgIter++; // maybe iterating through the fish donation record, given which fish are donated?
|
||||
} else {
|
||||
r3 = 0x2fa1;
|
||||
msg_no = MSG_12193;
|
||||
}
|
||||
|
||||
mDemo_Set_msg_num(r3);
|
||||
mDemo_Set_msg_num(msg_no);
|
||||
mDemo_Set_talk_window_color(&window_color);
|
||||
mDemo_Set_talk_display_name(0);
|
||||
mDemo_Set_ListenAble();
|
||||
@@ -858,7 +824,7 @@ void Museum_Fish_Actor_move(ACTOR* actorx, GAME* game) {
|
||||
actor->_14d50[i]--;
|
||||
if (actor->_14d50[i] < 0) {
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_SUISOU_AWA, suisou_awa_pos[i], 2, 0, game, RSV_NO,
|
||||
suisou_awa_group[i], 0);
|
||||
suisou_awa_group[i], 0);
|
||||
if (actor->_14d78[i] > 0) {
|
||||
actor->_14d78[i]--;
|
||||
actor->_14d50[i] = RANDOMF_RANGE(2, 10);
|
||||
|
||||
@@ -103,8 +103,8 @@ static void Museum_Fossil_Actor_move(ACTOR* actorx, GAME* game) {
|
||||
res = mRmTp_CheckTalkAble(&angle, &pos, aMF_fossil_data_table[i].direct, 42.5f, (GAME_PLAY*)game);
|
||||
if (res != FALSE) {
|
||||
museum_fossil->msg_no = (donator == mMmd_DONATOR_NONE)
|
||||
? 0x2FA1
|
||||
: ((donator == mMmd_DONATOR_DELETED_PLAYER) ? 0x2FA0 : 0x2F9F);
|
||||
? MSG_12193
|
||||
: ((donator == mMmd_DONATOR_DELETED_PLAYER) ? MSG_12192 : MSG_12191);
|
||||
museum_fossil->target_angle = angle;
|
||||
if (mDemo_Request(mDemo_TYPE_SPEAK, actorx, &aMF_SetTalkInfo)) {
|
||||
if (mMmd_IS_DONATED(donator)) {
|
||||
|
||||
@@ -708,15 +708,15 @@ int Museum_Insect_GetMsgNo(ACTOR* actorx) {
|
||||
|
||||
if (actor->_2F7C < actor->_2F78 - 1) {
|
||||
if (insect_caught_by >= 1 && insect_caught_by <= 4) {
|
||||
msgNo = 0x2fa2;
|
||||
msgNo = MSG_12194;
|
||||
} else {
|
||||
msgNo = 0x2fa3;
|
||||
msgNo = MSG_12195;
|
||||
}
|
||||
} else {
|
||||
if (insect_caught_by >= 1 && insect_caught_by <= 4) {
|
||||
msgNo = 0x2f9f;
|
||||
msgNo = MSG_12191;
|
||||
} else {
|
||||
msgNo = 0x2fa0;
|
||||
msgNo = MSG_12192;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -770,15 +770,15 @@ void Museum_Insect_Set_MsgInsectInfo(ACTOR* actorx, int groupNum) {
|
||||
|
||||
void Museum_Insect_set_talk_info(ACTOR* actorx) {
|
||||
MUSEUM_INSECT_ACTOR* actor = (MUSEUM_INSECT_ACTOR*)actorx;
|
||||
int x;
|
||||
int msg_no;
|
||||
if (actor->_2F78 > 0) {
|
||||
x = Museum_Insect_GetMsgNo(actorx);
|
||||
msg_no = Museum_Insect_GetMsgNo(actorx);
|
||||
actor->_2F7C++;
|
||||
} else {
|
||||
x = 0x2fa1;
|
||||
msg_no = MSG_12193;
|
||||
}
|
||||
mDemo_Set_talk_window_color(&window_color);
|
||||
mDemo_Set_msg_num(x);
|
||||
mDemo_Set_msg_num(msg_no);
|
||||
mDemo_Set_talk_display_name(FALSE);
|
||||
mDemo_Set_ListenAble();
|
||||
mDemo_Set_camera(CAMERA2_PROCESS_NORMAL);
|
||||
|
||||
@@ -83,13 +83,13 @@ void goki_set_talk_info_init(ACTOR* actor) {
|
||||
int info = mMmd_InsectInfo(0x1c);
|
||||
int i;
|
||||
if (info < 1 || info > 4) {
|
||||
i = 0x2fa5;
|
||||
i = MSG_12197;
|
||||
} else {
|
||||
if (info >= 1 && info <= 4) {
|
||||
mMsg_Set_free_str(mMsg_Get_base_window_p(), mMsg_FREE_STR0,
|
||||
common_data.save.save.private_data[info - 1].player_ID.player_name, 8);
|
||||
}
|
||||
i = 0x2fa4;
|
||||
i = MSG_12196;
|
||||
}
|
||||
mDemo_Set_talk_window_color(&window_color);
|
||||
mDemo_Set_talk_display_name(0);
|
||||
|
||||
@@ -179,8 +179,8 @@ static void Museum_Picture_Actor_move(ACTOR* actorx, GAME* game) {
|
||||
|
||||
if (aMP_CheckTalkAbleDist(&aMP_art_data_table[i].pos, game)) {
|
||||
museum_picture->msg_no = (donator == mMmd_DONATOR_NONE)
|
||||
? 0x2FA1
|
||||
: ((donator == mMmd_DONATOR_DELETED_PLAYER) ? 0x2FA0 : 0x2F9F);
|
||||
? MSG_12193
|
||||
: ((donator == mMmd_DONATOR_DELETED_PLAYER) ? MSG_12192 : MSG_12191);
|
||||
if (mDemo_Request(mDemo_TYPE_SPEAK, actorx, &aMP_SetTalkInfo) && mMmd_IS_DONATED(donator)) {
|
||||
mActor_name_t item = (i >= 0 && i < mMmd_ART_NUM)
|
||||
? (mActor_name_t)(FTR_PAINTING0 + (mActor_name_t)(i << 2))
|
||||
|
||||
@@ -1648,33 +1648,33 @@ static aMR_MSG_CTRL_PROC msg_ctrl_table[aMR_MSG_STATE_NUM] = {
|
||||
static int aMR_msg_no_table[aMR_MSG_STATE_NUM] = {
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
0x0A0A,
|
||||
0x0A0B,
|
||||
0x2F1A,
|
||||
0x2F1B,
|
||||
0x2F1E,
|
||||
MSG_2570,
|
||||
MSG_2571,
|
||||
MSG_12058,
|
||||
MSG_12059,
|
||||
MSG_12062,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
0x0A0C,
|
||||
0x0A0D,
|
||||
0x2F1C,
|
||||
0x2F1D,
|
||||
MSG_2572,
|
||||
MSG_2573,
|
||||
MSG_12060,
|
||||
MSG_12061,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
0x2F1F,
|
||||
0x2F1F,
|
||||
MSG_12063,
|
||||
MSG_12063,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
0x10B7,
|
||||
0x10BE,
|
||||
0x10B8,
|
||||
0x10B9,
|
||||
0x10BA,
|
||||
MSG_4279,
|
||||
MSG_4286,
|
||||
MSG_4280,
|
||||
MSG_4281,
|
||||
MSG_4282,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
@@ -1683,27 +1683,27 @@ static int aMR_msg_no_table[aMR_MSG_STATE_NUM] = {
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
0x10BC,
|
||||
MSG_4284,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
0x2B72,
|
||||
MSG_11122,
|
||||
aMR_NO_MSG,
|
||||
0x2B72,
|
||||
MSG_11122,
|
||||
aMR_NO_MSG,
|
||||
0x3068,
|
||||
0x3068,
|
||||
MSG_12392,
|
||||
MSG_12392,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
0x2B69,
|
||||
MSG_11113,
|
||||
aMR_NO_MSG,
|
||||
0x306C,
|
||||
0x306B,
|
||||
0x3A8A,
|
||||
0x3AF1,
|
||||
0x3B58,
|
||||
0x2B6B,
|
||||
MSG_12396,
|
||||
MSG_12395,
|
||||
MSG_14986,
|
||||
MSG_15089,
|
||||
MSG_15192,
|
||||
MSG_11115,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
aMR_NO_MSG,
|
||||
@@ -1930,7 +1930,7 @@ static int aMR_GetMessageNum(s16 msg_state, MY_ROOM_ACTOR* my_room) {
|
||||
FTR_ACTOR* ftr_actor = &l_aMR_work.ftr_actor_list[my_room->demo_ftrID];
|
||||
if (msg_state == aMR_MSG_STATE_OTHER_NO_ITEM) {
|
||||
if (Save_Get(scene_no) == SCENE_NPC_HOUSE || Save_Get(scene_no) == SCENE_COTTAGE_NPC) {
|
||||
return 0x2988 + ((ftr_actor->name + my_room->demo_ftrID) & 0xF);
|
||||
return MSG_10632 + ((ftr_actor->name + my_room->demo_ftrID) & 0xF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ static void aNP_set_talk_info(ACTOR* actor) {
|
||||
|
||||
mNpc_GetAnimalPlateName(name, actor->world.position);
|
||||
mMsg_Set_free_str(mMsg_Get_base_window_p(), 0, name, ANIMAL_NAME_LEN);
|
||||
mDemo_Set_msg_num(0x1369);
|
||||
mDemo_Set_msg_num(MSG_4969);
|
||||
mDemo_Set_talk_display_name(0);
|
||||
mDemo_Set_ListenAble();
|
||||
mDemo_Set_camera(TRUE);
|
||||
|
||||
@@ -197,7 +197,7 @@ static void aNW_open_door_demo_ct() {
|
||||
static void aNW_talk_door_demo_ct() {
|
||||
static rgba_t window_color = { 145, 60, 40, 255 };
|
||||
|
||||
mDemo_Set_msg_num(0x7DA);
|
||||
mDemo_Set_msg_num(MSG_2010);
|
||||
mDemo_Set_talk_display_name(FALSE);
|
||||
mDemo_Set_camera(CAMERA2_PROCESS_NORMAL);
|
||||
mPlib_Set_able_hand_all_item_in_demo(TRUE);
|
||||
|
||||
@@ -70,7 +70,7 @@ static void aPSM_actor_ct(ACTOR* actor, GAME* game) {
|
||||
|
||||
Shape_Info_init(actor, 0.0f, mAc_ActorShadowEllipse, shadow_size, shadow_size);
|
||||
|
||||
snowman->message_num = 0x8A1 + ((Common_Get(snowman_msg_id) + id) % 3) + (current_data->score * 3);
|
||||
snowman->message_num = MSG_2209 + ((Common_Get(snowman_msg_id) + id) % 3) + (current_data->score * 3);
|
||||
|
||||
mCoBG_SetPlussOffset(actor->home.position, 3, 100);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,8 @@ static int aPT_SendMail(GAME* game) {
|
||||
}
|
||||
|
||||
paper_type = (u32)aPT_receive_buf[aPT_MAIL_PAPER_TYPE_OFS] % PAPER_UNIQUE_NUM;
|
||||
present = (mActor_name_t)((aPT_receive_buf[aPT_MAIL_PRESENT_OFS] << 8) | (aPT_receive_buf[aPT_MAIL_PRESENT_OFS + 1]));
|
||||
present =
|
||||
(mActor_name_t)((aPT_receive_buf[aPT_MAIL_PRESENT_OFS] << 8) | (aPT_receive_buf[aPT_MAIL_PRESENT_OFS + 1]));
|
||||
npc_id = (mActor_name_t)((aPT_receive_buf[aPT_MAIL_NPC_ID_OFS] << 8) | (aPT_receive_buf[aPT_MAIL_NPC_ID_OFS + 1]));
|
||||
header_back_start = aPT_receive_buf[aPT_MAIL_HEADER_BACK_START_OFS];
|
||||
if (header_back_start >= MAIL_HEADER_LEN) {
|
||||
@@ -135,7 +136,7 @@ static int aPT_SendMail(GAME* game) {
|
||||
mail.present = present;
|
||||
mail.content.header_back_start = header_back_start;
|
||||
mail.content.font = mMl_FONT_RECV;
|
||||
|
||||
|
||||
// @BUG - the '== NAME_TYPE_SPNPC' should not be in the macro call
|
||||
#ifndef BUGFIXES
|
||||
if (ITEM_NAME_GET_TYPE(npc_id == NAME_TYPE_SPNPC)) {
|
||||
@@ -149,10 +150,11 @@ static int aPT_SendMail(GAME* game) {
|
||||
mail.header.recipient.type = mMl_NAME_TYPE_PLAYER;
|
||||
bcopy(submenu_name_str, mail.header.sender.personalID.player_name, sizeof(submenu_name_str));
|
||||
mail.header.sender.type = mMl_NAME_TYPE_NPC;
|
||||
|
||||
|
||||
idx = aPT_CheckMailBoxVac();
|
||||
if (idx != -1) {
|
||||
mMl_copy_mail(&Save_GetPointer(homes[mHS_get_arrange_idx(Common_Get(player_no) & 3)])->mailbox[idx], &mail);
|
||||
mMl_copy_mail(&Save_GetPointer(homes[mHS_get_arrange_idx(Common_Get(player_no) & 3)])->mailbox[idx],
|
||||
&mail);
|
||||
ret = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -160,7 +162,7 @@ static int aPT_SendMail(GAME* game) {
|
||||
mEA_SetLetterCardE(card_no);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -499,13 +501,14 @@ static void Pterminal_Actor_move(ACTOR* actorx, GAME* game) {
|
||||
if (mDemo_Check(mDemo_TYPE_SPEAK, actorx)) {
|
||||
ACTOR* playerx = GET_PLAYER_ACTOR_GAME_ACTOR(game);
|
||||
s_xyz player_angle = playerx->shape_info.rotation;
|
||||
|
||||
|
||||
if (actor->proc >= 0 && actor->proc < aPT_PROC_NUM) {
|
||||
(*aPT_stat_main_proc_table[actor->proc])(actor, game);
|
||||
}
|
||||
|
||||
add_calc_short_angle2(&player_angle.y, DEG2SHORT_ANGLE2(-90.0f), CALC_EASE(0.3f), DEG2SHORT_ANGLE2(11.25f), 0);
|
||||
GET_PLAYER_ACTOR_GAME(gamePT)->Set_force_position_angle_proc(gamePT, NULL, &player_angle, mPlayer_FORCE_POSITION_ANGLE_ROTY);
|
||||
GET_PLAYER_ACTOR_GAME(gamePT)->Set_force_position_angle_proc(gamePT, NULL, &player_angle,
|
||||
mPlayer_FORCE_POSITION_ANGLE_ROTY);
|
||||
} else {
|
||||
if (chkTrigger(BUTTON_A) && mDemo_Get_talk_actor() == NULL && actor->proc == aPT_PROC_WAIT) {
|
||||
xyz_t pos = { 60.0f, 40.0f, 220.0f };
|
||||
@@ -514,10 +517,10 @@ static void Pterminal_Actor_move(ACTOR* actorx, GAME* game) {
|
||||
int player_no = Common_Get(player_no);
|
||||
|
||||
if (player_no < PLAYER_NUM) {
|
||||
actor->msg_no = 0x3DEE;
|
||||
actor->msg_no = MSG_15854;
|
||||
actor->next_proc = aPT_PROC_FIRST_QUESTION;
|
||||
} else {
|
||||
actor->msg_no = 0x3DEB;
|
||||
actor->msg_no = MSG_15851;
|
||||
actor->next_proc = aPT_PROC_WAIT;
|
||||
}
|
||||
|
||||
|
||||
+149
-176
@@ -18,34 +18,34 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
aQMgr_MEET_TIME_HELLO_HOW_DO_YOU_DO, // first meeting
|
||||
aQMgr_MEET_TIME_HELLO_AGAIN, // more than first time spoken to today
|
||||
aQMgr_MEET_TIME_FIRST_HELLO, // first time spoken to today
|
||||
aQMgr_MEET_TIME_A_LONG_TIME, // first time spoken to 'in a long time'
|
||||
aQMgr_MEET_TIME_A_REALLY_LONG_TIME, // first time spoken to 'in a really long time'
|
||||
aQMgr_MEET_TIME_FIRST_HELLO_FOREIGN_TOWN, // first time spoken to today in a foreign town
|
||||
aQMgr_MEET_TIME_A_LONG_TIME_FOREIGN_TOWN, // first time spoken to 'in a long time' in a foreign town
|
||||
aQMgr_MEET_TIME_A_REALLY_LONG_TIME_FOREIGN_TOWN, // first time spoken to 'in a really long time' in a foreign town
|
||||
aQMgr_MEET_TIME_HELLO_HOW_DO_YOU_DO, // first meeting
|
||||
aQMgr_MEET_TIME_HELLO_AGAIN, // more than first time spoken to today
|
||||
aQMgr_MEET_TIME_FIRST_HELLO, // first time spoken to today
|
||||
aQMgr_MEET_TIME_A_LONG_TIME, // first time spoken to 'in a long time'
|
||||
aQMgr_MEET_TIME_A_REALLY_LONG_TIME, // first time spoken to 'in a really long time'
|
||||
aQMgr_MEET_TIME_FIRST_HELLO_FOREIGN_TOWN, // first time spoken to today in a foreign town
|
||||
aQMgr_MEET_TIME_A_LONG_TIME_FOREIGN_TOWN, // first time spoken to 'in a long time' in a foreign town
|
||||
aQMgr_MEET_TIME_A_REALLY_LONG_TIME_FOREIGN_TOWN, // first time spoken to 'in a really long time' in a foreign town
|
||||
|
||||
aQMgr_MEET_TIME_NUM
|
||||
};
|
||||
|
||||
//clang-format off
|
||||
static int l_hello_fine_msg_tbl[] = { 0x04BD, 0x054D, 0x0505, 0x05DD, 0x066D, 0x0595, 0x0625, 0x06B5 };
|
||||
static int l_hello_fine_island_msg_tbl[] = { 0x3458, 0x3507, 0x34EF, 0x354F, 0x354F, 0x354F, 0x354F, 0x354F };
|
||||
static int l_hello_rain_msg_tbl[] = { 0x04BD, 0x0C1B, 0x0BD3, 0x05DD, 0x066D, 0x0595, 0x0625, 0x06B5 };
|
||||
static int l_hello_snow_msg_tbl[] = { 0x04BD, 0x0CAB, 0x0C63, 0x05DD, 0x066D, 0x0595, 0x0625, 0x06B5 };
|
||||
static int l_grad_hello_msg_tbl[] = { 0x1224, 0x12B4, 0x126C, 0x126C, 0x126C, 0x126C, 0x126C, 0x126C };
|
||||
static int l_indoor_hello_msg_tbl[] = { 0x20D4, 0x226C, 0x2224, 0x22FC, 0x22B4, 0x21DC, 0x2194, 0x214C };
|
||||
// clang-format off
|
||||
static int l_hello_fine_msg_tbl[] = { MSG_1213, MSG_1357, MSG_1285, MSG_1501, MSG_1645, MSG_1429, MSG_1573, MSG_1717 };
|
||||
static int l_hello_fine_island_msg_tbl[] = { MSG_13400, MSG_13575, MSG_13551, MSG_13647, MSG_13647, MSG_13647, MSG_13647, MSG_13647 };
|
||||
static int l_hello_rain_msg_tbl[] = { MSG_1213, MSG_3099, MSG_3027, MSG_1501, MSG_1645, MSG_1429, MSG_1573, MSG_1717 };
|
||||
static int l_hello_snow_msg_tbl[] = { MSG_1213, MSG_3243, MSG_3171, MSG_1501, MSG_1645, MSG_1429, MSG_1573, MSG_1717 };
|
||||
static int l_grad_hello_msg_tbl[] = { MSG_4644, MSG_4788, MSG_4716, MSG_4716, MSG_4716, MSG_4716, MSG_4716, MSG_4716 };
|
||||
static int l_indoor_hello_msg_tbl[] = { MSG_8404, MSG_8812, MSG_8740, MSG_8956, MSG_8884, MSG_8668, MSG_8596, MSG_8524 };
|
||||
|
||||
static int l_hello_rage_msg[] = { 0x0CF3, 0x0CF8, 0x0CFD, 0x0D02, 0x0D07, 0x0D0C };
|
||||
static int l_hello_rage_island_msg[] = { 0x3476, 0x3479, 0x347C, 0x347F, 0x3482, 0x3485 };
|
||||
static int l_hello_sad_msg[] = { 0x0D11, 0x0D16, 0x0D1B, 0x0D20, 0x0D25, 0x0D2A };
|
||||
static int l_hello_sad_island_msg[] = { 0x3488, 0x348B, 0x348E, 0x3491, 0x3494, 0x3497 };
|
||||
static int l_hello_sleep_msg[] = { 0x0D2F, 0x0D34, 0x0D39, 0x0D3E, 0x0D43, 0x0D48 };
|
||||
static int l_hello_uzai_msg[] = { 0x2E7D, 0x2E88, 0x2E78, 0x2E93, 0x2E98, 0x2EA3 };
|
||||
static int l_hello_uzai_island_msg[] = { 0x349A, 0x349D, 0x34A0, 0x34A3, 0x34A6, 0x34A9 };
|
||||
//clang-format on
|
||||
static int l_hello_rage_msg[] = { MSG_3315, MSG_3320, MSG_3325, MSG_3330, MSG_3335, MSG_3340 };
|
||||
static int l_hello_rage_island_msg[] = { MSG_13430, MSG_13433, MSG_13436, MSG_13439, MSG_13442, MSG_13445 };
|
||||
static int l_hello_sad_msg[] = { MSG_3345, MSG_3350, MSG_3355, MSG_3360, MSG_3365, MSG_3370 };
|
||||
static int l_hello_sad_island_msg[] = { MSG_13448, MSG_13451, MSG_13454, MSG_13457, MSG_13460, MSG_13463 };
|
||||
static int l_hello_sleep_msg[] = { MSG_3375, MSG_3380, MSG_3385, MSG_3390, MSG_3395, MSG_3400 };
|
||||
static int l_hello_uzai_msg[] = { MSG_11901, MSG_11912, MSG_11896, MSG_11923, MSG_11928, MSG_11939 };
|
||||
static int l_hello_uzai_island_msg[] = { MSG_13466, MSG_13469, MSG_13472, MSG_13475, MSG_13478, MSG_13481 };
|
||||
// clang-format on
|
||||
|
||||
static void aQMgr_actor_set_day_str(int day, int str_no) {
|
||||
if (day >= 0) {
|
||||
@@ -56,7 +56,8 @@ static void aQMgr_actor_set_day_str(int day, int str_no) {
|
||||
}
|
||||
}
|
||||
|
||||
static int aQMgr_actor_get_my_hello_msg_com(aQMgr_GET_TIME_KIND_PROC get_time_kind_proc, int base_msg, int looks, int hour, int kind_count) {
|
||||
static int aQMgr_actor_get_my_hello_msg_com(aQMgr_GET_TIME_KIND_PROC get_time_kind_proc, int base_msg, int looks,
|
||||
int hour, int kind_count) {
|
||||
int msg_no = base_msg + looks * kind_count * 4;
|
||||
int time_kind = (*get_time_kind_proc)(hour);
|
||||
|
||||
@@ -72,19 +73,12 @@ static int aQMgr_get_random_msg_no(int base_msg, int looks, int kind_count) {
|
||||
}
|
||||
|
||||
static int aQMgr_get_hello_msg_npc_feel(int feel, int looks) {
|
||||
static int* feel_msg_table[aQMgr_FEEL_NUM] = {
|
||||
l_hello_rage_msg,
|
||||
l_hello_sad_msg,
|
||||
l_hello_sleep_msg,
|
||||
NULL,
|
||||
NULL,
|
||||
l_hello_uzai_msg,
|
||||
l_hello_uzai_msg
|
||||
};
|
||||
static int* feel_msg_table[aQMgr_FEEL_NUM] = { l_hello_rage_msg, l_hello_sad_msg, l_hello_sleep_msg, NULL, NULL,
|
||||
l_hello_uzai_msg, l_hello_uzai_msg };
|
||||
int* feel_msg_tbl_p;
|
||||
int rng_msg;
|
||||
int msg_no;
|
||||
|
||||
|
||||
feel -= mNpc_FEEL_ANGRY; // Remove happy & normal
|
||||
|
||||
if (feel < 0 || feel >= aQMgr_FEEL_NUM) {
|
||||
@@ -103,18 +97,13 @@ static int aQMgr_get_hello_msg_npc_feel(int feel, int looks) {
|
||||
|
||||
static int aQMgr_get_hello_msg_npc_feel_island(int feel, int looks) {
|
||||
static int* feel_msg_table[aQMgr_FEEL_NUM] = {
|
||||
l_hello_rage_island_msg,
|
||||
l_hello_sad_island_msg,
|
||||
l_hello_sleep_msg,
|
||||
NULL,
|
||||
NULL,
|
||||
l_hello_uzai_island_msg,
|
||||
l_hello_uzai_island_msg
|
||||
l_hello_rage_island_msg, l_hello_sad_island_msg, l_hello_sleep_msg, NULL, NULL,
|
||||
l_hello_uzai_island_msg, l_hello_uzai_island_msg
|
||||
};
|
||||
int* feel_msg_tbl_p;
|
||||
int rng_msg;
|
||||
int msg_no;
|
||||
|
||||
|
||||
feel -= mNpc_FEEL_ANGRY; // Remove happy & normal
|
||||
|
||||
if (feel < 0 || feel >= aQMgr_FEEL_NUM) {
|
||||
@@ -157,32 +146,30 @@ static int aQMgr_get_meet_time(Animal_c* animal, Anmmem_c* memory, int* months,
|
||||
}
|
||||
|
||||
days = lbRTC_GetIntervalDays(last_spoken_time, rtc_time);
|
||||
if (animal != NULL && mNpc_CheckIslandAnimal(animal) == FALSE && mLd_CheckThisLand(memory->memuni.land.name, memory->memuni.land.id) == FALSE) {
|
||||
if (animal != NULL && mNpc_CheckIslandAnimal(animal) == FALSE &&
|
||||
mLd_CheckThisLand(memory->memuni.land.name, memory->memuni.land.id) == FALSE) {
|
||||
foreigner = TRUE;
|
||||
}
|
||||
|
||||
if (days >= 60) {
|
||||
int years;
|
||||
|
||||
type = foreigner == FALSE ? aQMgr_MEET_TIME_A_REALLY_LONG_TIME : aQMgr_MEET_TIME_A_REALLY_LONG_TIME_FOREIGN_TOWN;
|
||||
|
||||
type = foreigner == FALSE ? aQMgr_MEET_TIME_A_REALLY_LONG_TIME
|
||||
: aQMgr_MEET_TIME_A_REALLY_LONG_TIME_FOREIGN_TOWN;
|
||||
years = days / 365;
|
||||
*months = years * lbRTC_MONTHS_MAX;
|
||||
*months += (days % 365) / 30;
|
||||
*weeks = days / lbRTC_WEEK;
|
||||
}
|
||||
else if (days >= 14) {
|
||||
} else if (days >= 14) {
|
||||
type = foreigner == FALSE ? aQMgr_MEET_TIME_A_LONG_TIME : aQMgr_MEET_TIME_A_LONG_TIME_FOREIGN_TOWN;
|
||||
*weeks = days / lbRTC_WEEK;
|
||||
}
|
||||
else if (days >= 1) {
|
||||
} else if (days >= 1) {
|
||||
if (foreigner == FALSE) {
|
||||
type = aQMgr_MEET_TIME_FIRST_HELLO;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
type = aQMgr_MEET_TIME_FIRST_HELLO_FOREIGN_TOWN;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
type = aQMgr_MEET_TIME_HELLO_AGAIN;
|
||||
}
|
||||
}
|
||||
@@ -218,16 +205,17 @@ static void aQMgr_clear_memory(Animal_c* animal, Anmmem_c* memory) {
|
||||
|
||||
if (mNpc_CheckIslandAnimal(animal) == TRUE) {
|
||||
mNpc_ClearIslandAnimalMemory(memory, 1);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
mNpc_ClearAnimalMemory(memory, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int aQMgr_get_hello_msg_npc_feel_normal(Animal_c* animal, int looks, int last_meet_time_type, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc) {
|
||||
static int* hello_msg_tbl[] = { l_hello_fine_msg_tbl, l_hello_rain_msg_tbl, l_hello_snow_msg_tbl, l_hello_fine_msg_tbl };
|
||||
static int aQMgr_get_hello_msg_npc_feel_normal(Animal_c* animal, int looks, int last_meet_time_type,
|
||||
aQMgr_GET_TIME_KIND_PROC get_time_kind_proc) {
|
||||
static int* hello_msg_tbl[] = { l_hello_fine_msg_tbl, l_hello_rain_msg_tbl, l_hello_snow_msg_tbl,
|
||||
l_hello_fine_msg_tbl };
|
||||
int* hello_msg_tbl_p;
|
||||
lbRTC_time_c* rtc_time = Common_GetPointer(time.rtc_time);
|
||||
int hello_msg;
|
||||
@@ -238,23 +226,21 @@ static int aQMgr_get_hello_msg_npc_feel_normal(Animal_c* animal, int looks, int
|
||||
if (mNpc_CheckOverImpatient(anm_idx, looks) == TRUE) {
|
||||
int over_impatient = mNpc_GetOverImpatient(anm_idx, looks);
|
||||
|
||||
msg_no = 0xA50;
|
||||
msg_no = MSG_2640;
|
||||
msg_no += looks * 6 + over_impatient * 3;
|
||||
msg_no += mQst_GetRandom(3);
|
||||
}
|
||||
else if (last_meet_time_type == aQMgr_MEET_TIME_FIRST_HELLO && mEv_IsEventActive(mEv_EVENT_SPRING_CLEANING) == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x3BC1, looks, 3);
|
||||
}
|
||||
else if (last_meet_time_type == aQMgr_MEET_TIME_FIRST_HELLO && mEv_IsEventActive(mEv_EVENT_APRILFOOLS_DAY) == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x3B84, looks, 3);
|
||||
}
|
||||
else {
|
||||
} else if (last_meet_time_type == aQMgr_MEET_TIME_FIRST_HELLO &&
|
||||
mEv_IsEventActive(mEv_EVENT_SPRING_CLEANING) == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_15297, looks, 3);
|
||||
} else if (last_meet_time_type == aQMgr_MEET_TIME_FIRST_HELLO &&
|
||||
mEv_IsEventActive(mEv_EVENT_APRILFOOLS_DAY) == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_15236, looks, 3);
|
||||
} else {
|
||||
mActor_name_t field_type = mFI_GET_TYPE(mFI_GetFieldId());
|
||||
|
||||
if (field_type == mFI_FIELD_ROOM0 || field_type == mFI_FIELD_NPCROOM0) {
|
||||
hello_msg = l_indoor_hello_msg_tbl[last_meet_time_type];
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
hello_msg_tbl_p = hello_msg_tbl[weather];
|
||||
hello_msg = hello_msg_tbl_p[last_meet_time_type];
|
||||
}
|
||||
@@ -265,20 +251,20 @@ static int aQMgr_get_hello_msg_npc_feel_normal(Animal_c* animal, int looks, int
|
||||
return msg_no;
|
||||
}
|
||||
|
||||
static int aQMgr_get_hello_msg_npc_feel_normal_island(Animal_c* animal, int looks, int last_meet_time_type, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc) {
|
||||
static int aQMgr_get_hello_msg_npc_feel_normal_island(Animal_c* animal, int looks, int last_meet_time_type,
|
||||
aQMgr_GET_TIME_KIND_PROC get_time_kind_proc) {
|
||||
static int rnd_table[aQMgr_MEET_TIME_NUM] = { 1, 3, 1, 1, 1, 1, 1, 1 };
|
||||
lbRTC_time_c* rtc_time = Common_GetPointer(time.rtc_time);
|
||||
int msg_no = -1;
|
||||
|
||||
if (last_meet_time_type == aQMgr_MEET_TIME_FIRST_HELLO) {
|
||||
if (mEv_IsEventActive(mEv_EVENT_SPRING_CLEANING) == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x3BD3, looks, 3);
|
||||
}
|
||||
else if (mEv_IsEventActive(mEv_EVENT_APRILFOOLS_DAY) == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x3B96, looks, 3);
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_15315, looks, 3);
|
||||
} else if (mEv_IsEventActive(mEv_EVENT_APRILFOOLS_DAY) == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_15254, looks, 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (msg_no == -1) {
|
||||
int hello_msg = l_hello_fine_island_msg_tbl[last_meet_time_type];
|
||||
int kind_num = rnd_table[last_meet_time_type];
|
||||
@@ -291,7 +277,7 @@ static int aQMgr_get_hello_msg_npc_feel_normal_island(Animal_c* animal, int look
|
||||
|
||||
static int aQMgr_get_thanks_cloth_msg(Animal_c* animal, int looks) {
|
||||
PersonalID_c* pid = &Common_Get(now_private)->player_ID;
|
||||
int msg_no = 0x2DE8;
|
||||
int msg_no = MSG_11752;
|
||||
|
||||
if (pid != NULL && animal != NULL) {
|
||||
Anmmem_c* memory = animal->memories;
|
||||
@@ -302,13 +288,12 @@ static int aQMgr_get_thanks_cloth_msg(Animal_c* animal, int looks) {
|
||||
if (cloth_mem_idx == mem_idx) {
|
||||
// This player gave the cloth
|
||||
memory += mem_idx;
|
||||
cloth_msg = 0x2DFA;
|
||||
}
|
||||
else {
|
||||
cloth_msg = MSG_11770;
|
||||
} else {
|
||||
// Another player gave the cloth
|
||||
memory += cloth_mem_idx;
|
||||
pid = &memory->memory_player_id;
|
||||
cloth_msg = 0x2DE8;
|
||||
cloth_msg = MSG_11752;
|
||||
}
|
||||
|
||||
msg_no = aQMgr_get_random_msg_no(cloth_msg, looks, 3);
|
||||
@@ -321,19 +306,19 @@ static int aQMgr_get_thanks_cloth_msg(Animal_c* animal, int looks) {
|
||||
return msg_no;
|
||||
}
|
||||
|
||||
static int aQMgr_get_hello_msg_npc_feel_grad(int last_meet_time_type, int looks, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc) {
|
||||
static int aQMgr_get_hello_msg_npc_feel_grad(int last_meet_time_type, int looks,
|
||||
aQMgr_GET_TIME_KIND_PROC get_time_kind_proc) {
|
||||
lbRTC_time_c* rtc_time = Common_GetPointer(time.rtc_time);
|
||||
int msg_no = -1;
|
||||
|
||||
if (last_meet_time_type == aQMgr_MEET_TIME_FIRST_HELLO) {
|
||||
if (mEv_IsEventActive(mEv_EVENT_SPRING_CLEANING) == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x3BC1, looks, 3);
|
||||
}
|
||||
else if (mEv_IsEventActive(mEv_EVENT_APRILFOOLS_DAY) == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x3B84, looks, 3);
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_15297, looks, 3);
|
||||
} else if (mEv_IsEventActive(mEv_EVENT_APRILFOOLS_DAY) == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_15236, looks, 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (msg_no == -1) {
|
||||
int hello_msg = l_grad_hello_msg_tbl[last_meet_time_type];
|
||||
|
||||
@@ -348,7 +333,8 @@ static void aQMgr_set_feel_normal() {
|
||||
mDemo_Set_OrderValue(mDemo_ORDER_NPC0, 2, 5);
|
||||
}
|
||||
|
||||
static int aQMgr_get_hello_msg_how_do_you_do(NPC_ACTOR* client, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc, int last_meet_time_type) {
|
||||
static int aQMgr_get_hello_msg_how_do_you_do(NPC_ACTOR* client, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc,
|
||||
int last_meet_time_type) {
|
||||
Animal_c* animal = client->npc_info.animal;
|
||||
mNpc_NpcList_c* npclist = client->npc_info.list;
|
||||
int feel = animal->mood;
|
||||
@@ -356,18 +342,18 @@ static int aQMgr_get_hello_msg_how_do_you_do(NPC_ACTOR* client, aQMgr_GET_TIME_K
|
||||
int msg_no;
|
||||
|
||||
if (animal->moved_in == TRUE) {
|
||||
msg_no = aQMgr_actor_get_my_hello_msg_com(get_time_kind_proc, 0x2D35, looks, Common_Get(time.rtc_time).hour, 3);
|
||||
}
|
||||
else if (mLd_CheckThisLand(animal->id.land_name, animal->id.land_id) == FALSE) {
|
||||
msg_no = aQMgr_actor_get_my_hello_msg_com(get_time_kind_proc, 0x2D92, looks, Common_Get(time.rtc_time).hour, 3);
|
||||
}
|
||||
else if (feel == mNpc_FEEL_HAPPY) {
|
||||
msg_no =
|
||||
aQMgr_actor_get_my_hello_msg_com(get_time_kind_proc, MSG_11573, looks, Common_Get(time.rtc_time).hour, 3);
|
||||
} else if (mLd_CheckThisLand(animal->id.land_name, animal->id.land_id) == FALSE) {
|
||||
msg_no =
|
||||
aQMgr_actor_get_my_hello_msg_com(get_time_kind_proc, MSG_11666, looks, Common_Get(time.rtc_time).hour, 3);
|
||||
} else if (feel == mNpc_FEEL_HAPPY) {
|
||||
msg_no = aQMgr_get_hello_msg_npc_feel_grad(last_meet_time_type, looks, get_time_kind_proc);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
msg_no = aQMgr_get_hello_msg_npc_feel_normal(animal, looks, last_meet_time_type, get_time_kind_proc);
|
||||
|
||||
if (msg_no != -1 && (feel == mNpc_FEEL_ANGRY || feel == mNpc_FEEL_SAD || feel == mNpc_FEEL_SLEEPY || feel == mNpc_FEEL_UZAI_0 || feel == mNpc_FEEL_UZAI_1)) {
|
||||
if (msg_no != -1 && (feel == mNpc_FEEL_ANGRY || feel == mNpc_FEEL_SAD || feel == mNpc_FEEL_SLEEPY ||
|
||||
feel == mNpc_FEEL_UZAI_0 || feel == mNpc_FEEL_UZAI_1)) {
|
||||
aQMgr_set_feel_normal();
|
||||
}
|
||||
}
|
||||
@@ -387,13 +373,13 @@ static int aQMgr_check_possession_item(mActor_name_t ignore_item) {
|
||||
if (mPr_GetPossessionItemIdxFGTypeWithCond_cancel(priv, NAME_TYPE_FTR0, mPr_ITEM_COND_NORMAL, ignore_item) != -1 ||
|
||||
mPr_GetPossessionItemIdxFGTypeWithCond_cancel(priv, NAME_TYPE_FTR1, mPr_ITEM_COND_NORMAL, ignore_item) != -1) {
|
||||
res = TRUE;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
u8* category_p = category;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(category); i++) {
|
||||
if (mPr_GetPossessionItemIdxItem1CategoryWithCond_cancel(priv, *category_p, mPr_ITEM_COND_NORMAL, ignore_item) != -1) {
|
||||
if (mPr_GetPossessionItemIdxItem1CategoryWithCond_cancel(priv, *category_p, mPr_ITEM_COND_NORMAL,
|
||||
ignore_item) != -1) {
|
||||
res = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -415,8 +401,8 @@ static int aQMgr_get_harvestfestival_msg(mNpc_NpcList_c* npclist, int looks) {
|
||||
int ev_bx = 0;
|
||||
int ev_bz = 0;
|
||||
mEv_place_data_c* harvestfestival_place = mEv_get_common_place(mEv_EVENT_HARVEST_FESTIVAL_FRANKLIN, 81);
|
||||
|
||||
msg_no = aQMgr_get_random_msg_no(0x3B60, looks, 3);
|
||||
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_15200, looks, 3);
|
||||
if (harvestfestival_place != NULL) {
|
||||
if (harvestfestival_place->block.x > 0 && harvestfestival_place->block.x < 7) {
|
||||
ev_bx = harvestfestival_place->block.x;
|
||||
@@ -456,8 +442,8 @@ static int aQMgr_get_harvestfestival_island_msg(int looks) {
|
||||
int ev_bx = 0;
|
||||
int ev_bz = 0;
|
||||
mEv_place_data_c* harvestfestival_place = mEv_get_common_place(mEv_EVENT_HARVEST_FESTIVAL_FRANKLIN, 81);
|
||||
|
||||
msg_no = aQMgr_get_random_msg_no(0x3B72, looks, 3);
|
||||
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_15218, looks, 3);
|
||||
if (harvestfestival_place != NULL) {
|
||||
if (harvestfestival_place->block.x > 0 && harvestfestival_place->block.x < 7) {
|
||||
ev_bx = harvestfestival_place->block.x;
|
||||
@@ -479,7 +465,8 @@ static int aQMgr_get_harvestfestival_island_msg(int looks) {
|
||||
return msg_no;
|
||||
}
|
||||
|
||||
static int aQMgr_get_hello_msg_no_normal(NPC_ACTOR* client, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc, int last_meet_time_type) {
|
||||
static int aQMgr_get_hello_msg_no_normal(NPC_ACTOR* client, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc,
|
||||
int last_meet_time_type) {
|
||||
Animal_c* animal = client->npc_info.animal;
|
||||
mNpc_NpcList_c* npclist = client->npc_info.list;
|
||||
int destiny = Common_Get(now_private)->destiny.type;
|
||||
@@ -488,92 +475,83 @@ static int aQMgr_get_hello_msg_no_normal(NPC_ACTOR* client, aQMgr_GET_TIME_KIND_
|
||||
int msg_no;
|
||||
|
||||
if (feel == mNpc_FEEL_PITFALL) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x2087, looks, 3);
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_8327, looks, 3);
|
||||
|
||||
if (last_meet_time_type == aQMgr_MEET_TIME_HELLO_HOW_DO_YOU_DO) {
|
||||
aQMgr_clear_memory(animal, animal->memories);
|
||||
}
|
||||
|
||||
npclist->conversation_flags.beesting = FALSE;
|
||||
}
|
||||
else if (Common_Get(player_bee_chase_flag)) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x2AEC, looks, 3);
|
||||
} else if (Common_Get(player_bee_chase_flag)) {
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_10988, looks, 3);
|
||||
|
||||
if (last_meet_time_type == aQMgr_MEET_TIME_HELLO_HOW_DO_YOU_DO) {
|
||||
aQMgr_clear_memory(animal, animal->memories);
|
||||
}
|
||||
|
||||
npclist->conversation_flags.beesting = FALSE;
|
||||
}
|
||||
else if (last_meet_time_type == aQMgr_MEET_TIME_HELLO_HOW_DO_YOU_DO) {
|
||||
} else if (last_meet_time_type == aQMgr_MEET_TIME_HELLO_HOW_DO_YOU_DO) {
|
||||
msg_no = aQMgr_get_hello_msg_how_do_you_do(client, get_time_kind_proc, last_meet_time_type);
|
||||
}
|
||||
else if (mPr_GetFishCompTalkPermission() == TRUE && mNpc_GetFishCompleteTalk(npclist) != TRUE && mPr_GetInsectCompTalkPermission() == TRUE && mNpc_GetInsectCompleteTalk(npclist) != TRUE) {
|
||||
} else if (mPr_GetFishCompTalkPermission() == TRUE && mNpc_GetFishCompleteTalk(npclist) != TRUE &&
|
||||
mPr_GetInsectCompTalkPermission() == TRUE && mNpc_GetInsectCompleteTalk(npclist) != TRUE) {
|
||||
int type = mQst_GetRandom(4) & 1;
|
||||
|
||||
msg_no = aQMgr_get_random_msg_no(0x29CC + type * 18, looks, 3);
|
||||
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_10700 + type * 18, looks, 3);
|
||||
if (type == 0) {
|
||||
mNpc_SetInsectCompleteTalk(npclist);
|
||||
mPr_SetInsectCompleteTalk();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
mNpc_SetFishCompleteTalk(npclist);
|
||||
mPr_SetFishCompleteTalk();
|
||||
}
|
||||
|
||||
npclist->conversation_flags.beesting = FALSE;
|
||||
}
|
||||
else if (mNpc_GetInsectCompleteTalk(npclist) != TRUE && mPr_GetInsectCompTalkPermission() == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x29CC, looks, 3);
|
||||
} else if (mNpc_GetInsectCompleteTalk(npclist) != TRUE && mPr_GetInsectCompTalkPermission() == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_10700, looks, 3);
|
||||
mNpc_SetInsectCompleteTalk(npclist);
|
||||
mPr_SetInsectCompleteTalk();
|
||||
npclist->conversation_flags.beesting = FALSE;
|
||||
}
|
||||
else if (mNpc_GetFishCompleteTalk(npclist) != TRUE && mPr_GetFishCompTalkPermission() == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x29DE, looks, 3);
|
||||
} else if (mNpc_GetFishCompleteTalk(npclist) != TRUE && mPr_GetFishCompTalkPermission() == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_10718, looks, 3);
|
||||
mNpc_SetFishCompleteTalk(npclist);
|
||||
mPr_SetFishCompleteTalk();
|
||||
npclist->conversation_flags.beesting = FALSE;
|
||||
}
|
||||
else if (npclist->conversation_flags.beesting == TRUE) {
|
||||
msg_no = aQMgr_actor_get_my_hello_msg_com(get_time_kind_proc, 0x1B4B, looks, Common_Get(time.rtc_time).hour, 3);
|
||||
} else if (npclist->conversation_flags.beesting == TRUE) {
|
||||
msg_no =
|
||||
aQMgr_actor_get_my_hello_msg_com(get_time_kind_proc, MSG_6987, looks, Common_Get(time.rtc_time).hour, 3);
|
||||
npclist->conversation_flags.beesting = FALSE;
|
||||
}
|
||||
else if (feel == mNpc_FEEL_ANGRY || feel == mNpc_FEEL_SAD || feel == mNpc_FEEL_SLEEPY || feel == mNpc_FEEL_UZAI_0 || feel == mNpc_FEEL_UZAI_1) {
|
||||
} else if (feel == mNpc_FEEL_ANGRY || feel == mNpc_FEEL_SAD || feel == mNpc_FEEL_SLEEPY ||
|
||||
feel == mNpc_FEEL_UZAI_0 || feel == mNpc_FEEL_UZAI_1) {
|
||||
msg_no = aQMgr_get_hello_msg_npc_feel(feel, looks);
|
||||
}
|
||||
else if (destiny == mPr_DESTINY_UNPOPULAR) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x074D, looks, 3);
|
||||
}
|
||||
else if (mNpc_GetPresentClothMemoryIdx(animal->memories) != -1) {
|
||||
} else if (destiny == mPr_DESTINY_UNPOPULAR) {
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_1869, looks, 3);
|
||||
} else if (mNpc_GetPresentClothMemoryIdx(animal->memories) != -1) {
|
||||
msg_no = aQMgr_get_thanks_cloth_msg(animal, looks);
|
||||
}
|
||||
else if (mEv_IsEventActive(mEv_EVENT_HARVEST_FESTIVAL_FRANKLIN) == TRUE) {
|
||||
} else if (mEv_IsEventActive(mEv_EVENT_HARVEST_FESTIVAL_FRANKLIN) == TRUE) {
|
||||
msg_no = aQMgr_get_harvestfestival_msg(npclist, looks);
|
||||
}
|
||||
else if (feel == mNpc_FEEL_HAPPY) {
|
||||
} else if (feel == mNpc_FEEL_HAPPY) {
|
||||
msg_no = aQMgr_get_hello_msg_npc_feel_grad(last_meet_time_type, looks, get_time_kind_proc);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
msg_no = aQMgr_get_hello_msg_npc_feel_normal(animal, looks, last_meet_time_type, get_time_kind_proc);
|
||||
}
|
||||
|
||||
return msg_no;
|
||||
}
|
||||
|
||||
static int aQMgr_get_hello_msg_no_kamakura(NPC_ACTOR* client, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc, int last_meet_time_type, mActor_name_t ignore_item) {
|
||||
static int aQMgr_get_hello_msg_no_kamakura(NPC_ACTOR* client, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc,
|
||||
int last_meet_time_type, mActor_name_t ignore_item) {
|
||||
lbRTC_time_c* rtc_time = Common_GetPointer(time.rtc_time);
|
||||
static int hello_msg[] = { 0x18DF, 0x18E8, 0x18D6, 0x18F1, 0x18FA, 0x1903 };
|
||||
static int hello_msg[] = { MSG_6367, MSG_6376, MSG_6358, MSG_6385, MSG_6394, MSG_6403 };
|
||||
int msg_no;
|
||||
|
||||
if (last_meet_time_type == aQMgr_MEET_TIME_HELLO_HOW_DO_YOU_DO) {
|
||||
msg_no = aQMgr_get_hello_msg_how_do_you_do(client, get_time_kind_proc, last_meet_time_type);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
int looks = mNpc_GetNpcLooks((ACTOR*)client);
|
||||
int hello_type = 0;
|
||||
|
||||
if (mPr_GetPossessionItemIdx(Common_Get(now_private), EMPTY_NO) != -1 && Common_Get(now_private)->inventory.wallet >= aQMgr_GREETING_GAME_BELL_MIN) {
|
||||
if (mPr_GetPossessionItemIdx(Common_Get(now_private), EMPTY_NO) != -1 &&
|
||||
Common_Get(now_private)->inventory.wallet >= aQMgr_GREETING_GAME_BELL_MIN) {
|
||||
hello_type |= aQMgr_GREETING_GAME_TYPE_MONEY;
|
||||
}
|
||||
|
||||
@@ -585,8 +563,7 @@ static int aQMgr_get_hello_msg_no_kamakura(NPC_ACTOR* client, aQMgr_GET_TIME_KIN
|
||||
int rng = RANDOM(2);
|
||||
|
||||
msg_no = 1 + hello_msg[looks] + rng;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
msg_no = hello_msg[looks] + hello_type;
|
||||
}
|
||||
}
|
||||
@@ -594,17 +571,19 @@ static int aQMgr_get_hello_msg_no_kamakura(NPC_ACTOR* client, aQMgr_GET_TIME_KIN
|
||||
return msg_no;
|
||||
}
|
||||
|
||||
static int aQMgr_get_hello_msg_no_summercamp(NPC_ACTOR* client, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc, int last_meet_time_type, mActor_name_t ignore_item) {
|
||||
static int msg_table[] = { 0x3E82, 0x3EA0, 0x3EBF, 0x3EDD, 0x3EFB, 0x3F19 };
|
||||
static int aQMgr_get_hello_msg_no_summercamp(NPC_ACTOR* client, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc,
|
||||
int last_meet_time_type, mActor_name_t ignore_item) {
|
||||
static int msg_table[] = { MSG_16002, MSG_16032, MSG_16063, MSG_16093, MSG_16123, MSG_16153 };
|
||||
int looks = mNpc_GetNpcLooks((ACTOR*)client);
|
||||
int hello_type = 0;
|
||||
int msg_no;
|
||||
|
||||
if (last_meet_time_type == aQMgr_MEET_TIME_HELLO_HOW_DO_YOU_DO) {
|
||||
msg_no = aQMgr_actor_get_my_hello_msg_com(get_time_kind_proc, 0x3E3A, looks, Common_Get(time.rtc_time).hour, 3);
|
||||
}
|
||||
else {
|
||||
if (mPr_GetPossessionItemIdx(Common_Get(now_private), EMPTY_NO) != -1 && Common_Get(now_private)->inventory.wallet >= aQMgr_GREETING_GAME_BELL_MIN) {
|
||||
msg_no =
|
||||
aQMgr_actor_get_my_hello_msg_com(get_time_kind_proc, MSG_15930, looks, Common_Get(time.rtc_time).hour, 3);
|
||||
} else {
|
||||
if (mPr_GetPossessionItemIdx(Common_Get(now_private), EMPTY_NO) != -1 &&
|
||||
Common_Get(now_private)->inventory.wallet >= aQMgr_GREETING_GAME_BELL_MIN) {
|
||||
hello_type |= aQMgr_GREETING_GAME_TYPE_MONEY;
|
||||
}
|
||||
|
||||
@@ -616,8 +595,7 @@ static int aQMgr_get_hello_msg_no_summercamp(NPC_ACTOR* client, aQMgr_GET_TIME_K
|
||||
int rng = RANDOM(2);
|
||||
|
||||
msg_no = 1 + msg_table[looks] + rng;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
msg_no = msg_table[looks] + hello_type;
|
||||
}
|
||||
}
|
||||
@@ -625,7 +603,8 @@ static int aQMgr_get_hello_msg_no_summercamp(NPC_ACTOR* client, aQMgr_GET_TIME_K
|
||||
return msg_no;
|
||||
}
|
||||
|
||||
static int aQMgr_get_hello_msg_no_island(NPC_ACTOR* client, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc, int last_meet_time_type) {
|
||||
static int aQMgr_get_hello_msg_no_island(NPC_ACTOR* client, aQMgr_GET_TIME_KIND_PROC get_time_kind_proc,
|
||||
int last_meet_time_type) {
|
||||
Animal_c* animal = client->npc_info.animal;
|
||||
mNpc_NpcList_c* npclist = client->npc_info.list;
|
||||
int destiny = Common_Get(now_private)->destiny.type;
|
||||
@@ -634,32 +613,27 @@ static int aQMgr_get_hello_msg_no_island(NPC_ACTOR* client, aQMgr_GET_TIME_KIND_
|
||||
int msg_no;
|
||||
|
||||
if (feel == mNpc_FEEL_PITFALL) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x3446, looks, 3);
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_13382, looks, 3);
|
||||
|
||||
if (last_meet_time_type == aQMgr_MEET_TIME_HELLO_HOW_DO_YOU_DO) {
|
||||
aQMgr_clear_memory(animal, animal->memories);
|
||||
}
|
||||
|
||||
npclist->conversation_flags.beesting = FALSE;
|
||||
}
|
||||
else if (last_meet_time_type == aQMgr_MEET_TIME_HELLO_HOW_DO_YOU_DO) {
|
||||
} else if (last_meet_time_type == aQMgr_MEET_TIME_HELLO_HOW_DO_YOU_DO) {
|
||||
msg_no = aQMgr_get_hello_msg_npc_feel_normal_island(animal, looks, last_meet_time_type, get_time_kind_proc);
|
||||
npclist->conversation_flags.beesting = FALSE;
|
||||
}
|
||||
else if (npclist->conversation_flags.beesting == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x3470, looks, 1);
|
||||
} else if (npclist->conversation_flags.beesting == TRUE) {
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_13424, looks, 1);
|
||||
npclist->conversation_flags.beesting = FALSE;
|
||||
}
|
||||
else if (feel == mNpc_FEEL_ANGRY || feel == mNpc_FEEL_SAD || feel == mNpc_FEEL_SLEEPY || feel == mNpc_FEEL_UZAI_0 || feel == mNpc_FEEL_UZAI_1) {
|
||||
} else if (feel == mNpc_FEEL_ANGRY || feel == mNpc_FEEL_SAD || feel == mNpc_FEEL_SLEEPY ||
|
||||
feel == mNpc_FEEL_UZAI_0 || feel == mNpc_FEEL_UZAI_1) {
|
||||
msg_no = aQMgr_get_hello_msg_npc_feel_island(feel, looks);
|
||||
}
|
||||
else if (destiny == mPr_DESTINY_UNPOPULAR) {
|
||||
msg_no = aQMgr_get_random_msg_no(0x34D0, looks, 3);
|
||||
}
|
||||
else if (mEv_IsEventActive(mEv_EVENT_HARVEST_FESTIVAL_FRANKLIN) == TRUE) {
|
||||
} else if (destiny == mPr_DESTINY_UNPOPULAR) {
|
||||
msg_no = aQMgr_get_random_msg_no(MSG_13520, looks, 3);
|
||||
} else if (mEv_IsEventActive(mEv_EVENT_HARVEST_FESTIVAL_FRANKLIN) == TRUE) {
|
||||
msg_no = aQMgr_get_harvestfestival_island_msg(looks);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
msg_no = aQMgr_get_hello_msg_npc_feel_normal_island(animal, looks, last_meet_time_type, get_time_kind_proc);
|
||||
}
|
||||
|
||||
@@ -679,14 +653,13 @@ extern int aQMgr_get_hello_msg_no(ACTOR* client, aQMgr_GET_TIME_KIND_PROC get_ti
|
||||
|
||||
if (mNpc_CheckIslandAnimal(animal) == TRUE) {
|
||||
msg_no = aQMgr_get_hello_msg_no_island((NPC_ACTOR*)client, get_time_kind_proc, last_meet_time_type);
|
||||
}
|
||||
else if (client->npc_id == SP_NPC_EV_KAMAKURA_0) {
|
||||
msg_no = aQMgr_get_hello_msg_no_kamakura((NPC_ACTOR*)client, get_time_kind_proc, last_meet_time_type, give_item);
|
||||
}
|
||||
else if (client->npc_id == SP_NPC_EV_SUMMERCAMP_0) {
|
||||
msg_no = aQMgr_get_hello_msg_no_summercamp((NPC_ACTOR*)client, get_time_kind_proc, last_meet_time_type, give_item);
|
||||
}
|
||||
else {
|
||||
} else if (client->npc_id == SP_NPC_EV_KAMAKURA_0) {
|
||||
msg_no =
|
||||
aQMgr_get_hello_msg_no_kamakura((NPC_ACTOR*)client, get_time_kind_proc, last_meet_time_type, give_item);
|
||||
} else if (client->npc_id == SP_NPC_EV_SUMMERCAMP_0) {
|
||||
msg_no =
|
||||
aQMgr_get_hello_msg_no_summercamp((NPC_ACTOR*)client, get_time_kind_proc, last_meet_time_type, give_item);
|
||||
} else {
|
||||
msg_no = aQMgr_get_hello_msg_no_normal((NPC_ACTOR*)client, get_time_kind_proc, last_meet_time_type);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ static void aRSV_set_talk_info(ACTOR* actor) {
|
||||
rgba_t window_color;
|
||||
|
||||
if (reserve->structure_class.arg0 == 0x42) {
|
||||
mDemo_Set_msg_num(0x2B42);
|
||||
mDemo_Set_msg_num(MSG_11074);
|
||||
} else {
|
||||
if (reserve->structure_class.arg0 >= 6 && reserve->structure_class.arg0 <= 8) {
|
||||
mIN_copy_name_str(str, Save_Get(fruit));
|
||||
@@ -18,7 +18,7 @@ static void aRSV_set_talk_info(ACTOR* actor) {
|
||||
mNpc_GetActorWorldName(str2, SP_NPC_SHOP_MASTER);
|
||||
mMsg_Set_free_str(mMsg_Get_base_window_p(), mMsg_FREE_STR1, str2, ANIMAL_NAME_LEN);
|
||||
}
|
||||
mDemo_Set_msg_num(reserve->structure_class.arg0 + 0x2B2D);
|
||||
mDemo_Set_msg_num(reserve->structure_class.arg0 + MSG_11053);
|
||||
}
|
||||
mDemo_Set_talk_display_name(FALSE);
|
||||
mDemo_Set_camera(TRUE);
|
||||
|
||||
@@ -59,7 +59,7 @@ static void Ac_Sample_Actor_wait_demo_ct(ACTOR* actor) {
|
||||
|
||||
static u8 str_mail[64];
|
||||
|
||||
mDemo_Set_msg_num(9);
|
||||
mDemo_Set_msg_num(MSG_9);
|
||||
mMsg_Set_item_str(mMsg_Get_base_window_p(), 0, str0, 6);
|
||||
mMsg_Set_item_str(mMsg_Get_base_window_p(), 4, str9, 5);
|
||||
mMsg_Set_free_str(mMsg_Get_base_window_p(), 0, str0, 16);
|
||||
|
||||
@@ -142,28 +142,28 @@ static void aSHOP_set_talk_info_close_wait(ACTOR* actor) {
|
||||
|
||||
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 = 0x7CD;
|
||||
msg_no = MSG_SHOP_OPEN;
|
||||
}
|
||||
} else {
|
||||
switch (mSP_ShopOpen()) {
|
||||
case mSP_SHOP_STATUS_PRE: // 0
|
||||
case mSP_SHOP_STATUS_END: // 1
|
||||
msg_no = 0x7CD;
|
||||
msg_no = MSG_SHOP_OPEN;
|
||||
break;
|
||||
case mSP_SHOP_STATUS_PREEVENT: // 4
|
||||
msg_no = 0x7D1;
|
||||
msg_no = MSG_2001;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ static int aSHR_talk_check(ACTOR* actorx, GAME_PLAY* play) {
|
||||
static void aSHR_set_talk_info(ACTOR* actorx) {
|
||||
rgba_t window_color;
|
||||
|
||||
mDemo_Set_msg_num(0x1124);
|
||||
mDemo_Set_msg_num(MSG_4388);
|
||||
mDemo_Set_camera(CAMERA2_PROCESS_NORMAL);
|
||||
mDemo_Set_talk_display_name(FALSE);
|
||||
mDemo_Set_ListenAble();
|
||||
|
||||
+3
-3
@@ -476,12 +476,12 @@ static void aSIGN_set_talk_info(ACTOR* actorx) {
|
||||
|
||||
if (player_no < PLAYER_NUM) {
|
||||
if (GETREG(NMREG, 90)) {
|
||||
mDemo_Set_msg_num(0x3065);
|
||||
mDemo_Set_msg_num(MSG_12389);
|
||||
} else {
|
||||
mDemo_Set_msg_num(0x3064);
|
||||
mDemo_Set_msg_num(MSG_12388);
|
||||
}
|
||||
} else {
|
||||
mDemo_Set_msg_num(0x3065);
|
||||
mDemo_Set_msg_num(MSG_12389);
|
||||
}
|
||||
|
||||
mDemo_Set_talk_display_name(FALSE);
|
||||
|
||||
+83
-49
@@ -78,7 +78,7 @@ static int aSMAN_process_combine_head(ACTOR* actorx, GAME* game);
|
||||
static void aSMAN_actor_ct(ACTOR* actorx, GAME* game) {
|
||||
static int part_tbl[] = { aSMAN_PART0, aSMAN_PART1 };
|
||||
SNOWMAN_ACTOR* actor = (SNOWMAN_ACTOR*)actorx;
|
||||
|
||||
|
||||
if (actorx->npc_id == ETC_SNOWMAN_BALL_A) {
|
||||
f32* move_dist = (f32*)mEv_get_common_area(mEv_EVENT_SNOWMAN_SEASON, aSMAN_PART0);
|
||||
|
||||
@@ -149,7 +149,8 @@ static void aSMAN_actor_dt(ACTOR* actorx, GAME* game) {
|
||||
mEv_clear_common_place(mEv_EVENT_SNOWMAN_SEASON, 100 + aSMAN_PART0);
|
||||
mEv_clear_common_area(mEv_EVENT_SNOWMAN_SEASON, aSMAN_PART0);
|
||||
} else {
|
||||
if ((actor->flags & aSMAN_FLAG_IN_HOLE) || (actor->flags & aSMAN_FLAG_MOVED) || !mRlib_Set_Position_Check(actorx)) {
|
||||
if ((actor->flags & aSMAN_FLAG_IN_HOLE) || (actor->flags & aSMAN_FLAG_MOVED) ||
|
||||
!mRlib_Set_Position_Check(actorx)) {
|
||||
mEv_clear_common_place(mEv_EVENT_SNOWMAN_SEASON, 100 + aSMAN_PART0);
|
||||
mEv_clear_common_area(mEv_EVENT_SNOWMAN_SEASON, aSMAN_PART0);
|
||||
} else {
|
||||
@@ -173,7 +174,8 @@ static void aSMAN_actor_dt(ACTOR* actorx, GAME* game) {
|
||||
mEv_clear_common_place(mEv_EVENT_SNOWMAN_SEASON, 100 + aSMAN_PART1);
|
||||
mEv_clear_common_area(mEv_EVENT_SNOWMAN_SEASON, aSMAN_PART1);
|
||||
} else {
|
||||
if ((actor->flags & aSMAN_FLAG_IN_HOLE) || (actor->flags & aSMAN_FLAG_MOVED) || !mRlib_Set_Position_Check(actorx)) {
|
||||
if ((actor->flags & aSMAN_FLAG_IN_HOLE) || (actor->flags & aSMAN_FLAG_MOVED) ||
|
||||
!mRlib_Set_Position_Check(actorx)) {
|
||||
mEv_clear_common_place(mEv_EVENT_SNOWMAN_SEASON, 100 + aSMAN_PART1);
|
||||
mEv_clear_common_area(mEv_EVENT_SNOWMAN_SEASON, aSMAN_PART1);
|
||||
} else {
|
||||
@@ -222,7 +224,8 @@ static void aSMAN_GetSnowmanPresentMail(Mail_c* mail) {
|
||||
mail_idx += rnd;
|
||||
mIN_copy_name_str(item_name, item);
|
||||
mHandbill_Set_free_str(mHandbill_FREE_STR0, item_name, sizeof(item_name));
|
||||
mHandbill_Load_HandbillFromRom(mail->content.header, &header_back_start, mail->content.footer, mail->content.body, mail_idx);
|
||||
mHandbill_Load_HandbillFromRom(mail->content.header, &header_back_start, mail->content.footer, mail->content.body,
|
||||
mail_idx);
|
||||
mail->content.header_back_start = header_back_start;
|
||||
mail->content.font = mMl_FONT_RECV;
|
||||
mail->content.mail_type = mMl_TYPE_SNOWMAN;
|
||||
@@ -289,10 +292,12 @@ static int aSMAN_FG_Position_Get(ACTOR* actorx) {
|
||||
pos.y = mCoBG_GetBgY_AngleS_FromWpos(NULL, pos, 0.0f);
|
||||
// @optimization - function call inside of ABS macro...
|
||||
ground_y = ABS(pos.y - mCoBG_GetBgY_AngleS_FromWpos(NULL, actorx->world.position, 0.0f));
|
||||
item = *mFI_GetUnitFG(pos); // @BUG - they don't check for NULL here, and mFI_GetUnitFG can return a NULL pointer.
|
||||
item =
|
||||
*mFI_GetUnitFG(pos); // @BUG - they don't check for NULL here, and mFI_GetUnitFG can return a NULL pointer.
|
||||
attr = mCoBG_Wpos2Attribute(pos, NULL);
|
||||
|
||||
if (!mCoBG_ExistHeightGap_KeepAndNow(pos) && item != RSV_NO && item != RSV_WALL_NO && attr != mCoBG_ATTRIBUTE_STONE && attr != mCoBG_ATTRIBUTE_WOOD && ground_y < 60.0f) {
|
||||
if (!mCoBG_ExistHeightGap_KeepAndNow(pos) && item != RSV_NO && item != RSV_WALL_NO &&
|
||||
attr != mCoBG_ATTRIBUTE_STONE && attr != mCoBG_ATTRIBUTE_WOOD && ground_y < 60.0f) {
|
||||
actor->fg_pos = pos;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -304,7 +309,7 @@ static int aSMAN_FG_Position_Get(ACTOR* actorx) {
|
||||
|
||||
static void aSMAN_House_Tree_Rev_Check(ACTOR* actorx) {
|
||||
SNOWMAN_ACTOR* actor = (SNOWMAN_ACTOR*)actorx;
|
||||
|
||||
|
||||
if (mRlib_HeightGapCheck_And_ReversePos(actorx) != TRUE) {
|
||||
actor->flags |= aSMAN_FLAG_MOVED;
|
||||
Actor_delete(actorx);
|
||||
@@ -313,12 +318,13 @@ static void aSMAN_House_Tree_Rev_Check(ACTOR* actorx) {
|
||||
|
||||
static void aSMAN_Make_Effect_Ground(ACTOR* actorx, GAME* game) {
|
||||
SNOWMAN_ACTOR* actor = (SNOWMAN_ACTOR*)actorx;
|
||||
|
||||
|
||||
if (actor->normalized_scale < 0.2f) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((game->frame_counter & 0xF) == 0 && actorx->bg_collision_check.result.unit_attribute == mCoBG_ATTRIBUTE_BUSH && actorx->speed > 1.0f) {
|
||||
if ((game->frame_counter & 0xF) == 0 && actorx->bg_collision_check.result.unit_attribute == mCoBG_ATTRIBUTE_BUSH &&
|
||||
actorx->speed > 1.0f) {
|
||||
xyz_t pos = actorx->world.position;
|
||||
s16 arg;
|
||||
s16 angle;
|
||||
@@ -368,7 +374,8 @@ static int aSMAN_get_ground_norm(ACTOR* actorx, xyz_t* norm, xyz_t* pos) {
|
||||
s16 norm_rate;
|
||||
s16 angle;
|
||||
|
||||
if (mRlib_Get_ground_norm_inHole(actorx, norm, &hole_dist, &angle, &norm_rate, 1.0f - actor->normalized_scale * 0.5f)) {
|
||||
if (mRlib_Get_ground_norm_inHole(actorx, norm, &hole_dist, &angle, &norm_rate,
|
||||
1.0f - actor->normalized_scale * 0.5f)) {
|
||||
aSMAN_get_hole_offset(actorx, hole_dist);
|
||||
if ((actor->flags & aSMAN_FLAG_IN_HOLE) == 0) {
|
||||
s16 angle_mod;
|
||||
@@ -424,7 +431,7 @@ static int aSMAN_player_push_HitWallCheck(ACTOR* actorx, GAME* game) {
|
||||
u32 hit_attr_wall = playerx->bg_collision_check.result.hit_attribute_wall;
|
||||
s16 wall_angle;
|
||||
s16 dAngle;
|
||||
|
||||
|
||||
if ((hit_wall & mCoBG_HIT_WALL) || (hit_attr_wall & mCoBG_HIT_WALL)) {
|
||||
wall_angle = mRlib_Get_HitWallAngleY(actorx);
|
||||
dAngle = (wall_angle - playerx->world.angle.y) + DEG2SHORT_ANGLE2(180.0f);
|
||||
@@ -467,7 +474,8 @@ static void aSMAN_set_speed_relations_norm_player_push(ACTOR* actorx, GAME* game
|
||||
s16 dAngle = ABS(actorx->world.angle.y - playerx->world.angle.y);
|
||||
xyz_t norm;
|
||||
|
||||
if (aSMAN_get_ground_norm(actorx, &norm, &actorx->world.position) && (!F32_IS_ZERO(norm.x) || !F32_IS_ZERO(norm.z))) {
|
||||
if (aSMAN_get_ground_norm(actorx, &norm, &actorx->world.position) &&
|
||||
(!F32_IS_ZERO(norm.x) || !F32_IS_ZERO(norm.z))) {
|
||||
if (dAngle < DEG2SHORT_ANGLE2(90.0f)) {
|
||||
f32 accel = 0.3f + actor->normalized_scale * 0.099999994f;
|
||||
f32 norm_speed;
|
||||
@@ -476,7 +484,8 @@ static void aSMAN_set_speed_relations_norm_player_push(ACTOR* actorx, GAME* game
|
||||
actorx->position_speed.x += norm.x * accel;
|
||||
actorx->position_speed.z += norm.z * accel;
|
||||
mRlib_spdXZ_to_spdF_Angle(&actorx->position_speed, &norm_speed, &actorx->world.angle.y);
|
||||
actor->base_speed = norm_speed + (actor->normalized_scale * 0.02f + 0.01f) * (actor->base_speed - norm_speed);
|
||||
actor->base_speed =
|
||||
norm_speed + (actor->normalized_scale * 0.02f + 0.01f) * (actor->base_speed - norm_speed);
|
||||
} else if (actorx->speed > 0.5f) {
|
||||
actor->base_speed = 0.0f;
|
||||
actor->accel = 0.0f;
|
||||
@@ -523,7 +532,8 @@ static int aSMAN_status_check_in_move(SNOWMAN_ACTOR* actor, GAME* game) {
|
||||
ret = TRUE;
|
||||
}
|
||||
|
||||
if (ret == TRUE && (actor->process == aSMAN_process_player_push || actor->process == aSMAN_process_player_push_scroll)) {
|
||||
if (ret == TRUE &&
|
||||
(actor->process == aSMAN_process_player_push || actor->process == aSMAN_process_player_push_scroll)) {
|
||||
aSMAN_player_push_free(game);
|
||||
}
|
||||
|
||||
@@ -535,7 +545,7 @@ static void aSMAN_position_move(ACTOR* actorx) {
|
||||
|
||||
mCoBG_GetBgY_AngleS_FromWpos(&actor->ground_angle, actorx->world.position, 0.0f);
|
||||
chase_f(&actorx->speed, actor->base_speed, actor->accel);
|
||||
|
||||
|
||||
if ((actor->flags & aSMAN_FLAG_COMBINED) != 0 || (actor->flags & aSMAN_FLAG_IN_HOLE) != 0 ||
|
||||
actor->process == aSMAN_process_combine_body || actor->process == aSMAN_process_player_push_scroll) {
|
||||
return;
|
||||
@@ -549,16 +559,19 @@ static int aSMAN_BGcheck(ACTOR* actorx, GAME* game) {
|
||||
SNOWMAN_ACTOR* actor = (SNOWMAN_ACTOR*)actorx;
|
||||
f32 r = actor->normalized_scale * 20.0f + 10.0f;
|
||||
|
||||
if ((actor->flags & aSMAN_FLAG_COMBINED) != 0 || actor->process == aSMAN_process_combine_head_jump || actor->process == aSMAN_process_combine_body) {
|
||||
if ((actor->flags & aSMAN_FLAG_COMBINED) != 0 || actor->process == aSMAN_process_combine_head_jump ||
|
||||
actor->process == aSMAN_process_combine_body) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (actor->process == aSMAN_process_swim) {
|
||||
mCoBG_BgCheckControll(&actor->rev_pos, actorx, r, -r, mCoBG_WALL_TYPE0, mCoBG_REVERSE_TYPE_NO_REVERSE, mCoBG_CHECK_TYPE_NORMAL);
|
||||
mCoBG_BgCheckControll(&actor->rev_pos, actorx, r, -r, mCoBG_WALL_TYPE0, mCoBG_REVERSE_TYPE_NO_REVERSE,
|
||||
mCoBG_CHECK_TYPE_NORMAL);
|
||||
actorx->world.position.x += actor->rev_pos.x;
|
||||
actorx->world.position.z += actor->rev_pos.z;
|
||||
} else {
|
||||
mCoBG_BgCheckControll(&actor->rev_pos, actorx, r, -r, mCoBG_WALL_TYPE0, mCoBG_REVERSE_TYPE_REVERSE, mCoBG_CHECK_TYPE_NORMAL);
|
||||
mCoBG_BgCheckControll(&actor->rev_pos, actorx, r, -r, mCoBG_WALL_TYPE0, mCoBG_REVERSE_TYPE_REVERSE,
|
||||
mCoBG_CHECK_TYPE_NORMAL);
|
||||
mRlib_Station_step_modify_to_wall(actorx);
|
||||
|
||||
if (actorx->world.position.y - actorx->last_world_position.y > 60.0f) {
|
||||
@@ -581,7 +594,6 @@ static int aSMAN_BGcheck(ACTOR* actorx, GAME* game) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
diff = actorx->world.angle.y - (angle - DEG2SHORT_ANGLE2(-180.0f));
|
||||
if (speed > 0.0f) {
|
||||
f32 speed2 = actorx->speed * cos_s(colAngle);
|
||||
@@ -590,7 +602,8 @@ static int aSMAN_BGcheck(ACTOR* actorx, GAME* game) {
|
||||
speed *= 0.7f;
|
||||
actorx->speed = sqrtf(SQ(speed) + SQ(speed2));
|
||||
|
||||
if (actor->process != aSMAN_process_player_push && !actorx->bg_collision_check.result.is_in_water && actorx->speed > 0.5f) {
|
||||
if (actor->process != aSMAN_process_player_push && !actorx->bg_collision_check.result.is_in_water &&
|
||||
actorx->speed > 0.5f) {
|
||||
sAdo_OngenTrgStartSpeed(actorx->speed, 0x103, &actorx->world.position);
|
||||
}
|
||||
} else {
|
||||
@@ -611,7 +624,7 @@ static int aSMAN_BGcheck(ACTOR* actorx, GAME* game) {
|
||||
static int aSMAN_snowman_hit_check(SNOWMAN_ACTOR* actor, GAME* game, ACTOR* oc_actorx) {
|
||||
int b_ux;
|
||||
int b_uz;
|
||||
|
||||
|
||||
actor->col_actor = oc_actorx;
|
||||
if (oc_actorx->id == mAc_PROFILE_SNOWMAN) {
|
||||
SNOWMAN_ACTOR* oc_actor = (SNOWMAN_ACTOR*)oc_actorx;
|
||||
@@ -630,14 +643,18 @@ static int aSMAN_snowman_hit_check(SNOWMAN_ACTOR* actor, GAME* game, ACTOR* oc_a
|
||||
|
||||
attr = mCoBG_Wpos2Attribute(center_pos, NULL);
|
||||
mFI_Wpos2UtNum_inBlock(&b_ux, &b_uz, center_pos);
|
||||
if (attr == mCoBG_ATTRIBUTE_STONE || attr == mCoBG_ATTRIBUTE_WOOD || mCoBG_Wpos2CheckSlateCol(¢er_pos, FALSE) || b_ux == 0 || b_ux == (UT_X_NUM - 1) || b_uz == 0 || b_uz == (UT_Z_NUM - 1) || (oc_actor->flags & aSMAN_FLAG_IN_HOLE) != 0 || oc_actor->ground_angle.x != 0 || oc_actor->ground_angle.z != 0 || !aSNOWMAN_player_block_check((ACTOR*)actor, game)) {
|
||||
if (attr == mCoBG_ATTRIBUTE_STONE || attr == mCoBG_ATTRIBUTE_WOOD ||
|
||||
mCoBG_Wpos2CheckSlateCol(¢er_pos, FALSE) || b_ux == 0 || b_ux == (UT_X_NUM - 1) || b_uz == 0 ||
|
||||
b_uz == (UT_Z_NUM - 1) || (oc_actor->flags & aSMAN_FLAG_IN_HOLE) != 0 || oc_actor->ground_angle.x != 0 ||
|
||||
oc_actor->ground_angle.z != 0 || !aSNOWMAN_player_block_check((ACTOR*)actor, game)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (actor->snowman_part != oc_actor->snowman_part && actor->normalized_scale > 0.2f && oc_actor->normalized_scale > 0.2f) {
|
||||
if (actor->snowman_part != oc_actor->snowman_part && actor->normalized_scale > 0.2f &&
|
||||
oc_actor->normalized_scale > 0.2f) {
|
||||
actor->actor_class.status_data.weight = MASSTYPE_HEAVY;
|
||||
oc_actorx->status_data.weight = MASSTYPE_HEAVY;
|
||||
|
||||
|
||||
if (oc_actor->process == aSMAN_process_player_push || actor->process == aSMAN_process_player_push) {
|
||||
aSMAN_player_push_free(game);
|
||||
}
|
||||
@@ -675,7 +692,7 @@ static void aSMAN_OBJcheck(SNOWMAN_ACTOR* actor, GAME* game) {
|
||||
|
||||
if (actor->col_actor != oc_actorx && !aSMAN_snowman_hit_check(actor, game, oc_actorx)) {
|
||||
f32 rate = (1.0f - actor->normalized_scale) * 0.4f;
|
||||
|
||||
|
||||
tmp = oc_actorx->position_speed;
|
||||
xyz_t_mult_v(&tmp, rate);
|
||||
if (oc_actorx->speed > 0.5f) {
|
||||
@@ -712,7 +729,8 @@ static void aSMAN_set_speed_relations_norm(ACTOR* actorx) {
|
||||
SNOWMAN_ACTOR* actor = (SNOWMAN_ACTOR*)actorx;
|
||||
xyz_t norm;
|
||||
|
||||
if (aSMAN_get_ground_norm(actorx, &norm, &actorx->world.position) && (!F32_IS_ZERO(norm.x) || !F32_IS_ZERO(norm.z))) {
|
||||
if (aSMAN_get_ground_norm(actorx, &norm, &actorx->world.position) &&
|
||||
(!F32_IS_ZERO(norm.x) || !F32_IS_ZERO(norm.z))) {
|
||||
f32 vel = actor->normalized_scale * 0.099999994f + 0.3f;
|
||||
|
||||
actorx->position_speed.x += norm.x * vel;
|
||||
@@ -740,7 +758,8 @@ static void aSMAN_set_speed_relations_swim(ACTOR* actorx) {
|
||||
water_height = mCoBG_GetWaterHeight_File(actorx->world.position, __FILE__, 1362);
|
||||
mCoBG_GetWaterFlow(&flow, actorx->bg_collision_check.result.unit_attribute);
|
||||
flow_angle = atans_table(flow.z, flow.x);
|
||||
chase_angle(&actorx->world.angle.y, flow_angle, angl_add_table[ABS(DIFF_SHORT_ANGLE(actorx->world.angle.y, flow_angle)) > DEG2SHORT_ANGLE2(90.0f)]);
|
||||
chase_angle(&actorx->world.angle.y, flow_angle,
|
||||
angl_add_table[ABS(DIFF_SHORT_ANGLE(actorx->world.angle.y, flow_angle)) > DEG2SHORT_ANGLE2(90.0f)]);
|
||||
if (actorx->world.position.y < water_height) {
|
||||
actorx->max_velocity_y = 1.0f;
|
||||
} else {
|
||||
@@ -757,7 +776,8 @@ static void aSMAN_calc_axis(ACTOR* actorx) {
|
||||
SNOWMAN_ACTOR* actor = (SNOWMAN_ACTOR*)actorx;
|
||||
|
||||
if (!F32_IS_ZERO(actor->roll_speed) && actor->process != aSMAN_process_player_push_scroll) {
|
||||
s16 dAngle = (s16)(actor->roll_speed * (DEG2SHORT_ANGLE3(180.0f) / (((actor->normalized_scale * 20.0f + 10.0f) * 2.0f) * 3.14f)));
|
||||
s16 dAngle = (s16)(actor->roll_speed *
|
||||
(DEG2SHORT_ANGLE3(180.0f) / (((actor->normalized_scale * 20.0f + 10.0f) * 2.0f) * 3.14f)));
|
||||
|
||||
if (actor->process == aSMAN_process_swim) {
|
||||
f32 rate = (-1.0f - actorx->position_speed.y) / -2.0f;
|
||||
@@ -906,7 +926,7 @@ static int aSMAN_process_player_push(ACTOR* actorx, GAME* game) {
|
||||
s16 move_angle = gamePT->mcon.move_angle + DEG2SHORT_ANGLE2(90.0f);
|
||||
s16 diff_angle = DIFF_SHORT_ANGLE(move_angle, player_angle);
|
||||
f32 move_pR = gamePT->mcon.move_pR;
|
||||
|
||||
|
||||
add_calc0(&actor->y_ofs, 1.0f - sqrtf(0.5f), 50.0f);
|
||||
add_calc(&actor->accel, 0.1f, 1.0f - sqrtf(0.8f), 0.005f, 0.0005f);
|
||||
|
||||
@@ -924,7 +944,10 @@ static int aSMAN_process_player_push(ACTOR* actorx, GAME* game) {
|
||||
s16 norm_angle_diff = aSMAN_get_norm_push_angle_distance(actorx, &norm, player_angle);
|
||||
|
||||
{
|
||||
if ((ABS(diff_angle) > DEG2SHORT_ANGLE2(55.0f) || actor->normalized_scale <= 0.2f || aSMAN_player_push_HitWallCheck(actorx, game)) || (((!F32_IS_ZERO(norm.x) || !F32_IS_ZERO(norm.z)) && ABS(norm_angle_diff) < DEG2SHORT_ANGLE2(120.0f)) || move_pR == 0.0f)) {
|
||||
if ((ABS(diff_angle) > DEG2SHORT_ANGLE2(55.0f) || actor->normalized_scale <= 0.2f ||
|
||||
aSMAN_player_push_HitWallCheck(actorx, game)) ||
|
||||
(((!F32_IS_ZERO(norm.x) || !F32_IS_ZERO(norm.z)) && ABS(norm_angle_diff) < DEG2SHORT_ANGLE2(120.0f)) ||
|
||||
move_pR == 0.0f)) {
|
||||
aSMAN_player_push_free(game);
|
||||
aSMAN_process_normal_init(actorx);
|
||||
return FALSE;
|
||||
@@ -951,11 +974,13 @@ static int aSMAN_process_player_push(ACTOR* actorx, GAME* game) {
|
||||
dist = search_position_distanceXZ(&actorx->world.position, &actorx->last_world_position);
|
||||
dist *= 0.4f;
|
||||
mPlib_SetParam_for_push_snowball(&aim_pos, player_angle_y, dist < 1.0f ? dist : 1.0f);
|
||||
|
||||
mCoBG_BgCheckControll(NULL, playerx, 18.0f, 0.0f, mCoBG_WALL_TYPE1, mCoBG_REVERSE_TYPE_REVERSE, mCoBG_CHECK_TYPE_PLAYER);
|
||||
|
||||
mCoBG_BgCheckControll(NULL, playerx, 18.0f, 0.0f, mCoBG_WALL_TYPE1, mCoBG_REVERSE_TYPE_REVERSE,
|
||||
mCoBG_CHECK_TYPE_PLAYER);
|
||||
if ((actorx->bg_collision_check.result.hit_wall & mCoBG_HIT_WALL) != 0) {
|
||||
s16 wall_angle = mRlib_Get_HitWallAngleY(actorx);
|
||||
s16 wall_angle_diff = DIFF_SHORT_ANGLE(wall_angle - actorx->world.angle.y, DEG2SHORT_ANGLE(-180.0f));
|
||||
s16 wall_angle_diff =
|
||||
DIFF_SHORT_ANGLE(wall_angle - actorx->world.angle.y, DEG2SHORT_ANGLE(-180.0f));
|
||||
|
||||
if (wall_angle_diff < DEG2SHORT_ANGLE2(20.0f) && move_pR * cos_s(wall_angle_diff) > 0.7f) {
|
||||
actor->timer++;
|
||||
@@ -997,7 +1022,7 @@ static void aSMAN_process_player_push_scroll_init(ACTOR* actorx) {
|
||||
|
||||
static int aSMAN_process_player_push_scroll(ACTOR* actorx, GAME* game) {
|
||||
SNOWMAN_ACTOR* actor = (SNOWMAN_ACTOR*)actorx;
|
||||
|
||||
|
||||
if (!mPlib_Check_Label_main_wade_snowball(actorx)) {
|
||||
aSMAN_process_player_push_init(actorx, game);
|
||||
} else {
|
||||
@@ -1041,11 +1066,13 @@ static int aSMAN_process_swim(ACTOR* actorx, GAME* game) {
|
||||
actor->normalized_scale = (actorx->scale.x - 0.01f) / 0.02f;
|
||||
if (actorx->scale.x >= 0.01f) {
|
||||
if (CLIP(gyo_clip) != NULL) {
|
||||
CLIP(gyo_clip)->ballcheck_gyoei_proc(&actorx->world.position, (actorx->scale.x * 30.0f) / 0.03f, aGYO_BALLCHECK_TYPE_SNOWMAN);
|
||||
CLIP(gyo_clip)->ballcheck_gyoei_proc(&actorx->world.position, (actorx->scale.x * 30.0f) / 0.03f,
|
||||
aGYO_BALLCHECK_TYPE_SNOWMAN);
|
||||
}
|
||||
}
|
||||
|
||||
if (!actorx->bg_collision_check.result.is_in_water && actorx->bg_collision_check.result.unit_attribute == mCoBG_ATTRIBUTE_WATERFALL) {
|
||||
if (!actorx->bg_collision_check.result.is_in_water &&
|
||||
actorx->bg_collision_check.result.unit_attribute == mCoBG_ATTRIBUTE_WATERFALL) {
|
||||
aSMAN_process_air_init(actorx);
|
||||
}
|
||||
|
||||
@@ -1053,7 +1080,8 @@ static int aSMAN_process_swim(ACTOR* actorx, GAME* game) {
|
||||
if (((game->frame_counter & 3) == 0 && actor->timer < 16) || (game->frame_counter & 7) == 0) {
|
||||
xyz_t pos = actorx->world.position;
|
||||
pos.y = mCoBG_GetWaterHeight_File(pos, __FILE__, 1855);
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_TURI_HAMON, pos, 1, actorx->world.angle.y, game, actorx->npc_id, 5, (s16)(actor->normalized_scale * 100.0f));
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_TURI_HAMON, pos, 1, actorx->world.angle.y, game, actorx->npc_id, 5,
|
||||
(s16)(actor->normalized_scale * 100.0f));
|
||||
}
|
||||
|
||||
actor->timer++;
|
||||
@@ -1087,7 +1115,7 @@ static int aSMAN_process_air(ACTOR* actorx, GAME* game) {
|
||||
add_calc0(&actor->y_ofs, CALC_EASE(0.5f), 50.0f);
|
||||
if (actorx->bg_collision_check.result.hit_wall & mCoBG_HIT_WALL) {
|
||||
s16 wall_angle = mRlib_Get_HitWallAngleY(actorx);
|
||||
|
||||
|
||||
add_calc_short_angle2(&actorx->world.angle.y, wall_angle, CALC_EASE2(0.2f), DEG2SHORT_ANGLE2(22.5f), 45);
|
||||
add_calc(&actorx->speed, 3.0f, CALC_EASE(0.5f), 0.25f, 0.05f);
|
||||
}
|
||||
@@ -1096,15 +1124,18 @@ static int aSMAN_process_air(ACTOR* actorx, GAME* game) {
|
||||
xyz_t pos = actorx->world.position;
|
||||
|
||||
pos.y = mCoBG_GetWaterHeight_File(pos, __FILE__, 1934);
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_AMI_MIZU, pos, 1, 0, game, actorx->npc_id, 2, (s16)(actor->normalized_scale * 100.0f));
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_AMI_MIZU, pos, 1, 0, game, actorx->npc_id, 2,
|
||||
(s16)(actor->normalized_scale * 100.0f));
|
||||
if (CLIP(gyo_clip) != NULL) {
|
||||
CLIP(gyo_clip)->ballcheck_gyoei_proc(&actorx->world.position, (actorx->scale.x * 30.0f) / 0.03f, aGYO_BALLCHECK_TYPE_NORMAL);
|
||||
CLIP(gyo_clip)->ballcheck_gyoei_proc(&actorx->world.position, (actorx->scale.x * 30.0f) / 0.03f,
|
||||
aGYO_BALLCHECK_TYPE_NORMAL);
|
||||
}
|
||||
|
||||
sAdo_OngenTrgStart(NA_SE_27, &actorx->world.position);
|
||||
aSMAN_process_swim_init(actorx);
|
||||
} else if (actorx->bg_collision_check.result.on_ground) {
|
||||
if (actor->fall_height - actorx->world.position.y >= 55.0f || mCoBG_ExistHeightGap_KeepAndNow_Detail(actorx->world.position)) {
|
||||
if (actor->fall_height - actorx->world.position.y >= 55.0f ||
|
||||
mCoBG_ExistHeightGap_KeepAndNow_Detail(actorx->world.position)) {
|
||||
actor->flags |= aSMAN_FLAG_MOVED;
|
||||
actor->flags |= aSMAN_FLAG_ON_GROUND;
|
||||
} else {
|
||||
@@ -1182,12 +1213,13 @@ static void aSMAN_process_combine_head_jump_init(ACTOR* actorx, GAME* game) {
|
||||
oc_pos.x = pos.x;
|
||||
oc_pos.z = pos.z;
|
||||
xyz_t_sub(&actorx->world.position, &oc_pos, &actor->combine_dist);
|
||||
xyz_t_mult_v(&actor->combine_dist, 1.0f/60.0f);
|
||||
xyz_t_mult_v(&actor->combine_dist, 1.0f / 60.0f);
|
||||
actorx->shape_info.draw_shadow = FALSE;
|
||||
actor->result = aSMAN_decide_scale_result(actorx->scale.x, oc_actorx->scale.x);
|
||||
actor->msg_no = 0x08A1 + ((Common_Get(snowman_msg_id) + aSMAN_get_snowman_indx()) % mSN_SAVE_COUNT) + actor->result * 3;
|
||||
actor->msg_no =
|
||||
MSG_2209 + ((Common_Get(snowman_msg_id) + aSMAN_get_snowman_indx()) % mSN_SAVE_COUNT) + actor->result * 3;
|
||||
actor->body_scale = oc_actor->normalized_scale;
|
||||
|
||||
|
||||
if (actor->result == mSN_RESULT_PERFECT) {
|
||||
aSMAN_SendPresentMail();
|
||||
}
|
||||
@@ -1225,7 +1257,7 @@ static int aSMAN_process_combine_head_jump(ACTOR* actorx, GAME* game) {
|
||||
return FALSE;
|
||||
} else {
|
||||
xyz_t_sub(&actorx->world.position, &actor->combine_dist, &actorx->world.position);
|
||||
actorx->shape_info.ofs_y = (actor->timer * 8.0f + actor->timer * -(1.0f/7.5f) * actor->timer) * 25.0f;
|
||||
actorx->shape_info.ofs_y = (actor->timer * 8.0f + actor->timer * -(1.0f / 7.5f) * actor->timer) * 25.0f;
|
||||
add_calc_short_angle2(&actor->head_vec.x, 0, CALC_EASE(0.5f), DEG2SHORT_ANGLE2(22.5f), 91);
|
||||
add_calc_short_angle2(&actor->head_vec.y, 0, CALC_EASE(0.5f), DEG2SHORT_ANGLE2(22.5f), 91);
|
||||
add_calc_short_angle2(&actor->head_vec.z, 0, CALC_EASE(0.5f), DEG2SHORT_ANGLE2(22.5f), 91);
|
||||
@@ -1235,7 +1267,7 @@ static int aSMAN_process_combine_head_jump(ACTOR* actorx, GAME* game) {
|
||||
}
|
||||
|
||||
static void aSMAN_set_talk_info_combine_head_init(ACTOR* actorx) {
|
||||
static int base_msg_no[] = { 0x0895, 0x0898, 0x089B, 0x089E };
|
||||
static int base_msg_no[] = { MSG_2197, MSG_2200, MSG_2203, MSG_2206 };
|
||||
SNOWMAN_ACTOR* actor = (SNOWMAN_ACTOR*)actorx;
|
||||
|
||||
actor->head_vec = ZeroSVec;
|
||||
@@ -1291,7 +1323,8 @@ static int aSMAN_process_combine_head(ACTOR* actorx, GAME* game) {
|
||||
} else {
|
||||
actor->flags |= aSMAN_FLAG_NO_SPEAK;
|
||||
}
|
||||
} else if (!mRlib_PSnowman_NormalTalk(actorx, (GAME_PLAY*)game, &actor->impact_speed, aSMAN_set_talk_info_normal_init)) {
|
||||
} else if (!mRlib_PSnowman_NormalTalk(actorx, (GAME_PLAY*)game, &actor->impact_speed,
|
||||
aSMAN_set_talk_info_normal_init)) {
|
||||
SNOWMAN_ACTOR* parent = (SNOWMAN_ACTOR*)actorx->parent_actor;
|
||||
|
||||
actor->flags |= aSMAN_FLAG_MOVED;
|
||||
@@ -1314,7 +1347,7 @@ static void aSMAN_process_combine_body_init(ACTOR* actorx) {
|
||||
|
||||
mFI_Wpos2UtCenterWpos(&pos, actorx->world.position);
|
||||
xyz_t_sub(&actorx->world.position, &pos, &actor->combine_dist);
|
||||
xyz_t_mult_v(&actor->combine_dist, 1.0f/60.0f);
|
||||
xyz_t_mult_v(&actor->combine_dist, 1.0f / 60.0f);
|
||||
speed_x = actor->combine_dist.x;
|
||||
speed_z = actor->combine_dist.z;
|
||||
actor->roll_speed = sqrtf(SQ(speed_x) + SQ(speed_z));
|
||||
@@ -1353,7 +1386,8 @@ static void aSMAN_actor_move(ACTOR* actorx, GAME* game) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
if ((actorx->state_bitfield & ACTOR_STATE_NO_CULL) == 0) {
|
||||
if ((actor->flags & aSMAN_FLAG_COMBINED) != 0 && (actor->flags & aSMAN_FLAG_HEAD_JUMP) != 0 && !aSNOWMAN_player_block_check(actorx, game) && (actor->flags & aSMAN_FLAG_NO_SPEAK) != 0) {
|
||||
if ((actor->flags & aSMAN_FLAG_COMBINED) != 0 && (actor->flags & aSMAN_FLAG_HEAD_JUMP) != 0 &&
|
||||
!aSNOWMAN_player_block_check(actorx, game) && (actor->flags & aSMAN_FLAG_NO_SPEAK) != 0) {
|
||||
Actor_delete(actorx);
|
||||
Actor_delete(actorx->parent_actor);
|
||||
return;
|
||||
|
||||
@@ -68,8 +68,8 @@ static int aSPR_check_player(ACTOR* actorx, GAME_PLAY* play) {
|
||||
dz = player->world.position.z - (actorx->world.position.z + 96.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 < 240.0f) {
|
||||
if ((u16)player->shape_info.rotation.y > DEG2SHORT_ANGLE2(90.0f) &&
|
||||
(u16)player->shape_info.rotation.y < DEG2SHORT_ANGLE2(180.f) && dist < 240.0f) {
|
||||
ret = 2;
|
||||
} else if (dist < 820.0f) {
|
||||
ret = 1;
|
||||
@@ -87,27 +87,27 @@ static void aSPR_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;
|
||||
msg_no = mSP_ShopOpen() == mSP_SHOP_STATUS_PRE ? MSG_RAFFLE_TIME_ANNOUNCE : MSG_RAFFLE_ENDED;
|
||||
} else {
|
||||
msg_no = 0x7CF;
|
||||
msg_no = MSG_SHOP2_CLOSED_NORMAL;
|
||||
}
|
||||
} else {
|
||||
switch (mSP_ShopOpen()) {
|
||||
case mSP_SHOP_STATUS_PRE: // 0
|
||||
case mSP_SHOP_STATUS_END: // 1
|
||||
msg_no = 0x7CF;
|
||||
msg_no = MSG_SHOP2_CLOSED_NORMAL;
|
||||
break;
|
||||
case mSP_SHOP_STATUS_PREEVENT: // 4
|
||||
msg_no = 0x7D3;
|
||||
msg_no = MSG_SHOP2_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 = 0x7CF;
|
||||
msg_no = MSG_SHOP2_CLOSED_NORMAL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,9 +133,10 @@ static void aCD0_set_term(COUNTDOWN_NPC0_ACTOR* actor, GAME_PLAY* play) {
|
||||
if (bx != play->block_table.block_x || bz != play->block_table.block_z) {
|
||||
in_same_block = FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (now_term == aCD0_TERM_NEW_YEAR) {
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_HANABI_SWITCH, actor->npc_class.actor_class.world.position, 3, 0, (GAME*)play, RSV_NO, 0, 0);
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_HANABI_SWITCH, actor->npc_class.actor_class.world.position, 3, 0,
|
||||
(GAME*)play, RSV_NO, 0, 0);
|
||||
|
||||
if (in_same_block == TRUE) {
|
||||
mPlib_request_main_demo_wait_type1((GAME*)play, FALSE, NULL);
|
||||
@@ -197,7 +198,8 @@ static void aCD0_schedule_init_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
|
||||
switch (actor->term) {
|
||||
case aCD0_TERM_NEW_YEAR:
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_HANABI_SWITCH, actor->npc_class.actor_class.world.position, 3, 0, (GAME*)play, RSV_NO, 0, 0);
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_HANABI_SWITCH, actor->npc_class.actor_class.world.position, 3, 0,
|
||||
(GAME*)play, RSV_NO, 0, 0);
|
||||
break;
|
||||
case aCD0_TERM_1_MIN:
|
||||
mEv_set_status(mEv_EVENT_NEW_YEARS_EVE_COUNTDOWN, mEv_STATUS_PLAYSOUND);
|
||||
@@ -247,7 +249,7 @@ static void aCD0_set_free_str(void) {
|
||||
}
|
||||
|
||||
static void aCD0_set_force_talk_info(ACTOR* actorx) {
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { 0x1D6B, 0x1D80, 0x1D56, 0x1D95, 0x1DAA, 0x1DBF };
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { MSG_7531, MSG_7552, MSG_7510, MSG_7573, MSG_7594, MSG_7615 };
|
||||
COUNTDOWN_NPC0_ACTOR* actor = (COUNTDOWN_NPC0_ACTOR*)actorx;
|
||||
int looks = mNpc_GetNpcLooks(actorx);
|
||||
int msg_no = msg_base[looks];
|
||||
@@ -272,7 +274,7 @@ static void aCD0_force_talk_request(ACTOR* actorx, GAME* game) {
|
||||
}
|
||||
|
||||
static void aCD0_set_norm_talk_info(ACTOR* actorx) {
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { 0x1D68, 0x1D7D, 0x1D53, 0x1D92, 0x1DA7, 0x1DBC };
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { MSG_7528, MSG_7549, MSG_7507, MSG_7570, MSG_7591, MSG_7612 };
|
||||
COUNTDOWN_NPC0_ACTOR* actor = (COUNTDOWN_NPC0_ACTOR*)actorx;
|
||||
int looks = mNpc_GetNpcLooks(actorx);
|
||||
int msg_no = msg_base[looks] + RANDOM(3);
|
||||
|
||||
@@ -105,7 +105,8 @@ static void aCD1_before_run(COUNTDOWN_NPC1_ACTOR* actor) {
|
||||
static void aCD1_before_turn(COUNTDOWN_NPC1_ACTOR* actor) {
|
||||
ACTOR* actorx = (ACTOR*)actor;
|
||||
|
||||
if (chase_angle(&actorx->shape_info.rotation.y, actor->npc_class.movement.mv_angl, DEG2SHORT_ANGLE2(11.25f)) == TRUE) {
|
||||
if (chase_angle(&actorx->shape_info.rotation.y, actor->npc_class.movement.mv_angl, DEG2SHORT_ANGLE2(11.25f)) ==
|
||||
TRUE) {
|
||||
actor->next_action = actor->action - 1;
|
||||
actor->npc_class.action.step = aNPC_ACTION_END_STEP;
|
||||
}
|
||||
@@ -116,10 +117,11 @@ static void aCD1_before_turn(COUNTDOWN_NPC1_ACTOR* actor) {
|
||||
static void aCD1_front_turn(COUNTDOWN_NPC1_ACTOR* actor) {
|
||||
ACTOR* actorx = (ACTOR*)actor;
|
||||
|
||||
if (chase_angle(&actorx->shape_info.rotation.y, actor->npc_class.movement.mv_angl, DEG2SHORT_ANGLE2(11.25f)) == TRUE) {
|
||||
if (chase_angle(&actorx->shape_info.rotation.y, actor->npc_class.movement.mv_angl, DEG2SHORT_ANGLE2(11.25f)) ==
|
||||
TRUE) {
|
||||
aCD1_setupAction(actor, aCD1_ACT_FRONT_WAIT);
|
||||
}
|
||||
|
||||
|
||||
actorx->world.angle.y = actorx->shape_info.rotation.y;
|
||||
}
|
||||
|
||||
@@ -143,8 +145,10 @@ static void aCD1_count_wait(COUNTDOWN_NPC1_ACTOR* actor) {
|
||||
}
|
||||
|
||||
static void aCD1_fire(COUNTDOWN_NPC1_ACTOR* actor) {
|
||||
if (cKF_FrameControl_passCheck_now(&actor->npc_class.draw.main_animation.keyframe.frame_control, 3.0f) == TRUE && actor->npc_class.actor_class.drawn) {
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_CLACKER, actor->npc_class.right_hand.pos, 1, 0, gamePT, actor->npc_class.actor_class.npc_id, 0, 0);
|
||||
if (cKF_FrameControl_passCheck_now(&actor->npc_class.draw.main_animation.keyframe.frame_control, 3.0f) == TRUE &&
|
||||
actor->npc_class.actor_class.drawn) {
|
||||
eEC_CLIP->effect_make_proc(eEC_EFFECT_CLACKER, actor->npc_class.right_hand.pos, 1, 0, gamePT,
|
||||
actor->npc_class.actor_class.npc_id, 0, 0);
|
||||
}
|
||||
|
||||
if (actor->npc_class.draw.main_animation_state == cKF_STATE_CONTINUE) {
|
||||
@@ -279,13 +283,18 @@ static void aCD1_decide_demo_flg(COUNTDOWN_NPC1_ACTOR* actor) {
|
||||
|
||||
if (now_term != actor->term) {
|
||||
if (now_term == aCD1_TERM_1_MIN) {
|
||||
actor->npc_class.condition_info.demo_flg = aNPC_COND_DEMO_SKIP_HEAD_LOOKAT | aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
actor->npc_class.condition_info.demo_flg =
|
||||
aNPC_COND_DEMO_SKIP_HEAD_LOOKAT | aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK |
|
||||
aNPC_COND_DEMO_SKIP_MOVE_Y | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
actor->npc_class.talk_info.talk_request_proc = (aNPC_TALK_REQUEST_PROC)none_proc1;
|
||||
} else {
|
||||
if ((actor->event_idx & 1) == 1) {
|
||||
actor->npc_class.condition_info.demo_flg = aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
actor->npc_class.condition_info.demo_flg =
|
||||
aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y |
|
||||
aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
} else {
|
||||
actor->npc_class.condition_info.demo_flg = aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
actor->npc_class.condition_info.demo_flg =
|
||||
aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
}
|
||||
|
||||
actor->npc_class.talk_info.talk_request_proc = aCD1_talk_request;
|
||||
@@ -300,7 +309,8 @@ static void aCD1_think_main_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
|
||||
if (nactorx->action.idx == aNPC_ACT_SPECIAL) {
|
||||
if (actor->term == aCD1_TERM_1_MIN) {
|
||||
if (actor->action != aCD1_ACT_FRONT_TURN && actor->action != aCD1_ACT_FRONT_WAIT && actor->action != aCD1_ACT_COUNT_WAIT) {
|
||||
if (actor->action != aCD1_ACT_FRONT_TURN && actor->action != aCD1_ACT_FRONT_WAIT &&
|
||||
actor->action != aCD1_ACT_COUNT_WAIT) {
|
||||
aCD1_setupAction(actor, aCD1_ACT_FRONT_TURN);
|
||||
} else {
|
||||
aCD1_setupAction(actor, actor->action);
|
||||
@@ -319,7 +329,6 @@ static void aCD1_think_main_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
case aCD1_TERM_NEW_YEAR:
|
||||
next_action += aCD1_ACT_AFTER_WAIT;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,7 +341,8 @@ static void aCD1_think_main_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
aCD1_decide_demo_flg(actor);
|
||||
} else if (nactorx->action.step == aNPC_ACTION_END_STEP) {
|
||||
if (actor->term == aCD1_TERM_1_MIN) {
|
||||
if (actor->action != aCD1_ACT_FRONT_TURN && actor->action != aCD1_ACT_FRONT_WAIT && actor->action != aCD1_ACT_COUNT_WAIT) {
|
||||
if (actor->action != aCD1_ACT_FRONT_TURN && actor->action != aCD1_ACT_FRONT_WAIT &&
|
||||
actor->action != aCD1_ACT_COUNT_WAIT) {
|
||||
aCD1_setupAction(actor, aCD1_ACT_FRONT_TURN);
|
||||
} else {
|
||||
aCD1_setupAction(actor, actor->action);
|
||||
@@ -346,7 +356,6 @@ static void aCD1_think_main_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
case aCD1_TERM_NEW_YEAR:
|
||||
next_action += aCD1_ACT_AFTER_WAIT;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
nactorx->movement.move_timer = 0;
|
||||
@@ -411,7 +420,7 @@ static void aCD1_schedule_init_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
nactorx->movement.mv_angl = angle;
|
||||
actor->base_angle = angle;
|
||||
}
|
||||
|
||||
|
||||
NPC_CLIP->think_proc(nactorx, play, aNPC_THINK_SPECIAL, aNPC_THINK_TYPE_INIT);
|
||||
}
|
||||
|
||||
@@ -456,7 +465,7 @@ static void aCD1_set_free_str(void) {
|
||||
}
|
||||
|
||||
static void aCD1_set_talk_info(ACTOR* actorx) {
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { 0x1D68, 0x1D7D, 0x1D53, 0x1D92, 0x1DA7, 0x1DBC };
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { MSG_7528, MSG_7549, MSG_7507, MSG_7570, MSG_7591, MSG_7612 };
|
||||
COUNTDOWN_NPC1_ACTOR* actor = (COUNTDOWN_NPC1_ACTOR*)actorx;
|
||||
int looks = mNpc_GetNpcLooks(actorx);
|
||||
int msg_no = msg_base[looks] + RANDOM(3);
|
||||
@@ -477,11 +486,11 @@ static void aCD1_talk_request(ACTOR* actorx, GAME* game) {
|
||||
|
||||
static int aCD1_talk_init(ACTOR* actorx, GAME* game) {
|
||||
COUNTDOWN_NPC1_ACTOR* actor = (COUNTDOWN_NPC1_ACTOR*)actorx;
|
||||
|
||||
|
||||
if (actor->term == aCD1_TERM_1_MIN) {
|
||||
actor->npc_class.talk_info.talk_request_proc = (aNPC_TALK_REQUEST_PROC)none_proc1;
|
||||
}
|
||||
|
||||
|
||||
mDemo_Set_ListenAble();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -12,17 +12,9 @@ static void aGHN_actor_draw(ACTOR* actorx, GAME* game);
|
||||
static void aGHN_actor_save(ACTOR* actorx, GAME* game);
|
||||
|
||||
ACTOR_PROFILE Go_Home_Npc_Profile = {
|
||||
mAc_PROFILE_GO_HOME_NPC,
|
||||
ACTOR_PART_NPC,
|
||||
ACTOR_STATE_NONE,
|
||||
EMPTY_NO,
|
||||
ACTOR_OBJ_BANK_KEEP,
|
||||
sizeof(GO_HOME_NPC_ACTOR),
|
||||
&aGHN_actor_ct,
|
||||
&aGHN_actor_dt,
|
||||
&aGHN_actor_init,
|
||||
mActor_NONE_PROC1,
|
||||
&aGHN_actor_save
|
||||
mAc_PROFILE_GO_HOME_NPC, ACTOR_PART_NPC, ACTOR_STATE_NONE, EMPTY_NO, ACTOR_OBJ_BANK_KEEP,
|
||||
sizeof(GO_HOME_NPC_ACTOR), &aGHN_actor_ct, &aGHN_actor_dt, &aGHN_actor_init, mActor_NONE_PROC1,
|
||||
&aGHN_actor_save
|
||||
};
|
||||
|
||||
static void aGHN_talk_request(ACTOR* actorx, GAME* game);
|
||||
@@ -30,88 +22,83 @@ static int aGHN_talk_init(ACTOR* actorx, GAME* game);
|
||||
static int aGHN_talk_end_chk(ACTOR* actorx, GAME* game);
|
||||
|
||||
static void aGHN_actor_ct(ACTOR* actorx, GAME* game) {
|
||||
static aNPC_ct_data_c ct_data = {
|
||||
&aGHN_actor_move,
|
||||
&aGHN_actor_draw,
|
||||
3,
|
||||
&aGHN_talk_request,
|
||||
&aGHN_talk_init,
|
||||
&aGHN_talk_end_chk,
|
||||
0
|
||||
};
|
||||
static aNPC_ct_data_c ct_data = { &aGHN_actor_move, &aGHN_actor_draw, 3, &aGHN_talk_request,
|
||||
&aGHN_talk_init, &aGHN_talk_end_chk, 0 };
|
||||
|
||||
if ((*Common_Get(clip).npc_clip->birth_check_proc)(actorx, game) == TRUE) {
|
||||
(*Common_Get(clip).npc_clip->ct_proc)(actorx, game, &ct_data);
|
||||
if ((*Common_Get(clip).npc_clip->birth_check_proc)(actorx, game) == TRUE) {
|
||||
(*Common_Get(clip).npc_clip->ct_proc)(actorx, game, &ct_data);
|
||||
|
||||
/* If the player has already spoken to the NPC, despawn them */
|
||||
if ((Common_Get(spnpc_first_talk_flags) & (1 << aNPC_SPNPC_BIT_GOHOME_NPC)) != 0) {
|
||||
Actor_delete(actorx);
|
||||
/* If the player has already spoken to the NPC, despawn them */
|
||||
if ((Common_Get(spnpc_first_talk_flags) & (1 << aNPC_SPNPC_BIT_GOHOME_NPC)) != 0) {
|
||||
Actor_delete(actorx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aGHN_actor_dt(ACTOR* actorx, GAME* game) {
|
||||
(*Common_Get(clip).npc_clip->dt_proc)(actorx, game);
|
||||
mEv_actor_dying_message(mEv_EVENT_MASK_NPC, actorx);
|
||||
(*Common_Get(clip).npc_clip->dt_proc)(actorx, game);
|
||||
mEv_actor_dying_message(mEv_EVENT_MASK_NPC, actorx);
|
||||
}
|
||||
|
||||
static void aGHN_actor_save(ACTOR* actorx, GAME* game) {
|
||||
(*Common_Get(clip).npc_clip->save_proc)(actorx, game);
|
||||
(*Common_Get(clip).npc_clip->save_proc)(actorx, game);
|
||||
}
|
||||
|
||||
static void aGHN_actor_init(ACTOR* actorx, GAME* game) {
|
||||
(*Common_Get(clip).npc_clip->init_proc)(actorx, game);
|
||||
(*Common_Get(clip).npc_clip->init_proc)(actorx, game);
|
||||
}
|
||||
|
||||
static void aGHN_actor_draw(ACTOR* actorx, GAME* game) {
|
||||
(*Common_Get(clip).npc_clip->draw_proc)(actorx, game);
|
||||
(*Common_Get(clip).npc_clip->draw_proc)(actorx, game);
|
||||
}
|
||||
|
||||
static void aGHN_set_free_str() {
|
||||
u8 str[2];
|
||||
int fig_start = 2;
|
||||
int num = lbRTC_GetIntervalDays(&Save_Get(return_animal).renew_time, Common_GetPointer(time.rtc_time)); // days since animal left
|
||||
u8 str[2];
|
||||
int fig_start = 2;
|
||||
int num = lbRTC_GetIntervalDays(&Save_Get(return_animal).renew_time,
|
||||
Common_GetPointer(time.rtc_time)); // days since animal left
|
||||
|
||||
if (num < 10) {
|
||||
fig_start = 1;
|
||||
}
|
||||
if (num < 10) {
|
||||
fig_start = 1;
|
||||
}
|
||||
|
||||
mFont_UnintToString(str, sizeof(str), num, fig_start, TRUE, FALSE, FALSE);
|
||||
mMsg_Set_free_str(mMsg_Get_base_window_p(), mMsg_FREE_STR0, str, fig_start);
|
||||
mFont_UnintToString(str, sizeof(str), num, fig_start, TRUE, FALSE, FALSE);
|
||||
mMsg_Set_free_str(mMsg_Get_base_window_p(), mMsg_FREE_STR0, str, fig_start);
|
||||
}
|
||||
|
||||
static void aGHN_set_talk_info(ACTOR* actorx) {
|
||||
int msg_no = 0x321B + mNpc_GetNpcLooks(actorx) * 4;
|
||||
int msg_no = MSG_12827 + mNpc_GetNpcLooks(actorx) * 4;
|
||||
|
||||
if ((Common_Get(spnpc_first_talk_flags) & (1 << aNPC_SPNPC_BIT_GOHOME_NPC)) != 0) {
|
||||
msg_no += 1 + RANDOM(3);
|
||||
}
|
||||
if ((Common_Get(spnpc_first_talk_flags) & (1 << aNPC_SPNPC_BIT_GOHOME_NPC)) != 0) {
|
||||
msg_no += 1 + RANDOM(3);
|
||||
}
|
||||
|
||||
mDemo_Set_msg_num(msg_no);
|
||||
mDemo_Set_msg_num(msg_no);
|
||||
}
|
||||
|
||||
static void aGHN_talk_request(ACTOR* actorx, GAME* game) {
|
||||
mDemo_Request(mDemo_TYPE_TALK, actorx, &aGHN_set_talk_info);
|
||||
mDemo_Request(mDemo_TYPE_TALK, actorx, &aGHN_set_talk_info);
|
||||
}
|
||||
|
||||
static int aGHN_talk_init(ACTOR* actorx, GAME* game) {
|
||||
aNPC_SPNPC_BIT_SET(Common_Get(spnpc_first_talk_flags), aNPC_SPNPC_BIT_GOHOME_NPC); // record that the npc has been spoken to before
|
||||
Save_Get(return_animal).talk_bit |= (1 << Common_Get(player_no)); // record this player has spoken to the npc
|
||||
aGHN_set_free_str();
|
||||
mDemo_Set_ListenAble();
|
||||
return TRUE;
|
||||
aNPC_SPNPC_BIT_SET(Common_Get(spnpc_first_talk_flags),
|
||||
aNPC_SPNPC_BIT_GOHOME_NPC); // record that the npc has been spoken to before
|
||||
Save_Get(return_animal).talk_bit |= (1 << Common_Get(player_no)); // record this player has spoken to the npc
|
||||
aGHN_set_free_str();
|
||||
mDemo_Set_ListenAble();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int aGHN_talk_end_chk(ACTOR* actorx, GAME* game) {
|
||||
int res = FALSE;
|
||||
int res = FALSE;
|
||||
|
||||
if (mDemo_Check(mDemo_TYPE_TALK, actorx) == FALSE) {
|
||||
res = TRUE;
|
||||
}
|
||||
if (mDemo_Check(mDemo_TYPE_TALK, actorx) == FALSE) {
|
||||
res = TRUE;
|
||||
}
|
||||
|
||||
return res;
|
||||
return res;
|
||||
}
|
||||
|
||||
static void aGHN_actor_move(ACTOR* actorx, GAME* game) {
|
||||
(*Common_Get(clip).npc_clip->move_proc)(actorx, game);
|
||||
(*Common_Get(clip).npc_clip->move_proc)(actorx, game);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ static void aGH0_act_chg_data_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
|
||||
static void aGH0_act_init_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
GROUNDHOG_NPC0_ACTOR* actor = (GROUNDHOG_NPC0_ACTOR*)nactorx;
|
||||
|
||||
|
||||
aGH0_setupAction(actor, aGH0_ACT_TURN);
|
||||
switch (actor->now_term) {
|
||||
case aGHC_TERM_EVENT_TIME:
|
||||
@@ -124,17 +124,19 @@ static void aGH0_think_proc(NPC_ACTOR* nactorx, GAME_PLAY* play, int type) {
|
||||
static void aGH0_schedule_init_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
static s16 def_angle[] = { 0x6B00, 0x8000, 0x8000, 0x9500 };
|
||||
static float def_pos[][2] = {
|
||||
{0.0f, -20.0f},
|
||||
{20.0f, 0.0f},
|
||||
{20.0f, 0.0f},
|
||||
{0.0f, -20.0f},
|
||||
{ 0.0f, -20.0f },
|
||||
{ 20.0f, 0.0f },
|
||||
{ 20.0f, 0.0f },
|
||||
{ 0.0f, -20.0f },
|
||||
};
|
||||
GROUNDHOG_NPC0_ACTOR* actor = (GROUNDHOG_NPC0_ACTOR*)nactorx;
|
||||
ACTOR* actorx = (ACTOR*)nactorx;
|
||||
int event_idx;
|
||||
|
||||
nactorx->think.think_proc = aGH0_think_proc;
|
||||
nactorx->condition_info.demo_flg = aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
nactorx->condition_info.demo_flg = aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK |
|
||||
aNPC_COND_DEMO_SKIP_MOVE_Y | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV |
|
||||
aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
nactorx->condition_info.hide_request = FALSE;
|
||||
nactorx->palActorIgnoreTimer = -1;
|
||||
actor->next_action = -1;
|
||||
@@ -159,7 +161,6 @@ static void aGH0_schedule_init_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
|
||||
nactorx->actor_class.world.position.x += def_pos[event_idx][0];
|
||||
nactorx->actor_class.world.position.z += def_pos[event_idx][1];
|
||||
|
||||
|
||||
actor->start_kf_pos_randomized = FALSE;
|
||||
|
||||
@@ -187,7 +188,7 @@ static void aGH0_schedule_proc(NPC_ACTOR* nactorx, GAME_PLAY* play, int type) {
|
||||
}
|
||||
|
||||
static void aGH0_set_norm_talk_info(ACTOR* actorx) {
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { 0x3D52, 0x3D71, 0x3CF5, 0x3D14, 0x3D33, 0x3D90 };
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { MSG_15698, MSG_15729, MSG_15605, MSG_15636, MSG_15667, MSG_15760 };
|
||||
GROUNDHOG_NPC0_ACTOR* actor = (GROUNDHOG_NPC0_ACTOR*)actorx;
|
||||
int looks = mNpc_GetNpcLooks(actorx);
|
||||
int now_term = actor->now_term;
|
||||
@@ -207,7 +208,7 @@ static void aGH0_norm_talk_request(ACTOR* actorx, GAME* game) {
|
||||
|
||||
static int aGH0_talk_init(ACTOR* actorx, GAME* game) {
|
||||
GROUNDHOG_NPC0_ACTOR* actor = (GROUNDHOG_NPC0_ACTOR*)actorx;
|
||||
|
||||
|
||||
if (actor->now_term == aGHC_TERM_1_MIN) {
|
||||
actor->npc_class.talk_info.talk_request_proc = (aNPC_TALK_REQUEST_PROC)none_proc1;
|
||||
} else {
|
||||
|
||||
@@ -245,7 +245,7 @@ static void aHWN_change_talk_proc(HALLOWEEN_NPC_ACTOR* actorx, int talk_proc_idx
|
||||
static void aHWN_set_force_talk_info(ACTOR* actorx) {
|
||||
HALLOWEEN_NPC_ACTOR* hwn_actor = (HALLOWEEN_NPC_ACTOR*)actorx;
|
||||
|
||||
mDemo_Set_msg_num(0x098A);
|
||||
mDemo_Set_msg_num(MSG_2442);
|
||||
mDemo_Set_talk_turn(TRUE);
|
||||
aHWN_change_talk_proc(hwn_actor, aHWN_TALK_FIRST_CALL_TALK);
|
||||
}
|
||||
@@ -273,7 +273,7 @@ static void aHWN_force_talk_request(ACTOR* actorx, GAME* game) {
|
||||
static void aHWN_set_norm_talk_info(HALLOWEEN_NPC_ACTOR* actorx) {
|
||||
int looks = mNpc_GetLooks(actorx->npc_class.npc_info.event->npc_id);
|
||||
|
||||
mDemo_Set_msg_num(0x09AF + looks);
|
||||
mDemo_Set_msg_num(MSG_2479 + looks);
|
||||
aHWN_change_talk_proc(actorx, aHWN_TALK_END_WAIT);
|
||||
}
|
||||
|
||||
@@ -292,8 +292,7 @@ static BOOL aHWN_talk_end_chk(ACTOR* actorx, GAME* game) {
|
||||
BOOL res = FALSE;
|
||||
|
||||
hwn_actor->talk_proc(hwn_actor, play);
|
||||
if ((mDemo_Check(mDemo_TYPE_SPEAK, actorx) == FALSE) &&
|
||||
(mDemo_Check(mDemo_TYPE_TALK, actorx) == FALSE)) {
|
||||
if ((mDemo_Check(mDemo_TYPE_SPEAK, actorx) == FALSE) && (mDemo_Check(mDemo_TYPE_TALK, actorx) == FALSE)) {
|
||||
if (hwn_actor->npc_class.schedule.step == 1) {
|
||||
hwn_actor->npc_class.think.end_flag = TRUE;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,8 @@ static void aHN0_revise_moveRange(ACTOR* actorx) {
|
||||
}
|
||||
|
||||
static void aHN0_turn(HANABI_NPC0_ACTOR* actor) {
|
||||
if (chase_angle(&actor->npc_class.actor_class.shape_info.rotation.y, actor->npc_class.movement.mv_angl, DEG2SHORT_ANGLE2(11.25f)) == TRUE) {
|
||||
if (chase_angle(&actor->npc_class.actor_class.shape_info.rotation.y, actor->npc_class.movement.mv_angl,
|
||||
DEG2SHORT_ANGLE2(11.25f)) == TRUE) {
|
||||
actor->next_action = aHN0_ACT_WALK;
|
||||
actor->npc_class.action.step = aNPC_ACTION_END_STEP;
|
||||
}
|
||||
@@ -138,13 +139,16 @@ static void aHN0_setupAction(HANABI_NPC0_ACTOR* actor, int action) {
|
||||
actor->act_proc = process[action];
|
||||
aHN0_set_animation(actor, action);
|
||||
aHN0_set_spd_info(actor, action);
|
||||
|
||||
|
||||
if (action == aHN0_ACT_HURRAHS) {
|
||||
actor->npc_class.movement.mv_angl = actor->base_angle;
|
||||
actor->npc_class.movement.mv_add_angl = DEG2SHORT_ANGLE2(11.25f);
|
||||
actor->npc_class.condition_info.demo_flg = aNPC_COND_DEMO_SKIP_HEAD_LOOKAT | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
actor->npc_class.condition_info.demo_flg = aNPC_COND_DEMO_SKIP_HEAD_LOOKAT |
|
||||
aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV |
|
||||
aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
} else {
|
||||
actor->npc_class.condition_info.demo_flg = aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
actor->npc_class.condition_info.demo_flg =
|
||||
aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +181,7 @@ static void aHN0_think_main_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
if (nactorx->action.step == aNPC_ACTION_END_STEP) {
|
||||
if (nactorx->action.idx == aNPC_ACT_SPECIAL) {
|
||||
int next_act;
|
||||
|
||||
|
||||
if (actor->next_action != -1) {
|
||||
next_act = actor->next_action;
|
||||
} else {
|
||||
@@ -243,7 +247,7 @@ static void aHN0_schedule_init_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
actor->next_action = -1;
|
||||
nactorx->condition_info.hide_request = FALSE;
|
||||
actorx->status_data.weight = MASSTYPE_HEAVY;
|
||||
|
||||
|
||||
angle = RANDOM_F(65536.0f);
|
||||
actorx->shape_info.rotation.y = angle;
|
||||
actorx->world.angle.y = angle;
|
||||
@@ -267,7 +271,7 @@ static void aHN0_schedule_proc(NPC_ACTOR* nactorx, GAME_PLAY* play, int type) {
|
||||
}
|
||||
|
||||
static void aHN0_set_talk_info(ACTOR* actorx) {
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { 0x164F, 0x165E, 0x1640, 0x166D, 0x167C, 0x168B };
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { MSG_5711, MSG_5726, MSG_5696, MSG_5741, MSG_5756, MSG_5771 };
|
||||
int looks = mNpc_GetNpcLooks(actorx);
|
||||
|
||||
mDemo_Set_msg_num(msg_base[looks] + RANDOM(3));
|
||||
|
||||
@@ -70,17 +70,23 @@ static void aHN1_setupAction(HANABI_NPC1_ACTOR* actor, int action) {
|
||||
actor->act_proc = process[action];
|
||||
actor->npc_class.draw.loop_flag = anm_loop_base[action] + RANDOM(anm_loop_rnd[action]);
|
||||
aHN1_set_animation(actor, action);
|
||||
|
||||
|
||||
switch (action) {
|
||||
case aHN1_ACT_HURRAHS:
|
||||
actor->npc_class.condition_info.demo_flg = aNPC_COND_DEMO_SKIP_HEAD_LOOKAT | aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
actor->npc_class.condition_info.demo_flg =
|
||||
aNPC_COND_DEMO_SKIP_HEAD_LOOKAT | aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK |
|
||||
aNPC_COND_DEMO_SKIP_MOVE_Y | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
break;
|
||||
case aHN1_ACT_CLAPPING:
|
||||
actor->clap_se_no = clap_se_no[RANDOM(ARRAY_COUNT(clap_se_no))];
|
||||
actor->npc_class.condition_info.demo_flg = aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
actor->npc_class.condition_info.demo_flg =
|
||||
aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y |
|
||||
aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
break;
|
||||
default:
|
||||
actor->npc_class.condition_info.demo_flg = aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
actor->npc_class.condition_info.demo_flg =
|
||||
aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y |
|
||||
aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -117,7 +123,7 @@ static void aHN1_think_main_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
if (actor->npc_class.action.idx == aNPC_ACT_SPECIAL) {
|
||||
aNPC_attention_c* attention_p = &NPC_CLIP->attention;
|
||||
int next_act;
|
||||
|
||||
|
||||
if (attention_p->type == aNPC_ATT_TYPE_NONE) {
|
||||
next_act = aHN1_ACT_FAN;
|
||||
} else {
|
||||
@@ -170,7 +176,7 @@ static void aHN1_schedule_init_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
nactorx->condition_info.hide_request = FALSE;
|
||||
nactorx->collision.check_kind = aNPC_BG_CHECK_TYPE_ONLY_GROUND;
|
||||
actorx->status_data.weight = MASSTYPE_HEAVY;
|
||||
|
||||
|
||||
{
|
||||
int pool_idx = mFI_GetPuleIdx();
|
||||
int npc_idx = actorx->npc_id - SP_NPC_EV_HANABI_1;
|
||||
@@ -201,7 +207,7 @@ static void aHN1_schedule_proc(NPC_ACTOR* nactorx, GAME_PLAY* play, int type) {
|
||||
}
|
||||
|
||||
static void aHN1_set_talk_info(ACTOR* actorx) {
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { 0x1652, 0x1661, 0x1643, 0x1670, 0x167F, 0x168E };
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { MSG_5714, MSG_5729, MSG_5699, MSG_5744, MSG_5759, MSG_5774 };
|
||||
HANABI_NPC1_ACTOR* actor = (HANABI_NPC1_ACTOR*)actorx;
|
||||
int looks = mNpc_GetNpcLooks(actorx);
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ static void aHM0_setupAction(HANAMI_NPC0_ACTOR* actor, int action) {
|
||||
actor->act_proc = process[action];
|
||||
actor->npc_class.draw.loop_flag = anm_loop_base[action] + RANDOM(anm_loop_rnd[action]);
|
||||
aHM0_set_animation(actor, action);
|
||||
|
||||
|
||||
if (action == aHM0_ACT_MERRY) {
|
||||
actor->clap_se_no = clap_se_no[RANDOM(ARRAY_COUNT(clap_se_no))];
|
||||
}
|
||||
@@ -101,10 +101,11 @@ static void aHM0_think_main_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
idx = RANDOM(2);
|
||||
idx <<= (actor->event_idx & 1);
|
||||
aHM0_setupAction(actor, action[idx]);
|
||||
|
||||
}
|
||||
|
||||
nactorx->condition_info.demo_flg = aNPC_COND_DEMO_SKIP_HEAD_LOOKAT | aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
nactorx->condition_info.demo_flg = aNPC_COND_DEMO_SKIP_HEAD_LOOKAT | aNPC_COND_DEMO_SKIP_FORWARD_CHECK |
|
||||
aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y |
|
||||
aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
nactorx->collision.check_kind = aNPC_BG_CHECK_TYPE_ONLY_GROUND;
|
||||
aHM0_set_request_act(actor);
|
||||
}
|
||||
@@ -125,7 +126,8 @@ static void aHM0_think_proc(NPC_ACTOR* nactorx, GAME_PLAY* play, int type) {
|
||||
}
|
||||
|
||||
static void aHM0_schedule_init_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
static s16 def_angle[4] = {DEG2SHORT_ANGLE2(45.0f), DEG2SHORT_ANGLE2(-90.0f), DEG2SHORT_ANGLE2(-45.0f), DEG2SHORT_ANGLE2(90.0f)};
|
||||
static s16 def_angle[4] = { DEG2SHORT_ANGLE2(45.0f), DEG2SHORT_ANGLE2(-90.0f), DEG2SHORT_ANGLE2(-45.0f),
|
||||
DEG2SHORT_ANGLE2(90.0f) };
|
||||
HANAMI_NPC0_ACTOR* actor = (HANAMI_NPC0_ACTOR*)nactorx;
|
||||
ACTOR* actorx = (ACTOR*)nactorx;
|
||||
int event_idx = actorx->npc_id - SP_NPC_EV_HANAMI_0;
|
||||
@@ -136,10 +138,12 @@ static void aHM0_schedule_init_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
nactorx->talk_info.turn = aNPC_TALK_TURN_HEAD;
|
||||
nactorx->talk_info.default_animation = aNPC_ANIM_SITDOWN_WAIT1;
|
||||
actor->event_idx = event_idx;
|
||||
nactorx->condition_info.demo_flg = aNPC_COND_DEMO_SKIP_HEAD_LOOKAT | aNPC_COND_DEMO_SKIP_FORWARD_CHECK | aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y | aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
nactorx->condition_info.demo_flg = aNPC_COND_DEMO_SKIP_HEAD_LOOKAT | aNPC_COND_DEMO_SKIP_FORWARD_CHECK |
|
||||
aNPC_COND_DEMO_SKIP_BGCHECK | aNPC_COND_DEMO_SKIP_MOVE_Y |
|
||||
aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
nactorx->collision.check_kind = aNPC_BG_CHECK_TYPE_ONLY_GROUND;
|
||||
actorx->status_data.weight = MASSTYPE_HEAVY;
|
||||
|
||||
|
||||
{
|
||||
s16 angle = def_angle[event_idx];
|
||||
|
||||
@@ -166,7 +170,7 @@ static void aHM0_schedule_proc(NPC_ACTOR* nactorx, GAME_PLAY* play, int type) {
|
||||
}
|
||||
|
||||
static void aHM0_set_talk_info(ACTOR* actorx) {
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { 0x192D, 0x193C, 0x191E, 0x194B, 0x195A, 0x1969 };
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { MSG_6445, MSG_6460, MSG_6430, MSG_6475, MSG_6490, MSG_6505 };
|
||||
HANAMI_NPC0_ACTOR* actor = (HANAMI_NPC0_ACTOR*)actorx;
|
||||
int looks = mNpc_GetNpcLooks(actorx);
|
||||
|
||||
|
||||
@@ -67,7 +67,8 @@ static void aHM1_revise_moveRange(ACTOR* actorx) {
|
||||
}
|
||||
|
||||
static void aHM1_turn(HANAMI_NPC1_ACTOR* actor) {
|
||||
if (chase_angle(&actor->npc_class.actor_class.shape_info.rotation.y, actor->npc_class.movement.mv_angl, DEG2SHORT_ANGLE2(11.25f)) == TRUE) {
|
||||
if (chase_angle(&actor->npc_class.actor_class.shape_info.rotation.y, actor->npc_class.movement.mv_angl,
|
||||
DEG2SHORT_ANGLE2(11.25f)) == TRUE) {
|
||||
actor->next_action = aHM1_ACT_WALK;
|
||||
actor->npc_class.action.step = aNPC_ACTION_END_STEP;
|
||||
}
|
||||
@@ -145,7 +146,7 @@ static void aHM1_think_main_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
if (nactorx->action.step == aNPC_ACTION_END_STEP) {
|
||||
if (nactorx->action.idx == aNPC_ACT_SPECIAL) {
|
||||
int next_act;
|
||||
|
||||
|
||||
if (actor->next_action != -1) {
|
||||
next_act = actor->next_action;
|
||||
} else {
|
||||
@@ -209,7 +210,7 @@ static void aHM1_schedule_init_proc(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
actor->next_action = -1;
|
||||
nactorx->condition_info.demo_flg = aNPC_COND_DEMO_SKIP_MOVE_CIRCLE_REV | aNPC_COND_DEMO_SKIP_MOVE_RANGE_CHECK;
|
||||
actorx->status_data.weight = MASSTYPE_HEAVY;
|
||||
|
||||
|
||||
angle = def_angle[mFI_GetPuleIdx()];
|
||||
actorx->shape_info.rotation.y = angle;
|
||||
actorx->world.angle.y = angle;
|
||||
@@ -231,7 +232,7 @@ static void aHM1_schedule_proc(NPC_ACTOR* nactorx, GAME_PLAY* play, int type) {
|
||||
}
|
||||
|
||||
static void aHM1_set_talk_info(ACTOR* actorx) {
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { 0x1939, 0x1948, 0x192A, 0x1957, 0x1966, 0x1975 };
|
||||
static int msg_base[mNpc_LOOKS_NUM] = { MSG_6457, MSG_6472, MSG_6442, MSG_6487, MSG_6502, MSG_6517 };
|
||||
int looks = mNpc_GetNpcLooks(actorx);
|
||||
|
||||
mDemo_Set_msg_num(msg_base[looks] + RANDOM(3));
|
||||
|
||||
@@ -174,7 +174,7 @@ static void aHT0_schedule_proc(NPC_ACTOR* actorx, GAME_PLAY* play, int proc) {
|
||||
|
||||
static void aHT0_set_talk_info(ACTOR* actorx) {
|
||||
NPC_HARVEST_NPC0_ACTOR* actor = (NPC_HARVEST_NPC0_ACTOR*)actorx;
|
||||
static int msg_base[] = { 0x3c98, 0x3cb7, 0x3c3b, 0x3c5a, 0x3c79, 0x3cd6 };
|
||||
static int msg_base[] = { MSG_15512, MSG_15543, MSG_15419, MSG_15450, MSG_15481, MSG_15574 };
|
||||
int looks = mNpc_GetNpcLooks(&actor->actor.actor_class);
|
||||
int msg_no = msg_base[looks] + actor->_9A4 * 3;
|
||||
mDemo_Set_msg_num(msg_no + RANDOM(3));
|
||||
|
||||
@@ -39,7 +39,7 @@ static void aHN0_actor_ct(ACTOR* actorx, GAME* game) {
|
||||
static aNPC_ct_data_c ct_data = {
|
||||
&aHN0_actor_move,
|
||||
&aHN0_actor_draw,
|
||||
5,
|
||||
aNPC_CT_SCHED_TYPE_SPECIAL,
|
||||
(aNPC_TALK_REQUEST_PROC)&none_proc1,
|
||||
&aHN0_talk_init,
|
||||
&aHN0_talk_end_chk,
|
||||
@@ -49,12 +49,12 @@ static void aHN0_actor_ct(ACTOR* actorx, GAME* game) {
|
||||
|
||||
// clang-format off
|
||||
static int base_msg_table[] = {
|
||||
0x1DFF,
|
||||
0x1E11,
|
||||
0x1DED,
|
||||
0x1E23,
|
||||
0x1E35,
|
||||
0x1E47,
|
||||
MSG_7679,
|
||||
MSG_7697,
|
||||
MSG_7661,
|
||||
MSG_7715,
|
||||
MSG_7733,
|
||||
MSG_7751,
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -104,7 +104,8 @@ static void aHN0_actor_move(ACTOR* actorx, GAME* game) {
|
||||
|
||||
CLIP(npc_clip)->move_proc(actorx, game);
|
||||
((NPC_ACTOR*)actorx)->collision.pipe.attribute.pipe.radius = 20;
|
||||
if (hatumode_p != NULL && actorx->npc_id != SP_NPC_EV_HATUMODE_0 && hatumode_p->state == 2 && (hatumode_p->flags0 & (1 << (actorx->npc_id - SP_NPC_EV_HATUMODE_0))) == 0) {
|
||||
if (hatumode_p != NULL && actorx->npc_id != SP_NPC_EV_HATUMODE_0 && hatumode_p->state == 2 &&
|
||||
(hatumode_p->flags0 & (1 << (actorx->npc_id - SP_NPC_EV_HATUMODE_0))) == 0) {
|
||||
hatumode_p->flags0 |= (1 << (actorx->npc_id - SP_NPC_EV_HATUMODE_0));
|
||||
Actor_delete(actorx);
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ static void aNHM_change_talk_proc(NPC_HEM_ACTOR* hem, int talk_idx) {
|
||||
}
|
||||
|
||||
static void aNHM_set_force_talk_info_talk_request() {
|
||||
mDemo_Set_msg_num(0x2C51);
|
||||
mDemo_Set_msg_num(MSG_HEM_GOLD_AXE1);
|
||||
mPr_SetFreePossessionItem(Now_Private, ITM_GOLDEN_AXE, mPr_ITEM_COND_NORMAL);
|
||||
mSC_trophy_set(mSC_TROPHY_GOLDEN_AXE);
|
||||
mFAs_ClearGoodField();
|
||||
|
||||
@@ -143,13 +143,13 @@ static void aNPS2_actor_ct(ACTOR* actorx, GAME* game) {
|
||||
p_sel2->npc_class.condition_info.demo_flg = aNPC_COND_DEMO_SKIP_FEEL_CHECK;
|
||||
|
||||
{
|
||||
static int base_msg_table[] = { 0x13F2, 0x141A, 0x1442, 0x146A, 0x1492, 0x14BA };
|
||||
static int base_msg_table[] = { MSG_5106, MSG_5146, MSG_5186, MSG_5226, MSG_5266, MSG_5306 };
|
||||
|
||||
p_sel2->base_message = base_msg_table[mNpc_GetNpcLooks(actorx)];
|
||||
}
|
||||
|
||||
{
|
||||
static int base_msg_table2[] = { 0x39EE, 0x39F8, 0x3A02, 0x3A0C, 0x3A16, 0x3A20 };
|
||||
static int base_msg_table2[] = { MSG_14830, MSG_14840, MSG_14850, MSG_14860, MSG_14870, MSG_14880 };
|
||||
|
||||
p_sel2->base_message2 = base_msg_table2[mNpc_GetNpcLooks(actorx)];
|
||||
}
|
||||
|
||||
@@ -12,15 +12,15 @@ static int aTMN0_change_talk_proc(TAMAIRE_NPC0_ACTOR* actor, int talk_idx) {
|
||||
}
|
||||
|
||||
static void aTMN0_set_nsg(ACTOR* actorx) {
|
||||
static int base_msg_table[] = { 0x1E65, 0x1E71, 0x1E59, 0x1E7D, 0x1E89, 0x1E95 };
|
||||
static int base_msg_table[] = { MSG_7781, MSG_7793, MSG_7769, MSG_7805, MSG_7817, MSG_7829 };
|
||||
int msg_no = base_msg_table[mNpc_GetNpcLooks(actorx)] + RANDOM(3);
|
||||
|
||||
|
||||
mDemo_Set_msg_num(msg_no);
|
||||
}
|
||||
|
||||
static void aTMN0_set_norm_talk_info(ACTOR* actorx) {
|
||||
TAMAIRE_NPC0_ACTOR* actor = (TAMAIRE_NPC0_ACTOR*)actorx;
|
||||
|
||||
|
||||
aTMN0_set_nsg(actorx);
|
||||
mDemo_Set_talk_turn(TRUE);
|
||||
mDemo_Set_camera(CAMERA2_PROCESS_TALK);
|
||||
|
||||
@@ -100,7 +100,7 @@ static void aTMN1_actor_ct(ACTOR* actorx, GAME* game) {
|
||||
TAMAIRE_NPC1_ACTOR* actor = (TAMAIRE_NPC1_ACTOR*)actorx;
|
||||
|
||||
if (NPC_CLIP->birth_check_proc(actorx, game) == TRUE) {
|
||||
static int base_msg_table[] = { 0x1E65, 0x1E71, 0x1E59, 0x1E7D, 0x1E89, 0x1E95 };
|
||||
static int base_msg_table[] = { MSG_7781, MSG_7793, MSG_7769, MSG_7805, MSG_7817, MSG_7829 };
|
||||
|
||||
actor->npc_class.schedule.schedule_proc = aTMN1_schedule_proc;
|
||||
NPC_CLIP->ct_proc(actorx, game, &ct_data);
|
||||
@@ -144,7 +144,7 @@ static int aTMN1_set_request_act(TAMAIRE_NPC1_ACTOR* actor, u8 prio, u8 idx, u8
|
||||
|
||||
if (prio >= actor->npc_class.request.act_priority) {
|
||||
u16 args[6];
|
||||
|
||||
|
||||
bzero(args, sizeof(args));
|
||||
args[0] = obj;
|
||||
args[2] = move_x;
|
||||
@@ -164,7 +164,10 @@ static void aTMN1_tama_process(ACTOR* actorx, GAME* game) {
|
||||
static u8 table[] = { TOOL_TAMA2, TOOL_TAMA1, TOOL_TAMA4, TOOL_TAMA3 };
|
||||
|
||||
if (actor->npc_class.right_hand.item_actor_p == NULL) {
|
||||
actor->npc_class.right_hand.item_actor_p = CLIP(tools_clip)->aTOL_birth_proc(table[(((mActor_name_t)(actorx->npc_id - SP_NPC_EV_TAMAIRE_1) >> 1) & 1 ^ 1)], aTOL_ACTION_TAKEOUT, actorx, game, -1, NULL);
|
||||
actor->npc_class.right_hand.item_actor_p =
|
||||
CLIP(tools_clip)
|
||||
->aTOL_birth_proc(table[(((mActor_name_t)(actorx->npc_id - SP_NPC_EV_TAMAIRE_1) >> 1) & 1 ^ 1)],
|
||||
aTOL_ACTION_TAKEOUT, actorx, game, -1, NULL);
|
||||
} else {
|
||||
TOOLS_ACTOR* tama = (TOOLS_ACTOR*)actor->npc_class.right_hand.item_actor_p;
|
||||
|
||||
@@ -172,7 +175,10 @@ static void aTMN1_tama_process(ACTOR* actorx, GAME* game) {
|
||||
}
|
||||
|
||||
if (actor->npc_class.left_hand.item_actor_p == NULL) {
|
||||
actor->npc_class.left_hand.item_actor_p = CLIP(tools_clip)->aTOL_birth_proc(table[2 + (((mActor_name_t)(actorx->npc_id - SP_NPC_EV_TAMAIRE_1) >> 1) & 1 ^ 1)], aTOL_ACTION_TAKEOUT, actorx, game, -1, NULL);
|
||||
actor->npc_class.left_hand.item_actor_p =
|
||||
CLIP(tools_clip)
|
||||
->aTOL_birth_proc(table[2 + (((mActor_name_t)(actorx->npc_id - SP_NPC_EV_TAMAIRE_1) >> 1) & 1 ^ 1)],
|
||||
aTOL_ACTION_TAKEOUT, actorx, game, -1, NULL);
|
||||
} else {
|
||||
TOOLS_ACTOR* tama = (TOOLS_ACTOR*)actor->npc_class.left_hand.item_actor_p;
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ static void aTKN0_actor_ct(ACTOR* actorx, GAME* game) {
|
||||
TOKYOSO_NPC0_ACTOR* actor = (TOKYOSO_NPC0_ACTOR*)actorx;
|
||||
|
||||
if (NPC_CLIP->birth_check_proc(actorx, game) == TRUE) {
|
||||
static int base_msg_table[] = { 0x19DD, 0x19ED, 0x19CD, 0x19FD, 0x1A0D, 0x1A1D };
|
||||
static int base_msg_table[] = { MSG_6621, MSG_6637, MSG_6605, MSG_6653, MSG_6669, MSG_6685 };
|
||||
|
||||
actor->npc_class.schedule.schedule_proc = aTKN0_schedule_proc;
|
||||
NPC_CLIP->ct_proc(actorx, game, &ct_data);
|
||||
@@ -153,7 +153,7 @@ static int aTKN0_set_request_act(TOKYOSO_NPC0_ACTOR* actor, u8 prio, u8 idx, u8
|
||||
|
||||
if (prio >= actor->npc_class.request.act_priority) {
|
||||
u16 args[6];
|
||||
|
||||
|
||||
bzero(args, sizeof(args));
|
||||
args[0] = obj;
|
||||
args[2] = move_x;
|
||||
|
||||
@@ -101,7 +101,7 @@ static void aTKN1_actor_ct(ACTOR* actorx, GAME* game) {
|
||||
TOKYOSO_NPC1_ACTOR* actor = (TOKYOSO_NPC1_ACTOR*)actorx;
|
||||
|
||||
if (NPC_CLIP->birth_check_proc(actorx, game) == TRUE) {
|
||||
static int base_msg_table[] = { 0x19DD, 0x19ED, 0x19CD, 0x19FD, 0x1A0D, 0x1A1D };
|
||||
static int base_msg_table[] = { MSG_6621, MSG_6637, MSG_6605, MSG_6653, MSG_6669, MSG_6685 };
|
||||
|
||||
actor->npc_class.schedule.schedule_proc = aTKN1_schedule_proc;
|
||||
NPC_CLIP->ct_proc(actorx, game, &ct_data);
|
||||
@@ -131,7 +131,7 @@ static int aTKN1_set_request_act(TOKYOSO_NPC1_ACTOR* actor, u8 prio, u8 idx, u8
|
||||
|
||||
if (prio >= actor->npc_class.request.act_priority) {
|
||||
u16 args[6];
|
||||
|
||||
|
||||
bzero(args, sizeof(args));
|
||||
args[0] = obj;
|
||||
args[2] = move_x;
|
||||
|
||||
@@ -100,7 +100,7 @@ static void aTNN0_actor_ct(ACTOR* actorx, GAME* game) {
|
||||
TUNAHIKI_NPC0_ACTOR* actor = (TUNAHIKI_NPC0_ACTOR*)actorx;
|
||||
|
||||
if (NPC_CLIP->birth_check_proc(actorx, game) == TRUE) {
|
||||
static int base_msg_table[] = { 0x1984, 0x1990, 0x1978, 0x199C, 0x19A8, 0x19B4 };
|
||||
static int base_msg_table[] = { MSG_6532, MSG_6544, MSG_6520, MSG_6556, MSG_6568, MSG_6580 };
|
||||
|
||||
actor->npc_class.schedule.schedule_proc = aTNN0_schedule_proc;
|
||||
NPC_CLIP->ct_proc(actorx, game, &ct_data);
|
||||
@@ -144,12 +144,13 @@ static void aTNN0_actor_init(ACTOR* actorx, GAME* game) {
|
||||
NPC_CLIP->init_proc(actorx, game);
|
||||
}
|
||||
|
||||
static int aTNN0_set_request_act(TUNAHIKI_NPC0_ACTOR* actor, u8 prio, u8 idx, u8 type, u16 obj, s16 move_x, s16 move_z) {
|
||||
static int aTNN0_set_request_act(TUNAHIKI_NPC0_ACTOR* actor, u8 prio, u8 idx, u8 type, u16 obj, s16 move_x,
|
||||
s16 move_z) {
|
||||
int res = FALSE;
|
||||
|
||||
if (prio >= actor->npc_class.request.act_priority) {
|
||||
u16 args[6];
|
||||
|
||||
|
||||
bzero(args, sizeof(args));
|
||||
args[0] = obj;
|
||||
args[2] = move_x;
|
||||
|
||||
@@ -100,7 +100,7 @@ static void aTNN1_actor_ct(ACTOR* actorx, GAME* game) {
|
||||
TUNAHIKI_NPC1_ACTOR* actor = (TUNAHIKI_NPC1_ACTOR*)actorx;
|
||||
|
||||
if (NPC_CLIP->birth_check_proc(actorx, game) == TRUE) {
|
||||
static int base_msg_table[] = { 0x1984, 0x1990, 0x1978, 0x199C, 0x19A8, 0x19B4 };
|
||||
static int base_msg_table[] = { MSG_6532, MSG_6544, MSG_6520, MSG_6556, MSG_6568, MSG_6580 };
|
||||
|
||||
actor->npc_class.schedule.schedule_proc = aTNN1_schedule_proc;
|
||||
NPC_CLIP->ct_proc(actorx, game, &ct_data);
|
||||
@@ -133,12 +133,13 @@ static void aTNN1_actor_init(ACTOR* actorx, GAME* game) {
|
||||
NPC_CLIP->init_proc(actorx, game);
|
||||
}
|
||||
|
||||
static int aTNN1_set_request_act(TUNAHIKI_NPC1_ACTOR* actor, u8 prio, u8 idx, u8 type, u16 obj, s16 move_x, s16 move_z) {
|
||||
static int aTNN1_set_request_act(TUNAHIKI_NPC1_ACTOR* actor, u8 prio, u8 idx, u8 type, u16 obj, s16 move_x,
|
||||
s16 move_z) {
|
||||
int res = FALSE;
|
||||
|
||||
if (prio >= actor->npc_class.request.act_priority) {
|
||||
u16 args[6];
|
||||
|
||||
|
||||
bzero(args, sizeof(args));
|
||||
args[0] = obj;
|
||||
args[2] = move_x;
|
||||
@@ -156,7 +157,7 @@ static int aTNN1_set_request_act(TUNAHIKI_NPC1_ACTOR* actor, u8 prio, u8 idx, u8
|
||||
static void aTNN1_actor_move(ACTOR* actorx, GAME* game) {
|
||||
aEv_tunahiki_c* tunahiki = (aEv_tunahiki_c*)mEv_get_save_area(mEv_EVENT_SPORTS_FAIR_TUG_OF_WAR, 9);
|
||||
TUNAHIKI_NPC1_ACTOR* actor = (TUNAHIKI_NPC1_ACTOR*)actorx;
|
||||
|
||||
|
||||
NPC_CLIP->move_proc(actorx, game);
|
||||
actorx->world.position.z = actorx->home.position.z;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user