mirror of https://github.com/zeldaret/tmc.git
Merge pull request #340 from hatal175/npcenum
This commit is contained in:
commit
b455aaf013
|
@ -165,7 +165,7 @@ void sub_0806D274(Entity* this) {
|
||||||
this->frameIndex = 2;
|
this->frameIndex = 2;
|
||||||
this->actionDelay = 8;
|
this->actionDelay = 8;
|
||||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||||
npc = CreateNPC(0x4c, 3, 0);
|
npc = CreateNPC(BIG_GORON, 3, 0);
|
||||||
if (npc != NULL) {
|
if (npc != NULL) {
|
||||||
npc->child = this;
|
npc->child = this;
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ void sub_0806D41C(Entity* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_0806D4C0(Entity* this, u32 param) {
|
void sub_0806D4C0(Entity* this, u32 param) {
|
||||||
Entity* npc = CreateNPC(0x4c, param + 6, 0);
|
Entity* npc = CreateNPC(BIG_GORON, param + 6, 0);
|
||||||
if (npc != NULL) {
|
if (npc != NULL) {
|
||||||
npc->parent = this;
|
npc->parent = this;
|
||||||
CopyPosition(this, npc);
|
CopyPosition(this, npc);
|
||||||
|
|
|
@ -18,13 +18,13 @@ void sub_0806CAF4(Entity* this) {
|
||||||
if (this->action == 0) {
|
if (this->action == 0) {
|
||||||
this->action += 1;
|
this->action += 1;
|
||||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||||
npc = CreateNPC(0x4a, 1, 0);
|
npc = CreateNPC(GREGAL, 1, 0);
|
||||||
if (npc != NULL) {
|
if (npc != NULL) {
|
||||||
npc->parent = this;
|
npc->parent = this;
|
||||||
CopyPosition(this, npc);
|
CopyPosition(this, npc);
|
||||||
SortEntityBelow(this, npc);
|
SortEntityBelow(this, npc);
|
||||||
}
|
}
|
||||||
npc = CreateNPC(0x4a, 2, 0);
|
npc = CreateNPC(GREGAL, 2, 0);
|
||||||
if (npc != NULL) {
|
if (npc != NULL) {
|
||||||
npc->parent = this;
|
npc->parent = this;
|
||||||
CopyPosition(this, npc);
|
CopyPosition(this, npc);
|
||||||
|
|
|
@ -82,7 +82,7 @@ extern u16* gUnk_0810B660[8];
|
||||||
void CreateZeldaFollower(void) {
|
void CreateZeldaFollower(void) {
|
||||||
Entity* npc;
|
Entity* npc;
|
||||||
if (CheckGlobalFlag(0x1c) != 0) {
|
if (CheckGlobalFlag(0x1c) != 0) {
|
||||||
npc = CreateNPC(0x2e, 0, 0);
|
npc = CreateNPC(ZELDA_FOLLOWER, 0, 0);
|
||||||
if (npc != NULL) {
|
if (npc != NULL) {
|
||||||
CopyPosition(&gPlayerEntity, npc);
|
CopyPosition(&gPlayerEntity, npc);
|
||||||
npc->flags |= ENT_PERSIST;
|
npc->flags |= ENT_PERSIST;
|
||||||
|
@ -150,7 +150,7 @@ void sub_08060AE0(Entity* this) {
|
||||||
this->field_0x17 &= 0xfe;
|
this->field_0x17 &= 0xfe;
|
||||||
this->field_0x6c.HALF.LO = 0xff;
|
this->field_0x6c.HALF.LO = 0xff;
|
||||||
sub_08060E70(this, this->animationState);
|
sub_08060E70(this, this->animationState);
|
||||||
otherNpc = CreateNPC(5, 2, 0);
|
otherNpc = CreateNPC(NPC_UNK_5, 2, 0);
|
||||||
if (otherNpc != NULL) {
|
if (otherNpc != NULL) {
|
||||||
otherNpc->parent = this;
|
otherNpc->parent = this;
|
||||||
*(Entity**)&this->field_0x78 = otherNpc;
|
*(Entity**)&this->field_0x78 = otherNpc;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "object.h"
|
#include "object.h"
|
||||||
|
#include "npc.h"
|
||||||
|
|
||||||
extern ScreenTransitionData gUnk_0813AD4C;
|
extern ScreenTransitionData gUnk_0813AD4C;
|
||||||
|
|
||||||
|
@ -28,13 +29,13 @@ void sub_0806DF00(Entity* this) {
|
||||||
|
|
||||||
if (this->type == 0) {
|
if (this->type == 0) {
|
||||||
this->action = 1;
|
this->action = 1;
|
||||||
npc = CreateNPC(0x51, 1, 0);
|
npc = CreateNPC(PICOLYTE_BOTTLE, 1, 0);
|
||||||
*(Entity**)&this->field_0x68 = npc;
|
*(Entity**)&this->field_0x68 = npc;
|
||||||
npc->parent = this;
|
npc->parent = this;
|
||||||
npc = CreateNPC(0x51, 1, 1);
|
npc = CreateNPC(PICOLYTE_BOTTLE, 1, 1);
|
||||||
*(Entity**)&this->field_0x6c = npc;
|
*(Entity**)&this->field_0x6c = npc;
|
||||||
npc->parent = this;
|
npc->parent = this;
|
||||||
npc = CreateNPC(0x51, 1, 2);
|
npc = CreateNPC(PICOLYTE_BOTTLE, 1, 2);
|
||||||
*(Entity**)&this->field_0x70 = npc;
|
*(Entity**)&this->field_0x70 = npc;
|
||||||
npc->parent = this;
|
npc->parent = this;
|
||||||
this->field_0x74.HWORD = 0;
|
this->field_0x74.HWORD = 0;
|
||||||
|
|
|
@ -198,7 +198,7 @@ void sub_0806A830(Entity* this) {
|
||||||
GetNextFrame(this);
|
GetNextFrame(this);
|
||||||
if (this->frame == 1) {
|
if (this->frame == 1) {
|
||||||
this->frame = 0;
|
this->frame = 0;
|
||||||
npc = CreateNPC(0x37, 5, 0);
|
npc = CreateNPC(REM, 5, 0);
|
||||||
if (npc != NULL) {
|
if (npc != NULL) {
|
||||||
PositionEntityOnTop(this, npc);
|
PositionEntityOnTop(this, npc);
|
||||||
}
|
}
|
||||||
|
@ -219,11 +219,11 @@ void sub_0806A890(Entity* this) {
|
||||||
|
|
||||||
void sub_0806A8C8(Entity* this) {
|
void sub_0806A8C8(Entity* this) {
|
||||||
Entity* entity;
|
Entity* entity;
|
||||||
if ((CheckLocalFlag(SHOP02_KUTSU_00) == 0) && (entity = CreateNPC(0x37, 2, 0), entity != NULL)) {
|
if ((CheckLocalFlag(SHOP02_KUTSU_00) == 0) && (entity = CreateNPC(REM, 2, 0), entity != NULL)) {
|
||||||
CopyPosition(this, entity);
|
CopyPosition(this, entity);
|
||||||
entity->parent = this;
|
entity->parent = this;
|
||||||
}
|
}
|
||||||
entity = CreateNPC(0x37, 3, 0);
|
entity = CreateNPC(REM, 3, 0);
|
||||||
if (entity != NULL) {
|
if (entity != NULL) {
|
||||||
CopyPosition(this, entity);
|
CopyPosition(this, entity);
|
||||||
entity->y.HALF.HI += 2;
|
entity->y.HALF.HI += 2;
|
||||||
|
@ -232,7 +232,7 @@ void sub_0806A8C8(Entity* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_0806A914(Entity* this) {
|
void sub_0806A914(Entity* this) {
|
||||||
Entity* npc = CreateNPC(0x37, 1, 0);
|
Entity* npc = CreateNPC(REM, 1, 0);
|
||||||
if (npc != NULL) {
|
if (npc != NULL) {
|
||||||
CopyPosition(this, npc);
|
CopyPosition(this, npc);
|
||||||
SortEntityAbove(this, npc);
|
SortEntityAbove(this, npc);
|
||||||
|
@ -276,7 +276,7 @@ void sub_0806A9B0(Entity* this, ScriptExecutionContext* context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_0806A9E8(Entity* this) {
|
void sub_0806A9E8(Entity* this) {
|
||||||
Entity* npc = CreateNPC(0x37, 4, 0);
|
Entity* npc = CreateNPC(REM, 4, 0);
|
||||||
if (npc != NULL) {
|
if (npc != NULL) {
|
||||||
CopyPosition(this, npc);
|
CopyPosition(this, npc);
|
||||||
SortEntityBelow(this, npc);
|
SortEntityBelow(this, npc);
|
||||||
|
|
|
@ -70,7 +70,7 @@ void sub_08066D94(Entity* this) {
|
||||||
Entity* npc;
|
Entity* npc;
|
||||||
|
|
||||||
SetGlobalFlag(ZELDA_CHASE);
|
SetGlobalFlag(ZELDA_CHASE);
|
||||||
npc = CreateNPC(0x2E, 0, 0);
|
npc = CreateNPC(ZELDA_FOLLOWER, 0, 0);
|
||||||
if (npc != NULL) {
|
if (npc != NULL) {
|
||||||
npc->animationState = gPlayerEntity.animationState;
|
npc->animationState = gPlayerEntity.animationState;
|
||||||
npc->flags |= ENT_PERSIST;
|
npc->flags |= ENT_PERSIST;
|
||||||
|
|
|
@ -28,7 +28,7 @@ static void sub_0806EF4C(Entity*, u16*);
|
||||||
static u32 sub_0806EF74(Entity*, u32);
|
static u32 sub_0806EF74(Entity*, u32);
|
||||||
|
|
||||||
void sub_0806EC20(Entity* ent) {
|
void sub_0806EC20(Entity* ent) {
|
||||||
Entity* e = CreateNPC(0x58, 0, 0);
|
Entity* e = CreateNPC(NPC_UNK_58, 0, 0);
|
||||||
if (e != NULL) {
|
if (e != NULL) {
|
||||||
e->parent = ent;
|
e->parent = ent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue