Merge pull request #7 from notyourav/master

decompile actorCapture
This commit is contained in:
Léo Lam 2020-10-15 01:00:15 +02:00 committed by GitHub
commit 436085f61d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 131 additions and 18 deletions

View File

@ -85543,11 +85543,11 @@
0x00000071010888b4,sub_71010888B4,624,
0x0000007101088b24,sub_7101088B24,144,
0x0000007101088bb4,sub_7101088BB4,400,
0x0000007101088d44,Bactcapt::ctor,2000,
0x0000007101089514,nullsub_4455,4,
0x0000007101089518,nullsub_4456,4,
0x000000710108951c,sub_710108951C,72,
0x0000007101089564,sub_7101089564,72,
0x0000007101088d44,Bactcapt::ctor,2000,_ZN4ksys3res12ActorCaptureC1Ev
0x0000007101089514,nullsub_4455,4,_ZN4ksys3res12ActorCapture9doCreate_EPhjPN4sead4HeapE
0x0000007101089518,nullsub_4456,4,_ZThn632_N4ksys3res12ActorCapture9doCreate_EPhjPN4sead4HeapE
0x000000710108951c,sub_710108951C,72,_ZN4ksys3res12ActorCapture6parse_EPhmPN4sead4HeapE
0x0000007101089564,sub_7101089564,72,_ZThn632_N4ksys3res12ActorCapture6parse_EPhmPN4sead4HeapE
0x00000071010895ac,sub_71010895AC,664,
0x0000007101089844,sub_7101089844,180,
0x00000071010898f8,sub_71010898F8,168,
@ -85556,22 +85556,22 @@
0x00000071010899b0,sub_71010899B0,92,
0x0000007101089a0c,sub_7101089A0C,8,
0x0000007101089a14,sub_7101089A14,8,
0x0000007101089a1c,sub_7101089A1C,92,
0x0000007101089a78,sub_7101089A78,176,
0x0000007101089b28,sub_7101089B28,164,
0x0000007101089bcc,sub_7101089BCC,8,
0x0000007101089bd4,sub_7101089BD4,184,
0x0000007101089c8c,sub_7101089C8C,172,
0x0000007101089a1c,sub_7101089A1C,92,_ZThn632_NK4ksys3res12ActorCapture18getRuntimeTypeInfoEv
0x0000007101089a78,sub_7101089A78,176,_ZThn632_N4ksys3res12ActorCaptureD1Ev
0x0000007101089b28,sub_7101089B28,164,_ZThn632_N4ksys3res12ActorCaptureD0Ev
0x0000007101089bcc,sub_7101089BCC,8,_ZThn632_NK4ksys3res12ActorCapture10needsParseEv
0x0000007101089bd4,sub_7101089BD4,184,_ZThn664_N4ksys3res12ActorCaptureD1Ev
0x0000007101089c8c,sub_7101089C8C,172,_ZThn664_N4ksys3res12ActorCaptureD0Ev
0x0000007101089d38,sub_7101089D38,20,_ZN4ksys7ParamIOD2Ev
0x0000007101089d4c,j__ZdlPv_1140,4,_ZN4ksys7ParamIOD0Ev
0x0000007101089d50,sub_7101089D50,8,_ZN4ksys7ParamIO10ParamIO_m0Ev
0x0000007101089d58,sub_7101089D58,48,
0x0000007101089d88,j__ZdlPv_1141,4,
0x0000007101089d8c,sub_7101089D8C,64,
0x0000007101089dcc,j__ZdlPv_1142,4,
0x0000007101089dd0,sub_7101089DD0,36,
0x0000007101089df4,j__ZdlPv_1143,4,
0x0000007101089f6c,sub_7101089F6C,100,
0x0000007101089d58,sub_7101089D58,48,_ZN4ksys3res12ActorCapture10CameraInfoD2Ev
0x0000007101089d88,j__ZdlPv_1141,4,_ZN4ksys3res12ActorCapture10CameraInfoD0Ev
0x0000007101089d8c,sub_7101089D8C,64,_ZN4ksys3res12ActorCapture9ActorInfoD2Ev
0x0000007101089dcc,j__ZdlPv_1142,4,_ZN4ksys3res12ActorCapture9ActorInfoD0Ev
0x0000007101089dd0,sub_7101089DD0,36,_ZN4ksys3res12ActorCapture9LightInfoD2Ev
0x0000007101089df4,j__ZdlPv_1143,4,_ZN4ksys3res12ActorCapture9LightInfoD0Ev
0x0000007101089f6c,sub_7101089F6C,100,_GLOBAL__sub_I_resResourceActorCapture.cpp?
0x0000007101089fd0,sub_7101089FD0,100,
0x000000710108a034,sub_710108A034,108,
0x000000710108a0a0,ActorTemplate::createInstance,148,

Can't render this file because it is too large.

View File

@ -121,6 +121,8 @@ target_sources(uking PRIVATE
resResource.cpp
resResource.h
resResourceActorCapture.cpp
resResourceActorCapture.h
resResourceActorLink.cpp
resResourceActorLink.h
resResourceAIProgram.cpp

View File

@ -0,0 +1,43 @@
#include "KingSystem/Resource/resResourceActorCapture.h"
namespace ksys::res {
static ActorCapture::ActorCaptureConstants sConstants;
const ActorCapture::ActorCaptureConstants& ActorCapture::getConstants() {
return sConstants;
}
ActorCapture::ActorCapture() : ParamIO("actcapt", 0) {
addObj(&mCameraInfoObj, "camera_info");
mCameraInfoObj.position.init(sConstants.camera_position, "pos", "カメラ位置", &mCameraInfoObj);
mCameraInfoObj.direction.init(sConstants.camera_direction, "at", "カメラ注視点",
&mCameraInfoObj);
mCameraInfoObj.fov.init(50.0, "fovy", "カメラ画角", &mCameraInfoObj);
mCameraInfoObj.tilt.init(0.0, "twist", "カメラひねり", &mCameraInfoObj);
addObj(&mActorInfoObj, "actor_info");
mActorInfoObj.position.init(sConstants.actor_position, "pos", "アクタ位置", &mActorInfoObj);
mActorInfoObj.rotation.init(sConstants.actor_rotation, "rotate", "アクタRotate",
&mActorInfoObj);
mActorInfoObj.as_name.init(sead::SafeString::cEmptyString, "as_name", "適用するASのKey名",
&mActorInfoObj);
mActorInfoObj.apply_skel_anim.init(false, "apply_skl_anim",
"スケルタルアニメを検索して直接適用する", &mActorInfoObj);
mActorInfoObj.frame.init(0.0, "as_frame", "ASのフレーム・経過時間指定", &mActorInfoObj);
mActorInfoObj.bounding_adjustment.init(false, "adjust_bounding",
"バウンディングを元に位置を調整する", &mActorInfoObj);
mActorInfoObj.force_idle.init(false, "force_idle", "強制待機", &mActorInfoObj);
mActorInfoObj.disable_cloth.init(false, "disable_cloth", "クロスを切る", &mActorInfoObj);
addObj(&mLightInfoObj, "light_info");
mLightInfoObj.direction.init(sConstants.light_direction, "dir", "ライト方向", &mLightInfoObj);
}
bool ActorCapture::parse_(u8* data, size_t, sead::Heap*) {
if (data)
applyResParameterArchive(agl::utl::ResParameterArchive(data));
return true;
}
} // namespace ksys::res

View File

@ -0,0 +1,68 @@
#include <agl/Utils/aglParameter.h>
#include <agl/Utils/aglParameterObj.h>
#include <math/seadVector.h>
#include <prim/seadSafeString.h>
#include "KingSystem/Resource/resResource.h"
#include "KingSystem/Utils/ParamIO.h"
namespace ksys::res {
class ActorCapture : public ParamIO, public Resource {
SEAD_RTTI_OVERRIDE(ActorCapture, Resource)
public:
struct ActorCaptureConstants {
// NON_MATCHING: equivalent but reordered
ActorCaptureConstants() {
camera_position = {0.0, 2.0, 5.0};
camera_direction = {0.0, 2.0, 0.0};
light_direction = {0.5720610022544861, -0.7071070075035095, -0.41562700271606445};
actor_position = sead::Vector3f::zero;
actor_rotation = sead::Vector3f::zero;
}
sead::Vector3f camera_position;
sead::Vector3f camera_direction;
sead::Vector3f light_direction;
sead::Vector3f actor_position;
sead::Vector3f actor_rotation;
};
struct CameraInfo : agl::utl::ParameterObj {
agl::utl::Parameter<sead::Vector3f> position;
agl::utl::Parameter<sead::Vector3f> direction;
agl::utl::Parameter<f32> fov;
agl::utl::Parameter<f32> tilt;
};
struct ActorInfo : agl::utl::ParameterObj {
agl::utl::Parameter<sead::Vector3f> position;
agl::utl::Parameter<sead::Vector3f> rotation;
agl::utl::Parameter<sead::FixedSafeString<32>> as_name;
agl::utl::Parameter<bool> apply_skel_anim;
agl::utl::Parameter<f32> frame;
agl::utl::Parameter<bool> bounding_adjustment;
agl::utl::Parameter<bool> force_idle;
agl::utl::Parameter<bool> disable_cloth;
};
struct LightInfo : agl::utl::ParameterObj {
agl::utl::Parameter<sead::Vector3f> direction;
};
ActorCapture();
bool needsParse() const override { return true; }
bool ParamIO_m0() override { return true; }
static const ActorCaptureConstants& getConstants();
CameraInfo mCameraInfoObj;
ActorInfo mActorInfoObj;
LightInfo mLightInfoObj;
private:
void doCreate_(u8*, u32, sead::Heap*) override{};
bool parse_(u8* data, size_t size, sead::Heap* heap) override;
};
KSYS_CHECK_SIZE_NX150(ActorCapture, 0x538);
} // namespace ksys::res