mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-18 04:48:21 -04:00
Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer
This commit is contained in:
@@ -196,6 +196,9 @@ public:
|
||||
void copyReinPos();
|
||||
void setReinPosHandSubstance(int);
|
||||
void setReinPosNormalSubstance();
|
||||
#if TARGET_PC
|
||||
void lerpControlPoints(f32 alpha);
|
||||
#endif
|
||||
void bgCheck();
|
||||
bool checkSpecialWallHitSubstance(cXyz const&) const;
|
||||
void setServiceWaitTimer();
|
||||
|
||||
@@ -4848,8 +4848,8 @@ inline void dComIfGd_drawXluListDark() {
|
||||
inline void dComIfGd_drawXluListInvisible() {
|
||||
ZoneScoped;
|
||||
#ifdef TARGET_PC
|
||||
// FIXME: Water rendering hack for frame interpolation
|
||||
if (!dusk::getSettings().game.enableFrameInterpolation) {
|
||||
if (dusk::getSettings().game.enableWaterRefraction &&
|
||||
!dusk::getSettings().game.enableFrameInterpolation) {
|
||||
#endif
|
||||
g_dComIfG_gameInfo.drawlist.drawXluListInvisible();
|
||||
#ifdef TARGET_PC
|
||||
@@ -4859,7 +4859,14 @@ inline void dComIfGd_drawXluListInvisible() {
|
||||
|
||||
inline void dComIfGd_drawOpaListInvisible() {
|
||||
ZoneScoped;
|
||||
g_dComIfG_gameInfo.drawlist.drawOpaListInvisible();
|
||||
#ifdef TARGET_PC
|
||||
if (dusk::getSettings().game.enableWaterRefraction &&
|
||||
!dusk::getSettings().game.enableFrameInterpolation) {
|
||||
#endif
|
||||
g_dComIfG_gameInfo.drawlist.drawOpaListInvisible();
|
||||
#ifdef TARGET_PC
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void dComIfGd_drawXluListZxlu() {
|
||||
|
||||
@@ -435,6 +435,10 @@ public:
|
||||
m3DLineMatSortPacket[param_1->getMaterialID()].setMatDark(param_1);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
void refresh3DlineMats(const cXyz& eye);
|
||||
#endif
|
||||
|
||||
void peekZdata() { mPeekZ.peekData(); }
|
||||
void entryZSortListZxlu(J3DPacket* i_packet, cXyz& param_1) {
|
||||
entryZSortXluDrawList(mDrawBuffers[DB_LIST_Z_XLU], i_packet, param_1);
|
||||
|
||||
@@ -152,6 +152,9 @@ public:
|
||||
void setRegionCursor(u8 i_value) { mRegionCursor = i_value; }
|
||||
void setMapDrawFlag(bool i_flag) { mMapDrawFlag = i_flag; }
|
||||
void resetDrug() { field_0x1238 = 0; }
|
||||
#if TARGET_PC
|
||||
void resetScrollArrowMask() { field_0x122d = 0; }
|
||||
#endif
|
||||
|
||||
void offArrowDrawFlag() { mArrowDrawFlag = false; }
|
||||
void onArrowDrawFlag() { mArrowDrawFlag = true; }
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct cXyz;
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace dusk {
|
||||
namespace frame_interp {
|
||||
@@ -15,6 +17,7 @@ void ensure_initialized();
|
||||
void begin_record();
|
||||
void end_record();
|
||||
void interpolate(float step);
|
||||
float get_interpolation_step();
|
||||
void notify_sim_tick_complete();
|
||||
uint32_t begin_presentation_ui_pass();
|
||||
uint32_t get_presentation_ui_advance_ticks();
|
||||
@@ -27,6 +30,8 @@ void record_final_mtx_raw(const Mtx* dest, const Mtx src);
|
||||
bool lookup_replacement(const void* source, Mtx out);
|
||||
bool lookup_concat_replacement(const void* lhs, const void* rhs, Mtx out);
|
||||
|
||||
void camera_eye_from_view_mtx(MtxP view_mtx, cXyz* o_eye);
|
||||
|
||||
} // namespace frame_interp
|
||||
} // namespace dusk
|
||||
#endif
|
||||
|
||||
@@ -52,8 +52,9 @@ struct UserSettings {
|
||||
|
||||
// Graphics
|
||||
ConfigVar<bool> enableBloom;
|
||||
ConfigVar<bool> useWaterProjectionOffset;
|
||||
ConfigVar<bool> enableWaterRefraction;
|
||||
ConfigVar<bool> enableFrameInterpolation;
|
||||
ConfigVar<int> shadowResolutionMultiplier;
|
||||
|
||||
// Audio
|
||||
ConfigVar<bool> noLowHpSound;
|
||||
@@ -77,6 +78,7 @@ struct UserSettings {
|
||||
ConfigVar<std::string> graphicsBackend;
|
||||
ConfigVar<bool> skipPreLaunchUI;
|
||||
ConfigVar<bool> showPipelineCompilation;
|
||||
ConfigVar<bool> wasPresetChosen;
|
||||
} backend;
|
||||
};
|
||||
|
||||
|
||||
+3
-5
@@ -15,12 +15,10 @@
|
||||
#include <Windows.h>
|
||||
#include <shellapi.h>
|
||||
#include <intrin.h>
|
||||
#else
|
||||
#include "SDL3/SDL_timer.h"
|
||||
#endif
|
||||
|
||||
#include "dusk/logging.h"
|
||||
|
||||
constexpr auto DUSK_FRAME_PERIOD = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::duration<double>(1001.0 / 30000.0));
|
||||
|
||||
class Limiter {
|
||||
using delta_clock = std::chrono::high_resolution_clock;
|
||||
using duration_t = std::chrono::nanoseconds;
|
||||
@@ -101,7 +99,7 @@ private:
|
||||
} while (current.QuadPart - start.QuadPart < ticksToWait);
|
||||
}
|
||||
#else
|
||||
void NanoSleep(const duration_t duration) { std::this_thread::sleep_for(duration); }
|
||||
void NanoSleep(const duration_t duration) { SDL_DelayPrecise(duration.count()); }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -541,6 +541,9 @@ public:
|
||||
virtual int getMaterialID() = 0;
|
||||
virtual void setMaterial() = 0;
|
||||
virtual void draw() = 0;
|
||||
#if TARGET_PC
|
||||
virtual void refreshGeometryForPresentationEye(const cXyz& eye) {}
|
||||
#endif
|
||||
|
||||
/* 0x4 */ mDoExt_3DlineMat_c* field_0x4;
|
||||
};
|
||||
@@ -582,11 +585,19 @@ class dKy_tevstr_c;
|
||||
class mDoExt_3DlineMat1_c : public mDoExt_3DlineMat_c {
|
||||
public:
|
||||
int init(u16, u16, ResTIMG*, int);
|
||||
#if TARGET_PC
|
||||
void update(int, GXColor&, dKy_tevstr_c*, const cXyz* presentationEye = nullptr);
|
||||
void update(int, f32, GXColor&, u16, dKy_tevstr_c*, const cXyz* presentationEye = nullptr);
|
||||
#else
|
||||
void update(int, GXColor&, dKy_tevstr_c*);
|
||||
void update(int, f32, GXColor&, u16, dKy_tevstr_c*);
|
||||
#endif
|
||||
int getMaterialID() { return 1; }
|
||||
void setMaterial();
|
||||
void draw();
|
||||
#if TARGET_PC
|
||||
void refreshGeometryForPresentationEye(const cXyz& eye) override;
|
||||
#endif
|
||||
|
||||
cXyz* getPos(int i_idx) { return mpLines[i_idx].field_0x0; }
|
||||
f32* getSize(int i_idx) { return mpLines[i_idx].field_0x4; }
|
||||
@@ -600,6 +611,11 @@ private:
|
||||
/* 0x34 */ u16 field_0x34;
|
||||
/* 0x36 */ u8 mIsDrawn;
|
||||
/* 0x38 */ mDoExt_3Dline_c* mpLines;
|
||||
#if TARGET_PC
|
||||
u8 mInterpLineKind;
|
||||
f32 mInterpLineF;
|
||||
u16 mInterpLineU16;
|
||||
#endif
|
||||
};
|
||||
|
||||
class mDoExt_3DlineMat2_c : public mDoExt_3DlineMat1_c {
|
||||
@@ -616,6 +632,9 @@ public:
|
||||
void setMatDark(mDoExt_3DlineMat_c* i_mat) { setMat(i_mat); }
|
||||
|
||||
void setMat(mDoExt_3DlineMat_c*);
|
||||
#if TARGET_PC
|
||||
mDoExt_3DlineMat_c* getFirstMat() const { return mp3DlineMat; }
|
||||
#endif
|
||||
virtual void draw();
|
||||
virtual ~mDoExt_3DlineMatSortPacket() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user