mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-11 19:21:36 -04:00
Merge branch 'main' into surround-redux
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
|
||||
#include <types.h>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/endian.h"
|
||||
#endif
|
||||
|
||||
class JSUInputStream;
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,7 +79,9 @@ public:
|
||||
virtual ~J3DModel() {}
|
||||
|
||||
#if TARGET_PC
|
||||
static void interp_callback(bool isSimFrame, void* pUserWork);
|
||||
static void interp_callback(void* pUserWork);
|
||||
void calc_presentation_base_mtx();
|
||||
void prepare_presentation_view();
|
||||
#endif
|
||||
|
||||
J3DModelData* getModelData() { return mModelData; }
|
||||
@@ -133,6 +135,9 @@ public:
|
||||
/* 0xD0 */ J3DVtxColorCalc* mVtxColorCalc;
|
||||
/* 0xD4 */ J3DUnkCalc1* mUnkCalc1;
|
||||
/* 0xD8 */ J3DUnkCalc2* mUnkCalc2;
|
||||
#if TARGET_PC
|
||||
Mtx mPresentationBase;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* J3DMODEL_H */
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <new>
|
||||
#include <utility>
|
||||
#include <cstdint>
|
||||
#include <type_traits>
|
||||
|
||||
class JKRHeap;
|
||||
typedef void (*JKRErrorHandler)(void*, u32, int);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/interp/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
#define J3D_ASSERTMSG(LINE, COND, MSG) JUT_ASSERT_MSG(LINE, (COND) != 0, MSG)
|
||||
@@ -29,6 +29,7 @@ void J3DModel::initialize() {
|
||||
|
||||
MTXIdentity(mBaseTransformMtx);
|
||||
MTXIdentity(mInternalView);
|
||||
IF_DUSK(MTXIdentity(mPresentationBase));
|
||||
|
||||
mMtxBuffer = NULL;
|
||||
mMatPacket = NULL;
|
||||
@@ -101,17 +102,32 @@ s32 J3DModel::entryModelData(J3DModelData* pModelData, u32 mdlFlags, u32 mtxNum)
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
void J3DModel::interp_callback(bool isSimFrame, void* pUserWork) {
|
||||
void J3DModel::interp_callback(void* pUserWork) {
|
||||
J3DModel* i_this = static_cast<J3DModel*>(pUserWork);
|
||||
if (!isSimFrame) {
|
||||
i_this->calcMaterial();
|
||||
i_this->diff();
|
||||
}
|
||||
i_this->calcMaterial();
|
||||
i_this->diff();
|
||||
}
|
||||
|
||||
void J3DModel::setAnmMtx(int jointNo, Mtx m) {
|
||||
mMtxBuffer->setAnmMtx(jointNo, m);
|
||||
dusk::frame_interp::record_final_mtx(mMtxBuffer->getAnmMtx(jointNo));
|
||||
dusk::interp::record_final_mtx(mMtxBuffer->getAnmMtx(jointNo));
|
||||
}
|
||||
|
||||
void J3DModel::calc_presentation_base_mtx() {
|
||||
Mtx identity;
|
||||
MTXIdentity(identity);
|
||||
J3DCalcViewBaseMtx(identity, mBaseScale, mBaseTransformMtx, mPresentationBase);
|
||||
dusk::interp::record_final_mtx(mPresentationBase);
|
||||
prepare_presentation_view();
|
||||
}
|
||||
|
||||
void J3DModel::prepare_presentation_view() {
|
||||
Mtx replacement;
|
||||
MtxP presentationBase = mPresentationBase;
|
||||
if (dusk::interp::lookup_replacement(mPresentationBase, replacement)) {
|
||||
presentationBase = replacement;
|
||||
}
|
||||
MTXConcat(j3dSys.getViewMtx(), presentationBase, mInternalView);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -470,11 +486,11 @@ void J3DModel::calc() {
|
||||
|
||||
#ifdef TARGET_PC
|
||||
for (u16 i = 0; i < mModelData->getJointNum(); ++i) {
|
||||
dusk::frame_interp::record_final_mtx(getAnmMtx(i));
|
||||
dusk::interp::record_final_mtx(getAnmMtx(i));
|
||||
}
|
||||
|
||||
for (u16 i = 0; i < mModelData->getWEvlpMtxNum(); ++i) {
|
||||
dusk::frame_interp::record_final_mtx(getWeightAnmMtx(i));
|
||||
dusk::interp::record_final_mtx(getWeightAnmMtx(i));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -505,8 +521,9 @@ void J3DModel::entry() {
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
if (mModelData->needsInterpCallBack())
|
||||
dusk::frame_interp::add_interpolation_callback(&J3DModel::interp_callback, this);
|
||||
if (mModelData->needsInterpCallBack()) {
|
||||
dusk::interp::add_interpolation_callback(&J3DModel::interp_callback, this);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -516,18 +533,20 @@ void J3DModel::viewCalc() {
|
||||
|
||||
if (getModelData()->checkFlag(0x10)) {
|
||||
if (getMtxCalcMode() == 2) {
|
||||
#if TARGET_PC
|
||||
calc_presentation_base_mtx();
|
||||
#else
|
||||
J3DCalcViewBaseMtx(j3dSys.getViewMtx(), mBaseScale, mBaseTransformMtx,
|
||||
(MtxP)&mInternalView);
|
||||
#ifdef TARGET_PC
|
||||
dusk::frame_interp::record_final_mtx(mInternalView);
|
||||
#endif
|
||||
}
|
||||
} else if (isCpuSkinningOn()) {
|
||||
if (getMtxCalcMode() == 2) {
|
||||
#if TARGET_PC
|
||||
calc_presentation_base_mtx();
|
||||
#else
|
||||
J3DCalcViewBaseMtx(j3dSys.getViewMtx(), mBaseScale, mBaseTransformMtx,
|
||||
(MtxP)&mInternalView);
|
||||
#ifdef TARGET_PC
|
||||
dusk::frame_interp::record_final_mtx(mInternalView);
|
||||
#endif
|
||||
}
|
||||
} else if (checkFlag(J3DMdlFlag_SkinPosCpu)) {
|
||||
@@ -549,15 +568,6 @@ void J3DModel::viewCalc() {
|
||||
DCStoreRange(getNrmMtxPtr(), mModelData->getDrawMtxNum() * sizeof(Mtx33));
|
||||
}
|
||||
|
||||
#ifdef TARGET_PC
|
||||
Mtx* drawMtx = getDrawMtxPtr();
|
||||
if (drawMtx != J3DMtxBuffer::sNoUseDrawMtxPtr) {
|
||||
for (u16 i = 0; i < mModelData->getDrawMtxNum(); ++i) {
|
||||
dusk::frame_interp::record_final_mtx(drawMtx[i]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
prepareShapePackets();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
|
||||
void J3DDrawBuffer::calcZRatio() {
|
||||
mZRatio = (mZFar - mZNear) / (f32)mEntryTableSize;
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DGD.h"
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include <dusk/logging.h>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/logging.h"
|
||||
#endif
|
||||
|
||||
void J3DGDSetGenMode(u8 nTexGens, u8 nChans, u8 nTevs, u8 nInds,
|
||||
GXCullMode cm) {
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include <cstring>
|
||||
#include <os.h>
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "JSystem/J3DGraphAnimator/J3DModel.h"
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "JSystem/J3DGraphBase/J3DShapeMtx.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include <os.h>
|
||||
#include <cstring>
|
||||
#include "global.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
|
||||
J3DError J3DDisplayListObj::newDisplayList(u32 maxSize) {
|
||||
mMaxSize = ALIGN_NEXT(maxSize, 0x20);
|
||||
@@ -339,6 +342,11 @@ int J3DShapePacket::newDifferedDisplayList(u32 diffFlags) {
|
||||
void J3DShapePacket::prepareDraw() const {
|
||||
mpModel->getVertexBuffer()->setArray();
|
||||
j3dSys.setModel(mpModel);
|
||||
#if TARGET_PC
|
||||
if (mpModel->getMtxCalcMode() == 2) {
|
||||
mpModel->prepare_presentation_view();
|
||||
}
|
||||
#endif
|
||||
j3dSys.setShapePacket((J3DShapePacket*)this);
|
||||
|
||||
J3DShapeMtx::setLODFlag(mpModel->checkFlag(J3DMdlFlag_EnableLOD) != 0);
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DShape.h"
|
||||
|
||||
#include <dolphin/gd.h>
|
||||
#include <gd.h>
|
||||
#include <gx.h>
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "JSystem/J3DGraphBase/J3DVertex.h"
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include <gd.h>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#include <dolphin/gx.h>
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
|
||||
void J3DGDSetVtxAttrFmtv(GXVtxFmt, GXVtxAttrFmtList const*, bool);
|
||||
void J3DFifoLoadPosMtxImm(Mtx, u32);
|
||||
|
||||
@@ -6,13 +6,16 @@
|
||||
#include "JSystem/J3DGraphBase/J3DMatBlock.h"
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include "JSystem/J3DGraphBase/J3DTexture.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/interp/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
DUSK_GAME_DATA u16 J3DShapeMtx::sMtxLoadCache[10];
|
||||
|
||||
#ifdef TARGET_PC
|
||||
#if TARGET_PC
|
||||
static void J3DFrameInterpConcat(MtxP lhs, MtxP rhs, Mtx out) {
|
||||
if (!dusk::frame_interp::lookup_concat_replacement(lhs, rhs, out)) {
|
||||
if (!dusk::interp::lookup_concat_replacement(lhs, rhs, out)) {
|
||||
MTXConcat(lhs, rhs, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include "JSystem/J3DGraphBase/J3DTevs.h"
|
||||
#include "JSystem/J3DGraphBase/J3DTexture.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include "global.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/interp/frame_interpolation.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
|
||||
DUSK_GAME_DATA J3DSys j3dSys;
|
||||
@@ -378,7 +379,7 @@ void J3DSys::reinitPixelProc() {
|
||||
#if TARGET_PC
|
||||
void J3DSys::setViewMtx(const Mtx m) {
|
||||
Mtx patched;
|
||||
if (dusk::frame_interp::lookup_replacement(m, patched)) {
|
||||
if (dusk::interp::lookup_replacement(m, patched)) {
|
||||
m = patched;
|
||||
}
|
||||
MTXCopy(m, mViewMtx);
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
#include <os.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "tracy/Tracy.hpp"
|
||||
#if TARGET_PC
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
|
||||
DUSK_GAME_DATA s16* JASDriver::sDmaDacBuffer[3];
|
||||
|
||||
|
||||
@@ -12,17 +12,18 @@
|
||||
#include "global.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef TARGET_PC
|
||||
#if TARGET_PC
|
||||
#include "dusk/dusk.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/interp/frame_interpolation.h"
|
||||
#include "dusk/logging.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/time.h"
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
|
||||
#include "SDL3/SDL_timer.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
|
||||
#include <SDL3/SDL_timer.h>
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#endif
|
||||
@@ -217,8 +218,8 @@ void JFWDisplay::endGX() {
|
||||
|
||||
if (mFader != NULL) {
|
||||
ortho.setPort();
|
||||
#ifdef TARGET_PC
|
||||
if (dusk::frame_interp::get_ui_tick_pending()) {
|
||||
#if TARGET_PC
|
||||
if (dusk::interp::get_ui_tick_pending()) {
|
||||
mFader->advance();
|
||||
}
|
||||
if (mFader->getStatus() != JUTFader::Wait) {
|
||||
@@ -381,7 +382,7 @@ static void waitForTick(u32 p1, u16 p2) {
|
||||
#if TARGET_PC
|
||||
static Limiter limiter;
|
||||
|
||||
if (dusk::frame_interp::is_enabled() || dusk::getTransientSettings().turboMode) {
|
||||
if (dusk::interp::is_enabled() || dusk::getTransientSettings().turboMode) {
|
||||
limiter.Reset();
|
||||
dusk::frameUsagePct = 0.f;
|
||||
return;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <limits>
|
||||
#include <ranges>
|
||||
#include <string_view>
|
||||
#include <borealis/log.hpp>
|
||||
#include "JSystem/JKernel/JKRDvdRipper.h"
|
||||
#if _WIN32
|
||||
#include <malloc.h>
|
||||
@@ -21,6 +22,8 @@ std::atomic<u64> JKRArchive::sArcOverlayGeneration{0};
|
||||
|
||||
namespace {
|
||||
|
||||
inline constexpr borealis::Log Log{"JKRArchivePri"};
|
||||
|
||||
void* alloc_overlay_buffer(u32 size) {
|
||||
#if _WIN32
|
||||
return _aligned_malloc(size, alignof(std::max_align_t));
|
||||
@@ -452,12 +455,18 @@ bool JKRArchive::copyOverlayData(void* buffer, u32 bufferSize, SDIFileEntry* ent
|
||||
return false;
|
||||
}
|
||||
|
||||
const u32 copySize = overlaySize < bufferSize ? overlaySize : bufferSize;
|
||||
if (copySize != 0) {
|
||||
memcpy(buffer, overlayData, copySize);
|
||||
if (overlaySize > bufferSize) {
|
||||
std::string path;
|
||||
getOverlayPath(entry, path);
|
||||
Log.error("Overlay %s is %u bytes but the game reserved %u\n", path.c_str(), overlaySize,
|
||||
bufferSize);
|
||||
return false;
|
||||
}
|
||||
if (overlaySize != 0) {
|
||||
memcpy(buffer, overlayData, overlaySize);
|
||||
}
|
||||
if (outSize != nullptr) {
|
||||
*outSize = copySize;
|
||||
*outSize = overlaySize;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
#include <gx.h>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/interp/frame_interpolation.h"
|
||||
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#define JPA_DRAW_CTX_PARAM , ParticleDrawCtx* ctx
|
||||
@@ -551,7 +552,7 @@ static void submit_particle_quad(
|
||||
void JPAInterpBillboard(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
Mtx ptclPosMtx;
|
||||
MTXTrans(ptclPosMtx, ptcl->mPosition.x, ptcl->mPosition.y, ptcl->mPosition.z);
|
||||
dusk::frame_interp::record_final_mtx(ptclPosMtx, ptcl);
|
||||
dusk::interp::record_final_mtx(ptclPosMtx, ptcl);
|
||||
}
|
||||
|
||||
void JPAInterpRotBillboard(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
@@ -563,7 +564,7 @@ void JPAInterpRotBillboard(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
ptclPosMtx[0][1] = -sinRot;
|
||||
ptclPosMtx[1][0] = sinRot;
|
||||
ptclPosMtx[1][1] = cosRot;
|
||||
dusk::frame_interp::record_final_mtx(ptclPosMtx, ptcl);
|
||||
dusk::interp::record_final_mtx(ptclPosMtx, ptcl);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -576,7 +577,7 @@ void JPADrawBillboard(JPAEmitterWorkData* work, JPABaseParticle* ptcl JPA_DRAW_C
|
||||
JGeometry::TVec3<f32> pos;
|
||||
#if TARGET_PC
|
||||
Mtx ptclPosMtx;
|
||||
if (dusk::frame_interp::lookup_replacement(ptcl, ptclPosMtx)) {
|
||||
if (dusk::interp::lookup_replacement(ptcl, ptclPosMtx)) {
|
||||
pos.set(ptclPosMtx[0][3], ptclPosMtx[1][3], ptclPosMtx[2][3]);
|
||||
MTXMultVec(work->mPosCamMtx, &pos, &pos);
|
||||
} else
|
||||
@@ -616,7 +617,7 @@ void JPADrawRotBillboard(JPAEmitterWorkData* work, JPABaseParticle* ptcl JPA_DRA
|
||||
#if TARGET_PC
|
||||
Mtx ptclPosMtx;
|
||||
MTXTrans(ptclPosMtx, ptcl->mPosition.x, ptcl->mPosition.y, ptcl->mPosition.z);
|
||||
if (dusk::frame_interp::lookup_replacement(ptcl, ptclPosMtx)) {
|
||||
if (dusk::interp::lookup_replacement(ptcl, ptclPosMtx)) {
|
||||
pos.set(ptclPosMtx[0][3], ptclPosMtx[1][3], ptclPosMtx[2][3]);
|
||||
sinRot = ptclPosMtx[1][0];
|
||||
cosRot = ptclPosMtx[0][0];
|
||||
@@ -993,7 +994,7 @@ void JPAInterpDirection(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
posMtx[2][2] = axisZ.z;
|
||||
posMtx[2][3] = ptcl->mPosition.z;
|
||||
p_plane[work->mPlaneType](posMtx, scaleX, scaleY);
|
||||
dusk::frame_interp::record_final_mtx(posMtx, ptcl);
|
||||
dusk::interp::record_final_mtx(posMtx, ptcl);
|
||||
}
|
||||
|
||||
void JPAInterpRotDirection(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
@@ -1036,7 +1037,7 @@ void JPAInterpRotDirection(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
mtx2[2][2] = axisZ.z;
|
||||
mtx2[2][3] = ptcl->mPosition.z;
|
||||
MTXConcat(mtx2, mtx1, mtx1);
|
||||
dusk::frame_interp::record_final_mtx(mtx1, ptcl);
|
||||
dusk::interp::record_final_mtx(mtx1, ptcl);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1049,7 +1050,7 @@ void JPADrawDirection(JPAEmitterWorkData* work, JPABaseParticle* ptcl JPA_DRAW_C
|
||||
|
||||
Mtx posMtx;
|
||||
#if TARGET_PC
|
||||
if (!dusk::frame_interp::lookup_replacement(ptcl, posMtx) &&
|
||||
if (!dusk::interp::lookup_replacement(ptcl, posMtx) &&
|
||||
!make_direction_mtx(work, ptcl, posMtx))
|
||||
{
|
||||
return;
|
||||
@@ -1112,7 +1113,7 @@ void JPADrawRotDirection(JPAEmitterWorkData* work, JPABaseParticle* ptcl JPA_DRA
|
||||
Mtx mtx1;
|
||||
Mtx mtx2;
|
||||
#if TARGET_PC
|
||||
if (!dusk::frame_interp::lookup_replacement(ptcl, mtx1) &&
|
||||
if (!dusk::interp::lookup_replacement(ptcl, mtx1) &&
|
||||
!make_rot_direction_mtx(work, ptcl, mtx1))
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include <gx.h>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "tracy/Tracy.hpp"
|
||||
#endif
|
||||
|
||||
JPAEmitterManager::JPAEmitterManager(u32 i_ptclNum, u32 i_emtrNum, JKRHeap* pHeap, u8 i_gidMax,
|
||||
u8 i_ridMax) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "JSystem/JParticle/JPAExtraShape.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/interp/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
JPAParticleCallBack::~JPAParticleCallBack() {
|
||||
@@ -210,7 +210,7 @@ void JPABaseParticle::init_c(JPAEmitterWorkData* work, JPABaseParticle* parent)
|
||||
|
||||
#if TARGET_PC
|
||||
void JPABaseParticle::interp(JPAEmitterWorkData* work, void const* drawFunc) {
|
||||
if (!dusk::frame_interp::is_enabled())
|
||||
if (!dusk::interp::is_enabled())
|
||||
return;
|
||||
|
||||
// don't interpolate the first frame
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JParticle/JPAResource.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <gx.h>
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JParticle/JPABaseShape.h"
|
||||
#include "JSystem/JParticle/JPAChildShape.h"
|
||||
@@ -15,11 +11,13 @@
|
||||
#include "JSystem/JParticle/JPAKeyBlock.h"
|
||||
#include "JSystem/JParticle/JPAParticle.h"
|
||||
#include "JSystem/JParticle/JPAResourceManager.h"
|
||||
#include <gx.h>
|
||||
#include "global.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/interp/frame_interpolation.h"
|
||||
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
#define JPA_DRAW_CTX_ARG , &ctx
|
||||
#else
|
||||
@@ -841,7 +839,7 @@ bool JPAResource::calc(JPAEmitterWorkData* work, JPABaseEmitter* emtr) {
|
||||
|
||||
#ifdef TARGET_PC
|
||||
if (((pBsp && pBsp->getDirType() == 3) || (pCsp && pCsp->getDirType() == 3)) &&
|
||||
dusk::frame_interp::is_enabled())
|
||||
dusk::interp::is_enabled())
|
||||
{
|
||||
// ensure mGlobalEmtrDir is valid
|
||||
calcWorkData_d(work);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/audio.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/interp/frame_interpolation.h"
|
||||
#include "dusk/settings.h"
|
||||
#endif
|
||||
|
||||
@@ -655,10 +655,10 @@ value_or_fun:
|
||||
|
||||
value:
|
||||
#if TARGET_PC
|
||||
if (dusk::frame_interp::is_enabled() && u <= 5 &&
|
||||
if (dusk::interp::is_enabled() && u <= 5 &&
|
||||
(operation == data::UNK_0x2 || operation == data::UNK_0x3 || operation == data::UNK_0x12))
|
||||
{
|
||||
dusk::frame_interp::request_presentation_sync();
|
||||
dusk::interp::request_presentation_sync();
|
||||
}
|
||||
#endif
|
||||
adaptor->adaptor_setVariableValue(control, u, operation, param_2, param_3);
|
||||
@@ -666,11 +666,11 @@ value:
|
||||
|
||||
value_n:
|
||||
#if TARGET_PC
|
||||
if (dusk::frame_interp::is_enabled() &&
|
||||
if (dusk::interp::is_enabled() &&
|
||||
(pN == TAdaptor_camera::sauVariableValue_3_POSITION_XYZ || pN == TAdaptor_camera::sauVariableValue_3_TARGET_POSITION_XYZ) &&
|
||||
(operation == data::UNK_0x2 || operation == data::UNK_0x3 || operation == data::UNK_0x12))
|
||||
{
|
||||
dusk::frame_interp::request_presentation_sync();
|
||||
dusk::interp::request_presentation_sync();
|
||||
}
|
||||
#endif
|
||||
adaptor->adaptor_setVariableValue_n(control, pN, u, operation, param_2, param_3);
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
|
||||
|
||||
#ifdef TARGET_PC
|
||||
#include "dusk/interp/frame_interpolation.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
JUTFader::JUTFader(int x, int y, int width, int height, JUtility::TColor pColor)
|
||||
@@ -74,8 +75,8 @@ void JUTFader::control() {
|
||||
void JUTFader::draw() {
|
||||
if (mColor.a != 0) {
|
||||
#ifdef TARGET_PC
|
||||
if (dusk::frame_interp::is_enabled() && mDuration != 0) {
|
||||
const auto step = dusk::frame_interp::get_interpolation_step();
|
||||
if (dusk::interp::is_enabled() && mDuration != 0) {
|
||||
const auto step = dusk::interp::get_interpolation_step();
|
||||
const auto progress = static_cast<f32>(mTimer) / static_cast<f32>(mDuration);
|
||||
const auto timer = mTimer - 1 + step + progress;
|
||||
auto alpha = timer / mDuration;
|
||||
|
||||
Reference in New Issue
Block a user