diff --git a/configure.py b/configure.py index a6785e4a..9fa51cd9 100644 --- a/configure.py +++ b/configure.py @@ -1113,7 +1113,7 @@ config.libs = [ Object(NonMatching, "actor/npc/ac_npc_majin3.c"), Object(NonMatching, "actor/npc/ac_npc_majin4.c"), Object(NonMatching, "actor/npc/ac_npc_majin5.c"), - Object(NonMatching, "actor/npc/ac_npc_mamedanuki.c"), + Object(Matching, "actor/npc/ac_npc_mamedanuki.c"), Object(NonMatching, "actor/npc/ac_npc_mask_cat.c"), Object(NonMatching, "actor/npc/ac_npc_mask_cat2.c"), Object(NonMatching, "actor/npc/ac_npc_needlework.c"), @@ -1129,7 +1129,7 @@ config.libs = [ Object(Matching, "actor/npc/ac_npc_rtc.c"), Object(Matching, "actor/npc/ac_npc_sendo.c"), Object(NonMatching, "actor/npc/ac_npc_shasho.c"), - Object(NonMatching, "actor/npc/ac_npc_shop_master.c"), + Object(Matching, "actor/npc/ac_npc_shop_master.c"), Object(NonMatching, "actor/npc/ac_npc_shop_mastersp.c"), Object(NonMatching, "actor/npc/ac_npc_sleep_obaba.c"), Object(NonMatching, "actor/npc/ac_npc_soncho.c"), diff --git a/include/ac_npc_mamedanuki.h b/include/ac_npc_mamedanuki.h index 040c4ea0..187fc83c 100644 --- a/include/ac_npc_mamedanuki.h +++ b/include/ac_npc_mamedanuki.h @@ -2,12 +2,25 @@ #define AC_NPC_MAMEDANUKI_H #include "types.h" -#include "m_actor.h" +#include "ac_npc.h" +#include "m_private.h" +#include "ac_npc_shop_common.h" #ifdef __cplusplus extern "C" { #endif +enum { + aNMD_ZONE_0, + aNMD_ZONE_1, + aNMD_ZONE_2, + aNMD_ZONE_3, + + aNMD_ZONE_NUM +}; + +typedef NPC_SHOP_COMMON_ACTOR NPC_MAMEDANUKI_ACTOR; + extern ACTOR_PROFILE Npc_Mamedanuki_Profile; #ifdef __cplusplus @@ -15,4 +28,3 @@ extern ACTOR_PROFILE Npc_Mamedanuki_Profile; #endif #endif - diff --git a/include/ac_npc_shop_common.h b/include/ac_npc_shop_common.h index ad78f3d0..699ea123 100644 --- a/include/ac_npc_shop_common.h +++ b/include/ac_npc_shop_common.h @@ -5,6 +5,7 @@ #include "ac_npc.h" #include "m_mail_password_check.h" #include "m_font.h" +#include "m_player_lib.h" #ifdef __cplusplus extern "C" { @@ -22,79 +23,7 @@ extern "C" { #define aNSC_LOAN_STATUE 0 #define aNSC_LOAN_BASEMENT 49800 -enum aNSC_action { - aNSC_ACTION_EMPTY, - aNSC_ACTION_SAY_HELLO_APPROACH, - aNSC_ACTION_SAY_HELLO_END_WAIT, - aNSC_ACTION_03_SAY_HELLO_END_WAIT, - aNSC_ACTION_CHECK_ROOF_COL_ORDER, - aNSC_ACTION_CHECK_ROOF_COL_ORDER2, - aNSC_ACTION_CHECK_COL_CHG_OR_MAKE_BASEMENT, - aNSC_ACTION_PRESENT_BALLOON_START_WAIT, - aNSC_ACTION_PRESENT_BALLOON_TRANS_MOVE, - aNSC_ACTION_PRESENT_BALLOON_TRANS_TAKEOUT, - aNSC_ACTION_PRESENT_BALLOON_TRANS_WAIT, - aNSC_ACTION_PRESENT_BALLOON_END_WAIT, - aNSC_ACTION_REQUEST_Q_START_WAIT, - aNSC_ACTION_REQUEST_Q_ANSWER_WAIT, - aNSC_ACTION_REQUEST_Q_ANSWER_WAIT2, - aNSC_ACTION_REQUEST_Q_END_WAIT, - aNSC_ACTION_ANSWER_BUY_ITEM, - aNSC_ACTION_BUY_MENU_OPEN_WAIT, - aNSC_ACTION_BUY_MENU_CLOSE_WAIT, - aNSC_ACTION_MSG_WIN_OPEN_WAIT, - aNSC_ACTION_BUY_SUM_CHECK, - aNSC_ACTION_BUY_CHECK, - aNSC_ACTION_BUY_AFTER_SERVICE, - aNSC_ACTION_BUY_CONTINUE_CHECK, - aNSC_ACTION_RECEIVE_CHECK, - aNSC_ACTION_19_ANSWER_BUY_ITEM, - aNSC_ACTION_0x1a_UNUSED, - aNSC_ACTION_0x1b_UNUSED, - aNSC_ACTION_MSG_WIN_OPEN_WAIT2, - aNSC_ACTION_ORDER_CHECK, - aNSC_ACTION_SELL_CHECK_BEFORE, - aNSC_ACTION_SELL_CHECK, - aNSC_ACTION_SELL_ANSWER0, - aNSC_ACTION_21_REQUEST_Q_END_WAIT, - aNSC_ACTION_SELL_ITEM_WITHOUT_TICKET, - aNSC_ACTION_SELL_ITEM_WITH_TICKET, - aNSC_ACTION_SELL_ITEM_POCKETS_FULL, - aNSC_ACTION_SELL_ITEM_INSUFICIENT_FUNDS, - aNSC_ACTION_SHOW_ITEM_CHECK, - aNSC_ACTION_CHG_CLOTH_START_WAIT, - aNSC_ACTION_CHG_CLOTH_END_WAIT, - aNSC_ACTION_PW_ENTRY_SEND_ADDR_START_WAIT, - aNSC_ACTION_2A_BUY_MENU_OPEN_WAIT, - aNSC_ACTION_0x2b_UNUSED, - aNSC_ACTION_PW_MSG_WIN_OPEN_WAIT, - aNSC_ACTION_PW_SEND_ADDR_CHECK, - aNSC_ACTION_PW_SEL_ITEM_START_WAIT, - aNSC_ACTION_2F_BUY_MENU_OPEN_WAIT, - aNSC_ACTION_0x30_UNUSED, - aNSC_ACTION_0x31_UNUSED, - aNSC_ACTION_PW_SEND_CHECK, - aNSC_ACTION_PW_RETRY_SEL_ITEM_CHECK, - aNSC_ACTION_PC_INPUT_PW_START_WAIT, - aNSC_ACTION_35_BUY_MENU_OPEN_WAIT, - aNSC_ACTION_0x36_UNUSED, - aNSC_ACTION_PC_MSG_WIN_OPEN_WAIT, - aNSC_ACTION_PC_RETRY_INPUT_PW_CHECK, - aNSC_ACTION_PC_PRESENT_START_WAIT, - aNSC_ACTION_PC_PRESENT_TRANS_TAKEOUT, - aNSC_ACTION_PC_PRESENT_TRANS_WAIT, - aNSC_ACTION_PC_PRESENT_END_WAIT, - aNSC_ACTION_WAIT, - aNSC_ACTION_0x3e_WAIT, - aNSC_ACTION_WALK_PL_OTHER_ZONE, - aNSC_ACTION_0x40_WAIT, - aNSC_ACTION_0x41_WALK_PL_OTHER_ZONE, - aNSC_ACTION_TURN, - aNSC_ACTION_GOODBYE_WAIT, - aNSC_ACTION_SAY_GOODBYE, - aNSC_ACTION_EXIT_WAIT, - aNSC_ACTION_NUM -}; +#define aNSC_PLAYER_DISTANCE (f32)60.0 enum aNSC_msg_no { aNSC_MSG_WAIT = -0x1, @@ -122,7 +51,7 @@ enum aNSC_msg_no { aNSC_MSG_CANCEL, aNSC_MSG_START_CALL_NORMAL, aNSC_MSG_INTERACT_START, - aNSC_MSG_INTERACT_CANCEl, + aNSC_MSG_INTERACT_CANCEL, aNSC_MSG_KABU_INFO, aNSC_MSG_SELL_START, aNSC_MSG_SELL_OFFER, @@ -157,6 +86,11 @@ enum aNSC_msg_no { aNSC_MSG_SELL_QUEST, aNSC_MSG_JUNK_ACCEPT, aNSC_MSG_JUNK_CANCEL, + aNSC_MSG_3B, + aNSC_MSG_3C, + aNSC_MSG_3D, + aNSC_MSG_3E, + aNSC_MSG_3F, aNSC_MSG_SELL_SHOVEL = 0x64, aNSC_MSG_SELL_NET, aNSC_MSG_SELL_ROD, @@ -199,7 +133,6 @@ enum aNSC_msg_no { aNSC_MSG_PSWD_GOOD_MAGAZINE_2, aNSC_MSG_GIFT_OUT, aNSC_MSG_PSWD_BAD, - aNSC_MSG_TAKE_OFF_HANDS= 0x108a }; enum aNSC_wait_type { @@ -269,6 +202,13 @@ enum aNSC_request_show_type { aNSC_REQUEST_SHOW_TYPE_CARPET }; +enum { + aNSC_DAY_NORMAL, + aNSC_DAY_FUKUBIKI, + + aNSC_DAY_NUM +}; + typedef struct aNSC_animation_data_s { int anim; int talk_flag; @@ -282,6 +222,8 @@ typedef void (*aNSC_INIT_PROC)(NPC_SHOP_COMMON_ACTOR*, GAME_PLAY*); typedef int (*aNSC_PC_CHECK_PASSWORD_PROC)(mMpswd_password_c*); typedef void (*aNSC_ITEM_SELL_PROC)(NPC_SHOP_COMMON_ACTOR*, mActor_name_t); typedef void (*aNSC_ACTION_PROC)(NPC_SHOP_COMMON_ACTOR*, GAME_PLAY*); +typedef void (*aNSC_TALK_PROC)(NPC_SHOP_COMMON_ACTOR*, GAME_PLAY*); +typedef void (*aNSC_TALK_REQ_PROC)(NPC_SHOP_COMMON_ACTOR*, PLAYER_ACTOR*); struct npc_shop_common_actor_s { /* 0x000 */ NPC_ACTOR npc_class; @@ -292,13 +234,14 @@ struct npc_shop_common_actor_s { /* 0x9A2 */ u8 zone; /* 0x9A3 */ u8 next_zone; /* 0x9A4 */ u8 player_zone; + /* 0x9A5 */ u8 sale_type; /* 0x9A6 */ s16 player_angle; /* 0x9A8 */ u32 money; /* 0x9AC */ u32 value; /* 0x9B0 */ u32 counter; /* 0x9B4 */ mActor_name_t sell_item; /* 0x9B6 */ u8 ut_x; - /* 0x9B7 */ u8 ut_y; + /* 0x9B7 */ u8 ut_z; /* 0x9B8 */ u8 is_selling; /* 0x9B9 */ u8 _9B9; /* 0x9BA */ mActor_name_t order_item; diff --git a/include/ac_npc_shop_master.h b/include/ac_npc_shop_master.h index 95ad0ff1..537f6425 100644 --- a/include/ac_npc_shop_master.h +++ b/include/ac_npc_shop_master.h @@ -21,8 +21,6 @@ typedef NPC_SHOP_COMMON_ACTOR NPC_SHOP_MASTER_ACTOR; extern ACTOR_PROFILE Npc_Shop_Master_Profile; -#define aNSC_PLAYER_DISTANCE (f32)60.0 - #ifdef __cplusplus extern "C" { #endif diff --git a/include/m_name_table.h b/include/m_name_table.h index 65244480..f70b6937 100644 --- a/include/m_name_table.h +++ b/include/m_name_table.h @@ -541,6 +541,7 @@ extern int mNT_check_unknown(mActor_name_t item_no); #define ITEM_IS_MYUMBRELLA_TOOL(item) ((item) >= ITM_MY_ORG_UMBRELLA0 && (item) <= ITM_MY_ORG_UMBRELLA7) #define ITEM_IS_SCOOP(item) ((item) >= ITM_SHOVEL && (item) <= ITM_SHOVEL) #define ITEM_IS_GOLD_SCOOP(item) ((item) >= ITM_GOLDEN_SHOVEL && (item) <= ITM_GOLDEN_SHOVEL) +#define ITEM_IS_PAINT(item) ((item) >= ITM_RED_PAINT && (item) <= ITM_BROWN_PAINT) #define BG_CATEGORY 0 #define ENV_CATEGORY 8 diff --git a/src/actor/npc/ac_npc_mamedanuki.c b/src/actor/npc/ac_npc_mamedanuki.c new file mode 100644 index 00000000..21cab562 --- /dev/null +++ b/src/actor/npc/ac_npc_mamedanuki.c @@ -0,0 +1,168 @@ +#include "ac_npc_mamedanuki.h" + +#include "m_shop.h" +#include "m_common_data.h" +#include "m_font.h" +#include "m_msg.h" +#include "m_private.h" +#include "m_string.h" +#include "m_actor_type.h" +#include "m_player_lib.h" +#include "m_mail_password_check.h" +#include "m_actor.h" +#include "m_actor_type.h" +#include "m_camera2.h" +#include "m_house.h" +#include "m_melody.h" +#include "m_scene.h" +#include "m_collision_bg.h" +#include "m_demo.h" +#include "m_player.h" +#include "m_bgm.h" +#include "ac_npc.h" +#include "ac_uki.h" +#include "ac_npc_anim_def.h" + +#define aNSC_MAMEDANUKI + +enum { + aNMD_SALE_TYPE_NORMAL, + aNMD_SALE_TYPE_FTR, + aNMD_SALE_TYPE_CLOTH, + aNMD_SALE_TYPE_CARPET, + + aNMD_SALE_TYPE_NUM +}; + +void aNMD_actor_ct(ACTOR* mamedanuki, GAME* game); +void aNMD_actor_dt(ACTOR* actorx, GAME* game); +void aNMD_actor_move(ACTOR* actorx, GAME* game); +void aNMD_actor_draw(ACTOR* actorx, GAME* game); +void aNMD_actor_init(ACTOR* actorx, GAME* game); +void aNMD_actor_save(ACTOR* actorx, GAME* game); + +// clang-format off +ACTOR_PROFILE Npc_Mamedanuki_Profile = { + mAc_PROFILE_NPC_MAMEDANUKI, + ACTOR_PART_NPC, + ACTOR_STATE_NONE, + SP_NPC_MAMEDANUKI0, + ACTOR_OBJ_BANK_KEEP, + sizeof(NPC_MAMEDANUKI_ACTOR), + &aNMD_actor_ct, + &aNMD_actor_dt, + &aNMD_actor_init, + mActor_NONE_PROC1, + &aNMD_actor_save, +}; +// clang-format on + +// TODO: are these declared in every file? DnM+ says they're static yet they seemingly must be defined after their usage... +static void aNSC_setupAction(NPC_SHOP_COMMON_ACTOR *mamedanuki, GAME_PLAY* play, int p3); +static int aNSC_check_buy_item_sub(u32 *p1, mActor_name_t itm_name); +static int aNSC_check_buy_paper(u32 *p1, mActor_name_t itm_name); +static void aNSC_init_proc(NPC_SHOP_COMMON_ACTOR *mamedanuki, GAME_PLAY * play, int p3); +static void aNSC_BGcheck(ACTOR* actorx); +static void aNSC_set_zone_data(NPC_SHOP_COMMON_ACTOR* mamedanuki, ACTOR* actor); +static void aNSC_set_player_angl(NPC_SHOP_COMMON_ACTOR* mamedanuki); +static void aNSC_talk_demo_proc(ACTOR* actorx); +static void aNSC_sell_camera(NPC_SHOP_COMMON_ACTOR* mamedanuki, GAME_PLAY* play); + +static ACTOR* aNMD_actor_p[2]; +static int aNMD_selectIdx = 0; + +void aNMD_actor_ct(ACTOR* actorx, GAME* game) { + // clang-format off + static aNPC_ct_data_c ct_data = { + &aNMD_actor_move, + &aNMD_actor_draw, + 0, + NULL, + NULL, + NULL, + 1, + }; + // clang-format on + + static int start_act_idx[] = { 0, 1 }; // TODO: figure out how the hell to define this with enums + // clang-format off + static u8 special_sale_type[mSP_KIND_MAX] = { + aNMD_SALE_TYPE_FTR, + aNMD_SALE_TYPE_NORMAL, + aNMD_SALE_TYPE_CLOTH, + aNMD_SALE_TYPE_CARPET, + aNMD_SALE_TYPE_CARPET, + }; + // clang-format on + + NPC_MAMEDANUKI_ACTOR* mamedanuki = (NPC_MAMEDANUKI_ACTOR*)actorx; + int action; + CLIP(npc_clip)->ct_proc(actorx, game, &ct_data); + + mamedanuki->npc_class.draw.main_animation.keyframe.morph_counter = 0.0f; + mamedanuki->sell_item = EMPTY_NO; + mamedanuki->npc_class.condition_info.hide_flg = FALSE; + mamedanuki->talk_start_tim = -1; + actorx->shape_info.draw_shadow = TRUE; + actorx->shape_info.rotation.y = DEG2SHORT_ANGLE2(180.0f); + actorx->world.angle.y = DEG2SHORT_ANGLE2(180.0f); + mamedanuki->npc_class.collision.pipe.attribute.pipe.radius = 20; + + { + u8 sale_type = aNMD_SALE_TYPE_NORMAL; + + if (Common_Get(tanuki_shop_status) == mSP_TANUKI_SHOP_STATUS_EVENT) { + int sale_kind = mSP_WhatSpecialSale(); + + if (sale_kind >= 0 && sale_kind <= mSP_KIND_WALLPAPER) { + sale_type = special_sale_type[sale_kind]; + } + } + + mamedanuki->sale_type = sale_type; + } + + if (Common_Get(door_data).door_actor_name == RSV_NO) { + mamedanuki->npc_class.talk_info.melody_inst = 0; + action = 61; + } else { + action = start_act_idx[actorx->npc_id != SP_NPC_MAMEDANUKI0]; + } + + { + int idx; + + if (actorx->npc_id == SP_NPC_MAMEDANUKI1) { + idx = 1; + } else { + idx = 0; + } + + aNMD_actor_p[idx] = actorx; + aNSC_setupAction(mamedanuki, (GAME_PLAY*)game, action); + aNMD_selectIdx = 0; + } +} + +void aNMD_actor_save(ACTOR* actorx, GAME* game) { + (CLIP(npc_clip)->save_proc)(actorx, game); +} + +void aNMD_actor_dt(ACTOR* actorx, GAME* game) { + (CLIP(npc_clip)->dt_proc)(actorx, game); +} + +void aNMD_actor_init(ACTOR* actorx, GAME* game) { + (CLIP(npc_clip)->init_proc)(actorx, game); +} + +void aNMD_actor_draw(ACTOR* actorx, GAME* game) { + (CLIP(npc_clip)->draw_proc)(actorx, game); +} + +static u8 aNMD_get_zone(NPC_MAMEDANUKI_ACTOR* mamedanuki, xyz_t wpos); +static u8 aNMD_get_next_zone(NPC_MAMEDANUKI_ACTOR* mamedanuki, u8 p1, u8 p2); +static void aNMD_search_player(NPC_MAMEDANUKI_ACTOR* mamedanuki, GAME_PLAY* play); +static void aNMD_search_player2(NPC_MAMEDANUKI_ACTOR* mamedanuki, GAME_PLAY* play); + +#include "../src/actor/npc/ac_npc_mamedanuki_move.c_inc" diff --git a/src/actor/npc/ac_npc_mamedanuki_anime.c b/src/actor/npc/ac_npc_mamedanuki_anime.c new file mode 100644 index 00000000..2f1869fd --- /dev/null +++ b/src/actor/npc/ac_npc_mamedanuki_anime.c @@ -0,0 +1,71 @@ +{ aNPC_ANIM_WAIT1, FALSE }, +{ aNPC_ANIM_WALK1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WALK1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_TRANSFER1, TRUE }, +{ aNPC_ANIM_TRANS_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, FALSE }, +{ aNPC_ANIM_WALK1, FALSE }, +{ aNPC_ANIM_WALK1, FALSE }, +{ aNPC_ANIM_RUN1, FALSE }, +{ aNPC_ANIM_RUN1, FALSE }, +{ aNPC_ANIM_WALK1, FALSE }, +{ aNPC_ANIM_WAIT1, FALSE }, +{ aNPC_ANIM_WAIT1, FALSE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, FALSE }, diff --git a/src/actor/npc/ac_npc_mamedanuki_move.c_inc b/src/actor/npc/ac_npc_mamedanuki_move.c_inc new file mode 100644 index 00000000..da0d3995 --- /dev/null +++ b/src/actor/npc/ac_npc_mamedanuki_move.c_inc @@ -0,0 +1,1097 @@ +static u8 aNMD_get_zone(NPC_MAMEDANUKI_ACTOR* mamedanuki, xyz_t wpos) { + // TODO: zone enum + + // clang-format off + static u8 zone_sale_normal[UT_Z_NUM][UT_X_NUM] = { + {0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x08, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x10, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x19, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x22, 0x22, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x22, 0x22, 0x22, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x31, 0x32, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x3a, 0x3a, 0x3a, 0x3a, 0x3b, 0x3b, 0x3b, 0x3c, 0x3d, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x3f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x42, 0x42, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x3f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x42, 0x42, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + }; + // clang-format on + + // clang-format off + static u8 zone_sale_ftr[UT_Z_NUM][UT_X_NUM] = { + {0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x08, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x10, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x19, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x24, 0x25, 0x26, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x28, 0x29, 0x2a, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x2c, 0x2d, 0x2e, 0x2e, 0x2e, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x35, 0x36, 0x37, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x39, 0x3a, 0x3a, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x39, 0x3a, 0x3a, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + }; + // clang-format on + + // clang-format off + static u8 zone_sale_cloth[UT_Z_NUM][UT_X_NUM] = { + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x01, 0x02, 0x03, 0x03, 0x03, 0x04, 0x05, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x09, 0x09, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c, 0x0d, 0x0d, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x0a, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c, 0x0d, 0x0d, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + }; + // clang-format on + + // clang-format off + static u8 zone_sale_carpet[UT_Z_NUM][UT_X_NUM] = { + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x03, 0x04, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + }; + // clang-format on + + // clang-format off + static u8* sale_zone[] = { + (u8*)zone_sale_normal, + (u8*)zone_sale_ftr, + (u8*)zone_sale_cloth, + (u8*)zone_sale_carpet, + }; + // clang-format on + + u8* zone_p = sale_zone[mamedanuki->sale_type]; + int ux; + int uz; + + mFI_Wpos2UtNum(&ux, &uz, wpos); + ux -= 1; + uz -= 3; + + if (ux < 0) { + ux = 0; + } else if (ux >= 10) { + ux = 9; + } + + if (uz < 0) { + uz = 0; + } else if (uz >= 10) { + uz = 9; + } + + return (&zone_p[uz * UT_X_NUM])[ux]; +} + +static u8 aNMD_get_next_zone(NPC_MAMEDANUKI_ACTOR* mamedanuki, u8 p1, u8 p2) { + static u8 next_zone_sale_normal[68][68] = { + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x08, 0x09, 0x02, 0x03, 0x04, 0x05, 0x05, 0x05, 0x10, + 0x10, 0x10, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x19, 0x19, 0x19, 0x19, 0x19, 0x05, 0x05, 0x05, 0x05, + 0x19, 0x19, 0x19, 0x19, 0x05, 0x05, 0x05, 0x05, 0x19, 0x19, 0x19, 0x19, 0x05, 0x05, 0x05, 0x19, 0x19, + 0x19, 0x19, 0x19, 0x19, 0x19, 0x05, 0x05, 0x19, 0x19, 0x05, 0x05, 0x05, 0x19, 0x19, 0x19, 0x19, 0x19, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x00, 0x09, 0x02, 0x03, 0x04, 0x05, 0x05, 0x05, 0x00, + 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x00, 0x00, 0x05, 0x05, 0x05, 0x00, 0x00, 0x05, 0x05, 0x05, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x00, 0x09, 0x0A, 0x0B, 0x03, 0x04, 0x05, 0x05, 0x00, + 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, + 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x05, 0x05, 0x05, 0x05, 0x00, 0x05, 0x05, 0x05, 0x05, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x00, 0x01, 0x02, 0x0B, 0x04, 0x05, 0x05, 0x05, 0x00, + 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, + 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x05, 0x05, 0x05, 0x05, 0x00, 0x05, 0x05, 0x05, 0x05, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x00, 0x01, 0x03, 0x0B, 0x0C, 0x05, 0x05, 0x05, 0x00, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x05, 0x05, 0x05, 0x05, 0x00, 0x05, 0x05, 0x05, 0x05, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0E, 0x00, 0x01, 0x02, 0x0B, 0x0C, 0x0D, 0x0E, 0x0E, 0x00, + 0x1E, 0x1E, 0x15, 0x15, 0x15, 0x16, 0x0E, 0x0E, 0x00, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x0E, + 0x1E, 0x1E, 0x1E, 0x1E, 0x26, 0x26, 0x0E, 0x0E, 0x1E, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0E, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x0E, 0x0E, 0x36, 0x3B, 0x3B, 0x3B, 0x0E, 0x36, 0x41, 0x41, 0x41, 0x0E, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0E, 0x00, 0x01, 0x02, 0x03, 0x0C, 0x0D, 0x0E, 0x0E, 0x0D, + 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x16, 0x0E, 0x0E, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0E, 0x0E, + 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0E, 0x0E, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0E, 0x0E, 0x0D, 0x0D, + 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0E, 0x0E, 0x0D, 0x0D, 0x0D, 0x0E, 0x0E, 0x0D, 0x0D, 0x0D, 0x0D, 0x0E, + }, + { + 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0F, 0x0D, 0x0D, 0x0D, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x0D, + 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x16, 0x17, 0x18, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x21, 0x21, 0x21, + 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x29, 0x29, 0x29, 0x0D, 0x0D, 0x0D, 0x0D, 0x30, 0x30, 0x30, 0x0D, 0x0D, + 0x0D, 0x0D, 0x0D, 0x0D, 0x39, 0x39, 0x39, 0x0D, 0x0D, 0x3E, 0x3E, 0x3E, 0x0D, 0x0D, 0x0D, 0x43, 0x43, + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x10, 0x10, 0x19, 0x19, 0x19, 0x19, 0x19, 0x00, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x00, + 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x00, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x00, 0x19, 0x19, + 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, + }, + { + 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x08, 0x09, 0x0A, 0x0B, 0x02, 0x02, 0x02, 0x02, 0x10, + 0x11, 0x12, 0x12, 0x12, 0x12, 0x02, 0x02, 0x02, 0x19, 0x1A, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x02, + 0x22, 0x23, 0x1B, 0x1B, 0x1B, 0x1B, 0x02, 0x02, 0x2A, 0x2A, 0x2A, 0x1B, 0x1B, 0x1B, 0x02, 0x32, 0x32, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x02, 0x02, 0x32, 0x33, 0x33, 0x33, 0x33, 0x32, 0x33, 0x33, 0x33, 0x33, + }, + { + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x09, 0x0A, 0x0B, 0x02, 0x02, 0x02, 0x02, 0x1B, + 0x12, 0x12, 0x12, 0x12, 0x02, 0x02, 0x02, 0x02, 0x12, 0x12, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x02, + 0x12, 0x23, 0x1B, 0x1B, 0x1B, 0x1B, 0x02, 0x02, 0x2A, 0x2A, 0x2A, 0x1B, 0x1B, 0x1B, 0x02, 0x12, 0x12, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x02, 0x02, 0x12, 0x1B, 0x1B, 0x1B, 0x1B, 0x12, 0x1B, 0x1B, 0x1B, 0x1B, + }, + { + 0x03, 0x03, 0x03, 0x03, 0x04, 0x05, 0x06, 0x07, 0x03, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x03, + 0x13, 0x13, 0x13, 0x14, 0x15, 0x16, 0x0F, 0x07, 0x1C, 0x1C, 0x1C, 0x1C, 0x1D, 0x1E, 0x1E, 0x1E, 0x07, + 0x1C, 0x1C, 0x24, 0x1D, 0x1E, 0x1E, 0x07, 0x07, 0x1C, 0x1C, 0x1E, 0x1E, 0x1E, 0x1E, 0x07, 0x1C, 0x1C, + 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x07,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0D, 0x07, 0x07, + 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x07, 0x07, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x07, 0x0D, 0x0D, + 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x07, 0x07, 0x0D, 0x0D, 0x0D, 0x07, 0x07, 0x0D, 0x0D, 0x0D, 0x0D, 0x07, + }, + { + 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x07, 0x0E, 0x0E, 0x0E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x0D, + 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x16, 0x17, 0x07, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x07, 0x07, + 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x07, 0x07, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x07, 0x07, 0x0D, 0x0D, + 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x07, 0x07, 0x0D, 0x0D, 0x0D, 0x07, 0x07, 0x0D, 0x0D, 0x0D, 0x07, 0x07, + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x09, 0x12, 0x19, 0x19, 0x00, 0x00, 0x00, 0x10, + 0x11, 0x12, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, + 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, + 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, + }, + { + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1B, 0x1B, 0x10, 0x09, 0x12,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E, 0x1E, 0x1F, 0x20, 0x21, + 0x1E, 0x1E, 0x1E, 0x25, 0x1E, 0x27, 0x20, 0x21, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x21, 0x1E, 0x1E, + 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x21, 0x21, 0x1E, 0x1E, 0x1E, 0x21, 0x21, 0x1E, 0x1E, 0x1E, 0x1E, 0x21, + }, + { + 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x16, 0x17, 0x18, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x28, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x21, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x21, 0x20, 0x20, 0x20, 0x21, 0x21, 0x20, 0x20, 0x20, 0x21, 0x21, + }, + { + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x16, 0x17, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x21, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x29, 0x29, 0x29, 0x07, 0x07, 0x07, 0x07, 0x30, 0x30, 0x30, 0x43, 0x43, + 0x43, 0x43, 0x43, 0x43, 0x39, 0x39, 0x39, 0x43, 0x43, 0x3E, 0x3E, 0x3E, 0x43, 0x43, 0x43, 0x43, 0x43, + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x1E, 0x1E, 0x08, 0x09, 0x12, 0x1C, 0x1D, 0x1E, 0x1E,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x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x16, 0x17, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x1F, 0x20, 0x21, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x29, 0x29, 0x29, 0x43, 0x43, 0x43, 0x43, 0x30, 0x30, 0x30, 0x43, 0x43, + 0x43, 0x43, 0x43, 0x43, 0x39, 0x39, 0x39, 0x43, 0x43, 0x3E, 0x3E, 0x3E, 0x43, 0x43, 0x43, 0x43, 0x43, + }, + { + 0x19, 0x19, 0x19, 0x19, 0x19, 0x1B, 0x1B, 0x1B, 0x19, 0x09, 0x12, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, + 0x11, 0x12, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, 0x1A, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, + 0x22, 0x23, 0x24, 0x2A, 0x1B, 0x1B, 0x1B, 0x1B, 0x2A, 0x2A, 0x2A, 0x33, 0x33, 0x33, 0x33, 0x32, 0x32, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x32, 0x33, 0x33, 0x33, 0x33, 0x32, 0x32, 0x33, 0x33, 0x33, + }, + { + 0x19, 0x19, 0x19, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, 0x09, 0x0A, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, + 0x11, 0x12, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, 0x1A, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, + 0x22, 0x23, 0x24, 0x2C, 0x33, 0x33, 0x33, 0x33, 0x2A, 0x2B, 0x2C, 0x33, 0x33, 0x33, 0x33, 0x32, 0x32, + 0x33, 0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 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, + 0x1E, 0x1E, 0x24, 0x25, 0x26, 0x27, 0x1E, 0x1E, 0x36, 0x36, 0x2D, 0x2D, 0x2D, 0x2D, 0x41, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x41, 0x41, 0x41, 0x3B, 0x3B, 0x3B, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, + }, + { + 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x29, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x29, 0x26, + 0x26, 0x26, 0x26, 0x26, 0x26, 0x16, 0x20, 0x29, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x1F, 0x20, 0x29, + 0x26, 0x26, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2D, 0x2D, 0x2D, 0x2D, 0x2E, 0x2F, 0x30, 0x2D, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x37, 0x2F, 0x30, 0x2D, 0x2D, 0x2D, 0x30, 0x30, 0x2D, 0x2D, 0x2D, 0x2D, 0x30, + }, + { + 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, + 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x20, 0x20, 0x29, + 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x27, 0x28, 0x29, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x30, 0x2F, 0x2F, + 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x38, 0x30, 0x2F, 0x2F, 0x30, 0x30, 0x30, 0x2F, 0x2F, 0x2F, 0x30, 0x30, + }, + { + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x21, + 0x43, 0x43, 0x43, 0x43, 0x43, 0x27, 0x28, 0x29, 0x43, 0x43, 0x43, 0x43, 0x30, 0x30, 0x30, 0x43, 0x43, + 0x43, 0x43, 0x43, 0x43, 0x39, 0x39, 0x39, 0x43, 0x43, 0x3E, 0x3E, 0x3E, 0x43, 0x43, 0x43, 0x43, 0x43, + }, + { + 0x19, 0x19, 0x19, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, 0x09, 0x0A, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, + 0x11, 0x12, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, 0x1A, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, + 0x22, 0x23, 0x24, 0x2C, 0x33, 0x33, 0x33, 0x33, 0x2A, 0x2B, 0x2C, 0x33, 0x33, 0x33, 0x33, 0x32, 0x32, + 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x32, 0x33, 0x33, 0x33, 0x33, 0x32, 0x33, 0x33, 0x33, 0x33, + }, + { + 0x2A, 0x2A, 0x2A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2A, 0x2A, 0x2A, 0x2A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2A, + 0x2A, 0x2A, 0x2A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2A, 0x2A, 0x2A, 0x2A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, + 0x2A, 0x2A, 0x24, 0x2C, 0x2D, 0x2D, 0x2D, 0x2D, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x2D, 0x32, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x36, 0x36, 0x36, 0x32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, 0x30, + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x27, 0x2F, 0x30, 0x2D, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x2D, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x37, 0x2F, 0x30, 0x2D, 0x2D, 0x2D, 0x30, 0x30, 0x2D, 0x2D, 0x2D, 0x2D, 0x30, + }, + { + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x30, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x30, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x30, 0x30, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x30, 0x30, + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x27, 0x28, 0x30, 0x2D, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x2D, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x37, 0x38, 0x30, 0x2D, 0x2D, 0x30, 0x30, 0x30, 0x2D, 0x2D, 0x2D, 0x30, 0x30, + }, + { + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x21, + 0x43, 0x43, 0x43, 0x43, 0x43, 0x27, 0x28, 0x29, 0x43, 0x43, 0x43, 0x43, 0x2E, 0x2F, 0x30, 0x43, 0x43, + 0x43, 0x43, 0x43, 0x43, 0x39, 0x39, 0x39, 0x43, 0x43, 0x3E, 0x3E, 0x3E, 0x43, 0x43, 0x43, 0x43, 0x43, + }, + { + 0x32, 0x32, 0x32, 0x32, 0x32, 0x36, 0x36, 0x36, 0x32, 0x32, 0x32, 0x32, 0x32, 0x36, 0x36, 0x36, 0x32, + 0x32, 0x32, 0x32, 0x32, 0x36, 0x36, 0x36, 0x36, 0x32, 0x32, 0x32, 0x32, 0x32, 0x36, 0x36, 0x36, 0x36, + 0x32, 0x32, 0x32, 0x35, 0x36, 0x36, 0x36, 0x36, 0x32, 0x32, 0x32, 0x36, 0x36, 0x36, 0x36, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x36, 0x36, 0x3A, 0x36, 0x36, 0x36, 0x36, 0x3F, 0x3F, 0x36, 0x36, 0x36, + }, + { + 0x19, 0x19, 0x19, 0x19, 0x19, 0x1B, 0x1B, 0x1B, 0x08, 0x09, 0x12, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, + 0x11, 0x12, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, 0x1A, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, + 0x22, 0x23, 0x24, 0x2C, 0x36, 0x36, 0x36, 0x36, 0x2A, 0x2B, 0x2C, 0x36, 0x36, 0x36, 0x36, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x36, 0x36, 0x31, 0x36, 0x36, 0x36, 0x36, 0x31, 0x31, 0x36, 0x36, 0x36, + }, + { + 0x19, 0x19, 0x19, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, 0x09, 0x0A, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, + 0x11, 0x12, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, 0x1A, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, + 0x22, 0x23, 0x24, 0x2C, 0x36, 0x36, 0x36, 0x36, 0x2A, 0x2B, 0x2C, 0x36, 0x36, 0x36, 0x36, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x36, 0x36, 0x31, 0x36, 0x36, 0x36, 0x36, 0x31, 0x31, 0x36, 0x36, 0x36, + }, + { + 0x33, 0x33, 0x33, 0x36, 0x36, 0x36, 0x36, 0x36, 0x33, 0x33, 0x33, 0x33, 0x36, 0x36, 0x36, 0x36, 0x33, + 0x33, 0x33, 0x33, 0x36, 0x36, 0x36, 0x36, 0x36, 0x33, 0x33, 0x33, 0x33, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x33, 0x33, 0x24, 0x2C, 0x36, 0x36, 0x36, 0x36, 0x33, 0x2B, 0x2C, 0x36, 0x36, 0x36, 0x36, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x36, 0x36, 0x31, 0x36, 0x36, 0x36, 0x36, 0x31, 0x36, 0x36, 0x36, 0x36, + }, + { + 0x33, 0x33, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x33, 0x33, 0x33, 0x33, 0x36, 0x36, 0x36, 0x36, 0x33, + 0x33, 0x33, 0x33, 0x36, 0x36, 0x36, 0x36, 0x36, 0x33, 0x33, 0x33, 0x33, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x33, 0x33, 0x24, 0x25, 0x36, 0x36, 0x36, 0x36, 0x33, 0x2B, 0x2C, 0x36, 0x36, 0x36, 0x36, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x36, 0x36, 0x31, 0x36, 0x36, 0x36, 0x36, 0x31, 0x36, 0x36, 0x36, 0x36, + }, + { + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x0D, 0x0D, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x0D, 0x0D, 0x0D, 0x1E, + 0x1E, 0x1E, 0x1E, 0x1E, 0x15, 0x15, 0x0D, 0x0D, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x41, + 0x33, 0x33, 0x24, 0x25, 0x26, 0x26, 0x41, 0x41, 0x33, 0x2B, 0x2C, 0x2D, 0x2D, 0x2D, 0x41, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x41, 0x41, 0x31, 0x3B, 0x3B, 0x3B, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, + }, + { + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x39, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x39, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x39, 0x39, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x39, 0x39, + 0x33, 0x33, 0x36, 0x36, 0x36, 0x27, 0x2F, 0x39, 0x33, 0x36, 0x36, 0x36, 0x2E, 0x2F, 0x39, 0x31, 0x32, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x31, 0x3B, 0x3C, 0x3D, 0x3E, 0x41, 0x41, 0x41, 0x42, 0x43, + }, + { + 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, + 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x39, 0x39, + 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x2F, 0x28, 0x39, 0x3D, 0x3D, 0x3D, 0x3D, 0x2F, 0x2F, 0x39, 0x3D, 0x3D, + 0x3D, 0x3D, 0x3D, 0x3D, 0x37, 0x38, 0x39, 0x3D, 0x3D, 0x3D, 0x3D, 0x3E, 0x3D, 0x3D, 0x3D, 0x3D, 0x43, + }, + { + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x21, + 0x43, 0x43, 0x43, 0x43, 0x43, 0x30, 0x30, 0x29, 0x43, 0x43, 0x43, 0x43, 0x30, 0x30, 0x30, 0x43, 0x43, + 0x43, 0x43, 0x43, 0x43, 0x37, 0x38, 0x39, 0x43, 0x43, 0x3E, 0x3E, 0x3E, 0x43, 0x43, 0x43, 0x43, 0x43, + }, + { + 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x3F, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, 0x31, 0x3F, 0x3F, 0x3A, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + }, + { + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x0D, 0x0D, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x0D, 0x0D, 0x0D, 0x1E, + 0x1E, 0x1E, 0x1E, 0x1E, 0x15, 0x15, 0x1E, 0x0D, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x41, + 0x36, 0x36, 0x36, 0x36, 0x26, 0x26, 0x2D, 0x41, 0x36, 0x36, 0x36, 0x2D, 0x2D, 0x2D, 0x41, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x37, 0x3D, 0x41, 0x36, 0x3B, 0x3C, 0x3D, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, + }, + { + 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3E, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3E, 0x3B, + 0x3B, 0x3B, 0x3B, 0x3B, 0x3B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, 0x43, 0x43, + }, + { + 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x43, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, 0x31, 0x3F, 0x43, 0x3A, 0x41, 0x41, 0x41, 0x43, 0x3F, 0x40, 0x41, 0x42, 0x43, + }, + { + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x43, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x43, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x43, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x43, 0x31, 0x31, + 0x31, 0x31, 0x41, 0x41, 0x41, 0x41, 0x43, 0x3A, 0x41, 0x41, 0x41, 0x43, 0x3F, 0x40, 0x41, 0x42, 0x43, + }, + { + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x0D, 0x0D, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x0D, 0x0D, 0x0D, 0x1E, + 0x1E, 0x1E, 0x1E, 0x1E, 0x15, 0x15, 0x1E, 0x0D, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x43, + 0x36, 0x36, 0x36, 0x36, 0x26, 0x26, 0x2D, 0x43, 0x36, 0x36, 0x36, 0x2D, 0x2D, 0x2D, 0x43, 0x36, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x37, 0x3D, 0x43, 0x3F, 0x3B, 0x3C, 0x3D, 0x43, 0x3F, 0x40, 0x41, 0x42, 0x43, + }, + { + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x43, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x43, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x43, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x43, 0x41, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x37, 0x3D, 0x43, 0x3F, 0x41, 0x3C, 0x3D, 0x43, 0x3F, 0x40, 0x41, 0x42, 0x43, + }, + { + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x21, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x30, 0x30, 0x29, 0x41, 0x41, 0x41, 0x41, 0x30, 0x30, 0x30, 0x41, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x37, 0x38, 0x39, 0x3F, 0x41, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, + }, + }; + + static u8 next_zone_sale_ftr[60][60] = { + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x08, 0x09, 0x02, 0x03, 0x04, 0x05, 0x05, + 0x05, 0x10, 0x10, 0x10, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x19, 0x19, 0x19, 0x19, 0x19, + 0x05, 0x05, 0x05, 0x05, 0x22, 0x19, 0x19, 0x05, 0x05, 0x05, 0x19, 0x19, 0x05, 0x05, 0x2D, + 0x2D, 0x19, 0x19, 0x19, 0x05, 0x05, 0x2D, 0x19, 0x19, 0x19, 0x05, 0x05, 0x19, 0x19, 0x19, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x00, 0x09, 0x02, 0x03, 0x04, 0x05, 0x05, + 0x05, 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x00, 0x05, 0x05, 0x05, 0x00, + 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x00, 0x09, 0x0A, 0x0B, 0x03, 0x04, 0x05, + 0x05, 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, + 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x00, 0x01, 0x02, 0x0B, 0x04, 0x05, 0x05, + 0x05, 0x00, 0x00, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, + 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x00, 0x01, 0x03, 0x0B, 0x0C, 0x05, 0x05, + 0x05, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x00, 0x00, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0E, 0x00, 0x01, 0x02, 0x0B, 0x0C, 0x0D, 0x0E, + 0x0E, 0x00, 0x1E, 0x1E, 0x15, 0x15, 0x15, 0x16, 0x0E, 0x0E, 0x00, 0x1E, 0x1E, 0x1E, 0x1E, + 0x1E, 0x1E, 0x1E, 0x0E, 0x1E, 0x1E, 0x24, 0x24, 0x0E, 0x0E, 0x28, 0x28, 0x28, 0x0E, 0x1E, + 0x1E, 0x1E, 0x2F, 0x2F, 0x0E, 0x0E, 0x1E, 0x1E, 0x35, 0x35, 0x35, 0x0E, 0x39, 0x39, 0x0E, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0E, 0x00, 0x01, 0x02, 0x03, 0x0C, 0x0D, 0x0E, + 0x0E, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x16, 0x0E, 0x0E, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, + 0x0D, 0x0D, 0x0E, 0x0E, 0x0D, 0x0D, 0x0D, 0x0D, 0x0E, 0x0E, 0x0D, 0x0D, 0x0E, 0x0E, 0x0D, + 0x0D, 0x0D, 0x0D, 0x0D, 0x0E, 0x0E, 0x0D, 0x0D, 0x0D, 0x0D, 0x0E, 0x0E, 0x0D, 0x0D, 0x0E, + }, + { + 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0F, 0x0D, 0x0D, 0x0D, 0x0B, 0x0C, 0x0D, 0x0E, + 0x0F, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x16, 0x17, 0x18, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, + 0x0D, 0x21, 0x21, 0x21, 0x0D, 0x0D, 0x0D, 0x27, 0x27, 0x27, 0x0D, 0x2B, 0x2B, 0x2B, 0x0D, + 0x0D, 0x0D, 0x0D, 0x32, 0x32, 0x32, 0x0D, 0x0D, 0x0D, 0x38, 0x38, 0x38, 0x0D, 0x3B, 0x3B, + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x10, 0x10, 0x19, 0x19, 0x19, 0x19, 0x19, 0x00, 0x19, 0x19, 0x19, 0x19, 0x19, + 0x19, 0x19, 0x19, 0x00, 0x22, 0x19, 0x19, 0x19, 0x19, 0x00, 0x19, 0x19, 0x19, 0x00, 0x2D, + 0x2D, 0x19, 0x19, 0x19, 0x19, 0x19, 0x2D, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, + }, + { + 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x08, 0x09, 0x0A, 0x0B, 0x02, 0x02, 0x02, + 0x02, 0x10, 0x11, 0x12, 0x12, 0x12, 0x12, 0x02, 0x02, 0x02, 0x19, 0x1A, 0x1B, 0x1B, 0x1B, + 0x1B, 0x1B, 0x1B, 0x02, 0x22, 0x1B, 0x1B, 0x1B, 0x02, 0x02, 0x1B, 0x1B, 0x1B, 0x02, 0x2D, + 0x2D, 0x2E, 0x1B, 0x1B, 0x02, 0x02, 0x2D, 0x34, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, + }, + { + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x09, 0x0A, 0x0B, 0x02, 0x02, 0x02, + 0x02, 0x1B, 0x12, 0x12, 0x12, 0x12, 0x02, 0x02, 0x02, 0x02, 0x12, 0x12, 0x1B, 0x1B, 0x1B, + 0x1B, 0x1B, 0x1B, 0x02, 0x1B, 0x1B, 0x1B, 0x1B, 0x02, 0x02, 0x1B, 0x1B, 0x1B, 0x02, 0x1B, + 0x1B, 0x1B, 0x1B, 0x1B, 0x02, 0x02, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, + }, + { + 0x03, 0x03, 0x03, 0x03, 0x04, 0x05, 0x06, 0x07, 0x03, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, + 0x0F, 0x03, 0x13, 0x13, 0x13, 0x14, 0x15, 0x16, 0x0F, 0x07, 0x1C, 0x1C, 0x1C, 0x1C, 0x1D, + 0x1E, 0x1E, 0x1E, 0x07, 0x1C, 0x1C, 0x24, 0x24, 0x07, 0x07, 0x28, 0x28, 0x28, 0x07, 0x1C, + 0x1C, 0x1C, 0x2F, 0x2F, 0x07, 0x07, 0x1C, 0x1C, 0x35, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, + }, + { + 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, 0x06, 0x07, 0x04, 0x04, 0x04, 0x0B, 0x0C, 0x0D, 0x0E, + 0x0F, 0x1D, 0x1D, 0x1D, 0x14, 0x14, 0x15, 0x16, 0x0F, 0x07, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, + 0x1E, 0x1E, 0x1E, 0x07, 0x1D, 0x1D, 0x24, 0x24, 0x07, 0x07, 0x28, 0x28, 0x28, 0x07, 0x1D, + 0x1D, 0x1D, 0x2F, 0x2F, 0x07, 0x07, 0x1D, 0x1D, 0x35, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, + }, + { + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x07, 0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 0x00, 0x08, 0x09, 0x12, 0x19, 0x19, 0x00, 0x00, + 0x00, 0x10, 0x11, 0x12, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, + 0x19, 0x19, 0x19, 0x19, 0x22, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x2D, + 0x2D, 0x19, 0x19, 0x19, 0x19, 0x19, 0x2D, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, + }, + { + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1B, 0x1B, 0x10, 0x09, 0x12, 0x1B, 0x1B, 0x1B, 0x1B, + 0x1B, 0x10, 0x11, 0x12, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, 0x1A, 0x1B, 0x1B, 0x1B, + 0x1B, 0x1B, 0x1B, 0x1B, 0x22, 0x23, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x2D, + 0x2D, 0x2E, 0x1B, 0x1B, 0x1B, 0x1B, 0x2D, 0x34, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, + }, + { + 0x10, 0x10, 0x10, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x10, 0x09, 0x0A, 0x13, 0x14, 0x1B, 0x1B, + 0x1B, 0x10, 0x11, 0x12, 0x13, 0x14, 0x1B, 0x1B, 0x1B, 0x1B, 0x19, 0x1A, 0x1B, 0x1B, 0x1B, + 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, + 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, + }, + { + 0x1C, 0x1C, 0x1C, 0x15, 0x15, 0x15, 0x15, 0x15, 0x1C, 0x1C, 0x1C, 0x0B, 0x14, 0x15, 0x15, + 0x15, 0x1C, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x15, 0x15, 0x1C, 0x1C, 0x1C, 0x1C, 0x1D, + 0x1E, 0x1E, 0x1E, 0x15, 0x1C, 0x1C, 0x24, 0x24, 0x15, 0x15, 0x28, 0x28, 0x28, 0x15, 0x1C, + 0x1C, 0x1C, 0x2F, 0x2F, 0x15, 0x15, 0x1C, 0x1C, 0x35, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, + }, + { + 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x1C, 0x1C, 0x15, 0x0B, 0x0C, 0x15, 0x15, + 0x15, 0x1C, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x15, 0x15, 0x1C, 0x1C, 0x1C, 0x1C, 0x1D, + 0x1E, 0x1E, 0x1E, 0x15, 0x1C, 0x23, 0x24, 0x24, 0x15, 0x15, 0x28, 0x28, 0x28, 0x15, 0x1C, + 0x1C, 0x1C, 0x2F, 0x2F, 0x15, 0x15, 0x1C, 0x1C, 0x35, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, + }, + { + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x0D, 0x0D, 0x05, 0x05, 0x05, 0x0B, 0x0C, 0x0D, 0x0D, + 0x0D, 0x1E, 0x1E, 0x1E, 0x13, 0x14, 0x15, 0x16, 0x0D, 0x0D, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, + 0x1E, 0x1E, 0x1E, 0x0D, 0x1E, 0x1E, 0x24, 0x24, 0x0D, 0x0D, 0x28, 0x28, 0x28, 0x0D, 0x1E, + 0x1E, 0x1E, 0x2F, 0x2F, 0x0D, 0x0D, 0x1E, 0x1E, 0x35, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, + }, + { + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x07, 0x05, 0x05, 0x05, 0x0B, 0x0C, 0x0D, 0x0E, + 0x0F, 0x1E, 0x1E, 0x1E, 0x13, 0x14, 0x15, 0x16, 0x0F, 0x18, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, + 0x1E, 0x1F, 0x20, 0x21, 0x1E, 0x1E, 0x1E, 0x25, 0x20, 0x21, 0x1E, 0x1E, 0x1E, 0x21, 0x1E, + 0x1E, 0x1E, 0x1E, 0x1E, 0x21, 0x21, 0x1E, 0x1E, 0x1E, 0x1E, 0x21, 0x21, 0x1E, 0x1E, 0x21, + }, + { + 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, + 0x0F, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x16, 0x17, 0x18, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x21, 0x20, 0x20, 0x20, 0x20, 0x26, 0x21, 0x20, 0x20, 0x21, 0x21, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x21, 0x21, 0x20, 0x20, 0x20, 0x20, 0x21, 0x21, 0x20, 0x21, 0x21, + }, + { + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x16, 0x17, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x21, 0x21, 0x21, 0x07, 0x07, 0x07, 0x27, 0x27, 0x27, 0x07, 0x2B, 0x2B, 0x2B, 0x3B, + 0x3B, 0x3B, 0x3B, 0x32, 0x32, 0x32, 0x3B, 0x3B, 0x3B, 0x38, 0x38, 0x38, 0x3B, 0x3B, 0x3B, + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x1E, 0x1E, 0x08, 0x09, 0x12, 0x1C, 0x1D, 0x1E, 0x1E, + 0x1E, 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x1E, 0x19, 0x1B, 0x1B, 0x13, 0x14, 0x1E, 0x1E, 0x1E, 0x1E, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1F, 0x20, 0x1E, 0x22, 0x23, 0x24, 0x24, 0x1E, 0x1E, 0x28, 0x28, 0x28, 0x1E, 0x2D, + 0x2D, 0x2E, 0x2F, 0x2F, 0x39, 0x39, 0x33, 0x34, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, 0x39, + }, + { + 0x19, 0x19, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x19, 0x1B, 0x1B, 0x0B, 0x0C, 0x1E, 0x1E, + 0x1E, 0x19, 0x1B, 0x1B, 0x13, 0x14, 0x1E, 0x1E, 0x1E, 0x1E, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1F, 0x20, 0x1E, 0x22, 0x23, 0x24, 0x24, 0x1E, 0x1E, 0x28, 0x28, 0x28, 0x1E, 0x2D, + 0x2D, 0x2E, 0x2F, 0x2F, 0x39, 0x39, 0x33, 0x34, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, 0x39, + }, + { + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x0D, 0x0D, 0x19, 0x1B, 0x1B, 0x0B, 0x0C, 0x0D, 0x0D, + 0x0D, 0x19, 0x1B, 0x1B, 0x13, 0x14, 0x15, 0x16, 0x20, 0x0D, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1F, 0x20, 0x0D, 0x22, 0x23, 0x24, 0x24, 0x0D, 0x0D, 0x28, 0x28, 0x28, 0x0D, 0x2D, + 0x2D, 0x2E, 0x2F, 0x2F, 0x39, 0x39, 0x33, 0x34, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, 0x39, + }, + { + 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x21, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, + 0x21, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x16, 0x20, 0x21, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1F, 0x20, 0x21, 0x1E, 0x1E, 0x1E, 0x25, 0x20, 0x21, 0x1E, 0x1E, 0x21, 0x21, 0x1E, + 0x1E, 0x1E, 0x1E, 0x1E, 0x21, 0x21, 0x1E, 0x1E, 0x1E, 0x1E, 0x21, 0x21, 0x1E, 0x1E, 0x21, + }, + { + 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x21, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, + 0x21, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x16, 0x17, 0x21, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1F, 0x20, 0x21, 0x1E, 0x1E, 0x1E, 0x25, 0x26, 0x21, 0x1E, 0x1E, 0x21, 0x21, 0x1E, + 0x1E, 0x1E, 0x1E, 0x1E, 0x21, 0x21, 0x1E, 0x1E, 0x1E, 0x1E, 0x21, 0x21, 0x1E, 0x21, 0x21, + }, + { + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x16, 0x17, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x1F, 0x20, 0x21, 0x07, 0x07, 0x07, 0x27, 0x27, 0x27, 0x3B, 0x2B, 0x2B, 0x2B, 0x3B, + 0x3B, 0x3B, 0x3B, 0x32, 0x32, 0x32, 0x3B, 0x3B, 0x3B, 0x38, 0x38, 0x38, 0x3B, 0x3B, 0x3B, + }, + { + 0x00, 0x00, 0x00, 0x00, 0x1E, 0x1E, 0x1E, 0x1E, 0x08, 0x09, 0x12, 0x1C, 0x1C, 0x1E, 0x1E, + 0x1E, 0x10, 0x11, 0x12, 0x1C, 0x1C, 0x1E, 0x1E, 0x1E, 0x1E, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1E, 0x1E, 0x1E, 0x22, 0x23, 0x24, 0x25, 0x1E, 0x1E, 0x28, 0x28, 0x28, 0x1E, 0x2D, + 0x2D, 0x2E, 0x2F, 0x2F, 0x39, 0x39, 0x2D, 0x34, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, 0x39, + }, + { + 0x19, 0x19, 0x19, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x19, 0x09, 0x1B, 0x1C, 0x0C, 0x1E, 0x1E, + 0x1E, 0x19, 0x11, 0x1B, 0x1B, 0x14, 0x1E, 0x1E, 0x1E, 0x1E, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1E, 0x1E, 0x39, 0x22, 0x23, 0x24, 0x24, 0x24, 0x24, 0x28, 0x28, 0x28, 0x39, 0x2D, + 0x2D, 0x2E, 0x2F, 0x2F, 0x39, 0x39, 0x33, 0x34, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, 0x39, + }, + { + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x0D, 0x0D, 0x19, 0x1B, 0x1B, 0x0B, 0x0C, 0x0D, 0x0D, + 0x0D, 0x19, 0x1B, 0x1B, 0x13, 0x14, 0x15, 0x15, 0x0D, 0x0D, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1E, 0x1E, 0x1E, 0x22, 0x22, 0x24, 0x25, 0x0D, 0x0D, 0x28, 0x28, 0x28, 0x39, 0x2D, + 0x2D, 0x2E, 0x2F, 0x2F, 0x39, 0x39, 0x33, 0x34, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, 0x39, + }, + { + 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x27, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, + 0x27, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x16, 0x20, 0x27, 0x24, 0x24, 0x24, 0x24, 0x24, + 0x24, 0x1F, 0x20, 0x27, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2D, + 0x2D, 0x2E, 0x28, 0x30, 0x2A, 0x2B, 0x28, 0x28, 0x28, 0x28, 0x2B, 0x2B, 0x28, 0x28, 0x2B, + }, + { + 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, + 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, + 0x2A, 0x20, 0x20, 0x27, 0x2A, 0x2A, 0x2A, 0x25, 0x26, 0x27, 0x2A, 0x2A, 0x2A, 0x2B, 0x2A, + 0x2A, 0x2A, 0x2A, 0x2A, 0x31, 0x2B, 0x2A, 0x2A, 0x2A, 0x2B, 0x2B, 0x2B, 0x2A, 0x2B, 0x2B, + }, + { + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x21, 0x21, 0x21, 0x3B, 0x3B, 0x3B, 0x25, 0x26, 0x27, 0x3B, 0x2B, 0x2B, 0x2B, 0x3B, + 0x3B, 0x3B, 0x3B, 0x32, 0x32, 0x32, 0x3B, 0x3B, 0x3B, 0x38, 0x38, 0x38, 0x3B, 0x3B, 0x3B, + }, + { + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x0D, 0x0D, 0x19, 0x1B, 0x1B, 0x0B, 0x0C, 0x0D, 0x0D, + 0x0D, 0x19, 0x1B, 0x1B, 0x13, 0x14, 0x15, 0x15, 0x0D, 0x0D, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1E, 0x1E, 0x0D, 0x22, 0x23, 0x24, 0x25, 0x2A, 0x39, 0x28, 0x29, 0x2A, 0x39, 0x2D, + 0x2D, 0x2E, 0x2F, 0x2F, 0x39, 0x39, 0x33, 0x34, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, 0x39, + }, + { + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2B, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, + 0x2B, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2B, 0x2B, 0x28, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x2B, 0x2B, 0x28, 0x28, 0x28, 0x25, 0x2A, 0x2B, 0x28, 0x29, 0x2A, 0x2B, 0x28, + 0x28, 0x28, 0x28, 0x30, 0x2A, 0x2B, 0x28, 0x28, 0x28, 0x28, 0x2B, 0x2B, 0x28, 0x28, 0x2B, + }, + { + 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2B, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, + 0x2B, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2B, 0x2B, 0x28, 0x28, 0x28, 0x28, 0x28, + 0x28, 0x28, 0x2B, 0x2B, 0x28, 0x28, 0x28, 0x25, 0x26, 0x2B, 0x28, 0x29, 0x2A, 0x2B, 0x28, + 0x28, 0x28, 0x28, 0x30, 0x31, 0x2B, 0x28, 0x28, 0x28, 0x2B, 0x2B, 0x2B, 0x28, 0x2B, 0x2B, + }, + { + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x21, 0x21, 0x21, 0x3B, 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 0x1E, 0x1E, 0x22, 0x23, 0x24, 0x24, 0x39, 0x39, 0x28, 0x28, 0x28, 0x39, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x39, 0x39, 0x33, 0x34, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, 0x39, + }, + { + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x0D, 0x0D, 0x19, 0x1B, 0x1B, 0x0B, 0x0C, 0x0D, 0x0D, + 0x0D, 0x19, 0x1B, 0x1B, 0x13, 0x14, 0x15, 0x15, 0x0D, 0x0D, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1E, 0x1E, 0x39, 0x22, 0x23, 0x24, 0x24, 0x39, 0x39, 0x28, 0x28, 0x28, 0x39, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x39, 0x39, 0x33, 0x34, 0x35, 0x35, 0x35, 0x39, 0x39, 0x39, 0x39, + }, + { + 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x32, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, + 0x32, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, 0x32, 0x32, 0x2F, 0x2F, 0x2F, 0x2F, 0x2F, + 0x2F, 0x2F, 0x32, 0x32, 0x2F, 0x2F, 0x2F, 0x25, 0x2A, 0x32, 0x2F, 0x29, 0x2A, 0x32, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, + }, + { + 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, + 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x37, 0x37, 0x37, 0x37, 0x37, + 0x37, 0x37, 0x32, 0x32, 0x37, 0x37, 0x37, 0x2A, 0x26, 0x32, 0x37, 0x2A, 0x2A, 0x32, 0x37, + 0x37, 0x37, 0x37, 0x30, 0x31, 0x32, 0x37, 0x37, 0x37, 0x37, 0x37, 0x38, 0x37, 0x37, 0x3B, + }, + { + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x21, 0x21, 0x21, 0x3B, 0x3B, 0x3B, 0x2B, 0x2B, 0x27, 0x3B, 0x2B, 0x2B, 0x2B, 0x3B, + 0x3B, 0x3B, 0x3B, 0x30, 0x31, 0x32, 0x3B, 0x3B, 0x3B, 0x38, 0x38, 0x38, 0x3B, 0x3B, 0x3B, + }, + { + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x1E, 0x1E, 0x1E, 0x2D, 0x2D, 0x12, 0x1C, 0x1C, 0x1E, 0x1E, + 0x1E, 0x2D, 0x2D, 0x12, 0x13, 0x14, 0x15, 0x1E, 0x1E, 0x1E, 0x2D, 0x2D, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1E, 0x1E, 0x39, 0x2D, 0x23, 0x24, 0x28, 0x28, 0x39, 0x28, 0x28, 0x28, 0x39, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x37, 0x39, 0x33, 0x34, 0x35, 0x36, 0x37, 0x39, 0x39, 0x39, 0x39, + }, + { + 0x19, 0x19, 0x19, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x19, 0x09, 0x1B, 0x1C, 0x0C, 0x1E, 0x1E, + 0x1E, 0x19, 0x11, 0x1B, 0x1C, 0x0C, 0x1E, 0x1E, 0x1E, 0x1E, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1E, 0x1E, 0x39, 0x22, 0x23, 0x24, 0x28, 0x28, 0x39, 0x28, 0x28, 0x28, 0x39, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x37, 0x39, 0x33, 0x34, 0x35, 0x36, 0x37, 0x39, 0x39, 0x39, 0x39, + }, + { + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x0D, 0x0D, 0x19, 0x1B, 0x1B, 0x0B, 0x0C, 0x0D, 0x0D, + 0x0D, 0x19, 0x1B, 0x1B, 0x13, 0x14, 0x15, 0x15, 0x1E, 0x39, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1E, 0x1E, 0x39, 0x22, 0x23, 0x24, 0x28, 0x28, 0x39, 0x28, 0x28, 0x28, 0x39, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x37, 0x39, 0x33, 0x34, 0x35, 0x36, 0x37, 0x39, 0x39, 0x39, 0x39, + }, + { + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x38, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x38, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x38, 0x38, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x38, 0x38, 0x35, 0x35, 0x35, 0x35, 0x38, 0x38, 0x35, 0x35, 0x38, 0x38, 0x35, + 0x35, 0x35, 0x35, 0x30, 0x37, 0x38, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, + }, + { + 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x38, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x38, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x38, 0x38, 0x35, 0x35, 0x35, 0x35, 0x35, + 0x35, 0x35, 0x38, 0x38, 0x35, 0x35, 0x35, 0x38, 0x38, 0x38, 0x35, 0x38, 0x38, 0x38, 0x35, + 0x35, 0x35, 0x35, 0x30, 0x31, 0x38, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, + }, + { + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x21, 0x21, 0x21, 0x3B, 0x3B, 0x3B, 0x2B, 0x2B, 0x27, 0x3B, 0x2B, 0x2B, 0x2B, 0x3B, + 0x3B, 0x3B, 0x3B, 0x30, 0x31, 0x32, 0x3B, 0x3B, 0x3B, 0x36, 0x37, 0x38, 0x3B, 0x3B, 0x3B, + }, + { + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x0D, 0x0D, 0x19, 0x1B, 0x1B, 0x0B, 0x0C, 0x0D, 0x0D, + 0x0D, 0x19, 0x1B, 0x1B, 0x13, 0x14, 0x15, 0x15, 0x1E, 0x0D, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1E, 0x1E, 0x3B, 0x22, 0x23, 0x24, 0x24, 0x28, 0x3B, 0x28, 0x28, 0x28, 0x3B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x37, 0x3B, 0x33, 0x34, 0x35, 0x36, 0x37, 0x3B, 0x39, 0x3A, 0x3B, + }, + { + 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, + 0x3B, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x3B, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x39, + 0x39, 0x39, 0x3B, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x3B, 0x3B, 0x39, 0x39, 0x3B, 0x3B, 0x39, + 0x39, 0x39, 0x39, 0x30, 0x37, 0x3B, 0x33, 0x34, 0x39, 0x36, 0x37, 0x3B, 0x39, 0x3A, 0x3B, + }, + { + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x21, 0x21, 0x18, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x21, 0x21, 0x21, 0x39, 0x39, 0x39, 0x2B, 0x2B, 0x27, 0x39, 0x2B, 0x2B, 0x2B, 0x39, + 0x39, 0x39, 0x39, 0x30, 0x31, 0x32, 0x39, 0x39, 0x39, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, + }, + }; + + static u8 next_zone_sale_cloth[14][14] = { + { 0x00, 0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x02, 0x05, 0x09, 0x02, 0x05, 0x05, 0x0D }, + { 0x02, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x05, 0x05, 0x0A, 0x0A, 0x05, 0x05 }, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x01, 0x05, 0x05, 0x01, 0x01, 0x05, 0x05 }, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x01, 0x05, 0x05, 0x01, 0x01, 0x05, 0x05 }, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x01, 0x05, 0x05, 0x01, 0x05, 0x05, 0x05 }, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x01, 0x08, 0x09, 0x01, 0x0C, 0x0C, 0x0D }, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x01, 0x08, 0x09, 0x01, 0x0C, 0x0C, 0x0D }, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A }, + { 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x0C, 0x08, 0x09, 0x0C, 0x0C, 0x0C, 0x0D }, + { 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x0C, 0x08, 0x09, 0x0C, 0x0C, 0x0C, 0x0D }, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07, 0x0C, 0x0C, 0x0A, 0x0B, 0x0C, 0x0D }, + { 0x0C, 0x0A, 0x0A, 0x0C, 0x0C, 0x0C, 0x0C, 0x0A, 0x0C, 0x0C, 0x0A, 0x0B, 0x0C, 0x0D }, + { 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x0A, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D }, + { 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x05, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D }, + }; + + static u8 next_zone_sale_carpet[6][6] = { + { 0x00, 0x01, 0x02, 0x04, 0x04, 0x05 }, { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 }, + { 0x00, 0x01, 0x02, 0x04, 0x04, 0x04 }, { 0x04, 0x01, 0x04, 0x03, 0x04, 0x05 }, + { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 }, { 0x00, 0x01, 0x04, 0x03, 0x04, 0x05 }, + }; + + static u8* next_zone_table[4] = { + (u8*)next_zone_sale_normal, + (u8*)next_zone_sale_ftr, + (u8*)next_zone_sale_cloth, + (u8*)next_zone_sale_carpet, + }; + + // clang-format off + static int zone_sum[4] = { + ARRAY_COUNT(next_zone_sale_normal[0]), + ARRAY_COUNT(next_zone_sale_ftr[0]), + ARRAY_COUNT(next_zone_sale_cloth[0]), + ARRAY_COUNT(next_zone_sale_carpet[0]), + }; + // clang-format on + + int sale_type = mamedanuki->sale_type; + u8* zone_p = next_zone_table[sale_type]; + + return zone_p[p2 * zone_sum[sale_type] + p1]; +} + +static void aNMD_search_player(NPC_MAMEDANUKI_ACTOR* mamedanuki, GAME_PLAY* play) { + ACTOR* actorx = (ACTOR*)mamedanuki; + PLAYER_ACTOR* player = GET_PLAYER_ACTOR(play); + + if (player != NULL) { + s16 angle = actorx->shape_info.rotation.y - mamedanuki->player_angle; + if (ABS(angle) > DEG2SHORT_ANGLE(90.0f)) { + aNSC_setupAction(mamedanuki, play, 66); + } else { + chase_angle(&actorx->shape_info.rotation.y, mamedanuki->player_angle, DEG2SHORT_ANGLE(11.25f)); + actorx->world.angle.y = actorx->shape_info.rotation.y; + } + } +} + +static void aNMD_search_player2(NPC_MAMEDANUKI_ACTOR* mamedanuki, GAME_PLAY* play) { + static float posX_sale_normal[68] = { + 100.0f, 140.0f, 180.0f, 220.0f, 260.0f, 300.0f, 340.0f, 420.0f, + 100.0f, 140.0f, 180.0f, 220.0f, 260.0f, 300.0f, 340.0f, 380.0f, + 100.0f, 140.0f, 180.0f, 220.0f, 260.0f, 300.0f, 340.0f, 380.0f, + 420.0f, 100.0f, 140.0f, 180.0f, 220.0f, 260.0f, 300.0f, 340.0f, + 380.0f, 420.0f, 120.0f, 180.0f, 220.0f, 260.0f, 300.0f, 340.0f, + 380.0f, 420.0f, 180.0f, 220.0f, 260.0f, 300.0f, 340.0f, 380.0f, + 420.0f, 60.0f, 120.0f, 180.0f, 220.0f, 260.0f, 300.0f, 340.0f, + 380.0f, 420.0f, 60.0f, 300.0f, 340.0f, 380.0f, 420.0f, 60.0f, + 180.0f, 300.0f, 360.0f, 420.0f, + }; + + static float posZ_sale_normal[68] = { + 140.0f, 140.0f, 140.0f, 140.0f, 140.0f, 140.0f, 140.0f, 180.0f, + 180.0f, 180.0f, 180.0f, 180.0f, 180.0f, 180.0f, 180.0f, 180.0f, + 220.0f, 220.0f, 220.0f, 220.0f, 220.0f, 220.0f, 220.0f, 220.0f, + 220.0f, 260.0f, 260.0f, 260.0f, 260.0f, 260.0f, 260.0f, 260.0f, + 260.0f, 260.0f, 320.0f, 300.0f, 300.0f, 300.0f, 300.0f, 300.0f, + 300.0f, 300.0f, 340.0f, 340.0f, 340.0f, 340.0f, 340.0f, 340.0f, + 340.0f, 380.0f, 380.0f, 380.0f, 380.0f, 380.0f, 380.0f, 380.0f, + 380.0f, 380.0f, 420.0f, 420.0f, 420.0f, 420.0f, 420.0f, 480.0f, + 480.0f, 480.0f, 480.0f, 480.0f, + }; + + static float posX_sale_ftr[60] = { + 100.0f, 140.0f, 180.0f, 220.0f, 260.0f, 300.0f, 340.0f, 420.0f, + 100.0f, 140.0f, 180.0f, 220.0f, 260.0f, 300.0f, 340.0f, 380.0f, + 100.0f, 140.0f, 180.0f, 220.0f, 260.0f, 300.0f, 340.0f, 380.0f, + 420.0f, 100.0f, 140.0f, 180.0f, 220.0f, 260.0f, 300.0f, 340.0f, + 380.0f, 420.0f, 100.0f, 200.0f, 300.0f, 340.0f, 380.0f, 420.0f, + 300.0f, 340.0f, 380.0f, 420.0f, 60.0f, 100.0f, 200.0f, 300.0f, + 340.0f, 380.0f, 420.0f, 80.0f, 200.0f, 300.0f, 340.0f, 380.0f, + 420.0f, 300.0f, 360.0f, 420.0f, + }; + + static float posZ_sale_ftr[60] = { + 140.0f, 140.0f, 140.0f, 140.0f, 140.0f, 140.0f, 140.0f, 180.0f, + 180.0f, 180.0f, 180.0f, 180.0f, 180.0f, 180.0f, 180.0f, 180.0f, + 220.0f, 220.0f, 220.0f, 220.0f, 220.0f, 220.0f, 220.0f, 220.0f, + 220.0f, 260.0f, 260.0f, 260.0f, 260.0f, 260.0f, 260.0f, 260.0f, + 260.0f, 260.0f, 320.0f, 320.0f, 300.0f, 300.0f, 300.0f, 300.0f, + 340.0f, 340.0f, 340.0f, 340.0f, 380.0f, 380.0f, 380.0f, 380.0f, + 380.0f, 380.0f, 380.0f, 460.0f, 460.0f, 420.0f, 420.0f, 420.0f, + 420.0f, 460.0f, 460.0f, 460.0f, + }; + + static float posX_sale_cloth[14] = { + 260.0f, 60.0f, 100.0f, 180.0f, 260.0f, 300.0f, 380.0f, 60.0f, + 300.0f, 380.0f, 60.0f, 180.0f, 300.0f, 380.0f, + }; + + static float posZ_sale_cloth[14] = { + 240.0f, 380.0f, 380.0f, 380.0f, 380.0f, 380.0f, 380.0f, 420.0f, + 420.0f, 420.0f, 460.0f, 460.0f, 460.0f, 460.0f, + }; + + static float posX_sale_carpet[6] = { + 280.0f, 280.0f, 100.0f, 60.0f, 100.0f, 60.0f, + }; + + static float posZ_sale_carpet[6] = { + 340.0f, 380.0f, 340.0f, 380.0f, 380.0f, 420.0f, + }; + + static float* posX_table[4] = { + posX_sale_normal, posX_sale_ftr, posX_sale_cloth, posX_sale_carpet, + }; + + static float* posZ_table[4] = { + posZ_sale_normal, posZ_sale_ftr, posZ_sale_cloth, posZ_sale_carpet, + }; + + + int sale_type = mamedanuki->sale_type; + float* posX_p = posX_table[sale_type]; + float* posZ_p = posZ_table[sale_type]; + ACTOR* player = GET_PLAYER_ACTOR_ACTOR(play); + if (player != NULL) { + f32 dx = posX_p[mamedanuki->next_zone] - mamedanuki->npc_class.actor_class.world.position.x; + f32 dz = posZ_p[mamedanuki->next_zone] - mamedanuki->npc_class.actor_class.world.position.z; + + s16 angle = atans_table(dz, dx); + chase_angle(&mamedanuki->npc_class.actor_class.shape_info.rotation.y, angle, DEG2SHORT_ANGLE(11.25f)); + + mamedanuki->npc_class.actor_class.world.angle.y = mamedanuki->npc_class.actor_class.shape_info.rotation.y; + + if (SQ(dx) + SQ(dz) < 200.0f) { + mamedanuki->next_zone = aNMD_get_next_zone(mamedanuki, mamedanuki->player_zone, mamedanuki->zone); + } + } +} + +static void aNMD_weight_ctrl(ACTOR* actorx) { + static u8 weight[] = { 50, 30, 0 }; + + ACTOR* talk_actor = mDemo_Get_talk_actor(); + int idx; + + if (talk_actor != NULL && talk_actor != actorx) { + idx = 2; + } else { + idx = actorx->npc_id == SP_NPC_MAMEDANUKI1; + } + + actorx->status_data.weight = weight[idx]; +} + +#define aNSC_get_zone aNMD_get_zone +#define aNSC_get_next_zone aNMD_get_next_zone +#define aNSC_search_player aNMD_search_player +#define aNSC_search_player2 aNMD_search_player2 +#define aNSC_ANIME_FILE "../src/actor/npc/ac_npc_mamedanuki_anime.c" + +#include "../src/actor/npc/ac_npc_shop_common.c" + +#undef aNSC_get_zone +#undef aNSC_get_next_zone +#undef aNSC_search_player +#undef aNSC_search_player2 +#undef aNSC_MAMEDANUKI +#undef aNSC_ANIME_FILE + +void aNMD_actor_move(ACTOR* actorx, GAME* game) { + NPC_MAMEDANUKI_ACTOR* mamedanuki = (NPC_MAMEDANUKI_ACTOR*)actorx; + GAME_PLAY* play = (GAME_PLAY*)game; + ACTOR* player = GET_PLAYER_ACTOR_ACTOR(play); + + CLIP(npc_clip)->move_before_proc(actorx, game); + aNSC_BGcheck(actorx); + + if (actorx->world.position.z < 138.0f) { + actorx->world.position.z = 138.0f; + } + + aNSC_set_zone_data(mamedanuki, player); + aNSC_set_player_angl(mamedanuki); + (*mamedanuki->proc)(mamedanuki, play); + aNSC_talk_demo_proc(actorx); + CLIP(npc_clip)->move_after_proc(actorx, game); + aNMD_weight_ctrl(actorx); + aNSC_sell_camera(mamedanuki, play); +} diff --git a/src/actor/npc/ac_npc_shop_common.c b/src/actor/npc/ac_npc_shop_common.c index bc12ffdd..5d8a11e0 100644 --- a/src/actor/npc/ac_npc_shop_common.c +++ b/src/actor/npc/ac_npc_shop_common.c @@ -1,29 +1,83 @@ +enum aNSC_action { + aNSC_ACTION_EMPTY, + aNSC_ACTION_SAY_HELLO_APPROACH, + aNSC_ACTION_SAY_HELLO_END_WAIT, + aNSC_ACTION_03_SAY_HELLO_END_WAIT, + aNSC_ACTION_CHECK_ROOF_COL_ORDER, + aNSC_ACTION_CHECK_ROOF_COL_ORDER2, + aNSC_ACTION_CHECK_COL_CHG_OR_MAKE_BASEMENT, + aNSC_ACTION_PRESENT_BALLOON_START_WAIT, + aNSC_ACTION_PRESENT_BALLOON_TRANS_MOVE, + aNSC_ACTION_PRESENT_BALLOON_TRANS_TAKEOUT, + aNSC_ACTION_PRESENT_BALLOON_TRANS_WAIT, + aNSC_ACTION_PRESENT_BALLOON_END_WAIT, + aNSC_ACTION_REQUEST_Q_START_WAIT, + aNSC_ACTION_REQUEST_Q_ANSWER_WAIT, + aNSC_ACTION_REQUEST_Q_ANSWER_WAIT2, + aNSC_ACTION_REQUEST_Q_END_WAIT, + aNSC_ACTION_ANSWER_BUY_ITEM, + aNSC_ACTION_BUY_MENU_OPEN_WAIT, + aNSC_ACTION_BUY_MENU_CLOSE_WAIT, + aNSC_ACTION_MSG_WIN_OPEN_WAIT, + aNSC_ACTION_BUY_SUM_CHECK, + aNSC_ACTION_BUY_CHECK, + aNSC_ACTION_BUY_AFTER_SERVICE, + aNSC_ACTION_BUY_CONTINUE_CHECK, + aNSC_ACTION_RECEIVE_CHECK, + aNSC_ACTION_19_ANSWER_BUY_ITEM, + aNSC_ACTION_0x1a_UNUSED, + aNSC_ACTION_0x1b_UNUSED, + aNSC_ACTION_MSG_WIN_OPEN_WAIT2, + aNSC_ACTION_ORDER_CHECK, + aNSC_ACTION_SELL_CHECK_BEFORE, + aNSC_ACTION_SELL_CHECK, + aNSC_ACTION_SELL_ANSWER0, + aNSC_ACTION_21_REQUEST_Q_END_WAIT, + aNSC_ACTION_SELL_ITEM_WITHOUT_TICKET, + aNSC_ACTION_SELL_ITEM_WITH_TICKET, + aNSC_ACTION_SELL_ITEM_POCKETS_FULL, + aNSC_ACTION_SELL_ITEM_INSUFICIENT_FUNDS, + aNSC_ACTION_SHOW_ITEM_CHECK, + aNSC_ACTION_CHG_CLOTH_START_WAIT, + aNSC_ACTION_CHG_CLOTH_END_WAIT, + aNSC_ACTION_PW_ENTRY_SEND_ADDR_START_WAIT, + aNSC_ACTION_2A_BUY_MENU_OPEN_WAIT, + aNSC_ACTION_0x2b_UNUSED, + aNSC_ACTION_PW_MSG_WIN_OPEN_WAIT, + aNSC_ACTION_PW_SEND_ADDR_CHECK, + aNSC_ACTION_PW_SEL_ITEM_START_WAIT, + aNSC_ACTION_2F_BUY_MENU_OPEN_WAIT, + aNSC_ACTION_0x30_UNUSED, + aNSC_ACTION_0x31_UNUSED, + aNSC_ACTION_PW_SEND_CHECK, + aNSC_ACTION_PW_RETRY_SEL_ITEM_CHECK, + aNSC_ACTION_PC_INPUT_PW_START_WAIT, + aNSC_ACTION_35_BUY_MENU_OPEN_WAIT, + aNSC_ACTION_0x36_UNUSED, + aNSC_ACTION_PC_MSG_WIN_OPEN_WAIT, + aNSC_ACTION_PC_RETRY_INPUT_PW_CHECK, + aNSC_ACTION_PC_PRESENT_START_WAIT, + aNSC_ACTION_PC_PRESENT_TRANS_TAKEOUT, + aNSC_ACTION_PC_PRESENT_TRANS_WAIT, + aNSC_ACTION_PC_PRESENT_END_WAIT, + aNSC_ACTION_WAIT, + aNSC_ACTION_0x3e_WAIT, + aNSC_ACTION_WALK_PL_OTHER_ZONE, + aNSC_ACTION_0x40_WAIT, + aNSC_ACTION_0x41_WALK_PL_OTHER_ZONE, + aNSC_ACTION_TURN, + aNSC_ACTION_GOODBYE_WAIT, +#ifdef aNSC_MAMEDANUKI + aNSC_ACTION_GOODBYE_WAIT2, +#endif + aNSC_ACTION_SAY_GOODBYE, + aNSC_ACTION_EXIT_WAIT, + aNSC_ACTION_NUM +}; + static void aNSC_set_animation(NPC_SHOP_COMMON_ACTOR* shop_common, int action) { - static aNSC_animation_data anime[70] = { - { aNPC_ANIM_WAIT1, FALSE }, { aNPC_ANIM_WALK1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WALK1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WALK1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WALK1, TRUE }, - { aNPC_ANIM_TRANSFER1, TRUE }, { aNPC_ANIM_TRANS_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_TRANSFER1, TRUE }, { aNPC_ANIM_TRANS_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, TRUE }, { aNPC_ANIM_WAIT1, FALSE }, { aNPC_ANIM_WALK1, FALSE }, - { aNPC_ANIM_WALK1, FALSE }, { aNPC_ANIM_RUN1, FALSE }, { aNPC_ANIM_RUN1, FALSE }, - { aNPC_ANIM_WALK1, FALSE }, { aNPC_ANIM_WAIT1, FALSE }, { aNPC_ANIM_WAIT1, TRUE }, - { aNPC_ANIM_WAIT1, FALSE } + static aNSC_animation_data anime[aNSC_ACTION_NUM] = { +#include aNSC_ANIME_FILE // This is very cursed }; aNSC_animation_data* data = &anime[action]; @@ -34,6 +88,7 @@ static void aNSC_BGcheck(ACTOR* actor) { mCoBG_BgCheckControll(NULL, actor, 8.0f, 0.0f, 1, 0, 0); } +#ifndef aNSC_MAMEDANUKI static int aNSC_check_present_balloon() { int idx; int res = 0; @@ -48,6 +103,7 @@ static int aNSC_check_present_balloon() { return res; } +#endif static void aNSC_calc_talk_start_tim(NPC_SHOP_COMMON_ACTOR* shop_common) { int ivar1 = shop_common->talk_start_tim; @@ -344,7 +400,7 @@ static void aNSC_set_sell_camera(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* f32 bg_y; player = GET_PLAYER_ACTOR(play); - mFI_UtNum2CenterWpos(&wpos, shop_common->ut_x, shop_common->ut_y); + mFI_UtNum2CenterWpos(&wpos, shop_common->ut_x, shop_common->ut_z); bg_y = mCoBG_GetBgY_OnlyCenter_FromWpos2(wpos, -40.0); wpos.y = bg_y; Camera2_request_main_talk_pos(play, (ACTOR*)player, &wpos, 5); @@ -400,6 +456,7 @@ static void aNSC_set_run_spd(NPC_SHOP_COMMON_ACTOR* shop_common) { shop_common->npc_class.movement.deceleration = 0.8; } +#ifndef aNSC_MAMEDANUKI static void aNSC_set_rehouse_order_date(mHm_hs_c* home) { lbRTC_time_c* now = &Common_Get(time).rtc_time; home->size_info.upgrade_order_date.year = now->year; @@ -413,6 +470,7 @@ static void aNSC_set_make_basement_info() { home->size_info.basement_ordered = TRUE; aNSC_set_rehouse_order_date(home); } +#endif static mPr_catalog_order_c* aNSC_getP_free_ftr_order() { int i; @@ -464,9 +522,11 @@ static void aNSC_set_item_name_str(mActor_name_t itm, u32 p2) { mMsg_Set_item_str_art(mMsg_Get_base_window_p(), p2, buff, 0x10, art); } -static void aNSC_set_item_str(NPC_SHOP_COMMON_ACTOR* shop_common, mActor_name_t itm) { - u32 value; +static void aNSC_set_item_str(ACTOR* actorx) { + NPC_SHOP_COMMON_ACTOR* shop_common = (NPC_SHOP_COMMON_ACTOR*)actorx; u16 item = shop_common->sell_item; + u32 value; + aNSC_set_item_name_str(item, 0); value = mSP_ItemNo2ItemPrice(item); aNSC_set_value_str(value, 4); @@ -552,7 +612,7 @@ static int aNSC_pc_check_password_user(mMpswd_password_c* pswd) { static int aNSC_pc_check_password(NPC_SHOP_COMMON_ACTOR* shop_common) { static aNSC_PC_CHECK_PASSWORD_PROC pc_check_password_proc[6] = { aNSC_pc_check_password_famicom, aNSC_pc_check_password_npc, aNSC_pc_check_password_card_e, - aNSC_pc_check_password_magazine, aNSC_pc_check_password_card_e_mini, aNSC_pc_check_password_user + aNSC_pc_check_password_magazine, aNSC_pc_check_password_user, aNSC_pc_check_password_card_e_mini, }; int res = aNSC_PSW_RES_0; @@ -600,7 +660,7 @@ static int aNSC_check_possession_item_make_password(NPC_SHOP_COMMON_ACTOR* shop_ } static void aNSC_set_buy_sum_str(mActor_name_t item, u32 p2) { - static int tanni_string_num[10] = { 0x566, 0x575, 0x584, 0x593, 0x5a2, 0x5b1, 0x5c0, 0x5cf, 0x5de, 0x5ed }; + static int tani_string_num[10] = { 0x566, 0x575, 0x584, 0x593, 0x5a2, 0x5b1, 0x5c0, 0x5cf, 0x5de, 0x5ed }; mActor_name_t type; u8 buff[16]; u32 str_no; @@ -610,8 +670,8 @@ static void aNSC_set_buy_sum_str(mActor_name_t item, u32 p2) { switch (ITEM_NAME_GET_TYPE(item)) { case NAME_TYPE_ITEM1: - str_no = p2 + tanni_string_num[aNSC_item_tanni_type[ITEM_NAME_GET_CAT((mActor_name_t)item)] - [ITEM_NAME_GET_INDEX(item)]]; + str_no = p2 + tani_string_num[aNSC_item_tanni_type[ITEM_NAME_GET_CAT((mActor_name_t)item)] + [ITEM_NAME_GET_INDEX(item)]]; str_no -= 1; break; case NAME_TYPE_FTR0: @@ -627,6 +687,7 @@ static void aNSC_set_buy_sum_str(mActor_name_t item, u32 p2) { mMsg_Set_free_str(mMsg_Get_base_window_p(), 8, buff, 0x10); } +#ifndef aNSC_MAMEDANUKI static int aNSC_decide_next_move_act(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { int res; PLAYER_ACTOR* player; @@ -637,7 +698,7 @@ static int aNSC_decide_next_move_act(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PL if (player == NULL) { return shop_common->action; } - if (aNSM_check_safe_zone(shop_common, player) == TRUE) { + if (aNSC_check_safe_zone(shop_common, player) == TRUE) { return aNSC_ACTION_WAIT; } else { if (shop_common->npc_class.actor_class.player_distance_xz < aNSC_PLAYER_DISTANCE || @@ -646,8 +707,9 @@ static int aNSC_decide_next_move_act(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PL } else { f32 player_distance_xz = shop_common->npc_class.actor_class.player_distance_xz; if (shop_common->player_zone != shop_common->zone) { - if (shop_common->action != 0x3f && shop_common->action != 0x41) { - shop_common->next_zone = aNSM_get_next_zone(shop_common->player_zone, shop_common->zone); + if (shop_common->action != aNSC_ACTION_WALK_PL_OTHER_ZONE && + shop_common->action != aNSC_ACTION_0x41_WALK_PL_OTHER_ZONE) { + shop_common->next_zone = aNSC_get_next_zone(shop_common->player_zone, shop_common->zone); } if (player_distance_xz < 90.0f) { return aNSC_ACTION_WALK_PL_OTHER_ZONE; @@ -666,20 +728,72 @@ static int aNSC_decide_next_move_act(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PL } } } +#else +static int aNSC_decide_next_move_act(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { + ACTOR* player = GET_PLAYER_ACTOR_ACTOR(play); + ACTOR* talk_actor = mDemo_Get_talk_actor(); + int res; + if (player == NULL) { + res = shop_common->action; + } else if ((shop_common->npc_class.collision.pipe.collision_obj.collision_flags0 & 0x2) != 0 && + shop_common->npc_class.collision.pipe.collision_obj.collided_actor == player) { + res = aNSC_ACTION_WAIT; + } else if (talk_actor != NULL && talk_actor != (ACTOR*)shop_common && mDemo_Check_ListenAble() == TRUE && + ((shop_common->npc_class.collision.pipe.collision_obj.collision_flags0 & 2) != 0 || + shop_common->action == aNSC_ACTION_WAIT)) { + res = aNSC_ACTION_WAIT; + } else if (player->world.position.z < 120.0f && (shop_common->zone == 2 || shop_common->zone == 3)) { + res = aNSC_ACTION_WAIT; + } else { + f32 dist = shop_common->npc_class.actor_class.player_distance_xz; + + if (dist < 80.0f || shop_common->talk_start_tim == 0) { + res = aNSC_ACTION_WAIT; + } else if (shop_common->player_zone != shop_common->zone) { + if (shop_common->action != aNSC_ACTION_WALK_PL_OTHER_ZONE && + shop_common->action != aNSC_ACTION_0x41_WALK_PL_OTHER_ZONE) { + shop_common->next_zone = aNSC_get_next_zone(shop_common, shop_common->player_zone, shop_common->zone); + } + + if (dist < 110.0f) { + res = aNSC_ACTION_WALK_PL_OTHER_ZONE; + } else { + res = aNSC_ACTION_0x41_WALK_PL_OTHER_ZONE; + } + } else { + shop_common->next_zone = shop_common->zone; + if (dist < 110.0f) { + res = aNSC_ACTION_0x3e_WAIT; + } else { + res = aNSC_ACTION_0x40_WAIT; + } + } + } + + return res; +} +#endif + +#ifndef aNSC_MAMEDANUKI static void aNSC_set_zone_data(NPC_SHOP_COMMON_ACTOR* shop_common, ACTOR* a2) { ACTOR* actorx = (ACTOR*)shop_common; - xyz_t pos1; - xyz_t pos2; - - pos1 = shop_common->npc_class.actor_class.world.position; - shop_common->zone = aNSM_get_zone(&pos1); + shop_common->zone = aNSC_get_zone(shop_common->npc_class.actor_class.world.position); if (a2 != NULL) { - pos2 = a2->world.position; - shop_common->player_zone = aNSM_get_zone(&pos2); + shop_common->player_zone = aNSC_get_zone(a2->world.position); } } +#else +static void aNSC_set_zone_data(NPC_SHOP_COMMON_ACTOR* shop_common, ACTOR* a2) { + ACTOR* actorx = (ACTOR*)shop_common; + + shop_common->zone = aNSC_get_zone(shop_common, shop_common->npc_class.actor_class.world.position); + if (a2 != NULL) { + shop_common->player_zone = aNSC_get_zone(shop_common, a2->world.position); + } +} +#endif static void aNSC_set_player_angl(NPC_SHOP_COMMON_ACTOR* shop_common) { shop_common->player_angle = shop_common->npc_class.actor_class.player_angle_y; @@ -881,19 +995,33 @@ static int aNSC_check_same_month_ticket(mActor_name_t ticket) { } static int aNSC_get_msg_no(int msg_no) { - int res = 0x82a; +#ifndef aNSC_MAMEDANUKI if (msg_no < 0) { - return res; + msg_no = 0x082A; } else if (msg_no < 100) { - res = msg_no + 0x107b; + msg_no += 0x107B; } else if (msg_no < 200) { - res = msg_no + 0x2baf; + msg_no += 0x2BAF; } else if (msg_no < 300) { - res = msg_no + 0x2de6; + msg_no += 0x2DE6; } else { - res = msg_no + 0x3cd2; + msg_no += 0x3CD2; } - return res; + + return msg_no; +#else + if (msg_no < 0) { + msg_no = 0x082A; + } else if (msg_no < 200) { + msg_no += 0x16FD; + } else if (msg_no < 300) { + msg_no += 0x2DE7; + } else { + msg_no += 0x3CF0; + } + + return msg_no; +#endif } static void aNSC_Set_continue_msg_num(mMsg_Window_c* msg_p, NPC_SHOP_COMMON_ACTOR* shop_common, int msg_no) { @@ -923,27 +1051,31 @@ static void aNSC_set_player_angle() { mPlayer_FORCE_POSITION_ANGLE_ROTY); } -static void aNSC_set_talk_info_show_item(NPC_SHOP_COMMON_ACTOR* actor, mActor_name_t item) { - aNSC_set_item_str(actor, item); +static void aNSC_set_talk_info_show_item(ACTOR* actorx) { + aNSC_set_item_str(actorx); aNSC_set_player_angle(); mDemo_Set_camera(CAMERA2_PROCESS_NORMAL); mDemo_Set_msg_num(aNSC_get_msg_no(aNSC_MSG_SHOW_ITEM)); } -static void aNSC_set_talk_info_show_cloth(NPC_SHOP_COMMON_ACTOR* actor, mActor_name_t cloth) { - PositionAngle pa; - aNSC_set_item_str(actor, cloth); +static void aNSC_set_talk_info_show_cloth(ACTOR* actorx) { + aNSC_set_item_str(actorx); aNSC_set_player_angle(); mDemo_Set_camera(CAMERA2_PROCESS_NUM); +#ifndef aNSC_MAMEDANUKI mDemo_Set_msg_num(aNSC_get_msg_no(aNSC_MSG_SHOW_CLOTH)); +#else + mDemo_Set_msg_num(aNSC_get_msg_no(aNSC_ACTION_WAIT)); +#endif } -static void aNSC_set_talk_info_sell_item(NPC_SHOP_COMMON_ACTOR* actor, mActor_name_t p2) { - mActor_name_t item = actor->sell_item; +static void aNSC_set_talk_info_sell_item(ACTOR* actorx) { + NPC_SHOP_COMMON_ACTOR* shop_common = (NPC_SHOP_COMMON_ACTOR*)actorx; + mActor_name_t item = shop_common->sell_item; u8 camera_type; int msg_no = aNSC_MSG_BUY_ONE_OFFER; - aNSC_set_item_str(actor, p2); + aNSC_set_item_str(actorx); aNSC_set_player_angle(); if (ITEM_NAME_GET_TYPE(item) == NAME_TYPE_FTR0 || ITEM_NAME_GET_TYPE(item) == NAME_TYPE_FTR1 || @@ -969,10 +1101,12 @@ static void aNSC_set_talk_info_sell_item(NPC_SHOP_COMMON_ACTOR* actor, mActor_na mDemo_Set_msg_num(aNSC_get_msg_no(msg_no)); } -static void aNSC_set_talk_info_message_ctrl() { +static void aNSC_set_talk_info_message_ctrl(ACTOR* actorx) { mDemo_Set_msg_num(aNSC_get_msg_no(aNSC_MSG_INTERACT_START)); } +#ifndef aNSC_MAMEDANUKI + static void aNSC_set_talk_info_message_ctrl_aprilfool(ACTOR* actorx, GAME* game) { int msg_num = Common_Get(clip).aprilfool_control_clip->get_msg_num_proc(SP_NPC_SHOP_MASTER, 0); mDemo_Set_msg_num(msg_num); @@ -983,6 +1117,201 @@ static void aNSC_set_talk_info_message_ctrl_tokubai() { mDemo_Set_msg_num(msg_num); } +#endif + +#ifdef aNSC_MAMEDANUKI + +static void aNSC_set_talk_info_fukubiki(ACTOR* actorx) { + mDemo_Set_camera(CAMERA2_PROCESS_NORMAL); + mDemo_Set_msg_num(0x10E2); +} + +static void aNSC_message_ctrl_force_talk_start_normal_day(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { + mActor_name_t sell_item = shop_common->sell_item; + + if (sell_item != EMPTY_NO) { + int next_act_idx = aNSC_ACTION_SELL_CHECK_BEFORE; + + if (ITEM_NAME_GET_TYPE(sell_item) == NAME_TYPE_ITEM1) { + switch (ITEM_NAME_GET_CAT(sell_item)) { + case ITEM1_CAT_CLOTH: + case ITEM1_CAT_CARPET: + case ITEM1_CAT_WALL: + next_act_idx = aNSC_ACTION_SHOW_ITEM_CHECK; + break; + default: + if (ITEM_IS_PAINT(sell_item) && mLd_PlayerManKindCheck()) { + next_act_idx = aNSC_ACTION_REQUEST_Q_END_WAIT; + } + break; + } + } + + aNSC_setupAction(shop_common, play, next_act_idx); + } +} + +static void aNSC_message_ctrl_force_talk_start_fukubiki_day(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { + aNSC_setupAction(shop_common, play, aNSC_ACTION_SAY_HELLO_END_WAIT); +} + +static void aNSC_message_ctrl_norm_talk_start_normal_day(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { + aNSC_setupAction(shop_common, play, aNSC_ACTION_REQUEST_Q_ANSWER_WAIT); +} + +static void aNSC_message_ctrl_norm_talk_start_fukubiki_day(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { + aNSC_setupAction(shop_common, play, aNSC_ACTION_SAY_HELLO_END_WAIT); +} + +static void aNSC_message_ctrl_talk_request_normal_day(NPC_SHOP_COMMON_ACTOR* shop_common, PLAYER_ACTOR* player) { + shop_common->sell_item = EMPTY_NO; + + if (player->a_btn_pressed == TRUE) { + mActor_name_t fg_item; + int ux; + int uz; + + mFI_Wpos2UtNum(&ux, &uz, player->forward_ut_pos); + fg_item = CLIP(shop_design_clip)->unitNum2ItemNo_proc(ux, uz); + + if (fg_item != EMPTY_NO && fg_item != RSV_NO) { + mDemo_REQUEST_PROC req_proc = (mDemo_REQUEST_PROC)none_proc1; + + shop_common->sell_item = fg_item; + shop_common->ut_x = ux; + shop_common->ut_z = uz; + + switch (ITEM_NAME_GET_TYPE(fg_item)) { + case NAME_TYPE_FTR0: + case NAME_TYPE_FTR1: + req_proc = aNSC_set_talk_info_sell_item; + break; + case NAME_TYPE_ITEM1: + switch (ITEM_NAME_GET_CAT(fg_item)) { + case ITEM1_CAT_CARPET: + case ITEM1_CAT_WALL: + req_proc = aNSC_set_talk_info_show_item; + break; + case ITEM1_CAT_CLOTH: + req_proc = aNSC_set_talk_info_show_cloth; + break; + default: + req_proc = aNSC_set_talk_info_sell_item; + break; + } + break; + } + + mDemo_Request(mDemo_TYPE_SPEAK, (ACTOR*)shop_common, req_proc); + shop_common->talk_start_tim = -1; + } + } +} + +static void aNSC_message_ctrl_talk_request_fukubiki_day(NPC_SHOP_COMMON_ACTOR* shop_common, PLAYER_ACTOR* player) { + if (player->a_btn_pressed == TRUE) { + mActor_name_t fg_item; + int ux; + int uz; + + mFI_Wpos2UtNum(&ux, &uz, player->forward_ut_pos); + fg_item = CLIP(shop_design_clip)->unitNum2ItemNo_proc(ux, uz); + + if (fg_item != EMPTY_NO && fg_item != RSV_NO) { + mDemo_Request(mDemo_TYPE_SPEAK, (ACTOR*)shop_common, &aNSC_set_talk_info_fukubiki); + shop_common->talk_start_tim = -1; + } + } +} + +static int aNSC_message_ctrl_sub(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play, PLAYER_ACTOR* player, + int day_type) { + static aNSC_TALK_PROC force_talk_start_proc[] = { &aNSC_message_ctrl_force_talk_start_normal_day, + &aNSC_message_ctrl_force_talk_start_fukubiki_day }; + static aNSC_TALK_PROC norm_talk_start_proc[] = { &aNSC_message_ctrl_norm_talk_start_normal_day, + &aNSC_message_ctrl_norm_talk_start_fukubiki_day }; + static aNSC_TALK_REQ_PROC request_proc[] = { &aNSC_message_ctrl_talk_request_normal_day, + &aNSC_message_ctrl_talk_request_fukubiki_day }; + static mDemo_REQUEST_PROC set_talk_info_proc[] = { &aNSC_set_talk_info_message_ctrl, &aNSC_set_talk_info_fukubiki }; + + ACTOR* actorx = (ACTOR*)shop_common; + int ret = FALSE; + + if (mDemo_Check(mDemo_TYPE_SPEAK, actorx) == TRUE) { + if (!mDemo_Check_ListenAble()) { + aNSC_calc_talk_start_tim(shop_common); + + if (actorx->player_distance_xz < 85.0f || shop_common->talk_start_tim == 0) { + if (chase_angle(&actorx->shape_info.rotation.y, shop_common->player_angle, DEG2SHORT_ANGLE2(11.25f)) == + TRUE) { + (*force_talk_start_proc[day_type])(shop_common, play); + shop_common->talk_start_tim = -1; + aNMD_selectIdx = (aNMD_selectIdx + 1) & 1; + aNSC_Set_ListenAble(shop_common); + ret = TRUE; + } + + actorx->world.angle.y = actorx->shape_info.rotation.y; + } + } + } else if (mDemo_Check(mDemo_TYPE_TALK, actorx) == TRUE) { + if (!mDemo_Check_ListenAble()) { + if (chase_angle(&actorx->shape_info.rotation.y, shop_common->player_angle, DEG2SHORT_ANGLE2(11.25f)) == + TRUE) { + (*norm_talk_start_proc[day_type])(shop_common, play); + aNSC_Set_ListenAble(shop_common); + ret = TRUE; + } + + actorx->world.angle.y = actorx->shape_info.rotation.y; + } + } else if (mDemo_Get_talk_actor() == NULL) { + if (aNMD_selectIdx > 1) { + aNMD_selectIdx = 0; + } + + if (actorx == aNMD_actor_p[aNMD_selectIdx]) { + (*request_proc[day_type])(shop_common, player); + } else { + shop_common->talk_start_tim = -1; + } + + mDemo_Request(mDemo_TYPE_TALK, actorx, set_talk_info_proc[day_type]); + } + + return ret; +} + +static int aNSC_message_ctrl(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { + ACTOR* player_actorx = GET_PLAYER_ACTOR_ACTOR(play); + int ret = FALSE; + + if (player_actorx != NULL && CLIP(shop_design_clip) != NULL) { + PLAYER_ACTOR* player = (PLAYER_ACTOR*)player_actorx; + + if (player->item_in_front == EXIT_DOOR1) { + int next_act_idx; + + if ((ACTOR*)shop_common == aNMD_actor_p[aNMD_selectIdx]) { + next_act_idx = aNSC_ACTION_GOODBYE_WAIT; + } else { + next_act_idx = aNSC_ACTION_GOODBYE_WAIT2; + } + + aNSC_setupAction(shop_common, play, next_act_idx); + ret = TRUE; + } else if (Common_Get(tanuki_shop_status) == mSP_TANUKI_SHOP_STATUS_FUKUBIKI) { + ret = aNSC_message_ctrl_sub(shop_common, play, player, aNSC_DAY_FUKUBIKI); + } else { + ret = aNSC_message_ctrl_sub(shop_common, play, player, aNSC_DAY_NORMAL); + } + } + + return ret; +} + +#else + static int aNSC_message_ctrl(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { PLAYER_ACTOR* player = GET_PLAYER_ACTOR_GAME(play); int res = 0; @@ -997,7 +1326,8 @@ static int aNSC_message_ctrl(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play if (mDemo_Check(mDemo_TYPE_SPEAK, actorx) == TRUE) { if (mDemo_Check_ListenAble() == FALSE) { aNSC_calc_talk_start_tim(shop_common); - if (shop_common->npc_class.actor_class.player_distance_xz < 80.0f || shop_common->talk_start_tim == 0) { + if (shop_common->npc_class.actor_class.player_distance_xz < 80.0f || + shop_common->talk_start_tim == 0) { if (chase_angle(&shop_common->npc_class.actor_class.shape_info.rotation.y, shop_common->player_angle, DEG2SHORT_ANGLE(11.25f)) == TRUE) { mActor_name_t item = shop_common->sell_item; @@ -1056,17 +1386,17 @@ static int aNSC_message_ctrl(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play shop_common->sell_item = EMPTY_NO; if (player->a_btn_pressed == TRUE) { - int ut_x, ut_y; + int ut_x, ut_z; u16 item; xyz_t wpos = player->forward_ut_pos; - mFI_Wpos2UtNum(&ut_x, &ut_y, wpos); - item = CLIP(shop_design_clip)->unitNum2ItemNo_proc(ut_x, ut_y); + mFI_Wpos2UtNum(&ut_x, &ut_z, wpos); + item = CLIP(shop_design_clip)->unitNum2ItemNo_proc(ut_x, ut_z); if (item != EMPTY_NO && item != RSV_NO) { void* sell_proc = none_proc1; shop_common->sell_item = item; shop_common->ut_x = ut_x; - shop_common->ut_y = ut_y; + shop_common->ut_z = ut_z; switch (ITEM_NAME_GET_TYPE(item)) { case NAME_TYPE_FTR0: @@ -1111,6 +1441,8 @@ static int aNSC_message_ctrl(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play return res; } +#endif + static mActor_name_t aNSC_exchange_itemNo[2] = { ITM_MONEY_30000, EMPTY_NO }; static int aNSC_buy_item_single(u32* bells, mActor_name_t item, u32 p2) { @@ -1231,6 +1563,37 @@ static int aNSC_buy_item_only_one(u32* bells, mActor_name_t itm, u8* p3, int sel return next; } +#ifdef aNSC_MAMEDANUKI + +static void aNSC_set_talk_info_start_wait(ACTOR* actorx) { + int msg_no; + + if (Common_Get(tanuki_shop_status) == mSP_TANUKI_SHOP_STATUS_EVENT) { + msg_no = 0x1722; + } else if (Common_Get(tanuki_shop_status) == mSP_TANUKI_SHOP_STATUS_FUKUBIKI) { + msg_no = 0x10E1; + } else { + msg_no = 0x1713; + } + + mDemo_Set_msg_num(msg_no); +} + +static void aNSC_start_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { + ACTOR* actorx = (ACTOR*)shop_common; + + if (mDemo_Check(mDemo_TYPE_SPEAK, actorx) == TRUE) { + if (!mDemo_Check_ListenAble()) { + aNSC_Set_ListenAble(shop_common); + aNSC_setupAction(shop_common, play, aNSC_ACTION_SAY_HELLO_APPROACH); + } + } else { + mDemo_Request(mDemo_TYPE_SPEAK, actorx, &aNSC_set_talk_info_start_wait); + } +} + +#else + static int aNSC_get_start_call_msg_no(ACTOR* actorx) { int no; if (Common_Get(tanuki_shop_status) == mSP_TANUKI_SHOP_STATUS_EVENT) { @@ -1246,8 +1609,12 @@ static int aNSC_get_start_call_msg_no(ACTOR* actorx) { } static void aNSC_set_talk_info_start_wait(ACTOR* actorx) { - static u32 rehouse_msg[4] = { aNSC_MSG_MEDIUM_BUILT, aNSC_MSG_LARGE_BUILT, aNSC_MSG_UPPER_BUILT, - aNSC_MSG_STATUE_BUILT }; + static u32 rehouse_msg[4] = { + aNSC_MSG_MEDIUM_BUILT, + aNSC_MSG_LARGE_BUILT, + aNSC_MSG_UPPER_BUILT, + aNSC_MSG_STATUE_BUILT, + }; static u32 rehouse_loan[4] = { aNSC_LOAN_MEDIUM, aNSC_LOAN_LARGE, aNSC_LOAN_UPPER, aNSC_LOAN_STATUE }; u8 player_no = Common_Get(player_no); int idx = mHS_get_arrange_idx(player_no); @@ -1450,6 +1817,22 @@ static void aNSC_start_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) } mDemo_Request(mDemo_TYPE_SPEAK, actorx, proc); } +#endif + +#ifdef aNSC_MAMEDANUKI + +static void aNSC_say_hello_approach(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { + ACTOR* actorx = (ACTOR*)shop_common; + + if (actorx->world.position.z < 160.0f) { + actorx->world.position.z = 160.0f; + aNSC_setupAction(shop_common, play, shop_common->action + 1); + } else if (!mDemo_Check(mDemo_TYPE_SPEAK, actorx) && !mDemo_Check(mDemo_TYPE_TALK, actorx)) { + aNSC_setupAction(shop_common, play, shop_common->action + 1); + } +} + +#else static void aNSC_say_hello_approach(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { ACTOR* actorx = (ACTOR*)shop_common; @@ -1462,6 +1845,8 @@ static void aNSC_say_hello_approach(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLA } } +#endif + static void aNSC_say_hello_end_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { ACTOR* actorx = (ACTOR*)shop_common; if (mDemo_Check(mDemo_TYPE_SPEAK, actorx) == FALSE) { @@ -1472,6 +1857,8 @@ static void aNSC_say_hello_end_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLA } } +#ifndef aNSC_MAMEDANUKI + static void aNSC_check_col_chg_or_make_basement(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { f32 z = 260.0; if (((ACTOR*)shop_common)->world.position.z > z) { @@ -1598,6 +1985,8 @@ static void aNSC_present_balloon_end_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GA } } +#endif + static void aNSC_set_talk_info_request_Q_start_wait() { mDemo_Set_msg_num(aNSC_get_msg_no(aNSC_MSG_INTERACT_START)); mDemo_Set_talk_turn(0x0); @@ -1616,11 +2005,13 @@ static void aNSC_request_Q_start_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_P } static void aNSC_request_Q_answer_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { - static int msg_no[5] = { aNSC_MSG_OTHER, aNSC_MSG_SELL_START, aNSC_MSG_ORDER_FULL, aNSC_MSG_SHOW_CATALOGUE, - aNSC_MSG_INTERACT_CANCEl }; - static int next_act_idx[5] = { aNSC_ACTION_REQUEST_Q_ANSWER_WAIT2, aNSC_ACTION_ANSWER_BUY_ITEM, - aNSC_ACTION_REQUEST_Q_ANSWER_WAIT, aNSC_ACTION_19_ANSWER_BUY_ITEM, - aNSC_ACTION_REQUEST_Q_END_WAIT }; + static int msg_no[5] = { + aNSC_MSG_OTHER, aNSC_MSG_SELL_START, aNSC_MSG_ORDER_FULL, aNSC_MSG_SHOW_CATALOGUE, aNSC_MSG_INTERACT_CANCEL, + }; + static int next_act_idx[5] = { + aNSC_ACTION_REQUEST_Q_ANSWER_WAIT2, aNSC_ACTION_ANSWER_BUY_ITEM, aNSC_ACTION_REQUEST_Q_ANSWER_WAIT, + aNSC_ACTION_19_ANSWER_BUY_ITEM, aNSC_ACTION_REQUEST_Q_END_WAIT, + }; int res = mDemo_Get_OrderValue(mDemo_TYPE_4, 0x9); mMsg_Window_c* msg_p = mMsg_Get_base_window_p(); if (res != 0) { @@ -1737,13 +2128,16 @@ static void aNSC_buy_menu_close_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PL } static void aNSC_msg_win_open_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { - static int msg_no_table[8] = { aNSC_MSG_SELL_OFFER, aNSC_MSG_SELL_CANCEL, aNSC_MSG_KABU_ON_SUNDAY, - aNSC_MSG_JUNK_ACCEPT, aNSC_MSG_SELL_QUEST, aNSC_MSG_REHOUSE_MEDIUM, - aNSC_MSG_BUY_MANY_OFFER, aNSC_MSG_BUY_REFUSE_PLURAL }; - static int next_act_idx[8] = { aNSC_ACTION_BUY_CHECK, aNSC_ACTION_BUY_CONTINUE_CHECK, - aNSC_ACTION_REQUEST_Q_END_WAIT, aNSC_ACTION_REQUEST_Q_ANSWER_WAIT, - aNSC_ACTION_RECEIVE_CHECK, aNSC_ACTION_BUY_SUM_CHECK, - aNSC_ACTION_BUY_CHECK, aNSC_ACTION_BUY_CHECK }; + static int msg_no_table[8] = { + aNSC_MSG_SELL_OFFER, aNSC_MSG_SELL_CANCEL, aNSC_MSG_KABU_ON_SUNDAY, aNSC_MSG_JUNK_ACCEPT, + aNSC_MSG_SELL_QUEST, aNSC_MSG_REHOUSE_MEDIUM, aNSC_MSG_BUY_MANY_OFFER, aNSC_MSG_BUY_REFUSE_PLURAL, + }; + static int next_act_idx[8] = { + aNSC_ACTION_BUY_CHECK, aNSC_ACTION_BUY_CONTINUE_CHECK, + aNSC_ACTION_REQUEST_Q_END_WAIT, aNSC_ACTION_REQUEST_Q_ANSWER_WAIT, + aNSC_ACTION_RECEIVE_CHECK, aNSC_ACTION_BUY_SUM_CHECK, + aNSC_ACTION_BUY_CHECK, aNSC_ACTION_BUY_CHECK, + }; mMsg_Window_c* msg_p = mMsg_Get_base_window_p(); if (mMsg_Check_not_series_main_wait(msg_p) == TRUE) { int action; @@ -1756,7 +2150,11 @@ static void aNSC_msg_win_open_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY action = aNSC_check_buy_item(shop_common, submenu); } if (action == aNSC_CHECK_BUY_OFFER_BUY_ALL) { - msg_no = aNSC_MSG_TAKE_OFF_HANDS; +#ifdef aNSC_MAMEDANUKI + msg_no = 0x173D; +#else + msg_no = 0x108A; +#endif } else { msg_no = aNSC_get_msg_no(msg_no_table[action]); } @@ -1792,8 +2190,12 @@ static void aNSC_buy_sum_check(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* pl static void aNSC_buy_check(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { static int msg_no[4] = { aNSC_MSG_BREAK_BAG, aNSC_MSG_SELL_NORMAL, aNSC_MSG_SELL_CANCEL, aNSC_MSG_MONEY_OVERFLOW }; - static int next_act_idx[4] = { aNSC_ACTION_BUY_AFTER_SERVICE, aNSC_ACTION_BUY_CONTINUE_CHECK, - aNSC_ACTION_BUY_CONTINUE_CHECK, aNSC_ACTION_REQUEST_Q_ANSWER_WAIT }; + static int next_act_idx[4] = { + aNSC_ACTION_BUY_AFTER_SERVICE, + aNSC_ACTION_BUY_CONTINUE_CHECK, + aNSC_ACTION_BUY_CONTINUE_CHECK, + aNSC_ACTION_REQUEST_Q_ANSWER_WAIT, + }; mMsg_Window_c* msg_p = mMsg_Get_base_window_p(); int n1 = aNSC_get_msg_no(aNSC_MSG_SELL_OFFER); int n2 = aNSC_get_msg_no(aNSC_MSG_BUY_MANY_OFFER); @@ -1883,7 +2285,11 @@ static void aNSC_buy_continue_check(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLA action = 0; break; case mChoice_CHOICE1: +#ifdef aNSC_MAMEDANUKI + aNSC_Set_continue_msg_num(msg_p, shop_common, aNSC_get_msg_no(aNSC_MSG_3C)); +#else aNSC_Set_continue_msg_num(msg_p, shop_common, aNSC_get_msg_no(aNSC_MSG_CANCEL)); +#endif action = 1; break; } @@ -2093,9 +2499,13 @@ static void aNSC_show_item_check(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* aNSC_request_show_camera(play, aNSC_REQUEST_SHOW_TYPE_CARPET); break; default: - CLIP(shop_manekin_clip)->change2naked_manekin_proc(shop_common->ut_x, shop_common->ut_y); + CLIP(shop_manekin_clip)->change2naked_manekin_proc(shop_common->ut_x, shop_common->ut_z); action = aNSC_ACTION_CHG_CLOTH_START_WAIT; +#ifndef aNSC_MAMEDANUKI msg_no = aNSC_MSG_CONFIRM_CLOTH; +#else + msg_no = aNSC_MSG_3E; +#endif shop_common->next_action = aNSC_ACTION_SELL_CHECK_BEFORE; shop_common->player_cloth = Now_Private->cloth.item; shop_common->change_cloth = shop_common->sell_item; @@ -2110,7 +2520,11 @@ static void aNSC_show_item_check(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* msg_no = aNSC_MSG_SHOW_CARPET_DECLINE; break; default: +#ifndef aNSC_MAMEDANUKI msg_no = aNSC_MSG_CANCEL_CLOTH; +#else + msg_no = aNSC_MSG_3F; +#endif break; } break; @@ -2290,15 +2704,17 @@ static void aNSC_pc_input_pw_start_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME } static void aNSC_pc_msg_win_open_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { - static int msg_no[10] = { aNSC_MSG_PSWD_WRONG, aNSC_MSG_PSWD_GOOD_FAMICON, aNSC_MSG_PSWD_GOOD_NPC, - aNSC_MSG_PSWD_GOOD_MAGAZINE_1, aNSC_MSG_PSWD_CARDE, aNSC_MSG_PSWD_GOOD_USER, - aNSC_MSG_PSWD_GOOD_CARDEM, aNSC_MSG_PSWD_GOOD_MAGAZINE_2, aNSC_MSG_PSWD_BAD, - aNSC_MSG_PSWD_DECLINE }; - static int next_act_idx[10] = { aNSC_ACTION_PC_RETRY_INPUT_PW_CHECK, aNSC_ACTION_PC_PRESENT_START_WAIT, - aNSC_ACTION_PC_PRESENT_START_WAIT, aNSC_ACTION_PC_PRESENT_START_WAIT, - aNSC_ACTION_REQUEST_Q_END_WAIT, aNSC_ACTION_PC_PRESENT_START_WAIT, - aNSC_ACTION_PC_PRESENT_START_WAIT, aNSC_ACTION_REQUEST_Q_END_WAIT, - aNSC_ACTION_PC_RETRY_INPUT_PW_CHECK, aNSC_ACTION_REQUEST_Q_ANSWER_WAIT }; + static int msg_no[10] = { + aNSC_MSG_PSWD_WRONG, aNSC_MSG_PSWD_GOOD_FAMICON, aNSC_MSG_PSWD_GOOD_NPC, aNSC_MSG_PSWD_GOOD_MAGAZINE_1, + aNSC_MSG_PSWD_CARDE, aNSC_MSG_PSWD_GOOD_USER, aNSC_MSG_PSWD_GOOD_CARDEM, aNSC_MSG_PSWD_GOOD_MAGAZINE_2, + aNSC_MSG_PSWD_BAD, aNSC_MSG_PSWD_DECLINE, + }; + static int next_act_idx[10] = { + aNSC_ACTION_PC_RETRY_INPUT_PW_CHECK, aNSC_ACTION_PC_PRESENT_START_WAIT, aNSC_ACTION_PC_PRESENT_START_WAIT, + aNSC_ACTION_PC_PRESENT_START_WAIT, aNSC_ACTION_REQUEST_Q_END_WAIT, aNSC_ACTION_PC_PRESENT_START_WAIT, + aNSC_ACTION_PC_PRESENT_START_WAIT, aNSC_ACTION_REQUEST_Q_END_WAIT, aNSC_ACTION_PC_RETRY_INPUT_PW_CHECK, + aNSC_ACTION_REQUEST_Q_ANSWER_WAIT, + }; mMsg_Window_c* msg_p = mMsg_Get_base_window_p(); if (mMsg_Check_not_series_main_wait(msg_p) == TRUE) { int act = aNSC_pc_check_password(shop_common); @@ -2376,7 +2792,7 @@ static void aNSC_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { if (act != shop_common->action) { aNSC_setupAction(shop_common, play, act); } else { - aNSM_search_player(shop_common, play); + aNSC_search_player(shop_common, play); } } } @@ -2387,7 +2803,7 @@ static void aNSC_walk_pl_other_zone(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLA if (act != shop_common->action) { aNSC_setupAction(shop_common, play, act); } else { - aNSM_search_player2(shop_common, play); + aNSC_search_player2(shop_common, play); } } } @@ -2417,6 +2833,9 @@ static void aNSC_goodbye_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* pla if (mDemo_Check_ListenAble() == FALSE) { s16 player_angle = shop_common->player_angle; if (chase_angle(&actorx->shape_info.rotation.y, player_angle, DEG2SHORT_ANGLE(11.25f)) == TRUE) { +#ifdef aNSC_MAMEDANUKI + mBGMForce_room_nonstop_start(); +#endif aNSC_Set_ListenAble(shop_common); aNSC_setupAction(shop_common, play, aNSC_ACTION_SAY_GOODBYE); } @@ -2426,6 +2845,15 @@ static void aNSC_goodbye_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* pla } } +#ifdef aNSC_MAMEDANUKI + +static void aNSC_goodbye_wait2(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { + chase_angle(&shop_common->npc_class.actor_class.shape_info.rotation.y, shop_common->player_angle, + DEG2SHORT_ANGLE2(11.25f)); +} + +#endif + static void aNSC_say_goodbye(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { mMsg_Window_c* msg_p = mMsg_Get_base_window_p(); if (mMsg_Check_idling_now(msg_p) == TRUE) { @@ -2435,14 +2863,41 @@ static void aNSC_say_goodbye(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play } static void aNSC_exit_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { +#ifdef aNSC_MAMEDANUKI + // clang-format off + static Door_data_c stairs = { + SCENE_DEPART, + mSc_DIRECT_SOUTH, + 0, + 0, + { 300, 40, 65 }, + EMPTY_NO, + 2, + 0, + 0 + }; + // clang-format on + if (mMsg_Check_main_wait(mMsg_Get_base_window_p()) == TRUE) { - goto_other_scene(play, &Common_Get(structure_exit_door_data), TRUE); + goto_other_scene(play, &stairs, TRUE); + if (play->fb_wipe_mode == 0) { + play->fb_fade_type = 12; + mBGMPsComp_volume_talk_end(); + mBGMPsComp_make_ps_wipe(0x195); + } + } + +#else + + if (mMsg_Check_main_wait(mMsg_Get_base_window_p()) == TRUE) { + goto_other_scene(play, Common_GetPointer(structure_exit_door_data), TRUE); if (play->fb_wipe_mode == 0) { mBGMPsComp_scene_mode(0xe); mBGMPsComp_volume_talk_end(); mBGMPsComp_make_ps_wipe(0x195); } } +#endif } static void aNSC_say_hello_approach_init(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { @@ -2454,6 +2909,8 @@ static void aNSC_say_hello_end_wait_init(NPC_SHOP_COMMON_ACTOR* shop_common, GAM aNSC_set_stop_spd(shop_common); } +#ifndef aNSC_MAMEDANUKI + static void aNSC_check_col_chg_or_make_basement_init(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { aNSC_set_walk_spd(shop_common); } @@ -2493,6 +2950,8 @@ static void aNSC_present_balloon_end_wait_init(NPC_SHOP_COMMON_ACTOR* shop_commo shop_common->npc_class.head.lock_flag = FALSE; } +#endif + static void aNSC_request_Q_answer_wait_init(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { mDemo_Set_OrderValue(mDemo_ORDER_NPC0, 0x9, 0x0); aNSC_set_stop_spd(shop_common); @@ -2583,7 +3042,7 @@ static void aNSC_sell_answer0_init(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY case ITEM1_CAT_CLOTH: if (!aNSC_money_check(shop_common->value) || !mPr_GetPossessionItemSum(Now_Private, 0) || shop_common->action == aNSC_ACTION_21_REQUEST_Q_END_WAIT) { - CLIP(shop_manekin_clip)->naked2cloth_proc(shop_common->ut_x, shop_common->ut_y); + CLIP(shop_manekin_clip)->naked2cloth_proc(shop_common->ut_x, shop_common->ut_z); } shop_common->is_selling = FALSE; break; @@ -2599,7 +3058,7 @@ static void aNSC_sell_answer1_init(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY static void aNSC_sell_item_init(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play) { aNSC_get_sell_price(shop_common->value); if (CLIP(shop_design_clip) != NULL) { - CLIP(shop_design_clip)->reportGoodsSale_proc(shop_common->ut_x, shop_common->ut_y); + CLIP(shop_design_clip)->reportGoodsSale_proc(shop_common->ut_x, shop_common->ut_z); } shop_common->sell_item = EMPTY_NO; } @@ -2692,6 +3151,16 @@ static void aNSC_init_proc(NPC_SHOP_COMMON_ACTOR *shop_common, GAME_PLAY* play, aNSC_say_hello_approach_init, aNSC_say_hello_end_wait_init, aNSC_say_hello_end_wait_init, +#ifdef aNSC_MAMEDANUKI + aNSC_say_hello_approach_init, + aNSC_say_hello_end_wait_init, + (aNSC_INIT_PROC)none_proc1, + (aNSC_INIT_PROC)none_proc1, + (aNSC_INIT_PROC)none_proc1, + (aNSC_INIT_PROC)none_proc1, + (aNSC_INIT_PROC)none_proc1, + (aNSC_INIT_PROC)none_proc1, +#else aNSC_check_roof_col_order_init, aNSC_check_roof_col_order2_init, aNSC_check_col_chg_or_make_basement_init, @@ -2700,6 +3169,7 @@ static void aNSC_init_proc(NPC_SHOP_COMMON_ACTOR *shop_common, GAME_PLAY* play, aNSC_present_balloon_trans_takeout_init, (aNSC_INIT_PROC)none_proc1, aNSC_present_balloon_end_wait_init, +#endif (aNSC_INIT_PROC)none_proc1, aNSC_request_Q_answer_wait_init, aNSC_request_Q_answer_wait_init, @@ -2756,6 +3226,9 @@ static void aNSC_init_proc(NPC_SHOP_COMMON_ACTOR *shop_common, GAME_PLAY* play, aNSC_run_pl_same_zone_init, aNSC_wait_init, aNSC_goodbye_wait_init, +#ifdef aNSC_MAMEDANUKI + aNSC_goodbye_wait_init, +#endif aNSC_say_goodbye_init, aNSC_exit_wait }; @@ -2768,6 +3241,16 @@ static void aNSC_setupAction(NPC_SHOP_COMMON_ACTOR *shop_common, GAME_PLAY *play aNSC_say_hello_approach, aNSC_say_hello_end_wait, aNSC_say_hello_end_wait, +#ifdef aNSC_MAMEDANUKI + aNSC_say_hello_approach, + aNSC_say_hello_end_wait, + (aNSC_ACTION_PROC)none_proc1, + (aNSC_ACTION_PROC)none_proc1, + (aNSC_ACTION_PROC)none_proc1, + (aNSC_ACTION_PROC)none_proc1, + (aNSC_ACTION_PROC)none_proc1, + (aNSC_ACTION_PROC)none_proc1, +#else aNSC_check_roof_col_order, aNSC_check_roof_col_order2, aNSC_check_col_chg_or_make_basement, @@ -2776,6 +3259,7 @@ static void aNSC_setupAction(NPC_SHOP_COMMON_ACTOR *shop_common, GAME_PLAY *play aNSC_present_balloon_trans_takeout, aNSC_present_balloon_trans_wait, aNSC_present_balloon_end_wait, +#endif aNSC_request_Q_start_wait, aNSC_request_Q_answer_wait, aNSC_request_Q_answer_wait2, @@ -2832,6 +3316,9 @@ static void aNSC_setupAction(NPC_SHOP_COMMON_ACTOR *shop_common, GAME_PLAY *play aNSC_walk_pl_other_zone, aNSC_turn, aNSC_goodbye_wait, +#ifdef aNSC_MAMEDANUKI + aNSC_goodbye_wait2, +#endif aNSC_say_goodbye, aNSC_exit_wait }; diff --git a/src/actor/npc/ac_npc_shop_master.c b/src/actor/npc/ac_npc_shop_master.c index 7ca34e7b..7d3b7cc8 100644 --- a/src/actor/npc/ac_npc_shop_master.c +++ b/src/actor/npc/ac_npc_shop_master.c @@ -30,10 +30,6 @@ void aNSM_actor_draw(ACTOR* actorx, GAME* game); void aNSM_actor_init(ACTOR* actorx, GAME* game); void aNSM_actor_save(ACTOR* actorx, GAME* game); -static void aNSM_talk_request(ACTOR* actorx, GAME* game); -static int aNSM_talk_init(ACTOR* actorx, GAME* game); -static int aNSM_talk_end_chk(ACTOR* actorx, GAME* game); - // clang-format off ACTOR_PROFILE Npc_Shop_Master_Profile = { mAc_PROFILE_NPC_SHOP_MASTER, @@ -42,6 +38,11 @@ ACTOR_PROFILE Npc_Shop_Master_Profile = { SP_NPC_SHOP_MASTER, ACTOR_OBJ_BANK_KEEP, sizeof(NPC_SHOP_MASTER_ACTOR), + &aNSM_actor_ct, + &aNSM_actor_dt, + &aNSM_actor_init, + mActor_NONE_PROC1, + &aNSM_actor_save, }; // clang-format on @@ -58,7 +59,7 @@ static void aNSC_sell_camera(NPC_SHOP_MASTER_ACTOR* shop_master, GAME_PLAY* play void aNSM_actor_ct(ACTOR* actorx, GAME* game) { static aNPC_ct_data_c ct_data = { - &aNSM_actor_move, &aNSM_actor_draw, 0, &aNSM_talk_request, &aNSM_talk_init, &aNSM_talk_end_chk, TRUE, + &aNSM_actor_move, &aNSM_actor_draw, 0, NULL, NULL, NULL, 1, }; NPC_SHOP_MASTER_ACTOR* shop_master = (NPC_SHOP_MASTER_ACTOR*)actorx; @@ -74,7 +75,7 @@ void aNSM_actor_ct(ACTOR* actorx, GAME* game) { if (Common_Get(door_data).door_actor_name == RSV_NO) { shop_master->npc_class.talk_info.melody_inst = 0; - action = aNSC_ACTION_WAIT; + action = 61; } else { action = 0; } @@ -99,4 +100,3 @@ void aNSM_actor_draw(ACTOR* actorx, GAME* game) { } #include "../src/actor/npc/ac_npc_shop_master_move.c_inc" -#include "../src/actor/npc/ac_npc_shop_common.c" diff --git a/src/actor/npc/ac_npc_shop_master_anime.c b/src/actor/npc/ac_npc_shop_master_anime.c new file mode 100644 index 00000000..3a88af00 --- /dev/null +++ b/src/actor/npc/ac_npc_shop_master_anime.c @@ -0,0 +1,70 @@ +{ aNPC_ANIM_WAIT1, FALSE }, +{ aNPC_ANIM_WALK1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WALK1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WALK1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WALK1, TRUE }, +{ aNPC_ANIM_TRANSFER1, TRUE }, +{ aNPC_ANIM_TRANS_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_TRANSFER1, TRUE }, +{ aNPC_ANIM_TRANS_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, FALSE }, +{ aNPC_ANIM_WALK1, FALSE }, +{ aNPC_ANIM_WALK1, FALSE }, +{ aNPC_ANIM_RUN1, FALSE }, +{ aNPC_ANIM_RUN1, FALSE }, +{ aNPC_ANIM_WALK1, FALSE }, +{ aNPC_ANIM_WAIT1, FALSE }, +{ aNPC_ANIM_WAIT1, TRUE }, +{ aNPC_ANIM_WAIT1, FALSE } diff --git a/src/actor/npc/ac_npc_shop_master_move.c_inc b/src/actor/npc/ac_npc_shop_master_move.c_inc index 2a0f37a3..d11ecc2c 100644 --- a/src/actor/npc/ac_npc_shop_master_move.c_inc +++ b/src/actor/npc/ac_npc_shop_master_move.c_inc @@ -1,12 +1,12 @@ -static u8 aNSM_get_zone(xyz_t* wpos) { - if (wpos->x < 120.0f) { - if (wpos->z < 180.0f) { +static u8 aNSM_get_zone(xyz_t wpos) { + if (wpos.x < 120.0f) { + if (wpos.z < 180.0f) { return aNSM_ZONE_1; } else { return aNSM_ZONE_2; } } - if (wpos->z < 160.0f) { + if (wpos.z < 160.0f) { return aNSM_ZONE_0; } else { return aNSM_ZONE_3; @@ -31,7 +31,7 @@ static void aNSM_search_player(NPC_SHOP_MASTER_ACTOR* shop_master, GAME_PLAY* pl if (player != NULL) { s16 angle = actorx->shape_info.rotation.y - shop_master->player_angle; if (ABS(angle) > DEG2SHORT_ANGLE(90.0f)) { - aNSC_setupAction(shop_master, play, aNSC_ACTION_TURN); + aNSC_setupAction(shop_master, play, 66); } else { chase_angle(&actorx->shape_info.rotation.y, shop_master->player_angle, DEG2SHORT_ANGLE(11.25f)); actorx->world.angle.y = actorx->shape_info.rotation.y; @@ -66,6 +66,22 @@ static int aNSM_check_safe_zone(NPC_SHOP_MASTER_ACTOR* shop_master, PLAYER_ACTOR return res; } +#define aNSC_get_zone aNSM_get_zone +#define aNSC_get_next_zone aNSM_get_next_zone +#define aNSC_check_safe_zone aNSM_check_safe_zone +#define aNSC_search_player aNSM_search_player +#define aNSC_search_player2 aNSM_search_player2 +#define aNSC_ANIME_FILE "../src/actor/npc/ac_npc_shop_master_anime.c" + +#include "../src/actor/npc/ac_npc_shop_common.c" + +#undef aNSC_get_zone +#undef aNSC_get_next_zone +#undef aNSC_check_safe_zone +#undef aNSC_search_player +#undef aNSC_search_player2 +#undef aNSC_ANIME_FILE + void aNSM_actor_move(ACTOR* actorx, GAME* game) { NPC_SHOP_MASTER_ACTOR* shop_master = (NPC_SHOP_MASTER_ACTOR*)actorx; GAME_PLAY* play = (GAME_PLAY*)game;