Merge branch 'master' into miami

# Conflicts:
#	src/animation/RpAnimBlend.cpp
#	src/audio/oal/stream.cpp
#	src/audio/sampman.h
#	src/control/Pickups.cpp
#	src/core/Collision.cpp
#	src/core/Collision.h
#	src/core/FileLoader.cpp
#	src/core/FileMgr.cpp
#	src/core/FileMgr.h
#	src/core/Streaming.cpp
#	src/core/Streaming.h
#	src/core/SurfaceTable.h
#	src/modelinfo/VehicleModelInfo.h
#	src/peds/Ped.cpp
#	src/rw/RwHelper.cpp
#	src/rw/RwHelper.h
#	src/skel/glfw/glfw.cpp
#	src/skel/platform.h
#	src/text/Text.cpp
#	src/text/Text.h
#	src/vehicles/CarGen.cpp
#	src/vehicles/Heli.cpp
This commit is contained in:
Sergeanur
2020-07-29 15:34:57 +03:00
14 changed files with 377 additions and 41 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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();

View File

@ -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" )

View File

@ -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];

View File

@ -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