Merge main

This commit is contained in:
Pieter-Jan Briers
2026-09-06 02:30:08 +02:00
786 changed files with 10494 additions and 5138 deletions
@@ -7,6 +7,7 @@
#include <new>
#include <utility>
#include <cstdint>
#include <type_traits>
class JKRHeap;
typedef void (*JKRErrorHandler)(void*, u32, int);
@@ -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;
+4 -1
View File
@@ -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) {
+7 -4
View File
@@ -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);
+8 -6
View File
@@ -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,11 +6,14 @@
#include "JSystem/J3DGraphBase/J3DMatBlock.h"
#include "JSystem/J3DGraphBase/J3DSys.h"
#include "JSystem/J3DGraphBase/J3DTexture.h"
#if TARGET_PC
#include "dusk/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)) {
MTXConcat(lhs, rhs, out);
+4 -3
View File
@@ -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 "helpers/gx_helper.h"
#include <tracy/Tracy.hpp>
#endif
DUSK_GAME_DATA J3DSys j3dSys;
+3 -1
View File
@@ -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];
+5 -4
View File
@@ -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/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
+13 -4
View File
@@ -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;
}
+2 -1
View File
@@ -11,8 +11,9 @@
#if TARGET_PC
#include "dusk/frame_interpolation.h"
#include <tracy/Tracy.hpp>
#endif
#include "tracy/Tracy.hpp"
#if TARGET_PC
#define JPA_DRAW_CTX_PARAM , ParticleDrawCtx* ctx
@@ -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) {
+3 -5
View File
@@ -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,12 +11,14 @@
#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 <tracy/Tracy.hpp>
#define JPA_DRAW_CTX_ARG , &ctx
#else
#define JPA_DRAW_CTX_ARG