1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 17:20:00 +00:00

Merge remote-tracking branch 'upstream/miami' into miami

This commit is contained in:
Nikolay Korolev 2020-11-11 00:08:54 +03:00
commit 612a6dd06c
28 changed files with 4443 additions and 1168 deletions

View file

@ -122,9 +122,11 @@ workspace "reVC"
filter { "platforms:*x86*" } filter { "platforms:*x86*" }
architecture "x86" architecture "x86"
floatingpoint "Fast"
filter { "platforms:*amd64*" } filter { "platforms:*amd64*" }
architecture "amd64" architecture "amd64"
floatingpoint "Fast"
filter { "platforms:*arm*" } filter { "platforms:*arm*" }
architecture "ARM" architecture "ARM"
@ -185,6 +187,18 @@ project "librw"
files { path.join(Librw, "src/*.*") } files { path.join(Librw, "src/*.*") }
files { path.join(Librw, "src/*/*.*") } files { path.join(Librw, "src/*/*.*") }
filter { "platforms:*x86*" }
architecture "x86"
floatingpoint "Fast"
filter { "platforms:*amd64*" }
architecture "amd64"
floatingpoint "Fast"
filter "platforms:win*"
staticruntime "on"
buildoptions { "/Zc:sizedDealloc-" }
filter "platforms:bsd*" filter "platforms:bsd*"
includedirs { "/usr/local/include" } includedirs { "/usr/local/include" }
libdirs { "/usr/local/lib" } libdirs { "/usr/local/lib" }
@ -196,6 +210,9 @@ project "librw"
libdirs { "/opt/local/lib" } libdirs { "/opt/local/lib" }
libdirs { "/usr/local/lib" } libdirs { "/usr/local/lib" }
filter "platforms:*gl3_glfw*"
staticruntime "off"
filter "platforms:*RW34*" filter "platforms:*RW34*"
flags { "ExcludeFromBuild" } flags { "ExcludeFromBuild" }
filter {} filter {}
@ -286,9 +303,14 @@ project "reVC"
filter "platforms:win*" filter "platforms:win*"
files { addSrcFiles("src/skel/win") } files { addSrcFiles("src/skel/win") }
includedirs { "src/skel/win" } includedirs { "src/skel/win" }
buildoptions { "/Zc:sizedDealloc-" }
linkoptions "/SAFESEH:NO" linkoptions "/SAFESEH:NO"
characterset ("MBCS") characterset ("MBCS")
targetextension ".exe" targetextension ".exe"
staticruntime "on"
filter "platforms:win*glfw*"
staticruntime "off"
filter "platforms:win*oal" filter "platforms:win*oal"
includedirs { "vendor/openal-soft/include" } includedirs { "vendor/openal-soft/include" }
@ -324,7 +346,6 @@ project "reVC"
end end
filter "platforms:*RW34*" filter "platforms:*RW34*"
staticruntime "on"
includedirs { "sdk/rwsdk/include/d3d8" } includedirs { "sdk/rwsdk/include/d3d8" }
libdirs { "sdk/rwsdk/lib/d3d8/release" } libdirs { "sdk/rwsdk/lib/d3d8/release" }
links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtanim", "rtcharse", "rpanisot" } links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtanim", "rtcharse", "rpanisot" }

File diff suppressed because it is too large Load diff

View file

@ -275,6 +275,7 @@ cAudioManager::ResetTimers(uint32 time)
SampleManager.SetEffectsFadeVolume(0); SampleManager.SetEffectsFadeVolume(0);
SampleManager.SetMusicFadeVolume(0); SampleManager.SetMusicFadeVolume(0);
MusicManager.ResetMusicAfterReload(); MusicManager.ResetMusicAfterReload();
m_bIsPlayerShutUp = false;
#ifdef AUDIO_OAL #ifdef AUDIO_OAL
SampleManager.Service(); SampleManager.Service();
#endif #endif
@ -622,7 +623,6 @@ cAudioManager::AddDetailsToRequestedOrderList(uint8 sample)
m_abSampleQueueIndexTable[m_nActiveSampleQueue][i] = sample; m_abSampleQueueIndexTable[m_nActiveSampleQueue][i] = sample;
} }
// --MIAMI: Done
void void
cAudioManager::AddReflectionsToRequestedQueue() cAudioManager::AddReflectionsToRequestedQueue()
{ {
@ -684,7 +684,6 @@ cAudioManager::AddReflectionsToRequestedQueue()
m_sQueueSample.m_fDistance = oldDist; m_sQueueSample.m_fDistance = oldDist;
} }
// --MIAMI: Done
void void
cAudioManager::UpdateReflections() cAudioManager::UpdateReflections()
{ {

View file

@ -1,9 +1,10 @@
#pragma once #pragma once
#include "audio_enums.h" #include "audio_enums.h"
#include "AudioCollision.h" #include "AudioCollision.h"
#include "PoliceRadio.h" #include "PoliceRadio.h"
#include "VehicleModelInfo.h" #include "VehicleModelInfo.h"
#include "Vehicle.h"
class tSound class tSound
{ {
@ -59,7 +60,7 @@ VALIDATE_SIZE(tAudioEntity, 40);
class tPedComment class tPedComment
{ {
public: public:
int32 m_nSampleIndex; uint32 m_nSampleIndex;
int32 m_nEntityIndex; int32 m_nEntityIndex;
CVector m_vecPos; CVector m_vecPos;
float m_fDistance; float m_fDistance;
@ -76,8 +77,10 @@ public:
uint8 m_nIndexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS]; uint8 m_nIndexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS]; uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS];
uint8 m_nActiveBank; uint8 m_nActiveBank;
#ifdef GTA_PC
bool m_bDelay; bool m_bDelay;
uint32 m_nDelayTimer; uint32 m_nDelayTimer;
#endif
cPedComments() cPedComments()
{ {
@ -91,11 +94,11 @@ public:
m_nCommentsInBank[i] = 0; m_nCommentsInBank[i] = 0;
m_nActiveBank = 0; m_nActiveBank = 0;
} }
void Add(tPedComment *com); void Add(tPedComment *com); // done
void Process(); void Process(); // done
}; };
VALIDATE_SIZE(cPedComments, 1164); VALIDATE_SIZE(cPedComments, 0x490);
class CEntity; class CEntity;
@ -200,7 +203,7 @@ public:
uint8 m_nPlayerMood; uint8 m_nPlayerMood;
uint32 m_nPlayerMoodTimer; uint32 m_nPlayerMoodTimer;
uint8 field_rest[4]; uint8 field_rest[4];
uint8 field_4B3C; bool m_bGenericSfx;
cPedComments m_sPedComments; cPedComments m_sPedComments;
int32 m_nFireAudioEntity; int32 m_nFireAudioEntity;
@ -228,8 +231,8 @@ public:
~cAudioManager(); ~cAudioManager();
// getters // getters
uint32 GetFrameCounter() const { return m_FrameCounter; } uint32 GetFrameCounter() const { return m_FrameCounter; } // done
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; } float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; } // done
int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; } int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
int32 GetRandomNumberInRange(int32 idx, int32 low, int32 high) const { return (m_anRandomTable[idx] % (high - low + 1)) + low; } int32 GetRandomNumberInRange(int32 idx, int32 low, int32 high) const { return (m_anRandomTable[idx] % (high - low + 1)) + low; }
bool IsMissionAudioSamplePlaying(uint8 slot) const; // { return m_sMissionAudio.m_nPlayStatus == 1; } bool IsMissionAudioSamplePlaying(uint8 slot) const; // { return m_sMissionAudio.m_nPlayStatus == 1; }
@ -246,7 +249,7 @@ public:
void CalculateDistance(bool &condition, float dist); // done void CalculateDistance(bool &condition, float dist); // done
bool CheckForAnAudioFileOnCD() const; // done bool CheckForAnAudioFileOnCD() const; // done
void ClearActiveSamples(); // done void ClearActiveSamples(); // done
void ClearMissionAudio(uint8 slot); // done void ClearMissionAudio(uint8 slot); // done (inlined in vc)
void ClearRequestedQueue(); // done (inlined in vc) void ClearRequestedQueue(); // done (inlined in vc)
uint32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const; // done uint32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const; // done
int32 ComputePan(float, CVector *); // done int32 ComputePan(float, CVector *); // done
@ -259,10 +262,104 @@ public:
// functions returning talk sfx, // functions returning talk sfx,
// order from GetPedCommentSfx // order from GetPedCommentSfx
// TODO: miami uint32 GetPlayerTalkSfx(CPed *ped, int16 sound);
uint32 GetCopTalkSfx(CPed *ped, int16 sound);
uint32 GetSwatTalkSfx(CPed *ped, int16 sound);
uint32 GetFBITalkSfx(CPed *ped, int16 sound);
uint32 GetArmyTalkSfx(CPed *ped, int16 sound);
uint32 GetMedicTalkSfx(CPed *ped, int16 sound);
uint32 GetFiremanTalkSfx(CPed *ped, int16 sound);
uint32 GetDefaultTalkSfx(CPed *ped, int16 sound);
uint32 GetHFYSTTalkSfx(CPed *ped, int16 sound);
uint32 GetHFOSTTalkSfx(CPed *ped, int16 sound);
uint32 GetHMYSTTalkSfx(CPed *ped, int16 sound);
uint32 GetHMOSTTalkSfx(CPed *ped, int16 sound);
uint32 GetHFYRITalkSfx(CPed *ped, int16 sound);
uint32 GetHFORITalkSfx(CPed *ped, int16 sound);
uint32 GetHMYRITalkSfx(CPed *ped, int16 sound);
uint32 GetHMORITalkSfx(CPed *ped, int16 sound);
uint32 GetHFYBETalkSfx(CPed *ped, int16 sound);
uint32 GetHFOBETalkSfx(CPed *ped, int16 sound);
uint32 GetHMYBETalkSfx(CPed *ped, int16 sound);
uint32 GetHMOBETalkSfx(CPed *ped, int16 sound);
uint32 GetHFYBUTalkSfx(CPed *ped, int16 sound);
uint32 GetHFYMDTalkSfx(CPed *ped, int16 sound);
uint32 GetHFYCGTalkSfx(CPed *ped, int16 sound);
uint32 GetHFYPRTalkSfx(CPed *ped, int16 sound);
uint32 GetHFOTRTalkSfx(CPed *ped, int16 sound);
uint32 GetHMOTRTalkSfx(CPed *ped, int16 sound);
uint32 GetHMYAPTalkSfx(CPed *ped, int16 sound);
uint32 GetHMOCATalkSfx(CPed *ped, int16 sound);
uint32 GetBMODKTalkSfx(CPed *ped, int16 sound);
uint32 GetBMYCRTalkSfx(CPed *ped, int16 sound);
uint32 GetBFYSTTalkSfx(CPed *ped, int16 sound);
uint32 GetBFOSTTalkSfx(CPed *ped, int16 sound);
uint32 GetBMYSTTalkSfx(CPed *ped, int16 sound);
uint32 GetBMOSTTalkSfx(CPed *ped, int16 sound);
uint32 GetBFYRITalkSfx(CPed *ped, int16 sound);
uint32 GetBFORITalkSfx(CPed *ped, int16 sound);
uint32 GetBMYRITalkSfx(CPed *ped, int16 sound);
uint32 GetBFYBETalkSfx(CPed *ped, int16 sound);
uint32 GetBMYBETalkSfx(CPed *ped, int16 sound);
uint32 GetBFOBETalkSfx(CPed *ped, int16 sound);
uint32 GetBMOBETalkSfx(CPed *ped, int16 sound);
uint32 GetBMYBUTalkSfx(CPed *ped, int16 sound);
uint32 GetBFYPRTalkSfx(CPed *ped, int16 sound);
uint32 GetBFOTRTalkSfx(CPed *ped, int16 sound);
uint32 GetBMOTRTalkSfx(CPed *ped, int16 sound);
uint32 GetBMYPITalkSfx(CPed *ped, int16 sound);
uint32 GetBMYBBTalkSfx(CPed *ped, int16 sound);
uint32 GetWMYCRTalkSfx(CPed *ped, int16 sound);
uint32 GetWFYSTTalkSfx(CPed *ped, int16 sound);
uint32 GetWFOSTTalkSfx(CPed *ped, int16 sound);
uint32 GetWMYSTTalkSfx(CPed *ped, int16 sound);
uint32 GetWMOSTTalkSfx(CPed *ped, int16 sound);
uint32 GetWFYRITalkSfx(CPed *ped, int16 sound);
uint32 GetWFORITalkSfx(CPed *ped, int16 sound);
uint32 GetWMYRITalkSfx(CPed *ped, int16 sound);
uint32 GetWMORITalkSfx(CPed *ped, int16 sound);
uint32 GetWFYBETalkSfx(CPed *ped, int16 sound);
uint32 GetWMYBETalkSfx(CPed *ped, int16 sound);
uint32 GetWFOBETalkSfx(CPed *ped, int16 sound);
uint32 GetWMOBETalkSfx(CPed *ped, int16 sound);
uint32 GetWMYCWTalkSfx(CPed *ped, int16 sound);
uint32 GetWMYGOTalkSfx(CPed *ped, int16 sound);
uint32 GetWFOGOTalkSfx(CPed *ped, int16 sound);
uint32 GetWMOGOTalkSfx(CPed *ped, int16 sound);
uint32 GetWFYLGTalkSfx(CPed *ped, int16 sound);
uint32 GetWMYLGTalkSfx(CPed *ped, int16 sound);
uint32 GetWFYBUTalkSfx(CPed *ped, int16 sound);
uint32 GetWMYBUTalkSfx(CPed *ped, int16 sound);
uint32 GetWMOBUTalkSfx(CPed *ped, int16 sound);
uint32 GetWFYPRTalkSfx(CPed *ped, int16 sound);
uint32 GetWFOTRTalkSfx(CPed *ped, int16 sound);
uint32 GetWMOTRTalkSfx(CPed *ped, int16 sound);
uint32 GetWMYPITalkSfx(CPed *ped, int16 sound);
uint32 GetWMOCATalkSfx(CPed *ped, int16 sound);
uint32 GetWFYJGTalkSfx(CPed *ped, int16 sound);
uint32 GetWMYJGTalkSfx(CPed *ped, int16 sound);
uint32 GetWFYSKTalkSfx(CPed *ped, int16 sound);
uint32 GetWMYSKTalkSfx(CPed *ped, int16 sound);
uint32 GetWFYSHTalkSfx(CPed *ped, int16 sound);
uint32 GetWFOSHTalkSfx(CPed *ped, int16 sound);
uint32 GetJFOTOTalkSfx(CPed *ped, int16 sound);
uint32 GetJMOTOTalkSfx(CPed *ped, int16 sound);
uint32 GetCBTalkSfx(CPed *ped, int16 sound);
uint32 GetHNTalkSfx(CPed *ped, int16 sound);
uint32 GetSGTalkSfx(CPed *ped, int16 sound);
uint32 GetCLTalkSfx(CPed *ped, int16 sound);
uint32 GetGDTalkSfx(CPed *ped, int16 sound);
uint32 GetBKTalkSfx(CPed *ped, int16 sound);
uint32 GetPGTalkSfx(CPed *ped, int16 sound);
uint32 GetVICETalkSfx(CPed *ped, int16 sound, int16 model);
uint32 GetWFYG1TalkSfx(CPed *ped, int16 sound);
uint32 GetWFYG2TalkSfx(CPed *ped, int16 sound);
uint32 GetGenericMaleTalkSfx(CPed *ped, int16 sound); // todo names (inlined in vc)
uint32 GetGenericFemaleTalkSfx(CPed *ped, int16 sound); // todo names (inlined in vc)
// end of functions returning talk sfx // end of functions returning talk sfx
void GenerateIntegerRandomNumberTable(); void GenerateIntegerRandomNumberTable(); // done
char *Get3DProviderName(uint8 id) const; char *Get3DProviderName(uint8 id) const;
uint8 GetCDAudioDriveLetter() const; uint8 GetCDAudioDriveLetter() const;
int8 GetCurrent3DProviderIndex() const; int8 GetCurrent3DProviderIndex() const;
@ -275,109 +372,110 @@ public:
uint8 GetMissionAudioLoadingStatus(uint8 slot) const; // done uint8 GetMissionAudioLoadingStatus(uint8 slot) const; // done
int8 GetMissionScriptPoliceAudioPlayingStatus() const; int8 GetMissionScriptPoliceAudioPlayingStatus() const;
uint8 GetNum3DProvidersAvailable() const; // done uint8 GetNum3DProvidersAvailable() const; // done
int32 GetPedCommentSfx(CPed *ped, int32 sound); uint32 GetPedCommentSfx(CPed *ped, int32 sound);
void GetPhrase(uint32 *phrase, uint32 *prevPhrase, uint32 sample, uint32 maxOffset) const; void GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const;
float GetVehicleDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile, cTransmission *transmission, float velocityChange); float GetVehicleDriveWheelSkidValue(CVehicle* veh, tWheelState wheelState, float gasPedalAudio, cTransmission* transmission, float velocityChange); // done
float GetVehicleNonDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile, cTransmission *transmission, float velocityChange); float GetVehicleNonDriveWheelSkidValue(CVehicle* veh, tWheelState wheelState, cTransmission* transmission, float velocityChange); // done
bool HasAirBrakes(int32 model) const; // done bool HasAirBrakes(int32 model) const; // done
void Initialise(); // done void Initialise(); // done
void InitialisePoliceRadio(); void InitialisePoliceRadio(); //done
void InitialisePoliceRadioZones(); void InitialisePoliceRadioZones(); //done
void InterrogateAudioEntities(); // done void InterrogateAudioEntities(); // done
bool IsAudioInitialised() const; bool IsAudioInitialised() const; // done
bool IsMissionAudioSampleFinished(uint8 slot); bool IsMissionAudioSampleFinished(uint8 slot); // done
bool IsMP3RadioChannelAvailable() const; // done bool IsMP3RadioChannelAvailable() const; // done
bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done
void PlayLoadedMissionAudio(uint8 slot); // done void PlayLoadedMissionAudio(uint8 slot); // done
void PlayOneShot(int32 index, int16 sound, float vol); // done void PlayOneShot(int32 index, int16 sound, float vol); // done
void PlaySuspectLastSeen(float x, float y, float z); // void PlaySuspectLastSeen(float x, float y, float z); // done
void PlayerJustGotInCar() const; // done void PlayerJustGotInCar() const; // done
void PlayerJustLeftCar() const; // done void PlayerJustLeftCar() const; // done
void PostInitialiseGameSpecificSetup(); // void PostInitialiseGameSpecificSetup(); // done
void PostTerminateGameSpecificShutdown(); // done void PostTerminateGameSpecificShutdown(); // done
void PreInitialiseGameSpecificSetup() const; // done void PreInitialiseGameSpecificSetup() const; // done
void PreloadMissionAudio(uint8 slot, Const char *name); // done void PreloadMissionAudio(uint8 slot, Const char *name); // done
void PreTerminateGameSpecificShutdown(); // done void PreTerminateGameSpecificShutdown(); // done
/// processX - main logic of adding new sounds /// processX - main logic of adding new sounds
void ProcessActiveQueues(); // done void ProcessActiveQueues(); // done
bool ProcessAirBrakes(cVehicleParams *params); bool ProcessAirBrakes(cVehicleParams& params); // done
bool ProcessBoatEngine(cVehicleParams *params); bool ProcessBoatEngine(cVehicleParams& params);
bool ProcessBoatMovingOverWater(cVehicleParams *params); bool ProcessBoatMovingOverWater(cVehicleParams& params);
#ifdef GTA_BRIDGE #ifdef GTA_BRIDGE
void ProcessBridge(); void ProcessBridge(); // done(bcs not exists in VC)
void ProcessBridgeMotor(); void ProcessBridgeMotor(); // done(bcs not exists in VC)
void ProcessBridgeOneShots(); void ProcessBridgeOneShots(); // done(bcs not exists in VC)
void ProcessBridgeWarning(); void ProcessBridgeWarning(); // done(bcs not exists in VC)
#endif #endif
bool ProcessCarBombTick(cVehicleParams *params); // done bool ProcessCarBombTick(cVehicleParams& params); // done
void ProcessCesna(cVehicleParams *params); // void ProcessCarHeli(cVehicleParams& params); // done
//void ProcessCrane(); // void ProcessCesna(cVehicleParams& params); //
bool ProcessEngineDamage(cVehicleParams *params); // done //void ProcessCrane(); // done(bcs not exists in VC)
bool ProcessEngineDamage(cVehicleParams& params); // done
void ProcessEntity(int32 sound); // done void ProcessEntity(int32 sound); // done
void ProcessExplosions(int32 explosion); // done void ProcessExplosions(int32 explosion); // done
void ProcessFireHydrant(); // done void ProcessFireHydrant(); // done
void ProcessFires(int32 entity); // void ProcessFires(int32 entity); // done
void ProcessFrontEnd(); // done void ProcessFrontEnd(); // done
void ProcessGarages(); // void ProcessGarages(); //
void ProcessCarHeli(cVehicleParams* params); // done void ProcessJumbo(cVehicleParams& params); // done
void ProcessVehicleFlatTyre(cVehicleParams* params); // done void ProcessJumboAccel(CPlane *plane); // done
void ProcessJumbo(cVehicleParams *); // void ProcessJumboDecel(CPlane *plane); // done
void ProcessJumboAccel(CPlane *plane); // void ProcessJumboFlying(); // done
void ProcessJumboDecel(CPlane *plane); // void ProcessJumboLanding(CPlane *plane); // done
void ProcessJumboFlying(); // void ProcessJumboTakeOff(CPlane *plane); // done
void ProcessJumboLanding(CPlane *plane); // void ProcessJumboTaxi(); // done
void ProcessJumboTakeOff(CPlane *plane); //
void ProcessJumboTaxi(); //
void ProcessLoopingScriptObject(uint8 sound); // void ProcessLoopingScriptObject(uint8 sound); //
void ProcessMissionAudio(); // void ProcessMissionAudio(); //
void ProcessMissionAudioSlot(uint8 slot); // void ProcessMissionAudioSlot(uint8 slot); //
void ProcessModelCarEngine(cVehicleParams *params); // void ProcessModelHeliVehicle(cVehicleParams& params); // done
void ProcessModelVehicle(cVehicleParams& params); // done
void ProcessOneShotScriptObject(uint8 sound); // void ProcessOneShotScriptObject(uint8 sound); //
void ProcessPed(CPhysical *ped); // void ProcessPed(CPhysical *ped); // done
void ProcessPedOneShots(cPedParams *params); // void ProcessPedOneShots(cPedParams *params); //
void ProcessPhysical(int32 id); // done void ProcessPhysical(int32 id); // done
void ProcessPlane(cVehicleParams *params); // done void ProcessPlane(cVehicleParams& params); // done
void ProcessPlayersVehicleEngine(cVehicleParams *params, CVehicle* veh); // done void ProcessPlayerMood(); // done
void ProcessProjectiles(); // void ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh); // done
void ProcessRainOnVehicle(cVehicleParams *params); // void ProcessProjectiles(); // done
void ProcessReverb() const; // void ProcessRainOnVehicle(cVehicleParams& params); // done
bool ProcessReverseGear(cVehicleParams *params); // done void ProcessReverb() const; // done
bool ProcessReverseGear(cVehicleParams& params); // done
void ProcessScriptObject(int32 id); // done void ProcessScriptObject(int32 id); // done
void ProcessSpecial(); void ProcessSpecial(); // done
#ifdef GTA_TRAIN #ifdef GTA_TRAIN
bool ProcessTrainNoise(cVehicleParams *params); bool ProcessTrainNoise(cVehicleParams *params); //done(bcs not exists in VC)
#endif #endif
void ProcessVehicle(CVehicle *vehicle); //done, but need add model functions void ProcessVehicle(CVehicle *vehicle); // done
bool ProcessVehicleDoors(cVehicleParams *params); //done bool ProcessVehicleDoors(cVehicleParams& params); // done
void ProcessVehicleEngine(cVehicleParams *params); //done void ProcessVehicleEngine(cVehicleParams& params); // done
void UpdateGasPedalAudio(CVehicle* veh, int vehType); //done void ProcessVehicleFlatTyre(cVehicleParams& params); // done
void ProcessVehicleHorn(cVehicleParams *params); bool ProcessVehicleHorn(cVehicleParams& params); // done
void ProcessVehicleOneShots(cVehicleParams *params); void ProcessVehicleOneShots(cVehicleParams& params); // done
bool ProcessVehicleReverseWarning(cVehicleParams *params); bool ProcessVehicleReverseWarning(cVehicleParams& params); // done
bool ProcessVehicleRoadNoise(cVehicleParams *params); bool ProcessVehicleRoadNoise(cVehicleParams& params); // done
bool ProcessVehicleSirenOrAlarm(cVehicleParams *params); bool ProcessVehicleSirenOrAlarm(cVehicleParams& params); // done
bool ProcessVehicleSkidding(cVehicleParams *params); bool ProcessVehicleSkidding(cVehicleParams& params); // done
void ProcessWaterCannon(int32); void ProcessWaterCannon(int32); // done
void ProcessWeather(int32 id); // done void ProcessWeather(int32 id); // done
bool ProcessWetRoadNoise(cVehicleParams *params); bool ProcessWetRoadNoise(cVehicleParams& params); // done
void ProcessEscalators(); // done void ProcessEscalators(); // done
void ProcessExtraSounds(); // done void ProcessExtraSounds(); // done
int32 RandomDisplacement(uint32 seed) const; int32 RandomDisplacement(uint32 seed) const; // done
void ReacquireDigitalHandle() const; // done void ReacquireDigitalHandle() const; // done
void ReleaseDigitalHandle() const; // done void ReleaseDigitalHandle() const; // done
void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, float intensity2); // done void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, float intensity2); // done
void ReportCrime(eCrimeType crime, const CVector &pos); // done void ReportCrime(eCrimeType crime, const CVector &pos); // done
void ResetAudioLogicTimers(uint32 timer); void ResetAudioLogicTimers(uint32 timer); // done
void ResetPoliceRadio(); void ResetPoliceRadio(); // done
void ResetTimers(uint32 time); void ResetTimers(uint32 time); // done
void Service(); void Service(); //done
void ServiceCollisions(); void ServiceCollisions(); //done
void ServicePoliceRadio(); void ServicePoliceRadio();
void ServicePoliceRadioChannel(uint8 wantedLevel); void ServicePoliceRadioChannel(uint8 wantedLevel);
void ServiceSoundEffects(); void ServiceSoundEffects();
@ -402,16 +500,17 @@ public:
bool SetupJumboRumbleSound(uint8 emittingVol); bool SetupJumboRumbleSound(uint8 emittingVol);
bool SetupJumboTaxiSound(uint8 vol); bool SetupJumboTaxiSound(uint8 vol);
bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq); bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq);
void SetupPedComments(cPedParams *params, uint32 sound); void SetupPedComments(cPedParams *params, uint32 sound); // done
void SetupSuspectLastSeenReport(); void SetupSuspectLastSeenReport();
void Terminate(); void Terminate(); //done
void TranslateEntity(Const CVector *v1, CVector *v2) const; void TranslateEntity(Const CVector *v1, CVector *v2) const; //done
void UpdateReflections(); void UpdateGasPedalAudio(CVehicle* veh, int vehType); // done
void UpdateReflections(); //done
bool UsesReverseWarning(int32 model) const; //done bool UsesReverseWarning(int32 model) const; //done
bool UsesSiren(int32 model) const; bool UsesSiren(cVehicleParams& params) const; //done
bool UsesSirenSwitching(int32 model) const; bool UsesSirenSwitching(cVehicleParams& params) const; //done
CVehicle *FindVehicleOfPlayer(); //done CVehicle *FindVehicleOfPlayer(); //done
void SetPedTalkingStatus(CPed *ped, uint8 status); void SetPedTalkingStatus(CPed *ped, uint8 status);

View file

@ -1,9 +1,8 @@
#pragma once #pragma once
#include "common.h" #include "common.h"
enum eSfxSample : uint32 enum eSfxSample : uint32 {
{
SFX_CAR_HORN_JEEP = 0, SFX_CAR_HORN_JEEP = 0,
SFX_CAR_HORN_BMW328, SFX_CAR_HORN_BMW328,
SFX_CAR_HORN_BUS, SFX_CAR_HORN_BUS,
@ -576,6 +575,233 @@ enum eSfxSample : uint32
SFX_FOOTSTEP_SAND_4, SFX_FOOTSTEP_SAND_4,
// TODO: miami ped comments... THERE'S OVER 9000 // TODO: miami ped comments... THERE'S OVER 9000
SFX_POLICE_BOAT_1 = 714,
SFX_POLICE_BOAT_2,
SFX_POLICE_BOAT_3,
SFX_POLICE_BOAT_4,
SFX_POLICE_BOAT_5,
SFX_POLICE_BOAT_6,
SFX_POLICE_BOAT_7,
SFX_POLICE_BOAT_8,
SFX_POLICE_BOAT_9,
SFX_POLICE_BOAT_10,
SFX_POLICE_BOAT_11,
SFX_POLICE_BOAT_12,
SFX_POLICE_BOAT_13,
SFX_POLICE_BOAT_14,
SFX_POLICE_BOAT_15,
SFX_POLICE_BOAT_16,
SFX_POLICE_BOAT_17,
SFX_POLICE_BOAT_18,
SFX_POLICE_BOAT_19,
SFX_POLICE_BOAT_20,
SFX_POLICE_BOAT_21,
SFX_POLICE_BOAT_22,
SFX_POLICE_BOAT_23,
SFX_POLICE_HELI_1,
SFX_POLICE_HELI_2,
SFX_POLICE_HELI_3,
SFX_POLICE_HELI_4,
SFX_POLICE_HELI_5,
SFX_POLICE_HELI_6,
SFX_POLICE_HELI_7,
SFX_POLICE_HELI_8,
SFX_POLICE_HELI_9,
SFX_POLICE_HELI_10,
SFX_POLICE_HELI_11,
SFX_POLICE_HELI_12,
SFX_POLICE_HELI_13,
SFX_POLICE_HELI_14,
SFX_POLICE_HELI_15,
SFX_POLICE_HELI_16,
SFX_POLICE_HELI_17,
SFX_POLICE_HELI_18,
SFX_POLICE_HELI_19,
SFX_POLICE_HELI_20,
SFX_GENERIC_FEMALE_GRUNT_1 = 2953,
SFX_GENERIC_FEMALE_GRUNT_2 = 2954,
SFX_GENERIC_FEMALE_GRUNT_3 = 2955,
SFX_GENERIC_FEMALE_GRUNT_4 = 2956,
SFX_GENERIC_FEMALE_GRUNT_5 = 2957,
SFX_GENERIC_FEMALE_GRUNT_6 = 2958,
SFX_GENERIC_FEMALE_GRUNT_7 = 2959,
SFX_GENERIC_FEMALE_GRUNT_8 = 2960,
SFX_GENERIC_FEMALE_GRUNT_9 = 2961,
SFX_GENERIC_FEMALE_GRUNT_10 = 2962,
SFX_GENERIC_FEMALE_GRUNT_11 = 2963,
SFX_GENERIC_FEMALE_GRUNT_12 = 2964,
SFX_GENERIC_FEMALE_GRUNT_13 = 2965,
SFX_GENERIC_FEMALE_GRUNT_14 = 2966,
SFX_GENERIC_FEMALE_GRUNT_15 = 2967,
SFX_GENERIC_FEMALE_GRUNT_16 = 2968,
SFX_GENERIC_FEMALE_GRUNT_17 = 2969,
SFX_GENERIC_FEMALE_GRUNT_18 = 2970,
SFX_GENERIC_FEMALE_GRUNT_19 = 2971,
SFX_GENERIC_FEMALE_GRUNT_20 = 2972,
SFX_GENERIC_FEMALE_GRUNT_21 = 2973,
SFX_GENERIC_FEMALE_GRUNT_22 = 2974,
SFX_GENERIC_FEMALE_GRUNT_23 = 2975,
SFX_GENERIC_FEMALE_GRUNT_24 = 2976,
SFX_GENERIC_FEMALE_GRUNT_25 = 2977,
SFX_GENERIC_FEMALE_GRUNT_26 = 2978,
SFX_GENERIC_FEMALE_GRUNT_27 = 2979,
SFX_GENERIC_FEMALE_GRUNT_28 = 2980,
SFX_GENERIC_FEMALE_GRUNT_29 = 2981,
SFX_GENERIC_FEMALE_GRUNT_30 = 2982,
SFX_GENERIC_FEMALE_GRUNT_31 = 2983,
SFX_GENERIC_FEMALE_GRUNT_32 = 2984,
SFX_GENERIC_FEMALE_GRUNT_33 = 2985,
SFX_GENERIC_MALE_FIRE_1 = 3013,
SFX_GENERIC_MALE_FIRE_2 = 3014,
SFX_GENERIC_MALE_FIRE_3 = 3015,
SFX_GENERIC_MALE_FIRE_4 = 3016,
SFX_GENERIC_MALE_FIRE_5 = 3017,
SFX_GENERIC_MALE_FIRE_6 = 3018,
SFX_GENERIC_MALE_FIRE_7 = 3019,
SFX_GENERIC_MALE_FIRE_8 = 3020,
SFX_GENERIC_MALE_FIRE_9 = 3021,
SFX_GENERIC_MALE_FIRE_10 = 3022,
SFX_GENERIC_MALE_FIRE_11 = 3023,
SFX_GENERIC_MALE_FIRE_12 = 3024,
SFX_GENERIC_MALE_FIRE_13 = 3025,
SFX_GENERIC_MALE_FIRE_14 = 3026,
SFX_GENERIC_MALE_FIRE_15 = 3027,
SFX_GENERIC_MALE_FIRE_16 = 3028,
SFX_GENERIC_MALE_FIRE_17 = 3029,
SFX_GENERIC_MALE_FIRE_18 = 3030,
SFX_GENERIC_MALE_FIRE_19 = 3031,
SFX_GENERIC_MALE_FIRE_20 = 3032,
SFX_GENERIC_MALE_FIRE_21 = 3033,
SFX_GENERIC_MALE_FIRE_22 = 3034,
SFX_GENERIC_MALE_FIRE_23 = 3035,
SFX_GENERIC_MALE_FIRE_24 = 3036,
SFX_GENERIC_MALE_FIRE_25 = 3037,
SFX_GENERIC_MALE_FIRE_26 = 3038,
SFX_GENERIC_MALE_FIRE_27 = 3039,
SFX_GENERIC_MALE_FIRE_28 = 3040,
SFX_GENERIC_MALE_FIRE_29 = 3041,
SFX_GENERIC_MALE_FIRE_30 = 3042,
SFX_GENERIC_MALE_FIRE_31 = 3043,
SFX_GENERIC_MALE_FIRE_32 = 3044,
SFX_GENERIC_MALE_DEATH_1 = 3045,
SFX_GENERIC_MALE_DEATH_2 = 3046,
SFX_GENERIC_MALE_DEATH_3 = 3047,
SFX_GENERIC_MALE_DEATH_4 = 3048,
SFX_GENERIC_MALE_DEATH_5 = 3049,
SFX_GENERIC_MALE_DEATH_6 = 3050,
SFX_GENERIC_MALE_DEATH_7 = 3051,
SFX_GENERIC_MALE_DEATH_8 = 3052,
SFX_GENERIC_MALE_DEATH_9 = 3053,
SFX_GENERIC_MALE_DEATH_10 = 3054,
SFX_GENERIC_MALE_DEATH_11 = 3055,
SFX_GENERIC_MALE_DEATH_12 = 3056,
SFX_GENERIC_MALE_DEATH_13 = 3057,
SFX_GENERIC_MALE_DEATH_14 = 3058,
SFX_GENERIC_MALE_DEATH_15 = 3059,
SFX_GENERIC_MALE_DEATH_16 = 3060,
SFX_GENERIC_MALE_DEATH_17 = 3061,
SFX_GENERIC_MALE_DEATH_18 = 3062,
SFX_GENERIC_MALE_DEATH_19 = 3063,
SFX_GENERIC_MALE_DEATH_20 = 3064,
SFX_GENERIC_MALE_DEATH_21 = 3065,
SFX_GENERIC_MALE_DEATH_22 = 3066,
SFX_GENERIC_MALE_DEATH_23 = 3067,
SFX_GENERIC_MALE_DEATH_24 = 3068,
SFX_GENERIC_MALE_DEATH_25 = 3069,
SFX_GENERIC_MALE_DEATH_26 = 3070,
SFX_GENERIC_MALE_DEATH_27 = 3071,
SFX_GENERIC_MALE_DEATH_28 = 3072,
SFX_GENERIC_MALE_DEATH_29 = 3073,
SFX_GENERIC_MALE_DEATH_30 = 3074,
SFX_GENERIC_MALE_DEATH_31 = 3075,
SFX_GENERIC_MALE_DEATH_32 = 3076,
SFX_GENERIC_MALE_DEATH_33 = 3077,
SFX_GENERIC_MALE_DEATH_34 = 3078,
SFX_GENERIC_MALE_DEATH_35 = 3079,
SFX_GENERIC_MALE_DEATH_36 = 3080,
SFX_GENERIC_MALE_DEATH_37 = 3081,
SFX_GENERIC_MALE_DEATH_38 = 3082,
SFX_GENERIC_MALE_DEATH_39 = 3083,
SFX_GENERIC_MALE_DEATH_40 = 3084,
SFX_GENERIC_MALE_DEATH_41 = 3085,
SFX_GENERIC_MALE_GRUNT_1 = 3086,
SFX_GENERIC_MALE_GRUNT_2 = 3087,
SFX_GENERIC_MALE_GRUNT_3 = 3088,
SFX_GENERIC_MALE_GRUNT_4 = 3089,
SFX_GENERIC_MALE_GRUNT_5 = 3090,
SFX_GENERIC_MALE_GRUNT_6 = 3091,
SFX_GENERIC_MALE_GRUNT_7 = 3092,
SFX_GENERIC_MALE_GRUNT_8 = 3093,
SFX_GENERIC_MALE_GRUNT_9 = 3094,
SFX_GENERIC_MALE_GRUNT_10 = 3095,
SFX_GENERIC_MALE_GRUNT_11 = 3096,
SFX_GENERIC_MALE_GRUNT_12 = 3097,
SFX_GENERIC_MALE_GRUNT_13 = 3098,
SFX_GENERIC_MALE_GRUNT_14 = 3099,
SFX_GENERIC_MALE_GRUNT_15 = 3100,
SFX_GENERIC_MALE_GRUNT_16 = 3101,
SFX_GENERIC_MALE_GRUNT_17 = 3102,
SFX_GENERIC_MALE_GRUNT_18 = 3103,
SFX_GENERIC_MALE_GRUNT_19 = 3104,
SFX_GENERIC_MALE_GRUNT_20 = 3105,
SFX_GENERIC_MALE_GRUNT_21 = 3106,
SFX_GENERIC_MALE_GRUNT_22 = 3107,
SFX_GENERIC_MALE_GRUNT_23 = 3108,
SFX_GENERIC_MALE_GRUNT_24 = 3109,
SFX_GENERIC_MALE_GRUNT_25 = 3110,
SFX_GENERIC_MALE_GRUNT_26 = 3111,
SFX_GENERIC_MALE_GRUNT_27 = 3112,
SFX_GENERIC_MALE_GRUNT_28 = 3113,
SFX_GENERIC_MALE_GRUNT_29 = 3114,
SFX_GENERIC_MALE_GRUNT_30 = 3115,
SFX_GENERIC_MALE_GRUNT_31 = 3116,
SFX_GENERIC_MALE_GRUNT_32 = 3117,
SFX_GENERIC_MALE_GRUNT_33 = 3118,
SFX_GENERIC_MALE_GRUNT_34 = 3119,
SFX_GENERIC_MALE_GRUNT_35 = 3120,
SFX_GENERIC_MALE_GRUNT_36 = 3121,
SFX_GENERIC_MALE_GRUNT_37 = 3122,
SFX_GENERIC_MALE_GRUNT_38 = 3123,
SFX_GENERIC_MALE_GRUNT_39 = 3124,
SFX_GENERIC_MALE_GRUNT_40 = 3125,
SFX_GENERIC_MALE_GRUNT_41 = 3126,
SFX_GENERIC_MALE_PANIC_1 = 3127,
SFX_GENERIC_MALE_PANIC_2 = 3128,
SFX_GENERIC_MALE_PANIC_3 = 3129,
SFX_GENERIC_MALE_PANIC_4 = 3130,
SFX_GENERIC_MALE_PANIC_5 = 3131,
SFX_GENERIC_MALE_PANIC_6 = 3132,
SFX_GENERIC_MALE_PANIC_7 = 3133,
SFX_GENERIC_MALE_PANIC_8 = 3134,
SFX_GENERIC_MALE_PANIC_9 = 3135,
SFX_GENERIC_MALE_PANIC_10 = 3136,
SFX_GENERIC_MALE_PANIC_11 = 3137,
SFX_GENERIC_MALE_PANIC_12 = 3138,
SFX_GENERIC_MALE_PANIC_13 = 3139,
SFX_GENERIC_MALE_PANIC_14 = 3140,
SFX_GENERIC_MALE_PANIC_15 = 3141,
SFX_GENERIC_MALE_PANIC_16 = 3142,
SFX_GENERIC_MALE_PANIC_17 = 3143,
SFX_GENERIC_MALE_PANIC_18 = 3144,
SFX_GENERIC_MALE_PANIC_19 = 3145,
SFX_GENERIC_MALE_PANIC_20 = 3146,
SFX_GENERIC_MALE_PANIC_21 = 3147,
SFX_GENERIC_MALE_PANIC_22 = 3148,
SFX_GENERIC_MALE_PANIC_23 = 3149,
SFX_GENERIC_MALE_PANIC_24 = 3150,
SFX_GENERIC_MALE_PANIC_25 = 3151,
SFX_GENERIC_MALE_PANIC_26 = 3152,
SFX_GENERIC_MALE_PANIC_27 = 3153,
SFX_GENERIC_MALE_PANIC_28 = 3154,
SFX_GENERIC_MALE_PANIC_29 = 3155,
SFX_GENERIC_MALE_PANIC_30 = 3156,
SFX_GENERIC_MALE_PANIC_31 = 3157,
SFX_GENERIC_MALE_PANIC_32 = 3158,
SFX_GENERIC_MALE_PANIC_33 = 3159,
SFX_GENERIC_MALE_PANIC_34 = 3160,
SFX_GENERIC_MALE_PANIC_35 = 3161,
TOTAL_AUDIO_SAMPLES = 9941, TOTAL_AUDIO_SAMPLES = 9941,
NO_SAMPLE, NO_SAMPLE,

View file

@ -1,4 +1,4 @@
#pragma once #pragma once
enum eSound : uint16 enum eSound : uint16
{ {
@ -33,7 +33,7 @@ enum eSound : uint16
SOUND_CAR_TANK_TURRET_ROTATE, SOUND_CAR_TANK_TURRET_ROTATE,
SOUND_CAR_BOMB_TICK, SOUND_CAR_BOMB_TICK,
SOUND_PLANE_ON_GROUND, SOUND_PLANE_ON_GROUND,
SOUND_31, SOUND_HELI_BLADE,
SOUND_32, SOUND_32,
SOUND_STEP_START, SOUND_STEP_START,
SOUND_STEP_END, SOUND_STEP_END,
@ -116,8 +116,8 @@ enum eSound : uint16
SOUND_PED_MIAMIVICE_EXITING_CAR, SOUND_PED_MIAMIVICE_EXITING_CAR,
SOUND_PED_COP_HELIPILOTPHRASE, SOUND_PED_COP_HELIPILOTPHRASE,
SOUND_PED_PULLOUTWEAPON, SOUND_PED_PULLOUTWEAPON,
SOUND_PED_HELI_PLAYER_FOUND, SOUND_PED_HELI_PLAYER_FOUND = 114,
SOUND_115, SOUND_PED_VCPA_PLAYER_FOUND = 115,
SOUND_PED_ON_FIRE, SOUND_PED_ON_FIRE,
SOUND_PED_AIMING, SOUND_PED_AIMING,
SOUND_PED_HANDS_UP, SOUND_PED_HANDS_UP,

View file

@ -73,7 +73,7 @@ CDarkel::DrawMessages()
{ {
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(30.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(610.0f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetPropOn(); CFont::SetPropOn();
uint32 timePassedSinceStart = CTimer::GetTimeInMilliseconds() - TimeOfFrenzyStart; uint32 timePassedSinceStart = CTimer::GetTimeInMilliseconds() - TimeOfFrenzyStart;
@ -127,7 +127,7 @@ CDarkel::DrawMessages()
uint32 timePassedSinceStart = CTimer::GetTimeInMilliseconds() - TimeOfFrenzyStart; uint32 timePassedSinceStart = CTimer::GetTimeInMilliseconds() - TimeOfFrenzyStart;
if (CTimer::GetTimeInMilliseconds() - TimeOfFrenzyStart < 5000) { if (CTimer::GetTimeInMilliseconds() - TimeOfFrenzyStart < 5000) {
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(20.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(620.0f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f)); CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f));
CFont::SetJustifyOff(); CFont::SetJustifyOff();

View file

@ -1341,7 +1341,7 @@ void CGarages::PrintMessages()
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(50.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
CFont::SetColor(CRGBA(0, 0, 0, 255)); CFont::SetColor(CRGBA(0, 0, 0, 255));

View file

@ -369,7 +369,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
if (weaponType < WEAPONTYPE_TOTALWEAPONS && CDarkel::FrenzyOnGoing()) { if (weaponType < WEAPONTYPE_TOTALWEAPONS && CDarkel::FrenzyOnGoing()) {
isPickupTouched = false; isPickupTouched = false;
m_bWasControlMessageShown = false; m_bWasControlMessageShown = false;
} else if (weaponType != WEAPONTYPE_UNARMED) { } else if (weaponType < WEAPONTYPE_TOTALWEAPONS && weaponType != WEAPONTYPE_UNARMED) {
uint32 slot = CWeaponInfo::GetWeaponInfo(weaponType)->m_nWeaponSlot; uint32 slot = CWeaponInfo::GetWeaponInfo(weaponType)->m_nWeaponSlot;
eWeaponType plrWeaponSlot = FindPlayerPed()->GetWeapon(slot).m_eWeaponType; eWeaponType plrWeaponSlot = FindPlayerPed()->GetWeapon(slot).m_eWeaponType;
if (plrWeaponSlot != weaponType) { if (plrWeaponSlot != weaponType) {
@ -508,7 +508,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
result = true; result = true;
Remove(); Remove();
DMAudio.PlayFrontEndSound(SOUND_PICKUP_HIDDEN_PACKAGE, 0); DMAudio.PlayFrontEndSound(SOUND_PICKUP_HIDDEN_PACKAGE, 0);
return true; break;
case PICKUP_MONEY: case PICKUP_MONEY:
CWorld::Players[playerId].m_nMoney += m_nQuantity; CWorld::Players[playerId].m_nMoney += m_nQuantity;
sprintf(gString, "$%d", m_nQuantity); sprintf(gString, "$%d", m_nQuantity);
@ -518,12 +518,13 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
result = true; result = true;
Remove(); Remove();
DMAudio.PlayFrontEndSound(SOUND_PICKUP_MONEY, 0); DMAudio.PlayFrontEndSound(SOUND_PICKUP_MONEY, 0);
return true; player->Say(SOUND_PED_MUGGING);
break;
case PICKUP_ASSET_REVENUE: case PICKUP_ASSET_REVENUE:
CWorld::Players[CWorld::PlayerInFocus].m_nMoney += m_fRevenue; CWorld::Players[CWorld::PlayerInFocus].m_nMoney += m_fRevenue;
m_fRevenue = 0.0f; m_fRevenue = 0.0f;
DMAudio.PlayFrontEndSound(SOUND_PICKUP_MONEY, 0); DMAudio.PlayFrontEndSound(SOUND_PICKUP_MONEY, 0);
return false; break;
case PICKUP_PROPERTY_LOCKED: case PICKUP_PROPERTY_LOCKED:
if (!m_bWasControlMessageShown) { if (!m_bWasControlMessageShown) {
m_bWasControlMessageShown = true; m_bWasControlMessageShown = true;

View file

@ -381,6 +381,7 @@ private:
public: public:
static void RemoveThisPed(CPed* pPed); static void RemoveThisPed(CPed* pPed);
static uint32& GetLastMissionPassedTime() { return LastMissionPassedTime; }
#ifdef MISSION_SWITCHER #ifdef MISSION_SWITCHER
static void SwitchToMission(int32 mission); static void SwitchToMission(int32 mission);
#endif #endif

View file

@ -4626,7 +4626,7 @@ CCam::Process_FollowPed_Rotation(const CVector &CameraTarget, float TargetOrient
*/ */
{ {
LookLeftRight = -CPad::GetPad(0)->LookAroundLeftRight(); LookLeftRight = -CPad::GetPad(0)->LookAroundLeftRight();
LookUpDown = -CPad::GetPad(0)->LookAroundUpDown(); LookUpDown = CPad::GetPad(0)->LookAroundUpDown();
} }
float AlphaOffset, BetaOffset; float AlphaOffset, BetaOffset;
if(UseMouse){ if(UseMouse){

View file

@ -767,8 +767,8 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
CFont::SetBackGroundOnlyTextOff(); CFont::SetBackGroundOnlyTextOff();
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN)); CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH)); CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
CFont::SetCentreSize(SCREEN_WIDTH); CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH));
switch (m_nCurrScreen) { switch (m_nCurrScreen) {
case MENUPAGE_CHOOSE_LOAD_SLOT: case MENUPAGE_CHOOSE_LOAD_SLOT:
@ -808,7 +808,7 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
wchar *str; wchar *str;
if (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL) { if (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL) {
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENULABEL_X_MARGIN)); CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENULABEL_X_MARGIN));
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENULABEL_WIDTH)); CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENULABEL_X_MARGIN));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
CFont::SetScale(MENU_X(BIGTEXT2_X_SCALE), MENU_Y(BIGTEXT2_Y_SCALE)); CFont::SetScale(MENU_X(BIGTEXT2_X_SCALE), MENU_Y(BIGTEXT2_Y_SCALE));
CFont::SetRightJustifyOff(); CFont::SetRightJustifyOff();
@ -848,7 +848,7 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
CFont::PrintString(MENU_X_LEFT_ALIGNED(100.0f), MENU_Y(97.0f), str); CFont::PrintString(MENU_X_LEFT_ALIGNED(100.0f), MENU_Y(97.0f), str);
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN)); CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH)); CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
} }
if (m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS) { if (m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS) {
@ -1301,13 +1301,16 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
break; break;
} }
nextYToUse = MENU_Y(150.f); // TODO(Miami): Temp // Not just unused, but also collides with the bug fix in Font.cpp. Yikes.
#ifndef FIX_BUGS
nextYToUse += MENU_DEFAULT_LINE_HEIGHT * CFont::GetNumberLines(MENU_X_LEFT_ALIGNED(60.0f), MENU_Y(nextYToUse), leftText); nextYToUse += MENU_DEFAULT_LINE_HEIGHT * CFont::GetNumberLines(MENU_X_LEFT_ALIGNED(60.0f), MENU_Y(nextYToUse), leftText);
#endif
// TODO(Miami): Remove here after audio page is done nextYToUse = 300.0f; // TODO(Miami): temp
// Radio icons // Radio icons
if (aScreens[m_nCurrScreen].m_aEntries[i].m_Action == MENUACTION_RADIO) { if (aScreens[m_nCurrScreen].m_aEntries[i].m_Action == MENUACTION_RADIO) {
// TODO(Miami): Remove those after audio page is done
ProcessRadioIcon(m_aFrontEndSprites[MENUSPRITE_WILDSTYLE], MENU_X_LEFT_ALIGNED(30.0f), MENU_Y(nextYToUse), 0, HOVEROPTION_RADIO_0); ProcessRadioIcon(m_aFrontEndSprites[MENUSPRITE_WILDSTYLE], MENU_X_LEFT_ALIGNED(30.0f), MENU_Y(nextYToUse), 0, HOVEROPTION_RADIO_0);
ProcessRadioIcon(m_aFrontEndSprites[MENUSPRITE_FLASH], MENU_X_LEFT_ALIGNED(90.0f), MENU_Y(nextYToUse), 1, HOVEROPTION_RADIO_1); ProcessRadioIcon(m_aFrontEndSprites[MENUSPRITE_FLASH], MENU_X_LEFT_ALIGNED(90.0f), MENU_Y(nextYToUse), 1, HOVEROPTION_RADIO_1);
ProcessRadioIcon(m_aFrontEndSprites[MENUSPRITE_KCHAT], MENU_X_LEFT_ALIGNED(150.0f), MENU_Y(nextYToUse), 2, HOVEROPTION_RADIO_2); ProcessRadioIcon(m_aFrontEndSprites[MENUSPRITE_KCHAT], MENU_X_LEFT_ALIGNED(150.0f), MENU_Y(nextYToUse), 2, HOVEROPTION_RADIO_2);
@ -1804,7 +1807,7 @@ CMenuManager::DrawControllerSetupScreen()
CFont::SetRightJustifyOff(); CFont::SetRightJustifyOff();
CFont::SetBackGroundOnlyTextOn(); CFont::SetBackGroundOnlyTextOn();
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN)); CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH)); CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
PREPARE_MENU_HEADER PREPARE_MENU_HEADER
switch (m_ControlMethod) { switch (m_ControlMethod) {
@ -2256,7 +2259,7 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
CFont::SetRightJustifyOff(); CFont::SetRightJustifyOff();
CFont::SetBackGroundOnlyTextOn(); CFont::SetBackGroundOnlyTextOn();
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN)); CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH)); CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
// lstrcpy's changed with strcpy // lstrcpy's changed with strcpy
if (!m_bSkinsEnumerated) { if (!m_bSkinsEnumerated) {
@ -3042,7 +3045,7 @@ CMenuManager::SmallMessageScreen(const char* text)
CFont::SetBackGroundOnlyTextOn(); CFont::SetBackGroundOnlyTextOn();
CSprite2d::DrawRect(CRect(SCREEN_STRETCH_X(95.0f), SCREEN_SCALE_FROM_BOTTOM(165.0f), SCREEN_STRETCH_FROM_RIGHT(95.0f), SCREEN_SCALE_Y(115.0f)), CRGBA(50, 50, 50, FadeIn(210))); CSprite2d::DrawRect(CRect(SCREEN_STRETCH_X(95.0f), SCREEN_SCALE_FROM_BOTTOM(165.0f), SCREEN_STRETCH_FROM_RIGHT(95.0f), SCREEN_SCALE_Y(115.0f)), CRGBA(50, 50, 50, FadeIn(210)));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
CFont::SetCentreSize(SCREEN_STRETCH_X(430.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(430.0f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetColor(CRGBA(LABEL_COLOR.r, LABEL_COLOR.g, LABEL_COLOR.b, FadeIn(255))); CFont::SetColor(CRGBA(LABEL_COLOR.r, LABEL_COLOR.g, LABEL_COLOR.b, FadeIn(255)));
CFont::SetDropShadowPosition(2); CFont::SetDropShadowPosition(2);
@ -4702,8 +4705,8 @@ CMenuManager::PrintMap(void)
CRadar::DrawBlips(); CRadar::DrawBlips();
if (m_PrefsShowLegends) { if (m_PrefsShowLegends) {
CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(40.0f)); CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(40.0f));
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(84.0f)); CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(84.0f));
CFont::SetBackGroundOnlyTextOff(); CFont::SetBackGroundOnlyTextOff();
CFont::SetColor(CRGBA(LABEL_COLOR.r, LABEL_COLOR.g, LABEL_COLOR.b, FadeIn(255))); CFont::SetColor(CRGBA(LABEL_COLOR.r, LABEL_COLOR.g, LABEL_COLOR.b, FadeIn(255)));
CFont::SetDropShadowPosition(2); CFont::SetDropShadowPosition(2);
@ -4826,8 +4829,8 @@ CMenuManager::PrintMap(void)
#endif #endif
m_bMenuMapActive = false; m_bMenuMapActive = false;
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(10.0f)); CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(10.0f)); CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
DisplayHelperText("FEH_MPH"); DisplayHelperText("FEH_MPH");
} }

View file

@ -11,12 +11,10 @@
#define MENUHEADER_WIDTH 1.0f #define MENUHEADER_WIDTH 1.0f
#define MENU_UNK_X_MARGIN 10.0f #define MENU_UNK_X_MARGIN 10.0f
#define MENU_UNK_WIDTH 10.0f
#define MENUACTION_SCALE_MULT 0.9f #define MENUACTION_SCALE_MULT 0.9f
#define MENULABEL_X_MARGIN 80.0f #define MENULABEL_X_MARGIN 80.0f
#define MENULABEL_WIDTH 80.0f
#define MENULABEL_POS_X 100.0f #define MENULABEL_POS_X 100.0f
#define MENULABEL_POS_Y 97.0f #define MENULABEL_POS_Y 97.0f

View file

@ -137,7 +137,7 @@ void MessageScreen(char *msg)
CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(190.0f)); // 450.0f CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(190.0f)); // 450.0f
CFont::SetScale(SCREEN_SCALE_X(1.0f), SCREEN_SCALE_Y(1.0f)); CFont::SetScale(SCREEN_SCALE_X(1.0f), SCREEN_SCALE_Y(1.0f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(190.0f)); // 450.0f CFont::SetCentreSize(SCREEN_SCALE_X(450.0f));
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetColor(CRGBA(255, 255, 255, 255)); CFont::SetColor(CRGBA(255, 255, 255, 255));
CFont::SetDropColor(CRGBA(32, 32, 32, 255)); CFont::SetDropColor(CRGBA(32, 32, 32, 255));

View file

@ -3222,6 +3222,9 @@ int16 CPad::SniperModeLookUpDown(void)
int16 axis = NewState.LeftStickY; int16 axis = NewState.LeftStickY;
int16 dpad; int16 dpad;
#ifdef FIX_BUGS
axis = -axis;
#endif
if (CPad::bInvertLook4Pad) { if (CPad::bInvertLook4Pad) {
axis = -axis; axis = -axis;
dpad = (NewState.DPadDown - NewState.DPadUp) / 2; dpad = (NewState.DPadDown - NewState.DPadUp) / 2;
@ -3257,7 +3260,9 @@ int16 CPad::LookAroundLeftRight(void)
int16 CPad::LookAroundUpDown(void) int16 CPad::LookAroundUpDown(void)
{ {
int16 axis = GetPad(0)->NewState.RightStickY; int16 axis = GetPad(0)->NewState.RightStickY;
#ifdef FIX_BUGS
axis = -axis;
#endif
if (CPad::bInvertLook4Pad) if (CPad::bInvertLook4Pad)
axis = -axis; axis = -axis;
@ -3289,7 +3294,7 @@ void CPad::PrintErrorMessage(void)
CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f)); CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetCentreSize(SCREEN_STRETCH_FROM_RIGHT(50.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetColor(CRGBA(255, 255, 200, 200)); CFont::SetColor(CRGBA(255, 255, 200, 200));
@ -3307,7 +3312,7 @@ void CPad::PrintErrorMessage(void)
CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f)); CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetCentreSize(SCREEN_STRETCH_FROM_RIGHT(50.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetColor(CRGBA(255, 255, 200, 200)); CFont::SetColor(CRGBA(255, 255, 200, 200));

View file

@ -243,8 +243,10 @@ enum Config {
//#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU //#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
//#define USE_TEXTURE_POOL //#define USE_TEXTURE_POOL
//#define CUTSCENE_BORDERS_SWITCH //#define CUTSCENE_BORDERS_SWITCH
#ifdef LIBRW
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur) //#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
//#define EXTENDED_PIPELINES // custom render pipelines (includes Neo) //#define EXTENDED_PIPELINES // custom render pipelines (includes Neo)
#endif
//#define MULTISAMPLING // adds MSAA option TODO //#define MULTISAMPLING // adds MSAA option TODO
#ifdef LIBRW #ifdef LIBRW

View file

@ -462,6 +462,53 @@ RwBool RwIm3DRenderPrimitive(RwPrimitiveType primType);
RwBool RwRenderStateGet(RwRenderState state, void *value)
{
uint32 *uival = (uint32*)value;
uint32 fog;
switch(state){
case rwRENDERSTATETEXTURERASTER: *(void**)value = GetRenderStatePtr(TEXTURERASTER); return true;
case rwRENDERSTATETEXTUREADDRESS: *uival = GetRenderState(TEXTUREADDRESS); return true;
case rwRENDERSTATETEXTUREADDRESSU: *uival = GetRenderState(TEXTUREADDRESSU); return true;
case rwRENDERSTATETEXTUREADDRESSV: *uival = GetRenderState(TEXTUREADDRESSV); return true;
case rwRENDERSTATETEXTUREPERSPECTIVE: *uival = 1; return true;
case rwRENDERSTATEZTESTENABLE: *uival = GetRenderState(ZTESTENABLE); return true;
case rwRENDERSTATESHADEMODE: *uival = rwSHADEMODEGOURAUD; return true;
case rwRENDERSTATEZWRITEENABLE: *uival = GetRenderState(ZWRITEENABLE); return true;
case rwRENDERSTATETEXTUREFILTER: *uival = GetRenderState(TEXTUREFILTER); return true;
case rwRENDERSTATESRCBLEND: *uival = GetRenderState(SRCBLEND); return true;
case rwRENDERSTATEDESTBLEND: *uival = GetRenderState(DESTBLEND); return true;
case rwRENDERSTATEVERTEXALPHAENABLE: *uival = GetRenderState(VERTEXALPHA); return true;
case rwRENDERSTATEBORDERCOLOR: *uival = 0; return true;
case rwRENDERSTATEFOGENABLE: *uival = GetRenderState(FOGENABLE); return true;
case rwRENDERSTATEFOGCOLOR:
// have to swap R and B here
fog = GetRenderState(FOGCOLOR);
*uival = (fog>>16)&0xFF;
*uival |= (fog&0xFF)<<16;
*uival |= fog&0xFF00;
*uival |= fog&0xFF000000;
return true;
case rwRENDERSTATEFOGTYPE: *uival = rwFOGTYPELINEAR; return true;
case rwRENDERSTATEFOGDENSITY: *(float*)value = 1.0f; return true;
case rwRENDERSTATECULLMODE: *uival = GetRenderState(CULLMODE); return true;
// all unsupported
case rwRENDERSTATEFOGTABLE:
case rwRENDERSTATEALPHAPRIMITIVEBUFFER:
case rwRENDERSTATESTENCILENABLE:
case rwRENDERSTATESTENCILFAIL:
case rwRENDERSTATESTENCILZFAIL:
case rwRENDERSTATESTENCILPASS:
case rwRENDERSTATESTENCILFUNCTION:
case rwRENDERSTATESTENCILFUNCTIONREF:
case rwRENDERSTATESTENCILFUNCTIONMASK:
case rwRENDERSTATESTENCILFUNCTIONWRITEMASK:
default:
return false;
}
}
RwBool RwRenderStateSet(RwRenderState state, void *value) RwBool RwRenderStateSet(RwRenderState state, void *value)
{ {
uint32 uival = (uintptr)value; uint32 uival = (uintptr)value;

View file

@ -38,7 +38,7 @@ CObject::CObject(void)
m_colour2 = 0; m_colour2 = 0;
m_colour1 = m_colour2; m_colour1 = m_colour2;
m_nBonusValue = 0; m_nBonusValue = 0;
// m_nCostValue = 0; // TODO(Miami) m_nCostValue = 0;
bIsPickup = false; bIsPickup = false;
bPickupObjWithMessage = false; bPickupObjWithMessage = false;
bOutOfStock = false; bOutOfStock = false;
@ -444,7 +444,7 @@ CObject::Init(void)
m_colour2 = 0; m_colour2 = 0;
m_nBonusValue = 0; m_nBonusValue = 0;
bIsWeapon = false; bIsWeapon = false;
// TODO(MIAMI): some new field here m_nCostValue = 0;
m_pCollidingEntity = nil; m_pCollidingEntity = nil;
CColPoint point; CColPoint point;
CEntity* outEntity = nil; CEntity* outEntity = nil;

View file

@ -522,7 +522,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
m_delayedSoundID = -1; m_delayedSoundID = -1;
m_delayedSoundTimer = 0; m_delayedSoundTimer = 0;
CPopulation::UpdatePedCount((ePedType)m_nPedType, false); CPopulation::UpdatePedCount((ePedType)m_nPedType, false);
m_lastComment = -1; m_lastComment = UINT32_MAX;
} }
// --MIAMI: Done // --MIAMI: Done

View file

@ -646,7 +646,7 @@ public:
uint16 m_lastQueuedSound; uint16 m_lastQueuedSound;
uint16 m_queuedSound; uint16 m_queuedSound;
bool m_canTalk; bool m_canTalk;
int32 m_lastComment; uint32 m_lastComment;
CVector m_vecSeekPosEx; // used for OBJECTIVE_GUARD_SPOT CVector m_vecSeekPosEx; // used for OBJECTIVE_GUARD_SPOT
float m_distanceToCountSeekDoneEx; // used for OBJECTIVE_GUARD_SPOT float m_distanceToCountSeekDoneEx; // used for OBJECTIVE_GUARD_SPOT

View file

@ -1055,6 +1055,7 @@ CPlayerPed::FindWeaponLockOnTarget(void)
if (nextTarget) if (nextTarget)
nextTarget->RegisterReference((CEntity**)&m_pPointGunAt); nextTarget->RegisterReference((CEntity**)&m_pPointGunAt);
SetPointGunAt(nextTarget); SetPointGunAt(nextTarget);
Say(SOUND_PED_AIMING);
return true; return true;
} }

View file

@ -73,7 +73,7 @@ CCredits::Render(void)
scrolloffset = (CTimer::GetTimeInMilliseconds() - CreditsStartTime) / 24.0f; scrolloffset = (CTimer::GetTimeInMilliseconds() - CreditsStartTime) / 24.0f;
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.75f)); CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.75f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetFontStyle(FONT_STANDARD); CFont::SetFontStyle(FONT_STANDARD);
@ -421,7 +421,7 @@ CCredits::Render(void)
PrintCreditText(0.65f, 0.65f, TheText.Get("CRED129"), lineoffset, scrolloffset); PrintCreditText(0.65f, 0.65f, TheText.Get("CRED129"), lineoffset, scrolloffset);
PrintCreditSpace(1.5f, lineoffset); PrintCreditSpace(1.5f, lineoffset);
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.8f)); CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.8f));
PrintCreditText(1.1f, 0.8f, TheText.Get("CRD111A"), lineoffset, scrolloffset); PrintCreditText(1.1f, 0.8f, TheText.Get("CRD111A"), lineoffset, scrolloffset);
PrintCreditSpace(0.5f, lineoffset); PrintCreditSpace(0.5f, lineoffset);
@ -469,7 +469,7 @@ CCredits::Render(void)
PrintCreditSpace(0.5f, lineoffset); PrintCreditSpace(0.5f, lineoffset);
PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134I"), lineoffset, scrolloffset); PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134I"), lineoffset, scrolloffset);
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.7f)); CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.7f));
PrintCreditSpace(1.5f, lineoffset); PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.1f, 0.8f, TheText.Get("CRED135"), lineoffset, scrolloffset); PrintCreditText(1.1f, 0.8f, TheText.Get("CRED135"), lineoffset, scrolloffset);
@ -505,7 +505,7 @@ CCredits::Render(void)
PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140L"), lineoffset, scrolloffset); PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140L"), lineoffset, scrolloffset);
PrintCreditSpace(1.5f, lineoffset); PrintCreditSpace(1.5f, lineoffset);
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.85f)); CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.85f));
PrintCreditText(0.95f, 0.7f, TheText.Get("CRED259"), lineoffset, scrolloffset); PrintCreditText(0.95f, 0.7f, TheText.Get("CRED259"), lineoffset, scrolloffset);
PrintCreditSpace(0.5f, lineoffset); PrintCreditSpace(0.5f, lineoffset);
@ -586,7 +586,7 @@ CCredits::Render(void)
PrintCreditText(0.65f, 0.65f, TheText.Get("CRED172"), lineoffset, scrolloffset); PrintCreditText(0.65f, 0.65f, TheText.Get("CRED172"), lineoffset, scrolloffset);
PrintCreditSpace(0.5f, lineoffset); PrintCreditSpace(0.5f, lineoffset);
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.75f)); CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.75f));
PrintCreditSpace(1.5f, lineoffset); PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(0.95f, 0.7f, TheText.Get("CRED217"), lineoffset, scrolloffset); PrintCreditText(0.95f, 0.7f, TheText.Get("CRED217"), lineoffset, scrolloffset);
@ -709,7 +709,7 @@ CCredits::Render(void)
PrintCreditText(0.65f, 0.65f, TheText.Get("CRED332"), lineoffset, scrolloffset); PrintCreditText(0.65f, 0.65f, TheText.Get("CRED332"), lineoffset, scrolloffset);
PrintCreditSpace(1.5f, lineoffset); PrintCreditSpace(1.5f, lineoffset);
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.8f)); CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.8f));
PrintCreditText(0.95f, 0.7f, TheText.Get("CRED333"), lineoffset, scrolloffset); PrintCreditText(0.95f, 0.7f, TheText.Get("CRED333"), lineoffset, scrolloffset);
PrintCreditSpace(0.5f, lineoffset); PrintCreditSpace(0.5f, lineoffset);
@ -747,7 +747,7 @@ CCredits::Render(void)
PrintCreditSpace(1.5f, lineoffset); PrintCreditSpace(1.5f, lineoffset);
CFont::SetCentreSize(SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH * 0.75f)); CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.75f));
PrintCreditText(0.95f, 0.7f, TheText.Get("CRED267"), lineoffset, scrolloffset); PrintCreditText(0.95f, 0.7f, TheText.Get("CRED267"), lineoffset, scrolloffset);
PrintCreditSpace(0.5f, lineoffset); PrintCreditSpace(0.5f, lineoffset);

View file

@ -268,8 +268,8 @@ CFont::Initialise(void)
SetColor(CRGBA(0xFF, 0xFF, 0xFF, 0)); SetColor(CRGBA(0xFF, 0xFF, 0xFF, 0));
SetJustifyOff(); SetJustifyOff();
SetCentreOff(); SetCentreOff();
SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH)); SetWrapx(SCREEN_WIDTH);
SetCentreSize(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH)); SetCentreSize(SCREEN_WIDTH);
SetBackgroundOff(); SetBackgroundOff();
SetBackgroundColor(CRGBA(0x80, 0x80, 0x80, 0x80)); SetBackgroundColor(CRGBA(0x80, 0x80, 0x80, 0x80));
SetBackGroundOnlyTextOff(); SetBackGroundOnlyTextOff();
@ -646,7 +646,14 @@ CFont::GetNumberLines(float xstart, float ystart, wchar *s)
y = ystart; y = ystart;
while(*s){ while(*s){
#ifdef FIX_BUGS
float f = Details.centre ? Details.centreSize :
Details.rightJustify ? xstart - Details.rightJustifyWrap :
Details.wrapX;
#else
float f = (Details.centre ? Details.centreSize : Details.wrapX); float f = (Details.centre ? Details.centreSize : Details.wrapX);
#endif
#ifdef MORE_LANGUAGES #ifdef MORE_LANGUAGES
if (IsJapaneseFont()) if (IsJapaneseFont())
f -= SCREEN_SCALE_X(21.0f * 2.0f); f -= SCREEN_SCALE_X(21.0f * 2.0f);
@ -726,8 +733,15 @@ CFont::GetTextRect(CRect *rect, float xstart, float ystart, wchar *s)
x = xstart; x = xstart;
y = ystart; y = ystart;
#ifdef FIX_BUGS
float xEnd = Details.centre ? Details.centreSize :
Details.rightJustify ? xstart - Details.rightJustifyWrap :
Details.wrapX;
#else
float xEnd = (Details.centre ? Details.centreSize : Details.wrapX);
#endif
while(*s){ while(*s){
if(x + GetStringWidth(s) > (Details.centre ? Details.centreSize : Details.wrapX)){ if(x + GetStringWidth(s) > xEnd){
// reached end of line // reached end of line
if(x > maxlength) if(x > maxlength)
maxlength = x; maxlength = x;

View file

@ -967,7 +967,7 @@ CGlass::BreakGlassPhysically(CVector pos, float radius)
for ( int32 j = 0; j < col->numTriangles; j++ ) for ( int32 j = 0; j < col->numTriangles; j++ )
{ {
if ( CCollision::TestSphereTriangle(sphere, if ( CCollision::TestSphereTriangle(sphere,
col->vertices, col->triangles[i], col->trianglePlanes[i]) ) col->vertices, col->triangles[j], col->trianglePlanes[j]) )
{ {
hit = true; hit = true;
} }

View file

@ -1095,7 +1095,7 @@ void CHud::Draw()
CFont::SetCentreOff(); CFont::SetCentreOff();
CFont::SetWrapx(SCALE_AND_CENTER_X(CTheScripts::IntroTextLines[i].m_fWrapX)); CFont::SetWrapx(SCALE_AND_CENTER_X(CTheScripts::IntroTextLines[i].m_fWrapX));
CFont::SetCentreSize(SCALE_AND_CENTER_X(CTheScripts::IntroTextLines[i].m_fCenterSize)); CFont::SetCentreSize(SCREEN_SCALE_X(CTheScripts::IntroTextLines[i].m_fCenterSize));
if (CTheScripts::IntroTextLines[i].m_bBackground) if (CTheScripts::IntroTextLines[i].m_bBackground)
CFont::SetBackgroundOn(); CFont::SetBackgroundOn();
@ -1168,7 +1168,7 @@ void CHud::Draw()
onceItWasWidescreen = true; onceItWasWidescreen = true;
if (FrontEndMenuManager.m_PrefsShowSubtitles || !CCutsceneMgr::IsRunning()) { if (FrontEndMenuManager.m_PrefsShowSubtitles || !CCutsceneMgr::IsRunning()) {
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(60.0f)); CFont::SetCentreSize(SCREEN_WIDTH - SCREEN_SCALE_X(60.0f));
CFont::SetScale(SCREEN_SCALE_X(0.58f), SCREEN_SCALE_Y(1.2f)); CFont::SetScale(SCREEN_SCALE_X(0.58f), SCREEN_SCALE_Y(1.2f));
CFont::PrintString(SCREEN_WIDTH / 2.f, SCREEN_SCALE_FROM_BOTTOM(80.0f), m_Message); CFont::PrintString(SCREEN_WIDTH / 2.f, SCREEN_SCALE_FROM_BOTTOM(80.0f), m_Message);
} }
@ -1182,11 +1182,11 @@ void CHud::Draw()
CFont::SetDropColor(CRGBA(0, 0, 0, 255)); CFont::SetDropColor(CRGBA(0, 0, 0, 255));
CFont::SetScale(SCREEN_SCALE_X(0.58f), SCREEN_SCALE_Y(1.22f)); CFont::SetScale(SCREEN_SCALE_X(0.58f), SCREEN_SCALE_Y(1.22f));
float offsetX = SCREEN_SCALE_X(140.0f) + SCREEN_SCALE_X(8.0f); float radarBulge = SCREEN_SCALE_X(140.0f) + SCREEN_SCALE_X(8.0f);
float center = SCREEN_SCALE_FROM_RIGHT(20.0f) - SCREEN_SCALE_X(8.0f) - offsetX; float rectWidth = SCREEN_WIDTH - SCREEN_SCALE_X(20.0f) - SCREEN_SCALE_X(8.0f) - radarBulge;
CFont::SetCentreSize(center); CFont::SetCentreSize(rectWidth);
CFont::PrintString(center / 2.0f + offsetX, SCREEN_SCALE_FROM_BOTTOM(105.f + 2.0f), m_Message); CFont::PrintString(rectWidth / 2.0f + radarBulge, SCREEN_SCALE_FROM_BOTTOM(105.f + 2.0f), m_Message);
} }
CFont::SetDropShadowPosition(0); CFont::SetDropShadowPosition(0);
} }
@ -1322,13 +1322,13 @@ void CHud::Draw()
} }
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(50.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
CFont::SetColor(CRGBA(255, 255, 0, BigMessageAlpha[0])); // unused color CFont::SetColor(CRGBA(255, 255, 0, BigMessageAlpha[0])); // unused color
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_HEADING);
// Appearently sliding text in here was abandoned very early, since this text is centered now. // Appearently sliding text in here was abandoned very early, since this text is centered now.
if (BigMessageX[0] >= SCREEN_SCALE_FROM_RIGHT(20.0f)) { if (BigMessageX[0] >= SCALE_AND_CENTER_X(620.0f)) {
BigMessageInUse[0] += CTimer::GetTimeStep(); BigMessageInUse[0] += CTimer::GetTimeStep();
if (BigMessageInUse[0] >= 120.0f) { if (BigMessageInUse[0] >= 120.0f) {
@ -1356,7 +1356,7 @@ void CHud::Draw()
} }
else { else {
BigMessageAlpha[0] = 0.0f; BigMessageAlpha[0] = 0.0f;
BigMessageX[0] = SCREEN_SCALE_FROM_RIGHT(DEFAULT_SCREEN_WIDTH + 60.0f); BigMessageX[0] = SCALE_AND_CENTER_X(-60.0f);
BigMessageInUse[0] = 1.0f; BigMessageInUse[0] = 1.0f;
} }
} }
@ -1435,7 +1435,7 @@ void CHud::DrawAfterFade()
CFont::SetCentreOff(); CFont::SetCentreOff();
CFont::SetWrapx(SCALE_AND_CENTER_X(line.m_fWrapX)); CFont::SetWrapx(SCALE_AND_CENTER_X(line.m_fWrapX));
CFont::SetCentreSize(SCALE_AND_CENTER_X(line.m_fCenterSize)); CFont::SetCentreSize(SCREEN_SCALE_X(line.m_fCenterSize));
if (line.m_bBackground) if (line.m_bBackground)
CFont::SetBackgroundOn(); CFont::SetBackgroundOn();
else else
@ -1481,7 +1481,7 @@ void CHud::DrawAfterFade()
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f)); CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(40.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(600.0f));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
CFont::SetDropShadowPosition(2); CFont::SetDropShadowPosition(2);
CFont::SetDropColor(CRGBA(0, 0, 0, 255)); CFont::SetDropColor(CRGBA(0, 0, 0, 255));
@ -1495,7 +1495,7 @@ void CHud::DrawAfterFade()
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f)); CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.5f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(60.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(580.0f));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
CFont::SetDropShadowPosition(2); CFont::SetDropShadowPosition(2);
CFont::SetDropColor(CRGBA(0, 0, 0, 255)); CFont::SetDropColor(CRGBA(0, 0, 0, 255));
@ -1550,7 +1550,7 @@ void CHud::DrawAfterFade()
CFont::SetScale(SCREEN_SCALE_X(1.0f), SCREEN_SCALE_Y(1.2f)); CFont::SetScale(SCREEN_SCALE_X(1.0f), SCREEN_SCALE_Y(1.2f));
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(80.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(560.0f));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD)); CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
CFont::SetDropShadowPosition(2); CFont::SetDropShadowPosition(2);
CFont::SetDropColor(CRGBA(0, 0, 0, 255)); CFont::SetDropColor(CRGBA(0, 0, 0, 255));
@ -1581,7 +1581,7 @@ void CHud::DrawAfterFade()
CFont::SetScale(SCREEN_SCALE_X(1.04f), SCREEN_SCALE_Y(1.6f)); CFont::SetScale(SCREEN_SCALE_X(1.04f), SCREEN_SCALE_Y(1.6f));
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetRightJustifyWrap(0.0f); CFont::SetRightJustifyWrap(SCALE_AND_CENTER_X(0.0f));
CFont::SetRightJustifyOn(); CFont::SetRightJustifyOn();
CFont::SetFontStyle(FONT_BANK); CFont::SetFontStyle(FONT_BANK);
CFont::SetScale(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_AMERICAN ? SCREEN_SCALE_X(1.7f) : SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.8f)); CFont::SetScale(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_AMERICAN ? SCREEN_SCALE_X(1.7f) : SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.8f));

View file

@ -179,7 +179,7 @@ CSpecialFX::Render2DFXs(void)
CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f)); CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f));
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(20.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(620.0f)); // unused
CFont::SetCentreOff(); CFont::SetCentreOff();
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetColor(CRGBA(0, 255, 0, 200)); CFont::SetColor(CRGBA(0, 255, 0, 200));
@ -204,7 +204,7 @@ CSpecialFX::Render2DFXs(void)
CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f)); CFont::SetScale(SCREEN_SCALE_X(1.5f), SCREEN_SCALE_Y(1.5f));
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(20.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(620.0f)); // unused
CFont::SetCentreOff(); CFont::SetCentreOff();
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetColor(CRGBA(100, 100, 100, 200)); CFont::SetColor(CRGBA(100, 100, 100, 200));

View file

@ -1494,7 +1494,7 @@ CAutomobile::ProcessControl(void)
blade = Multiply3x3(blade, GetMatrix()); blade = Multiply3x3(blade, GetMatrix());
camDist /= Max(Sqrt(distSq), 0.01f); camDist /= Max(Sqrt(distSq), 0.01f);
if(Abs(DotProduct(camDist, blade)) > 0.95f){ if(Abs(DotProduct(camDist, blade)) > 0.95f){
DMAudio.PlayOneShot(m_audioEntityId, SOUND_31, 0.0f); DMAudio.PlayOneShot(m_audioEntityId, SOUND_HELI_BLADE, 0.0f);
m_fPropellerRotation = m_aWheelRotation[1]; m_fPropellerRotation = m_aWheelRotation[1];
} }
} }

View file

@ -1,4 +1,4 @@
#include "common.h" #include "common.h"
#include "General.h" #include "General.h"
#include "Timecycle.h" #include "Timecycle.h"
@ -145,7 +145,7 @@ CBoat::ProcessControl(void)
AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_CLOSE || AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_CLOSE ||
AutoPilot.m_nCarMission == MISSION_ATTACKPLAYER) && AutoPilot.m_nCarMission == MISSION_ATTACKPLAYER) &&
CTimer::GetTimeInMilliseconds() > m_nPoliceShoutTimer){ CTimer::GetTimeInMilliseconds() > m_nPoliceShoutTimer){
DMAudio.PlayOneShot(m_audioEntityId, SOUND_115, 0.0f); DMAudio.PlayOneShot(m_audioEntityId, SOUND_PED_VCPA_PLAYER_FOUND, 0.0f);
m_nPoliceShoutTimer = CTimer::GetTimeInMilliseconds() + 4500 + (CGeneral::GetRandomNumber()&0xFFF); m_nPoliceShoutTimer = CTimer::GetTimeInMilliseconds() + 4500 + (CGeneral::GetRandomNumber()&0xFFF);
} }
} }