mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-07 21:30:47 -04:00
f_op_camera seems good
This commit is contained in:
+1
-1
@@ -272,7 +272,7 @@ config.libs = [
|
||||
Object(Matching, "f_op/f_op_actor_iter.cpp"),
|
||||
Object(Matching, "f_op/f_op_actor_tag.cpp"),
|
||||
Object(NonMatching, "f_op/f_op_actor_mng.cpp"),
|
||||
Object(NonMatching, "f_op/f_op_camera.cpp"),
|
||||
Object(Matching, "f_op/f_op_camera.cpp"),
|
||||
Object(Matching, "f_op/f_op_camera_mng.cpp"),
|
||||
Object(Matching, "f_op/f_op_overlap.cpp"),
|
||||
Object(Matching, "f_op/f_op_overlap_mng.cpp"),
|
||||
|
||||
@@ -36,6 +36,7 @@ class daAgb_c;
|
||||
class dTimer_c;
|
||||
class camera_class;
|
||||
class J2DOrthoGraph;
|
||||
class dDemo_actor_c;
|
||||
|
||||
class __d_timer_info_c {
|
||||
public:
|
||||
@@ -948,6 +949,10 @@ inline void dComIfGp_demo_update() {
|
||||
g_dComIfG_gameInfo.play.getDemo()->update();
|
||||
}
|
||||
|
||||
inline dDemo_actor_c* dComIfGp_demo_getActor(u8 id) {
|
||||
return g_dComIfG_gameInfo.play.getDemo()->mDemoObj.getActor(id);
|
||||
}
|
||||
|
||||
inline void dComIfGp_setLkDemoAnmArchive(JKRArchive* i_arc) {
|
||||
g_dComIfG_gameInfo.play.setLkDemoAnmArchive(i_arc);
|
||||
}
|
||||
@@ -1051,6 +1056,10 @@ inline void dComIfGp_event_setItemPartnerId(u32 id) {
|
||||
return g_dComIfG_gameInfo.play.getEvent().setPtI_Id(id);
|
||||
}
|
||||
|
||||
inline s32 dComIfGp_event_moveApproval(void* actor) {
|
||||
return g_dComIfG_gameInfo.play.getEvent().moveApproval(actor);
|
||||
}
|
||||
|
||||
inline dEvent_manager_c& dComIfGp_getEventManager() {
|
||||
return g_dComIfG_gameInfo.play.getEvtManager();
|
||||
}
|
||||
|
||||
+7
-1
@@ -10,6 +10,12 @@ class dDemo_light_c;
|
||||
class dDemo_system_c;
|
||||
class TControl;
|
||||
class dMesg_tControl;
|
||||
class fopAc_ac_c;
|
||||
|
||||
class dDemo_actor_c /* : public JStage::TActor */ {
|
||||
public:
|
||||
void setActor(fopAc_ac_c*);
|
||||
};
|
||||
|
||||
class dDemo_object_c {
|
||||
public:
|
||||
@@ -17,7 +23,7 @@ public:
|
||||
~dDemo_object_c();
|
||||
|
||||
void appendActor(fopAc_ac_c*);
|
||||
void getActor(u8);
|
||||
dDemo_actor_c* getActor(u8);
|
||||
void createCamera();
|
||||
void getActiveCamera();
|
||||
void createAmbient();
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ public:
|
||||
void soundProc();
|
||||
void check();
|
||||
void photoCheck();
|
||||
void moveApproval(void*);
|
||||
s32 moveApproval(void*);
|
||||
void compulsory(void*, const char*, u16);
|
||||
void remove();
|
||||
void getStageEventDt();
|
||||
|
||||
@@ -12,7 +12,7 @@ public:
|
||||
bool resetGame();
|
||||
void offReset();
|
||||
|
||||
static bool isPause() { return pauseTimer == 0; }
|
||||
static bool isPause() { return pauseTimer != 0; }
|
||||
static void setPauseTimer(s8 time) { pauseTimer = time; }
|
||||
|
||||
static s8 pauseTimer;
|
||||
|
||||
@@ -17,7 +17,7 @@ struct actor_method_class {
|
||||
enum fopAc_Status_e {
|
||||
fopAcStts_SHOWMAP_e = 0x00000020,
|
||||
fopAcStts_NOEXEC_e = 0x00000080,
|
||||
fopAcStts_CULLSTOP_e = 0x00000100,
|
||||
fopAcStts_CULL_e = 0x00000100,
|
||||
fopAcStts_FREEZE_e = 0x00000400,
|
||||
fopAcStts_CARRY_e = 0x00002000,
|
||||
fopAcStts_NOPAUSE_e = 0x00020000,
|
||||
|
||||
@@ -2,16 +2,32 @@
|
||||
#define F_F_OP_CAMERA_H_
|
||||
|
||||
#include "f_op/f_op_view.h"
|
||||
#include "SSystem/SComponent/c_sxyz.h"
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
|
||||
class camera_class;
|
||||
class camera_process_class : public view_class {
|
||||
public:
|
||||
/* 0x210 */ create_tag_class mDwTg;
|
||||
/* 0x224 */ leafdraw_method_class* mpMtd;
|
||||
/* 0x228 */ u8 field_0x228[4];
|
||||
/* 0x22C */ s8 mPrm1;
|
||||
/* 0x22D */ s8 mPrm2;
|
||||
/* 0x22E */ s8 mPrm3;
|
||||
/* 0x22F */ s8 field_0x22f;
|
||||
/* 0x230 */ csXyz mAngle;
|
||||
/* 0x238 */ int field_0x238;
|
||||
};
|
||||
|
||||
class camera_class : public camera_process_class {
|
||||
public:
|
||||
/* 0x23C */ int field_0x23c;
|
||||
/* 0x240 */ request_of_phase_process_class mPhaseReq;
|
||||
// /* 0x248 */ dCamera_c mCamera;
|
||||
};
|
||||
|
||||
struct camera_process_profile_definition {
|
||||
/* 0x00 */ view_process_profile_definition mBase;
|
||||
/* 0x3C */ leafdraw_method_class* mSubMtd; // Subclass methods
|
||||
};
|
||||
|
||||
static s32 fopCam_Draw(camera_class* param_1);
|
||||
static int fopCam_Execute(camera_class* pCamera);
|
||||
int fopCam_IsDelete(camera_class* pCamera);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -62,6 +62,10 @@ inline void mDoAud_seStart(u32 i_sfxID, Vec* i_sePos, u32 param_2, s8 i_reverb)
|
||||
mDoAud_zelAudio_c::getInterface()->seStart(i_sfxID, i_sePos, param_2, i_reverb, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
}
|
||||
|
||||
inline void mDoAud_seDeleteObject(Vec* i_sePos) {
|
||||
mDoAud_zelAudio_c::getInterface()->seDeleteObject(i_sePos);
|
||||
}
|
||||
|
||||
inline void mDoAud_bgmMuteMtDragon() {
|
||||
mDoAud_zelAudio_c::getInterface()->bgmMuteMtDragon();
|
||||
}
|
||||
|
||||
+93
-36
@@ -4,64 +4,121 @@
|
||||
//
|
||||
|
||||
#include "f_op/f_op_actor.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "f_op/f_op_actor_tag.h"
|
||||
#include "f_op/f_op_draw_tag.h"
|
||||
#include "f_pc/f_pc_leaf.h"
|
||||
#include "d/d_demo.h"
|
||||
#include "d/d_map.h"
|
||||
#include "d/d_meter.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
/* 8002330C-800233C4 .text __ct__10fopAc_ac_cFv */
|
||||
fopAc_ac_c::fopAc_ac_c() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 800233C4-80023400 .text __dt__20fopAc_cullSizeSphereFv */
|
||||
fopAc_cullSizeSphere::~fopAc_cullSizeSphere() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 80023400-8002343C .text __dt__17fopAc_cullSizeBoxFv */
|
||||
fopAc_cullSizeBox::~fopAc_cullSizeBox() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 8002343C-80023478 .text __dt__12dKy_tevstr_cFv */
|
||||
dKy_tevstr_c::~dKy_tevstr_c() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 80023478-800234C0 .text __dt__11dEvt_info_cFv */
|
||||
dEvt_info_c::~dEvt_info_c() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 800234C0-80023514 .text __dt__10fopAc_ac_cFv */
|
||||
fopAc_ac_c::~fopAc_ac_c() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
int g_fopAc_type;
|
||||
u32 fopAc_ac_c::stopStatus;
|
||||
|
||||
/* 80023514-80023540 .text fopAc_IsActor__FPv */
|
||||
void fopAc_IsActor(void*) {
|
||||
/* Nonmatching */
|
||||
s32 fopAc_IsActor(void* pProc) {
|
||||
return fpcBs_Is_JustOfType(g_fopAc_type, ((fopAc_ac_c*)pProc)->mAcType);
|
||||
}
|
||||
|
||||
extern void drawActorPointMiniMap(fopAc_ac_c*);
|
||||
|
||||
/* 80023540-8002362C .text fopAc_Draw__FPv */
|
||||
void fopAc_Draw(void*) {
|
||||
/* Nonmatching */
|
||||
void fopAc_Draw(void* pProc) {
|
||||
if (dMenu_flag())
|
||||
return;
|
||||
|
||||
fopAc_ac_c * actor = (fopAc_ac_c *)pProc;
|
||||
if ((dComIfGp_event_moveApproval(pProc) == 2 || !fopAcM_checkStatus(actor, fopAc_ac_c::stopStatus)) &&
|
||||
(!fopAcM_checkStatus(actor, fopAcStts_CULL_e) || fopAcM_cullingCheck(actor)) &&
|
||||
!fopAcM_checkStatus(actor, fopAcStts_NODRAW_e)) {
|
||||
fopAcM_OffCondition(actor, fopAcCnd_NODRAW_e);
|
||||
fpcLf_DrawMethod(actor->mpDrawMtd, actor);
|
||||
} else {
|
||||
fopAcM_OnCondition(actor, fopAcCnd_NODRAW_e);
|
||||
}
|
||||
|
||||
fopAcM_OffStatus(actor, fopAcStts_NODRAW_e);
|
||||
|
||||
if (dComIfGp_roomControl_getStayNo() >= 0 && fopAcM_checkStatus(actor, fopAcStts_SHOWMAP_e))
|
||||
drawActorPointMiniMap(actor);
|
||||
}
|
||||
|
||||
#define CHECK_FLOAT_CLASS(line, x) JUT_ASSERT(line, !(((sizeof(x) == sizeof(float)) ? __fpclassifyf((float)(x)) : __fpclassifyd((double)(x)) ) == 1));
|
||||
#define CHECK_VEC3_RANGE(line, v) JUT_ASSERT(line, -1.0e32f < v.x && v.x < 1.0e32f && -1.0e32f < v.y && v.y < 1.0e32f && -1.0e32f < v.z && v.z < 1.0e32f)
|
||||
|
||||
/* 8002362C-80023BDC .text fopAc_Execute__FPv */
|
||||
void fopAc_Execute(void*) {
|
||||
/* Nonmatching */
|
||||
s32 fopAc_Execute(void* pProc) {
|
||||
fopAc_ac_c * actor = (fopAc_ac_c *)pProc;
|
||||
s32 ret = TRUE;
|
||||
|
||||
CHECK_FLOAT_CLASS(0x27d, actor->current.pos.x);
|
||||
CHECK_FLOAT_CLASS(0x27e, actor->current.pos.y);
|
||||
CHECK_FLOAT_CLASS(0x27f, actor->current.pos.z);
|
||||
CHECK_VEC3_RANGE(0x286, actor->current.pos);
|
||||
|
||||
if (fopAcM_checkStatus(actor, fopAcStts_NOPAUSE_e) || (!dMenu_flag() && !dScnPly_ply_c::isPause())) {
|
||||
actor->mEvtInfo.setCondition(dEvtCnd_NONE_e);
|
||||
|
||||
s32 moveApproval = dComIfGp_event_moveApproval(actor);
|
||||
if (moveApproval == 2 || (moveApproval != 0 && !fopAcM_checkStatus(actor, fopAc_ac_c::stopStatus)) &&
|
||||
!fopAcM_checkStatus(actor, fopAcStts_NOEXEC_e) || !fopAcM_CheckCondition(actor, fopAcStts_NODRAW_e)) {
|
||||
fopAcM_OffCondition(actor, fopAcCnd_NOEXEC_e);
|
||||
actor->next = actor->current;
|
||||
ret = fpcMtd_Execute((process_method_class*)actor->mSubMtd, actor);
|
||||
} else {
|
||||
fopAcM_OnCondition(actor, fopAcCnd_NOEXEC_e);
|
||||
}
|
||||
|
||||
CHECK_FLOAT_CLASS(0x2b4, actor->current.pos.x);
|
||||
CHECK_FLOAT_CLASS(0x2b5, actor->current.pos.y);
|
||||
CHECK_FLOAT_CLASS(0x2b6, actor->current.pos.z);
|
||||
CHECK_VEC3_RANGE(0x2bd, actor->current.pos);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 80023BDC-80023C30 .text fopAc_IsDelete__FPv */
|
||||
void fopAc_IsDelete(void*) {
|
||||
/* Nonmatching */
|
||||
s32 fopAc_IsDelete(void* pProc) {
|
||||
fopAc_ac_c * actor = (fopAc_ac_c *)pProc;
|
||||
s32 ret = fpcMtd_IsDelete((process_method_class*)actor->mSubMtd, actor);
|
||||
if (ret == 1)
|
||||
fopDwTg_DrawQTo(&actor->mDwTg);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 80023C30-80023CD4 .text fopAc_Delete__FPv */
|
||||
void fopAc_Delete(void*) {
|
||||
/* Nonmatching */
|
||||
s32 fopAc_Delete(void* pProc) {
|
||||
fopAc_ac_c * actor = (fopAc_ac_c *)pProc;
|
||||
s32 ret = fpcMtd_Delete((process_method_class*)actor->mSubMtd, actor);
|
||||
if (ret == 1) {
|
||||
fopAcTg_ActorQTo(&actor->mAcTg);
|
||||
fopDwTg_DrawQTo(&actor->mDwTg);
|
||||
fopAcM_DeleteHeap(actor);
|
||||
dDemo_actor_c *pDemoActor = dComIfGp_demo_getActor(actor->mDemoActorId);
|
||||
if (pDemoActor != NULL)
|
||||
pDemoActor->setActor(NULL);
|
||||
mDoAud_seDeleteObject(&actor->mEyePos);
|
||||
mDoAud_seDeleteObject(&actor->current.pos);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 80023CD4-80023F78 .text fopAc_Create__FPv */
|
||||
void fopAc_Create(void*) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
actor_method_class g_fopAc_Method = {
|
||||
(process_method_func)fopAc_Create,
|
||||
(process_method_func)fopAc_Delete,
|
||||
(process_method_func)fopAc_Execute,
|
||||
(process_method_func)fopAc_IsDelete,
|
||||
(process_method_func)fopAc_Draw,
|
||||
};
|
||||
|
||||
+59
-10
@@ -4,29 +4,78 @@
|
||||
//
|
||||
|
||||
#include "f_op/f_op_camera.h"
|
||||
#include "f_op/f_op_draw_tag.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "d/d_meter.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
/* 80029278-800292CC .text fopCam_Draw__FP12camera_class */
|
||||
void fopCam_Draw(camera_class*) {
|
||||
/* Nonmatching */
|
||||
s32 fopCam_Draw(camera_class* camera) {
|
||||
s32 cam_proc = 1;
|
||||
|
||||
if (!dMenu_flag()) {
|
||||
cam_proc = fpcLf_DrawMethod(camera->mpMtd, camera);
|
||||
}
|
||||
return cam_proc;
|
||||
}
|
||||
|
||||
/* 800292CC-80029328 .text fopCam_Execute__FP12camera_class */
|
||||
void fopCam_Execute(camera_class*) {
|
||||
/* Nonmatching */
|
||||
s32 fopCam_Execute(camera_class* camera) {
|
||||
int ret;
|
||||
|
||||
if (!dMenu_flag() && !dScnPly_ply_c::isPause()) {
|
||||
ret = fpcMtd_Execute((process_method_class*)camera->mpMtd, camera);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 80029328-8002937C .text fopCam_IsDelete__FP12camera_class */
|
||||
void fopCam_IsDelete(camera_class*) {
|
||||
/* Nonmatching */
|
||||
s32 fopCam_IsDelete(camera_class* camera) {
|
||||
s32 ret = fpcMtd_IsDelete((process_method_class*)camera->mpMtd, camera);
|
||||
if (ret == 1)
|
||||
fopDwTg_DrawQTo(&camera->mDwTg);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 8002937C-800293D0 .text fopCam_Delete__FP12camera_class */
|
||||
void fopCam_Delete(camera_class*) {
|
||||
/* Nonmatching */
|
||||
s32 fopCam_Delete(camera_class* camera) {
|
||||
s32 ret = fpcMtd_Delete((process_method_class*)camera->mpMtd, camera);
|
||||
if (ret == 1)
|
||||
fopDwTg_DrawQTo(&camera->mDwTg);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 800293D0-80029468 .text fopCam_Create__FPv */
|
||||
void fopCam_Create(void*) {
|
||||
/* Nonmatching */
|
||||
s32 fopCam_Create(void* pProc) {
|
||||
camera_class* camera = (camera_class*)pProc;
|
||||
|
||||
if (fpcM_IsFirstCreating(pProc)) {
|
||||
camera_process_profile_definition* profile =
|
||||
(camera_process_profile_definition*)fpcM_GetProfile(pProc);
|
||||
camera->mpMtd = profile->mSubMtd;
|
||||
|
||||
fopDwTg_Init(&camera->mDwTg, camera);
|
||||
u32* append = (u32*)fpcM_GetAppend(camera);
|
||||
|
||||
if (append) {
|
||||
fpcM_SetParam(camera, *append);
|
||||
}
|
||||
}
|
||||
|
||||
s32 ret = fpcMtd_Create(&camera->mpMtd->mBase, camera);
|
||||
if (ret == cPhs_COMPLEATE_e) {
|
||||
s32 priority = fpcLf_GetPriority(camera);
|
||||
fopDwTg_ToDrawQ(&camera->mDwTg, priority);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
leafdraw_method_class g_fopCam_Method = {
|
||||
(process_method_func)fopCam_Create,
|
||||
(process_method_func)fopCam_Delete,
|
||||
(process_method_func)fopCam_Execute,
|
||||
(process_method_func)fopCam_IsDelete,
|
||||
(process_method_func)fopCam_Draw,
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@ static int fopKy_Execute(void* i_this) {
|
||||
int ret;
|
||||
kankyo_class* _this = (kankyo_class*)i_this;
|
||||
|
||||
if (dScnPly_ply_c::isPause() && (!dMenu_flag() || fpcM_GetName(i_this) == PROC_ENVSE || fpcM_GetName(i_this) == PROC_LEVEL_SE)) {
|
||||
if (!dScnPly_ply_c::isPause() && (!dMenu_flag() || fpcM_GetName(i_this) == PROC_ENVSE || fpcM_GetName(i_this) == PROC_LEVEL_SE)) {
|
||||
ret = fpcMtd_Execute(&_this->mSubMtd->mBase, i_this);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,17 +10,17 @@
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
/* 8002A688-8002A6B0 .text fopMsg_Draw__FPv */
|
||||
static int fopMsg_Draw(void* i_this) {
|
||||
int fopMsg_Draw(void* i_this) {
|
||||
msg_class* _this = static_cast<msg_class*>(i_this);
|
||||
return fpcLf_DrawMethod(_this->mSubMtd, i_this);
|
||||
}
|
||||
|
||||
/* 8002A6B0-8002A6E8 .text fopMsg_Execute__FPv */
|
||||
static int fopMsg_Execute(void* i_this) {
|
||||
int fopMsg_Execute(void* i_this) {
|
||||
msg_class* _this = static_cast<msg_class*>(i_this);
|
||||
|
||||
int stat = 1;
|
||||
if (dScnPly_ply_c::isPause()) {
|
||||
if (!dScnPly_ply_c::isPause()) {
|
||||
stat = fpcMtd_Execute(&_this->mSubMtd->mBase, i_this);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ static int fopMsg_Execute(void* i_this) {
|
||||
}
|
||||
|
||||
/* 8002A6E8-8002A73C .text fopMsg_IsDelete__FPv */
|
||||
static int fopMsg_IsDelete(void* i_this) {
|
||||
int fopMsg_IsDelete(void* i_this) {
|
||||
msg_class* _this = static_cast<msg_class*>(i_this);
|
||||
|
||||
int stat = fpcMtd_IsDelete(&_this->mSubMtd->mBase, i_this);
|
||||
@@ -40,7 +40,7 @@ static int fopMsg_IsDelete(void* i_this) {
|
||||
}
|
||||
|
||||
/* 8002A73C-8002A788 .text fopMsg_Delete__FPv */
|
||||
static int fopMsg_Delete(void* i_this) {
|
||||
int fopMsg_Delete(void* i_this) {
|
||||
msg_class* _this = static_cast<msg_class*>(i_this);
|
||||
|
||||
int stat = fpcMtd_Delete(&_this->mSubMtd->mBase, i_this);
|
||||
|
||||
Reference in New Issue
Block a user