mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-09 12:37:22 -04:00
Implement & link ac_npc_shop_mastersp
This commit is contained in:
+3
-1
@@ -352,11 +352,13 @@ typedef struct npc_action_s {
|
||||
aNPC_ACTION_PROC act_proc;
|
||||
} aNPC_action_c;
|
||||
|
||||
#define aNPC_REQUEST_ARG_NUM 6
|
||||
|
||||
typedef struct npc_request_s {
|
||||
u8 act_priority;
|
||||
u8 act_idx;
|
||||
u8 act_type;
|
||||
u16 act_args[6];
|
||||
u16 act_args[aNPC_REQUEST_ARG_NUM];
|
||||
u8 umb_flag;
|
||||
u8 _11;
|
||||
u8 head_priority;
|
||||
|
||||
@@ -3,11 +3,44 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_npc.h"
|
||||
#include "m_shop.h"
|
||||
#include "m_player_lib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define aSHM_REQ_TICKET_NUM 5
|
||||
|
||||
#define aSHM_FIRST_PLACE_PERCENT 5
|
||||
#define aSHM_SECOND_PLACE_PERCENT (10 + aSHM_FIRST_PLACE_PERCENT)
|
||||
#define aSHM_THIRD_PLACE_PERCENT (20 + aSHM_SECOND_PLACE_PERCENT)
|
||||
|
||||
typedef struct npc_shop_mastersp_actor_s NPC_SHOP_MASTERSP_ACTOR;
|
||||
|
||||
typedef void (*aSHM_THINK_PROC)(NPC_SHOP_MASTERSP_ACTOR*, GAME_PLAY*);
|
||||
typedef void (*aSHM_TALK_PROC)(NPC_SHOP_MASTERSP_ACTOR*, GAME_PLAY*);
|
||||
|
||||
struct npc_shop_mastersp_actor_s {
|
||||
NPC_ACTOR npc_class;
|
||||
int think_idx;
|
||||
int next_think_idx;
|
||||
int move_think_idx;
|
||||
aSHM_THINK_PROC think_proc;
|
||||
int talk_idx;
|
||||
aSHM_TALK_PROC talk_proc;
|
||||
s16 result;
|
||||
s16 timer;
|
||||
s16 root;
|
||||
s16 root_idx;
|
||||
s16 now_idx;
|
||||
int month;
|
||||
int ut[2];
|
||||
int melody_bak;
|
||||
s16 base_pos[11][2];
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Npc_Shop_Mastersp_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -15,4 +48,3 @@ extern ACTOR_PROFILE Npc_Shop_Mastersp_Profile;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -111,6 +111,8 @@ typedef enum audio_sound_effects {
|
||||
NA_SE_STONECOIN_ROLL = 0x7D,
|
||||
NA_SE_STONECOIN_DRAG = 0x7E,
|
||||
|
||||
NA_SE_7F = 0x7F,
|
||||
|
||||
NA_SE_TRAIN_RIDE = 0x8D,
|
||||
|
||||
NA_SE_GOKI_MOVE = 0xA8,
|
||||
|
||||
@@ -206,6 +206,8 @@ extern int mDemo_Check_ListenAble();
|
||||
extern int mDemo_Check_DiffAngle_forTalk(s16 diff_angle);
|
||||
extern void mDemo_KeepCamera(int camera_type);
|
||||
|
||||
#define mDemo_CAN_ACTOR_TALK(actor) (!mDemo_Check(mDemo_TYPE_SPEAK, (actor)) && !mDemo_Check(mDemo_TYPE_TALK, (actor)))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -209,6 +209,9 @@ extern int mNT_check_unknown(mActor_name_t item_no);
|
||||
|
||||
#define TICKET_MONTH(n) (1 + (((n) >> 3) & 0xF))
|
||||
#define TICKET_COUNT(n) (1 + ((n) & 7))
|
||||
#define TICKET_TO_MONTH(month) (((month) - 1) << 3)
|
||||
#define TICKET_TO_COUNT(cnt) ((cnt) & 7)
|
||||
#define TICKET_GET_ITEM(month, cnt) (ITM_TICKET_START | (((month) - 1) << 3) | ((cnt) & 7))
|
||||
#define WISP_COUNT(n) (ITEM_IS_WISP(n) ? (1 + (n) - ITM_SPIRIT0) : 0)
|
||||
|
||||
#define ITEM_IS_INSECT(n) ((n) >= ITM_INSECT_START && (n) < ITM_INSECT_END)
|
||||
|
||||
Reference in New Issue
Block a user