[zret] Port some documentation changes (#1164)

* zret: Documentation pass on scene/room commands #1226

* Update OTR scene

* zret: Document the lens system #1079

* zret: Misc. doc/cleanup 4 #1093

* zret: Fix misc 8 #1150

* zret: Document Distortions from z_camera and z_view #1102
This commit is contained in:
David Chavez 2022-08-17 03:53:28 +02:00 committed by GitHub
commit 6b0338a37d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 898 additions and 833 deletions

View file

@ -202,11 +202,11 @@ typedef struct {
/* 0x00A0 */ Mtx viewing;
/* 0x00E0 */ Mtx* projectionPtr;
/* 0x00E4 */ Mtx* viewingPtr;
/* 0x00E8 */ Vec3f unk_E8;
/* 0x00F4 */ Vec3f unk_F4;
/* 0x0100 */ f32 unk_100;
/* 0x0104 */ Vec3f unk_104;
/* 0x0110 */ Vec3f unk_110;
/* 0x00E8 */ Vec3f distortionOrientation;
/* 0x00F4 */ Vec3f distortionScale;
/* 0x0100 */ f32 distortionSpeed;
/* 0x0104 */ Vec3f curDistortionOrientation;
/* 0x0110 */ Vec3f curDistortionScale;
/* 0x011C */ u16 normal; // used to normalize the projection matrix
/* 0x0120 */ s32 flags;
/* 0x0124 */ s32 unk_124;
@ -273,11 +273,10 @@ typedef struct {
/* 0x0000 */ u8 freezeFlashTimer;
/* 0x0001 */ char unk_01[0x01];
/* 0x0002 */ u8 unk_02;
/* 0x0003 */ u8 unk_03;
/* 0x0003 */ u8 lensActive;
/* 0x0004 */ char unk_04[0x04];
/* 0x0008 */ u8 total; // total number of actors loaded
/* 0x0009 */ char unk_09[0x03];
/* 0x000C */ ActorListEntry actorLists[12];
/* 0x000C */ ActorListEntry actorLists[ACTORCAT_MAX];
/* 0x006C */ TargetContext targetCtx;
struct {
/* 0x0104 */ u32 swch;
@ -890,13 +889,10 @@ void* xluDL;
typedef struct {
/* 0x00 */ u8 type;
/* 0x01 */ u8 num; // number of dlist entries
/* 0x04 */ void* start;
/* 0x08 */ void* end;
} Polygon; // size = 0xC
} PolygonBase;
typedef struct {
/* 0x00 */ u8 type;
/* 0x00 */ PolygonBase base;
/* 0x01 */ u8 num; // number of dlist entries
/* 0x04 */ void* start;
/* 0x08 */ void* end;
@ -917,7 +913,7 @@ typedef struct {
} BgImage; // size = 0x1C
typedef struct {
/* 0x00 */ u8 type;
/* 0x00 */ PolygonBase base;
/* 0x01 */ u8 format; // 1 = single, 2 = multi
/* 0x04 */ Gfx* dlist;
union {
@ -955,27 +951,51 @@ typedef struct {
} PolygonDlist2; // size = 0x8
typedef struct {
/* 0x00 */ u8 type;
/* 0x00 */ PolygonBase base;
/* 0x01 */ u8 num; // number of dlist entries
/* 0x04 */ void* start;
/* 0x08 */ void* end;
} PolygonType2; // size = 0xC
typedef union {
Polygon polygon;
PolygonBase base;
PolygonType0 polygon0;
PolygonType1 polygon1;
PolygonType2 polygon2;
} Mesh; // "Ground Shape"
} MeshHeader; // "Ground Shape"
typedef enum {
/* 0 */ LENS_MODE_HIDE_ACTORS, // lens actors are visible by default, and hidden by using lens (for example, fake walls)
/* 1 */ LENS_MODE_SHOW_ACTORS // lens actors are invisible by default, and shown by using lens (for example, invisible enemies)
} LensMode;
typedef enum {
/* 0 */ ROOM_BEHAVIOR_TYPE1_0,
/* 1 */ ROOM_BEHAVIOR_TYPE1_1,
/* 2 */ ROOM_BEHAVIOR_TYPE1_2,
/* 3 */ ROOM_BEHAVIOR_TYPE1_3, // unused
/* 4 */ ROOM_BEHAVIOR_TYPE1_4, // unused
/* 5 */ ROOM_BEHAVIOR_TYPE1_5
} RoomBehaviorType1;
typedef enum {
/* 0 */ ROOM_BEHAVIOR_TYPE2_0,
/* 1 */ ROOM_BEHAVIOR_TYPE2_1,
/* 2 */ ROOM_BEHAVIOR_TYPE2_2,
/* 3 */ ROOM_BEHAVIOR_TYPE2_3,
/* 4 */ ROOM_BEHAVIOR_TYPE2_4,
/* 5 */ ROOM_BEHAVIOR_TYPE2_5,
/* 6 */ ROOM_BEHAVIOR_TYPE2_6
} RoomBehaviorType2;
typedef struct {
/* 0x00 */ s8 num;
/* 0x01 */ u8 unk_01;
/* 0x02 */ u8 unk_02;
/* 0x03 */ u8 unk_03;
/* 0x02 */ u8 behaviorType2;
/* 0x03 */ u8 behaviorType1;
/* 0x04 */ s8 echo;
/* 0x05 */ u8 showInvisActors;
/* 0x08 */ Mesh* mesh; // original name: "ground_shape"
/* 0x05 */ u8 lensMode;
/* 0x08 */ MeshHeader* meshHeader; // original name: "ground_shape"
/* 0x0C */ void* segment;
/* 0x10 */ char unk_10[0x4];
} Room; // size = 0x14
@ -1244,7 +1264,7 @@ typedef struct GlobalContext {
/* 0x11DF0 */ RomFile* roomList;
/* 0x11DF4 */ ActorEntry* linkActorEntry;
/* 0x11DF8 */ ActorEntry* setupActorList;
/* 0x11DFC */ UNK_PTR unk_11DFC;
/* 0x11DFC */ void* unk_11DFC;
/* 0x11E00 */ EntranceEntry* setupEntranceList;
/* 0x11E04 */ s16* setupExitList;
/* 0x11E08 */ Path* setupPathList;