mirror of https://github.com/zeldaret/tmc.git
				
				
				
			
		
			
				
	
	
		
			344 lines
		
	
	
		
			8.3 KiB
		
	
	
	
		
			C
		
	
	
	
			
		
		
	
	
			344 lines
		
	
	
		
			8.3 KiB
		
	
	
	
		
			C
		
	
	
	
#ifndef NPC_H
 | 
						|
#define NPC_H
 | 
						|
 | 
						|
#include "global.h"
 | 
						|
#include "asm.h"
 | 
						|
#include "common.h"
 | 
						|
 | 
						|
#include "sound.h"
 | 
						|
#include "effects.h"
 | 
						|
#include "room.h"
 | 
						|
#include "flags.h"
 | 
						|
#include "coord.h"
 | 
						|
#include "message.h"
 | 
						|
#include "script.h"
 | 
						|
#include "save.h"
 | 
						|
 | 
						|
#include "entity.h"
 | 
						|
#include "player.h"
 | 
						|
 | 
						|
#include "structures.h"
 | 
						|
 | 
						|
void sub_0806EC20(Entity* ent);
 | 
						|
void sub_0806EC38(void);
 | 
						|
u32 sub_0806ED78(Entity* ent);
 | 
						|
s32 sub_0806ED9C(Entity*, u32, u32);
 | 
						|
u32 GetAnimationState(Entity* ent);
 | 
						|
s32 sub_0806EDD8(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 sub_0806F188(Entity* ent);
 | 
						|
void ShowNPCDialogue(Entity* ent, Dialog* dia);
 | 
						|
 | 
						|
Entity* CreateNPC(u32 subtype, u32 form, u32 parameter);
 | 
						|
u32 UpdateFuseInteraction(Entity*);
 | 
						|
 | 
						|
void NPCInit(Entity* ent);
 | 
						|
void sub_0806F0A4(void);
 | 
						|
 | 
						|
// TODO move?
 | 
						|
void sub_08078784(Entity* ent, u32 arg1);
 | 
						|
u32 sub_0806F5A4(u32);
 | 
						|
u32 sub_0801E99C(Entity*);
 | 
						|
void sub_08078778(Entity*);
 | 
						|
void sub_0807000C(Entity*);
 | 
						|
void sub_080787A8(Entity*, u32);
 | 
						|
 | 
						|
enum NPC {
 | 
						|
    /*0x00*/ NPC_NONE_0,
 | 
						|
    /*0x01*/ GENTARI,
 | 
						|
    /*0x02*/ FESTARI,
 | 
						|
    /*0x03*/ FOREST_MINISH,
 | 
						|
    /*0x04*/ POSTMAN,
 | 
						|
    /*0x05*/ NPC_UNK_5,
 | 
						|
    /*0x06*/ TPWNSPERSON,
 | 
						|
    /*0x07*/ KID,
 | 
						|
    /*0x08*/ GUARD,
 | 
						|
    /*0x09*/ NPC_UNK_9,
 | 
						|
    /*0x0a*/ STAMP,
 | 
						|
    /*0x0b*/ MAID,
 | 
						|
    /*0x0c*/ MARCY,
 | 
						|
    /*0x0d*/ WHEATON,
 | 
						|
    /*0x0e*/ PITA,
 | 
						|
    /*0x0f*/ MINISH_EZLO,
 | 
						|
    /*0x10*/ MAILBOX,
 | 
						|
    /*0x11*/ BEEDLE,
 | 
						|
    /*0x12*/ BROCCO,
 | 
						|
    /*0x13*/ SITTING_PERSON,
 | 
						|
    /*0x14*/ PINA,
 | 
						|
    /*0x15*/ GUARD_1,
 | 
						|
    /*0x16*/ MAID_1,
 | 
						|
    /*0x17*/ DIN,
 | 
						|
    /*0x18*/ NAYRU,
 | 
						|
    /*0x19*/ FARORE,
 | 
						|
    /*0x1a*/ STURGEON,
 | 
						|
    /*0x1b*/ TINGLE_SIBLINGS,
 | 
						|
    /*0x1c*/ STOCKWELL,
 | 
						|
    /*0x1d*/ TALON,
 | 
						|
    /*0x1e*/ MALON,
 | 
						|
    /*0x1f*/ EPONA,
 | 
						|
    /*0x20*/ MILK_CART,
 | 
						|
    /*0x21*/ GHOST_BROTHERS,
 | 
						|
    /*0x22*/ SMITH,
 | 
						|
    /*0x23*/ NPC_UNK_23,
 | 
						|
    /*0x24*/ KING_DALTUS,
 | 
						|
    /*0x25*/ MINISTER_POTHO,
 | 
						|
    /*0x26*/ NPC_UNK_26,
 | 
						|
    /*0x27*/ VAATI,
 | 
						|
    /*0x28*/ ZELDA,
 | 
						|
    /*0x29*/ MUTOH,
 | 
						|
    /*0x2a*/ CARPENTER,
 | 
						|
    /*0x2b*/ CASTOR_WILDS_STATUE,
 | 
						|
    /*0x2c*/ CAT,
 | 
						|
    /*0x2d*/ MOUNTAIN_MINISH,
 | 
						|
    /*0x2e*/ ZELDA_FOLLOWER,
 | 
						|
    /*0x2f*/ MELARI,
 | 
						|
    /*0x30*/ BLADE_BROTHERS,
 | 
						|
    /*0x31*/ COW,
 | 
						|
    /*0x32*/ GORON,
 | 
						|
    /*0x33*/ GORON_MERCHANT,
 | 
						|
    /*0x34*/ GORMAN,
 | 
						|
    /*0x35*/ DOG,
 | 
						|
    /*0x36*/ SYRUP,
 | 
						|
    /*0x37*/ REM,
 | 
						|
    /*0x38*/ TOWN_MINISH,
 | 
						|
    /*0x39*/ LIBRARI,
 | 
						|
    /*0x3a*/ PERCY,
 | 
						|
    /*0x3b*/ VAATI_REBORN,
 | 
						|
    /*0x3c*/ MOBLIN_LADY,
 | 
						|
    /*0x3d*/ LIBRARIANS,
 | 
						|
    /*0x3e*/ FARMERS,
 | 
						|
    /*0x3f*/ CARLOV,
 | 
						|
    /*0x40*/ DAMPE,
 | 
						|
    /*0x41*/ DR_LEFT,
 | 
						|
    /*0x42*/ KING_GUSTAF,
 | 
						|
    /*0x43*/ GINA,
 | 
						|
    /*0x44*/ SIMON,
 | 
						|
    /*0x45*/ ANJU,
 | 
						|
    /*0x46*/ MAMA,
 | 
						|
    /*0x47*/ EMMA,
 | 
						|
    /*0x48*/ TEACHERS,
 | 
						|
    /*0x49*/ WIND_TRIBESPEOPLE,
 | 
						|
    /*0x4a*/ GREGAL,
 | 
						|
    /*0x4b*/ MAYOR_HAGEN,
 | 
						|
    /*0x4c*/ BIG_GORON,
 | 
						|
    /*0x4d*/ EZLO,
 | 
						|
    /*0x4e*/ NPC_UNK_4E,
 | 
						|
    /*0x4f*/ NPC_UNK_4F,
 | 
						|
    /*0x50*/ CLOTHES_RACK,
 | 
						|
    /*0x51*/ PICOLYTE_BOTTLE,
 | 
						|
    /*0x52*/ SMALL_TOWN_MINISH,
 | 
						|
    /*0x53*/ HURDY_GURDY_MAN,
 | 
						|
    /*0x54*/ CUCCO,
 | 
						|
    /*0x55*/ CUCCO_CHICK,
 | 
						|
    /*0x56*/ FUSION_MENU_NPC,
 | 
						|
    /*0x57*/ PHONOGRAPH,
 | 
						|
    /*0x58*/ NPC_UNK_58,
 | 
						|
    /*0x59*/ NPC_NONE_1,
 | 
						|
    /*0x5a*/ NPC_NONE_2,
 | 
						|
    /*0x5b*/ NPC_NONE_3,
 | 
						|
    /*0x5c*/ NPC_NONE_4,
 | 
						|
    /*0x5d*/ NPC_NONE_5,
 | 
						|
    /*0x5e*/ NPC_NONE_6,
 | 
						|
    /*0x5f*/ NPC_NONE_7,
 | 
						|
    /*0x60*/ NPC_NONE_8,
 | 
						|
    /*0x61*/ NPC_NONE_9,
 | 
						|
    /*0x62*/ NPC_NONE_10,
 | 
						|
    /*0x63*/ NPC_NONE_11,
 | 
						|
    /*0x64*/ NPC_NONE_12,
 | 
						|
    /*0x65*/ NPC_NONE_13,
 | 
						|
    /*0x66*/ NPC_NONE_14,
 | 
						|
    /*0x67*/ NPC_NONE_15,
 | 
						|
    /*0x68*/ NPC_NONE_16,
 | 
						|
    /*0x69*/ NPC_NONE_17,
 | 
						|
    /*0x6a*/ NPC_NONE_18,
 | 
						|
    /*0x6b*/ NPC_NONE_19,
 | 
						|
    /*0x6c*/ NPC_NONE_20,
 | 
						|
    /*0x6d*/ NPC_NONE_21,
 | 
						|
    /*0x6e*/ NPC_NONE_22,
 | 
						|
    /*0x6f*/ NPC_NONE_23,
 | 
						|
    /*0x70*/ NPC_NONE_24,
 | 
						|
    /*0x71*/ NPC_NONE_25,
 | 
						|
    /*0x72*/ NPC_NONE_26,
 | 
						|
    /*0x73*/ NPC_NONE_27,
 | 
						|
    /*0x74*/ NPC_NONE_28,
 | 
						|
    /*0x75*/ NPC_NONE_29,
 | 
						|
    /*0x76*/ NPC_NONE_30,
 | 
						|
    /*0x77*/ NPC_NONE_31,
 | 
						|
    /*0x78*/ NPC_NONE_32,
 | 
						|
    /*0x79*/ NPC_NONE_33,
 | 
						|
    /*0x7a*/ NPC_NONE_34,
 | 
						|
    /*0x7b*/ NPC_NONE_35,
 | 
						|
    /*0x7c*/ NPC_NONE_36,
 | 
						|
    /*0x7d*/ NPC_NONE_37,
 | 
						|
    /*0x7e*/ NPC_NONE_38,
 | 
						|
    /*0x7f*/ NPC_NONE_39,
 | 
						|
};
 | 
						|
 | 
						|
void Gentari(Entity*);
 | 
						|
void Gentari_Fusion(Entity*);
 | 
						|
void Festari(Entity*);
 | 
						|
void Festari_Fusion(Entity*);
 | 
						|
void ForestMinish(Entity*);
 | 
						|
void ForestMinish_Head(Entity*);
 | 
						|
void ForestMinish_Fusion(Entity*);
 | 
						|
void Postman(Entity*);
 | 
						|
void Postman_Fusion(Entity*);
 | 
						|
void NPC5(Entity*);
 | 
						|
void Townsperson(Entity*);
 | 
						|
void Townsperson_Head(Entity*);
 | 
						|
void Townsperson_Fusion(Entity*);
 | 
						|
void Kid(Entity*);
 | 
						|
void Kid_Head(Entity*);
 | 
						|
void Kid_Fusion(Entity*);
 | 
						|
void Guard(Entity*);
 | 
						|
void Guard_Head(Entity*);
 | 
						|
void NPC9(Entity*);
 | 
						|
void Stamp(Entity*);
 | 
						|
void Maid(Entity*);
 | 
						|
void Maid_Head(Entity*);
 | 
						|
void Marcy(Entity*);
 | 
						|
void Wheaton(Entity*);
 | 
						|
void Pita(Entity*);
 | 
						|
void MinishEzlo(Entity*);
 | 
						|
void MinishEzlo_Head(Entity*);
 | 
						|
void Mailbox(Entity*);
 | 
						|
void Beedle(Entity*);
 | 
						|
void Beedle_Head(Entity*);
 | 
						|
void Brocco(Entity*);
 | 
						|
void Brocco_Fusion(Entity*);
 | 
						|
void SittingPerson(Entity*);
 | 
						|
void SittingPerson_Head(Entity*);
 | 
						|
void SittingPerson_Fusion(Entity*);
 | 
						|
void Pina(Entity*);
 | 
						|
void Pina_Fusion(Entity*);
 | 
						|
void Din(Entity*);
 | 
						|
void Din_Fusion(Entity*);
 | 
						|
void Nayru(Entity*);
 | 
						|
void Nayru_Fusion(Entity*);
 | 
						|
void Farore(Entity*);
 | 
						|
void Farore_Fusion(Entity*);
 | 
						|
void Sturgeon(Entity*);
 | 
						|
void Sturgeon_Head(Entity*);
 | 
						|
void Sturgeon_Fusion(Entity*);
 | 
						|
void TingleSiblings(Entity*);
 | 
						|
void TingleSiblings_Fusion(Entity*);
 | 
						|
void Stockwell(Entity*);
 | 
						|
void Talon(Entity*);
 | 
						|
void Talon_Head(Entity*);
 | 
						|
void Talon_Fusion(Entity*);
 | 
						|
void Malon(Entity*);
 | 
						|
void Malon_Fusion(Entity*);
 | 
						|
void Epona(Entity*);
 | 
						|
void Epona_Fusion(Entity*);
 | 
						|
void MilkCart(Entity*);
 | 
						|
void GhostBrothers(Entity*);
 | 
						|
void GhostBrothers_Fusion(Entity*);
 | 
						|
void Smith(Entity*);
 | 
						|
void Smith_Head(Entity*);
 | 
						|
void Smith_Fusion(Entity*);
 | 
						|
void NPC23(Entity*);
 | 
						|
void KingDaltus(Entity*);
 | 
						|
void KingDaltus_Fusion(Entity*);
 | 
						|
void MinisterPotho(Entity*);
 | 
						|
void MinisterPotho_Fusion(Entity*);
 | 
						|
void NPC26(Entity*);
 | 
						|
void Vaati(Entity*);
 | 
						|
void Zelda(Entity*);
 | 
						|
void Mutoh(Entity*);
 | 
						|
void Mutoh_Head(Entity*);
 | 
						|
void Mutoh_Fusion(Entity*);
 | 
						|
void Carpenter(Entity*);
 | 
						|
void Carpenter_Head(Entity*);
 | 
						|
void Carpenter_Fusion(Entity*);
 | 
						|
void CastorWildsStatue(Entity*);
 | 
						|
void CastorWildsStatue_Fusion(Entity*);
 | 
						|
void Cat(Entity*);
 | 
						|
void Cat_Fusion(Entity*);
 | 
						|
void MountainMinish(Entity*);
 | 
						|
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_Fusion(Entity*);
 | 
						|
void Cow(Entity*);
 | 
						|
void Cow_Fusion(Entity*);
 | 
						|
void Goron(Entity*);
 | 
						|
void Goron_Fusion(Entity*);
 | 
						|
void GoronMerchant(Entity*);
 | 
						|
void Gorman(Entity*);
 | 
						|
void Gorman_Head(Entity*);
 | 
						|
void Dog(Entity*);
 | 
						|
void Dog_Head(Entity*);
 | 
						|
void Dog_Fusion(Entity*);
 | 
						|
void Syrup(Entity*);
 | 
						|
void Syrup_Head(Entity*);
 | 
						|
void Rem(Entity*);
 | 
						|
void TownMinish(Entity*);
 | 
						|
void TownMinish_Head(Entity*);
 | 
						|
void TownMinish_Fusion(Entity*);
 | 
						|
void Librari(Entity*);
 | 
						|
void Librari_Fusion(Entity*);
 | 
						|
void Percy(Entity*);
 | 
						|
void Percy_Head(Entity*);
 | 
						|
void Percy_Fusion(Entity*);
 | 
						|
void VaatiReborn(Entity*);
 | 
						|
void MoblinLady(Entity*);
 | 
						|
void Librarians(Entity*);
 | 
						|
void Farmers(Entity*);
 | 
						|
void Farmers_Head(Entity*);
 | 
						|
void Farmers_Fusion(Entity*);
 | 
						|
void Carlov(Entity*);
 | 
						|
void Dampe(Entity*);
 | 
						|
void Dampe_Fusion(Entity*);
 | 
						|
void DrLeft(Entity*);
 | 
						|
void KingGustaf(Entity*);
 | 
						|
void Gina(Entity*);
 | 
						|
void Gina_Fusion(Entity*);
 | 
						|
void Simon(Entity*);
 | 
						|
void Anju(Entity*);
 | 
						|
void Anju_Fusion(Entity*);
 | 
						|
void Mama(Entity*);
 | 
						|
void Mama_Head(Entity*);
 | 
						|
void Mama_Fusion(Entity*);
 | 
						|
void Emma(Entity*);
 | 
						|
void Teachers(Entity*);
 | 
						|
void Teachers_Head(Entity*);
 | 
						|
void Teachers_Fusion(Entity*);
 | 
						|
void WindTribespeople(Entity*);
 | 
						|
void WindTribespeople_Head(Entity*);
 | 
						|
void WindTribespeople_Fusion(Entity*);
 | 
						|
void Gregal(Entity*);
 | 
						|
void Gregal_Fusion(Entity*);
 | 
						|
void MayorHagen(Entity*);
 | 
						|
void MayorHagen_Fusion(Entity*);
 | 
						|
void BigGoron(Entity*);
 | 
						|
void Ezlo(Entity*);
 | 
						|
void NPC4E(Entity*);
 | 
						|
void NPC4E_Fusion(Entity*);
 | 
						|
void NPC4F(Entity*);
 | 
						|
void ClothesRack(Entity*);
 | 
						|
void PicolyteBottle(Entity*);
 | 
						|
void SmallTownMinish(Entity*);
 | 
						|
void HurdyGurdyMan(Entity*);
 | 
						|
void HurdyGurdyMan_Head(Entity*);
 | 
						|
void HurdyGurdyMan_Fusion(Entity*);
 | 
						|
void Cucco(Entity*);
 | 
						|
void Cucco_Fusion(Entity*);
 | 
						|
void CuccoChick(Entity*);
 | 
						|
void CuccoChick_Fusion(Entity*);
 | 
						|
void FusionMenuNPC(Entity*);
 | 
						|
void FusionMenuNPC_Head(Entity*);
 | 
						|
void Phonograph(Entity*);
 | 
						|
void NPC58(Entity*);
 | 
						|
void NPC58_Head(Entity*);
 | 
						|
 | 
						|
extern void (*const gNPCFunctions[128][3])(Entity*);
 | 
						|
 | 
						|
#endif
 |