diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-07-29 18:32:37 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-07-29 18:32:37 +0200 |
commit | 0009558fcb0833ccdf2dcaec9d83b0413125fa5f (patch) | |
tree | 91a6258d27a8840c9020ccfbe3c1afaa528d3df5 /src/core | |
parent | Fix Win32 OAL build (diff) | |
parent | Update README.md (diff) | |
download | re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.tar re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.tar.gz re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.tar.bz2 re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.tar.lz re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.tar.xz re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.tar.zst re3-0009558fcb0833ccdf2dcaec9d83b0413125fa5f.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Camera.cpp | 4 | ||||
-rw-r--r-- | src/core/Fire.cpp | 7 | ||||
-rw-r--r-- | src/core/Game.cpp | 18 | ||||
-rw-r--r-- | src/core/config.h | 1 |
4 files changed, 19 insertions, 11 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index c253d00f..abe0833e 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -3587,8 +3587,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 933c73da..c6dece6a 100644 --- a/src/core/Fire.cpp +++ b/src/core/Fire.cpp @@ -128,11 +128,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 0d839dfa..82e6992d 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -149,9 +149,14 @@ CGame::InitialiseOnceBeforeRW(void) return true; } -#if !defined(LIBRW) && defined(PS2_MATFX) +#ifndef LIBRW +#ifdef PS2_MATFX void ReplaceMatFxCallback(); -#endif +#endif // PS2_MATFX +#ifdef PS2_ALPHA_TEST +void ReplaceAtomicPipeCallback(); +#endif // PS2_ALPHA_TEST +#endif // !LIBRW bool CGame::InitialiseRenderWare(void) @@ -203,9 +208,14 @@ CGame::InitialiseRenderWare(void) #else rw::MatFX::modulateEnvMap = false; #endif -#elif defined(PS2_MATFX) +#else +#ifdef PS2_MATFX ReplaceMatFxCallback(); -#endif +#endif // PS2_MATFX +#ifdef PS2_ALPHA_TEST + ReplaceAtomicPipeCallback(); +#endif // PS2_ALPHA_TEST +#endif // LIBRW CFont::Initialise(); CHud::Initialise(); diff --git a/src/core/config.h b/src/core/config.h index 8972e7b7..94a35782 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -198,6 +198,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 PS2_ALPHA_TEST // emulate ps2 alpha test #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 |