mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-02 11:35:58 -04:00
ovl_En_Door docs pass (#1603)
* DoorScheduleResult * actionVar * DOOR_DL_ * enums * ENDOOR_TYPE_SCHEDULE and related stuff * Name some functions and start figuring out stuff * defines * start documenting schedules * Name Inn doors * More door schedule naming * ajar * Name remaining schedule types * parameters diagram and some cleanups * Name renaiming types * format * rename some schedules * Use more static_assert * name anims * yeet unrelated stuff * requestOpen * Yeet DoorScheduleResult * whoops * stuff i missed * Update src/overlays/actors/ovl_En_Door/scheduleScripts.schl Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/overlays/actors/ovl_En_Door/z_en_door.h Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/overlays/actors/ovl_En_Door/z_en_door.h Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review * Update src/overlays/actors/ovl_En_Pm/z_en_pm.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/code/z_sub_s.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review * FindScheduleDoor --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
+2
-1
@@ -30,6 +30,7 @@ struct Actor* D_801ED920; // 2 funcs. 1 out of z_actor
|
||||
|
||||
#include "z64actor.h"
|
||||
|
||||
#include "z64door.h"
|
||||
#include "z64circle_tex.h"
|
||||
#include "z64horse.h"
|
||||
#include "z64malloc.h"
|
||||
@@ -3428,7 +3429,7 @@ void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx) {
|
||||
if (Actor_SpawnAsChildAndCutscene(actorCtx, play, transitionActorList->id & 0x1FFF,
|
||||
transitionActorList->pos.x, transitionActorList->pos.y,
|
||||
transitionActorList->pos.z, 0, rotY, 0,
|
||||
(i << 0xA) + (transitionActorList->params & 0x3FF),
|
||||
TRANSITION_ACTOR_PARAMS(i, transitionActorList->params),
|
||||
transitionActorList->rotY & 0x7F, HALFDAYBIT_ALL, 0) != NULL) {
|
||||
transitionActorList->id = -transitionActorList->id;
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ void func_800F0BB4(EnHy* enHy, PlayState* play, EnDoor* door, s16 arg3, s16 arg4
|
||||
enHy->skelAnime.prevTransl = enHy->skelAnime.jointTable[LIMB_ROOT_POS];
|
||||
enHy->skelAnime.moveFlags |= (ANIM_FLAG_UPDATE_Y | ANIM_FLAG_1);
|
||||
AnimationContext_SetMoveActor(play, &enHy->actor, &enHy->skelAnime, 1.0f);
|
||||
door->knobDoor.playOpenAnim = true;
|
||||
door->knobDoor.requestOpen = true;
|
||||
door->knobDoor.animIndex = animIndex;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ s32 Object_GetSlot(ObjectContext* objectCtx, s16 objectId) {
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
return OBJECT_SLOT_NONE;
|
||||
}
|
||||
|
||||
s32 Object_IsLoaded(ObjectContext* objectCtx, s32 slot) {
|
||||
|
||||
+4
-3
@@ -15,9 +15,10 @@ Vec3f gOneVec3f = { 1.0f, 1.0f, 1.0f };
|
||||
s32 D_801C5DBC[] = { 0, 1 }; // Unused
|
||||
|
||||
/**
|
||||
* Finds the first EnDoor instance with doorType == ENDOOR_TYPE_5 and the specified switchFlag.
|
||||
* Finds the first EnDoor instance of type `ENDOOR_TYPE_SCHEDULE` and the specified schType (a value from the
|
||||
* EnDoorScheduleType enum).
|
||||
*/
|
||||
EnDoor* SubS_FindDoor(PlayState* play, s32 switchFlag) {
|
||||
EnDoor* SubS_FindScheduleDoor(PlayState* play, s32 schType) {
|
||||
Actor* actor = NULL;
|
||||
EnDoor* door;
|
||||
|
||||
@@ -29,7 +30,7 @@ EnDoor* SubS_FindDoor(PlayState* play, s32 switchFlag) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((door->doorType == ENDOOR_TYPE_5) && (door->switchFlag == (u8)switchFlag)) {
|
||||
if ((door->doorType == ENDOOR_TYPE_SCHEDULE) && (door->typeVar.schType == (u8)schType)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -299,13 +299,13 @@ s32 View_StepDistortion(View* view, Mtx* projectionMtx) {
|
||||
/**
|
||||
* Apply view to POLY_OPA_DISP, POLY_XLU_DISP (and OVERLAY_DISP if ortho)
|
||||
*/
|
||||
void View_Apply(View* view, s32 mask) {
|
||||
s32 View_Apply(View* view, s32 mask) {
|
||||
mask = (view->flags & mask) | (mask >> 4);
|
||||
|
||||
if (mask & VIEW_PROJECTION_ORTHO) {
|
||||
View_ApplyOrtho(view);
|
||||
return View_ApplyOrtho(view);
|
||||
} else {
|
||||
View_ApplyPerspective(view);
|
||||
return View_ApplyPerspective(view);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user