1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-24 16:01:26 +00:00

Big cleanup (#775)

* Adult and child2 macros OK

* ICHAIN cleanup

* almost all overlay data

* format.sh

* func_8002FBAC NON_EQUIVALENT

* PR fixes (MZXrules)

* fix

* change //@ bug to //! @bug

* merge master and missed a //@bug

* fix ruto

* some more cleanup (#2)

* more `! @bug` formatting cleanup

* parenthesis cleanup

* hex naviEnemyId

* run formatter

* replace `IS_NOT_` macros with `!IS_`

* run formatter

* run formatter

* PR fixes (fig)

* Missed something

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
louist103 2021-08-21 19:12:57 -04:00 committed by GitHub
parent 17c79a8f60
commit 556cdad7eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
177 changed files with 902 additions and 862 deletions

View file

@ -114,13 +114,13 @@ u16 func_80A79010(GlobalContext* globalCtx) {
return temp_v0;
}
if (gSaveContext.eventChkInf[1] & 0x100) {
if (gSaveContext.nightFlag == 0) {
if (IS_DAY) {
return 0x205F;
} else {
return 0x2057;
}
}
if (gSaveContext.nightFlag == 1) {
if (IS_NIGHT) {
return 0x204E;
}
switch (gSaveContext.eventInf[0] & 0xF) {
@ -165,7 +165,7 @@ u16 func_80A79168(GlobalContext* globalCtx, Actor* thisx) {
if (temp_v0 != 0) {
return temp_v0;
}
if (LINK_IS_CHILD) {
if (!LINK_IS_ADULT) {
return func_80A78FB0(globalCtx);
} else {
return func_80A79010(globalCtx);
@ -331,7 +331,7 @@ void func_80A796EC(EnIn* this, s32 arg1) {
}
s32 func_80A7975C(EnIn* this, GlobalContext* globalCtx) {
if (this->actor.params != 1 || this->actor.shape.rot.z != 1 || LINK_IS_CHILD) {
if (this->actor.params != 1 || this->actor.shape.rot.z != 1 || !LINK_IS_ADULT) {
return 0;
}
this->animationIdx = 1;
@ -343,15 +343,15 @@ s32 func_80A7975C(EnIn* this, GlobalContext* globalCtx) {
}
s32 func_80A79830(EnIn* this, GlobalContext* globalCtx) {
if (globalCtx->sceneNum == SCENE_SPOT20 && gSaveContext.linkAge == 1 && (gSaveContext.nightFlag == 0) &&
this->actor.shape.rot.z == 1 && !(gSaveContext.eventChkInf[1] & 0x10)) {
if (globalCtx->sceneNum == SCENE_SPOT20 && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 1 &&
!(gSaveContext.eventChkInf[1] & 0x10)) {
return 1;
}
if (globalCtx->sceneNum == SCENE_MALON_STABLE && gSaveContext.linkAge == 1 && (gSaveContext.nightFlag == 0) &&
this->actor.shape.rot.z == 3 && (gSaveContext.eventChkInf[1] & 0x10)) {
if (globalCtx->sceneNum == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 3 &&
(gSaveContext.eventChkInf[1] & 0x10)) {
return 1;
}
if (globalCtx->sceneNum == SCENE_MALON_STABLE && gSaveContext.linkAge == 1 && gSaveContext.nightFlag == 1) {
if (globalCtx->sceneNum == SCENE_MALON_STABLE && LINK_IS_CHILD && IS_NIGHT) {
if ((this->actor.shape.rot.z == 2) && !(gSaveContext.eventChkInf[1] & 0x10)) {
return 1;
}
@ -359,7 +359,7 @@ s32 func_80A79830(EnIn* this, GlobalContext* globalCtx) {
return 1;
}
}
if (globalCtx->sceneNum == SCENE_SPOT20 && LINK_IS_ADULT && (gSaveContext.nightFlag == 0)) {
if (globalCtx->sceneNum == SCENE_SPOT20 && LINK_IS_ADULT && IS_DAY) {
if ((this->actor.shape.rot.z == 5) && !(gSaveContext.eventChkInf[1] & 0x100)) {
return 2;
}
@ -367,7 +367,7 @@ s32 func_80A79830(EnIn* this, GlobalContext* globalCtx) {
return 4;
}
}
if (globalCtx->sceneNum == SCENE_SOUKO && LINK_IS_ADULT && gSaveContext.nightFlag == 1) {
if (globalCtx->sceneNum == SCENE_SOUKO && LINK_IS_ADULT && IS_NIGHT) {
if (this->actor.shape.rot.z == 6 && !(gSaveContext.eventChkInf[1] & 0x100)) {
return 3;
}
@ -461,7 +461,7 @@ void func_80A79C78(EnIn* this, GlobalContext* globalCtx) {
Interface_ChangeAlpha(2);
}
s32 D_80A7B998 = 0;
static s32 D_80A7B998 = 0;
void EnIn_Init(Actor* thisx, GlobalContext* globalCtx) {
EnIn* this = THIS;