diff --git a/include/JSystem/JGadget/binary.h b/include/JSystem/JGadget/binary.h index 89df9d47452..95ee0635766 100644 --- a/include/JSystem/JGadget/binary.h +++ b/include/JSystem/JGadget/binary.h @@ -90,8 +90,26 @@ struct TValueIterator { mBegin = begin; } + const void* get() const { return mBegin; } + typename Parser::ParseType operator*() { - return *(typename Parser::ParseType*)mBegin; + return *(typename Parser::ParseType*)get(); + } + + TValueIterator& operator++() { + const_cast(mBegin)++; + return *this; + } + + const TValueIterator operator++(int) { + TValueIterator old(*this); + ++(*this); + return old; + } + + TValueIterator& operator+=(s32 v) { + const_cast(mBegin) += v; + return *this; } const void* mBegin; @@ -102,6 +120,20 @@ struct TValueIterator_raw : public TValueIterator, 1> { TValueIterator_raw(const void* begin) : TValueIterator, 1>(begin) {} }; +template +struct TParseValue_misaligned : TParseValue_raw_ { + static T parse(const void* data) { return TParseValue_raw_::parse(data); } +}; + +template +struct TValueIterator_misaligned : public TValueIterator, sizeof(T)> { + TValueIterator_misaligned(const TValueIterator_misaligned& other) : TValueIterator, sizeof(T)>(other) {} + TValueIterator_misaligned(const void* begin) : TValueIterator, sizeof(T)>(begin) {} +}; + + +inline bool operator==(TValueIterator, 4> a, TValueIterator, 4> b) { return a.mBegin == b.mBegin; } + } // namespace binary } // namespace JGadget diff --git a/include/JSystem/JStudio/JStudio/stb.h b/include/JSystem/JStudio/JStudio/stb.h index a4ee1a7e762..4315abd82fa 100644 --- a/include/JSystem/JStudio/JStudio/stb.h +++ b/include/JSystem/JStudio/JStudio/stb.h @@ -172,16 +172,20 @@ struct TParseData : public data::TParse_TParagraph_data::TData { } bool isEnd() const { - return _0 == 0; + return status == 0; } bool empty() const { - return _c == NULL; + return fileCount == NULL; } bool isValid() const { - return !empty() && _0 == 50; + return !empty() && status == 50; } + + const void* getContent() const { return fileCount; } + + u32 size() const { return dataSize; } }; template > @@ -190,7 +194,7 @@ struct TParseData_fixed : public TParseData { TParseData_fixed() : TParseData() {} const void* getNext() const { - return fileCount; + return _10; } bool isValid() const { @@ -200,6 +204,19 @@ struct TParseData_fixed : public TParseData { Iterator begin() { return Iterator(fileCount); } + + Iterator end() { + Iterator i(fileCount); + i += size(); + return i; + } +}; + +struct TParseData_string : public TParseData<0x60> { + TParseData_string(const void* pContent) : TParseData<0x60>(pContent) {} + TParseData_string() : TParseData<0x60>() {} + + const char* getData() const { return (const char*)getContent(); } }; } // namespace stb diff --git a/include/d/d_demo.h b/include/d/d_demo.h index 0071b52b707..6bb9ee04ad7 100644 --- a/include/d/d_demo.h +++ b/include/d/d_demo.h @@ -7,6 +7,7 @@ #include "SSystem/SComponent/c_sxyz.h" #include "SSystem/SComponent/c_xyz.h" #include "Z2AudioLib/Z2SoundStarter.h" +#include "f_op/f_op_actor_mng.h" class J3DModel; class dDemo_actor_c; @@ -39,17 +40,42 @@ class dDemo_object_c { /* 0xAC */ dDemo_fog_c* mpFog; }; +// TODO: made up, figure out what this is +struct dDemo_prm_data { + /* 0x0 */ u8 field_0x0[0x4 - 0x0]; + /* 0x4 */ s8 field_0x4; + /* 0x5 */ u8 field_0x5[0x6 - 0x5]; + /* 0x6 */ s8 field_0x6; + /* 0x7 */ s8 field_0x7; + /* 0x8 */ u8 field_0x8[0xB - 0x8]; + /* 0xB */ s8 field_0xb; + /* 0xC */ u8 field_0xc[0xF - 0xC]; + /* 0xF */ s8 field_0xf; +}; + class dDemo_prm_c { public: - dDemo_prm_c() { mData = 0; } - u32 getData() { return mData; } + dDemo_prm_c() { mData = NULL; } + dDemo_prm_data* getData() { return mData; } /* 0x0 */ u32 field_0x0; - /* 0x4 */ u32 mData; + /* 0x4 */ dDemo_prm_data* mData; }; class dDemo_actor_c : public JStage::TActor { public: + enum Enable_e { + ENABLE_TRANS_e = (1 << 1), + ENABLE_SCALE_e = (1 << 2), + ENABLE_ROTATE_e = (1 << 3), + ENABLE_SHAPE_e = (1 << 4), + ENABLE_ANM_e = (1 << 5), + ENABLE_ANM_FRAME_e = (1 << 6), + ENABLE_ANM_TRANSITION_e = (1 << 7), + ENABLE_TEX_ANM = (1 << 8), + ENABLE_TEX_ANM_FRAME_e = (1 << 9), + }; + /* 80038020 */ dDemo_actor_c(); /* 80038128 */ fopAc_ac_c* getActor(); /* 8003815C */ void setActor(fopAc_ac_c*); @@ -58,22 +84,41 @@ class dDemo_actor_c : public JStage::TActor { /* 80038098 */ virtual ~dDemo_actor_c(); /* 800387EC */ virtual void JSGSetData(u32, void const*, u32); - /* 8003A05C */ virtual s32 JSGFindNodeID(char const*) const; - /* 8003A088 */ virtual bool JSGGetNodeTransformation(u32, f32 (*)[4]) const; - /* 8003A0D8 */ virtual void JSGGetTranslation(Vec*) const; + /* 8003A05C */ virtual s32 JSGFindNodeID(char const* param_0) const { + JUT_ASSERT(mModel != 0); + return mModel->getModelData()->getJointName()->getIndex(param_0); + } + /* 8003A088 */ virtual bool JSGGetNodeTransformation(u32 param_0, Mtx param_1) const { + JUT_ASSERT(mModel != 0); + cMtx_copy(mModel->getAnmMtx((u16)param_0), param_1); + return true; + } + /* 8003A0D8 */ virtual void JSGGetTranslation(Vec* o_trans) const { + *o_trans = mTrans; + } /* 80038920 */ virtual void JSGSetTranslation(Vec const&); - /* 8003A0F4 */ virtual void JSGGetScaling(Vec*) const; + /* 8003A0F4 */ virtual void JSGGetScaling(Vec* o_scale) const { + *o_scale = mScale; + } /* 80038980 */ virtual void JSGSetScaling(Vec const&); - /* 8003A110 */ virtual void JSGGetRotation(Vec*) const; + /* 8003A110 */ virtual void JSGGetRotation(Vec* param_0) const { + param_0->x = mRotate.x * 0.005493164f; + param_0->y = mRotate.y * 0.005493164f; + param_0->z = mRotate.z * 0.005493164f; + } /* 800389A8 */ virtual void JSGSetRotation(Vec const&); /* 80038A0C */ virtual void JSGSetShape(u32); /* 80038A20 */ virtual void JSGSetAnimation(u32); /* 80038A40 */ virtual void JSGSetAnimationFrame(f32); - /* 8003A0C8 */ virtual f32 JSGGetAnimationFrameMax() const; + /* 8003A0C8 */ virtual f32 JSGGetAnimationFrameMax() const { + return mAnmFrameMax; + } /* 80038A54 */ virtual void JSGSetAnimationTransition(f32); /* 80038A68 */ virtual void JSGSetTextureAnimation(u32); /* 80038A7C */ virtual void JSGSetTextureAnimationFrame(f32); - /* 8003A0D0 */ virtual f32 JSGGetTextureAnimationFrameMax() const; + /* 8003A0D0 */ virtual f32 JSGGetTextureAnimationFrameMax() const { + return mTexAnmFrameMax; + } void setModel(J3DModel* p_model) { mModel = p_model; } u8 checkEnable(u16 flag) { return mFlags & flag; } @@ -104,7 +149,7 @@ class dDemo_actor_c : public JStage::TActor { /* 0x48 */ J3DModel* mModel; /* 0x4C */ dDemo_prm_c mPrm; /* 0x54 */ u32 field_0x54; - /* 0x58 */ u32 mActorId; + /* 0x58 */ fpc_ProcID mActorId; /* 0x5C */ u32 mOldAnmId; /* 0x60 */ u32 mBtpId; /* 0x64 */ u32 mBtkId; @@ -136,6 +181,15 @@ class dDemo_particle_c : public JStudio_JParticle::TCreateObject { class dDemo_light_c : public JStage::TLight { public: + enum Enable_e { + ENABLE_LIGHT_TYPE_e = (1 << 0), + ENABLE_POSITION_e = (1 << 1), + ENABLE_COLOR_e = (1 << 2), + ENABLE_DIST_ATTEN_e = (1 << 3), + ENABLE_ANGLE_ATTEN_e = (1 << 4), + ENABLE_DIRECTION_e = (1 << 5), + }; + dDemo_light_c() { mFlags = 0; } @@ -165,6 +219,13 @@ class dDemo_light_c : public JStage::TLight { class dDemo_fog_c : public JStage::TFog { public: + enum Enable_e { + ENABLE_FOG_FN_e = (1 << 0), + ENABLE_START_Z_e = (1 << 1), + ENABLE_END_Z_e = (1 << 2), + ENABLE_COLOR_e = (1 << 3), + }; + dDemo_fog_c() { mFlags = 0; } @@ -187,6 +248,17 @@ class dDemo_fog_c : public JStage::TFog { class dDemo_camera_c : public JStage::TCamera { public: + enum Enable_e { + ENABLE_PROJ_NEAR_e = (1 << 0), + ENABLE_PROJ_FAR_e = (1 << 1), + ENABLE_PROJ_FOVY_e = (1 << 2), + ENABLE_PROJ_ASPECT_e = (1 << 3), + ENABLE_VIEW_POS_e = (1 << 4), + ENABLE_VIEW_UP_VEC_e = (1 << 5), + ENABLE_VIEW_TARG_POS_e = (1 << 6), + ENABLE_VIEW_ROLL_e = (1 << 7), + }; + dDemo_camera_c() { mFlags = 0; } @@ -232,6 +304,10 @@ class dDemo_camera_c : public JStage::TCamera { class dDemo_ambient_c : public JStage::TAmbientLight { public: + enum Enable_e { + ENABLE_COLOR_e = (1 << 0), + }; + dDemo_ambient_c() { mFlags = 0; } @@ -257,6 +333,8 @@ class jstudio_tCreateObject_message : public JStudio::TCreateObject { class jstudio_tAdaptor_message : public JStudio::TAdaptor_message { public: + typedef JStudio::TObject_message ObjectType; + jstudio_tAdaptor_message() {} virtual ~jstudio_tAdaptor_message(); diff --git a/src/JSystem/JStage/JSGSystem.cpp b/src/JSystem/JStage/JSGSystem.cpp index c36d147ab05..5e66bf749ee 100644 --- a/src/JSystem/JStage/JSGSystem.cpp +++ b/src/JSystem/JStage/JSGSystem.cpp @@ -31,4 +31,4 @@ bool JStage::TSystem::JSGGetSystemData(u32) { } /* 80280F14-80280F18 27B854 0004+00 1/0 1/0 0/0 .text JSGSetSystemData__Q26JStage7TSystemFUlUl */ -void JStage::TSystem::JSGSetSystemData(u32, u32) {} \ No newline at end of file +void JStage::TSystem::JSGSetSystemData(u32, u32) {} diff --git a/src/d/actor/d_a_alink_demo.inc b/src/d/actor/d_a_alink_demo.inc index 5ab390fb509..49c30f673f3 100644 --- a/src/d/actor/d_a_alink_demo.inc +++ b/src/d/actor/d_a_alink_demo.inc @@ -1427,17 +1427,33 @@ f32 daAlink_c::setStickAnmData(J3DAnmBase* i_anm, int param_1, int param_2, u16 /* 80119464-801195C0 113DA4 015C+00 1/1 0/0 0/0 .text * daAlink_c_getDemoIDData__FP13dDemo_actor_cPiPiPiPUsPiPi */ +// NONMATCHING - some stack issues static int daAlink_c_getDemoIDData(dDemo_actor_c* param_0, int* param_1, int* param_2, int* param_3, u16* param_4, int* param_5, int* param_6) { - // NONMATCHING - static u8 dummy[20]; + JStudio::stb::TParseData_fixed<51, TValueIterator_misaligned > sp30(param_0->getPrm()->getData()); - /* JStudio::stb::TParseData_fixed<51> sp50((void*)param_0->getPrm()->getData()); + static JStudio::stb::TParseData_fixed<51, TValueIterator_misaligned > dummy; + static JGadget::binary::TValueIterator_misaligned it(dummy.begin()); - static JStudio::stb::TParseData_fixed<51> dummy; - static JGadget::binary::TValueIterator_raw it(sp50); */ + if (it == sp30.end()) { + it = dummy.begin(); + return 0; + } - return 0; + if (it == dummy.begin()) { + it = sp30.begin(); + } + + u32 var_r31 = *it; + *param_1 = var_r31 >> 0x1E; + *param_2 = (var_r31 >> 0x18) & 0xF; + *param_6 = (var_r31 >> 0x17) & 1; + *param_3 = (var_r31 >> 0x10) & 0xF; + *param_4 = var_r31 & 0xFFFF; + *param_5 = (var_r31 >> 0x14) & 7; + + it++; + return 1; } /* 801195C0-801195F8 113F00 0038+00 7/0 0/0 0/0 .text procDemoCommon__9daAlink_cFv */ diff --git a/src/d/d_demo.cpp b/src/d/d_demo.cpp index d8dea7bc2b8..a792f7c0c06 100644 --- a/src/d/d_demo.cpp +++ b/src/d/d_demo.cpp @@ -1,506 +1,8 @@ -// -// Generated By: dol2asm -// Translation Unit: d/d_demo -// - #include "d/d_demo.h" #include "d/d_msg_object.h" -#include "dol2asm.h" #include "m_Do/m_Do_graphic.h" #include "d/actor/d_a_movie_player.h" - -// -// Forward References: -// - -extern "C" void func_80037DE4(); -extern "C" static void func_80037E44(); -extern "C" void func_80037E74(); -extern "C" static void func_80037ED4(); -extern "C" void __ct__13dDemo_actor_cFv(); -extern "C" void __dt__13dDemo_actor_cFv(); -extern "C" void getActor__13dDemo_actor_cFv(); -extern "C" void setActor__13dDemo_actor_cFP10fopAc_ac_c(); -extern "C" void getPrm_Morf__13dDemo_actor_cFv(); -extern "C" void getDemoIDData__13dDemo_actor_cFPiPiPiPUsPUc(); -extern "C" static void dDemo_getJaiPointer__FPCcUliPUs(); -extern "C" void dDemo_setDemoData__FP10fopAc_ac_cUcP14mDoExt_McaMorfPCciPUsUlSc(); -extern "C" static void branchFile__FPCc(); -extern "C" void JSGSetData__13dDemo_actor_cFUlPCvUl(); -extern "C" void JSGSetTranslation__13dDemo_actor_cFRC3Vec(); -extern "C" void JSGSetScaling__13dDemo_actor_cFRC3Vec(); -extern "C" void JSGSetRotation__13dDemo_actor_cFRC3Vec(); -extern "C" void JSGSetShape__13dDemo_actor_cFUl(); -extern "C" void JSGSetAnimation__13dDemo_actor_cFUl(); -extern "C" void JSGSetAnimationFrame__13dDemo_actor_cFf(); -extern "C" void JSGSetAnimationTransition__13dDemo_actor_cFf(); -extern "C" void JSGSetTextureAnimation__13dDemo_actor_cFUl(); -extern "C" void JSGSetTextureAnimationFrame__13dDemo_actor_cFf(); -extern "C" static void getView__Fv(); -extern "C" void JSGGetProjectionNear__14dDemo_camera_cCFv(); -extern "C" void JSGSetProjectionNear__14dDemo_camera_cFf(); -extern "C" void JSGGetProjectionFar__14dDemo_camera_cCFv(); -extern "C" void JSGSetProjectionFar__14dDemo_camera_cFf(); -extern "C" void JSGGetProjectionFovy__14dDemo_camera_cCFv(); -extern "C" void JSGSetProjectionFovy__14dDemo_camera_cFf(); -extern "C" void JSGGetProjectionAspect__14dDemo_camera_cCFv(); -extern "C" void JSGSetProjectionAspect__14dDemo_camera_cFf(); -extern "C" void JSGGetViewPosition__14dDemo_camera_cCFP3Vec(); -extern "C" void JSGSetViewPosition__14dDemo_camera_cFRC3Vec(); -extern "C" void JSGGetViewUpVector__14dDemo_camera_cCFP3Vec(); -extern "C" void JSGSetViewUpVector__14dDemo_camera_cFRC3Vec(); -extern "C" void JSGGetViewTargetPosition__14dDemo_camera_cCFP3Vec(); -extern "C" void JSGSetViewTargetPosition__14dDemo_camera_cFRC3Vec(); -extern "C" void JSGGetViewRoll__14dDemo_camera_cCFv(); -extern "C" void JSGSetViewRoll__14dDemo_camera_cFf(); -extern "C" void JSGSetColor__15dDemo_ambient_cF8_GXColor(); -extern "C" void JSGSetLightType__13dDemo_light_cFQ26JStage7TELight(); -extern "C" void JSGSetPosition__13dDemo_light_cFRC3Vec(); -extern "C" void JSGSetColor__13dDemo_light_cF8_GXColor(); -extern "C" void JSGSetDistanceAttenuation__13dDemo_light_cFff13_GXDistAttnFn(); -extern "C" void JSGSetAngleAttenuation__13dDemo_light_cFf9_GXSpotFn(); -extern "C" void JSGSetDirection__13dDemo_light_cFRC3Vec(); -extern "C" void JSGSetFogFunction__11dDemo_fog_cF10_GXFogType(); -extern "C" void JSGSetStartZ__11dDemo_fog_cFf(); -extern "C" void JSGSetEndZ__11dDemo_fog_cFf(); -extern "C" void JSGSetColor__11dDemo_fog_cF8_GXColor(); -extern "C" void __ct__14dDemo_object_cFv(); -extern "C" void __dt__14dDemo_object_cFv(); -extern "C" void appendActor__14dDemo_object_cFP10fopAc_ac_c(); -extern "C" void getActor__14dDemo_object_cFUc(); -extern "C" void createCamera__14dDemo_object_cFv(); -extern "C" void getActiveCamera__14dDemo_object_cFv(); -extern "C" void createAmbient__14dDemo_object_cFv(); -extern "C" void appendLight__14dDemo_object_cFv(); -extern "C" void createFog__14dDemo_object_cFv(); -extern "C" void remove__14dDemo_object_cFv(); -extern "C" void __dt__11dDemo_fog_cFv(); -extern "C" void __dt__13dDemo_light_cFv(); -extern "C" void __dt__15dDemo_ambient_cFv(); -extern "C" void JSGFindObject__14dDemo_system_cCFPPQ26JStage7TObjectPCcQ26JStage8TEObject(); -extern "C" void create__7dDemo_cFv(); -extern "C" void remove__7dDemo_cFv(); -extern "C" void __dt__14dDemo_system_cFv(); -extern "C" void __dt__17jmessage_tControlFv(); -extern "C" void start__7dDemo_cFPCUcP4cXyzf(); -extern "C" void end__7dDemo_cFv(); -extern "C" void branch__7dDemo_cFv(); -extern "C" void update__7dDemo_cFv(); -extern "C" void setBranchType__7dDemo_cFUs(); -extern "C" void setBranchId__7dDemo_cFUss(); -extern "C" void reset__7dDemo_cFv(); -extern "C" void emitter_create__16dDemo_particle_cFUl(); -extern "C" void __dt__16dDemo_particle_cFv(); -extern "C" void __dt__14dDemo_camera_cFv(); -extern "C" void JSGFindNodeID__13dDemo_actor_cCFPCc(); -extern "C" void JSGGetNodeTransformation__13dDemo_actor_cCFUlPA4_f(); -extern "C" void JSGGetAnimationFrameMax__13dDemo_actor_cCFv(); -extern "C" void JSGGetTextureAnimationFrameMax__13dDemo_actor_cCFv(); -extern "C" void JSGGetTranslation__13dDemo_actor_cCFP3Vec(); -extern "C" void JSGGetScaling__13dDemo_actor_cCFP3Vec(); -extern "C" void JSGGetRotation__13dDemo_actor_cCFP3Vec(); -extern "C" extern char const* const d_d_demo__stringBase0; -extern "C" u16 m_branchId__7dDemo_c[1 + 3 /* padding */]; -extern "C" u8 m_system__7dDemo_c[4]; -extern "C" u8 m_control__7dDemo_c[4]; -extern "C" u8 m_stage__7dDemo_c[4]; -extern "C" u8 m_audio__7dDemo_c[4]; -extern "C" u8 m_particle__7dDemo_c[4]; -extern "C" u8 m_message__7dDemo_c[4]; -extern "C" u8 m_factory__7dDemo_c[4]; -extern "C" u8 m_mesgControl__7dDemo_c[4]; -extern "C" u8 m_object__7dDemo_c[4]; -extern "C" u8 m_data__7dDemo_c[4]; -extern "C" u8 m_frame__7dDemo_c[4]; -extern "C" u8 m_translation__7dDemo_c[4]; -extern "C" f32 m_rotationY__7dDemo_c; -extern "C" u8 m_frameNoMsg__7dDemo_c[4]; -extern "C" u8 m_mode__7dDemo_c[4]; -extern "C" u8 m_status__7dDemo_c[4]; -extern "C" u8 m_branchType__7dDemo_c[2 + 2 /* padding */]; -extern "C" u8 m_branchData__7dDemo_c[4]; - -// -// External References: -// - -extern "C" void fadeOut__13mDoGph_gInf_cFfR8_GXColor(); -extern "C" void __dt__4cXyzFv(); -extern "C" void setAnm__14mDoExt_McaMorfFP15J3DAnmTransformiffffPv(); -extern "C" void play__14mDoExt_McaMorfFP3VecUlSc(); -extern "C" void fopAcIt_Judge__FPFPvPv_PvPv(); -extern "C" void fopAcM_setStageLayer__FPv(); -extern "C" void fopAcM_fastCreate__FPCcUlPC4cXyziPC5csXyzPC4cXyzPFPv_iPv(); -extern "C" void fopAcM_searchFromName__FPCcUlUl(); -extern "C" void fpcSch_JudgeByID__FPvPv(); -extern "C" void dComIfGs_staffroll_next_go_check__Fv(); -extern "C" void daMP_c_THPPlayerPlay__6daMP_cFv(); -extern "C" void getRes__14dRes_control_cFPCcPCcP11dRes_info_ci(); -extern "C" void getIDRes__14dRes_control_cFPCcUsP11dRes_info_ci(); -extern "C" void -set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void __ct__17jmessage_tControlFv(); -extern "C" void setDemoMessage__12dMsgObject_cFUl(); -extern "C" void __dt__Q26JStage6TActorFv(); -extern "C" s32 JSGFGetType__Q26JStage6TActorCFv(); -extern "C" s32 JSGGetShape__Q26JStage6TActorCFv(); -extern "C" s32 JSGGetAnimation__Q26JStage6TActorCFv(); -extern "C" void JSGGetAnimationFrame__Q26JStage6TActorCFv(); -extern "C" void JSGGetAnimationTransition__Q26JStage6TActorCFv(); -extern "C" s32 JSGGetTextureAnimation__Q26JStage6TActorCFv(); -extern "C" void JSGGetTextureAnimationFrame__Q26JStage6TActorCFv(); -extern "C" void __dt__Q26JStage13TAmbientLightFv(); -extern "C" s32 JSGFGetType__Q26JStage13TAmbientLightCFv(); -extern "C" void JSGGetColor__Q26JStage13TAmbientLightCFv(); -extern "C" void __dt__Q26JStage7TCameraFv(); -extern "C" s32 JSGFGetType__Q26JStage7TCameraCFv(); -extern "C" bool JSGGetProjectionType__Q26JStage7TCameraCFv(); -extern "C" void JSGSetProjectionType__Q26JStage7TCameraFQ26JStage18TECameraProjection(); -extern "C" void JSGGetProjectionField__Q26JStage7TCameraCFPf(); -extern "C" void JSGSetProjectionField__Q26JStage7TCameraFPCf(); -extern "C" bool JSGGetViewType__Q26JStage7TCameraCFv(); -extern "C" void JSGSetViewType__Q26JStage7TCameraFQ26JStage12TECameraView(); -extern "C" void __dt__Q26JStage4TFogFv(); -extern "C" s32 JSGFGetType__Q26JStage4TFogCFv(); -extern "C" bool JSGGetFogFunction__Q26JStage4TFogCFv(); -extern "C" void JSGGetStartZ__Q26JStage4TFogCFv(); -extern "C" void JSGGetEndZ__Q26JStage4TFogCFv(); -extern "C" void JSGGetColor__Q26JStage4TFogCFv(); -extern "C" void __dt__Q26JStage6TLightFv(); -extern "C" s32 JSGFGetType__Q26JStage6TLightCFv(); -extern "C" bool JSGGetLightType__Q26JStage6TLightCFv(); -extern "C" void JSGGetColor__Q26JStage6TLightCFv(); -extern "C" void JSGGetDistanceAttenuation__Q26JStage6TLightCFPfPfP13_GXDistAttnFn(); -extern "C" void JSGGetAngleAttenuation__Q26JStage6TLightCFPfP9_GXSpotFn(); -extern "C" void JSGGetPosition__Q26JStage6TLightCFP3Vec(); -extern "C" void JSGGetDirection__Q26JStage6TLightCFP3Vec(); -extern "C" bool JSGGetName__Q26JStage7TObjectCFv(); -extern "C" void JSGUpdate__Q26JStage7TObjectFv(); -extern "C" bool JSGGetFlag__Q26JStage7TObjectCFv(); -extern "C" void JSGSetFlag__Q26JStage7TObjectFUl(); -extern "C" bool JSGGetData__Q26JStage7TObjectCFUlPvUl(); -extern "C" void JSGSetData__Q26JStage7TObjectFUlPCvUl(); -extern "C" void JSGGetParent__Q26JStage7TObjectCFPPQ26JStage7TObjectPUl(); -extern "C" void JSGSetParent__Q26JStage7TObjectFPQ26JStage7TObjectUl(); -extern "C" void JSGSetRelation__Q26JStage7TObjectFbPQ26JStage7TObjectUl(); -extern "C" s32 JSGFindNodeID__Q26JStage7TObjectCFPCc(); -extern "C" void JSGGetNodeTransformation__Q26JStage7TObjectCFUlPA4_f(); -extern "C" void __dt__Q26JStage7TSystemFv(); -extern "C" bool JSGFGetType__Q26JStage7TSystemCFv(); -extern "C" bool JSGCreateObject__Q26JStage7TSystemFPCcQ26JStage8TEObjectUl(); -extern "C" void JSGDestroyObject__Q26JStage7TSystemFPQ26JStage7TObject(); -extern "C" bool JSGGetSystemData__Q26JStage7TSystemFUl(); -extern "C" void JSGSetSystemData__Q26JStage7TSystemFUlUl(); -extern "C" void destroyObject_all__Q37JStudio3ctb8TControlFv(); -extern "C" void destroyObject_all__Q37JStudio3fvb8TControlFv(); -extern "C" void __ct__Q27JStudio8TControlFv(); -extern "C" void setFactory__Q27JStudio8TControlFPQ27JStudio8TFactory(); -extern "C" void transformOnSet_setOrigin_TxyzRy__Q27JStudio8TControlFRC3Vecf(); -extern "C" void transformOnGet_setOrigin_TxyzRy__Q27JStudio8TControlFRC3Vecf(); -extern "C" void __dt__Q27JStudio13TCreateObjectFv(); -extern "C" void appendCreateObject__Q27JStudio8TFactoryFPQ27JStudio13TCreateObject(); -extern "C" void __ct__Q27JStudio6TParseFPQ27JStudio8TControl(); -extern "C" void __dt__Q27JStudio6TParseFv(); -extern "C" void adaptor_do_prepare__Q27JStudio8TAdaptorFv(); -extern "C" void adaptor_do_begin__Q27JStudio8TAdaptorFv(); -extern "C" void adaptor_do_end__Q27JStudio8TAdaptorFv(); -extern "C" void adaptor_do_update__Q27JStudio8TAdaptorFUl(); -extern "C" void adaptor_do_data__Q27JStudio8TAdaptorFPCvUlPCvUl(); -extern "C" void __dt__Q27JStudio16TAdaptor_messageFv(); -extern "C" void -__ct__Q27JStudio15TObject_messageFRCQ47JStudio3stb4data20TParse_TBlock_objectPQ27JStudio16TAdaptor_message(); -extern "C" void destroyObject_all__Q37JStudio3stb8TControlFv(); -extern "C" void reset__Q37JStudio3stb8TControlFv(); -extern "C" void forward__Q37JStudio3stb8TControlFUl(); -extern "C" void -getData__Q47JStudio3stb4data22TParse_TParagraph_dataCFPQ57JStudio3stb4data22TParse_TParagraph_data5TData(); -extern "C" void __dt__Q217JStudio_JParticle13TCreateObjectFv(); -extern "C" void -create__Q217JStudio_JParticle13TCreateObjectFPPQ27JStudio7TObjectRCQ47JStudio3stb4data20TParse_TBlock_object(); -extern "C" void emitter_destroy__Q217JStudio_JParticle13TCreateObjectFP14JPABaseEmitter(); -extern "C" void __dt__Q28JMessage8TControlFv(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void parse_next__Q37JGadget6binary19TParse_header_blockFPPCvUl(); -extern "C" void getIndex__10JUTNameTabCFPCc(); -extern "C" void __register_global_object(); -extern "C" void _savegpr_21(); -extern "C" void _savegpr_27(); -extern "C" void _savegpr_28(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_21(); -extern "C" void _restgpr_27(); -extern "C" void _restgpr_28(); -extern "C" void _restgpr_29(); -extern "C" extern void* __vt__Q26JStage6TActor[35 + 1 /* padding */]; -extern "C" extern void* __vt__Q26JStage13TAmbientLight[17 + 1 /* padding */]; -extern "C" extern void* __vt__Q26JStage7TCamera[37 + 1 /* padding */]; -extern "C" extern void* __vt__Q26JStage4TFog[23 + 1 /* padding */]; -extern "C" extern void* __vt__Q26JStage6TLight[27 + 1 /* padding */]; -extern "C" extern void* __vt__Q26JStage7TObject[15 + 1 /* padding */]; -extern "C" extern void* __vt__Q26JStage7TSystem[20]; -extern "C" extern void* __vt__Q37JStudio3ctb8TFactory[5]; -extern "C" extern void* __vt__Q37JStudio3fvb8TFactory[5]; -extern "C" extern void* __vt__Q27JStudio8TFactory[5]; -extern "C" extern void* __vt__Q27JStudio8TAdaptor[8]; -extern "C" extern void* __vt__Q37JStudio3stb8TFactory[5]; -extern "C" extern void* __vt__Q214JStudio_JStage13TCreateObject[4]; -extern "C" extern void* __vt__Q215JStudio_JAudio213TCreateObject[4]; -extern "C" extern void* __vt__Q217JStudio_JParticle13TCreateObject[6]; -extern "C" u8 mDemoArcName__20dStage_roomControl_c[10 + 2 /* padding */]; -extern "C" extern Z2SoundStarter* data_80450B74; -extern "C" u8 mEmitterMng__13dPa_control_c[4]; - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 803A7910-803A7928 004A30 0018+00 2/2 0/0 0/0 .data __vt__16dDemo_particle_c */ -SECTION_DATA extern void* __vt__16dDemo_particle_c[6] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__16dDemo_particle_cFv, - (void*) - create__Q217JStudio_JParticle13TCreateObjectFPPQ27JStudio7TObjectRCQ47JStudio3stb4data20TParse_TBlock_object, - (void*)emitter_create__16dDemo_particle_cFUl, - (void*)emitter_destroy__Q217JStudio_JParticle13TCreateObjectFP14JPABaseEmitter, -}; - -/* 803A7928-803A7934 004A48 000C+00 1/1 1/1 0/0 .data __vt__17jmessage_tControl */ -SECTION_DATA extern void* __vt__17jmessage_tControl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__17jmessage_tControlFv, -}; - -/* 803A7934-803A7944 004A54 0010+00 1/1 1/1 0/0 .data __vt__Q27JStudio13TCreateObject */ -SECTION_DATA extern void* __vt__Q27JStudio13TCreateObject[4] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)NULL, - (void*)NULL, -}; - -/* 803A7944-803A7994 004A64 0050+00 2/2 0/0 0/0 .data __vt__14dDemo_system_c */ -SECTION_DATA extern void* __vt__14dDemo_system_c[20] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__14dDemo_system_cFv, - (void*)JSGFGetType__Q26JStage7TSystemCFv, - (void*)JSGGetName__Q26JStage7TObjectCFv, - (void*)JSGUpdate__Q26JStage7TObjectFv, - (void*)JSGGetFlag__Q26JStage7TObjectCFv, - (void*)JSGSetFlag__Q26JStage7TObjectFUl, - (void*)JSGGetData__Q26JStage7TObjectCFUlPvUl, - (void*)JSGSetData__Q26JStage7TObjectFUlPCvUl, - (void*)JSGGetParent__Q26JStage7TObjectCFPPQ26JStage7TObjectPUl, - (void*)JSGSetParent__Q26JStage7TObjectFPQ26JStage7TObjectUl, - (void*)JSGSetRelation__Q26JStage7TObjectFbPQ26JStage7TObjectUl, - (void*)JSGFindNodeID__Q26JStage7TObjectCFPCc, - (void*)JSGGetNodeTransformation__Q26JStage7TObjectCFUlPA4_f, - (void*)JSGFindObject__14dDemo_system_cCFPPQ26JStage7TObjectPCcQ26JStage8TEObject, - (void*)JSGCreateObject__Q26JStage7TSystemFPCcQ26JStage8TEObjectUl, - (void*)JSGDestroyObject__Q26JStage7TSystemFPQ26JStage7TObject, - (void*)JSGGetSystemData__Q26JStage7TSystemFUl, - (void*)JSGSetSystemData__Q26JStage7TSystemFUlUl, -}; - -/* 803A7994-803A79F0 004AB4 005C+00 2/2 0/0 0/0 .data __vt__11dDemo_fog_c */ -SECTION_DATA extern void* __vt__11dDemo_fog_c[23] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__11dDemo_fog_cFv, - (void*)JSGFGetType__Q26JStage4TFogCFv, - (void*)JSGGetName__Q26JStage7TObjectCFv, - (void*)JSGUpdate__Q26JStage7TObjectFv, - (void*)JSGGetFlag__Q26JStage7TObjectCFv, - (void*)JSGSetFlag__Q26JStage7TObjectFUl, - (void*)JSGGetData__Q26JStage7TObjectCFUlPvUl, - (void*)JSGSetData__Q26JStage7TObjectFUlPCvUl, - (void*)JSGGetParent__Q26JStage7TObjectCFPPQ26JStage7TObjectPUl, - (void*)JSGSetParent__Q26JStage7TObjectFPQ26JStage7TObjectUl, - (void*)JSGSetRelation__Q26JStage7TObjectFbPQ26JStage7TObjectUl, - (void*)JSGFindNodeID__Q26JStage7TObjectCFPCc, - (void*)JSGGetNodeTransformation__Q26JStage7TObjectCFUlPA4_f, - (void*)JSGGetFogFunction__Q26JStage4TFogCFv, - (void*)JSGSetFogFunction__11dDemo_fog_cF10_GXFogType, - (void*)JSGGetStartZ__Q26JStage4TFogCFv, - (void*)JSGSetStartZ__11dDemo_fog_cFf, - (void*)JSGGetEndZ__Q26JStage4TFogCFv, - (void*)JSGSetEndZ__11dDemo_fog_cFf, - (void*)JSGGetColor__Q26JStage4TFogCFv, - (void*)JSGSetColor__11dDemo_fog_cF8_GXColor, -}; - -/* 803A79F0-803A7A5C 004B10 006C+00 2/2 0/0 0/0 .data __vt__13dDemo_light_c */ -SECTION_DATA extern void* __vt__13dDemo_light_c[27] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__13dDemo_light_cFv, - (void*)JSGFGetType__Q26JStage6TLightCFv, - (void*)JSGGetName__Q26JStage7TObjectCFv, - (void*)JSGUpdate__Q26JStage7TObjectFv, - (void*)JSGGetFlag__Q26JStage7TObjectCFv, - (void*)JSGSetFlag__Q26JStage7TObjectFUl, - (void*)JSGGetData__Q26JStage7TObjectCFUlPvUl, - (void*)JSGSetData__Q26JStage7TObjectFUlPCvUl, - (void*)JSGGetParent__Q26JStage7TObjectCFPPQ26JStage7TObjectPUl, - (void*)JSGSetParent__Q26JStage7TObjectFPQ26JStage7TObjectUl, - (void*)JSGSetRelation__Q26JStage7TObjectFbPQ26JStage7TObjectUl, - (void*)JSGFindNodeID__Q26JStage7TObjectCFPCc, - (void*)JSGGetNodeTransformation__Q26JStage7TObjectCFUlPA4_f, - (void*)JSGGetLightType__Q26JStage6TLightCFv, - (void*)JSGSetLightType__13dDemo_light_cFQ26JStage7TELight, - (void*)JSGGetPosition__Q26JStage6TLightCFP3Vec, - (void*)JSGSetPosition__13dDemo_light_cFRC3Vec, - (void*)JSGGetColor__Q26JStage6TLightCFv, - (void*)JSGSetColor__13dDemo_light_cF8_GXColor, - (void*)JSGGetDistanceAttenuation__Q26JStage6TLightCFPfPfP13_GXDistAttnFn, - (void*)JSGSetDistanceAttenuation__13dDemo_light_cFff13_GXDistAttnFn, - (void*)JSGGetAngleAttenuation__Q26JStage6TLightCFPfP9_GXSpotFn, - (void*)JSGSetAngleAttenuation__13dDemo_light_cFf9_GXSpotFn, - (void*)JSGGetDirection__Q26JStage6TLightCFP3Vec, - (void*)JSGSetDirection__13dDemo_light_cFRC3Vec, -}; - -/* 803A7A5C-803A7AA0 004B7C 0044+00 2/2 0/0 0/0 .data __vt__15dDemo_ambient_c */ -SECTION_DATA extern void* __vt__15dDemo_ambient_c[17] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__15dDemo_ambient_cFv, - (void*)JSGFGetType__Q26JStage13TAmbientLightCFv, - (void*)JSGGetName__Q26JStage7TObjectCFv, - (void*)JSGUpdate__Q26JStage7TObjectFv, - (void*)JSGGetFlag__Q26JStage7TObjectCFv, - (void*)JSGSetFlag__Q26JStage7TObjectFUl, - (void*)JSGGetData__Q26JStage7TObjectCFUlPvUl, - (void*)JSGSetData__Q26JStage7TObjectFUlPCvUl, - (void*)JSGGetParent__Q26JStage7TObjectCFPPQ26JStage7TObjectPUl, - (void*)JSGSetParent__Q26JStage7TObjectFPQ26JStage7TObjectUl, - (void*)JSGSetRelation__Q26JStage7TObjectFbPQ26JStage7TObjectUl, - (void*)JSGFindNodeID__Q26JStage7TObjectCFPCc, - (void*)JSGGetNodeTransformation__Q26JStage7TObjectCFUlPA4_f, - (void*)JSGGetColor__Q26JStage13TAmbientLightCFv, - (void*)JSGSetColor__15dDemo_ambient_cF8_GXColor, -}; - -/* 803A7AA0-803A7B34 004BC0 0094+00 2/2 0/0 0/0 .data __vt__14dDemo_camera_c */ -SECTION_DATA extern void* __vt__14dDemo_camera_c[37] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__14dDemo_camera_cFv, - (void*)JSGFGetType__Q26JStage7TCameraCFv, - (void*)JSGGetName__Q26JStage7TObjectCFv, - (void*)JSGUpdate__Q26JStage7TObjectFv, - (void*)JSGGetFlag__Q26JStage7TObjectCFv, - (void*)JSGSetFlag__Q26JStage7TObjectFUl, - (void*)JSGGetData__Q26JStage7TObjectCFUlPvUl, - (void*)JSGSetData__Q26JStage7TObjectFUlPCvUl, - (void*)JSGGetParent__Q26JStage7TObjectCFPPQ26JStage7TObjectPUl, - (void*)JSGSetParent__Q26JStage7TObjectFPQ26JStage7TObjectUl, - (void*)JSGSetRelation__Q26JStage7TObjectFbPQ26JStage7TObjectUl, - (void*)JSGFindNodeID__Q26JStage7TObjectCFPCc, - (void*)JSGGetNodeTransformation__Q26JStage7TObjectCFUlPA4_f, - (void*)JSGGetProjectionType__Q26JStage7TCameraCFv, - (void*)JSGSetProjectionType__Q26JStage7TCameraFQ26JStage18TECameraProjection, - (void*)JSGGetProjectionNear__14dDemo_camera_cCFv, - (void*)JSGSetProjectionNear__14dDemo_camera_cFf, - (void*)JSGGetProjectionFar__14dDemo_camera_cCFv, - (void*)JSGSetProjectionFar__14dDemo_camera_cFf, - (void*)JSGGetProjectionFovy__14dDemo_camera_cCFv, - (void*)JSGSetProjectionFovy__14dDemo_camera_cFf, - (void*)JSGGetProjectionAspect__14dDemo_camera_cCFv, - (void*)JSGSetProjectionAspect__14dDemo_camera_cFf, - (void*)JSGGetProjectionField__Q26JStage7TCameraCFPf, - (void*)JSGSetProjectionField__Q26JStage7TCameraFPCf, - (void*)JSGGetViewType__Q26JStage7TCameraCFv, - (void*)JSGSetViewType__Q26JStage7TCameraFQ26JStage12TECameraView, - (void*)JSGGetViewPosition__14dDemo_camera_cCFP3Vec, - (void*)JSGSetViewPosition__14dDemo_camera_cFRC3Vec, - (void*)JSGGetViewUpVector__14dDemo_camera_cCFP3Vec, - (void*)JSGSetViewUpVector__14dDemo_camera_cFRC3Vec, - (void*)JSGGetViewTargetPosition__14dDemo_camera_cCFP3Vec, - (void*)JSGSetViewTargetPosition__14dDemo_camera_cFRC3Vec, - (void*)JSGGetViewRoll__14dDemo_camera_cCFv, - (void*)JSGSetViewRoll__14dDemo_camera_cFf, -}; - -/* 803A7B34-803A7BC0 004C54 008C+00 2/2 0/0 0/0 .data __vt__13dDemo_actor_c */ -SECTION_DATA extern void* __vt__13dDemo_actor_c[35] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__13dDemo_actor_cFv, - (void*)JSGFGetType__Q26JStage6TActorCFv, - (void*)JSGGetName__Q26JStage7TObjectCFv, - (void*)JSGUpdate__Q26JStage7TObjectFv, - (void*)JSGGetFlag__Q26JStage7TObjectCFv, - (void*)JSGSetFlag__Q26JStage7TObjectFUl, - (void*)JSGGetData__Q26JStage7TObjectCFUlPvUl, - (void*)JSGSetData__13dDemo_actor_cFUlPCvUl, - (void*)JSGGetParent__Q26JStage7TObjectCFPPQ26JStage7TObjectPUl, - (void*)JSGSetParent__Q26JStage7TObjectFPQ26JStage7TObjectUl, - (void*)JSGSetRelation__Q26JStage7TObjectFbPQ26JStage7TObjectUl, - (void*)JSGFindNodeID__13dDemo_actor_cCFPCc, - (void*)JSGGetNodeTransformation__13dDemo_actor_cCFUlPA4_f, - (void*)JSGGetTranslation__13dDemo_actor_cCFP3Vec, - (void*)JSGSetTranslation__13dDemo_actor_cFRC3Vec, - (void*)JSGGetScaling__13dDemo_actor_cCFP3Vec, - (void*)JSGSetScaling__13dDemo_actor_cFRC3Vec, - (void*)JSGGetRotation__13dDemo_actor_cCFP3Vec, - (void*)JSGSetRotation__13dDemo_actor_cFRC3Vec, - (void*)JSGGetShape__Q26JStage6TActorCFv, - (void*)JSGSetShape__13dDemo_actor_cFUl, - (void*)JSGGetAnimation__Q26JStage6TActorCFv, - (void*)JSGSetAnimation__13dDemo_actor_cFUl, - (void*)JSGGetAnimationFrame__Q26JStage6TActorCFv, - (void*)JSGSetAnimationFrame__13dDemo_actor_cFf, - (void*)JSGGetAnimationFrameMax__13dDemo_actor_cCFv, - (void*)JSGGetAnimationTransition__Q26JStage6TActorCFv, - (void*)JSGSetAnimationTransition__13dDemo_actor_cFf, - (void*)JSGGetTextureAnimation__Q26JStage6TActorCFv, - (void*)JSGSetTextureAnimation__13dDemo_actor_cFUl, - (void*)JSGGetTextureAnimationFrame__Q26JStage6TActorCFv, - (void*)JSGSetTextureAnimationFrame__13dDemo_actor_cFf, - (void*)JSGGetTextureAnimationFrameMax__13dDemo_actor_cCFv, -}; - -/* 803A7BC0-803A7BE4 004CE0 0024+00 1/1 1/1 0/0 .data __vt__Q27JStudio16TAdaptor_message - */ -SECTION_DATA extern void* __vt__Q27JStudio16TAdaptor_message[9] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)NULL, - (void*)adaptor_do_prepare__Q27JStudio8TAdaptorFv, - (void*)adaptor_do_begin__Q27JStudio8TAdaptorFv, - (void*)adaptor_do_end__Q27JStudio8TAdaptorFv, - (void*)adaptor_do_update__Q27JStudio8TAdaptorFUl, - (void*)adaptor_do_data__Q27JStudio8TAdaptorFPCvUlPCvUl, - (void*)NULL, -}; - -/* 803A7BE4-803A7BF4 004D04 0010+00 2/2 0/0 0/0 .data - * __vt__Q220@unnamed@d_demo_cpp@29jstudio_tCreateObject_message */ -SECTION_DATA extern void* data_803A7BE4[4] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)func_80037E74, - (void*)func_80037ED4, -}; - -/* 803A7BF4-803A7C18 004D14 0024+00 2/2 0/0 0/0 .data - * __vt__Q220@unnamed@d_demo_cpp@24jstudio_tAdaptor_message */ -SECTION_DATA extern void* data_803A7BF4[9] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)func_80037DE4, - (void*)adaptor_do_prepare__Q27JStudio8TAdaptorFv, - (void*)adaptor_do_begin__Q27JStudio8TAdaptorFv, - (void*)adaptor_do_end__Q27JStudio8TAdaptorFv, - (void*)adaptor_do_update__Q27JStudio8TAdaptorFUl, - (void*)adaptor_do_data__Q27JStudio8TAdaptorFPCvUlPCvUl, - (void*)func_80037E44, -}; +#include "JSystem/JGadget/pointer.h" namespace { /* 80037DE4-80037E44 032724 0060+00 1/0 0/0 0/0 .text @@ -510,10 +12,25 @@ jstudio_tAdaptor_message::~jstudio_tAdaptor_message() {} /* 80037E44-80037E74 032784 0030+00 1/0 0/0 0/0 .text * adaptor_do_MESSAGE__Q220@unnamed@d_demo_cpp@24jstudio_tAdaptor_messageFQ37JStudio4data15TEOperationDataPCvUl */ -void jstudio_tAdaptor_message::adaptor_do_MESSAGE(JStudio::data::TEOperationData param_0, +void jstudio_tAdaptor_message::adaptor_do_MESSAGE(JStudio::data::TEOperationData iType, const void* pContent, u32 uSize) { - if (param_0 == JStudio::data::UNK_0x19) { + switch (iType) { + case JStudio::data::UNK_0x19: + JUT_ASSERT(107, pContent!=0); + JUT_ASSERT(108, uSize==4); dMsgObject_setDemoMessage(*(u32*)pContent); + break; + default: +#ifdef DEBUG + JGadget_outMessage msg(JGadget_outMessage::warning, __FILE__, 124); + const char* id_string = adaptor_getID_string(); + + msg << "unknown data-type : "; + msg << iType; + msg << "\n demo-object : "; + msg << id_string; +#endif + break; } } @@ -525,50 +42,34 @@ jstudio_tCreateObject_message::~jstudio_tCreateObject_message() {} * create__Q220@unnamed@d_demo_cpp@29jstudio_tCreateObject_messageFPPQ27JStudio7TObjectRCQ47JStudio3stb4data20TParse_TBlock_object */ bool -jstudio_tCreateObject_message::create(JStudio::TObject** param_0, - const JStudio::stb::data::TParse_TBlock_object& param_1) { - // NONMATCHING -} - -}; // namespace - -/* 80037DE4-80037E44 032724 0060+00 1/0 0/0 0/0 .text - * __dt__Q220@unnamed@d_demo_cpp@24jstudio_tAdaptor_messageFv */ -void func_80037DE4() { - // NONMATCHING -} +jstudio_tCreateObject_message::create(JStudio::TObject** ppObject, + const JStudio::stb::data::TParse_TBlock_object& iBlock) { + JUT_ASSERT(168, ppObject!=0); + + switch (iBlock.get_type()) { + case 'JMSG': { + jstudio_tAdaptor_message* adaptor = new jstudio_tAdaptor_message(); + if (adaptor == NULL) { + return false; + } -/* 80037E44-80037E74 032784 0030+00 1/0 0/0 0/0 .text - * adaptor_do_MESSAGE__Q220@unnamed@d_demo_cpp@24jstudio_tAdaptor_messageFQ37JStudio4data15TEOperationDataPCvUl - */ -static void func_80037E44() { - // NONMATCHING -} + JGadget::TPointer_delete sp8(adaptor); + JStudio::TObject_message* object = JStudio::TCreateObject::createFromAdaptor(iBlock, adaptor); + if (object == NULL) { + return false; + } -/* 80037E74-80037ED4 0327B4 0060+00 1/0 0/0 0/0 .text - * __dt__Q220@unnamed@d_demo_cpp@29jstudio_tCreateObject_messageFv */ -void func_80037E74() { - // NONMATCHING -} + sp8.set(NULL); + *ppObject = object; -/* 80037ED4-80038020 032814 014C+00 1/0 0/0 0/0 .text - * create__Q220@unnamed@d_demo_cpp@29jstudio_tCreateObject_messageFPPQ27JStudio7TObjectRCQ47JStudio3stb4data20TParse_TBlock_object - */ -static void func_80037ED4() { - // NONMATCHING + return true; + } + default: + return false; + } } -/* ############################################################################################## */ -/* 80451DB0-80451DB4 0003B0 0004+00 9/9 0/0 0/0 .sdata2 @4040 */ -SECTION_SDATA2 static u8 lit_4040[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; - -/* 80451DB4-80451DB8 0003B4 0004+00 6/6 0/0 0/0 .sdata2 @4041 */ -SECTION_SDATA2 static f32 lit_4041 = 1.0f; +}; // namespace /* 80038020-80038098 032960 0078+00 1/1 0/0 0/0 .text __ct__13dDemo_actor_cFv */ dDemo_actor_c::dDemo_actor_c() { @@ -581,7 +82,6 @@ dDemo_actor_c::dDemo_actor_c() { mTexAnmFrameMax = FLT_MAX; } - /* 80038098-80038128 0329D8 0090+00 1/0 0/0 0/0 .text __dt__13dDemo_actor_cFv */ dDemo_actor_c::~dDemo_actor_c() { fopAc_ac_c* actor = getActor(); @@ -596,7 +96,6 @@ dDemo_actor_c::~dDemo_actor_c() { mBrkId = -1; } - /* 80038128-8003815C 032A68 0034+00 1/1 0/0 0/0 .text getActor__13dDemo_actor_cFv */ fopAc_ac_c* dDemo_actor_c::getActor() { return fopAcM_SearchByID(mActorId); @@ -605,7 +104,7 @@ fopAc_ac_c* dDemo_actor_c::getActor() { /* 8003815C-8003819C 032A9C 0040+00 1/1 1/1 0/0 .text setActor__13dDemo_actor_cFP10fopAc_ac_c */ void dDemo_actor_c::setActor(fopAc_ac_c* pActor) { if (pActor == NULL) { - mActorId = -1; + mActorId = fpcM_ERROR_PROCESS_ID_e; } else { mActorId = fopAcM_GetID(pActor); } @@ -616,18 +115,48 @@ void dDemo_actor_c::setActor(fopAc_ac_c* pActor) { mBrkId = -1; } -/* ############################################################################################## */ -/* 80451DB8-80451DC0 0003B8 0008+00 4/4 0/0 0/0 .sdata2 @4127 */ -SECTION_SDATA2 static f64 lit_4127 = 4503601774854144.0 /* cast s32 to float */; - /* 8003819C-80038338 032ADC 019C+00 1/1 1/1 1/1 .text getPrm_Morf__13dDemo_actor_cFv */ f32 dDemo_actor_c::getPrm_Morf() { - // NONMATCHING -} + if (checkEnable(ENABLE_ANM_TRANSITION_e)) { + return mAnmTransition; + } -/* ############################################################################################## */ -/* 80424648-8042465C 051368 0014+00 1/1 0/0 0/0 .bss dummy$4203 */ -static u8 dummy[20]; + if (!checkEnable(1)) { + return 0.0f; + } + + dDemo_prm_data* prm = mPrm.mData; + + switch (mPrm.field_0x0) { + case 1: + if (field_0x54 < 4) { + return 0.0f; + } + return prm->field_0x4; + case 2: + if (field_0x54 < 7) { + return 0.0f; + } + return prm->field_0x7; + case 4: + if (field_0x54 < 6) { + return 0.0f; + } + return prm->field_0x6; + case 5: + if (field_0x54 < 0xB) { + return 0.0f; + } + return prm->field_0xb; + case 6: + if (field_0x54 < 0xF) { + return 0.0f; + } + return prm->field_0xf; + default: + return 0.0f; + } +} /* 80450E00-80450E04 000300 0004+00 2/2 0/0 0/0 .sbss m_system__7dDemo_c */ dDemo_system_c* dDemo_c::m_system; @@ -683,148 +212,216 @@ u16 dDemo_c::m_branchType; /* 80450E44-80450E48 000344 0004+00 5/5 0/0 0/0 .sbss m_branchData__7dDemo_c */ const u8* dDemo_c::m_branchData; -/* 80450E48-80450E4C -00001 0004+00 1/1 0/0 0/0 .sbss None */ -/* 80450E48 0001+00 data_80450E48 None */ -/* 80450E49 0003+00 data_80450E49 None */ -static u8 struct_80450E48[4]; - -/* 80450E4C-80450E50 00034C 0004+00 1/1 0/0 0/0 .sbss it$4206 */ -static int it; - /* 80038338-80038490 032C78 0158+00 0/0 1/1 5/5 .text getDemoIDData__13dDemo_actor_cFPiPiPiPUsPUc */ +// NONMATCHING - some stack issues int dDemo_actor_c::getDemoIDData(int* param_0, int* param_1, int* param_2, u16* param_3, u8* param_4) { - // NONMATCHING + JStudio::stb::TParseData_fixed<51, TValueIterator_misaligned > data(getPrm()->getData()); + + static JStudio::stb::TParseData_fixed<51, TValueIterator_misaligned > dummy; + static JGadget::binary::TValueIterator_misaligned it(dummy.begin()); + + if (it == data.end()) { + it = dummy.begin(); + return 0; + } + + if (it == dummy.begin()) { + it = data.begin(); + } + + u32 var_r31 = *it; + *param_0 = var_r31 >> 0x1E; + *param_1 = (var_r31 >> 0x18) & 0xF; + *param_2 = (var_r31 >> 0x10) & 0xF; + *param_3 = var_r31 & 0xFFFF; + + if (param_4 != NULL) { + *param_4 = (var_r31 >> 0x17) & 1; + } + + it++; + return 1; } /* 80038490-80038518 032DD0 0088+00 1/1 0/0 0/0 .text dDemo_getJaiPointer__FPCcUliPUs */ -static void* dDemo_getJaiPointer(char const* param_0, u32 param_1, int param_2, u16* param_3) { - // NONMATCHING -} +// NONMATCHING - slight problem with loop +static void* dDemo_getJaiPointer(char const* arcName, u32 anmID, int param_2, u16* param_3) { + if (param_2 <= 0 || param_3 == NULL) { + return NULL; + } + + int var_r31 = 0; -/* ############################################################################################## */ -/* 80451DC0-80451DC4 0003C0 0004+00 1/1 0/0 0/0 .sdata2 @4152 */ -SECTION_SDATA2 static f32 lit_4152 = -1.0f; + for (int i = 0; i < param_2; i++, var_r31 += 2) { + if ((u16)anmID == param_3[var_r31]) { + return dComIfG_getObjectIDRes(arcName, param_3[var_r31 + 1]); + } + } + + return NULL; +} /* 80038518-800387A8 032E58 0290+00 0/0 0/0 2/2 .text * dDemo_setDemoData__FP10fopAc_ac_cUcP14mDoExt_McaMorfPCciPUsUlSc */ -// reg alloc -#ifdef NONMATCHING -int dDemo_setDemoData(fopAc_ac_c* param_0, u8 param_1, mDoExt_McaMorf* param_2, char const* param_3, - int param_4, u16* param_5, u32 param_6, s8 param_7) { - dDemo_actor_c* demo_actor = dDemo_c::getActor(param_0->demoActorID); +// NONMATCHING - reg alloc +int dDemo_setDemoData(fopAc_ac_c* i_actor, u8 i_flags, mDoExt_McaMorf* i_morf, char const* i_arcName, + int param_4, u16* param_5, u32 param_6, s8 i_reverb) { + dDemo_actor_c* demo_actor = dDemo_c::getActor(i_actor->demoActorID); if (demo_actor == NULL) { return 0; } - u8 flags = demo_actor->checkEnable(param_1); - if (flags & 2) { - param_0->current.pos = demo_actor->getTrans(); - param_0->old.pos = param_0->current.pos; + u8 flags = demo_actor->checkEnable(i_flags); + if (flags & dDemo_actor_c::ENABLE_TRANS_e) { + i_actor->current.pos = demo_actor->getTrans(); + i_actor->old.pos = i_actor->current.pos; } - if (flags & 8) { - param_0->shape_angle = demo_actor->getRatate(); + if (flags & dDemo_actor_c::ENABLE_ROTATE_e) { + i_actor->shape_angle = demo_actor->getRatate(); } - if (flags & 4) { - param_0->scale = demo_actor->getScale(); + if (flags & dDemo_actor_c::ENABLE_SCALE_e) { + i_actor->scale = demo_actor->getScale(); } - if (flags & 0x80) { - param_0->gravity = demo_actor->getPrm_Morf(); + if (flags & dDemo_actor_c::ENABLE_ANM_TRANSITION_e) { + i_actor->gravity = demo_actor->getPrm_Morf(); } - if (param_2 == NULL) { + if (i_morf == NULL) { return 1; } - demo_actor->setModel(param_2->getModel()); + demo_actor->setModel(i_morf->getModel()); - if (flags & 0x20) { + if (flags & dDemo_actor_c::ENABLE_ANM_e) { u32 anmID = demo_actor->getAnmId(); if (anmID != demo_actor->getOldAnmId()) { const char* a_name; if (anmID & 0x10000) { a_name = dStage_roomControl_c::getDemoArcName(); + JUT_ASSERT(267, a_name != NULL); } else { - a_name = param_3; + a_name = i_arcName; } demo_actor->setOldAnmId(anmID); J3DAnmTransform* i_key = (J3DAnmTransform*)dComIfG_getObjectIDRes(a_name, anmID); + JUT_ASSERT(272, i_key != 0); + void* ptr = dDemo_getJaiPointer(a_name, anmID, param_4, param_5); - param_2->setAnm(i_key, -1, demo_actor->getPrm_Morf(), 1.0f, 0.0f, -1.0f, ptr); - demo_actor->setAnmFrameMax(param_2->getEndFrame()); + i_morf->setAnm(i_key, -1, demo_actor->getPrm_Morf(), 1.0f, 0.0f, -1.0f, ptr); + demo_actor->setAnmFrameMax(i_morf->getEndFrame()); } } - if (flags & 0x40) { + if (flags & dDemo_actor_c::ENABLE_ANM_FRAME_e) { f32 anm_frame = demo_actor->getAnmFrame(); if (anm_frame > 1.0f) { - param_2->setFrame(anm_frame - 1.0f); - param_2->play(¶m_0->current.pos, param_6, param_7); + i_morf->setFrame(anm_frame - 1.0f); + i_morf->play(&i_actor->current.pos, param_6, i_reverb); } else { - param_2->setFrame(anm_frame); + i_morf->setFrame(anm_frame); } } else { - param_2->play(¶m_0->current.pos, param_6, param_7); + i_morf->play(&i_actor->current.pos, param_6, i_reverb); } return 1; } -#else -void dDemo_setDemoData(fopAc_ac_c* param_0, u8 param_1, mDoExt_McaMorf* param_2, - char const* a_name, int param_4, u16* param_5, u32 param_6, - s8 param_7) { - // NONMATCHING -} -#endif /* 800387A8-800387EC 0330E8 0044+00 1/1 0/0 0/0 .text branchFile__FPCc */ static void branchFile(char const* resName) { - dDemo_c::setBranchData( - (u8*)dComIfG_getObjectRes(dStage_roomControl_c::getDemoArcName(), resName)); -} + u8* branchData = (u8*)dComIfG_getObjectRes(dStage_roomControl_c::getDemoArcName(), resName); + JUT_ASSERT(712, branchData != 0); -/* ############################################################################################## */ -/* 803797F8-803797F8 005E58 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_803797F8 = "-"; -#pragma pop + dDemo_c::setBranchData(branchData); +} /* 80450620-80450628 0000A0 0002+06 3/3 1/1 0/0 .sdata m_branchId__7dDemo_c */ -SECTION_SDATA s16 dDemo_c::m_branchId = -1; +s16 dDemo_c::m_branchId = -1; /* 800387EC-80038920 03312C 0134+00 1/0 0/0 0/0 .text JSGSetData__13dDemo_actor_cFUlPCvUl */ -void dDemo_actor_c::JSGSetData(u32 param_0, void const* param_1, u32 param_2) { - // NONMATCHING -} +void dDemo_actor_c::JSGSetData(u32 id, void const* pdata, u32 param_2) { + if (id == 1) { + JStudio::stb::TParseData_fixed<50, TValueIterator_misaligned > data(pdata); + if (!data.isEnd() && data.isValid()) { + JGadget::binary::TValueIterator_misaligned value(data.begin()); + + dDemo_c::setBranchType(*value); + OS_REPORT("JSGSetData: 分岐条件<%d>\n", *value); + } + } else if (id == 2) { + JUT_ASSERT(728, dDemo_c::getBranchId() >= 0); -/* ############################################################################################## */ -/* 80451DC4-80451DC8 0003C4 0004+00 1/1 0/0 0/0 .sdata2 @4553 */ -SECTION_SDATA2 static f32 lit_4553 = -1.0000000331813535e+32f; + JStudio::stb::TParseData_string string_data(pdata); -/* 80451DC8-80451DCC 0003C8 0004+00 1/1 0/0 0/0 .sdata2 @4554 */ -SECTION_SDATA2 static f32 lit_4554 = 1.0000000331813535e+32f; + u32 num = string_data.size(); + // "JSGSetData: Branch dDemo_c::getBranchId()); + + const char* str = string_data.getData(); + for (s16 i = 0; i < dDemo_c::getBranchId(); i++) { + OS_REPORT("\"%s\"", str); + str += strlen(str) + 1; + } + + // "Select<%d:\"%s\">\n" + OS_REPORT(" 選択<%d:\"%s\">\n", dDemo_c::getBranchId(), str); + + if (strcmp(str, "-") != 0) { + branchFile(str); + } + } else if (id == 3) { + JStudio::stb::TParseData_string data(pdata); + + u32 num = data.size(); + JUT_ASSERT(0x2ED, num == 1); + + const char* str = data.getData(); + // "JSGSetData: Change<\"%s\">\n" + OS_REPORT("JSGSetData: 切り替え<\"%s\">\n", str); + + branchFile(str); + } else { + JUT_ASSERT(0x2F3, id == ID_NORMAL); + + mPrm.field_0x0 = id; + mPrm.mData = (dDemo_prm_data*)pdata; + field_0x54 = param_2; + + onEnable(1); + } +} /* 80038920-80038980 033260 0060+00 1/0 0/0 0/0 .text JSGSetTranslation__13dDemo_actor_cFRC3Vec */ -void dDemo_actor_c::JSGSetTranslation(Vec const& param_0) { - // NONMATCHING +void dDemo_actor_c::JSGSetTranslation(Vec const& i_trans) { + if (-1.0E+32f < i_trans.x && i_trans.x < 1.0E+32f && -1.0E+32f < i_trans.y && i_trans.y < 1.0E+32f && -1.0E+32f < i_trans.z && i_trans.z < 1.0E+32f) { + mTrans.x = i_trans.x; + mTrans.y = i_trans.y; + mTrans.z = i_trans.z; + onEnable(ENABLE_TRANS_e); + } else { + // "\n\n!!JSGSetTranslation outside of range. x[%f]y[%f]z[%f]\n" + JUT_ASSERT(789, "\n\n!!JSGSetTranslationで範囲外の指定がされました。x[%f]y[%f]z[%f]\n", i_trans.x, i_trans.y, i_trans.z); + } } /* 80038980-800389A8 0332C0 0028+00 1/0 0/0 0/0 .text JSGSetScaling__13dDemo_actor_cFRC3Vec */ void dDemo_actor_c::JSGSetScaling(Vec const& i_scale) { mScale = i_scale; - onEnable(0x4); + onEnable(ENABLE_SCALE_e); } /* 800389A8-80038A0C 0332E8 0064+00 1/0 0/0 0/0 .text JSGSetRotation__13dDemo_actor_cFRC3Vec */ @@ -832,13 +429,13 @@ void dDemo_actor_c::JSGSetRotation(Vec const& i_rotate) { mRotate.x = i_rotate.x * 182.04444885253906f; mRotate.y = i_rotate.y * 182.04444885253906f; mRotate.z = i_rotate.z * 182.04444885253906f; - onEnable(0x8); + onEnable(ENABLE_ROTATE_e); } /* 80038A0C-80038A20 03334C 0014+00 1/0 0/0 0/0 .text JSGSetShape__13dDemo_actor_cFUl */ void dDemo_actor_c::JSGSetShape(u32 i_shape) { mShape = i_shape; - onEnable(0x10); + onEnable(ENABLE_SHAPE_e); } /* 80038A20-80038A40 033360 0020+00 1/0 0/0 0/0 .text JSGSetAnimation__13dDemo_actor_cFUl @@ -846,34 +443,34 @@ void dDemo_actor_c::JSGSetShape(u32 i_shape) { void dDemo_actor_c::JSGSetAnimation(u32 i_anmID) { mAnmId = i_anmID; mAnmFrameMax = FLT_MAX; - onEnable(0x20); + onEnable(ENABLE_ANM_e); } /* 80038A40-80038A54 033380 0014+00 1/0 0/0 0/0 .text JSGSetAnimationFrame__13dDemo_actor_cFf */ void dDemo_actor_c::JSGSetAnimationFrame(f32 i_frame) { mAnmFrame = i_frame; - onEnable(0x40); + onEnable(ENABLE_ANM_FRAME_e); } /* 80038A54-80038A68 033394 0014+00 1/0 0/0 0/0 .text JSGSetAnimationTransition__13dDemo_actor_cFf */ void dDemo_actor_c::JSGSetAnimationTransition(f32 i_trans) { mAnmTransition = i_trans; - onEnable(0x80); + onEnable(ENABLE_ANM_TRANSITION_e); } /* 80038A68-80038A7C 0333A8 0014+00 1/0 0/0 0/0 .text JSGSetTextureAnimation__13dDemo_actor_cFUl */ void dDemo_actor_c::JSGSetTextureAnimation(u32 i_anm) { mTexAnm = i_anm; - onEnable(0x100); + onEnable(ENABLE_TEX_ANM); } /* 80038A7C-80038A90 0333BC 0014+00 1/0 0/0 0/0 .text * JSGSetTextureAnimationFrame__13dDemo_actor_cFf */ void dDemo_actor_c::JSGSetTextureAnimationFrame(f32 i_frame) { mTexAnmFrame = i_frame; - onEnable(0x200); + onEnable(ENABLE_TEX_ANM_FRAME_e); } /* 80038A90-80038AC4 0333D0 0034+00 8/8 0/0 0/0 .text getView__Fv */ @@ -891,7 +488,7 @@ f32 dDemo_camera_c::JSGGetProjectionNear() const { view_class* view = getView(); if (view == NULL) { - return FLOAT_LABEL(lit_4040); + return 0.0f; } return view->mNear; @@ -900,7 +497,7 @@ f32 dDemo_camera_c::JSGGetProjectionNear() const { /* 80038AF8-80038B0C 033438 0014+00 1/0 0/0 0/0 .text JSGSetProjectionNear__14dDemo_camera_cFf */ void dDemo_camera_c::JSGSetProjectionNear(f32 i_projNear) { mProjNear = i_projNear; - onEnable(0x1); + onEnable(ENABLE_PROJ_NEAR_e); } /* 80038B0C-80038B40 03344C 0034+00 1/0 0/0 0/0 .text JSGGetProjectionFar__14dDemo_camera_cCFv */ @@ -908,7 +505,7 @@ f32 dDemo_camera_c::JSGGetProjectionFar() const { view_class* view = getView(); if (view == NULL) { - return lit_4041; + return 1.0f; } return view->mFar; @@ -917,7 +514,7 @@ f32 dDemo_camera_c::JSGGetProjectionFar() const { /* 80038B40-80038B54 033480 0014+00 1/0 0/0 0/0 .text JSGSetProjectionFar__14dDemo_camera_cFf */ void dDemo_camera_c::JSGSetProjectionFar(f32 i_projFar) { mProjFar = i_projFar; - onEnable(0x2); + onEnable(ENABLE_PROJ_FAR_e); } /* 80038B54-80038B88 033494 0034+00 1/0 0/0 0/0 .text JSGGetProjectionFovy__14dDemo_camera_cCFv */ @@ -934,7 +531,7 @@ f32 dDemo_camera_c::JSGGetProjectionFovy() const { /* 80038B88-80038B9C 0334C8 0014+00 1/0 0/0 0/0 .text JSGSetProjectionFovy__14dDemo_camera_cFf */ void dDemo_camera_c::JSGSetProjectionFovy(f32 i_projFovy) { mProjFovy = i_projFovy; - onEnable(0x4); + onEnable(ENABLE_PROJ_FOVY_e); } /* 80038B9C-80038BD0 0334DC 0034+00 1/0 0/0 0/0 .text JSGGetProjectionAspect__14dDemo_camera_cCFv @@ -953,7 +550,7 @@ f32 dDemo_camera_c::JSGGetProjectionAspect() const { */ void dDemo_camera_c::JSGSetProjectionAspect(f32 i_aspect) { mProjAspect = i_aspect; - onEnable(0x8); + onEnable(ENABLE_PROJ_ASPECT_e); } /* 80038BE4-80038C44 033524 0060+00 1/0 0/0 0/0 .text JSGGetViewPosition__14dDemo_camera_cCFP3Vec @@ -962,10 +559,9 @@ void dDemo_camera_c::JSGGetViewPosition(Vec* o_position) const { view_class* view = getView(); if (view == NULL) { - f32 tmp_0 = FLOAT_LABEL(lit_4040); - o_position->x = tmp_0; - o_position->y = tmp_0; - o_position->z = tmp_0; + o_position->x = 0.0f; + o_position->y = 0.0f; + o_position->z = 0.0f; } else { *o_position = view->mLookat.mEye; } @@ -975,7 +571,7 @@ void dDemo_camera_c::JSGGetViewPosition(Vec* o_position) const { */ void dDemo_camera_c::JSGSetViewPosition(Vec const& i_position) { mViewPos = i_position; - onEnable(0x10); + onEnable(ENABLE_VIEW_POS_e); } /* 80038C6C-80038CD0 0335AC 0064+00 1/0 0/0 0/0 .text JSGGetViewUpVector__14dDemo_camera_cCFP3Vec @@ -984,10 +580,9 @@ void dDemo_camera_c::JSGGetViewUpVector(Vec* o_upVec) const { view_class* view = getView(); if (view == NULL) { - f32 tmp_0 = FLOAT_LABEL(lit_4040); - o_upVec->x = tmp_0; - o_upVec->y = lit_4041; - o_upVec->z = tmp_0; + o_upVec->x = 0.0f; + o_upVec->y = 1.0f; + o_upVec->z = 0.0f; } else { *o_upVec = view->mLookat.mUp; } @@ -997,7 +592,7 @@ void dDemo_camera_c::JSGGetViewUpVector(Vec* o_upVec) const { */ void dDemo_camera_c::JSGSetViewUpVector(Vec const& i_upVec) { mViewUpVector = i_upVec; - onEnable(0x20); + onEnable(ENABLE_VIEW_UP_VEC_e); } /* 80038CF8-80038D5C 033638 0064+00 1/0 0/0 0/0 .text @@ -1006,10 +601,9 @@ void dDemo_camera_c::JSGGetViewTargetPosition(Vec* o_targetPos) const { view_class* view = getView(); if (view == NULL) { - f32 tmp_0 = FLOAT_LABEL(lit_4040); - o_targetPos->x = tmp_0; - o_targetPos->y = tmp_0; - o_targetPos->z = lit_4041; + o_targetPos->x = 0.0f; + o_targetPos->y = 0.0f; + o_targetPos->z = 1.0f; } else { *o_targetPos = view->mLookat.mCenter; } @@ -1019,17 +613,9 @@ void dDemo_camera_c::JSGGetViewTargetPosition(Vec* o_targetPos) const { * JSGSetViewTargetPosition__14dDemo_camera_cFRC3Vec */ void dDemo_camera_c::JSGSetViewTargetPosition(Vec const& i_targetPos) { mViewTargetVector = i_targetPos; - onEnable(0x40); + onEnable(ENABLE_VIEW_TARG_POS_e); } -/* ############################################################################################## */ -/* 80451DD8-80451DE0 0003D8 0004+04 2/2 0/0 0/0 .sdata2 @4710 */ -SECTION_SDATA2 static f32 lit_4710[1 + 1 /* padding */] = { - 0.0054931640625f, - /* padding */ - 0.0f, -}; - /* 80038D84-80038DDC 0336C4 0058+00 1/0 0/0 0/0 .text JSGGetViewRoll__14dDemo_camera_cCFv */ f32 dDemo_camera_c::JSGGetViewRoll() const { @@ -1042,37 +628,36 @@ f32 dDemo_camera_c::JSGGetViewRoll() const { return view->mBank * 0.0054931640625f; } - /* 80038DDC-80038DF0 03371C 0014+00 1/0 0/0 0/0 .text JSGSetViewRoll__14dDemo_camera_cFf */ void dDemo_camera_c::JSGSetViewRoll(f32 i_roll) { mViewRoll = i_roll; - onEnable(0x80); + onEnable(ENABLE_VIEW_ROLL_e); } /* 80038DF0-80038E20 033730 0030+00 1/0 0/0 0/0 .text JSGSetColor__15dDemo_ambient_cF8_GXColor */ void dDemo_ambient_c::JSGSetColor(GXColor i_color) { mColor = i_color; - onEnable(0x1); + onEnable(ENABLE_COLOR_e); } /* 80038E20-80038E34 033760 0014+00 1/0 0/0 0/0 .text * JSGSetLightType__13dDemo_light_cFQ26JStage7TELight */ void dDemo_light_c::JSGSetLightType(JStage::TELight i_lightType) { mLightType = i_lightType; - onEnable(0x1); + onEnable(ENABLE_LIGHT_TYPE_e); } /* 80038E34-80038E5C 033774 0028+00 1/0 0/0 0/0 .text JSGSetPosition__13dDemo_light_cFRC3Vec */ void dDemo_light_c::JSGSetPosition(Vec const& i_pos) { mPosition = i_pos; - onEnable(0x2); + onEnable(ENABLE_POSITION_e); } /* 80038E5C-80038E8C 03379C 0030+00 1/0 0/0 0/0 .text JSGSetColor__13dDemo_light_cF8_GXColor */ void dDemo_light_c::JSGSetColor(GXColor i_color) { mColor = i_color; - onEnable(0x4); + onEnable(ENABLE_COLOR_e); } /* 80038E8C-80038EA8 0337CC 001C+00 1/0 0/0 0/0 .text @@ -1081,7 +666,7 @@ void dDemo_light_c::JSGSetDistanceAttenuation(f32 param_0, f32 param_1, GXDistAt field_0x24 = param_0; field_0x28 = param_1; mDistAttenFn = i_distAttenFn; - onEnable(0x8); + onEnable(ENABLE_DIST_ATTEN_e); } /* 80038EA8-80038EC0 0337E8 0018+00 1/0 0/0 0/0 .text @@ -1089,38 +674,38 @@ void dDemo_light_c::JSGSetDistanceAttenuation(f32 param_0, f32 param_1, GXDistAt void dDemo_light_c::JSGSetAngleAttenuation(f32 param_0, GXSpotFn i_spotFn) { field_0x2c = param_0; mSpotFn = i_spotFn; - onEnable(0x10); + onEnable(ENABLE_ANGLE_ATTEN_e); } /* 80038EC0-80038EE8 033800 0028+00 1/0 0/0 0/0 .text JSGSetDirection__13dDemo_light_cFRC3Vec */ void dDemo_light_c::JSGSetDirection(Vec const& i_direction) { mDirection = i_direction; - onEnable(0x20); + onEnable(ENABLE_DIRECTION_e); } /* 80038EE8-80038EFC 033828 0014+00 1/0 0/0 0/0 .text * JSGSetFogFunction__11dDemo_fog_cF10_GXFogType */ void dDemo_fog_c::JSGSetFogFunction(GXFogType i_fogType) { mFogType = i_fogType; - onEnable(0x1); + onEnable(ENABLE_FOG_FN_e); } /* 80038EFC-80038F10 03383C 0014+00 1/0 0/0 0/0 .text JSGSetStartZ__11dDemo_fog_cFf */ void dDemo_fog_c::JSGSetStartZ(f32 i_startZ) { mStartZ = i_startZ; - onEnable(0x2); + onEnable(ENABLE_START_Z_e); } /* 80038F10-80038F24 033850 0014+00 1/0 0/0 0/0 .text JSGSetEndZ__11dDemo_fog_cFf */ void dDemo_fog_c::JSGSetEndZ(f32 i_endZ) { mEndZ = i_endZ; - onEnable(0x4); + onEnable(ENABLE_END_Z_e); } /* 80038F24-80038F54 033864 0030+00 1/0 0/0 0/0 .text JSGSetColor__11dDemo_fog_cF8_GXColor */ void dDemo_fog_c::JSGSetColor(GXColor i_color) { mColor = i_color; - onEnable(0x8); + onEnable(ENABLE_COLOR_e); } /* 80038F54-80038F70 033894 001C+00 1/1 0/0 0/0 .text __ct__14dDemo_object_cFv */ @@ -1147,11 +732,15 @@ JStage::TObject* dDemo_object_c::appendActor(fopAc_ac_c* p_actor) { } if (mActorNum >= 32) { + // "Too many Demo Actors!!\n" + OS_REPORT("デモアクター登録数オーバー!!\n"); return NULL; } demoActor = new dDemo_actor_c(); if (demoActor == NULL) { + // "Failed to get Demo Actor!!\n" + OS_REPORT("デモアクター確保失敗!!\n") return NULL; } @@ -1180,6 +769,8 @@ dDemo_actor_c* dDemo_object_c::getActor(u8 actorId) { /* 800390AC-80039128 0339EC 007C+00 1/1 0/0 0/0 .text createCamera__14dDemo_object_cFv */ JStage::TObject* dDemo_object_c::createCamera() { if (mpCamera != NULL) { + // "2 demo cameras!!\n" + OS_REPORT("デモカメラが2つも!!\n"); return mpCamera; } @@ -1201,6 +792,8 @@ dDemo_camera_c* dDemo_object_c::getActiveCamera() { */ JStage::TObject* dDemo_object_c::createAmbient() { if (mpAmbient != NULL) { + // "2 demo ambient lights!\n" + OS_REPORT("デモアンビエントライトが2つも!!\n"); return mpAmbient; } @@ -1211,11 +804,15 @@ JStage::TObject* dDemo_object_c::createAmbient() { /* 800391B8-80039258 033AF8 00A0+00 1/1 0/0 0/0 .text appendLight__14dDemo_object_cFv */ JStage::TObject* dDemo_object_c::appendLight() { if (mLightNum >= 8) { + // "Too many Demo Lights!!\n" + OS_REPORT("デモライト登録数オーバー!!\n"); return NULL; } dDemo_light_c* demoLight = new dDemo_light_c(); if (demoLight == NULL) { + // "Failed to get Demo Light!!\n" + OS_REPORT("デモライト確保失敗!!\n"); return NULL; } @@ -1229,6 +826,8 @@ JStage::TObject* dDemo_object_c::appendLight() { /* 80039258-800392D4 033B98 007C+00 1/1 0/0 0/0 .text createFog__14dDemo_object_cFv */ JStage::TObject* dDemo_object_c::createFog() { if (mpFog != NULL) { + // "2 demo fogs!\n" + OS_REPORT("デモフォグが2つも!!\n"); return mpFog; } @@ -1263,28 +862,21 @@ void dDemo_object_c::remove() { } /* 80039408-80039468 033D48 0060+00 1/0 0/0 0/0 .text __dt__11dDemo_fog_cFv */ -// dDemo_fog_c::~dDemo_fog_c() { -extern "C" void __dt__11dDemo_fog_cFv() { - // NONMATCHING -} +dDemo_fog_c::~dDemo_fog_c() {} /* 80039468-800394C8 033DA8 0060+00 1/0 0/0 0/0 .text __dt__13dDemo_light_cFv */ -// dDemo_light_c::~dDemo_light_c() { -extern "C" void __dt__13dDemo_light_cFv() { - // NONMATCHING -} +dDemo_light_c::~dDemo_light_c() {} /* 800394C8-80039528 033E08 0060+00 1/0 0/0 0/0 .text __dt__15dDemo_ambient_cFv */ -// dDemo_ambient_c::~dDemo_ambient_c() { -extern "C" void __dt__15dDemo_ambient_cFv() { - // NONMATCHING -} +dDemo_ambient_c::~dDemo_ambient_c() {} /* 80039528-80039678 033E68 0150+00 1/0 0/0 0/0 .text * JSGFindObject__14dDemo_system_cCFPPQ26JStage7TObjectPCcQ26JStage8TEObject */ int dDemo_system_c::JSGFindObject(JStage::TObject** p_TObj, char const* actorName, JStage::TEObject objType) const { if (mpObject == NULL) { + // "No Demo Object Class!!" + OS_REPORT("デモオブジェクトクラスが無い!!"); return true; } @@ -1296,10 +888,17 @@ int dDemo_system_c::JSGFindObject(JStage::TObject** p_TObj, char const* actorNam actor = (fopAc_ac_c*)fopAcM_fastCreate(actorName, 0, NULL, -1, NULL, NULL, NULL, NULL); if (actor == NULL) { + // "Generic-actor<%s> creation failed!!\n" + OS_WARNING("汎用くん<%s>生成失敗!!\n", actorName); return true; } + fopAcM_setStageLayer(actor); + // "Generated Generic-actor<%s>!!\n" + OS_REPORT("汎用くん<%s>生成!!\n", actorName); } else { + // "No Demo Actors available!!\n" + OS_WARNING("デモの出演者<%s>がいません!!\n", actorName); return true; } } @@ -1313,27 +912,44 @@ int dDemo_system_c::JSGFindObject(JStage::TObject** p_TObj, char const* actorNam *p_TObj = mpObject->appendLight(); } else if (objType == JStage::OBJECT_FOG) { *p_TObj = mpObject->createFog(); + } else { + // "Strange Demo Object type!! Type<%d>\n" + OS_REPORT("へんなデモオブジェクトタイプです!! タイプ<%d>\n"); + JUT_ASSERT(1755, 0); } - return *p_TObj == NULL; + return *p_TObj == NULL ? TRUE : FALSE; } -/* ############################################################################################## */ -/* 80451DE0-80451DE8 0003E0 0008+00 1/1 0/0 0/0 .sdata2 @5123 */ -SECTION_SDATA2 static f64 lit_5123 = 1.0 / 29.999998435378155; - /* 80039678-80039910 033FB8 0298+00 0/0 1/1 0/0 .text create__7dDemo_cFv */ void dDemo_c::create() { m_system = new dDemo_system_c(); + JUT_ASSERT(m_system != 0); + m_control = new JStudio::TControl(); + JUT_ASSERT(m_control != 0); + m_mesgControl = new jmessage_tControl(); + JUT_ASSERT(m_mesgControl != 0); + m_stage = new JStudio_JStage::TCreateObject(m_system); + JUT_ASSERT(m_stage != 0); + m_audio = new JStudio_JAudio2::TCreateObject(Z2GetSoundStarter(), m_system); + JUT_ASSERT(m_audio != 0); m_audio->mPermit_onExit_notEnd = true; + m_particle = new dDemo_particle_c(dPa_control_c::getEmitterManager(), m_system); + JUT_ASSERT(m_particle != 0); + m_message = new jstudio_tCreateObject_message(); + JUT_ASSERT(m_message != 0); + m_factory = new JStudio::TFactory(); + JUT_ASSERT(m_factory != 0); + m_object = new dDemo_object_c(); + JUT_ASSERT(m_object != 0); m_control->setSecondPerFrame(1.0f / 30.0f); m_control->setFactory(m_factory); @@ -1348,26 +964,66 @@ void dDemo_c::create() { reset(); } - /* 80039910-80039AAC 034250 019C+00 0/0 1/1 0/0 .text remove__7dDemo_cFv */ void dDemo_c::remove() { - // NONMATCHING + end(); + + if (m_object != NULL) { + delete m_object; + m_object = NULL; + } + + if (m_factory != NULL) { + delete m_factory; + m_factory = NULL; + } + + if (m_message != NULL) { + delete m_message; + m_message = NULL; + } + + if (m_particle != NULL) { + delete m_particle; + m_particle = NULL; + } + + if (m_audio != NULL) { + delete m_audio; + m_audio = NULL; + } + + if (m_stage != NULL) { + delete m_stage; + m_stage = NULL; + } + + if (m_mesgControl != NULL) { + delete m_mesgControl; + m_mesgControl = NULL; + } + + if (m_control != NULL) { + delete m_control; + m_control = NULL; + } + + if (m_system != NULL) { + delete m_system; + m_system = NULL; + } } /* 80039AAC-80039B0C 0343EC 0060+00 1/0 0/0 0/0 .text __dt__14dDemo_system_cFv */ -// dDemo_system_c::~dDemo_system_c() { -extern "C" void __dt__14dDemo_system_cFv() { - // NONMATCHING -} +dDemo_system_c::~dDemo_system_c() {} /* 80039B0C-80039B6C 03444C 0060+00 1/0 0/0 0/0 .text __dt__17jmessage_tControlFv */ -// jmessage_tControl::~jmessage_tControl() { -extern "C" void __dt__17jmessage_tControlFv() { - // NONMATCHING -} +jmessage_tControl::~jmessage_tControl() {} /* 80039B6C-80039CF8 0344AC 018C+00 1/1 1/1 0/0 .text start__7dDemo_cFPCUcP4cXyzf */ int dDemo_c::start(u8 const* p_data, cXyz* p_translation, f32 rotationY) { + JUT_ASSERT(m_system != 0); + m_control->reset(); JStudio::TParse parser(m_control); @@ -1404,6 +1060,8 @@ int dDemo_c::start(u8 const* p_data, cXyz* p_translation, f32 rotationY) { /* 80039CF8-80039D4C 034638 0054+00 1/1 2/2 0/0 .text end__7dDemo_cFv */ void dDemo_c::end() { + JUT_ASSERT(m_system != 0); + m_control->destroyObject_all(); m_object->remove(); m_data = NULL; @@ -1412,15 +1070,20 @@ void dDemo_c::end() { /* 80039D4C-80039DA4 03468C 0058+00 1/1 0/0 0/0 .text branch__7dDemo_cFv */ void dDemo_c::branch() { + JUT_ASSERT(m_system != 0); + m_control->destroyObject_all(); const u8* branchData = m_branchData; m_branchData = NULL; - start(branchData, m_translation, m_rotationY); + int rt = start(branchData, m_translation, m_rotationY); + JUT_ASSERT(rt); } /* 80039DA4-80039EDC 0346E4 0138+00 0/0 1/1 0/0 .text update__7dDemo_cFv */ int dDemo_c::update() { + JUT_ASSERT(m_system != 0); + if (m_data == NULL) { if (m_branchData == NULL) { return 0; @@ -1430,6 +1093,7 @@ int dDemo_c::update() { return 1; } } else if (isStatus(1)) { + OS_REPORT(">>>>>>>>>>>>>>>>>>>>>>>>>>>> Movie Start Wait !\n"); daMP_c::daMP_c_THPPlayerPlay(); if (isStatus(1)) { return 1; @@ -1491,72 +1155,18 @@ void dDemo_c::reset() { } /* 80039F1C-80039F9C 03485C 0080+00 1/0 0/0 0/0 .text emitter_create__16dDemo_particle_cFUl */ -JPABaseEmitter* dDemo_particle_c::emitter_create(u32 param_0) { - cXyz tmp(0.0f, 0.0f, 0.0f); +JPABaseEmitter* dDemo_particle_c::emitter_create(u32 i_id) { + cXyz pos(0.0f, 0.0f, 0.0f); int stayNo = dComIfGp_roomControl_getStayNo(); - return dComIfGp_particle_set(param_0, &tmp, NULL, NULL, 0xFF, NULL, stayNo, NULL, NULL, NULL); + return dComIfGp_particle_set(i_id, &pos, NULL, NULL, 0xFF, NULL, stayNo, NULL, NULL, NULL); } - /* 80039F9C-80039FFC 0348DC 0060+00 1/0 0/0 0/0 .text __dt__16dDemo_particle_cFv */ -// dDemo_particle_c::~dDemo_particle_c() { -extern "C" void __dt__16dDemo_particle_cFv() { - // NONMATCHING -} +dDemo_particle_c::~dDemo_particle_c() {} /* 80039FFC-8003A05C 03493C 0060+00 1/0 0/0 0/0 .text __dt__14dDemo_camera_cFv */ -// dDemo_camera_c::~dDemo_camera_c() { -extern "C" void __dt__14dDemo_camera_cFv() { - // NONMATCHING -} - -/* 8003A05C-8003A088 03499C 002C+00 1/0 0/0 0/0 .text JSGFindNodeID__13dDemo_actor_cCFPCc - */ -s32 dDemo_actor_c::JSGFindNodeID(char const* param_0) const { - return mModel->getModelData()->getJointName()->getIndex(param_0); -} - -/* 8003A088-8003A0C8 0349C8 0040+00 1/0 0/0 0/0 .text - * JSGGetNodeTransformation__13dDemo_actor_cCFUlPA4_f */ -bool dDemo_actor_c::JSGGetNodeTransformation(u32 param_0, Mtx param_1) const { - MTXCopy(mModel->getAnmMtx((u16)param_0), param_1); - return true; -} - -/* 8003A0C8-8003A0D0 034A08 0008+00 1/0 0/0 0/0 .text JSGGetAnimationFrameMax__13dDemo_actor_cCFv - */ -f32 dDemo_actor_c::JSGGetAnimationFrameMax() const { - return mAnmFrameMax; -} - -/* 8003A0D0-8003A0D8 034A10 0008+00 1/0 0/0 0/0 .text - * JSGGetTextureAnimationFrameMax__13dDemo_actor_cCFv */ -f32 dDemo_actor_c::JSGGetTextureAnimationFrameMax() const { - return mTexAnmFrameMax; -} - -/* 8003A0D8-8003A0F4 034A18 001C+00 1/0 0/0 0/0 .text JSGGetTranslation__13dDemo_actor_cCFP3Vec */ -void dDemo_actor_c::JSGGetTranslation(Vec* o_trans) const { - *o_trans = mTrans; -} +dDemo_camera_c::~dDemo_camera_c() {} -/* 8003A0F4-8003A110 034A34 001C+00 1/0 0/0 0/0 .text JSGGetScaling__13dDemo_actor_cCFP3Vec */ -void dDemo_actor_c::JSGGetScaling(Vec* o_scale) const { - *o_scale = mScale; +static void dummyString2() { + DEAD_STRING("デモデータ再読み込みエラー!!\n"); } - -/* 8003A110-8003A188 034A50 0078+00 1/0 0/0 0/0 .text JSGGetRotation__13dDemo_actor_cCFP3Vec */ -void dDemo_actor_c::JSGGetRotation(Vec* param_0) const { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 8037981E-80379840 005E7E 0020+02 0/0 0/0 0/0 .rodata None */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_8037981E = "デモデータ再読み込みエラー!!\n"; -/* @stringBase0 padding */ -SECTION_DEAD static char const* const pad_8037983E = "\0"; -#pragma pop - -/* 803797F8-803797F8 005E58 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */