1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 14:31:17 +00:00

Document Culling (#2318)

* document culling

* format

* depth -> distance

* format

* var name

* new graph link

* rephrase actor flags

* tharo's comments + some more tweaks

* is this causing the problem?

* change wording

* cant scope the temp

* format

* dragorn review

* bad merge

* player -> camera in descriptions

* more its

* cadmic review

* goddamn it why do i have that habit

* projected
This commit is contained in:
fig02 2024-12-13 08:12:52 -05:00 committed by GitHub
parent a897017af5
commit 016aef482b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
371 changed files with 1015 additions and 850 deletions

View file

@ -9,7 +9,7 @@
#include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h"
#include "assets/objects/object_lightswitch/object_lightswitch.h"
#define FLAGS ACTOR_FLAG_4
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef enum FaceTextureIndex {
/* 0x00 */ FACE_EYES_CLOSED,
@ -83,9 +83,9 @@ static Vec3f D_80B97F74 = { 0.0f, 0.0f, 0.0f };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void ObjLightswitch_InitCollider(ObjLightswitch* this, PlayState* play) {
@ -184,7 +184,7 @@ void ObjLightswitch_Init(Actor* thisx, PlayState* play) {
this->actor.shape.rot.z = 0;
this->actor.world.rot.x = this->actor.home.rot.x = this->actor.shape.rot.x;
this->actor.world.rot.z = this->actor.home.rot.z = this->actor.shape.rot.z;
this->actor.flags |= ACTOR_FLAG_5;
this->actor.flags |= ACTOR_FLAG_DRAW_CULLING_DISABLED;
if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_OBJ_OSHIHIKI, this->actor.home.pos.x,
this->actor.home.pos.y, this->actor.home.pos.z, 0, this->actor.home.rot.y, 0,
(0xFF << 8) | PUSHBLOCK_SMALL_START_ON) == NULL) {