mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Merge branch 'main' of https://github.com/zeldaret/mm into zret
This commit is contained in:
+1
-1
@@ -541,7 +541,7 @@ void Lib_PlaySfx(u16 sfxId);
|
||||
void Lib_PlaySfx_2(u16 sfxId);
|
||||
void Lib_PlaySfx_AtPos(Vec3f* pos, u16 sfxId);
|
||||
void Lib_Vec3f_TranslateAndRotateY(Vec3f* translation, s16 rotAngle, Vec3f* src, Vec3f* dst);
|
||||
void Color_RGB8_Lerp(Color_RGB8* a, Color_RGB8* b, f32 t, Color_RGB8* dst);
|
||||
void Color_RGB8_Lerp(Color_RGB8* from, Color_RGB8* to, f32 lerp, Color_RGB8* dst);
|
||||
void Lib_Nop801004FC(void);
|
||||
void* Lib_SegmentedToVirtual(void* ptr);
|
||||
void* Lib_SegmentedToVirtualNull(void* ptr);
|
||||
|
||||
@@ -61,6 +61,7 @@ extern RegEditor* gRegEditor;
|
||||
|
||||
/* TODO: There are still a few OoT defines here that need confirmation */
|
||||
|
||||
#define R_ENV_DISABLE_DBG REG(9)
|
||||
#define R_TIME_SPEED REG(15)
|
||||
#define R_RUN_SPEED_LIMIT REG(45)
|
||||
|
||||
@@ -148,6 +149,9 @@ extern RegEditor* gRegEditor;
|
||||
#define R_REVERSE_FLOOR_INDEX XREG(94)
|
||||
#define R_MINIMAP_DISABLED XREG(95)
|
||||
|
||||
#define R_ENV_LIGHT1_DIR(i) cREG(3 + (i))
|
||||
#define R_ENV_LIGHT2_DIR(i) cREG(6 + (i))
|
||||
|
||||
#define R_TRANS_FADE_FLASH_ALPHA_STEP iREG(50) // Set to a negative number to start the flash
|
||||
#define R_ROOM_CULL_DEBUG_MODE iREG(86)
|
||||
#define R_ROOM_CULL_NUM_ENTRIES iREG(87)
|
||||
|
||||
+2
-15
@@ -32,7 +32,7 @@ extern u8* sYaz0MaxPtr;
|
||||
extern void* gYaz0DecompressDstEnd;
|
||||
|
||||
// extern UNK_TYPE4 D_8009CD10;
|
||||
extern u32 sRandFloat;
|
||||
extern u32 gRandFloat;
|
||||
// extern UNK_TYPE4 sArenaLockMsg;
|
||||
|
||||
extern DmaEntry dmadata[1568];
|
||||
@@ -1679,20 +1679,7 @@ extern SaveContext gSaveContext;
|
||||
// extern UNK_TYPE4 D_801F6B00;
|
||||
// extern UNK_TYPE4 D_801F6B04;
|
||||
// extern UNK_TYPE4 D_801F6B08;
|
||||
// extern UNK_TYPE1 D_801F6B0C;
|
||||
// extern UNK_TYPE1 D_801F6B0E;
|
||||
// extern UNK_TYPE1 D_801F6B10;
|
||||
// extern UNK_TYPE1 D_801F6B12;
|
||||
// extern UNK_TYPE1 D_801F6B14;
|
||||
// extern UNK_TYPE1 D_801F6B16;
|
||||
// extern UNK_TYPE1 D_801F6B18;
|
||||
// extern UNK_TYPE1 D_801F6B1A;
|
||||
// extern UNK_TYPE1 D_801F6B1C;
|
||||
// extern UNK_TYPE1 D_801F6B1E;
|
||||
// extern UNK_TYPE1 D_801F6B20;
|
||||
// extern UNK_TYPE1 D_801F6B22;
|
||||
// extern UNK_TYPE4 sCurCsCamera;
|
||||
// extern UNK_TYPE1 D_801F6B58;
|
||||
|
||||
extern void (*sKaleidoScopeUpdateFunc)(PlayState* play);
|
||||
extern void (*sKaleidoScopeDrawFunc)(PlayState* play);
|
||||
|
||||
|
||||
+30
-28
@@ -737,18 +737,21 @@ typedef struct {
|
||||
/* 0xA */ s16 relativeTo; // see `CutsceneCamRelativeTo`
|
||||
} CsCmdCamPoint; // size = 0xC
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ CS_CAM_INTERP_0,
|
||||
/* 1 */ CS_CAM_INTERP_1,
|
||||
/* 2 */ CS_CAM_INTERP_2,
|
||||
/* 3 */ CS_CAM_INTERP_3,
|
||||
/* 4 */ CS_CAM_INTERP_4,
|
||||
/* 5 */ CS_CAM_INTERP_5,
|
||||
/* 6 */ CS_CAM_INTERP_6,
|
||||
/* 7 */ CS_CAM_INTERP_7
|
||||
typedef enum CutsceneCamInterpType {
|
||||
/* 0 */ CS_CAM_INTERP_NONE, // values do not change.
|
||||
// values 1-3 only uses a single point from the cmd
|
||||
/* 1 */ CS_CAM_INTERP_SET, // values immediately set to cmd values.
|
||||
/* 2 */ CS_CAM_INTERP_LINEAR, // Lerp to the target position
|
||||
/* 3 */ CS_CAM_INTERP_SCALE, // Step to the target position in increments scaled by the remaining distance
|
||||
// values 4-5 uses multiple points from the cmd
|
||||
/* 4 */ CS_CAM_INTERP_MP_CUBIC, // cubic multi-point (identical to SM64/OoT)
|
||||
/* 5 */ CS_CAM_INTERP_MP_QUAD, // quadratic multi-point
|
||||
// value 6 only uses a single point from the cmd
|
||||
/* 6 */ CS_CAM_INTERP_GEO, // does VecGeo calculations using fov
|
||||
/* 7 */ CS_CAM_INTERP_OFF // interpolation is not processed.
|
||||
} CutsceneCamInterpType;
|
||||
|
||||
typedef enum {
|
||||
typedef enum CutsceneCamRelativeTo {
|
||||
/* 0 */ CS_CAM_REL_0,
|
||||
/* 1 */ CS_CAM_REL_1,
|
||||
/* 2 */ CS_CAM_REL_2,
|
||||
@@ -759,26 +762,25 @@ typedef enum {
|
||||
|
||||
|
||||
// Roll and Fov Data
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 unused0; // unused
|
||||
typedef struct CsCmdCamMisc {
|
||||
/* 0x0 */ s16 unused0; // used only in the unused interp function
|
||||
/* 0x2 */ s16 roll;
|
||||
/* 0x4 */ s16 fov;
|
||||
/* 0x6 */ s16 unused1; // unused
|
||||
} CsCmdCamMisc; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f unk_00;
|
||||
/* 0x0C */ Vec3f unk_0C;
|
||||
/* 0x18 */ f32 unk_18;
|
||||
/* 0x1C */ f32 unk_1C;
|
||||
/* 0x2A */ f32 unk_20;
|
||||
/* 0x24 */ s16 unk_24;
|
||||
/* 0x26 */ s16 unk_26;
|
||||
/* 0x28 */ s16 unk_28;
|
||||
typedef struct CutsceneCameraInterp {
|
||||
/* 0x00 */ Vec3f curPos;
|
||||
/* 0x0C */ Vec3f initPos;
|
||||
/* 0x18 */ f32 initFov;
|
||||
/* 0x1C */ f32 initRoll;
|
||||
/* 0x2A */ f32 unk_20; // position adjustment based on fov?
|
||||
/* 0x24 */ s16 curFrame;
|
||||
/* 0x26 */ s16 waypoint;
|
||||
/* 0x28 */ s16 duration;
|
||||
/* 0x2A */ s16 numEntries;
|
||||
/* 0x1E */ u8 curPoint;
|
||||
/* 0x2D */ u8 unk_2D;
|
||||
/* 0x2E */ UNK_TYPE1 unk_2E[2];
|
||||
/* 0x2D */ u8 type; // See `CutsceneCamInterpType`
|
||||
} CutsceneCameraInterp; // size = 0x30
|
||||
|
||||
typedef struct CutsceneCamera {
|
||||
@@ -798,11 +800,11 @@ typedef struct CutsceneCamera {
|
||||
} CutsceneCamera; // size = 0x80
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ CS_CAM_STATE_UPDATE_ALL, // Update spline and next spline timer
|
||||
/* 0 */ CS_CAM_STATE_UPDATE_SPLINE, // Update spline, do not advance next spline timer
|
||||
/* 0 */ CS_CAM_STATE_PAUSE, // No updates
|
||||
/* 0 */ CS_CAM_STATE_DONE_SPLINE, // Finished the current spline, ready for the next one
|
||||
/* 0 */ CS_CAM_STATE_DONE = 999 // Finished all the splines.
|
||||
/* 0 */ CS_CAM_STATE_UPDATE_ALL, // Update spline and next spline timer
|
||||
/* 1 */ CS_CAM_STATE_UPDATE_SPLINE, // Update spline, do not advance next spline timer
|
||||
/* 2 */ CS_CAM_STATE_PAUSE, // No updates
|
||||
/* 3 */ CS_CAM_STATE_DONE_SPLINE, // Finished the current spline, ready for the next one
|
||||
/* 999 */ CS_CAM_STATE_DONE = 999 // Finished all the splines.
|
||||
} CutsceneCameraState;
|
||||
|
||||
// OoT Remnant
|
||||
|
||||
@@ -131,7 +131,10 @@ typedef union {
|
||||
} MtxF; // size = 0x40
|
||||
|
||||
#define LERPIMP(v0, v1, t) ((v0) + (((v1) - (v0)) * (t)))
|
||||
#define LERPIMP_ALT(v0, v1, t) (((v1) - (v0)) * (t) + (v0))
|
||||
#define S16_LERP(v0, v1, t) ((s16)(((v1) - (v0)) * (t)) + (v0))
|
||||
#define F32_LERP(v0, v1, t) ((1.0f - (t)) * (f32)(v0) + (t) * (f32)(v1))
|
||||
#define F32_LERP_ALT(v0, v1, t) ((f32)(v0) * (1.0f - (t)) + (t) * (f32)(v1))
|
||||
#define F32_LERPIMP(v0, v1, t) ((f32)(v0) + (((f32)(v1) - (f32)(v0)) * (t)))
|
||||
#define F32_LERPIMPINV(v0, v1, t) ((f32)(v0) + (((f32)(v1) - (f32)(v0)) / (t)))
|
||||
#define BINANG_LERPIMP(v0, v1, t) ((v0) + (s16)(BINANG_SUB((v1), (v0)) * (t)))
|
||||
|
||||
+10
-4
@@ -240,7 +240,7 @@ typedef struct PermanentSceneFlags {
|
||||
/* 0x08 */ u32 switch1;
|
||||
/* 0x0C */ u32 clearedRoom;
|
||||
/* 0x10 */ u32 collectible;
|
||||
/* 0x14 */ u32 unk_14; // varies based on scene. For dungeons, floors visited.
|
||||
/* 0x14 */ u32 unk_14; // varies based on scene. For dungeons, floors visited.
|
||||
/* 0x18 */ u32 rooms;
|
||||
} PermanentSceneFlags; // size = 0x1C
|
||||
|
||||
@@ -1598,9 +1598,8 @@ typedef enum {
|
||||
#define EVENTINF_THREEDAYRESET_LOST_STICK_AMMO 0x73
|
||||
#define EVENTINF_THREEDAYRESET_LOST_ARROW_AMMO 0x74
|
||||
|
||||
#define EVENTINF_75 0x75
|
||||
#define EVENTINF_76 0x76
|
||||
#define EVENTINF_77 0x77
|
||||
// Checked in Kankyo as one to store the day: gSaveContext.eventInf[7] & 0xE0
|
||||
// EVENTINF_75 to EVENTINF_77
|
||||
|
||||
#define CHECK_EVENTINF(flag) (gSaveContext.eventInf[(flag) >> 4] & (1 << ((flag) & 0xF)))
|
||||
#define SET_EVENTINF(flag) (gSaveContext.eventInf[(flag) >> 4] |= (1 << ((flag) & 0xF)))
|
||||
@@ -1628,6 +1627,13 @@ typedef enum {
|
||||
#define SET_EVENTINF_DOG_RACE_RACE_STANDING(raceStanding) \
|
||||
(gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & EVENTINF_DOG_RACE_STATE_MASK) | (raceStanding << 3))
|
||||
|
||||
#define EVENTINF_GET_7_E0 ((gSaveContext.eventInf[7] & 0xE0) >> 5)
|
||||
|
||||
#define EVENTINF_SET_7_E0(day, temp) \
|
||||
(temp) = gSaveContext.eventInf[7] & (u8)~0xE0; \
|
||||
(temp) |= (u8)((day) << 5); \
|
||||
gSaveContext.eventInf[7] = (temp)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ DUNGEON_INDEX_WOODFALL_TEMPLE,
|
||||
/* 1 */ DUNGEON_INDEX_SNOWHEAD_TEMPLE,
|
||||
|
||||
Reference in New Issue
Block a user