mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-20 05:36:55 -04:00
Update ZAPD (#1533)
* git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "2b6f459b9" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "2b6f459b9" git-subrepo: version: "0.4.6" origin: "???" commit: "???" * Update ZAPD Co-authored-by: Yanis42 <35189056+Yanis42@users.noreply.github.com> * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "572b13236" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "572b13236" git-subrepo: version: "0.4.6" origin: "???" commit: "???" * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "9601f2699" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "9601f2699" git-subrepo: version: "0.4.6" origin: "???" commit: "???" * fixes for new ZAPD * readd typedefs * remov enums * Reading is hard --------- Co-authored-by: Yanis42 <35189056+Yanis42@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -122,7 +122,7 @@ typedef struct Actor {
|
||||
/* 0x01F */ s8 targetMode; // Controls how far the actor can be targeted from and how far it can stay locked on
|
||||
/* 0x020 */ s16 halfDaysBits; // Bitmask indicating which half-days this actor is allowed to not be killed(?) (TODO: not sure how to word this). If the current halfDayBit is not part of this mask then the actor is killed when spawning the setup actors
|
||||
/* 0x024 */ PosRot world; // Position/rotation in the world
|
||||
/* 0x038 */ s8 csId; // ActorCutscene index, see `CutsceneId`
|
||||
/* 0x038 */ s8 csId; // CutsceneEntry index, see `CutsceneId`
|
||||
/* 0x039 */ u8 audioFlags; // Another set of flags? Seems related to sfx or bgm
|
||||
/* 0x03C */ PosRot focus; // Target reticle focuses on this position. For player this represents head pos and rot
|
||||
/* 0x050 */ u16 sfxId; // Id of sound effect to play. Plays when value is set, then is cleared the following update cycle
|
||||
|
||||
@@ -84,8 +84,6 @@ typedef struct {
|
||||
/* 0x4 */ Vec3s* bgCamFuncData; // s16 data grouped in threes (ex. Vec3s), is usually of type `BgCamFuncData`
|
||||
} BgCamInfo; // size = 0x8
|
||||
|
||||
typedef BgCamInfo CamData; // TODO: ZAPD compatibility
|
||||
|
||||
// The structure used for all instances of s16 data from `BgCamInfo`.
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3s pos;
|
||||
|
||||
@@ -59,11 +59,4 @@ void SkelCurve_SetAnim(SkelCurve* skelCurve, CurveAnimationHeader* animation, f3
|
||||
s32 SkelCurve_Update(struct PlayState* play, SkelCurve* skelCurve);
|
||||
void SkelCurve_Draw(struct Actor* actor, struct PlayState* play, SkelCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw, PostCurveLimbDraw postLimbDraw, s32 lod, struct Actor* thisx);
|
||||
|
||||
|
||||
// ZAPD compatibility typedefs
|
||||
// TODO: Remove when ZAPD adds support for them
|
||||
typedef CurveInterpKnot TransformData;
|
||||
typedef CurveAnimationHeader TransformUpdateIndex;
|
||||
typedef CurveSkeletonHeader SkelCurveLimbList;
|
||||
|
||||
#endif // Z64_CURVE_H
|
||||
|
||||
+4
-11
@@ -599,10 +599,6 @@ typedef struct {
|
||||
/* 0x7 */ u8 spawnFlags; // See `CS_SPAWN_FLAG_`
|
||||
} CutsceneScriptEntry; // size = 0x8
|
||||
|
||||
// ZAPD compatibility typedefs
|
||||
// TODO: Remove when ZAPD adds support for them
|
||||
typedef CutsceneScriptEntry CutsceneEntry;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 scriptListCount;
|
||||
/* 0x04 */ CutsceneData* script;
|
||||
@@ -631,13 +627,11 @@ typedef struct {
|
||||
/* 0x0C */ s16 hudVisibility;
|
||||
/* 0x0E */ u8 endCam;
|
||||
/* 0x0F */ u8 letterboxSize;
|
||||
} ActorCutscene; // size = 0x10
|
||||
// TODO: rename `ActorCutscene` to `CutsceneEntry` once ZAPD uses `CutsceneScriptEntry`
|
||||
// typedef CutsceneEntry ActorCutscene;
|
||||
} CutsceneEntry; // size = 0x10
|
||||
|
||||
typedef enum {
|
||||
/* -1 */ CS_ID_NONE = -1,
|
||||
// CsId's 0 - 119 are sceneLayer-specific and index `ActorCutscene`
|
||||
// CsId's 0 - 119 are sceneLayer-specific and index `CutsceneEntry`
|
||||
/* 0x78 */ CS_ID_GLOBAL_78 = 120,
|
||||
/* 0x79 */ CS_ID_GLOBAL_79,
|
||||
/* 0x7A */ CS_ID_GLOBAL_7A,
|
||||
@@ -760,7 +754,6 @@ typedef enum CutsceneCamRelativeTo {
|
||||
/* 5 */ CS_CAM_REL_5
|
||||
} CutsceneCamRelativeTo;
|
||||
|
||||
|
||||
// Roll and Fov Data
|
||||
typedef struct CsCmdCamMisc {
|
||||
/* 0x0 */ s16 unused0; // used only in the unused interp function
|
||||
@@ -827,7 +820,7 @@ s32 Cutscene_GetCueChannel(struct PlayState* play, u16 cueType);
|
||||
s32 Cutscene_IsCueInChannel(struct PlayState* play, u16 cueType);
|
||||
u8 Cutscene_IsPlaying(struct PlayState* play);
|
||||
|
||||
void CutsceneManager_Init(struct PlayState* play, ActorCutscene* cutsceneList, s16 numEntries);
|
||||
void CutsceneManager_Init(struct PlayState* play, CutsceneEntry* cutsceneList, s16 numEntries);
|
||||
void CutsceneManager_StoreCamera(Camera* camera);
|
||||
void CutsceneManager_ClearWaiting(void);
|
||||
s16 CutsceneManager_Update(void);
|
||||
@@ -838,7 +831,7 @@ s16 CutsceneManager_StartWithPlayerCsAndSetFlag(s16 csId, Actor* actor);
|
||||
s16 CutsceneManager_Start(s16 csId, Actor* actor);
|
||||
s16 CutsceneManager_Stop(s16 csId);
|
||||
s16 CutsceneManager_GetCurrentCsId(void);
|
||||
ActorCutscene* CutsceneManager_GetCutsceneEntry(s16 csId);
|
||||
CutsceneEntry* CutsceneManager_GetCutsceneEntry(s16 csId);
|
||||
s16 CutsceneManager_GetAdditionalCsId(s16 csId);
|
||||
s16 CutsceneManager_GetLength(s16 csId);
|
||||
s16 CutsceneManager_GetCutsceneScriptIndex(s16 csId);
|
||||
|
||||
@@ -665,40 +665,6 @@
|
||||
*/
|
||||
#define CS_END() { CMD_W(0xFFFFFFFF) }
|
||||
|
||||
// TODO: Fix ZAPD and delete these
|
||||
#define CS_ACTOR_ACTION_LIST CS_ACTOR_CUE_LIST
|
||||
#define CS_ACTOR_ACTION CS_ACTOR_CUE
|
||||
#define CS_PLAYER_ACTION_LIST CS_PLAYER_CUE_LIST
|
||||
#define CS_PLAYER_ACTION CS_PLAYER_CUE
|
||||
#define CS_LIGHTING_LIST CS_LIGHT_SETTING_LIST
|
||||
#define CS_CAMERA_LIST CS_CAM_SPLINE_LIST
|
||||
#define CS_TEXT_DISPLAY_TEXTBOX CS_TEXT
|
||||
#define CS_TEXT_LEARN_SONG CS_TEXT_OCARINA_ACTION
|
||||
#define CS_SCENE_TRANS_FX_LIST CS_TRANSITION_LIST
|
||||
#define CS_SCENE_TRANS_FX CS_TRANSITION
|
||||
#define CS_GIVETATL_LIST CS_GIVE_TATL_LIST
|
||||
#define CS_GIVETATL CS_GIVE_TATL
|
||||
#define CS_PLAYSEQ_LIST CS_START_SEQ_LIST
|
||||
#define CS_STOPSEQ_LIST CS_STOP_SEQ_LIST
|
||||
#define CS_FADESEQ_LIST CS_FADE_OUT_SEQ_LIST
|
||||
#define CS_FADESEQ CS_FADE_OUT_SEQ
|
||||
#define CS_PLAYAMBIENCE_LIST CS_START_AMBIENCE_LIST
|
||||
#define CS_PLAYAMBIENCE CS_START_AMBIENCE
|
||||
#define CS_FADEAMBIENCE_LIST CS_FADE_OUT_AMBIENCE_LIST
|
||||
#define CS_FADEAMBIENCE CS_FADE_OUT_AMBIENCE
|
||||
#define CS_SCENE_UNK_130_LIST CS_SFX_REVERB_INDEX_2_LIST
|
||||
#define CS_SCENE_UNK_130 CS_SFX_REVERB_INDEX_2
|
||||
#define CS_SCENE_UNK_131_LIST CS_SFX_REVERB_INDEX_1_LIST
|
||||
#define CS_SCENE_UNK_131 CS_SFX_REVERB_INDEX_1
|
||||
#define CS_SCENE_UNK_132_LIST CS_MODIFY_SEQ_LIST
|
||||
#define CS_SCENE_UNK_132 CS_MODIFY_SEQ
|
||||
#define CS_MOTIONBLUR_LIST CS_MOTION_BLUR_LIST
|
||||
#define CS_MOTIONBLUR CS_MOTION_BLUR
|
||||
#define CS_FADESCREEN_LIST CS_TRANSITION_GENERAL_LIST
|
||||
#define CS_FADESCREEN CS_TRANSITION_GENERAL
|
||||
#define CS_TERMINATOR_LIST CS_DESTINATION_LIST
|
||||
#define CS_TERMINATOR CS_DESTINATION
|
||||
|
||||
#define CS_PLAYSEQ(seqId, startFrame, endFrame) \
|
||||
CS_START_SEQ((seqId)-1, startFrame, endFrame)
|
||||
|
||||
|
||||
@@ -312,9 +312,6 @@ typedef union {
|
||||
RoomShapeCullable cullable;
|
||||
} RoomShape; // "Ground Shape"
|
||||
|
||||
// TODO: update ZAPD
|
||||
#define SCENE_CMD_MESH SCENE_CMD_ROOM_SHAPE
|
||||
|
||||
// TODO: Check which ones don't exist
|
||||
typedef enum {
|
||||
/* 0 */ ROOM_BEHAVIOR_TYPE1_0,
|
||||
@@ -468,10 +465,6 @@ typedef struct {
|
||||
/* 0x4 */ void* params;
|
||||
} AnimatedMaterial; // size = 0x8
|
||||
|
||||
// TODO: ZAPD
|
||||
typedef RoomShapeCullableEntry PolygonDlist2;
|
||||
typedef RoomShapeCullable PolygonType2;
|
||||
|
||||
#define OBJECT_SLOT_NONE -1
|
||||
|
||||
typedef struct {
|
||||
@@ -522,8 +515,6 @@ typedef struct {
|
||||
/* 0x4 */ Vec3s* actorCsCamFuncData; // s16 data grouped in threes
|
||||
} ActorCsCamInfo; // size = 0x8
|
||||
|
||||
typedef ActorCsCamInfo CsCameraEntry; // TODO: Remove once ZAPD updates its structs
|
||||
|
||||
typedef union {
|
||||
/* Command: N/A */ SCmdBase base;
|
||||
/* Command: 0x00 */ SCmdSpawnList spawnList;
|
||||
@@ -898,9 +889,6 @@ typedef enum {
|
||||
#define SCENE_CMD_MINIMAP_COMPASS_ICON_INFO(compassIconCount, compassIconInfo) \
|
||||
{ SCENE_CMD_ID_MINIMAP_COMPASS_ICON_INFO, compassIconCount, CMD_PTR(compassIconInfo) }
|
||||
|
||||
// TODO: ZAPD Capatability
|
||||
#define SCENE_CMD_MISC_SETTINGS SCENE_CMD_SET_REGION_VISITED
|
||||
#define SCENE_CMD_CUTSCENE_LIST SCENE_CMD_CUTSCENE_SCRIPT_LIST
|
||||
|
||||
s32 Object_SpawnPersistent(ObjectContext* objectCtx, s16 id);
|
||||
void Object_InitContext(struct GameState* gameState, ObjectContext* objectCtx);
|
||||
|
||||
@@ -48,13 +48,6 @@ typedef struct {
|
||||
/* 0x8 */ Gfx* dlist;
|
||||
} SkinAnimatedLimbData; // size = 0xC
|
||||
|
||||
// ZAPD compatibility typedefs
|
||||
// TODO: Remove when ZAPD adds support for them
|
||||
typedef SkinVertex Struct_800A57C0;
|
||||
typedef SkinTransformation Struct_800A598C_2;
|
||||
typedef SkinAnimatedLimbData Struct_800A5E28;
|
||||
typedef SkinLimbModif Struct_800A598C;
|
||||
|
||||
#define SKIN_LIMB_TYPE_ANIMATED 4
|
||||
#define SKIN_LIMB_TYPE_NORMAL 11
|
||||
|
||||
|
||||
Reference in New Issue
Block a user