1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 14:20:11 +00:00

ovl_En_In OK (#545)

* Initial progress

* Further progress

* One nonmatching left

* Fix merge

* OK

* Cleanup

* Remove unused asm

* Use generated reloc

* nightFlag changes and requiredObject -> objectIdx

* Some suggestions

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Revert nightflag changes, early return after Actor_Kill, objectIdx -> ingoObjBankIndex

* Fix accidental nightFlag change in z_sram

Co-authored-by: Thar0 <maximilianc64@gmail.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
Tharo 2021-01-04 19:52:36 +00:00 committed by GitHub
parent 8cd367c43b
commit 510b3c4bd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 959 additions and 3075 deletions

View file

@ -121,13 +121,13 @@ void EnHeishi1_Init(Actor* thisx, GlobalContext* globalCtx) {
}
if (this->type != 5) {
if (((gSaveContext.dayTime < 0xB888) || (!gSaveContext.nightFlag)) && !(gSaveContext.eventChkInf[8] & 1)) {
if (((gSaveContext.dayTime < 0xB888) || (gSaveContext.nightFlag == 0)) && !(gSaveContext.eventChkInf[8] & 1)) {
this->actionFunc = EnHeishi1_SetupWalk;
} else {
Actor_Kill(&this->actor);
}
} else {
if ((gSaveContext.dayTime >= 0xB889) || (gSaveContext.nightFlag) || (gSaveContext.eventChkInf[8] & 1)) {
if ((gSaveContext.dayTime >= 0xB889) || (gSaveContext.nightFlag != 0) || (gSaveContext.eventChkInf[8] & 1)) {
this->actionFunc = EnHeishi1_SetupWaitNight;
} else {
Actor_Kill(&this->actor);

View file

@ -186,7 +186,7 @@ void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx) {
this->unk_300 = 6;
this->actor.textId = 0x7006; // "There's a lot going on in the castle right now. I can't allow even..."
this->actionFunc = func_80A5475C;
} else if (gSaveContext.nightFlag) {
} else if (gSaveContext.nightFlag != 0) {
// "Sleep early for children!"
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 子供ははやくネロ! ☆☆☆☆☆ \n" VT_RST);
this->unk_300 = 6;

View file

@ -137,7 +137,7 @@ void func_80A563BC(EnHeishi4* this, GlobalContext* globalCtx) {
} else {
this->actor.textId = 0x507A;
}
} else if (!gSaveContext.nightFlag) {
} else if (gSaveContext.nightFlag == 0) {
if (this->unk_284 == 0) {
this->actor.textId = 0x5063;
} else {
@ -189,7 +189,7 @@ void func_80A56614(EnHeishi4* this, GlobalContext* globalCtx) {
this->actor.textId = 0x709A;
}
} else if (globalCtx->sceneNum != SCENE_MARKET_NIGHT) {
if (!gSaveContext.nightFlag) {
if (gSaveContext.nightFlag == 0) {
this->actor.textId = 0x7002;
} else {
this->actor.textId = 0x7003;

View file

@ -9,7 +9,9 @@ struct EnHorse;
typedef struct EnHorse {
/* 0x000 */ Actor actor;
/* 0x014C */ s32 unk_14C;
/* 0x0150 */ char unk_150[0x0A0];
/* 0x0150 */ char unk_150[0x008];
/* 0x0150 */ s32 unk_158;
/* 0x0150 */ char unk_15C[0x094];
/* 0x01F0 */ u32 unk_1F0;
/* 0x01F4 */ char unk_1F4[0x01C];
/* 0x0210 */ s32 unk_210;

View file

@ -204,7 +204,7 @@ void EnHorseNormal_Init(Actor* thisx, GlobalContext* globalCtx) {
return;
}
} else if (globalCtx->sceneNum == SCENE_MALON_STABLE) {
if (!gSaveContext.nightFlag) {
if (gSaveContext.nightFlag == 0) {
Actor_Kill(&this->actor);
return;
} else {

File diff suppressed because it is too large Load diff

View file

@ -6,9 +6,36 @@
struct EnIn;
typedef void (*EnInActionFunc)(struct EnIn*, GlobalContext*);
typedef struct EnIn {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x25C];
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ EnInActionFunc actionFunc;
/* 0x0194 */ ColliderCylinder collider;
/* 0x01E0 */ f32 unk_1E0;
/* 0x01E4 */ s8 ingoObjBankIndex;
/* 0x01E6 */ s16 unk_1E6;
/* 0x01E6 */ s16 unk_1E8;
/* 0x01EA */ s16 unk_1EA;
/* 0x01EC */ s16 unk_1EC;
/* 0x01EE */ s16 unk_1EE;
/* 0x01F0 */ s16 camId;
/* 0x01F2 */ s16 activeCamId;
/* 0x01F4 */ char unk_1F4[0x4];
/* 0x01F8 */ s16 unk_1F8;
/* 0x01FA */ s16 unk_1FA;
/* 0x01FC */ s16 unk_1FC;
/* 0x01FE */ Vec3s jointTable[20];
/* 0x0276 */ Vec3s morphTable[20];
/* 0x02F0 */ f32 unk_2F0;
/* 0x02F4 */ f32 unk_2F4;
/* 0x02F8 */ f32 unk_2F8;
/* 0x02FC */ f32 unk_2FC;
/* 0x0300 */ f32 unk_300;
/* 0x0304 */ f32 unk_304;
/* 0x0308 */ struct_80034A14_arg1 unk_308;
/* 0x0330 */ Vec3s unk_330[20];
} EnIn; // size = 0x03A8
extern const ActorInit En_In_InitVars;

View file

@ -160,7 +160,7 @@ void EnNiw_Init(Actor* thisx, GlobalContext* globalCtx) {
switch (this->actor.params) {
case 2:
if (!gSaveContext.nightFlag) {
if (gSaveContext.nightFlag == 0) {
Actor_Kill(&this->actor);
}
break;

View file

@ -188,7 +188,7 @@ void EnTa_Init(Actor* thisx, GlobalContext* globalCtx) {
} else if (LINK_IS_ADULT) {
Actor_Kill(&this->actor);
} else {
if (!gSaveContext.nightFlag) {
if (gSaveContext.nightFlag == 0) {
this->actor.flags |= 0x10;
this->unk_2C4[0] = this->unk_2C4[1] = this->unk_2C4[2] = 7;
this->unk_2B8[0] = (EnNiw*)Actor_Spawn(