diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index 0905c93ef..ba12f61c0 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -1305,6 +1305,10 @@ inline s16 dComIfGs_getRestartOptionAngleY() { return g_dComIfG_gameInfo.save.getRestart().getRestartOptionAngleY(); } +inline f32 dComIfGs_getLastSceneSpeedF() { + return g_dComIfG_gameInfo.save.getRestart().getLastSpeedF(); +} + inline u32 dComIfGs_getLastSceneMode() { return g_dComIfG_gameInfo.save.getRestart().getLastMode(); } diff --git a/include/d/d_save.h b/include/d/d_save.h index 4f9717851..4ce034969 100644 --- a/include/d/d_save.h +++ b/include/d/d_save.h @@ -783,8 +783,8 @@ public: } s16 getStartPoint() { return mStartCode; } - u32 getLastMode() { return mLastMode; } f32 getLastSpeedF() { return mLastSpeedF; } + u32 getLastMode() { return mLastMode; } s8 getRoomNo() { return mRestartRoom; } u32 getRoomParam() { return mRestartParam; } cXyz& getRoomPos() { return mRestartPos; } diff --git a/src/d/actor/d_a_player_main.cpp b/src/d/actor/d_a_player_main.cpp index 90e3fd79b..bf32baeb4 100644 --- a/src/d/actor/d_a_player_main.cpp +++ b/src/d/actor/d_a_player_main.cpp @@ -12494,7 +12494,7 @@ cPhs_State daPy_lk_c::makeBgWait() { } } else if ((startMode == 1) || (startMode == 5)) { if (mEventIdx == 0xFF) { - mVelocity = g_dComIfG_gameInfo.save.getRestart().getLastSpeedF(); + mVelocity = dComIfGs_getLastSceneSpeedF(); mDemo.setDemoType(4); mDemo.setDemoMode(daPy_demo_c::DEMO_UNK0E_e); mDemo.setMoveAngle(current.angle.y); diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp index 8e2e3d816..b4d1de893 100644 --- a/src/d/d_camera.cpp +++ b/src/d/d_camera.cpp @@ -4588,7 +4588,7 @@ void preparation(camera_process_class* i_this) { dDlst_window_c* window = get_window(camera_id); view_port_class* viewport = window->getViewPort(); - f32 aspect = 1.3333334f * fapGmHIO_getAspectRatio(); + f32 aspect = (4.0f/3.0f) * fapGmHIO_getAspectRatio(); camera->SetWindow(viewport->mWidth, viewport->mHeight); fopCamM_SetAspect(a_this, aspect); diff --git a/src/d/d_demo.cpp b/src/d/d_demo.cpp index 494b6559b..463ce6ef2 100644 --- a/src/d/d_demo.cpp +++ b/src/d/d_demo.cpp @@ -305,7 +305,7 @@ void dDemo_camera_c::JSGSetProjectionFovy(f32 v) { f32 dDemo_camera_c::JSGGetProjectionAspect() const { camera_class* view = getView(); if (view == NULL) - return 1.3333334f; + return (4.0f/3.0f); return view->mAspect; } diff --git a/src/d/d_drawlist.cpp b/src/d/d_drawlist.cpp index a13c87025..275f473c8 100644 --- a/src/d/d_drawlist.cpp +++ b/src/d/d_drawlist.cpp @@ -1269,7 +1269,7 @@ static void dummy() { // Fakematch to fix the vtable order and weak destructor order of dDlst_shadowReal_c and dDlst_shadowTri_c. struct { dDlst_shadowReal_c temp[1]; - }* temp; + }* temp = NULL; delete temp; } diff --git a/src/d/d_ovlp_fade2.cpp b/src/d/d_ovlp_fade2.cpp index b8227613a..a11d5f1ee 100644 --- a/src/d/d_ovlp_fade2.cpp +++ b/src/d/d_ovlp_fade2.cpp @@ -51,7 +51,7 @@ void dOvlpFd2_dlst_c::draw() { GXEnd(); Mtx44 proj; - C_MTXPerspective(proj, 60.0f, fapGmHIO_getAspectRatio() * 1.33333333f, 100.0f, 100000.0f); + C_MTXPerspective(proj, 60.0f, fapGmHIO_getAspectRatio() * (4.0f/3.0f), 100.0f, 100000.0f); GXSetProjection(proj, GX_PERSPECTIVE); GXInitTexObj(mDoGph_gInf_c::getFrameBufferTexObj(), mDoGph_gInf_c::getFrameBufferTex(), 320, 240, GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE); diff --git a/src/m_Do/m_Do_graphic.cpp b/src/m_Do/m_Do_graphic.cpp index 4385c7fa1..cd14a4128 100644 --- a/src/m_Do/m_Do_graphic.cpp +++ b/src/m_Do/m_Do_graphic.cpp @@ -1452,7 +1452,7 @@ bool mDoGph_Painter() { mDoMtx_trans(viewMtx, 320.0f, 240.0f, 0.0f); JPADrawInfo jpaDrawInfo2D(viewMtx, 45.0f, 1.218f); jpaDrawInfo2D.setFovy(0.0f); - jpaDrawInfo2D.setAspect(1.33333333f); + jpaDrawInfo2D.setAspect(4.0f/3.0f); if (!dMenu_flag()) dComIfGp_particle_draw2Dback(&jpaDrawInfo2D); dComIfGp_particle_draw2DmenuBack(&jpaDrawInfo2D);