mirror of
https://github.com/zeldaret/tmc
synced 2026-06-27 10:43:05 -04:00
Create new entity structs for NPCs
This commit is contained in:
+2
-2
@@ -120,8 +120,8 @@ void sub_0801E1EC(u32, u32, u32);
|
||||
void sub_0801DD58(u32, u32);
|
||||
void sub_0801E1B8(u32, u32);
|
||||
void AddKinstoneToBag(u32);
|
||||
void sub_0801DFB4(struct Entity_*, u32, u32, u32);
|
||||
u32 sub_0801E00C(void);
|
||||
void InitializeFuseInfo(struct Entity_* entity, u32 textIndex, u32 cancelledTextIndex, u32 fusingTextIndex);
|
||||
u32 PerformFuseAction(void);
|
||||
bool32 CheckFusionMapMarkerDisabled(u32);
|
||||
u32 sub_0801DB94(void);
|
||||
u32 GetRandomSharedFusion(u8*);
|
||||
|
||||
@@ -98,7 +98,6 @@ extern void sub_0805EC60(Entity*);
|
||||
extern void InitPlayerMacro(PlayerMacroEntry*);
|
||||
extern u32* sub_0805F25C(u32);
|
||||
extern void sub_0805F8E4(u32 r0, WStruct* r1);
|
||||
extern void sub_08060158(Entity*);
|
||||
extern void sub_0806D0B0(Entity*);
|
||||
extern bool32 sub_080806BC(u32, u32, u32, u32);
|
||||
extern void sub_0808091C(const ScreenTransitionData* screenTransition, u32 transitionType);
|
||||
|
||||
+14
-4
@@ -6,17 +6,27 @@
|
||||
|
||||
extern void sub_08018C58(u32);
|
||||
|
||||
typedef enum {
|
||||
FUSION_STATE_0, // fusion was not yet started
|
||||
FUSION_STATE_1, // failed?
|
||||
FUSION_STATE_2, // successful?
|
||||
FUSION_STATE_3, // fusion is being performed
|
||||
FUSION_STATE_4, // player has closed the first messagebox
|
||||
FUSION_STATE_5, // fusion declined by the player
|
||||
FUSION_STATE_6, // Successful, but not yet finished?
|
||||
} FusionState;
|
||||
|
||||
typedef struct {
|
||||
u8 _0;
|
||||
u8 fusionState; /** @see FusionState */
|
||||
u8 action;
|
||||
u8 _2;
|
||||
u8 kinstoneId;
|
||||
u8 prevUpdatePriority;
|
||||
u8 _5;
|
||||
u16 textIndex;
|
||||
u16 _8;
|
||||
u16 _a;
|
||||
Entity* ent;
|
||||
u16 cancelledTextIndex;
|
||||
u16 fusingTextIndex;
|
||||
Entity* entity;
|
||||
} FuseInfo;
|
||||
static_assert(sizeof(FuseInfo) == 0x10);
|
||||
extern FuseInfo gFuseInfo;
|
||||
|
||||
+60
-61
@@ -73,7 +73,7 @@ s32 GetFacingDirectionInRectRadius(Entity* ent, u32 x, u32 y);
|
||||
void sub_0806EE04(Entity* ent, void* a2, u32 a3);
|
||||
u32 sub_0806EE20(Entity* ent);
|
||||
s32 sub_0806F078(Entity* ent, s32 a2);
|
||||
void sub_0806F118(Entity* ent);
|
||||
void InitializeNPCFusion(Entity* ent);
|
||||
void MarkFuserDone(Entity* ent);
|
||||
void ShowNPCDialogue(Entity* ent, const Dialog* dia);
|
||||
|
||||
@@ -85,7 +85,6 @@ void CollideFollowers(void);
|
||||
|
||||
// TODO move?
|
||||
void AddInteractableWhenBigFuser(Entity* ent, u32 kinstoneId);
|
||||
u32 sub_0806F5A4(u32);
|
||||
u32 GetFusionToOffer(Entity*);
|
||||
void AddInteractableWhenBigObject(Entity*);
|
||||
void sub_0807000C(Entity*);
|
||||
@@ -222,23 +221,23 @@ enum NPC {
|
||||
/*0x7f*/ NPC_NONE_39,
|
||||
};
|
||||
|
||||
void Gentari(Entity*);
|
||||
void Gentari();
|
||||
void Gentari_Fusion(Entity*);
|
||||
void Festari(Entity*);
|
||||
void Festari_Fusion(Entity*);
|
||||
void ForestMinish(Entity*);
|
||||
void Festari();
|
||||
void Festari_Fusion();
|
||||
void ForestMinish();
|
||||
void ForestMinish_Head(Entity*);
|
||||
void ForestMinish_Fusion(Entity*);
|
||||
void Postman(Entity*);
|
||||
void Postman();
|
||||
void Postman_Fusion(Entity*);
|
||||
void NPC5(Entity*);
|
||||
void NPC5();
|
||||
void Townsperson(Entity*);
|
||||
void Townsperson_Head(Entity*);
|
||||
void Townsperson_Fusion(Entity*);
|
||||
void Kid(Entity*);
|
||||
void Kid();
|
||||
void Kid_Head(Entity*);
|
||||
void Kid_Fusion(Entity*);
|
||||
void Guard(Entity*);
|
||||
void Guard();
|
||||
void Guard_Head(Entity*);
|
||||
void NPC9(Entity*);
|
||||
void Stamp(Entity*);
|
||||
@@ -246,90 +245,90 @@ void Maid(Entity*);
|
||||
void Maid_Head(Entity*);
|
||||
void Marcy(Entity*);
|
||||
void Wheaton(Entity*);
|
||||
void Pita(Entity*);
|
||||
void Pita();
|
||||
void MinishEzlo(Entity*);
|
||||
void MinishEzlo_Head(Entity*);
|
||||
void Mailbox(Entity*);
|
||||
void Beedle(Entity*);
|
||||
void Beedle_Head(Entity*);
|
||||
void Brocco(Entity*);
|
||||
void Brocco();
|
||||
void Brocco_Fusion(Entity*);
|
||||
void SittingPerson(Entity*);
|
||||
void SittingPerson();
|
||||
void SittingPerson_Head(Entity*);
|
||||
void SittingPerson_Fusion(Entity*);
|
||||
void Pina(Entity*);
|
||||
void Pina();
|
||||
void Pina_Fusion(Entity*);
|
||||
void Din(Entity*);
|
||||
void Din();
|
||||
void Din_Fusion(Entity*);
|
||||
void Nayru(Entity*);
|
||||
void Nayru();
|
||||
void Nayru_Fusion(Entity*);
|
||||
void Farore(Entity*);
|
||||
void Farore();
|
||||
void Farore_Fusion(Entity*);
|
||||
void Sturgeon(Entity*);
|
||||
void Sturgeon();
|
||||
void Sturgeon_Head(Entity*);
|
||||
void Sturgeon_Fusion(Entity*);
|
||||
void TingleSiblings(Entity*);
|
||||
void TingleSiblings_Fusion(Entity*);
|
||||
void Stockwell(Entity*);
|
||||
void Talon(Entity*);
|
||||
void Stockwell();
|
||||
void Talon();
|
||||
void Talon_Head(Entity*);
|
||||
void Talon_Fusion(Entity*);
|
||||
void Malon(Entity*);
|
||||
void Malon();
|
||||
void Malon_Fusion(Entity*);
|
||||
void Epona(Entity*);
|
||||
void Epona_Fusion(Entity*);
|
||||
void Epona();
|
||||
void Epona_Fusion();
|
||||
void MilkCart(Entity*);
|
||||
void GhostBrothers(Entity*);
|
||||
void GhostBrothers();
|
||||
void GhostBrothers_Fusion(Entity*);
|
||||
void Smith(Entity*);
|
||||
void Smith();
|
||||
void Smith_Head(Entity*);
|
||||
void Smith_Fusion(Entity*);
|
||||
void NPC23(Entity*);
|
||||
void KingDaltus(Entity*);
|
||||
void NPC23();
|
||||
void KingDaltus();
|
||||
void KingDaltus_Fusion(Entity*);
|
||||
void MinisterPotho(Entity*);
|
||||
void MinisterPotho();
|
||||
void MinisterPotho_Fusion(Entity*);
|
||||
void NPC26(Entity*);
|
||||
void Vaati(Entity*);
|
||||
void Zelda(Entity*);
|
||||
void Mutoh(Entity*);
|
||||
void Mutoh();
|
||||
void Mutoh_Head(Entity*);
|
||||
void Mutoh_Fusion(Entity*);
|
||||
void Carpenter(Entity*);
|
||||
void Carpenter();
|
||||
void Carpenter_Head(Entity*);
|
||||
void Carpenter_Fusion(Entity*);
|
||||
void CastorWildsStatue(Entity*);
|
||||
void CastorWildsStatue();
|
||||
void CastorWildsStatue_Fusion(Entity*);
|
||||
void Cat(Entity*);
|
||||
void Cat();
|
||||
void Cat_Fusion(Entity*);
|
||||
void MountainMinish(Entity*);
|
||||
void MountainMinish();
|
||||
void MountainMinish_Head(Entity*);
|
||||
void MountainMinish_Fusion(Entity*);
|
||||
void ZeldaFollower(Entity*);
|
||||
void Melari(Entity*);
|
||||
void Melari_Head(Entity*);
|
||||
void Melari_Fusion(Entity*);
|
||||
void BladeBrothers(Entity*);
|
||||
void BladeBrothers();
|
||||
void BladeBrothers_Fusion(Entity*);
|
||||
void Cow(Entity*);
|
||||
void Cow_Fusion(Entity*);
|
||||
void Goron(Entity*);
|
||||
void Cow();
|
||||
void Cow_Fusion();
|
||||
void Goron();
|
||||
void Goron_Fusion(Entity*);
|
||||
void GoronMerchant(Entity*);
|
||||
void Gorman(Entity*);
|
||||
void Gorman();
|
||||
void Gorman_Head(Entity*);
|
||||
void Dog(Entity*);
|
||||
void Dog_Head(Entity*);
|
||||
void Dog_Fusion(Entity*);
|
||||
void Syrup(Entity*);
|
||||
void Dog();
|
||||
void Dog_Head();
|
||||
void Dog_Fusion();
|
||||
void Syrup();
|
||||
void Syrup_Head(Entity*);
|
||||
void Rem(Entity*);
|
||||
void TownMinish(Entity*);
|
||||
void TownMinish_Head(Entity*);
|
||||
void Rem();
|
||||
void TownMinish();
|
||||
void TownMinish_Head();
|
||||
void TownMinish_Fusion(Entity*);
|
||||
void Librari(Entity*);
|
||||
void Librari();
|
||||
void Librari_Fusion(Entity*);
|
||||
void Percy(Entity*);
|
||||
void Percy();
|
||||
void Percy_Head(Entity*);
|
||||
void Percy_Fusion(Entity*);
|
||||
void VaatiReborn(Entity*);
|
||||
@@ -343,26 +342,26 @@ void Dampe(Entity*);
|
||||
void Dampe_Fusion(Entity*);
|
||||
void DrLeft(Entity*);
|
||||
void KingGustaf(Entity*);
|
||||
void Gina(Entity*);
|
||||
void Gina();
|
||||
void Gina_Fusion(Entity*);
|
||||
void Simon(Entity*);
|
||||
void Anju(Entity*);
|
||||
void Anju_Fusion(Entity*);
|
||||
void Mama(Entity*);
|
||||
void Anju();
|
||||
void Anju_Fusion();
|
||||
void Mama();
|
||||
void Mama_Head(Entity*);
|
||||
void Mama_Fusion(Entity*);
|
||||
void Emma(Entity*);
|
||||
void Teachers(Entity*);
|
||||
void Teachers();
|
||||
void Teachers_Head(Entity*);
|
||||
void Teachers_Fusion(Entity*);
|
||||
void WindTribespeople(Entity*);
|
||||
void WindTribespeople_Head(Entity*);
|
||||
void WindTribespeople_Fusion(Entity*);
|
||||
void Gregal(Entity*);
|
||||
void Gregal();
|
||||
void Gregal_Fusion(Entity*);
|
||||
void MayorHagen(Entity*);
|
||||
void MayorHagen();
|
||||
void MayorHagen_Fusion(Entity*);
|
||||
void BigGoron(Entity*);
|
||||
void BigGoron();
|
||||
void Ezlo(Entity*);
|
||||
void NPC4E(Entity*);
|
||||
void NPC4E_Fusion(Entity*);
|
||||
@@ -370,18 +369,18 @@ void NPC4F(Entity*);
|
||||
void ClothesRack(Entity*);
|
||||
void PicolyteBottle(Entity*);
|
||||
void SmallTownMinish(Entity*);
|
||||
void HurdyGurdyMan(Entity*);
|
||||
void HurdyGurdyMan();
|
||||
void HurdyGurdyMan_Head(Entity*);
|
||||
void HurdyGurdyMan_Fusion(Entity*);
|
||||
void Cucco(Entity*);
|
||||
void Cucco();
|
||||
void Cucco_Fusion(Entity*);
|
||||
void CuccoChick(Entity*);
|
||||
void CuccoChick_Fusion(Entity*);
|
||||
void CuccoChick();
|
||||
void CuccoChick_Fusion();
|
||||
void FusionMenuNPC(Entity*);
|
||||
void FusionMenuNPC_Head(Entity*);
|
||||
void Phonograph(Entity*);
|
||||
void NPC58(Entity*);
|
||||
void NPC58_Head(Entity*);
|
||||
void NPC58();
|
||||
void NPC58_Head();
|
||||
|
||||
extern void (*const gNPCFunctions[128][3])(Entity*);
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef ZELDA_H
|
||||
#define ZELDA_H
|
||||
|
||||
#include "entity.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 unused[24];
|
||||
/*0x80*/ u16 unk_80;
|
||||
} ZeldaEntity;
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ s8 unk_68;
|
||||
/*0x69*/ s8 unk_69;
|
||||
/*0x6a*/ u8 unused[10];
|
||||
/*0x74*/ u16 unk_74;
|
||||
} ZeldaFollowerEntity;
|
||||
|
||||
#endif // ZELDA_H
|
||||
+4
-2
@@ -25,7 +25,6 @@ bool32 EntityWithinDistance(Entity*, s32, s32, s32);
|
||||
u32 sub_0806FCA0(Entity*, Entity*);
|
||||
u32 sub_0806F58C(Entity*, Entity*);
|
||||
u32 PointInsideRadius(s32 x, s32 y, s32 radius);
|
||||
u32 sub_0806F5A4(u32 idx);
|
||||
bool32 sub_0806F3E4(Entity*);
|
||||
void LinearMoveUpdate(Entity*);
|
||||
bool32 sub_0806FD54(Entity*);
|
||||
@@ -35,7 +34,10 @@ u32 sub_0806F730(Entity*);
|
||||
bool32 sub_0806F520(Entity*);
|
||||
void sub_0806F4E8(Entity*);
|
||||
bool32 sub_0806FC80(Entity*, Entity*, s32);
|
||||
u32 sub_0806F5B0(u32);
|
||||
/** Maps the direction to an animation state 0 to 3. */
|
||||
u32 GetAnimationStateForDirection4(u32 direction);
|
||||
/** Maps the direction to an animation state 0 to 8. */
|
||||
u32 GetAnimationStateForDirection8(u32 direction);
|
||||
u32 sub_0806F824(Entity*, Entity*, s32, s32);
|
||||
u32 sub_0806F948(Entity*);
|
||||
void sub_0806FBB4(Entity*);
|
||||
|
||||
+2
-2
@@ -51,7 +51,7 @@ extern u32 GetNextScriptCommandHalfwordAfterCommandMetadata(u16*);
|
||||
void UnloadCutsceneData(Entity* entity);
|
||||
void StartPlayerScript(Script* script);
|
||||
|
||||
void sub_0807DD50(Entity* entity);
|
||||
void InitScriptForNPC(Entity* entity);
|
||||
void sub_0807DD64(Entity* entity);
|
||||
void sub_0807DD80(Entity* entity, Script* script);
|
||||
void sub_0807DEDC(Entity*, ScriptExecutionContext*, u32, u32);
|
||||
@@ -60,7 +60,7 @@ ScriptExecutionContext* StartCutscene(Entity* entity, Script* script);
|
||||
void ExecuteScriptForEntity(Entity* entity, void (*postScriptCallback)(Entity*, ScriptExecutionContext*));
|
||||
void HandlePostScriptActions(Entity* entity, ScriptExecutionContext* context);
|
||||
void HandleEntity0x82Actions(Entity* entity);
|
||||
void sub_0807DD94(Entity*, void (*function)(Entity*, ScriptExecutionContext*));
|
||||
void ExecuteScriptAndHandleAnimation(Entity* entity, void (*postScriptCallback)(Entity*, ScriptExecutionContext*));
|
||||
ScriptExecutionContext* CreateScriptExecutionContext(void);
|
||||
void InitScriptForEntity(Entity* entity, ScriptExecutionContext* context, Script* script);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user