mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-27 23:45:55 -04:00
56890c32e8
* Consolidate fopAcM_STATUS into fopAc_Status_e * Add _e suffix to fopAcStts enums * Prepare for profile enumeration * Correct typo in scene_process_profile_definition * Manually handle g_profile_Obj_DamCps (inline preprocessing) * Correct g_profile_TAG_LV5SOUP procname to enum * Create d_priority.h * Update process profile definitions * Moved inline comments to the left * Add missing fopAcStts enums * Add d_priority.h include in f_pc_leaf.h * Manually update d_a_obj_damCps profile * Replace fopAcStts enums replacing and anticipatory profile size correction * Changed profile size from literal to sizeof() in anticipation of PR #3116 * Provided putative names to staff-related status enums * Replaced appropriate literals with fopAcStts enums * Fix borked merge * Rename item number enums and move to d_item_data.h * Rename process profile name & draw priority enums * Move process profile name & draw priority enums to appropriate files * Moved fpcNm_ enums from d/d_procname.h to f_pc/f_pc_name.h * Moved fpcDwPi_ enums from d/d_priority.h to f_pc/f_pc_draw_priority.h * ACTUALLY (whoops) stage merge * Correct item mistranslation Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com> --------- Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
246 lines
6.9 KiB
C++
246 lines
6.9 KiB
C++
/**
|
|
* d_ovlp_fade.cpp
|
|
*
|
|
*/
|
|
|
|
#include "d/dolzel.h" // IWYU pragma: keep
|
|
|
|
#include "d/d_ovlp_fade.h"
|
|
#include "d/d_com_inf_game.h"
|
|
#include "f_op/f_op_overlap_mng.h"
|
|
#include "m_Do/m_Do_audio.h"
|
|
#include "m_Do/m_Do_graphic.h"
|
|
|
|
class overlap1_class : public overlap_task_class {
|
|
public:
|
|
/* 0xCC */ int field_0xcc;
|
|
/* 0xCC */ int field_0xd0;
|
|
/* 0xCC */ int field_0xd4;
|
|
};
|
|
|
|
static int dOvlpFd_Draw(overlap1_class* i_this) {
|
|
return 1;
|
|
}
|
|
|
|
static void dOvlpFd_startFadeIn(int param_0) {
|
|
JUTFader* fader = JFWDisplay::getManager()->getFader();
|
|
JUT_ASSERT(0, fader != NULL);
|
|
|
|
fader->setStatus(JUTFader::UNKSTATUS_0, 0);
|
|
fader->setStatus(JUTFader::UNKSTATUS_0, -1);
|
|
fader->startFadeIn(param_0);
|
|
}
|
|
|
|
static int dOvlpFd_FadeOut(overlap1_class* i_this) {
|
|
int var_r31 = i_this->field_0xd4;
|
|
|
|
if (i_this->field_0xcc == 0) {
|
|
mDoAud_setFadeInStart(0);
|
|
|
|
if (fpcM_GetProfName(i_this) == fpcNm_OVERLAP11_e) {
|
|
i_this->field_0xcc = 10;
|
|
} else if (fpcM_GetProfName(i_this) != fpcNm_OVERLAP6_e) {
|
|
dOvlpFd_startFadeIn(var_r31);
|
|
i_this->field_0xcc = var_r31;
|
|
} else {
|
|
dOvlpFd_startFadeIn(0);
|
|
i_this->field_0xcc = 1;
|
|
}
|
|
}
|
|
|
|
if (fpcM_GetProfName(i_this) == fpcNm_OVERLAP11_e && i_this->field_0xcc == 7) {
|
|
dOvlpFd_startFadeIn(7);
|
|
}
|
|
|
|
fopOvlpM_SceneIsStart();
|
|
|
|
if (--i_this->field_0xcc == 0) {
|
|
fopOvlpM_Done(i_this);
|
|
i_this->field_0xcc++;
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
|
|
static int (*dOvlpFd_execute_f)(overlap1_class*);
|
|
|
|
static int dOvlpFd_Wait(overlap1_class* i_this) {
|
|
if (fopOvlpM_IsOutReq(i_this)) {
|
|
dOvlpFd_execute_f = dOvlpFd_FadeOut;
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
|
|
static int dOvlpFd_FadeIn(overlap1_class* i_this) {
|
|
int var_r30 = 30;
|
|
|
|
if (i_this->field_0xd0 == 0) {
|
|
if (fpcM_GetProfName(i_this) == fpcNm_OVERLAP0_e || fpcM_GetProfName(i_this) == fpcNm_OVERLAP7_e)
|
|
{
|
|
if (dComIfGp_isEnableNextStage() == 1) {
|
|
var_r30 = dComIfGp_getNextStageWipeSpeed();
|
|
}
|
|
|
|
if (!JFWDisplay::getManager()->startFadeOut(var_r30)) {
|
|
return 1;
|
|
}
|
|
|
|
i_this->field_0xd0 = var_r30;
|
|
} else if (fpcM_GetProfName(i_this) == fpcNm_OVERLAP10_e ||
|
|
fpcM_GetProfName(i_this) == fpcNm_OVERLAP11_e)
|
|
{
|
|
i_this->field_0xd0 = 1;
|
|
} else {
|
|
i_this->field_0xd0 = 30;
|
|
}
|
|
|
|
i_this->field_0xd4 = var_r30;
|
|
mDoAud_setFadeOutStart(0);
|
|
}
|
|
|
|
if (--i_this->field_0xd0 == 0) {
|
|
dOvlpFd_execute_f = dOvlpFd_Wait;
|
|
mDoGph_gInf_c::startFadeOut(0);
|
|
fopOvlpM_Done(i_this);
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
|
|
static int dOvlpFd_Execute(overlap1_class* i_this) {
|
|
dOvlpFd_execute_f(i_this);
|
|
return 1;
|
|
}
|
|
|
|
static int dOvlpFd_IsDelete(overlap1_class* i_this) {
|
|
return 1;
|
|
}
|
|
|
|
static int dOvlpFd_Delete(overlap1_class* i_this) {
|
|
return 1;
|
|
}
|
|
|
|
static int dOvlpFd_Create(void* i_this) {
|
|
dOvlpFd_execute_f = dOvlpFd_FadeIn;
|
|
return cPhs_COMPLEATE_e;
|
|
}
|
|
|
|
static leafdraw_method_class l_dOvlpFd_Method = {
|
|
(process_method_func)dOvlpFd_Create, (process_method_func)dOvlpFd_Delete,
|
|
(process_method_func)dOvlpFd_Execute, (process_method_func)dOvlpFd_IsDelete,
|
|
(process_method_func)dOvlpFd_Draw,
|
|
};
|
|
|
|
overlap_process_profile_definition g_profile_OVERLAP0 = {
|
|
/* Layer ID */ fpcLy_ROOT_e,
|
|
/* List ID */ 0,
|
|
/* List Prio */ fpcPi_CURRENT_e,
|
|
/* Proc Name */ fpcNm_OVERLAP0_e,
|
|
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
|
/* Size */ sizeof(overlap1_class),
|
|
/* Size Other */ 0,
|
|
/* Parameters */ 0,
|
|
/* Leaf SubMtd */ &g_fopOvlp_Method,
|
|
/* Draw Prio */ fpcDwPi_OVERLAP0_e,
|
|
/* Fade SubMtd */ &l_dOvlpFd_Method,
|
|
};
|
|
|
|
overlap_process_profile_definition g_profile_OVERLAP1 = {
|
|
/* Layer ID */ fpcLy_ROOT_e,
|
|
/* List ID */ 0,
|
|
/* List Prio */ fpcPi_CURRENT_e,
|
|
/* Proc Name */ fpcNm_OVERLAP1_e,
|
|
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
|
/* Size */ sizeof(overlap1_class),
|
|
/* Size Other */ 0,
|
|
/* Parameters */ 0,
|
|
/* Leaf SubMtd */ &g_fopOvlp_Method,
|
|
/* Draw Prio */ fpcDwPi_OVERLAP1_e,
|
|
/* Fade SubMtd */ &l_dOvlpFd_Method,
|
|
};
|
|
|
|
overlap_process_profile_definition g_profile_OVERLAP6 = {
|
|
/* Layer ID */ fpcLy_ROOT_e,
|
|
/* List ID */ 0,
|
|
/* List Prio */ fpcPi_CURRENT_e,
|
|
/* Proc Name */ fpcNm_OVERLAP6_e,
|
|
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
|
/* Size */ sizeof(overlap1_class),
|
|
/* Size Other */ 0,
|
|
/* Parameters */ 0,
|
|
/* Leaf SubMtd */ &g_fopOvlp_Method,
|
|
/* Draw Prio */ fpcDwPi_OVERLAP6_e,
|
|
/* Fade SubMtd */ &l_dOvlpFd_Method,
|
|
};
|
|
|
|
overlap_process_profile_definition g_profile_OVERLAP7 = {
|
|
/* Layer ID */ fpcLy_ROOT_e,
|
|
/* List ID */ 0,
|
|
/* List Prio */ fpcPi_CURRENT_e,
|
|
/* Proc Name */ fpcNm_OVERLAP7_e,
|
|
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
|
/* Size */ sizeof(overlap1_class),
|
|
/* Size Other */ 0,
|
|
/* Parameters */ 0,
|
|
/* Leaf SubMtd */ &g_fopOvlp_Method,
|
|
/* Draw Prio */ fpcDwPi_OVERLAP7_e,
|
|
/* Fade SubMtd */ &l_dOvlpFd_Method,
|
|
};
|
|
|
|
overlap_process_profile_definition g_profile_OVERLAP8 = {
|
|
/* Layer ID */ fpcLy_ROOT_e,
|
|
/* List ID */ 0,
|
|
/* List Prio */ fpcPi_CURRENT_e,
|
|
/* Proc Name */ fpcNm_OVERLAP8_e,
|
|
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
|
/* Size */ sizeof(overlap1_class),
|
|
/* Size Other */ 0,
|
|
/* Parameters */ 0,
|
|
/* Leaf SubMtd */ &g_fopOvlp_Method,
|
|
/* Draw Prio */ fpcDwPi_OVERLAP8_e,
|
|
/* Fade SubMtd */ &l_dOvlpFd_Method,
|
|
};
|
|
|
|
overlap_process_profile_definition g_profile_OVERLAP9 = {
|
|
/* Layer ID */ fpcLy_ROOT_e,
|
|
/* List ID */ 0,
|
|
/* List Prio */ fpcPi_CURRENT_e,
|
|
/* Proc Name */ fpcNm_OVERLAP9_e,
|
|
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
|
/* Size */ sizeof(overlap1_class),
|
|
/* Size Other */ 0,
|
|
/* Parameters */ 0,
|
|
/* Leaf SubMtd */ &g_fopOvlp_Method,
|
|
/* Draw Prio */ fpcDwPi_OVERLAP9_e,
|
|
/* Fade SubMtd */ &l_dOvlpFd_Method,
|
|
};
|
|
|
|
overlap_process_profile_definition g_profile_OVERLAP10 = {
|
|
/* Layer ID */ fpcLy_ROOT_e,
|
|
/* List ID */ 0,
|
|
/* List Prio */ fpcPi_CURRENT_e,
|
|
/* Proc Name */ fpcNm_OVERLAP10_e,
|
|
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
|
/* Size */ sizeof(overlap1_class),
|
|
/* Size Other */ 0,
|
|
/* Parameters */ 0,
|
|
/* Leaf SubMtd */ &g_fopOvlp_Method,
|
|
/* Draw Prio */ fpcDwPi_OVERLAP10_e,
|
|
/* Fade SubMtd */ &l_dOvlpFd_Method,
|
|
};
|
|
|
|
overlap_process_profile_definition g_profile_OVERLAP11 = {
|
|
/* Layer ID */ fpcLy_ROOT_e,
|
|
/* List ID */ 0,
|
|
/* List Prio */ fpcPi_CURRENT_e,
|
|
/* Proc Name */ fpcNm_OVERLAP11_e,
|
|
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
|
/* Size */ sizeof(overlap1_class),
|
|
/* Size Other */ 0,
|
|
/* Parameters */ 0,
|
|
/* Leaf SubMtd */ &g_fopOvlp_Method,
|
|
/* Draw Prio */ fpcDwPi_OVERLAP11_e,
|
|
/* Fade SubMtd */ &l_dOvlpFd_Method,
|
|
};
|