Merge remote-tracking branch 'origin/main' into 26-03-28-movie-player

This commit is contained in:
PJB3005
2026-03-29 03:16:24 +02:00
9 changed files with 95 additions and 63 deletions
+3 -1
View File
@@ -14,6 +14,8 @@
#include "JSystem/J2DGraph/J2DAnmLoader.h"
#include <cstring>
#include "dusk/memory.h"
class daCoach2D_HIO_c : public mDoHIO_entry_c {
public:
struct Param {
@@ -153,7 +155,7 @@ int daCoach2D_c::createHeap() {
int daCoach2D_c::create() {
int phase_state = dComIfG_resLoad(this, l_arcName);
if (phase_state == cPhs_COMPLEATE_e) {
if (!fopAcM_entrySolidHeap(this, daCoach2D_createHeap, 0x5050)) {
if (!fopAcM_entrySolidHeap(this, daCoach2D_createHeap, HEAP_SIZE(0x5050, 0x6000))) {
return cPhs_ERROR_e;
}
+10 -1
View File
@@ -4846,6 +4846,15 @@ bool dCamera_c::lockonCamera(s32 param_0) {
}
}
#if TARGET_PC
f32 sp194 = 1.0f;
if (mCurCamStyleTimer < lockon_change_timer && !lockon->field_0x2a) {
sp194 = dCamMath::rationalBezierRatio((f32)mCurCamStyleTimer / lockon_change_timer, 0.5f);
ang2 *= sp194;
} else if (mCurCamStyleTimer >= lockon_change_timer) {
lockon->field_0x2a = true;
}
#else
f32 sp194;
if (mCurCamStyleTimer < lockon_change_timer && !lockon->field_0x2a) {
sp194 = dCamMath::rationalBezierRatio((f32)mCurCamStyleTimer / lockon_change_timer, 0.5f);
@@ -4854,7 +4863,7 @@ bool dCamera_c::lockonCamera(s32 param_0) {
lockon->field_0x2a = true;
sp194 = 1.0f;
}
#endif
cSAngle ang3(mViewCache.mDirection.U().Inv() - ang1);
if (mCurCamStyleTimer != 0 && mCurCamStyleTimer < lockon_change_timer) {
+28 -1
View File
@@ -475,6 +475,10 @@ void dMsgScrnHowl_c::drawWave() {
s32 local_94 = 0;
Vec fVar12 = field_0x128;
Vec this_02 = field_0x140;
#if TARGET_PC // TODO: make this actually use the scissor
f32 fVar1 = 1;
f32 fVar2 = 1;
#else
f32 fVar1 = mDoGph_gInf_c::getWidthF() / FB_WIDTH;
f32 fVar2 = mDoGph_gInf_c::getHeightF() / FB_HEIGHT;
grafContext->scissor(
@@ -484,6 +488,8 @@ void dMsgScrnHowl_c::drawWave() {
32.0f + ((this_02.y - fVar12.y) + 2.0f)
);
grafContext->setScissor();
#endif
bool bVar5 = true;
if (field_0x2798 == 0) {
if (mPlotTime != field_0x212c) {
@@ -578,10 +584,17 @@ void dMsgScrnHowl_c::drawGuide() {
J2DGrafContext* grafContext = dComIfGp_getCurrentGrafPort();
Vec local_b0 = field_0x128;
Vec local_bc = field_0x140;
#if TARGET_PC
grafContext->scissor(
(local_b0.x - mDoGph_gInf_c::getMinXF()) / (mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getWidth()),
field_0x2118, (local_bc.x - local_b0.x) / (mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getWidth()),
field_0x2120);
#else
grafContext->scissor(
(local_b0.x - mDoGph_gInf_c::getMinXF()) / (mDoGph_gInf_c::getWidthF() / FB_WIDTH),
field_0x2118, (local_bc.x - local_b0.x) / (mDoGph_gInf_c::getWidthF() / FB_WIDTH),
field_0x2120);
#endif
grafContext->setScissor();
f32 local_cc = mpLineH[0]->getGlobalPosX();
s16 sVar12 = 0;
@@ -709,11 +722,19 @@ void dMsgScrnHowl_c::drawGuide2() {
}
Vec local_58 = field_0x128;
Vec local_64 = field_0x140;
f32 local_70 = mDoGph_gInf_c::getHeightF() / FB_HEIGHT;
#if TARGET_PC
f32 local_70 = mDoGph_gInf_c::getHeightF() / mDoGph_gInf_c::getHeight();
grafContext->scissor(
(local_58.x - mDoGph_gInf_c::getMinXF()) / (mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getWidth()),
field_0x2118, (local_64.x - local_58.x) / (mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getWidth()),
field_0x2120);
#else
f32 local_70 = mDoGph_gInf_c::getHeightF() / mDoGph_gInf_c::getHeight();
grafContext->scissor(
(local_58.x - mDoGph_gInf_c::getMinXF()) / (mDoGph_gInf_c::getWidthF() / FB_WIDTH),
field_0x2118, (local_64.x - local_58.x) / (mDoGph_gInf_c::getWidthF() / FB_WIDTH),
field_0x2120);
#endif
grafContext->setScissor();
f32 local_74 = mpLineH[0]->getGlobalPosX();
s16 local_134 = 0;
@@ -815,9 +836,15 @@ void dMsgScrnHowl_c::drawEffect() {
Vec vec1 = field_0x128;
Vec vec2 = field_0x140;
mDoGph_gInf_c::getHeightF();
#if TARGET_PC
grafContext->scissor(
(vec1.x - mDoGph_gInf_c::getMinXF()) / (mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getWidth()), field_0x2118,
12.0f + ((vec2.x - vec1.x) / (mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getWidth())), field_0x2120);
#else
grafContext->scissor(
(vec1.x - mDoGph_gInf_c::getMinXF()) / (mDoGph_gInf_c::getWidthF() / FB_WIDTH), field_0x2118,
12.0f + ((vec2.x - vec1.x) / (mDoGph_gInf_c::getWidthF() / FB_WIDTH)), field_0x2120);
#endif
grafContext->setScissor();
u8 timer = daAlink_getAlinkActorClass()->getWolfHowlMgrP()->getReleaseTimer();
u8 screenAlpha = mpScreen->search(MULTI_CHAR('line00'))->getAlpha();
+26 -21
View File
@@ -412,11 +412,11 @@ void dScnLogo_c::progOutDraw() {
}
#endif
mDoGph_gInf_c::startFadeIn(1);
mDoGph_gInf_c::startFadeIn(30);
} else {
mExecCommand = EXEC_PROG_SET;
mTimer = 150;
mDoGph_gInf_c::startFadeIn(1);
mDoGph_gInf_c::startFadeIn(30);
}
}
}
@@ -427,7 +427,7 @@ void dScnLogo_c::progSetDraw() {
if (mTimer == 0) {
mExecCommand = EXEC_PROG_SET2;
mTimer = 30;
mDoGph_gInf_c::startFadeOut(1);
mDoGph_gInf_c::startFadeOut(30);
}
}
@@ -463,15 +463,15 @@ void dScnLogo_c::progChangeDraw() {
mTimer = 90;
#else
if (mDoRst::getWarningDispFlag() != 0) {
mTimer = 1;
mTimer = 90;
mExecCommand = EXEC_NINTENDO_IN;
} else {
mTimer = 1;
mTimer = 120;
mExecCommand = EXEC_WARNING_IN;
}
#endif
mDoGph_gInf_c::startFadeIn(1);
mDoGph_gInf_c::startFadeIn(30);
}
}
@@ -516,8 +516,8 @@ void dScnLogo_c::warningDispDraw() {
#endif
{
mExecCommand = EXEC_WARNING_OUT;
mTimer = 1;
mDoGph_gInf_c::startFadeOut(1);
mTimer = 30;
mDoGph_gInf_c::startFadeOut(30);
mDoRst::setWarningDispFlag(1);
}
}
@@ -526,9 +526,9 @@ void dScnLogo_c::warningOutDraw() {
dComIfGd_set2DOpa(mWarning);
if (mTimer == 0) {
mTimer = 1;
mTimer = 90;
mExecCommand = EXEC_NINTENDO_IN;
mDoGph_gInf_c::startFadeIn(1);
mDoGph_gInf_c::startFadeIn(30);
}
}
@@ -537,8 +537,8 @@ void dScnLogo_c::nintendoInDraw() {
if (mTimer == 0) {
mExecCommand = EXEC_NINTENDO_OUT;
mTimer = 1;
mDoGph_gInf_c::startFadeOut(1);
mTimer = 30;
mDoGph_gInf_c::startFadeOut(30);
}
}
@@ -547,8 +547,8 @@ void dScnLogo_c::nintendoOutDraw() {
if (mTimer == 0) {
mExecCommand = EXEC_DOLBY_IN;
mTimer = 1;
mDoGph_gInf_c::startFadeIn(1);
mTimer = 30;
mDoGph_gInf_c::startFadeIn(30);
}
}
@@ -557,8 +557,8 @@ void dScnLogo_c::dolbyInDraw() {
if (mTimer == 0) {
mExecCommand = EXEC_DOLBY_OUT;
mTimer = 1;
mDoGph_gInf_c::startFadeOut(1);
mTimer = 30;
mDoGph_gInf_c::startFadeOut(30);
}
}
@@ -567,8 +567,8 @@ void dScnLogo_c::dolbyOutDraw() {
if (mTimer == 0) {
mExecCommand = EXEC_DOLBY_OUT2;
mTimer = 1;
mDoGph_gInf_c::startFadeIn(1);
mTimer = 30;
mDoGph_gInf_c::startFadeIn(30);
}
}
@@ -1098,7 +1098,7 @@ int dScnLogo_c::create() {
mTimer = 90;
#endif
mDoGph_gInf_c::startFadeIn(1);
mDoGph_gInf_c::startFadeIn(30);
#if !(PLATFORM_WII || PLATFORM_SHIELD)
checkProgSelect();
@@ -1107,13 +1107,18 @@ int dScnLogo_c::create() {
mTimer = 1;
field_0x218 = getProgressiveMode();
} else {
#if TARGET_PC
mTimer = 0; // Possibly unnecessary but just in case
mExecCommand = EXEC_DVD_WAIT;
#else
if (mDoRst::getWarningDispFlag()) {
mTimer = 1; // 90;
mTimer = 90;
mExecCommand = EXEC_NINTENDO_IN;
} else {
mTimer = 1;
mTimer = 120;
mExecCommand = EXEC_WARNING_IN;
}
#endif
mDoRst::setProgSeqFlag(1);
}
+7 -7
View File
@@ -57,7 +57,7 @@ namespace dusk {
if (ImGui::BeginCombo("Select Map", previewMap.data())) {
int prevMapIdx = m_mapLoaderInfo.mapIdx;
for (int i = 0; i < region.numMaps; ++i) {
for (int i = 0; i < region.maps.size(); ++i) {
const auto& map = region.maps[i];
std::string label = m_mapLoaderInfo.showInternalNames ? fmt::format("{} ({})", map.mapName, map.mapFile) : map.mapName;
if (ImGui::Selectable(label.data())) {
@@ -79,20 +79,20 @@ namespace dusk {
const auto& map = region.maps[m_mapLoaderInfo.mapIdx];
const auto& room = map.mapRooms[m_mapLoaderInfo.roomNoIdx];
if (map.numRooms > 1) {
if (map.mapRooms.size() > 1) {
ImGui::Text("Selected Room: %2d", room.roomNo);
ImGui::SameLine();
if (ImGui::Button("-###RoomNoIdxDec")) {
m_mapLoaderInfo.roomNoIdx--;
if (m_mapLoaderInfo.roomNoIdx < 0) {
m_mapLoaderInfo.roomNoIdx = map.numRooms - 1;
m_mapLoaderInfo.roomNoIdx = map.mapRooms.size() - 1;
}
m_mapLoaderInfo.pointNoIdx = 0;
}
ImGui::SameLine();
if (ImGui::Button("+###RoomNoIdxInc")) {
m_mapLoaderInfo.roomNoIdx++;
if (m_mapLoaderInfo.roomNoIdx >= map.numRooms) {
if (m_mapLoaderInfo.roomNoIdx >= map.mapRooms.size()) {
m_mapLoaderInfo.roomNoIdx = 0;
}
m_mapLoaderInfo.pointNoIdx = 0;
@@ -117,19 +117,19 @@ namespace dusk {
}
}
if (room.numPoints > 1) {
if (room.roomPoints.size() > 1) {
ImGui::Text("Selected Point: %3d", room.roomPoints[m_mapLoaderInfo.pointNoIdx]);
ImGui::SameLine();
if (ImGui::Button("-###PointNoIdxDec")) {
m_mapLoaderInfo.pointNoIdx--;
if (m_mapLoaderInfo.pointNoIdx < 0) {
m_mapLoaderInfo.pointNoIdx = room.numPoints - 1;
m_mapLoaderInfo.pointNoIdx = room.roomPoints.size() - 1;
}
}
ImGui::SameLine();
if (ImGui::Button("+###PointNoIdxInc")) {
m_mapLoaderInfo.pointNoIdx++;
if (m_mapLoaderInfo.pointNoIdx >= room.numPoints) {
if (m_mapLoaderInfo.pointNoIdx >= room.roomPoints.size()) {
m_mapLoaderInfo.pointNoIdx = 0;
}
}