summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-07-29 14:34:57 +0200
committerSergeanur <s.anureev@yandex.ua>2020-07-29 14:34:57 +0200
commitacdc52116ea78b4ebf065b23b0cd48d7e41c711a (patch)
treed50d8667825d3d9e9f99d4948d349e1ffc4e3f97 /src/core
parentsome fakerw additions for shadows; update librw (diff)
parentAdd forgotten file (diff)
downloadre3-acdc52116ea78b4ebf065b23b0cd48d7e41c711a.tar
re3-acdc52116ea78b4ebf065b23b0cd48d7e41c711a.tar.gz
re3-acdc52116ea78b4ebf065b23b0cd48d7e41c711a.tar.bz2
re3-acdc52116ea78b4ebf065b23b0cd48d7e41c711a.tar.lz
re3-acdc52116ea78b4ebf065b23b0cd48d7e41c711a.tar.xz
re3-acdc52116ea78b4ebf065b23b0cd48d7e41c711a.tar.zst
re3-acdc52116ea78b4ebf065b23b0cd48d7e41c711a.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Camera.cpp4
-rw-r--r--src/core/Fire.cpp7
-rw-r--r--src/core/Game.cpp18
-rw-r--r--src/core/Pad.cpp1
-rw-r--r--src/core/SurfaceTable.h10
-rw-r--r--src/core/config.h4
6 files changed, 33 insertions, 11 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index 9f3646e2..2f977a20 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -3995,8 +3995,8 @@ CCamera::CalculateDerivedValues(void)
m_cameraMatrix = Invert(m_matrix);
float hfov = DEGTORAD(CDraw::GetScaledFOV()/2.0f);
- float c = cos(hfov);
- float s = sin(hfov);
+ float c = Cos(hfov);
+ float s = Sin(hfov);
// right plane
m_vecFrustumNormals[0] = CVector(c, -s, 0.0f);
diff --git a/src/core/Fire.cpp b/src/core/Fire.cpp
index 3752f1ba..a6928def 100644
--- a/src/core/Fire.cpp
+++ b/src/core/Fire.cpp
@@ -141,11 +141,8 @@ CFire::ProcessFire(void)
lightpos.z = m_vecPos.z + 5.0f;
if (!m_pEntity) {
- CShadows::StoreStaticShadow((uintptr)this, SHADOWTYPE_ADDITIVE, gpShadowExplosionTex, &lightpos,
- 7.0f, 0.0f, 0.0f, -7.0f,
- 255, // this is 0 on PC which results in no shadow
- nRandNumber / 2, nRandNumber / 2, 0,
- 10.0f, 1.0f, 40.0f, 0, 0.0f);
+ CShadows::StoreStaticShadow((uintptr)this, SHADOWTYPE_ADDITIVE, gpShadowExplosionTex, &lightpos, 7.0f, 0.0f, 0.0f, -7.0f, 0, nRandNumber / 2,
+ nRandNumber / 2, 0, 10.0f, 1.0f, 40.0f, 0, 0.0f);
}
fGreen = nRandNumber / 128;
fRed = nRandNumber / 128;
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index 39bbd364..75c3773c 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -152,9 +152,14 @@ CGame::InitialiseOnceBeforeRW(void)
return true;
}
-#if !defined(LIBRW) && defined(PS2_MATFX)
+#ifndef LIBRW
+#ifdef PS2_MATFX
void ReplaceMatFxCallback();
-#endif
+#endif // PS2_MATFX
+#ifdef DUAL_PASS_RENDERING
+void ReplaceAtomicPipeCallback();
+#endif // DUAL_PASS_RENDERING
+#endif // !LIBRW
bool
CGame::InitialiseRenderWare(void)
@@ -206,9 +211,14 @@ CGame::InitialiseRenderWare(void)
#else
rw::MatFX::modulateEnvMap = false;
#endif
-#elif defined(PS2_MATFX)
+#else
+#ifdef PS2_MATFX
ReplaceMatFxCallback();
-#endif
+#endif // PS2_MATFX
+#ifdef DUAL_PASS_RENDERING
+ ReplaceAtomicPipeCallback();
+#endif // DUAL_PASS_RENDERING
+#endif // LIBRW
CFont::Initialise();
CHud::Initialise();
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index 8043bb6c..cfe79dcc 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -8,6 +8,7 @@
#include "common.h"
#include "crossplatform.h"
+#include "platform.h"
#ifdef XINPUT
#include <xinput.h>
#pragma comment( lib, "Xinput9_1_0.lib" )
diff --git a/src/core/SurfaceTable.h b/src/core/SurfaceTable.h
index 359ebd5c..5fe9c24e 100644
--- a/src/core/SurfaceTable.h
+++ b/src/core/SurfaceTable.h
@@ -88,6 +88,16 @@ IsShootThrough(uint8 surfType)
return false;
}
+inline bool
+IsSeeThrough(uint8 surfType)
+{
+ switch(surfType)
+ case SURFACE_GLASS:
+ case SURFACE_TRANSPARENT_CLOTH:
+ return true;
+ return false;
+}
+
class CSurfaceTable
{
static float ms_aAdhesiveLimitTable[NUMADHESIVEGROUPS][NUMADHESIVEGROUPS];
diff --git a/src/core/config.h b/src/core/config.h
index c9c65051..8d85b3a2 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -214,6 +214,7 @@ enum Config {
#define ASPECT_RATIO_SCALE // Not just makes everything scale with aspect ratio, also adds support for all aspect ratios
#define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch)
#define USE_TXD_CDIMAGE // generate and load textures from txd.img
+#define DUAL_PASS_RENDERING // dual pass rendering from SkyGfx
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
//#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
//#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
@@ -292,4 +293,7 @@ enum Config {
#define FREE_CAM // Rotating cam
// Audio
+#ifndef AUDIO_OAL // is not working yet for openal
#define AUDIO_CACHE // cache sound lengths to speed up the cold boot
+#endif
+//#define PS2_AUDIO // changes audio paths for cutscenes and radio to PS2 paths, needs vbdec to support VB with MSS \ No newline at end of file