diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2024-09-18 14:11:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-18 08:11:21 -0400 |
| commit | dc2ceb33f31fd26aa35f5fddbda0eeedd3297bb3 (patch) | |
| tree | 5b006bd82b7b20edc64bf8d585adf1661677fdcf /include | |
| parent | 306abef46b9af0cc17b2e2a049df9ff2acd5e9a4 (diff) | |
Pause doc: Pages drawing (#2190)
* name main fields and regs for pages drawing
* comments
* format
* more comments
* roll -> pitch (oops)
* Document `PauseContext.offsetY`, `R_PAUSE_OFFSET_VERTICAL` as "y origin 1/2"
* copypaste comment on page pitches fields
* "offset depth" -> "depth offset"
* review
Diffstat (limited to 'include')
| -rw-r--r-- | include/regs.h | 2 | ||||
| -rw-r--r-- | include/z64pause.h | 19 |
2 files changed, 14 insertions, 7 deletions
diff --git a/include/regs.h b/include/regs.h index 8abc2e3f0..b5c39ea63 100644 --- a/include/regs.h +++ b/include/regs.h @@ -183,6 +183,8 @@ #define R_ROOM_CULL_USED_ENTRIES iREG(88) #define R_ROOM_CULL_DEBUG_TARGET iREG(89) #define R_B_LABEL_DD WREG(0) +#define R_PAUSE_PAGES_Y_ORIGIN_2 WREG(2) // Complements PauseContext.pagesYOrigin1 +#define R_PAUSE_DEPTH_OFFSET WREG(3) // Offset position of all pages away from the camera #if OOT_NTSC #define R_B_LABEL_SCALE(i) WREG(8 + (i)) #define R_B_LABEL_X(i) WREG(10 + (i)) diff --git a/include/z64pause.h b/include/z64pause.h index c9485a1e2..4f17e7031 100644 --- a/include/z64pause.h +++ b/include/z64pause.h @@ -141,6 +141,11 @@ typedef enum WorldMapPointState { /* 2 */ WORLD_MAP_POINT_STATE_HIGHLIGHT } WorldMapPointState; +// Values for PauseContext.pagesYOrigin1 and R_PAUSE_PAGES_Y_ORIGIN_2 respectively, +// that make the pause pages rotate around their lower edge instead of the middle. +#define PAUSE_PAGES_Y_ORIGIN_1_LOWER 80 // PAGE_BG_ROWS * PAGE_BG_QUAD_HEIGHT / 2 +#define PAUSE_PAGES_Y_ORIGIN_2_LOWER (s16)(-PAUSE_PAGES_Y_ORIGIN_1_LOWER * 0.78 * 100) + typedef struct PauseContext { /* 0x0000 */ View view; /* 0x0128 */ u8* iconItemSegment; @@ -174,14 +179,14 @@ typedef struct PauseContext { /* 0x01E8 */ u16 pageIndex; // "kscp_pos" /* 0x01EA */ u16 pageSwitchTimer; /* 0x01EC */ u16 savePromptState; - /* 0x01F0 */ f32 unk_1F0; - /* 0x01F4 */ f32 unk_1F4; - /* 0x01F8 */ f32 unk_1F8; - /* 0x01FC */ f32 unk_1FC; - /* 0x0200 */ f32 unk_200; - /* 0x0204 */ f32 unk_204; // "angle_s" + /* 0x01F0 */ f32 promptDepthOffset; // Offset position of the prompt away from the camera + /* 0x01F4 */ f32 itemPagePitch; // Rotation of the item page around its local horizontal/sideways axis + /* 0x01F8 */ f32 equipPagePitch; // Rotation of the equip page around its local horizontal/sideways axis + /* 0x01FC */ f32 mapPagePitch; // Rotation of the map page around its local horizontal/sideways axis + /* 0x0200 */ f32 questPagePitch; // Rotation of the quest page around its local horizontal/sideways axis + /* 0x0204 */ f32 promptPitch; // Rotation of the prompt around its local horizontal/sideways axis. "angle_s" /* 0x0208 */ u16 alpha; - /* 0x020A */ s16 offsetY; + /* 0x020A */ s16 pagesYOrigin1; /* 0x020C */ char unk_20C[0x08]; /* 0x0214 */ s16 stickAdjX; /* 0x0216 */ s16 stickAdjY; |
