mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-13 06:58:03 -05:00
Merge branch 'get-item-rework-help1' of github.com:garrettjoecox/Shipwright into pr/garrettjoecox/2
This commit is contained in:
commit
38363fb015
@ -671,10 +671,15 @@ void func_8001E304(EnItem00* this, GlobalContext* globalCtx) {
|
||||
|
||||
void func_8001E5C8(EnItem00* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
GetItemEntry getItemEntry = Randomizer_GetRandomizedItem(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
|
||||
if (this->getItemId != GI_NONE) {
|
||||
if (!Actor_HasParent(&this->actor, globalCtx)) {
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 50.0f, 80.0f);
|
||||
if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, globalCtx, getItemEntry.getItemId, 50.0f, 80.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 50.0f, 80.0f);
|
||||
}
|
||||
this->unk_15A++;
|
||||
} else {
|
||||
this->getItemId = GI_NONE;
|
||||
|
@ -288,6 +288,7 @@ void EnGo2_GetItem(EnGo2* this, GlobalContext* globalCtx, s32 getItemId) {
|
||||
|
||||
void EnGo2_GetItemEntry(EnGo2* this, GlobalContext* globalCtx, GetItemEntry getItemEntry) {
|
||||
this->getItemId = getItemEntry.getItemId;
|
||||
this->getItemEntry = getItemEntry;
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, this->actor.xzDistToPlayer + 1.0f,
|
||||
fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
}
|
||||
@ -1572,6 +1573,7 @@ void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->unk_216 = this->actor.shape.rot.z;
|
||||
this->unk_26E = 1;
|
||||
this->path = Path_GetByIndex(globalCtx, (this->actor.params & 0x3E0) >> 5, 0x1F);
|
||||
this->getItemEntry = (GetItemEntry)GET_ITEM_NONE;
|
||||
switch (this->actor.params & 0x1F) {
|
||||
case GORON_CITY_ENTRANCE:
|
||||
case GORON_CITY_ISLAND:
|
||||
@ -1811,8 +1813,11 @@ void EnGo2_SetupGetItem(EnGo2* this, GlobalContext* globalCtx) {
|
||||
this->actor.parent = NULL;
|
||||
this->actionFunc = EnGo2_SetGetItem;
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, this->actor.xzDistToPlayer + 1.0f,
|
||||
fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, globalCtx, this->getItemId, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, this->getItemEntry, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,6 +104,7 @@ typedef struct EnGo2 {
|
||||
/* 0x0598 */ char unk_598[0x02];
|
||||
/* 0x059A */ s16 camId;
|
||||
/* 0x059C */ s16 unk_59C;
|
||||
/* */ GetItemEntry getItemEntry;
|
||||
} EnGo2; // size = 0x05A0
|
||||
|
||||
#endif
|
||||
|
@ -665,10 +665,10 @@ s16 func_80A70058(GlobalContext* globalCtx, Actor* thisx) {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_80A6F7CC(this, globalCtx, GI_HEART_PIECE);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_LOST_DOG, GI_HEART_PIECE);
|
||||
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_LOST_DOG, GI_HEART_PIECE);
|
||||
// The follownig line and last arguments of GiveItemEntryFromActor are copied from func_80A6F7CC
|
||||
this->unkGetItemId = getItemEntry.getItemId;
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
this->unkGetItemId = this->getItemEntry.getItemId;
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, this->getItemEntry, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
}
|
||||
}
|
||||
this->actionFunc = func_80A714C4;
|
||||
@ -894,6 +894,7 @@ void EnHy_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
||||
this->getItemEntry = (GetItemEntry)GET_ITEM_NONE;
|
||||
this->actionFunc = EnHy_InitImpl;
|
||||
}
|
||||
|
||||
@ -1061,8 +1062,11 @@ void func_80A714C4(EnHy* this, GlobalContext* globalCtx) {
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
this->actionFunc = func_80A71530;
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, this->unkGetItemId, this->actor.xzDistToPlayer + 1.0f,
|
||||
fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
|
||||
func_8002F434(&this->actor, globalCtx, this->unkGetItemId, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
} else {
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, this->getItemEntry, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,6 +59,7 @@ typedef struct EnHy {
|
||||
/* 0x0270 */ Vec3s jointTable[16];
|
||||
/* 0x02D0 */ Vec3s morphTable[16];
|
||||
/* 0x0330 */ u16 unk_330;
|
||||
/* */ GetItemEntry getItemEntry;
|
||||
} EnHy; // size = 0x0334
|
||||
|
||||
#endif
|
||||
|
@ -876,7 +876,12 @@ void func_80B15E80(EnTa* this, GlobalContext* globalCtx) {
|
||||
} else if (this->unk_2E0 & 2) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_MILK, 10000.0f, 50.0f);
|
||||
} else {
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
func_8002F434(&this->actor, globalCtx, GI_MILK_BOTTLE, 10000.0f, 50.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LLR_TALONS_CHICKENS, GI_MILK_BOTTLE);
|
||||
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 10000.0f, 50.0f);
|
||||
}
|
||||
}
|
||||
this->unk_2E0 |= 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user