mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-25 07:22:49 -04:00
Rename GameInfo to RegEditor (#1178)
* Rename RegEditor and move it to regs.h * bring over some minor doc from oot * add missing include * Update tools/disasm/variables.txt Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * update comment * bss --------- Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
@@ -1226,7 +1226,6 @@ s32 Actor_TrackPoint(Actor* actor, Vec3f* target, Vec3s* headRot, Vec3s* torsoRo
|
||||
s32 Actor_TrackPlayerSetFocusHeight(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, f32 focusHeight);
|
||||
s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, Vec3f focusPos);
|
||||
void SaveContext_Init(void);
|
||||
void GameInfo_Init(void);
|
||||
|
||||
void Cutscene_Init(PlayState* play, CutsceneContext* csCtx);
|
||||
void Cutscene_Start(PlayState* play, CutsceneContext* csCtx);
|
||||
|
||||
+19
-3
@@ -4,13 +4,28 @@
|
||||
#ifndef REGS_H
|
||||
#define REGS_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
#define REG_GROUPS 29 // number of REG groups, i.e. REG, SREG, OREG, etc.
|
||||
#define REG_PAGES 6
|
||||
#define REG_PER_PAGE 16
|
||||
#define REG_PER_GROUP REG_PAGES * REG_PER_PAGE
|
||||
|
||||
/* We probably want a better name for gGameInfo based on OoT discussions */
|
||||
#define BASE_REG(n, r) gGameInfo->data[n * REG_PER_GROUP + r]
|
||||
typedef struct RegEditor {
|
||||
/* 0x00 */ u8 regPage; // 0: no page selected (reg editor is not active); 1: first page; `REG_PAGES`: last page
|
||||
/* 0x01 */ u8 regGroup; // Indexed from 0 to `REG_GROUPS`-1. Each group has its own character to identify it.
|
||||
/* 0x02 */ u8 regCur; // Selected reg, indexed from 0 as the page start
|
||||
/* 0x03 */ u8 dPadInputPrev;
|
||||
/* 0x04 */ u32 inputRepeatTimer;
|
||||
/* 0x08 */ UNK_TYPE1 pad_08[0xC];
|
||||
/* 0x14 */ s16 data[REG_GROUPS * REG_PER_GROUP]; // Accessed through *REG macros
|
||||
} RegEditor; // size = 0x15D4
|
||||
|
||||
void Regs_Init(void);
|
||||
|
||||
extern RegEditor* gRegEditor;
|
||||
|
||||
#define BASE_REG(n, r) (gRegEditor->data[n * REG_PER_GROUP + r])
|
||||
|
||||
#define REG(r) BASE_REG(0, r)
|
||||
#define SREG(r) BASE_REG(1, r)
|
||||
@@ -42,7 +57,8 @@
|
||||
#define kREG(r) BASE_REG(27, r)
|
||||
#define bREG(r) BASE_REG(28, r)
|
||||
|
||||
/* TODO: Actually confirm these, in case of miss-match it's at least a simple list to `sed` */
|
||||
/* TODO: There are still a few OoT defines here that need confirmation */
|
||||
|
||||
#define R_TIME_SPEED REG(15)
|
||||
#define R_RUN_SPEED_LIMIT REG(45)
|
||||
|
||||
|
||||
+1
-1
@@ -2353,7 +2353,7 @@ extern SaveContext gSaveContext;
|
||||
// extern UNK_TYPE1 D_801F3F42;
|
||||
// extern UNK_TYPE1 D_801F3F4A;
|
||||
// extern UNK_TYPE1 D_801F3F5A;
|
||||
extern GameInfo* gGameInfo;
|
||||
|
||||
// extern UNK_TYPE1 D_801F3F80;
|
||||
// extern UNK_TYPE1 D_801F3F83;
|
||||
// extern UNK_TYPE1 D_801F48C8;
|
||||
|
||||
@@ -115,44 +115,6 @@ typedef struct {
|
||||
/* 0x8 */ void* end;
|
||||
} PolygonType2; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 x;
|
||||
/* 0x2 */ s16 y;
|
||||
/* 0x4 */ s16 z;
|
||||
/* 0x6 */ s16 reserved;
|
||||
/* 0x8 */ s16 s;
|
||||
/* 0xA */ s16 t;
|
||||
/* 0xC */ s8 r;
|
||||
/* 0xD */ s8 g;
|
||||
/* 0xE */ s8 b;
|
||||
/* 0xF */ s8 a;
|
||||
} F3DVertexColor; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 x;
|
||||
/* 0x2 */ s16 y;
|
||||
/* 0x4 */ s16 z;
|
||||
/* 0x6 */ s16 reserved;
|
||||
/* 0x8 */ s16 s;
|
||||
/* 0xA */ s16 t;
|
||||
/* 0xC */ s8 normalX;
|
||||
/* 0xD */ s8 normalY;
|
||||
/* 0xE */ s8 normalZ;
|
||||
/* 0xF */ s8 a;
|
||||
} F3DVertexNormal; // size = 0x10
|
||||
|
||||
// Game Info aka. Static Context
|
||||
// Data normally accessed through REG macros (see regs.h)
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 unk_00; // regPage;? // 1 is first page
|
||||
/* 0x01 */ u8 unk_01; // regGroup;? // "register" group (R, RS, RO, RP etc.)
|
||||
/* 0x02 */ u8 unk_02; // regCur;? // selected register within page
|
||||
/* 0x03 */ u8 unk_03; // dpadLast;?
|
||||
/* 0x04 */ u32 unk_04; // repeat;?
|
||||
/* 0x08 */ UNK_TYPE1 pad_08[0xC];
|
||||
/* 0x14 */ s16 data[REG_GROUPS * REG_PER_GROUP]; // 0xAE0 entries
|
||||
} GameInfo; // size = 0x15D4
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 size;
|
||||
/* 0x4 */ void* bufp;
|
||||
@@ -285,11 +247,6 @@ typedef struct {
|
||||
/* 0x14 */ OSMesgQueue unk14;
|
||||
} s80185D40; // size = 0x2C
|
||||
|
||||
typedef union {
|
||||
F3DVertexColor color;
|
||||
F3DVertexNormal normal;
|
||||
} F3DVertex; // size = 0x10
|
||||
|
||||
// End of RDRAM without the Expansion Pak installed
|
||||
#define NORMAL_RDRAM_END 0x80400000
|
||||
// End of RDRAM with the Expansion Pak installed
|
||||
|
||||
Reference in New Issue
Block a user