1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2024-12-22 17:35:29 +00:00
This commit is contained in:
Nikolay Korolev 2021-08-08 15:34:02 +03:00
commit 88b4c7b50b
28 changed files with 58 additions and 29 deletions

View file

@ -28,7 +28,7 @@ find_package_handle_standard_args(MilesSDK DEFAULT_MSG MilesSDK_LIBRARIES MilesS
if(NOT TARGET MilesSDK::MilesSDK)
add_library(MilesSDK::MilesSDK UNKNOWN IMPORTED)
set_target_properties(MilesSDK::MilesSDK PROPERTIES
IMPORTED_LOCATION "${MilesSDK_LIBRARIES}
IMPORTED_LOCATION "${MilesSDK_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${MilesSDK_INCLUDE_DIR}"
)
endif()

View file

@ -18,7 +18,7 @@ find_path(mpg123_INCLUDE_DIR mpg123.h
PATH_SUFFIXES include
)
find_library(mpg123_LIBRARIES NAMES mpg123 mpg123-0
find_library(mpg123_LIBRARIES NAMES mpg123 mpg123-0 libmpg123-0
HINTS ${PKG_MPG123_LIBRARIES}
PATHS "${mpg123_DIR}"
PATH_SUFFIXES lib

View file

@ -178,9 +178,8 @@ static const int32 gOneShotCol[] = {SFX_COL_TARMAC_1,
void
cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
{
int16 s1;
int16 s2;
uint16 s1;
uint16 s2;
int32 emittingVol;
float ratio;

View file

@ -47,9 +47,6 @@
#define CHANNEL_PLAYER_VEHICLE_ENGINE m_nActiveSamples
#endif
enum PLAY_STATUS { PLAY_STATUS_STOPPED = 0, PLAY_STATUS_PLAYING, PLAY_STATUS_FINISHED };
enum LOADING_STATUS { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOADING_STATUS_FAILED };
void
cAudioManager::PreInitialiseGameSpecificSetup()
{
@ -4082,7 +4079,7 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_nCounter = 6;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE;
m_sQueueSample.m_nFrequency += 200;
m_sQueueSample.m_nOffset = MAX_VOLUME;
m_sQueueSample.m_nOffset = 127;
AddSampleToRequestedQueue();
}
return TRUE;

View file

@ -192,6 +192,9 @@ enum {
MAX_REFLECTIONS,
};
enum PLAY_STATUS { PLAY_STATUS_STOPPED = 0, PLAY_STATUS_PLAYING, PLAY_STATUS_FINISHED };
enum LOADING_STATUS { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOADING_STATUS_FAILED };
class cAudioManager
{
public:
@ -214,8 +217,10 @@ public:
tAudioEntity m_asAudioEntities[NUM_AUDIOENTITIES];
int32 m_anAudioEntityIndices[NUM_AUDIOENTITIES];
int32 m_nAudioEntitiesTotal;
#ifdef GTA_PC
CVector m_avecReflectionsPos[NUM_AUDIO_REFLECTIONS];
float m_afReflectionsDistances[NUM_AUDIO_REFLECTIONS];
#endif
cAudioScriptObjectManager m_sAudioScriptObjectManager;
// miami

View file

@ -38,7 +38,7 @@ struct ALDEVICEINFO {
{
delete[] strDeviceName;
strDeviceName = NULL;
}
}
void SetName(const char *name)
{

View file

@ -1025,11 +1025,20 @@ cSampleManager::Initialise(void)
if ( GetDriveType(m_szCDRomRootPath) == DRIVE_CDROM )
{
FILE *f;
#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_szCDRomRootPath);
strcat(filepath, StreamedNameTable[0]);
FILE *f = fopen(filepath, "rb");
strcat(filepath, PS2StreamedNameTable[0]);
f = fopen(filepath, "rb");
if ( !f )
#endif
{
strcpy(filepath, m_szCDRomRootPath);
strcat(filepath, StreamedNameTable[0]);
f = fopen(filepath, "rb");
}
if ( f )
{
fclose(f);
@ -1410,6 +1419,7 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
{
#if !defined(NO_CDCHECK) // TODO: check steam, probably GTAVC_STEAM_PATCH needs to be added
char filepath[MAX_PATH];
FILE *f;
strcpy(filepath, m_MiscomPath);
strcat(filepath, StreamedNameTable[STREAMED_SOUND_MISSION_COMPLETED4]);

View file

@ -178,7 +178,7 @@ add_providers()
SampleManager.Set3DProviderName(n, providers[n].name);
n++;
}
if ( alGetEnumValue("AL_EFFECT_EAXREVERB") != 0
|| pDeviceList->IsExtensionSupported(i, ADEXT_EAX2)
|| pDeviceList->IsExtensionSupported(i, ADEXT_EAX3)
@ -930,8 +930,7 @@ cSampleManager::Initialise(void)
aStream[0]->Close();
nStreamLength[i] = tatalms;
}
else
} else
USERERROR("Can't open '%s'\n", StreamedNameTable[i]);
}
#ifdef AUDIO_CACHE

View file

@ -23,6 +23,7 @@
#ifdef FIX_BUGS
#include "Replay.h"
#endif
#include "SaveBuf.h"
#include "Script.h"
#include "Shadows.h"
#include "SpecialFX.h"

View file

@ -1,6 +1,7 @@
#include "common.h"
#include "Restart.h"
#include "SaveBuf.h"
#include "Zones.h"
#include "PathFind.h"
#include "SaveBuf.h"

View file

@ -12,6 +12,7 @@
#include "Pools.h"
#include "Population.h"
#include "RpAnimBlend.h"
#include "SaveBuf.h"
#include "Shadows.h"
#include "SpecialFX.h"
#include "World.h"

View file

@ -226,7 +226,7 @@ CCam::Process(void)
break;
case MODE_CAM_ON_A_STRING:
#ifdef FREE_CAM
if(CCamera::bFreeCam)
if(CCamera::bFreeCam && !CVehicle::bCheat5)
Process_FollowCar_SA(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
else
#endif

View file

@ -4076,7 +4076,7 @@ CCamera::IsPointVisible(const CVector &center, const CMatrix *mat)
}
bool
CCamera::IsSphereVisible(const CVector &center, float radius, const CMatrix *mat)
CCamera::IsSphereVisible(const CVector &center, float radius, Const CMatrix *mat)
{
#ifdef GTA_PS2
CVuVector c;

View file

@ -631,7 +631,7 @@ public:
CVector &GetGameCamPosition(void) { return m_vecGameCamPos; }
void CalculateDerivedValues(void);
bool IsPointVisible(const CVector &center, const CMatrix *mat);
bool IsSphereVisible(const CVector &center, float radius, const CMatrix *mat);
bool IsSphereVisible(const CVector &center, float radius, Const CMatrix *mat);
bool IsSphereVisible(const CVector &center, float radius);
bool IsBoxVisible(CVUVECTOR *box, const CMatrix *mat);
};

View file

@ -792,12 +792,12 @@ TriggerAudio_StereoMono(CMenuMultiChoiceTriggered *widget)
{
if (widget->GetMenuSelection() == 1)
{
DMAudio.SetMonoMode(true);
DMAudio.SetMonoMode(TRUE);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MONO, 0);
}
else
{
DMAudio.SetMonoMode(false);
DMAudio.SetMonoMode(FALSE);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_STEREO, 0);
}
}

View file

@ -10,6 +10,7 @@
#endif
#include "Population.h"
#include "ProjectileInfo.h"
#include "SaveBuf.h"
#include "Streaming.h"
#include "Wanted.h"
#include "World.h"

View file

@ -16,6 +16,7 @@
#include "Script.h"
#include "TxdStore.h"
#include "World.h"
#include "SaveBuf.h"
#include "Streaming.h"
#include "SpecialFX.h"
#include "Font.h"

View file

@ -1,5 +1,6 @@
#pragma once
#include "Sprite2d.h"
#include "Draw.h"
#define CARBLIP_MARKER_COLOR_R 252
#define CARBLIP_MARKER_COLOR_G 138

View file

@ -372,8 +372,11 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function
#define _TODO(x)
#define _TODOCONST(x) (x)
#ifdef CHECK_STRUCT_SIZES
#define VALIDATE_SIZE(struc, size) static_assert(sizeof(struc) == size, "Invalid structure size of " #struc)
#ifdef CHECK_STRUCT_SIZES
template<int s, int t> struct check_size {
static_assert(s == t, "Invalid structure size");
};
#define VALIDATE_SIZE(struc, size) check_size<sizeof(struc), size> struc ## Check
#else
#define VALIDATE_SIZE(struc, size)
#endif

View file

@ -130,7 +130,7 @@ void LangJapSelect(int8 action)
void
CustomFrontendOptionsPopulate(void)
{
// Moved to an array in MenuScreensCustom.cpp, but APIs are still available. see frontendoption.h
// Most of custom options are done statically in MenuScreensCustom.cpp, we add them here only if they're dependent to extra files
int fd;
// These work only if we have neo folder, so they're dynamically added
@ -1271,7 +1271,9 @@ void re3_trace(const char *filename, unsigned int lineno, const char *func, cons
OutputDebugString(buff);
}
#endif
#ifndef MASTER
void re3_usererror(const char *format, ...)
{
va_list va;

View file

@ -16,7 +16,6 @@ using namespace rw;
RwUInt8 RwObjectGetType(const RwObject *obj) { return obj->type; }
RwFrame* rwObjectGetParent(const RwObject *obj) { return (RwFrame*)obj->parent; }
void *RwMalloc(size_t size) { return engine->memfuncs.rwmalloc(size, 0); }
void *RwCalloc(size_t numObj, size_t sizeObj) {
void *mem = RwMalloc(numObj*sizeObj);

View file

@ -110,4 +110,4 @@ float CDraw::ScaleY(float y)
{
return ms_bProperScaling ? y : y * ((float)DEFAULT_SCREEN_HEIGHT/SCREEN_HEIGHT_NTSC);
}
#endif
#endif

View file

@ -49,7 +49,7 @@ UnicodeMakeUpperCase(wchar *dst, const wchar *src) //idk what to do with it, see
}
CFontDetails CFont::Details;
int16 CFont::NewLine;
bool16 CFont::NewLine;
CSprite2d CFont::Sprite[MAX_FONTS];
CFontRenderState CFont::RenderState;

View file

@ -129,7 +129,7 @@ class CFont
#else
static int16 Size[MAX_FONTS][210];
#endif
static int16 NewLine;
static bool16 NewLine;
public:
static CSprite2d Sprite[MAX_FONTS];
static CFontDetails Details;

View file

@ -5,6 +5,10 @@
#include "Camera.h"
#include "Sprite.h"
#ifdef ASPECT_RATIO_SCALE
#include "Frontend.h"
#endif
float CSprite::m_f2DNearScreenZ;
float CSprite::m_f2DFarScreenZ;
float CSprite::m_fRecipNearClipPlane;

View file

@ -1,5 +1,6 @@
#define WITHD3D
#include "common.h"
#include <rpskin.h>
#include "Timecycle.h"
#include "skeleton.h"

View file

@ -3877,7 +3877,7 @@ CAutomobile::DoDriveByShootings(void)
lookingLeft = true;
if(TheCamera.Cams[TheCamera.ActiveCam].LookingRight)
lookingRight = true;
}
}
AnimationId rightAnim = ANIM_STD_CAR_DRIVEBY_RIGHT;
AnimationId leftAnim = ANIM_STD_CAR_DRIVEBY_LEFT;

View file

@ -3163,7 +3163,11 @@ CWeapon::HitsGround(CEntity *holder, CVector *fireSource, CEntity *aimingTo)
void
CWeapon::BlowUpExplosiveThings(CEntity *thing)
{
#ifdef FIX_BUGS
if ( thing && thing->IsObject() )
#else
if ( thing )
#endif
{
CObject *object = (CObject*)thing;
int32 mi = object->GetModelIndex();