diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h index 1fd8e7c56c9..b0576077c03 100644 --- a/include/JSystem/J3DGraphBase/J3DShape.h +++ b/include/JSystem/J3DGraphBase/J3DShape.h @@ -24,10 +24,11 @@ class J3DVertexData; class J3DDrawMtxData; enum J3DShpFlag { + J3DShpFlag_Visible = 0x0001, J3DShpFlag_SkinPosCpu = 0x0004, J3DShpFlag_SkinNrmCpu = 0x0008, - J3DShpFlag_Hidden = 0x0010, - J3DShpFlag_EnableLod = 0x0100, + J3DShpFlag_Hidden = 0x0010, + J3DShpFlag_EnableLod = 0x0100, }; class J3DShape { @@ -56,8 +57,8 @@ public: void setVertexDataPointer(J3DVertexData* pVtxData) { mVertexData = pVtxData; } void* getVcdVatCmd() const { return mVcdVatCmd; } void setVcdVatCmd(void* pVatCmd) { mVcdVatCmd = pVatCmd; } - void show() { offFlag(1); } - void hide() { onFlag(1); } + void show() { offFlag(J3DShpFlag_Visible); } + void hide() { onFlag(J3DShpFlag_Visible); } void setCurrentViewNoPtr(u32* pViewNoPtr) { mCurrentViewNo = pViewNoPtr; } void setScaleFlagArray(u8* pScaleFlagArray) { mScaleFlagArray = pScaleFlagArray; } void setDrawMtx(Mtx** pDrawMtx) { mDrawMtx = pDrawMtx; } @@ -66,7 +67,7 @@ public: u32 getBumpMtxOffset() const { return mBumpMtxOffset; } inline J3DMaterial* getMaterial() const { return mMaterial; } - inline u32 getPipeline() const { return (mFlags >> 2) & 7; } + inline u32 getPipeline() const { return (mFlags >> 2) & 0x07; } inline u32 getTexMtxLoadType() const { return mFlags & 0xF000; } static void resetVcdVatCache() { sOldVcdVatCmd = NULL; } diff --git a/include/f_pc/f_pc_leaf.h b/include/f_pc/f_pc_leaf.h index 5bbb9baa0f1..485a6131e2d 100644 --- a/include/f_pc/f_pc_leaf.h +++ b/include/f_pc/f_pc_leaf.h @@ -23,7 +23,7 @@ typedef struct leafdraw_class { typedef struct leaf_process_profile_definition { /* 0x00 */ process_profile_definition mBase; /* 0x1C */ leafdraw_method_class* mLfDrwMth; - /* 0x20 */ s16 unk20; + /* 0x20 */ s16 mPriority; /* 0x22 */ u8 unk22[2]; /* 0x24 */ s32 unk24; } leaf_process_profile_definition; diff --git a/include/f_pc/f_pc_profile.h b/include/f_pc/f_pc_profile.h index beed93f24a4..a393e007286 100644 --- a/include/f_pc/f_pc_profile.h +++ b/include/f_pc/f_pc_profile.h @@ -19,6 +19,8 @@ typedef struct process_profile_definition { s32 mParameters; } process_profile_definition; +#define LAYER_DEFAULT (-2) + process_profile_definition* fpcPf_Get(s16 profileID); extern process_profile_definition** g_fpcPf_ProfileList_p; diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp index 31214dd9647..56737dfb569 100644 --- a/src/f_op/f_op_actor_mng.cpp +++ b/src/f_op/f_op_actor_mng.cpp @@ -553,7 +553,7 @@ s32 fopAcM_create(s16 procName, u16 enemyNo, u32 parameter, const cXyz* pPos, in fopAcM_prm_class* params = createAppend(enemyNo, parameter, pPos, roomNo, pRot, pScale, subType, 0xFFFFFFFF); if (params == NULL) { - return 0xFFFFFFFF; + return -1; } else { return fpcSCtRq_Request(fpcLy_CurrentLayer(), procName, (stdCreateFunc)pCreateFunc, NULL, params); diff --git a/src/f_pc/f_pc_leaf.cpp b/src/f_pc/f_pc_leaf.cpp index 3cbb59348b7..3acfcaf7717 100644 --- a/src/f_pc/f_pc_leaf.cpp +++ b/src/f_pc/f_pc_leaf.cpp @@ -60,7 +60,7 @@ s32 fpcLf_Create(leafdraw_class* pLeaf) { profDef = (leaf_process_profile_definition*)pLeaf->mBase.mpProf; pLeaf->mpDrawMtd = profDef->mLfDrwMth; pLeaf->mBase.mSubType = fpcBs_MakeOfType(&g_fpcLf_type); - fpcDwPi_Init(&pLeaf->mDwPi, profDef->unk20); + fpcDwPi_Init(&pLeaf->mDwPi, profDef->mPriority); pLeaf->mbUnk0 = 0; } return fpcMtd_Create(&pLeaf->mpDrawMtd->mBase, pLeaf);