mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-09 20:41:31 -04:00
Implement & link m_melody.c
This commit is contained in:
+12
-6
@@ -7,6 +7,7 @@
|
||||
#include "ac_npc_h.h"
|
||||
#include "m_npc_schedule.h"
|
||||
#include "m_actor_dlftbls.h"
|
||||
#include "m_npc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -55,19 +56,24 @@ struct ac_npc_clip_s {
|
||||
};
|
||||
|
||||
typedef struct npc_info_s {
|
||||
mNPS_schedule_c* schedule;
|
||||
mNpc_NpcList_c* list;
|
||||
Animal_c* animal;
|
||||
void* event; // TODO: EventNpc struct
|
||||
mNpc_NpcList_c* list;
|
||||
mNPS_schedule_c* schedule;
|
||||
mNpc_EventNpc_c* event;
|
||||
mNpc_MaskNpc_c* mask;
|
||||
mActor_name_t npc_name;
|
||||
} NpcActorInfo_c;
|
||||
|
||||
struct npc_actor_s {
|
||||
ACTOR actor_class;
|
||||
int _174;
|
||||
int _178;
|
||||
NpcActorInfo_c npc_info;
|
||||
// TODO: finish
|
||||
u8 _174[0x718 - 0x184];
|
||||
u8 _194[0x718 - 0x194];
|
||||
int texture_bank_idx; // TEMP: this is part of draw struct
|
||||
u8 _71C[0x9D8 - 0x71C];
|
||||
u8 _71C[0x978 - 0x71C];
|
||||
s16 melody_inst;
|
||||
u8 _97A[0x9D8 - 0x97A];
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Npc_Profile;
|
||||
|
||||
@@ -2,12 +2,22 @@
|
||||
#define M_MELODY_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor_type.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define mMld_MELODY_LEN 16
|
||||
|
||||
extern void mMld_SetDefaultMelody();
|
||||
extern void mMld_TransformMelodyData_u64_2_u8(u8* dst, u64 src);
|
||||
extern void mMld_TransformMelodyData_u8_2_u64(u64* dst, u8* src);
|
||||
extern void mMld_GetMelody(u8* dst);
|
||||
extern void mMld_SetSaveMelody(u8* melody);
|
||||
extern void mMld_MakeMelody(u16 inst);
|
||||
extern void mMld_ActorMakeThisMelody(u8* melody, ACTOR* actor);
|
||||
extern void mMld_ActorMakeMelody(ACTOR* actor);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -196,6 +196,25 @@ typedef struct npc_list_s {
|
||||
mActor_name_t reward_furniture;
|
||||
} mNpc_NpcList_c;
|
||||
|
||||
typedef struct event_npc_s {
|
||||
mActor_name_t event_id; /* event NPC id */
|
||||
mActor_name_t texture_id; /* real NPC id which is used for texture data */
|
||||
mActor_name_t npc_id; /* non-texture NPC id used for other NPC data */
|
||||
mActor_name_t cloth_id; /* cloth texture id */
|
||||
u8 exists; /* has the actor been spawned yet? */
|
||||
u8 in_use; /* is this event npc structure being used? */
|
||||
u16 _A; /* exists based on size of structure, seems unused */
|
||||
} mNpc_EventNpc_c;
|
||||
|
||||
typedef struct mask_npc_s {
|
||||
mActor_name_t mask_id; /* 'mask' actor id */
|
||||
mActor_name_t npc_id; /* NPC actor id whose data will be used */
|
||||
mActor_name_t cloth_id; /* cloth actor id */
|
||||
u8 exists; /* has the actor been spawned yet? */
|
||||
u8 in_use; /* is this mask npc structure being used? */
|
||||
Animal_c animal_data; /* animal data is copied if the mask npc is a standard villager NPC */
|
||||
} mNpc_MaskNpc_c;
|
||||
|
||||
/* anm_id could also just be a Animal_c pointer */
|
||||
extern void mNpc_GetNpcWorldNameAnm(u8* name, AnmPersonalID_c* anm_id);
|
||||
extern int mNpc_CheckFreeAnimalPersonalID(AnmPersonalID_c* anm_id);
|
||||
|
||||
Reference in New Issue
Block a user