mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-26 08:24:31 -04:00
f_op debug work (#2991)
* f_op debug 1 * f_op debug 2 * f_op debug 3 * f_op debug 4 * f_op debug 5 * f_op_debug fix build * f_op linking * remove goto in fopac_create * fix regressions * fix regressions * pr comments
This commit is contained in:
+48
-49
@@ -6,8 +6,8 @@
|
||||
#include "d/dolzel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/actor/d_a_suspend.h"
|
||||
#include "d/d_com_inf_actor.h"
|
||||
#include "d/d_com_static.h"
|
||||
#include "d/d_demo.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "f_ap/f_ap_game.h"
|
||||
@@ -242,7 +242,7 @@ static int fopAc_Draw(void* i_this) {
|
||||
|
||||
if (!dComIfGp_isPauseFlag()) {
|
||||
int var_r28 = dComIfGp_event_moveApproval(actor);
|
||||
if ((var_r28 == 2 || (!fopAcM_CheckStatus(actor, fopAc_ac_c::stopStatus) &&
|
||||
if ((var_r28 == 2 || (!fopAcM_CheckStatus(actor, fopAc_ac_c::getStopStatus()) &&
|
||||
(!fopAcM_CheckStatus(actor, fopAcStts_CULL_e) || !fopAcM_cullingCheck(actor)))) &&
|
||||
!fopAcM_CheckStatus(actor, 0x21000000))
|
||||
{
|
||||
@@ -315,54 +315,52 @@ static int fopAc_Execute(void* i_this) {
|
||||
JUT_ASSERT(685, -1.0e32f < actor->current.pos.x && actor->current.pos.x < 1.0e32f && -1.0e32f < actor->current.pos.y && actor->current.pos.y < 1.0e32f && -1.0e32f < actor->current.pos.z && actor->current.pos.z < 1.0e32f);
|
||||
#endif
|
||||
|
||||
if (!dComIfGp_isPauseFlag() && dScnPly_c::isPause()) {
|
||||
if (!dComIfA_PauseCheck()) {
|
||||
daSus_c::check(actor);
|
||||
actor->eventInfo.beforeProc();
|
||||
s32 move = dComIfGp_event_moveApproval(i_this);
|
||||
fopAcM_OffStatus(actor, 0x40000000);
|
||||
if (!dComIfGp_isPauseFlag() && !dScnPly_c::isPause() && !dComIfA_PauseCheck()) {
|
||||
daSus_c::check(actor);
|
||||
actor->eventInfo.beforeProc();
|
||||
s32 move = dComIfGp_event_moveApproval(actor);
|
||||
fopAcM_OffStatus(actor, 0x40000000);
|
||||
|
||||
if (!fopAcM_CheckStatus(actor, 0x20000000) &&
|
||||
(move == 2 ||
|
||||
(move != 0 && !fopAcM_CheckStatus(actor, fopAc_ac_c::stopStatus) &&
|
||||
(!fopAcM_CheckStatus(actor, fopAcStts_NOEXEC_e) || !fopAcM_CheckCondition(actor, fopAcCnd_NODRAW_e)))))
|
||||
if (!fopAcM_CheckStatus(actor, 0x20000000) &&
|
||||
(move == 2 ||
|
||||
(move != 0 && !fopAcM_CheckStatus(actor, fopAc_ac_c::getStopStatus()) &&
|
||||
(!fopAcM_CheckStatus(actor, fopAcStts_NOEXEC_e) || !fopAcM_CheckCondition(actor, fopAcCnd_NODRAW_e)))))
|
||||
{
|
||||
fopAcM_OffCondition(actor, fopAcCnd_NOEXEC_e);
|
||||
actor->old = actor->current;
|
||||
|
||||
#if DEBUG
|
||||
{
|
||||
fopAcM_OffCondition(actor, fopAcCnd_NOEXEC_e);
|
||||
actor->old = actor->current;
|
||||
print_error_check_c error_check(actor, print_error_check_c::sEXECUTE);
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
{
|
||||
print_error_check_c error_check(actor, print_error_check_c::sEXECUTE);
|
||||
#endif
|
||||
ret = fpcMtd_Execute((process_method_class*)actor->sub_method, actor);
|
||||
|
||||
ret = fpcMtd_Execute((process_method_class*)actor->sub_method, actor);
|
||||
|
||||
#if DEBUG
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
actor->eventInfo.suspendProc(actor);
|
||||
fopAcM_OnCondition(actor, fopAcCnd_NOEXEC_e);
|
||||
#if DEBUG
|
||||
}
|
||||
|
||||
if (fopAcM_CheckStatus(actor, 0x20) &&
|
||||
actor->home.pos.y - actor->current.pos.y > 5000.0f)
|
||||
{
|
||||
fopAcM_delete(actor);
|
||||
}
|
||||
|
||||
JUT_ASSERT(750, !isnan(actor->current.pos.x));
|
||||
JUT_ASSERT(751, !isnan(actor->current.pos.y));
|
||||
JUT_ASSERT(752, !isnan(actor->current.pos.z));
|
||||
|
||||
if (actor->current.pos.y < -1e31f) {
|
||||
actor->current.pos.y = -1e31f;
|
||||
}
|
||||
|
||||
JUT_ASSERT(762, -1.0e32f < actor->current.pos.x && actor->current.pos.x < 1.0e32f && -1.0e32f < actor->current.pos.y && actor->current.pos.y < 1.0e32f && -1.0e32f < actor->current.pos.z && actor->current.pos.z < 1.0e32f);
|
||||
|
||||
dKy_depth_dist_set(actor);
|
||||
#endif
|
||||
} else {
|
||||
actor->eventInfo.suspendProc(actor);
|
||||
fopAcM_OnCondition(actor, fopAcCnd_NOEXEC_e);
|
||||
}
|
||||
|
||||
if (fopAcM_CheckStatus(actor, 0x20) &&
|
||||
actor->home.pos.y - actor->current.pos.y > 5000.0f)
|
||||
{
|
||||
fopAcM_delete(actor);
|
||||
}
|
||||
|
||||
JUT_ASSERT(750, !isnan(actor->current.pos.x));
|
||||
JUT_ASSERT(751, !isnan(actor->current.pos.y));
|
||||
JUT_ASSERT(752, !isnan(actor->current.pos.z));
|
||||
|
||||
if (actor->current.pos.y < -1e31f) {
|
||||
actor->current.pos.y = -1e31f;
|
||||
}
|
||||
|
||||
JUT_ASSERT(762, -1.0e32f < actor->current.pos.x && actor->current.pos.x < 1.0e32f && -1.0e32f < actor->current.pos.y && actor->current.pos.y < 1.0e32f && -1.0e32f < actor->current.pos.z && actor->current.pos.z < 1.0e32f);
|
||||
|
||||
dKy_depth_dist_set(actor);
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
@@ -400,7 +398,7 @@ static int fopAc_IsDelete(void* i_this) {
|
||||
|
||||
static int fopAc_Delete(void* i_this) {
|
||||
fopAc_ac_c* actor = (fopAc_ac_c*)i_this;
|
||||
int ret;
|
||||
int ret = FALSE;
|
||||
|
||||
#if DEBUG
|
||||
{
|
||||
@@ -416,7 +414,7 @@ static int fopAc_Delete(void* i_this) {
|
||||
if (ret == TRUE) {
|
||||
fopAcTg_ActorQTo(&actor->actor_tag);
|
||||
fopDwTg_DrawQTo(&actor->draw_tag);
|
||||
fopAcM_DeleteHeap(actor);
|
||||
fopAcM_DeleteHeap((fopAc_ac_c*) i_this);
|
||||
|
||||
dDemo_actor_c* demoAc = dDemo_c::getActor(actor->demoActorID);
|
||||
if (demoAc != NULL) {
|
||||
@@ -442,7 +440,7 @@ static int fopAc_Create(void* i_this) {
|
||||
if (fpcM_IsFirstCreating(i_this)) {
|
||||
actor_process_profile_definition* profile =
|
||||
(actor_process_profile_definition*)fpcM_GetProfile(i_this);
|
||||
actor->actor_type = fpcBs_MakeOfType(&g_fopAc_type);
|
||||
actor->actor_type = fpcM_MakeOfType(&g_fopAc_type);
|
||||
actor->sub_method = (profile_method_class*)profile->sub_method;
|
||||
|
||||
fopAcTg_Init(&actor->actor_tag, actor);
|
||||
@@ -506,8 +504,9 @@ static int fopAc_Create(void* i_this) {
|
||||
}
|
||||
|
||||
if (filelist != NULL) {
|
||||
u8 sw;
|
||||
if (!dStage_FileList_dt_GetEnemyAppear1Flag(filelist)) {
|
||||
u8 sw = dStage_FileList_dt_GetBitSw(filelist);
|
||||
sw = dStage_FileList_dt_GetBitSw(filelist);
|
||||
if (sw != 0xFF && dComIfGs_isSwitch(sw, actor->home.roomNo) &&
|
||||
profile->group == fopAc_ENEMY_e)
|
||||
{
|
||||
@@ -515,7 +514,7 @@ static int fopAc_Create(void* i_this) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
} else {
|
||||
u8 sw = dStage_FileList_dt_GetBitSw(filelist);
|
||||
sw = dStage_FileList_dt_GetBitSw(filelist);
|
||||
if (sw != 0xFF && !dComIfGs_isSwitch(sw, actor->home.roomNo) &&
|
||||
profile->group == fopAc_ENEMY_e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user