summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--premake5.lua3
-rw-r--r--src/animation/AnimManager.h1
-rw-r--r--src/audio/AudioLogic.cpp1023
-rw-r--r--src/audio/AudioManager.cpp6
-rw-r--r--src/audio/AudioManager.h57
-rw-r--r--src/audio/sampman_null.cpp10
-rw-r--r--src/control/Garages.cpp6
-rw-r--r--src/control/Garages.h1
-rw-r--r--src/control/PathFind.cpp7
-rw-r--r--src/control/PathFind.h1
-rw-r--r--src/control/Replay.cpp549
-rw-r--r--src/control/Replay.h127
-rw-r--r--src/control/RoadBlocks.cpp10
-rw-r--r--src/control/Script.cpp6
-rw-r--r--src/core/CdStream.cpp4
-rw-r--r--src/core/ControllerConfig.cpp5
-rw-r--r--src/core/EventList.cpp4
-rw-r--r--src/core/Frontend.cpp25
-rw-r--r--src/core/Frontend.h2
-rw-r--r--src/core/Pad.cpp18
-rw-r--r--src/core/Pad.h8
-rw-r--r--src/core/Radar.cpp12
-rw-r--r--src/core/common.h2
-rw-r--r--src/core/config.h5
-rw-r--r--src/core/main.cpp3
-rw-r--r--src/core/timebars.cpp4
-rw-r--r--src/core/timebars.h4
-rw-r--r--src/modelinfo/ModelIndices.h20
-rw-r--r--src/peds/CivilianPed.cpp6
-rw-r--r--src/peds/CopPed.cpp28
-rw-r--r--src/peds/CopPed.h4
-rw-r--r--src/peds/Ped.cpp12
-rw-r--r--src/peds/PedType.h4
-rw-r--r--src/render/Coronas.cpp4
-rw-r--r--src/render/Credits.cpp1182
-rw-r--r--src/render/Fluff.h3
-rw-r--r--src/render/Particle.cpp4
-rw-r--r--src/render/WaterLevel.cpp8
-rw-r--r--src/render/WaterLevel.h4
-rw-r--r--src/skel/glfw/glfw.cpp114
-rw-r--r--src/skel/win/win.cpp21
-rw-r--r--src/vehicles/Automobile.cpp52
-rw-r--r--src/vehicles/Automobile.h3
-rw-r--r--src/vehicles/Boat.cpp4
-rw-r--r--src/vehicles/CarGen.cpp6
-rw-r--r--src/vehicles/DamageManager.cpp2
-rw-r--r--src/vehicles/Vehicle.cpp51
-rw-r--r--src/weapons/Explosion.cpp14
-rw-r--r--src/weapons/Explosion.h1
m---------vendor/opusfile0
51 files changed, 2463 insertions, 989 deletions
diff --git a/README.md b/README.md
index c8fa3984..9cb48c25 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ such that we have a working game at all times.
## How can I try it?
-- re3 requires game assets to work, so you **must** own a copy of GTA III.
+- re3 requires game assets to work, so you **must** own [a copy of GTA III](https://store.steampowered.com/app/12100/Grand_Theft_Auto_III/).
- Build re3 or download it from one of the above links (Debug or Release).
- (Optional) If you want to use optional features like Russian language or menu map, copy the files in /gamefiles folder to your game root folder.
- Move re3.exe to GTA 3 directory and run it.
diff --git a/premake5.lua b/premake5.lua
index 478ac18d..b61a9c4c 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -47,6 +47,8 @@ function getarch(a)
return 'amd64'
elseif a == 'ARM' then
return 'arm'
+ elseif a == 'ARM64' then
+ return 'arm64'
end
return a
end
@@ -75,6 +77,7 @@ workspace "reVC"
"linux-x86-librw_gl3_glfw-oal",
"linux-amd64-librw_gl3_glfw-oal",
"linux-arm-librw_gl3_glfw-oal",
+ "linux-arm64-librw_gl3_glfw-oal",
}
filter { "system:bsd" }
diff --git a/src/animation/AnimManager.h b/src/animation/AnimManager.h
index 8658c056..a55577b1 100644
--- a/src/animation/AnimManager.h
+++ b/src/animation/AnimManager.h
@@ -139,4 +139,5 @@ public:
static void LoadAnimFile(RwStream *stream, bool compress, char (*somename)[32] = nil);
static void CreateAnimAssocGroups(void);
static void RemoveLastAnimFile(void);
+ static CAnimBlendAssocGroup* GetAnimAssocGroups(void) { return ms_aAnimAssocGroups; }
};
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index e76bb99d..18fe4fc5 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -38,6 +38,8 @@
#include "ZoneCull.h"
#include "sampman.h"
#include "Bike.h"
+#include "WindModifiers.h"
+#include "Fluff.h"
const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples);
@@ -292,7 +294,6 @@ cAudioManager::CalculateDistance(bool &distCalculated, float dist)
if (!distCalculated) {
if (dist > 0.0f)
m_sQueueSample.m_fDistance = Sqrt(dist);
-
else
m_sQueueSample.m_fDistance = 0.0f;
distCalculated = true;
@@ -337,7 +338,7 @@ cAudioManager::ProcessSpecial()
void
cAudioManager::ProcessEntity(int32 id)
{
- if (m_asAudioEntities[id].m_nStatus) {
+ if (m_asAudioEntities[id].m_nStatus != STATUS_PLAYER) {
m_sQueueSample.m_nEntityIndex = id;
switch (m_asAudioEntities[id].m_nType) {
case AUDIOTYPE_PHYSICAL:
@@ -361,7 +362,8 @@ cAudioManager::ProcessEntity(int32 id)
case AUDIOTYPE_WEATHER:
if (!m_nUserPause) {
m_sQueueSample.m_bReverbFlag = true;
- ProcessWeather(id);
+ if(CGame::currArea == AREA_MAIN_MAP || CGame::currArea == AREA_EVERYWHERE)
+ ProcessWeather(id);
}
break;
/* case AUDIOTYPE_CRANE:
@@ -410,6 +412,18 @@ cAudioManager::ProcessEntity(int32 id)
ProcessWaterCannon(id);
}
break;
+ case AUDIOTYPE_ESCALATOR:
+ if (!m_nUserPause) {
+ m_sQueueSample.m_bReverbFlag = true;
+ ProcessEscalators();
+ }
+ break;
+ case AUDIOTYPE_EXTRA_SOUNDS:
+ if (!m_nUserPause) {
+ m_sQueueSample.m_bReverbFlag = true;
+ ProcessExtraSounds();
+ }
+ break;
default:
return;
}
@@ -543,6 +557,10 @@ enum eVehicleModel {
BLOODRA,
BLOODRB,
VICECHEE,
+ CAR237,
+ CAR238,
+ CAR239,
+ MAX_CARS,
// HACK so this compiles
// TODO(MIAMI): check it out
@@ -551,10 +569,10 @@ enum eVehicleModel {
enum
{
- DOOR_TYPE_OLD = 0,
- DOOR_TYPE_NEW,
- DOOR_TYPE_TRUCK,
- DOOR_TYPE_AIRBREAK,
+ OLD_DOOR = 0,
+ NEW_DOOR,
+ TRUCK_DOOR,
+ BUS_DOOR,
};
@@ -568,116 +586,118 @@ struct tVehicleSampleData {
uint8 m_bDoorType;
};
-const tVehicleSampleData aVehicleSettings[110] = { {SFX_CAR_REV_10, 13, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9935, 0},
- {SFX_CAR_REV_11, 14, SFX_CAR_HORN_56CHEV, 11487, SFX_CAR_HORN_JEEP, 9900, 0},
- {SFX_CAR_REV_2, 5, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_HORN_JEEP, 9890, 1},
- {SFX_CAR_REV_5, 8, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_HORN_JEEP, 9960, 2},
- {SFX_CAR_REV_11, 14, SFX_CAR_HORN_56CHEV, 12893, SFX_CAR_HORN_JEEP, 9500, 0},
- {SFX_CAR_REV_4, 7, SFX_CAR_HORN_BMW328, 10706, SFX_CAR_HORN_JEEP, 9600, 1},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_HORN_JEEP, 9700, 1},
- {SFX_CAR_REV_5, 8, SFX_CAR_HORN_TRUCK, 29711, SFX_POLICE_SIREN_SLOW, 10588, 2},
- {SFX_CAR_REV_5, 8, SFX_CAR_HORN_TRUCK, 31478, SFX_CAR_HORN_JEEP, 9800, 2},
- {SFX_CAR_REV_11, 14, SFX_CAR_HORN_BMW328, 9538, SFX_CAR_HORN_JEEP, 9900, 1},
- {SFX_CAR_REV_11, 14, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_HORN_JEEP, 10000, 0},
- {SFX_CAR_REV_7, 10, SFX_CAR_HORN_BMW328, 12017, SFX_CAR_HORN_JEEP, 9900, 1},
- {SFX_CAR_REV_9, 12, SFX_CAR_HORN_JEEP, 22293, SFX_CAR_HORN_JEEP, 9800, 1},
- {SFX_CAR_REV_3, 6, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9700, 0},
- {SFX_CAR_REV_3, 6, SFX_CAR_HORN_BUS, 18286, SFX_CAR_HORN_JEEP, 9600, 0},
- {SFX_CAR_REV_2, 5, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_HORN_JEEP, 9500, 1},
- {SFX_CAR_REV_3, 6, SFX_CAR_HORN_JEEP, 22295, SFX_AMBULANCE_SIREN_SLOW, 12688, 0},
- {SFX_CAR_REV_4, 7, SFX_CAR_HORN_PORSCHE, 9271, SFX_POLICE_SIREN_SLOW, 11471, 1},
- {SFX_CAR_REV_11, 14, SFX_CAR_HORN_56CHEV, 12170, SFX_CAR_HORN_JEEP, 9400, 0},
- {SFX_CAR_REV_11, 14, SFX_CAR_HORN_BMW328, 11000, SFX_CAR_HORN_JEEP, 9300, 0},
- {SFX_CAR_REV_10, 13, SFX_CAR_HORN_BMW328, 10796, SFX_CAR_HORN_JEEP, 9200, 1},
- {SFX_CAR_REV_4, 7, SFX_CAR_HORN_BMW328, 10500, SFX_CAR_HORN_JEEP, 9100, 1},
- {SFX_CAR_REV_10, 13, SFX_CAR_HORN_PICKUP, 10924, SFX_CAR_HORN_JEEP, 9000, 0},
- {SFX_CAR_REV_3, 6, SFX_CAR_HORN_PICKUP, 11025, SFX_ICE_CREAM_TUNE, 11025, 0},
- {SFX_CAR_REV_6, 9, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9100, 0},
- {SFX_HELI_APACHE_1, 30, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9200, 1},
- {SFX_CAR_REV_4, 7, SFX_CAR_HORN_BMW328, 10706, SFX_POLICE_SIREN_SLOW, 10511, 1},
- {SFX_CAR_REV_3, 6, SFX_CAR_HORN_BUS, 17260, SFX_POLICE_SIREN_SLOW, 11029, 0},
- {SFX_CAR_REV_3, 6, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_HORN_JEEP, 9300, 0},
- {SFX_CAR_REV_7, 10, SFX_CAR_HORN_PORSCHE, 10400, SFX_CAR_HORN_JEEP, 9400, 1},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 26513, SFX_POLICE_SIREN_SLOW, 11912, 1},
- {SFX_CAR_REV_5, 8, SFX_CAR_HORN_BUS2, 11652, SFX_CAR_HORN_JEEP, 9500, 3},
- {SFX_CAR_REV_5, 8, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_HORN_JEEP, 9600, 2},
- {SFX_CAR_REV_5, 8, SFX_CAR_HORN_TRUCK, 28043, SFX_CAR_HORN_JEEP, 9700, 2},
- {SFX_CAR_REV_6, 9, SFX_CAR_HORN_JEEP, 25400, SFX_CAR_HORN_JEEP, 9800, 0},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9900, 1},
- {SFX_CAR_REV_17, 20, SFX_CAR_HORN_JEEP, 26313, SFX_CAR_HORN_JEEP, 10000, 1},
- {SFX_CAR_REV_5, 8, SFX_CAR_HORN_BUS, 16291, SFX_CAR_HORN_JEEP, 10100, 3},
- {SFX_CAR_REV_11, 14, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_HORN_JEEP, 9900, 0},
- {SFX_CAR_REV_11, 14, SFX_CAR_HORN_56CHEV, 10233, SFX_CAR_HORN_JEEP, 9800, 1},
- {SFX_CAR_REV_3, 6, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_HORN_JEEP, 9700, 0},
- {SFX_RC_REV, 17, SFX_CAR_HORN_PICKUP, 20000, SFX_CAR_HORN_JEEP, 9600, 1},
- {SFX_CAR_REV_11, 14, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9500, 1},
- {SFX_CAR_REV_5, 8, SFX_CAR_HORN_TRUCK, 29000, SFX_CAR_HORN_JEEP, 9400, 2},
- {SFX_CAR_REV_1, 4, SFX_CAR_HORN_BMW328, 9003, SFX_CAR_HORN_JEEP, 9300, 1},
- {SFX_CAR_REV_4, 7, SFX_CAR_HORN_PORSCHE, 12375, SFX_CAR_HORN_JEEP, 9200, 1},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_BUS2, 15554, SFX_CAR_HORN_JEEP, 9100, 1},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_BUS2, 13857, SFX_CAR_HORN_JEEP, 9000, 2},
- {SFX_MOPED_REV, 21, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 9100, 1},
- {SFX_CAR_REV_7, 10, SFX_CAR_HORN_JEEP, 22043, SFX_CAR_HORN_JEEP, 9200, 0},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9300, 1},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9400, 1},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9500, 1},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9600, 1},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9700, 1},
- {SFX_CAR_REV_5, 8, SFX_CAR_HORN_TRUCK, 28043, SFX_CAR_HORN_JEEP, 9800, 2},
- {SFX_CAR_REV_3, 6, SFX_CAR_HORN_BUS, 18286, SFX_CAR_HORN_JEEP, 9900, 0},
- {SFX_CAR_REV_12, 15, SFX_CAR_HORN_JEEP, 28500, SFX_CAR_HORN_JEEP, 9800, 1},
- {SFX_CAR_REV_1, 4, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_HORN_JEEP, 9700, 0},
- {SFX_CAR_REV_8, 11, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9700, 0},
- {SFX_SEAPLANE_PRO1, 35, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9700, 1},
- {SFX_CAR_REV_20, 23, SFX_CAR_HORN_JEEP, 27000, SFX_CAR_HORN_JEEP, 9600, 1},
- {SFX_MOPED_REV, 21, SFX_CAR_HORN_JEEP, 31000, SFX_CAR_HORN_JEEP, 9500, 1},
- {SFX_CAR_REV_17, 20, SFX_CAR_HORN_PICKUP, 11000, SFX_CAR_HORN_JEEP, 9400, 1},
- {SFX_RC_REV, 17, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 15000, 1},
- {SFX_CAR_RC_HELI, 18, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 15000, 1},
- {SFX_CAR_REV_9, 12, SFX_CAR_HORN_56CHEV, 10300, SFX_CAR_HORN_JEEP, 9100, 0},
- {SFX_CAR_REV_9, 12, SFX_CAR_HORN_56CHEV, 10500, SFX_CAR_HORN_JEEP, 9000, 0},
- {SFX_CAR_REV_19, 22, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 9000, 1},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9100, 2},
- {SFX_CAR_REV_3, 6, SFX_CAR_HORN_TRUCK, 28000, SFX_CAR_HORN_JEEP, 9200, 2},
- {SFX_CAR_REV_7, 10, SFX_CAR_HORN_PICKUP, 11200, SFX_CAR_HORN_JEEP, 9300, 1},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, 1},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9500, 1},
- {SFX_CAR_REV_9, 12, SFX_CAR_HORN_56CHEV, 10700, SFX_CAR_HORN_JEEP, 9600, 0},
- {SFX_CAR_REV_1, 4, SFX_CAR_HORN_BMW328, 9000, SFX_CAR_HORN_JEEP, 9700, 0},
- {SFX_CAR_REV_6, 9, SFX_CAR_HORN_BMW328, 9200, SFX_CAR_HORN_JEEP, 9800, 0},
- {SFX_CAR_REV_7, 10, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9900, 1},
- {SFX_CAR_REV_11, 14, SFX_CAR_HORN_56CHEV, 10540, SFX_CAR_HORN_JEEP, 9935, 2},
- {SFX_CAR_REV_8, 11, SFX_CAR_HORN_PICKUP, 11000, SFX_CAR_HORN_JEEP, 9700, 1},
- {SFX_CAR_REV_2, 5, SFX_CAR_HORN_BMW328, 9500, SFX_CAR_HORN_JEEP, 9800, 1},
- {SFX_CAR_REV_7, 10, SFX_CAR_HORN_BMW328, 9700, SFX_CAR_HORN_JEEP, 9700, 1},
- {SFX_CAR_REV_8, 11, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9600, 0},
- {SFX_CAR_REV_3, 6, SFX_CAR_HORN_BUS, 18000, SFX_CAR_HORN_JEEP, 9500, 2},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, 1},
- {SFX_CAR_REV_8, 11, SFX_CAR_HORN_JEEP, 27513, SFX_CAR_HORN_JEEP, 9300, 1},
- {SFX_CAR_REV_8, 11, SFX_CAR_HORN_56CHEV, 10700, SFX_CAR_HORN_JEEP, 9200, 0},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9100, 2},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9000, 2},
- {SFX_CAR_REV_10, 13, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9100, 2},
- {SFX_CAR_REV_1, 4, SFX_CAR_HORN_BUS2, 17900, SFX_POLICE_SIREN_SLOW, 10511, 2},
- {SFX_CAR_REV_4, 7, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9200, 1},
- {SFX_CAR_REV_8, 11, SFX_CAR_HORN_BMW328, 9600, SFX_CAR_HORN_JEEP, 9300, 1},
- {SFX_CAR_REV_4, 0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, 1},
- {SFX_CAR_REV_7, 10, SFX_CAR_HORN_PORSCHE, 10000, SFX_CAR_HORN_JEEP, 9500, 0},
- {SFX_CAR_REV_6, 9, SFX_CAR_HORN_PORSCHE, 10500, SFX_CAR_HORN_JEEP, 9600, 0},
- {SFX_CAR_REV_10, 13, SFX_CAR_HORN_JEEP, 25513, SFX_CAR_HORN_JEEP, 9700, 1},
- {SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9800, 1},
- {SFX_CAR_REV_3, 6, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9900, 1},
- {SFX_CAR_REV_10, 13, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9800, 1},
- {SFX_CAR_REV_1, 4, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9700, 1},
- {SFX_CAR_RC_HELI, 18, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9600, 1},
- {SFX_CAR_REV_6, 9, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9700, 1},
- {SFX_CAR_REV_7, 10, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9600, 1},
- {SFX_CAR_REV_1, 4, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9500, 1},
- {SFX_CAR_REV_9, 12, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, 1},
- {SFX_CAR_REV_2, 5, SFX_CAR_HORN_PORSCHE, 11025, SFX_POLICE_SIREN_SLOW, 11000, 1},
- {SFX_CAR_REV_1, 4, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9200, 1},
- {SFX_CAR_REV_1, 4, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9300, 1},
- {SFX_CAR_REV_1, 4, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, 1} };
+const tVehicleSampleData aVehicleSettings[MAX_CARS] = {
+ {SFX_CAR_REV_10, SFX_BANK_PATHFINDER, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9935, OLD_DOOR},
+ {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 11487, SFX_CAR_HORN_JEEP, 9900, OLD_DOOR},
+ {SFX_CAR_REV_2, SFX_BANK_PORSCHE, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_HORN_JEEP, 9890, NEW_DOOR},
+ {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_HORN_JEEP, 9960, TRUCK_DOOR},
+ {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 12893, SFX_CAR_HORN_JEEP, 9500, OLD_DOOR},
+ {SFX_CAR_REV_4, SFX_BANK_MERC, SFX_CAR_HORN_BMW328, 10706, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR},
+ {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 29711, SFX_POLICE_SIREN_SLOW, 10588, TRUCK_DOOR},
+ {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 31478, SFX_CAR_HORN_JEEP, 9800, TRUCK_DOOR},
+ {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_BMW328, 9538, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR},
+ {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_HORN_JEEP, 10000, OLD_DOOR},
+ {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_BMW328, 12017, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR},
+ {SFX_CAR_REV_9, SFX_BANK_CADILLAC, SFX_CAR_HORN_JEEP, 22293, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR},
+ {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR},
+ {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS, 18286, SFX_CAR_HORN_JEEP, 9600, OLD_DOOR},
+ {SFX_CAR_REV_2, SFX_BANK_PORSCHE, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR},
+ {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_JEEP, 22295, SFX_AMBULANCE_SIREN_SLOW, 12688, OLD_DOOR},
+ {SFX_CAR_REV_4, SFX_BANK_MERC, SFX_CAR_HORN_PORSCHE, 9271, SFX_POLICE_SIREN_SLOW, 11471, NEW_DOOR},
+ {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 12170, SFX_CAR_HORN_JEEP, 9400, OLD_DOOR},
+ {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_BMW328, 11000, SFX_CAR_HORN_JEEP, 9300, OLD_DOOR},
+ {SFX_CAR_REV_10, SFX_BANK_PATHFINDER, SFX_CAR_HORN_BMW328, 10796, SFX_CAR_HORN_JEEP, 9200, NEW_DOOR},
+ {SFX_CAR_REV_4, SFX_BANK_MERC, SFX_CAR_HORN_BMW328, 10500, SFX_CAR_HORN_JEEP, 9100, NEW_DOOR},
+ {SFX_CAR_REV_10, SFX_BANK_PATHFINDER, SFX_CAR_HORN_PICKUP, 10924, SFX_CAR_HORN_JEEP, 9000, OLD_DOOR},
+ {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_PICKUP, 11025, SFX_ICE_CREAM_TUNE, 11025, OLD_DOOR},
+ {SFX_CAR_REV_6, SFX_BANK_HOTROD, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9100, OLD_DOOR},
+ {SFX_HELI_APACHE_1, SFX_BANK_HELI_APACHE, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9200, NEW_DOOR},
+ {SFX_CAR_REV_4, SFX_BANK_MERC, SFX_CAR_HORN_BMW328, 10706, SFX_POLICE_SIREN_SLOW, 10511, NEW_DOOR},
+ {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS, 17260, SFX_POLICE_SIREN_SLOW, 11029, OLD_DOOR},
+ {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_HORN_JEEP, 9300, OLD_DOOR},
+ {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_PORSCHE, 10400, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_POLICE_SIREN_SLOW, 11912, NEW_DOOR},
+ {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_BUS2, 11652, SFX_CAR_HORN_JEEP, 9500, BUS_DOOR},
+ {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_HORN_JEEP, 9600, TRUCK_DOOR},
+ {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 28043, SFX_CAR_HORN_JEEP, 9700, TRUCK_DOOR},
+ {SFX_CAR_REV_6, SFX_BANK_HOTROD, SFX_CAR_HORN_JEEP, 25400, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR},
+ {SFX_CAR_REV_17, SFX_BANK_VTWIN, SFX_CAR_HORN_JEEP, 26313, SFX_CAR_HORN_JEEP, 10000, NEW_DOOR},
+ {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_BUS, 16291, SFX_CAR_HORN_JEEP, 10100, BUS_DOOR},
+ {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_HORN_JEEP, 9900, OLD_DOOR},
+ {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 10233, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR},
+ {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR},
+ {SFX_RC_REV, SFX_BANK_RC, SFX_CAR_HORN_PICKUP, 20000, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR},
+ {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR},
+ {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 29000, SFX_CAR_HORN_JEEP, 9400, TRUCK_DOOR},
+ {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_BMW328, 9003, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR},
+ {SFX_CAR_REV_4, SFX_BANK_MERC, SFX_CAR_HORN_PORSCHE, 12375, SFX_CAR_HORN_JEEP, 9200, NEW_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_BUS2, 15554, SFX_CAR_HORN_JEEP, 9100, NEW_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_BUS2, 13857, SFX_CAR_HORN_JEEP, 9000, TRUCK_DOOR},
+ {SFX_MOPED_REV, SFX_BANK_MOPED, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 9100, NEW_DOOR},
+ {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_JEEP, 22043, SFX_CAR_HORN_JEEP, 9200, OLD_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR},
+ {SFX_CAR_REV_5, SFX_BANK_TRUCK, SFX_CAR_HORN_TRUCK, 28043, SFX_CAR_HORN_JEEP, 9800, TRUCK_DOOR},
+ {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS, 18286, SFX_CAR_HORN_JEEP, 9900, OLD_DOOR},
+ {SFX_CAR_REV_12, SFX_BANK_GOLF_CART, SFX_CAR_HORN_JEEP, 28500, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR},
+ {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR},
+ {SFX_CAR_REV_8, SFX_BANK_PONTIAC_SLOW, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR},
+ {SFX_SEAPLANE_PRO1, SFX_BANK_PLANE_SEAPLANE, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR},
+ {SFX_CAR_REV_20, SFX_BANK_SPORTS_BIKE, SFX_CAR_HORN_JEEP, 27000, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR},
+ {SFX_MOPED_REV, SFX_BANK_MOPED, SFX_CAR_HORN_JEEP, 31000, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR},
+ {SFX_CAR_REV_17, SFX_BANK_VTWIN, SFX_CAR_HORN_PICKUP, 11000, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR},
+ {SFX_RC_REV, SFX_BANK_RC, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 15000, NEW_DOOR},
+ {SFX_CAR_RC_HELI, SFX_BANK_RC_HELI, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 15000, NEW_DOOR},
+ {SFX_CAR_REV_9, SFX_BANK_CADILLAC, SFX_CAR_HORN_56CHEV, 10300, SFX_CAR_HORN_JEEP, 9100, OLD_DOOR},
+ {SFX_CAR_REV_9, SFX_BANK_CADILLAC, SFX_CAR_HORN_56CHEV, 10500, SFX_CAR_HORN_JEEP, 9000, OLD_DOOR},
+ {SFX_CAR_REV_19, SFX_BANK_HONDA250, SFX_CAR_HORN_JEEP, 30000, SFX_CAR_HORN_JEEP, 9000, NEW_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9100, TRUCK_DOOR},
+ {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_TRUCK, 28000, SFX_CAR_HORN_JEEP, 9200, TRUCK_DOOR},
+ {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_PICKUP, 11200, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR},
+ {SFX_CAR_REV_9, SFX_BANK_CADILLAC, SFX_CAR_HORN_56CHEV, 10700, SFX_CAR_HORN_JEEP, 9600, OLD_DOOR},
+ {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_BMW328, 9000, SFX_CAR_HORN_JEEP, 9700, OLD_DOOR},
+ {SFX_CAR_REV_6, SFX_BANK_HOTROD, SFX_CAR_HORN_BMW328, 9200, SFX_CAR_HORN_JEEP, 9800, OLD_DOOR},
+ {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR},
+ {SFX_CAR_REV_11, SFX_BANK_PACARD, SFX_CAR_HORN_56CHEV, 10540, SFX_CAR_HORN_JEEP, 9935, TRUCK_DOOR},
+ {SFX_CAR_REV_8, SFX_BANK_PONTIAC_SLOW, SFX_CAR_HORN_PICKUP, 11000, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR},
+ {SFX_CAR_REV_2, SFX_BANK_PORSCHE, SFX_CAR_HORN_BMW328, 9500, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR},
+ {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_BMW328, 9700, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR},
+ {SFX_CAR_REV_8, SFX_BANK_PONTIAC_SLOW, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9600, OLD_DOOR},
+ {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_BUS, 18000, SFX_CAR_HORN_JEEP, 9500, TRUCK_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR},
+ {SFX_CAR_REV_8, SFX_BANK_PONTIAC_SLOW, SFX_CAR_HORN_JEEP, 27513, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR},
+ {SFX_CAR_REV_8, SFX_BANK_PONTIAC_SLOW, SFX_CAR_HORN_56CHEV, 10700, SFX_CAR_HORN_JEEP, 9200, OLD_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9100, TRUCK_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9000, TRUCK_DOOR},
+ {SFX_CAR_REV_10, SFX_BANK_PATHFINDER, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_HORN_JEEP, 9100, TRUCK_DOOR},
+ {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_BUS2, 17900, SFX_POLICE_SIREN_SLOW, 10511, TRUCK_DOOR},
+ {SFX_CAR_REV_4, SFX_BANK_MERC, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9200, NEW_DOOR},
+ {SFX_CAR_REV_8, SFX_BANK_PONTIAC_SLOW, SFX_CAR_HORN_BMW328, 9600, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR},
+ {SFX_CAR_REV_4, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR},
+ {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_PORSCHE, 10000, SFX_CAR_HORN_JEEP, 9500, OLD_DOOR},
+ {SFX_CAR_REV_6, SFX_BANK_HOTROD, SFX_CAR_HORN_PORSCHE, 10500, SFX_CAR_HORN_JEEP, 9600, OLD_DOOR},
+ {SFX_CAR_REV_10, SFX_BANK_PATHFINDER, SFX_CAR_HORN_JEEP, 25513, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR},
+ {SFX_CAR_REV_1, SFX_BANK_0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR},
+ {SFX_CAR_REV_3, SFX_BANK_SPIDER, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9900, NEW_DOOR},
+ {SFX_CAR_REV_10, SFX_BANK_PATHFINDER, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9800, NEW_DOOR},
+ {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR},
+ {SFX_CAR_RC_HELI, SFX_BANK_RC_HELI, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR},
+ {SFX_CAR_REV_6, SFX_BANK_HOTROD, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9700, NEW_DOOR},
+ {SFX_CAR_REV_7, SFX_BANK_COBRA, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9600, NEW_DOOR},
+ {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9500, NEW_DOOR},
+ {SFX_CAR_REV_9, SFX_BANK_CADILLAC, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR},
+ {SFX_CAR_REV_2, SFX_BANK_PORSCHE, SFX_CAR_HORN_PORSCHE, 11025, SFX_POLICE_SIREN_SLOW, 11000, NEW_DOOR},
+ {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9200, NEW_DOOR},
+ {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9300, NEW_DOOR},
+ {SFX_CAR_REV_1, CAR_SFX_BANKS_OFFSET, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_HORN_JEEP, 9400, NEW_DOOR} };
+
bool bPlayerJustEnteredCar;
@@ -747,8 +767,8 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
} else {
switch (veh->GetVehicleAppearance()) {
case VEHICLE_APPEARANCE_HELI:
- ProcessHelicopter(&params);
- //ProcessVehicleFlatTyre(&params);
+ ProcessCarHeli(&params);
+ ProcessVehicleFlatTyre(&params);
ProcessEngineDamage(&params);
break;
case VEHICLE_APPEARANCE_BOAT:
@@ -760,7 +780,7 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
if (CWeather::WetRoads > 0.0)
ProcessWetRoadNoise(&params);
ProcessVehicleSkidding(&params);
- //ProcessVehicleFlatTyre(params);
+ ProcessVehicleFlatTyre(&params);
ProcessVehicleHorn(&params);
ProcessVehicleSirenOrAlarm(&params);
if (UsesReverseWarning(params.m_nIndex))
@@ -780,29 +800,20 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
break;
case VEHICLE_TYPE_BOAT:
if (veh->m_modelIndex == MI_SKIMMER)
- ProcessHelicopter(&params);
+ ProcessCarHeli(&params);
else
ProcessBoatEngine(&params);
ProcessBoatMovingOverWater(&params);
ProcessVehicleOneShots(&params);
break;
case VEHICLE_TYPE_HELI:
- ProcessHelicopter(&params);
+ ProcessCarHeli(&params);
ProcessVehicleOneShots(&params);
break;
case VEHICLE_TYPE_PLANE:
- switch (params.m_nIndex) {
- case AIRTRAIN:
- ProcessJumbo(&params);
- break;
- case DEADDODO:
- ProcessCesna(&params);
- break;
- default:
- break;
- }
+ ProcessPlane(&params);
ProcessVehicleOneShots(&params);
- //ProcessVehicleFlatType(&params);
+ ProcessVehicleFlatTyre(&params);
break;
case VEHICLE_TYPE_BIKE:
bike = (CBike*)veh;
@@ -816,7 +827,7 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
ProcessCarBombTick(&params);
ProcessEngineDamage(&params);
ProcessVehicleEngine(&params);
- //ProcessVehicleFlatTyre();
+ ProcessVehicleFlatTyre(&params);
}
ProcessVehicleOneShots(&params);
bike->m_fVelocityChangeForAudio = params.m_fVelocityChange;
@@ -869,27 +880,28 @@ cAudioManager::ProcessReverseGear(cVehicleParams *params)
{
const int reverseGearIntensity = 30;
- CVehicle *veh;
- CAutomobile *automobile;
- int32 emittingVol;
+ CAutomobile* automobile;
float modificator;
+ uint8 emittingVolume;
if (params->m_fDistance >= SQR(reverseGearIntensity))
return false;
- veh = params->m_pVehicle;
- if (veh->bEngineOn && (veh->m_fGasPedal < 0.0f || veh->m_nCurrentGear == 0)) {
+ automobile = (CAutomobile*)params->m_pVehicle;
+ if (automobile->m_modelIndex == MI_CADDY)
+ return true;
+ if (automobile->bEngineOn && (automobile->m_fGasPedal < 0.0f || automobile->m_nCurrentGear == 0)) {
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
- automobile = (CAutomobile *)params->m_pVehicle;
- if (automobile->m_nWheelsOnGround != 0) {
+ if (automobile->m_nDriveWheelsOnGround != 0) {
modificator = params->m_fVelocityChange / params->m_pTransmission->fMaxReverseVelocity;
} else {
- if (automobile->m_nDriveWheelsOnGround != 0)
+ if (automobile->m_nDriveWheelsOnGroundPrev != 0)
automobile->m_fGasPedalAudio *= 0.4f;
modificator = automobile->m_fGasPedalAudio;
}
modificator = Abs(modificator);
- emittingVol = (24.f * modificator);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, reverseGearIntensity, m_sQueueSample.m_fDistance);
+ emittingVolume = modificator * 24.0f;
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, reverseGearIntensity, m_sQueueSample.m_fDistance);
+
if (m_sQueueSample.m_nVolume != 0) {
if (params->m_pVehicle->m_fGasPedal >= 0.0f) {
m_sQueueSample.m_nCounter = 62;
@@ -901,9 +913,9 @@ cAudioManager::ProcessReverseGear(cVehicleParams *params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nFrequency = (6000.f * modificator) + 7000;
+ m_sQueueSample.m_nFrequency = (6000.0f * modificator) + 7000;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ m_sQueueSample.m_nEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
@@ -1197,7 +1209,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams* params)
break;
}
}
- } else if (0.0f == params->m_fVelocityChange) {
+ } else if (params->m_fVelocityChange == 0.0f) {
traction = 0.9f;
}
if (transmission->fMaxVelocity <= 0.0) {
@@ -2183,7 +2195,7 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams *params)
if (doorState == DOORST_OPEN || doorState == DOORST_CLOSED) {
velocity = Min(0.3f, Abs(automobile->Doors[i].m_fAngVel));
if (velocity > 0.0035f) {
- emittingVol = (100.f * velocity * 10.f / 3.f);
+ emittingVol = (100.0f * velocity * 10.0f / 3.0f);
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = i + 6;
@@ -2262,32 +2274,34 @@ cAudioManager::HasAirBrakes(int32 model) const
bool
cAudioManager::ProcessEngineDamage(cVehicleParams *params)
{
- const int engineDamageIntensity = 40;
+ const float SOUND_INTENSITY = 40.0f;
- CAutomobile *veh;
- uint8 engineStatus;
+ float health;
uint8 emittingVolume;
- if (params->m_fDistance >= SQR(engineDamageIntensity))
+ if (params->m_fDistance >= SQR(SOUND_INTENSITY))
return false;
- veh = (CAutomobile *)params->m_pVehicle;
- if (veh->bEngineOn) {
- engineStatus = veh->Damage.GetEngineStatus();
- if (engineStatus > 250 || engineStatus < 100)
- return true;
- if (engineStatus < 225) {
- m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
- emittingVolume = 6;
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
- m_sQueueSample.m_nFrequency = 40000;
- } else {
+ if (params->m_pVehicle->m_modelIndex == MI_CADDY)
+ return true;
+ if (params->m_pVehicle->GetStatus() == STATUS_WRECKED)
+ return true;
+ health = params->m_pVehicle->m_fHealth;
+ if (health < 390.0f) {
+ if (health < 250.0f) {
emittingVolume = 60;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
m_sQueueSample.m_nReleasingVolumeModificator = 7;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
+ } else {
+ emittingVolume = 30;
+ m_sQueueSample.m_nSampleIndex = SFX_PALM_TREE_LO;
+ m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nFrequency = 27000;
}
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, engineDamageIntensity, m_sQueueSample.m_fDistance);
+ if (params->m_pVehicle->bIsDrowning)
+ emittingVolume /= 2;
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = 28;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
@@ -2297,7 +2311,7 @@ cAudioManager::ProcessEngineDamage(cVehicleParams *params)
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = engineDamageIntensity;
+ m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
m_sQueueSample.m_bReleasingSoundFlag = false;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
@@ -2311,32 +2325,48 @@ cAudioManager::ProcessEngineDamage(cVehicleParams *params)
bool
cAudioManager::ProcessCarBombTick(cVehicleParams *params)
{
- CAutomobile *automobile;
+ const float SOUND_INTENSITY = 40.0f;
+ const uint8 EMITTING_VOLUME = 60;
- if (params->m_fDistance >= SQR(40.f))
+ uint8 bombType;
+
+ if (params->m_fDistance >= SQR(SOUND_INTENSITY))
return false;
- automobile = (CAutomobile *)params->m_pVehicle;
- if (automobile->bEngineOn && automobile->m_bombType == CARBOMB_TIMEDACTIVE) {
- CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
- m_sQueueSample.m_nVolume = ComputeVolume(60, 40.f, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
- m_sQueueSample.m_nCounter = 35;
- m_sQueueSample.m_nSampleIndex = SFX_COUNTDOWN;
- m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
- m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COUNTDOWN);
- m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 60;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = 40.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
- AddSampleToRequestedQueue();
+ if (params->m_pVehicle->bEngineOn) {
+ switch (params->m_VehicleType) {
+ case VEHICLE_TYPE_CAR:
+ bombType = params->m_pVehicle->m_bombType;
+ break;
+ case VEHICLE_TYPE_BIKE:
+ bombType = params->m_pVehicle->m_bombType;
+ break;
+ default:
+ debug("\n * AUDIOLOG: ProcessCarBombTick() Unsupported vehicle type %d * \n", params->m_VehicleType);
+ return true;
+ break;
+ }
+ if (bombType == CARBOMB_TIMEDACTIVE) {
+ CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(EMITTING_VOLUME, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nCounter = 35;
+ m_sQueueSample.m_nSampleIndex = SFX_COUNTDOWN;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COUNTDOWN);
+ m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME;
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
+ m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
+ AddSampleToRequestedQueue();
+ }
}
}
return true;
@@ -2353,11 +2383,6 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
float maxDist;
cPedParams pedParams;
- static uint8 WaveIndex = 41;
- static uint8 GunIndex = 53;
- static uint8 iWheelIndex = 82;
- static uint8 CrunchOffset = 0;
-
for (int i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
noReflections = 0;
m_sQueueSample.m_bRequireReflection = false;
@@ -2373,17 +2398,17 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[2] % 5 + 122;
switch (aVehicleSettings[params->m_nIndex].m_bDoorType) {
- case DOOR_TYPE_OLD:
+ case OLD_DOOR:
m_sQueueSample.m_nSampleIndex = SFX_OLD_CAR_DOOR_CLOSE;
break;
- case DOOR_TYPE_NEW:
+ case NEW_DOOR:
default:
m_sQueueSample.m_nSampleIndex = SFX_NEW_CAR_DOOR_CLOSE;
break;
- case DOOR_TYPE_TRUCK:
+ case TRUCK_DOOR:
m_sQueueSample.m_nSampleIndex = SFX_TRUCK_DOOR_CLOSE;
break;
- case DOOR_TYPE_AIRBREAK:
+ case BUS_DOOR:
m_sQueueSample.m_nSampleIndex = SFX_AIR_BRAKES;
break;
}
@@ -2407,17 +2432,17 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[1] % 10 + 117;
switch (aVehicleSettings[params->m_nIndex].m_bDoorType) {
- case DOOR_TYPE_OLD:
+ case OLD_DOOR:
m_sQueueSample.m_nSampleIndex = SFX_OLD_CAR_DOOR_OPEN;
break;
- case DOOR_TYPE_NEW:
+ case NEW_DOOR:
default:
m_sQueueSample.m_nSampleIndex = SFX_NEW_CAR_DOOR_OPEN;
break;
- case DOOR_TYPE_TRUCK:
+ case TRUCK_DOOR:
m_sQueueSample.m_nSampleIndex = SFX_TRUCK_DOOR_OPEN;
break;
- case DOOR_TYPE_AIRBREAK:
+ case BUS_DOOR:
m_sQueueSample.m_nSampleIndex = SFX_AIR_BRAKES;
break;
}
@@ -2445,13 +2470,14 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
} break;
case SOUND_CAR_JUMP: {
const float SOUND_INTENSITY = 35.0f;
+ static uint8 WheelIndex = 82;
emittingVol = Max(80.f, 2 * (100.f * m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i]));
maxDist = SQR(SOUND_INTENSITY);
m_sQueueSample.m_nSampleIndex = SFX_TYRE_BUMP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_nCounter = iWheelIndex++;
- if (iWheelIndex > 85)
- iWheelIndex = 82;
+ m_sQueueSample.m_nCounter = WheelIndex++;
+ if (WheelIndex > 85)
+ WheelIndex = 82;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TYRE_BUMP);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
if (params->m_nIndex == RCBANDIT) {
@@ -2540,6 +2566,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
}
case SOUND_CAR_SPLASH: {
const float SOUND_INTENSITY = 40.0f;
+ static uint8 WaveIndex = 41;
vol = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
if (vol <= 300.f)
continue;
@@ -2631,8 +2658,28 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
emittingVol = m_anRandomTable[4] % 25 + 75;
break;
}
+ case SOUND_31:{
+ const float SOUND_INTENSITY = 35.0f;
+ static uint8 HeliIndex = 0;
+ relVol = ((CAutomobile*)params->m_pVehicle)->m_aWheelSpeed[1] * 50.0f / 11.0f;
+ if (relVol < 0.2f || relVol == 1.0f)
+ continue;
+ emittingVol = (1.0f - relVol) * 70.0f;
+ maxDist = SQR(SOUND_INTENSITY);
+ m_sQueueSample.m_nSampleIndex = SFX_CAR_HELI_ROT;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_nCounter = HeliIndex + 89;
+ HeliIndex = HeliIndex != 1 ? HeliIndex + 1 : 0; //maybe better use 1 and 0, to avoid extreme values
+ m_sQueueSample.m_nFrequency = (8000.0f * relVol) + 16000;
+ m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
+ m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ break;
+ }
case SOUND_WEAPON_SHOT_FIRED: {
const float SOUND_INTENSITY = 120.0f;
+ static uint8 GunIndex = 53;
emittingVol = m_anRandomTable[2];
maxDist = SQR(SOUND_INTENSITY);
m_sQueueSample.m_nSampleIndex = SFX_UZI_LEFT;
@@ -2711,6 +2758,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
}
case SOUND_SPLATTER: {
const float SOUND_INTENSITY = 40.0f;
+ static uint8 CrunchOffset = 0;
m_sQueueSample.m_nSampleIndex = CrunchOffset + SFX_PED_CRUNCH_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 48;
@@ -3016,52 +3064,404 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams *params)
return true;
}
-struct tHelicopterSampleData {
- float m_fMaxDistance;
- float m_fBaseDistance;
- uint8 m_bBaseVolume;
-};
-
-bool
-cAudioManager::ProcessHelicopter(cVehicleParams *params)
+void
+cAudioManager::ProcessCarHeli(cVehicleParams* params)
{
- CHeli *heli;
- float MaxDist;
- float dist;
- float baseDist;
- int32 emittingVol;
- static const tHelicopterSampleData gHeliSfxRanges[3] = {{400.f, 380.f, 100}, {100.f, 70.f, MAX_VOLUME}, {60.f, 30.f, MAX_VOLUME}};
+ const float SOUND_INTENSITY = 250.0f;
- if (SQR(gHeliSfxRanges[0].m_fMaxDistance) <= params->m_fDistance)
- return false;
+ CVehicle* playerVeh;
+ CVehicle* veh;
+ CAutomobile* automobile;
+ CBoat* boat;
+
+ uint8 emittingVol;
+ int16 brakeState;
+ int16 accelerateState;
+ uint32 freq;
+ float propellerSpeed;
+ float freqModifier; //may be relate to angle with horison
+ float cameraAngle;
+ bool distanceCalculatedOld;
+ float distanceOld;
+ CVector vecPosOld;
+
+ float volumeModifier;//TODO find better name
+ bool hunterBool;
+
+ static uint32 freqFrontPrev = 14287;
+ static uint32 freqPropellerPrev = 7143;
+ static uint32 freqSkimmerPrev = 14287;
+
+ boat = nil;
+ automobile = nil;
+ hunterBool = false;
+
+ if (params->m_fDistance >= SQR(SOUND_INTENSITY))
+ return;
+ playerVeh = FindPlayerVehicle();
+ veh = params->m_pVehicle;
+ if (playerVeh == veh) {
+ accelerateState = Pads[0].GetAccelerate();
+ brakeState = Pads[0].GetBrake();
+ } else {
+ accelerateState = veh->m_fGasPedal * 255.0f;
+ brakeState = veh->m_fBrakePedal * 255.0f;
+ }
+ freqModifier = Abs(veh->GetUp().y);
+ cameraAngle = (DotProduct(veh->m_matrix.GetForward(), TheCamera.GetForward()) + 1.0f) / 2.0f;
+ if (veh->m_modelIndex == MI_SKIMMER) {
+ boat = (CBoat*)veh;
+ propellerSpeed = boat->m_fMovingSpeed * 50.0f / 11.0f;
+ } else if (params->m_VehicleType == VEHICLE_TYPE_HELI) {
+ propellerSpeed = 1.0f;
+ } else {
+ automobile = (CAutomobile*)veh;
+ propellerSpeed = automobile->m_aWheelSpeed[1] * 50.0f / 11.0f;
+ }
+
+ if (propellerSpeed == 0.0f)
+ return;
+
+ propellerSpeed = Min(1.0f, propellerSpeed);
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
- heli = (CHeli *)params->m_pVehicle;
- for (uint32 i = 0; i < ARRAY_SIZE(gHeliSfxRanges); i++) {
- MaxDist = gHeliSfxRanges[i].m_fMaxDistance;
- dist = m_sQueueSample.m_fDistance;
- if (dist >= MaxDist)
- return true;
- baseDist = gHeliSfxRanges[i].m_fBaseDistance;
- if (dist < baseDist)
- emittingVol = (gHeliSfxRanges[i].m_bBaseVolume * ((MaxDist - dist) / (MaxDist - baseDist)));
- else
- emittingVol = gHeliSfxRanges[i].m_bBaseVolume;
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, gHeliSfxRanges[i].m_fMaxDistance, m_sQueueSample.m_fDistance);
+
+ //sound on long distances
+ if (m_sQueueSample.m_fDistance >= 40.0f)
+ emittingVol = propellerSpeed * 75.0f;
+ else if (m_sQueueSample.m_fDistance >= 25.0f)
+ emittingVol = (m_sQueueSample.m_fDistance - 25.0f) * (75.0f * propellerSpeed) / 15.0f;
+ else
+ emittingVol = 0;
+ if (emittingVol != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) {
- m_sQueueSample.m_nCounter = i + 65;
- m_sQueueSample.m_nSampleIndex = i + SFX_HELI_1;
+ m_sQueueSample.m_nCounter = 88;
+ if (boat != nil) {
+ m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_PRO3;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ if (accelerateState > 0 || brakeState > 0)
+ m_sQueueSample.m_nFrequency = 4600 + Min(1.0f, (Max(accelerateState, brakeState) / 255.0f) * freqModifier) * 563;
+ else
+ m_sQueueSample.m_nFrequency = 3651 + Min(1.0f, freqModifier) * 949;
+ } else {
+ m_sQueueSample.m_nSampleIndex = SFX_HELI_1;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
+ }
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_nEmittingVolume = emittingVol;
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
+ m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
+ AddSampleToRequestedQueue();
+ }
+ }
+
+ if (params->m_fDistance >= SQR(140.0f))
+ return;
+
+ if (propellerSpeed >= 0.4f)
+ volumeModifier = (propellerSpeed - 0.4f) * 5.0f / 3.0f;
+ else
+ volumeModifier = 0.0f;
+ if (!boat) {
+ freq = Min(1300, 7000.0f * freqModifier);
+ if (playerVeh == veh && (accelerateState > 0 || brakeState > 0) && freq < 1300)//unnesesary freqModifier alredy <= 1300
+ freq = 1300;
+ if (veh->m_modelIndex == MI_HUNTER)
+ hunterBool = true;
+ }
+
+
+ //sound from front of helicopter
+ emittingVol = (1.0f - cameraAngle) * volumeModifier * 127.0f;
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, 140.0f, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nCounter = 3;
+ if (hunterBool) {
+ m_sQueueSample.m_nSampleIndex = SFX_HELI_APACHE_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_nFrequency = (volumeModifier + 1.0f) * 16000 + freq;
m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
- m_sQueueSample.m_nFrequency = 1200 * heli->m_nHeliId + SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_fSoundIntensity = gHeliSfxRanges[i].m_fMaxDistance;
+ m_sQueueSample.m_fSoundIntensity = 140.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
+ AddSampleToRequestedQueue();
+ } else if (boat != nil) {
+ m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_PRO1;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+
+ if (accelerateState > 0 || brakeState > 0)
+ m_sQueueSample.m_nFrequency = 18000 + Min(1.0f, freqModifier * (Max(accelerateState, brakeState) / 255.0f)) * 2204;
+ else
+ m_sQueueSample.m_nFrequency = 14287 + Min(1.0f, freqModifier) * 3713;
+ if (propellerSpeed < 1.0f)
+ m_sQueueSample.m_nFrequency = (propellerSpeed + 1.0f) * (m_sQueueSample.m_nFrequency / 2.0f);
+ m_sQueueSample.m_nFrequency = clamp2(m_sQueueSample.m_nFrequency, freqFrontPrev, 197);
+ freqFrontPrev = m_sQueueSample.m_nFrequency;
+
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_nEmittingVolume = emittingVol;
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
+ m_sQueueSample.m_fSoundIntensity = 140.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
+ AddSampleToRequestedQueue();
+ } else {
+ m_sQueueSample.m_nSampleIndex = SFX_CAR_HELI_MAI;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_nFrequency = (volumeModifier + 1) * 16000 + freq;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_nEmittingVolume = emittingVol;
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
+ m_sQueueSample.m_fSoundIntensity = 140.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
+ AddSampleToRequestedQueue();
+ }
+ }
+
+
+ //after accel rotor sound
+ emittingVol = ((cameraAngle + 1.0f) * volumeModifier * 127.0f) / 2.0f;
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, 140.0, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nCounter = 1;
+ if (hunterBool) {
+ m_sQueueSample.m_nSampleIndex = SFX_HELI_APACHE_2;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_nFrequency = (volumeModifier + 1) * 16000 + freq;
+ } else if (boat) {
+ m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_PRO2;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+
+ if (accelerateState > 0 || brakeState > 0)
+ m_sQueueSample.m_nFrequency = 9000 + Min(1.0f, (Max(accelerateState, brakeState) / 255) * freqModifier) * 1102;
+ else
+ m_sQueueSample.m_nFrequency = 7143 + Min(1.0f, freqModifier) * 1857;
+
+ if (propellerSpeed < 1.0f)
+ m_sQueueSample.m_nFrequency = (propellerSpeed + 1) * (m_sQueueSample.m_nFrequency / 2);
+
+ m_sQueueSample.m_nFrequency = clamp2(m_sQueueSample.m_nFrequency, freqPropellerPrev, 98);
+ freqPropellerPrev = m_sQueueSample.m_nFrequency;
+ } else {
+ m_sQueueSample.m_nSampleIndex = SFX_CAR_HELI_MAI2;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_nFrequency = (volumeModifier + 1) * 16000 + freq;
+ }
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_nEmittingVolume = emittingVol;
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
+ m_sQueueSample.m_fSoundIntensity = 140.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
+ AddSampleToRequestedQueue();
+ }
+
+
+ //engine starting sound
+ if (boat == nil && params->m_VehicleType != VEHICLE_TYPE_HELI && m_sQueueSample.m_fDistance < 30.0f) { //strange way to check if automobile != nil
+ if (automobile->bEngineOn) {
+ if (propellerSpeed < 1.0f) {
+ emittingVol = (1.0f - propellerSpeed / 2.0f) * 70.0f;
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, 30.0, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume) {
+ if (hunterBool) {
+ m_sQueueSample.m_nSampleIndex = SFX_HELI_APACHE_4;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ freq = 3000.0f * propellerSpeed + 30000;
+ } else {
+ m_sQueueSample.m_nSampleIndex = SFX_CAR_HELI_STA;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ freq = 3000.0f * propellerSpeed + 6000;
+ }
+ m_sQueueSample.m_nFrequency = freq;
+ m_sQueueSample.m_nCounter = 12;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_nEmittingVolume = emittingVol;
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
+ m_sQueueSample.m_fSoundIntensity = 30.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nReleasingVolumeDivider = 30;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
+ AddSampleToRequestedQueue();
+ }
+ }
+ }
+ }
+
+
+ if (boat) {
+ if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FIXED && m_sQueueSample.m_fDistance < 20.0f && propellerSpeed > 0.0f) {
+ m_sQueueSample.m_nVolume = ComputeVolume(propellerSpeed * 100.0f, 20.0f, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume) {
+
+ if (accelerateState > 0 || brakeState > 0)
+ m_sQueueSample.m_nFrequency = 18000 + Min(1.0f, (Max(accelerateState, brakeState) / 255.0f) * freqModifier) * 2204;
+ else
+ m_sQueueSample.m_nFrequency = 14287 + Min(1.0f, freqModifier) * 3713;
+ if (propellerSpeed < 1.0)
+ m_sQueueSample.m_nFrequency = (propellerSpeed + 1) * (m_sQueueSample.m_nFrequency / 2.0f);
+ m_sQueueSample.m_nFrequency = clamp2(m_sQueueSample.m_nFrequency, freqSkimmerPrev, 197);
+ freqSkimmerPrev = m_sQueueSample.m_nFrequency;
+
+ m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_PRO4;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_nCounter = 12;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_nEmittingVolume = propellerSpeed * 100.0f;
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_SEAPLANE_PRO4);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_SEAPLANE_PRO4);
+ m_sQueueSample.m_fSpeedMultiplier = 5.0f;
+ m_sQueueSample.m_fSoundIntensity = 20.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nReleasingVolumeDivider = 7;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
+ AddSampleToRequestedQueue();
+ }
+ }
+ } else {
+ //vacuum cleaner sound
+ vecPosOld = m_sQueueSample.m_vecPos;
+ distanceCalculatedOld = params->m_bDistanceCalculated;
+ distanceOld = params->m_fDistance;
+
+ if (automobile != nil)
+ automobile->GetComponentWorldPosition(CAR_BOOT, m_sQueueSample.m_vecPos);
+ else if (params->m_VehicleType == VEHICLE_TYPE_HELI)
+ m_sQueueSample.m_vecPos = CVector(0.0f, -10.0f, 0.0f); //this is from android, but for real it's not used
+
+ params->m_bDistanceCalculated = false;
+ params->m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos);
+ if (params->m_fDistance < SQR(27.0f)) {
+ CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(volumeModifier * 25.0f, 27.0f, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume) {
+ m_sQueueSample.m_nCounter = 2;
+ m_sQueueSample.m_nSampleIndex = hunterBool ? SFX_HELI_APACHE_3 : SFX_CAR_HELI_REA;
+ m_sQueueSample.m_nBankIndex = 0;
+ m_sQueueSample.m_bIs2D = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nFrequency = (volumeModifier + 1.0f) * 16000;
+ m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_nEmittingVolume = volumeModifier * 25.0f;
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
+ m_sQueueSample.m_fSoundIntensity = 27.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
+ AddSampleToRequestedQueue();
+ }
+ }
+
+ m_sQueueSample.m_vecPos = vecPosOld;
+ params->m_bDistanceCalculated = distanceCalculatedOld;
+ params->m_fDistance = distanceOld;
+ }
+}
+
+void
+cAudioManager::ProcessVehicleFlatTyre(cVehicleParams* params)
+{
+ const float SOUND_INTENSITY = 60.0f;
+
+ CAutomobile* automobile;
+ CBike* bike;
+ bool wheelBurst;
+ uint8 emittingVol;
+
+ float modifier;
+
+ if (params->m_fDistance >= SQR(SOUND_INTENSITY))
+ return;
+
+ switch (params->m_VehicleType) {
+ case VEHICLE_TYPE_CAR:
+ automobile = (CAutomobile*)params->m_pVehicle;
+ wheelBurst = false;
+ for (int i = 0; i < 4; i++)
+ if (automobile->Damage.GetWheelStatus(i) == WHEEL_STATUS_BURST && automobile->m_aWheelTimer[i] > 0.0f)
+ wheelBurst = true;
+ if (!wheelBurst)
+ return;
+ break;
+ case VEHICLE_TYPE_BIKE:
+ bike = (CBike*)params->m_pVehicle;
+ wheelBurst = false;
+ for(int i = 0; i < 2; i++)
+ if (bike->m_wheelStatus[i] == WHEEL_STATUS_BURST && bike->m_aWheelTimer[i] > 0.0f)
+ wheelBurst = true;
+ if (!wheelBurst)
+ return;
+ break;
+ default:
+ return;
+ }
+ modifier = Min(1.0f, Abs(params->m_fVelocityChange) / (0.3f * params->m_pTransmission->fMaxVelocity));
+ if (modifier > 0.01f) { //mb can be replaced by (emittingVol > 1)
+ emittingVol = (100.0f * modifier);
+ CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume) {
+ m_sQueueSample.m_nCounter = 95;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nSampleIndex = SFX_TYRE_BURST_L;
+ m_sQueueSample.m_nFrequency = (5500.0f * modifier) + 8000;
+ m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_nEmittingVolume = emittingVol;
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_TYRE_BURST_L);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_TYRE_BURST_L);
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
+ m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
m_sQueueSample.m_bReleasingSoundFlag = false;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
@@ -3069,9 +3469,9 @@ cAudioManager::ProcessHelicopter(cVehicleParams *params)
AddSampleToRequestedQueue();
}
}
- return true;
}
+//TODO use it in ProcessVehicle
void
cAudioManager::ProcessPlane(cVehicleParams *params)
{
@@ -3246,7 +3646,7 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol)
}
bool
-cAudioManager::SetupJumboWhineSound(uint8 emittingVol, int32 freq)
+cAudioManager::SetupJumboWhineSound(uint8 emittingVol, uint32 freq)
{
const float SOUND_INTENSITY = 170.0f;
@@ -3278,7 +3678,7 @@ cAudioManager::SetupJumboWhineSound(uint8 emittingVol, int32 freq)
}
bool
-cAudioManager::SetupJumboEngineSound(uint8 vol, int32 freq)
+cAudioManager::SetupJumboEngineSound(uint8 vol, uint32 freq)
{
const float SOUND_INTENSITY = 180.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY)
@@ -4186,7 +4586,6 @@ cAudioManager::SetupPedComments(cPedParams *params, uint32 sound)
return;
break;
}
-
soundIntensity = 50.0f;
} else {
switch (sound) {
@@ -4558,6 +4957,91 @@ cAudioManager::ProcessWaterCannon(int32)
}
}
+//positon of arcade machines
+CVector aVecExtraSoundPosition[] = { {-1042.546f, 88.794f, 11.324f}, {-1004.476f, 181.697f, 11.324f} };
+
+void
+cAudioManager::ProcessExtraSounds()
+{
+ const float SOUND_INTENSITY = 18.0f;
+ const uint8 EMITTING_VOLUME = 50;
+
+ float distance;
+
+ for (int i = 0; i < ARRAY_SIZE(aVecExtraSoundPosition); i++) {
+ m_sQueueSample.m_vecPos = aVecExtraSoundPosition[i];
+ distance = GetDistanceSquared(m_sQueueSample.m_vecPos);
+ if (distance < SQR(SOUND_INTENSITY)) {
+ if (distance > 0.0f)
+ m_sQueueSample.m_fDistance = Sqrt(distance);
+ else
+ m_sQueueSample.m_fDistance = 0.0f;
+ m_sQueueSample.m_nVolume = ComputeVolume(EMITTING_VOLUME, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nCounter = i;
+ m_sQueueSample.m_nSampleIndex = SFX_ARCADE;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ARCADE);
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 4;
+ m_sQueueSample.m_fSpeedMultiplier = 3.0f;
+ m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME;
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_ARCADE);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_ARCADE);
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ AddSampleToRequestedQueue();
+ }
+ }
+ }
+}
+
+void
+cAudioManager::ProcessEscalators()
+{
+ const float SOUND_INTENSITY = 30.0f;
+ const uint8 EMITTING_VOLUME = 26;
+
+ float distance;
+
+ for (int i = 0; i < CEscalators::NumEscalators; i++) {
+ if (!CEscalators::GetEscalator(i).IsActive())
+ continue;
+ m_sQueueSample.m_vecPos = CEscalators::GetEscalator(i).GetPosition();
+ distance = GetDistanceSquared(m_sQueueSample.m_vecPos);
+ if (distance < SQR(SOUND_INTENSITY)) {
+ if (distance > 0.0f)
+ m_sQueueSample.m_fDistance = Sqrt(distance);
+ else
+ m_sQueueSample.m_fDistance = 0.0f;
+ m_sQueueSample.m_nVolume = ComputeVolume(EMITTING_VOLUME, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nSampleIndex = SFX_BOAT_V12_LOOP;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_nFrequency = i * 50 % 250 + 3973;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 3.0f;
+ m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_nCounter = i;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME;
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_BOAT_V12_LOOP);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_BOAT_V12_LOOP);
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bRequireReflection = false;
+ AddSampleToRequestedQueue();
+ }
+ }
+ }
+}
+
#pragma region SCRIPT_OBJECTS
const int SCRIPT_OBJECT_INTENSITY_S = 30;
const int SCRIPT_OBJECT_INTENSITY_L = 80;
@@ -4565,13 +5049,15 @@ const int SCRIPT_OBJECT_INTENSITY_L = 80;
void
cAudioManager::ProcessScriptObject(int32 id)
{
- cAudioScriptObject *entity = (cAudioScriptObject *)m_asAudioEntities[id].m_pEntity;
- if (entity != nil) {
- m_sQueueSample.m_vecPos = entity->Posn;
- if (m_asAudioEntities[id].m_AudioEvents == 1)
- ProcessOneShotScriptObject(m_asAudioEntities[id].m_awAudioEvent[0]);
- else
- ProcessLoopingScriptObject(entity->AudioId);
+ if (MusicManager.m_nMusicMode == MUSICMODE_GAME) {
+ cAudioScriptObject* entity = (cAudioScriptObject*)m_asAudioEntities[id].m_pEntity;
+ if (entity != nil) {
+ m_sQueueSample.m_vecPos = entity->Posn;
+ if (m_asAudioEntities[id].m_AudioEvents == 1)
+ ProcessOneShotScriptObject(m_asAudioEntities[id].m_awAudioEvent[0]);
+ else
+ ProcessLoopingScriptObject(entity->AudioId);
+ }
}
}
@@ -4959,14 +5445,19 @@ void
cAudioManager::ProcessWeather(int32 id)
{
uint8 vol;
+ float x;
+ float y;
+ float modifier;
+ float wind;
+
static uint8 iSound = 0;
- if (m_asAudioEntities[id].m_AudioEvents && m_asAudioEntities[id].m_awAudioEvent[0] == SOUND_LIGHTNING) {
+ if (m_asAudioEntities[id].m_AudioEvents != 0 && m_asAudioEntities[id].m_awAudioEvent[0] == SOUND_LIGHTNING) {
if (m_asAudioEntities[id].m_afVolume[0] >= 10.f) {
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_GENERIC_EXTRA;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 4000;
- vol = (m_asAudioEntities[id].m_afVolume[0] - 10.f) + 40;
+ vol = (m_asAudioEntities[id].m_afVolume[0] - 10.0f) + 40;
} else {
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
@@ -4974,7 +5465,7 @@ cAudioManager::ProcessWeather(int32 id)
vol = (m_asAudioEntities[id].m_afVolume[0]) + 35;
}
m_sQueueSample.m_nVolume = vol;
- if (TheCamera.SoundDistUp < 20.f)
+ if (TheCamera.SoundDistUp < 20.0f)
m_sQueueSample.m_nVolume /= 2;
if (iSound == 4)
iSound = 0;
@@ -4994,7 +5485,7 @@ cAudioManager::ProcessWeather(int32 id)
if (CWeather::Rain > 0.0f && (!CCullZones::CamNoRain() || !CCullZones::PlayerNoRain())) {
m_sQueueSample.m_nSampleIndex = SFX_RAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAIN);
- m_sQueueSample.m_nVolume = (int32)(25.f * CWeather::Rain);
+ m_sQueueSample.m_nVolume = (uint8)(25.0f * CWeather::Rain);
m_sQueueSample.m_nCounter = 4;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
@@ -5010,6 +5501,32 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
+ x = 0.0f;
+ y = 0.0f;
+ CWindModifiers::FindWindModifier(TheCamera.GetPosition(), &x, &y);
+ modifier = Max(Abs(x), Abs(y)) * 10.0f;
+ modifier = Min(1.0f, modifier);
+ wind = Max(CWeather::Wind, modifier);
+ if (wind > 0.0f && CObject::fDistToNearestTree < 75.0) {
+ m_sQueueSample.m_nSampleIndex = SFX_PALM_TREE_LO;
+ m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PALM_TREE_LO);
+ m_sQueueSample.m_nVolume = (m_anRandomTable[1] % 10 + 45.0f) * (75.0f - CObject::fDistToNearestTree) * (4.0f / 300.0f) * wind;
+ m_sQueueSample.m_nCounter = 5;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nOffset = 63;
+ m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nReleasingVolumeDivider = 7;
+ m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_bRequireReflection = false;
+ AddSampleToRequestedQueue();
+ CObject::fDistToNearestTree = 999999.9f;
+ }
}
void
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index c0a70e31..f230731b 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -811,7 +811,11 @@ cAudioManager::ProcessActiveQueues()
if (sample.m_nFrequency != m_asActiveSamples[j].m_nFrequency) {
int32 freq;
if (sample.m_nFrequency <= m_asActiveSamples[j].m_nFrequency) {
- freq = Max(sample.m_nFrequency, m_asActiveSamples[j].m_nFrequency - 6000);
+#ifdef FIX_BUGS
+ freq = Max((int32)sample.m_nFrequency, (int32)m_asActiveSamples[j].m_nFrequency - 6000);
+#else
+ freq = Max((int32)sample.m_nFrequency, int32(m_asActiveSamples[j].m_nFrequency - 6000));
+#endif
} else {
freq = Min(sample.m_nFrequency, m_asActiveSamples[j].m_nFrequency + 6000);
}
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index a93aa6f7..0b9dd4f7 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -241,13 +241,13 @@ public:
// "Should" be in alphabetic order, except "getXTalkSfx"
void AddDetailsToRequestedOrderList(uint8 sample);
void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank,
- uint8 counter, bool notLooping);
+ uint8 counter, bool notLooping); //done
void AddReflectionsToRequestedQueue();
void AddReleasingSounds();
void AddSampleToRequestedQueue();
void AgeCrimes();
- void CalculateDistance(bool &condition, float dist);
+ void CalculateDistance(bool &condition, float dist); //done
bool CheckForAnAudioFileOnCD() const;
void ClearActiveSamples();
void ClearMissionAudio(uint8 slot);
@@ -275,7 +275,7 @@ public:
float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used
float GetCollisionOneShotRatio(int32 a, float b) const;
float GetCollisionRatio(float a, float b, float c, float d) const;
- float GetDistanceSquared(const CVector &v) const;
+ float GetDistanceSquared(const CVector &v) const; //done
int32 GetJumboTaxiFreq() const;
uint8 GetMissionAudioLoadingStatus(uint8 slot) const;
int8 GetMissionScriptPoliceAudioPlayingStatus() const;
@@ -287,7 +287,7 @@ public:
float GetVehicleNonDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile,
cTransmission *transmission, float velocityChange);
- bool HasAirBrakes(int32 model) const;
+ bool HasAirBrakes(int32 model) const; //done
void Initialise();
void InitialisePoliceRadio();
@@ -302,13 +302,13 @@ public:
void PlayLoadedMissionAudio(uint8 slot);
void PlayOneShot(int32 index, int16 sound, float vol);
void PlaySuspectLastSeen(float x, float y, float z);
- void PlayerJustGotInCar() const;
- void PlayerJustLeftCar() const;
+ void PlayerJustGotInCar() const; //done
+ void PlayerJustLeftCar() const; //done
void PostInitialiseGameSpecificSetup();
- void PostTerminateGameSpecificShutdown();
- void PreInitialiseGameSpecificSetup() const;
+ void PostTerminateGameSpecificShutdown(); //done
+ void PreInitialiseGameSpecificSetup() const; //done
void PreloadMissionAudio(uint8 slot, Const char *name);
- void PreTerminateGameSpecificShutdown();
+ void PreTerminateGameSpecificShutdown(); //done
/// processX - main logic of adding new sounds
void ProcessActiveQueues();
bool ProcessAirBrakes(cVehicleParams *params);
@@ -320,17 +320,18 @@ public:
void ProcessBridgeOneShots();
void ProcessBridgeWarning();
#endif
- bool ProcessCarBombTick(cVehicleParams *params);
+ bool ProcessCarBombTick(cVehicleParams *params); //done
void ProcessCesna(cVehicleParams *params);
//void ProcessCrane();
- bool ProcessEngineDamage(cVehicleParams *params);
- void ProcessEntity(int32 sound);
+ bool ProcessEngineDamage(cVehicleParams *params); //done
+ void ProcessEntity(int32 sound); //done
void ProcessExplosions(int32 explosion);
void ProcessFireHydrant();
void ProcessFires(int32 entity);
void ProcessFrontEnd();
void ProcessGarages();
- bool ProcessHelicopter(cVehicleParams *params);
+ void ProcessCarHeli(cVehicleParams* params); //done
+ void ProcessVehicleFlatTyre(cVehicleParams* params); //done
void ProcessJumbo(cVehicleParams *);
void ProcessJumboAccel(CPlane *plane);
void ProcessJumboDecel(CPlane *plane);
@@ -345,22 +346,22 @@ public:
void ProcessOneShotScriptObject(uint8 sound);
void ProcessPed(CPhysical *ped);
void ProcessPedOneShots(cPedParams *params);
- void ProcessPhysical(int32 id);
- void ProcessPlane(cVehicleParams *params);
- void ProcessPlayersVehicleEngine(cVehicleParams *params, CVehicle* veh);
+ void ProcessPhysical(int32 id); //done
+ void ProcessPlane(cVehicleParams *params); //done
+ void ProcessPlayersVehicleEngine(cVehicleParams *params, CVehicle* veh); //done
void ProcessProjectiles();
void ProcessRainOnVehicle(cVehicleParams *params);
void ProcessReverb() const;
- bool ProcessReverseGear(cVehicleParams *params);
- void ProcessScriptObject(int32 id);
+ bool ProcessReverseGear(cVehicleParams *params); //done
+ void ProcessScriptObject(int32 id); //done
void ProcessSpecial();
#ifdef GTA_TRAIN
bool ProcessTrainNoise(cVehicleParams *params);
#endif
- void ProcessVehicle(CVehicle *vehicle);
- bool ProcessVehicleDoors(cVehicleParams *params);
- void ProcessVehicleEngine(cVehicleParams *params);
- void UpdateGasPedalAudio(CVehicle* veh, int vehType);
+ void ProcessVehicle(CVehicle *vehicle); //done, but need add model functions
+ bool ProcessVehicleDoors(cVehicleParams *params); //done
+ void ProcessVehicleEngine(cVehicleParams *params); //done
+ void UpdateGasPedalAudio(CVehicle* veh, int vehType); //done
void ProcessVehicleHorn(cVehicleParams *params);
void ProcessVehicleOneShots(cVehicleParams *params);
bool ProcessVehicleReverseWarning(cVehicleParams *params);
@@ -368,8 +369,10 @@ public:
bool ProcessVehicleSirenOrAlarm(cVehicleParams *params);
bool ProcessVehicleSkidding(cVehicleParams *params);
void ProcessWaterCannon(int32);
- void ProcessWeather(int32 id);
+ void ProcessWeather(int32 id); //done
bool ProcessWetRoadNoise(cVehicleParams *params);
+ void ProcessEscalators(); //done
+ void ProcessExtraSounds(); //done
int32 RandomDisplacement(uint32 seed) const;
void ReacquireDigitalHandle() const;
@@ -402,11 +405,11 @@ public:
void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter);
void SetUpOneShotCollisionSound(const cAudioCollision &col);
bool SetupCrimeReport();
- bool SetupJumboEngineSound(uint8 vol, int32 freq);
+ bool SetupJumboEngineSound(uint8 vol, uint32 freq);
bool SetupJumboFlySound(uint8 emittingVol);
bool SetupJumboRumbleSound(uint8 emittingVol);
bool SetupJumboTaxiSound(uint8 vol);
- bool SetupJumboWhineSound(uint8 emittingVol, int32 freq);
+ bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq);
void SetupPedComments(cPedParams *params, uint32 sound);
void SetupSuspectLastSeenReport();
@@ -414,11 +417,11 @@ public:
void TranslateEntity(Const CVector *v1, CVector *v2) const;
void UpdateReflections();
- bool UsesReverseWarning(int32 model) const;
+ bool UsesReverseWarning(int32 model) const; //done
bool UsesSiren(int32 model) const;
bool UsesSirenSwitching(int32 model) const;
- CVehicle *FindVehicleOfPlayer();
+ CVehicle *FindVehicleOfPlayer(); //done
void SetPedTalkingStatus(CPed *ped, uint8 status);
void SetPlayersMood(uint8 mood, int32 time);
diff --git a/src/audio/sampman_null.cpp b/src/audio/sampman_null.cpp
index 7aab0d09..e9a9eaa1 100644
--- a/src/audio/sampman_null.cpp
+++ b/src/audio/sampman_null.cpp
@@ -6,7 +6,7 @@
cSampleManager SampleManager;
bool _bSampmanInitialised = false;
-uint32 BankStartOffset[MAX_SAMPLEBANKS];
+uint32 BankStartOffset[MAX_SFX_BANKS];
uint32 nNumMP3s;
cSampleManager::cSampleManager(void)
@@ -136,20 +136,20 @@ cSampleManager::SetMonoMode(uint8 nMode)
bool
cSampleManager::LoadSampleBank(uint8 nBank)
{
- ASSERT( nBank < MAX_SAMPLEBANKS );
+ ASSERT( nBank < MAX_SFX_BANKS );
return false;
}
void
cSampleManager::UnloadSampleBank(uint8 nBank)
{
- ASSERT( nBank < MAX_SAMPLEBANKS );
+ ASSERT( nBank < MAX_SFX_BANKS );
}
bool
cSampleManager::IsSampleBankLoaded(uint8 nBank)
{
- ASSERT( nBank < MAX_SAMPLEBANKS );
+ ASSERT( nBank < MAX_SFX_BANKS );
return false;
}
@@ -179,7 +179,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
int32
cSampleManager::GetBankContainingSound(uint32 offset)
{
- return SAMPLEBANK_INVALID;
+ return INVALID_SFX_BANK;
}
int32
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 9aba431c..290bacad 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -1819,7 +1819,13 @@ CVehicle* CStoredCar::RestoreCar()
#ifdef FIX_BUGS
if (pVehicle->IsCar())
#endif
+ {
((CAutomobile*)pVehicle)->m_bombType = m_nCarBombType;
+#ifdef FIX_BUGS
+ if (m_nCarBombType != CARBOMB_NONE)
+ ((CAutomobile*)pVehicle)->m_pBombRigger = FindPlayerPed();
+#endif
+ }
pVehicle->bHasBeenOwnedByPlayer = true;
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
pVehicle->bBulletProof = m_bBulletproof;
diff --git a/src/control/Garages.h b/src/control/Garages.h
index 79905ede..43f40261 100644
--- a/src/control/Garages.h
+++ b/src/control/Garages.h
@@ -300,5 +300,6 @@ private:
static bool IsThisGarageTypeSafehouse(eGarageType type) { return FindSafeHouseIndexForGarageType(type) >= 0; }
friend class cAudioManager;
+ friend class CReplay;
friend class CGarage;
};
diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp
index f8bc2df6..81d87b05 100644
--- a/src/control/PathFind.cpp
+++ b/src/control/PathFind.cpp
@@ -1869,6 +1869,13 @@ CPathFind::TakeWidthIntoAccountForWandering(CPathNode* nextNode, uint16 random)
return CVector(newX, newY, pos.z);
}
+void
+CPathFind::TakeWidthIntoAccountForCoors(CPathNode* node1, CPathNode* node2, uint16 random, float* x, float* y)
+{
+ *x += (Min(node1->width, node2->width) * ((random % 16) - 7));
+ *y += (Min(node1->width, node2->width) * (((random / 16) % 16) - 7));
+}
+
CPathNode*
CPathFind::GetNode(int16 index)
{
diff --git a/src/control/PathFind.h b/src/control/PathFind.h
index 2896237a..013d9d31 100644
--- a/src/control/PathFind.h
+++ b/src/control/PathFind.h
@@ -255,6 +255,7 @@ public:
void Load(uint8 *buf, uint32 size);
static CVector TakeWidthIntoAccountForWandering(CPathNode*, uint16);
+ static void TakeWidthIntoAccountForCoors(CPathNode*, CPathNode*, uint16, float*, float*);
CPathNode *GetNode(int16 index);
int16 GetIndex(CPathNode *node);
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index 80c05f31..45f1a143 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -1,15 +1,22 @@
#include "common.h"
+#include "AnimBlendAssocGroup.h"
#include "AnimBlendAssociation.h"
+#include "Bike.h"
#include "Boat.h"
#include "SpecialFX.h"
#include "CarCtrl.h"
#include "CivilianPed.h"
+#include "CopPed.h"
#include "Wanted.h"
#include "Clock.h"
#include "DMAudio.h"
#include "Draw.h"
+#include "Explosion.h"
#include "FileMgr.h"
+#include "Fire.h"
+#include "Frontend.h"
+#include "Garages.h"
#include "Heli.h"
#include "main.h"
#include "Matrix.h"
@@ -17,12 +24,15 @@
#include "ModelInfo.h"
#include "Object.h"
#include "Pad.h"
+#include "Particle.h"
#include "PedAttractor.h"
#include "Phones.h"
#include "Pickups.h"
#include "Plane.h"
#include "Pools.h"
#include "Population.h"
+#include "Projectile.h"
+#include "ProjectileInfo.h"
#include "Replay.h"
#include "References.h"
#include "Pools.h"
@@ -30,6 +40,7 @@
#include "RwHelper.h"
#include "CutsceneMgr.h"
#include "Skidmarks.h"
+#include "Stinger.h"
#include "Streaming.h"
#include "Timer.h"
#include "Train.h"
@@ -103,6 +114,31 @@ bool CReplay::bPlayerInRCBuggy;
float CReplay::fDistanceLookAroundCam;
float CReplay::fBetaAngleLookAroundCam;
float CReplay::fAlphaAngleLookAroundCam;
+int CReplay::ms_nNumCivMale_Stored;
+int CReplay::ms_nNumCivFemale_Stored;
+int CReplay::ms_nNumCop_Stored;
+int CReplay::ms_nNumEmergency_Stored;
+int CReplay::ms_nNumGang1_Stored;
+int CReplay::ms_nNumGang2_Stored;
+int CReplay::ms_nNumGang3_Stored;
+int CReplay::ms_nNumGang4_Stored;
+int CReplay::ms_nNumGang5_Stored;
+int CReplay::ms_nNumGang6_Stored;
+int CReplay::ms_nNumGang7_Stored;
+int CReplay::ms_nNumGang8_Stored;
+int CReplay::ms_nNumGang9_Stored;
+int CReplay::ms_nNumDummy_Stored;
+int CReplay::ms_nTotalCarPassengerPeds_Stored;
+int CReplay::ms_nTotalCivPeds_Stored;
+int CReplay::ms_nTotalGangPeds_Stored;
+int CReplay::ms_nTotalPeds_Stored;
+int CReplay::ms_nTotalMissionPeds_Stored;
+uint8* CReplay::pGarages;
+CFire* CReplay::FireArray;
+uint32 CReplay::NumOfFires;
+uint8* CReplay::paProjectileInfo;
+uint8* CReplay::paProjectiles;
+uint8 CReplay::CurrArea;
#ifdef FIX_BUGS
int CReplay::nHandleOfPlayerPed[NUMPLAYERS];
#endif
@@ -119,9 +155,11 @@ static void(*CBArray[])(CAnimBlendAssociation*, void*) =
&CPed::FinishedAttackCB,
&CPed::FinishFightMoveCB, &PhonePutDownCB, &PhonePickUpCB, &CPed::PedAnimDoorCloseRollingCB, &CPed::FinishJumpCB,
&CPed::PedLandCB, &CPed::RestoreHeadingRateCB, &CPed::PedSetQuickDraggedOutCarPositionCB, &CPed::PedSetDraggedOutCarPositionCB,
- &CPed::FinishedReloadCB, &StartTalkingOnMobileCB, &FinishTalkingOnMobileCB
+ &CPed::PedSetPreviousStateCB, &CPed::FinishedReloadCB, /*&CPed::PedSetGetInCarPositionCB, TODO(MIAMI)*/
+ &CPed::PedAnimShuffleCB, &CPed::DeleteSunbatheIdleAnimCB, &StartTalkingOnMobileCB, &FinishTalkingOnMobileCB
};
+// --MIAMI: Done
static uint8 FindCBFunctionID(void(*f)(CAnimBlendAssociation*, void*))
{
for (int i = 0; i < sizeof(CBArray) / sizeof(*CBArray); i++){
@@ -132,11 +170,13 @@ static uint8 FindCBFunctionID(void(*f)(CAnimBlendAssociation*, void*))
return 0;
}
+// --MIAMI: Done
static void(*FindCBFunction(uint8 id))(CAnimBlendAssociation*, void*)
{
return CBArray[id];
}
+// --MIAMI: Done
static void ApplyPanelDamageToCar(uint32 panels, CAutomobile* vehicle, bool flying)
{
if(vehicle->Damage.GetPanelStatus(VEHPANEL_FRONT_LEFT) != CDamageManager::GetPanelStatus(panels, VEHPANEL_FRONT_LEFT)){
@@ -169,6 +209,7 @@ static void ApplyPanelDamageToCar(uint32 panels, CAutomobile* vehicle, bool flyi
}
}
+// --MIAMI: Done
void PrintElementsInPtrList(void)
{
for (CPtrNode* node = CWorld::GetBigBuildingList(LEVEL_GENERIC).first; node; node = node->next) {
@@ -176,6 +217,7 @@ void PrintElementsInPtrList(void)
}
}
+// --MIAMI: Done
void CReplay::Init(void)
{
pBuf0 = nil;
@@ -215,23 +257,29 @@ void CReplay::Init(void)
SlowMotion = 1;
FramesActiveLookAroundCam = 0;
bDoLoadSceneWhenDone = false;
+ MarkEverythingAsNew();
}
+// --MIAMI: Done
void CReplay::DisableReplays(void)
{
bReplayEnabled = false;
}
+// --MIAMI: Done
void CReplay::EnableReplays(void)
{
bReplayEnabled = true;
}
void PlayReplayFromHD(void);
+// --MIAMI: Done
void CReplay::Update(void)
{
- if (CCutsceneMgr::IsCutsceneProcessing() || CTimer::GetIsPaused() || CScriptPaths::IsOneActive())
+ if (CCutsceneMgr::IsCutsceneProcessing() || CPad::GetPad(0)->ArePlayerControlsDisabled() || CScriptPaths::IsOneActive() || FrontEndMenuManager.GetIsMenuActive()) {
+ Init();
return;
+ }
switch (Mode){
case MODE_RECORD:
RecordThisFrame();
@@ -260,15 +308,19 @@ void CReplay::Update(void)
}
}
+// --MIAMI: Done except TODO
void CReplay::RecordThisFrame(void)
{
-#ifdef FIX_REPLAY_BUGS
- uint32 memory_required = sizeof(tGeneralPacket) + sizeof(tClockPacket) + sizeof(tWeatherPacket) + sizeof(tTimerPacket);
+ uint32 memory_required = sizeof(tGeneralPacket) + sizeof(tClockPacket) + sizeof(tWeatherPacket) + sizeof(tTimerPacket) + sizeof(tMiscPacket);
CVehiclePool* vehiclesT = CPools::GetVehiclePool();
for (int i = 0; i < vehiclesT->GetSize(); i++) {
CVehicle* v = vehiclesT->GetSlot(i);
- if (v && v->m_rwObject && v->GetModelIndex() != MI_AIRTRAIN && v->GetModelIndex() != MI_TRAIN)
- memory_required += sizeof(tVehicleUpdatePacket);
+ if (v && v->m_rwObject && v->GetModelIndex() != MI_AIRTRAIN && v->GetModelIndex() != MI_TRAIN) {
+ if (v->IsBike())
+ memory_required += sizeof(tBikeUpdatePacket);
+ else
+ memory_required += sizeof(tVehicleUpdatePacket);
+ }
}
CPedPool* pedsT = CPools::GetPedPool();
for (int i = 0; i < pedsT->GetSize(); i++) {
@@ -286,17 +338,8 @@ void CReplay::RecordThisFrame(void)
memory_required += sizeof(tBulletTracePacket);
}
memory_required += sizeof(tEndOfFramePacket) + 1; // 1 for Record.m_pBase[Record.m_nOffset] = REPLAYPACKET_END;
- if (Record.m_nOffset + memory_required > REPLAYBUFFERSIZE) {
- Record.m_pBase[Record.m_nOffset] = REPLAYPACKET_END;
- BufferStatus[Record.m_bSlot] = REPLAYBUFFER_PLAYBACK;
- Record.m_bSlot = (Record.m_bSlot + 1) % NUM_REPLAYBUFFERS;
- BufferStatus[Record.m_bSlot] = REPLAYBUFFER_RECORD;
- Record.m_pBase = Buffers[Record.m_bSlot];
- Record.m_nOffset = 0;
- *Record.m_pBase = REPLAYPACKET_END;
- MarkEverythingAsNew();
- }
-#endif
+ if (Record.m_nOffset + memory_required > REPLAYBUFFERSIZE - 16)
+ GoToNextBlock();
tGeneralPacket* general = (tGeneralPacket*)&Record.m_pBase[Record.m_nOffset];
general->type = REPLAYPACKET_GENERAL;
general->camera_pos.CopyOnlyMatrix(&TheCamera.GetMatrix());
@@ -321,8 +364,12 @@ void CReplay::RecordThisFrame(void)
CVehiclePool* vehicles = CPools::GetVehiclePool();
for (int i = 0; i < vehicles->GetSize(); i++){
CVehicle* v = vehicles->GetSlot(i);
- if (v && v->m_rwObject && v->GetModelIndex() != MI_AIRTRAIN && v->GetModelIndex() != MI_TRAIN)
- StoreCarUpdate(v, i);
+ if (v && v->m_rwObject && v->GetModelIndex() != MI_AIRTRAIN && v->GetModelIndex() != MI_TRAIN) {
+ if (v->IsBike())
+ StoreBikeUpdate(v, i);
+ else
+ StoreCarUpdate(v, i);
+ }
}
CPedPool* peds = CPools::GetPedPool();
for (int i = 0; i < peds->GetSize(); i++) {
@@ -352,17 +399,23 @@ void CReplay::RecordThisFrame(void)
bt->sup = CBulletTraces::aTraces[i].m_vecTargetPos;
Record.m_nOffset += sizeof(*bt);
}
+ tMiscPacket* misc = (tMiscPacket*)&Record.m_pBase[Record.m_nOffset];
+ misc->type = REPLAYPACKET_MISC;
+ misc->cam_shake_start = TheCamera.m_uiCamShakeStart;
+ misc->cam_shake_strength = TheCamera.m_fCamShakeForce;
+ misc->cur_area = CGame::currArea;
+ //misc->special_fx_flags; // TODO(MIAMI)!!!
+ Record.m_nOffset += sizeof(*misc);
tEndOfFramePacket* eof = (tEndOfFramePacket*)&Record.m_pBase[Record.m_nOffset];
eof->type = REPLAYPACKET_ENDOFFRAME;
Record.m_nOffset += sizeof(*eof);
Record.m_pBase[Record.m_nOffset] = REPLAYPACKET_END;
-#ifndef FIX_REPLAY_BUGS
- if (Record.m_nOffset <= REPLAYBUFFERSIZE - 3000){
- /* Unsafe assumption which can cause buffer overflow
- * if size of next frame exceeds 3000 bytes.
- * Most notably it causes various timecyc errors. */
- return;
- }
+}
+
+// --MIAMI: Done
+void CReplay::GoToNextBlock(void)
+{
+ Record.m_pBase[Record.m_nOffset] = REPLAYPACKET_END;
BufferStatus[Record.m_bSlot] = REPLAYBUFFER_PLAYBACK;
Record.m_bSlot = (Record.m_bSlot + 1) % NUM_REPLAYBUFFERS;
BufferStatus[Record.m_bSlot] = REPLAYBUFFER_RECORD;
@@ -370,9 +423,32 @@ void CReplay::RecordThisFrame(void)
Record.m_nOffset = 0;
*Record.m_pBase = REPLAYPACKET_END;
MarkEverythingAsNew();
-#endif
}
+// --MIAMI: Done
+void CReplay::RecordParticle(tParticleType type, const CVector& vecPos, const CVector& vecDir, float fSize, const RwRGBA& color)
+{
+ if (Record.m_nOffset > REPLAYBUFFERSIZE - 16 - sizeof(tParticlePacket))
+ GoToNextBlock();
+ tParticlePacket* pp = (tParticlePacket*)&Record.m_pBase[Record.m_nOffset];
+ pp->type = REPLAYPACKET_PARTICLE;
+ pp->particle_type = type;
+ pp->pos_x = 4.0f * vecPos.x;
+ pp->pos_y = 4.0f * vecPos.y;
+ pp->pos_z = 4.0f * vecPos.z;
+ pp->dir_x = 120.0f * clamp(vecDir.x, -1.0f, 1.0f);
+ pp->dir_y = 120.0f * clamp(vecDir.y, -1.0f, 1.0f);
+ pp->dir_z = 120.0f * clamp(vecDir.z, -1.0f, 1.0f);
+ pp->size = fSize;
+ pp->r = color.red;
+ pp->g = color.green;
+ pp->b = color.blue;
+ pp->a = color.alpha;
+ Record.m_nOffset += sizeof(tParticlePacket);
+ Record.m_pBase[Record.m_nOffset] = REPLAYPACKET_END;
+}
+
+// --MIAMI: Done
void CReplay::StorePedUpdate(CPed *ped, int id)
{
tPedUpdatePacket* pp = (tPedUpdatePacket*)&Record.m_pBase[Record.m_nOffset];
@@ -381,6 +457,7 @@ void CReplay::StorePedUpdate(CPed *ped, int id)
pp->heading = 128.0f / PI * ped->m_fRotationCur;
pp->matrix.CompressFromFullMatrix(ped->GetMatrix());
pp->assoc_group_id = ped->m_animGroup;
+ pp->is_visible = ped->bIsVisible;
/* Would be more sane to use GetJustIndex(ped->m_pMyVehicle) in following assignment */
if (ped->InVehicle())
pp->vehicle_index = (CPools::GetVehiclePool()->GetIndex(ped->m_pMyVehicle) >> 8) + 1;
@@ -391,6 +468,7 @@ void CReplay::StorePedUpdate(CPed *ped, int id)
Record.m_nOffset += sizeof(tPedUpdatePacket);
}
+// --MIAMI: Done
void CReplay::StorePedAnimation(CPed *ped, CStoredAnimationState *state)
{
CAnimBlendAssociation* second;
@@ -400,21 +478,25 @@ void CReplay::StorePedAnimation(CPed *ped, CStoredAnimationState *state)
state->animId = main->animId;
state->time = 255.0f / 4.0f * clamp(main->currentTime, 0.0f, 4.0f);
state->speed = 255.0f / 3.0f * clamp(main->speed, 0.0f, 3.0f);
+ state->groupId = main->groupId;
}else{
state->animId = 3;
state->time = 0;
state->speed = 85;
+ state->groupId = 0;
}
if (second) {
state->secAnimId = second->animId;
state->secTime = 255.0f / 4.0f * clamp(second->currentTime, 0.0f, 4.0f);
state->secSpeed = 255.0f / 3.0f * clamp(second->speed, 0.0f, 3.0f);
state->blendAmount = 255.0f / 2.0f * clamp(blend_amount, 0.0f, 2.0f);
+ state->secGroupId = second->groupId;
}else{
state->secAnimId = 0;
state->secTime = 0;
state->secSpeed = 0;
state->blendAmount = 0;
+ state->secGroupId = 0;
}
CAnimBlendAssociation* partial = RpAnimBlendClumpGetMainPartialAssociation((RpClump*)ped->m_rwObject);
if (partial) {
@@ -422,14 +504,17 @@ void CReplay::StorePedAnimation(CPed *ped, CStoredAnimationState *state)
state->partAnimTime = 255.0f / 4.0f * clamp(partial->currentTime, 0.0f, 4.0f);
state->partAnimSpeed = 255.0f / 3.0f * clamp(partial->speed, 0.0f, 3.0f);
state->partBlendAmount = 255.0f / 2.0f * clamp(partial->blendAmount, 0.0f, 2.0f);
+ state->partGroupId = partial->groupId;
}else{
state->partAnimId = 0;
state->partAnimTime = 0;
state->partAnimSpeed = 0;
state->partBlendAmount = 0;
+ state->partGroupId = 0;
}
}
+// --MIAMI: Done
void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState *state)
{
for (int i = 0; i < NUM_MAIN_ANIMS_IN_REPLAY; i++){
@@ -439,10 +524,9 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
state->aCurTime[i] = 255.0f / 4.0f * clamp(assoc->currentTime, 0.0f, 4.0f);
state->aSpeed[i] = 255.0f / 3.0f * clamp(assoc->speed, 0.0f, 3.0f);
state->aBlendAmount[i] = 255.0f / 2.0f * clamp(assoc->blendAmount, 0.0f, 2.0f);
-#ifdef FIX_REPLAY_BUGS
state->aBlendDelta[i] = 127.0f / 32.0f * clamp(assoc->blendDelta, -16.0f, 16.0f);
-#endif
state->aFlags[i] = assoc->flags;
+ state->aGroupId[i] = assoc->groupId;
if (assoc->callbackType == CAnimBlendAssociation::CB_FINISH || assoc->callbackType == CAnimBlendAssociation::CB_DELETE) {
state->aFunctionCallbackID[i] = FindCBFunctionID(assoc->callback);
if (assoc->callbackType == CAnimBlendAssociation::CB_FINISH)
@@ -456,6 +540,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
state->aSpeed[i] = 85;
state->aFunctionCallbackID[i] = 0;
state->aFlags[i] = 0;
+ state->aGroupId[i] = 0;
}
}
for (int i = 0; i < NUM_PARTIAL_ANIMS_IN_REPLAY; i++) {
@@ -465,10 +550,9 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
state->aCurTime2[i] = 255.0f / 4.0f * clamp(assoc->currentTime, 0.0f, 4.0f);
state->aSpeed2[i] = 255.0f / 3.0f * clamp(assoc->speed, 0.0f, 3.0f);
state->aBlendAmount2[i] = 255.0f / 2.0f * clamp(assoc->blendAmount, 0.0f, 2.0f);
-#ifdef FIX_REPLAY_BUGS
state->aBlendDelta2[i] = 127.0f / 16.0f * clamp(assoc->blendDelta, -16.0f, 16.0f);
-#endif
state->aFlags2[i] = assoc->flags;
+ state->aGroupId2[i] = assoc->groupId;
if (assoc->callbackType == CAnimBlendAssociation::CB_FINISH || assoc->callbackType == CAnimBlendAssociation::CB_DELETE) {
state->aFunctionCallbackID2[i] = FindCBFunctionID(assoc->callback);
if (assoc->callbackType == CAnimBlendAssociation::CB_FINISH)
@@ -483,10 +567,12 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
state->aSpeed2[i] = 85;
state->aFunctionCallbackID2[i] = 0;
state->aFlags2[i] = 0;
+ state->aGroupId2[i] = 0;
}
}
}
+// --MIAMI: Done
void CReplay::ProcessPedUpdate(CPed *ped, float interpolation, CAddressInReplayBuffer *buffer)
{
tPedUpdatePacket *pp = (tPedUpdatePacket*)&buffer->m_pBase[buffer->m_nOffset];
@@ -504,7 +590,7 @@ void CReplay::ProcessPedUpdate(CPed *ped, float interpolation, CAddressInReplayB
ped->GetMatrix() += CMatrix(interpolation) * ped_matrix;
if (pp->vehicle_index) {
ped->m_pMyVehicle = CPools::GetVehiclePool()->GetSlot(pp->vehicle_index - 1);
- ped->bInVehicle = pp->vehicle_index;
+ ped->bInVehicle = true;
}
else {
ped->m_pMyVehicle = nil;
@@ -515,6 +601,9 @@ void CReplay::ProcessPedUpdate(CPed *ped, float interpolation, CAddressInReplayB
if (ped == FindPlayerPed())
((CPlayerPed*)ped)->ReApplyMoveAnims();
}
+ ped->bIsVisible = pp->is_visible;
+ if (FramesActiveLookAroundCam && ped->m_nPedType == PEDTYPE_PLAYER1)
+ ped->bIsVisible = true;
RetrievePedAnimation(ped, &pp->anim_state);
ped->RemoveWeaponModel(-1);
if (pp->weapon_model != (uint16)-1) {
@@ -528,12 +617,25 @@ void CReplay::ProcessPedUpdate(CPed *ped, float interpolation, CAddressInReplayB
buffer->m_nOffset += sizeof(tPedUpdatePacket);
}
+// --MIAMI: Done
+bool HasAnimGroupLoaded(uint8 group)
+{
+ CAnimBlendAssocGroup* pGroup = &CAnimManager::GetAnimAssocGroups()[group];
+ return pGroup->animBlock && pGroup->animBlock->isLoaded;
+}
+
+// --MIAMI: Done
void CReplay::RetrievePedAnimation(CPed *ped, CStoredAnimationState *state)
{
- CAnimBlendAssociation* anim1 = CAnimManager::BlendAnimation(
- (RpClump*)ped->m_rwObject,
- (state->animId > 3) ? ASSOCGRP_STD : ped->m_animGroup,
- (AnimationId)state->animId, 100.0f);
+ CAnimBlendAssociation* anim1;
+ if (state->animId <= 3)
+ anim1 = CAnimManager::BlendAnimation(
+ (RpClump*)ped->m_rwObject, ped->m_animGroup, (AnimationId)state->animId, 100.0f);
+ else if (HasAnimGroupLoaded(state->groupId))
+ anim1 = CAnimManager::BlendAnimation((RpClump*)ped->m_rwObject, (AssocGroupId)state->groupId, (AnimationId)state->animId, 100.0f);
+ else
+ anim1 = CAnimManager::BlendAnimation((RpClump*)ped->m_rwObject, ASSOCGRP_STD, ANIM_WALK, 100.0f);
+
anim1->SetCurrentTime(state->time * 4.0f / 255.0f);
anim1->speed = state->speed * 3.0f / 255.0f;
anim1->SetBlend(1.0f, 1.0f);
@@ -544,7 +646,7 @@ void CReplay::RetrievePedAnimation(CPed *ped, CStoredAnimationState *state)
float blend = state->blendAmount * 2.0f / 255.0f;
CAnimBlendAssociation* anim2 = CAnimManager::BlendAnimation(
(RpClump*)ped->m_rwObject,
- (state->secAnimId > 3) ? ASSOCGRP_STD : ped->m_animGroup,
+ (state->secAnimId > 3) ? (AssocGroupId)state->secGroupId : ped->m_animGroup,
(AnimationId)state->secAnimId, 100.0f);
anim2->SetCurrentTime(time);
anim2->speed = speed;
@@ -556,9 +658,9 @@ void CReplay::RetrievePedAnimation(CPed *ped, CStoredAnimationState *state)
float time = state->partAnimTime * 4.0f / 255.0f;
float speed = state->partAnimSpeed * 3.0f / 255.0f;
float blend = state->partBlendAmount * 2.0f / 255.0f;
- if (blend > 0.0f && state->partAnimId != ANIM_IDLE_STANCE){
+ if (blend > 0.0f && state->partAnimId != ANIM_IDLE_STANCE && HasAnimGroupLoaded(state->partGroupId)){
CAnimBlendAssociation* anim3 = CAnimManager::BlendAnimation(
- (RpClump*)ped->m_rwObject, ASSOCGRP_STD, (AnimationId)state->partAnimId, 1000.0f);
+ (RpClump*)ped->m_rwObject, (AssocGroupId)state->partGroupId, (AnimationId)state->partAnimId, 1000.0f);
anim3->SetCurrentTime(time);
anim3->speed = speed;
anim3->SetBlend(blend, 0.0f);
@@ -566,35 +668,23 @@ void CReplay::RetrievePedAnimation(CPed *ped, CStoredAnimationState *state)
}
}
+// --MIAMI: Done
void CReplay::RetrieveDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState *state)
{
-#ifdef FIX_REPLAY_BUGS
CAnimBlendAssociation* assoc;
for (int i = 0; ((assoc = RpAnimBlendClumpGetMainAssociation_N(ped->GetClump(), i))); i++)
assoc->SetBlend(0.0f, -1.0f);
for (int i = 0; ((assoc = RpAnimBlendClumpGetMainPartialAssociation_N(ped->GetClump(), i))); i++)
assoc->SetBlend(0.0f, -1.0f);
-#endif
for (int i = 0; i < NUM_MAIN_ANIMS_IN_REPLAY; i++) {
if (state->aAnimId[i] == NUM_ANIMS)
continue;
-#ifdef FIX_REPLAY_BUGS
CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(),
- state->aAnimId[i] > 3 ? ASSOCGRP_STD : ped->m_animGroup,
+ state->aAnimId[i] > 3 ? (AssocGroupId)state->aGroupId[i] : ped->m_animGroup,
(AnimationId)state->aAnimId[i]);
-#else
- CAnimBlendAssociation* anim = CAnimManager::BlendAnimation(
- (RpClump*)ped->m_rwObject,
- state->aAnimId[i] > 3 ? ASSOCGRP_STD : ped->m_animGroup,
- (AnimationId)state->aAnimId[i], 100.0f);
-#endif
anim->SetCurrentTime(state->aCurTime[i] * 4.0f / 255.0f);
anim->speed = state->aSpeed[i] * 3.0f / 255.0f;
-#ifdef FIX_REPLAY_BUGS
anim->SetBlend(state->aBlendAmount[i] * 2.0f / 255.0f, state->aBlendDelta[i] * 16.0f / 127.0f);
-#else
- anim->SetBlend(state->aBlendAmount[i], 1.0f);
-#endif
anim->flags = state->aFlags[i];
uint8 callback = state->aFunctionCallbackID[i];
if (!callback)
@@ -607,23 +697,12 @@ void CReplay::RetrieveDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationSt
for (int i = 0; i < NUM_PARTIAL_ANIMS_IN_REPLAY; i++) {
if (state->aAnimId2[i] == NUM_ANIMS)
continue;
-#ifdef FIX_REPLAY_BUGS
CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(),
- state->aAnimId2[i] > 3 ? ASSOCGRP_STD : ped->m_animGroup,
+ state->aAnimId2[i] > 3 ? (AssocGroupId)state->aGroupId2[i] : ped->m_animGroup,
(AnimationId)state->aAnimId2[i]);
-#else
- CAnimBlendAssociation* anim = CAnimManager::BlendAnimation(
- (RpClump*)ped->m_rwObject,
- state->aAnimId2[i] > 3 ? ASSOCGRP_STD : ped->m_animGroup,
- (AnimationId)state->aAnimId2[i], 100.0f);
-#endif
anim->SetCurrentTime(state->aCurTime2[i] * 4.0f / 255.0f);
anim->speed = state->aSpeed2[i] * 3.0f / 255.0f;
-#ifdef FIX_REPLAY_BUGS
anim->SetBlend(state->aBlendAmount2[i] * 2.0f / 255.0f, state->aBlendDelta2[i] * 16.0f / 127.0f);
-#else
- anim->SetBlend(state->aBlendAmount2[i], 1.0f);
-#endif
anim->flags = state->aFlags2[i];
uint8 callback = state->aFunctionCallbackID2[i];
if (!callback)
@@ -635,6 +714,7 @@ void CReplay::RetrieveDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationSt
}
}
+// --MIAMI: Done
void CReplay::PlaybackThisFrame(void)
{
static int FrameSloMo = 0;
@@ -662,7 +742,7 @@ void CReplay::PlaybackThisFrame(void)
// next two functions are only found in mobile version
// most likely they were optimized out for being unused
-
+// --MIAMI: Done
void CReplay::TriggerPlaybackLastCoupleOfSeconds(uint32 start, uint8 cam_mode, float cam_x, float cam_y, float cam_z, uint32 slomo)
{
if (Mode != MODE_RECORD)
@@ -674,6 +754,7 @@ void CReplay::TriggerPlaybackLastCoupleOfSeconds(uint32 start, uint8 cam_mode, f
Mode = MODE_RECORD;
}
+// --MIAMI: Done
bool CReplay::FastForwardToTime(uint32 start)
{
uint32 timer = 0;
@@ -683,6 +764,7 @@ bool CReplay::FastForwardToTime(uint32 start)
return true;
}
+// --MIAMI: Done
void CReplay::StoreCarUpdate(CVehicle *vehicle, int id)
{
tVehicleUpdatePacket* vp = (tVehicleUpdatePacket*)&Record.m_pBase[Record.m_nOffset];
@@ -716,9 +798,40 @@ void CReplay::StoreCarUpdate(CVehicle *vehicle, int id)
vp->door_status |= BIT(i);
}
}
+ if (vehicle->GetModelIndex() == MI_SKIMMER)
+ vp->skimmer_speed = 50.0f * ((CBoat*)vehicle)->m_fMovingSpeed;
+ vp->render_scorched = vehicle->bRenderScorched;
+ vp->vehicle_type = vehicle->m_vehType;
Record.m_nOffset += sizeof(tVehicleUpdatePacket);
}
+// --MIAMI: Done
+void CReplay::StoreBikeUpdate(CVehicle* vehicle, int id)
+{
+ CBike* bike = (CBike*)vehicle;
+ tBikeUpdatePacket* vp = (tBikeUpdatePacket*)&Record.m_pBase[Record.m_nOffset];
+ vp->type = REPLAYPACKET_BIKE;
+ vp->index = id;
+ vp->matrix.CompressFromFullMatrix(vehicle->GetMatrix());
+ vp->health = vehicle->m_fHealth / 4.0f; /* Not anticipated that health can be > 1000. */
+ vp->acceleration = vehicle->m_fGasPedal * 100.0f;
+ for (int i = 0; i < 4; i++) {
+ vp->wheel_susp_dist[i] = 50.0f * bike->m_aSuspensionSpringRatio[i];
+ vp->wheel_rotation[i] = 128.0f / PI * bike->m_aWheelRotation[i];
+ }
+ vp->velocityX = 8000.0f * Max(-4.0f, Min(4.0f, vehicle->GetMoveSpeed().x)); /* 8000!? */
+ vp->velocityY = 8000.0f * Max(-4.0f, Min(4.0f, vehicle->GetMoveSpeed().y));
+ vp->velocityZ = 8000.0f * Max(-4.0f, Min(4.0f, vehicle->GetMoveSpeed().z));
+ vp->mi = vehicle->GetModelIndex();
+ vp->primary_color = vehicle->m_currentColour1;
+ vp->secondary_color = vehicle->m_currentColour2;
+ vp->wheel_state = 50.0f * vehicle->m_fSteerAngle;
+ vp->lean_angle = 50.0f * bike->m_fLeanLRAngle;
+ vp->wheel_angle = 50.0f * bike->m_fWheelAngle;
+ Record.m_nOffset += sizeof(tBikeUpdatePacket);
+}
+
+// --MIAMI: Done
void CReplay::ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressInReplayBuffer *buffer)
{
tVehicleUpdatePacket* vp = (tVehicleUpdatePacket*)&buffer->m_pBase[buffer->m_nOffset];
@@ -755,7 +868,7 @@ void CReplay::ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressI
car->Damage.SetDoorStatus(DOOR_FRONT_LEFT, DOOR_STATUS_SWINGING);
if (vp->door_angles[1])
car->Damage.SetDoorStatus(DOOR_FRONT_RIGHT, DOOR_STATUS_SWINGING);
- if (vp->door_status & 1 && car->Damage.GetDoorStatus(DOOR_BONNET) != DOOR_STATUS_MISSING){
+ if (vp->door_status & 1 && car->Damage.GetDoorStatus(DOOR_BONNET) != DOOR_STATUS_MISSING) {
car->Damage.SetDoorStatus(DOOR_BONNET, DOOR_STATUS_MISSING);
car->SetDoorDamage(CAR_BONNET, DOOR_BONNET, true);
}
@@ -779,28 +892,56 @@ void CReplay::ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressI
car->Damage.SetDoorStatus(DOOR_REAR_RIGHT, DOOR_STATUS_MISSING);
car->SetDoorDamage(CAR_DOOR_RR, DOOR_REAR_RIGHT, true);
}
- vehicle->bEngineOn = true;
- if (vehicle->IsCar())
- ((CAutomobile*)vehicle)->m_nDriveWheelsOnGround = 4;
- CWorld::Remove(vehicle);
- CWorld::Add(vehicle);
- if (vehicle->IsBoat())
- ((CBoat*)vehicle)->m_bIsAnchored = false;
}
+ vehicle->bEngineOn = true;
+ if (vehicle->IsCar())
+ ((CAutomobile*)vehicle)->m_nDriveWheelsOnGround = 4;
+ CWorld::Remove(vehicle);
+ CWorld::Add(vehicle);
+ if (vehicle->IsBoat())
+ ((CBoat*)vehicle)->m_bIsAnchored = false;
+ vehicle->bRenderScorched = vp->render_scorched;
+ if (vehicle->GetModelIndex() == MI_SKIMMER)
+ ((CBoat*)vehicle)->m_fMovingSpeed = vp->skimmer_speed / 50.0f;
}
-bool CReplay::PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, float interpolation, uint32 *pTimer){
- /* Mistake. Not even sure what this is even doing here...
- * PlayerWanted is a backup to restore at the end of replay.
- * Setting current wanted pointer to it makes it useless.
- * Causes picking up bribes in replays reducing wanted level bug.
- * Obviously fact of picking them up is a bug on its own,
- * but it doesn't cancel this one.
- */
-#ifndef FIX_REPLAY_BUGS
- FindPlayerPed()->m_pWanted = &PlayerWanted;
-#endif
+// --MIAMI: Done
+void CReplay::ProcessBikeUpdate(CVehicle* vehicle, float interpolation, CAddressInReplayBuffer* buffer)
+{
+ CBike* bike = (CBike*)vehicle;
+ tBikeUpdatePacket* vp = (tBikeUpdatePacket*)&buffer->m_pBase[buffer->m_nOffset];
+ if (!vehicle) {
+ printf("Replay:Car wasn't there");
+ return;
+ }
+ CMatrix vehicle_matrix;
+ vp->matrix.DecompressIntoFullMatrix(vehicle_matrix);
+ vehicle->GetMatrix() = vehicle->GetMatrix() * CMatrix(1.0f - interpolation);
+ vehicle->GetMatrix().GetPosition() *= (1.0f - interpolation);
+ vehicle->GetMatrix() += CMatrix(interpolation) * vehicle_matrix;
+ vehicle->m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f);
+ vehicle->m_fHealth = 4 * vp->health;
+ vehicle->m_fGasPedal = vp->acceleration / 100.0f;
+ vehicle->m_vecMoveSpeed = CVector(vp->velocityX / 8000.0f, vp->velocityY / 8000.0f, vp->velocityZ / 8000.0f);
+ vehicle->m_fSteerAngle = vp->wheel_state / 50.0f;
+ vehicle->bEngineOn = true;
+ for (int i = 0; i < 4; i++) {
+ bike->m_aSuspensionSpringRatio[i] = vp->wheel_susp_dist[i] / 50.0f;
+ bike->m_aWheelRotation[i] = vp->wheel_rotation[i] / (128.0f / PI);
+ // NB: technically last assignment overflows - there are 2 wheels of bike
+ // however it saves two useful fields; this looks like unrolled loop, not sequential assignments
+ }
+ bike->m_fLeanLRAngle = vp->lean_angle / 50.0f;
+ bike->m_fWheelAngle = vp->wheel_angle / 50.0f;
+ bike->bLeanMatrixClean = false;
+ bike->CalculateLeanMatrix();
+ CWorld::Remove(vehicle);
+ CWorld::Add(vehicle);
+}
+// --MIAMI: Done
+bool CReplay::PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, float interpolation, uint32 *pTimer)
+{
CBulletTraces::Init();
float split = 1.0f - interpolation;
int ped_min_index = 0; /* Optimization due to peds and vehicles placed in buffer sequentially. */
@@ -846,21 +987,25 @@ bool CReplay::PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, flo
CStreaming::RequestModel(mi, 0);
}
else {
-// TODO(MIAMI): don't hardcode model indices
- if (mi == MI_DEADDODO || mi == MI_AIRTRAIN) {
- new_v = new(vp->index << 8) CPlane(mi, 2);
- }
- else if (mi == MI_TRAIN) {
+ switch (vp->vehicle_type) {
+ case VEHICLE_TYPE_CAR:
+ new_v = new(vp->index << 8) CAutomobile(mi, 2);
+ break;
+ case VEHICLE_TYPE_BOAT:
+ new_v = new(vp->index << 8) CBoat(mi, 2);
+ break;
+ case VEHICLE_TYPE_TRAIN:
new_v = new(vp->index << 8) CTrain(mi, 2);
- }
- else if (mi == MI_CHOPPER) {
+ break;
+ case VEHICLE_TYPE_HELI:
new_v = new(vp->index << 8) CHeli(mi, 2);
- }
- else if (CModelInfo::IsBoatModel(mi)){
- new_v = new(vp->index << 8) CBoat(mi, 2);
- }
- else{
- new_v = new(vp->index << 8) CAutomobile(mi, 2);
+ break;
+ case VEHICLE_TYPE_PLANE:
+ new_v = new(vp->index << 8) CPlane(mi, 2);
+ break;
+ case VEHICLE_TYPE_BIKE: // not possible
+ new_v = new(vp->index << 8) CBike(mi, 2);
+ break;
}
new_v->SetStatus(STATUS_PLAYER_PLAYBACKFROMBUFFER);
vp->matrix.DecompressIntoFullMatrix(new_v->GetMatrix());
@@ -873,15 +1018,51 @@ bool CReplay::PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, flo
buffer->m_nOffset += sizeof(tVehicleUpdatePacket);
break;
}
+ case REPLAYPACKET_BIKE:
+ {
+ tBikeUpdatePacket* vp = (tBikeUpdatePacket*)&ptr[offset];
+ for (int i = vehicle_min_index; i < vp->index; i++) {
+ CVehicle* v = CPools::GetVehiclePool()->GetSlot(i);
+ if (!v)
+ continue;
+ /* Removing vehicles not present in this frame. */
+ CWorld::Remove(v);
+ delete v;
+ }
+ vehicle_min_index = vp->index + 1;
+ CVehicle* v = CPools::GetVehiclePool()->GetSlot(vp->index);
+ CVehicle* new_v;
+ if (!v) {
+ int mi = vp->mi;
+ if (CStreaming::ms_aInfoForModel[mi].m_loadState != 1) {
+ CStreaming::RequestModel(mi, 0);
+ }
+ else {
+ new_v = new(vp->index << 8) CBike(mi, 2);
+ new_v->SetStatus(STATUS_PLAYER_PLAYBACKFROMBUFFER);
+ vp->matrix.DecompressIntoFullMatrix(new_v->GetMatrix());
+ new_v->m_currentColour1 = vp->primary_color;
+ new_v->m_currentColour2 = vp->secondary_color;
+ CWorld::Add(new_v);
+ }
+ }
+ ProcessBikeUpdate(CPools::GetVehiclePool()->GetSlot(vp->index), interpolation, buffer);
+ buffer->m_nOffset += sizeof(tBikeUpdatePacket);
+ break;
+ }
case REPLAYPACKET_PED_HEADER:
{
tPedHeaderPacket* ph = (tPedHeaderPacket*)&ptr[offset];
if (!CPools::GetPedPool()->GetSlot(ph->index)) {
- if (CStreaming::ms_aInfoForModel[ph->mi].m_loadState != 1) {
+ if (!CStreaming::HasModelLoaded(ph->mi) || (ph->mi >= MI_SPECIAL01 && ph->mi < MI_LAST_PED)) {
CStreaming::RequestModel(ph->mi, 0);
}
else {
- CPed* new_p = new(ph->index << 8) CCivilianPed((ePedType)ph->pedtype, ph->mi);
+ CPed* new_p;
+ if (ph->pedtype != PEDTYPE_PLAYER1)
+ new_p = new(ph->index << 8) CCivilianPed((ePedType)ph->pedtype, ph->mi);
+ else
+ new_p = new(ph->index << 8) CPlayerPed();
new_p->SetStatus(STATUS_PLAYER_PLAYBACKFROMBUFFER);
new_p->GetMatrix().SetUnity();
CWorld::Add(new_p);
@@ -964,6 +1145,31 @@ bool CReplay::PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, flo
CBulletTraces::aTraces[pb->index].m_vecCurrentPos = pb->inf;
CBulletTraces::aTraces[pb->index].m_vecTargetPos = pb->sup;
buffer->m_nOffset += sizeof(tBulletTracePacket);
+ break;
+ }
+ case REPLAYPACKET_PARTICLE:
+ {
+ tParticlePacket* pp = (tParticlePacket*)&ptr[offset];
+ CVector pos(pp->pos_x / 4.0f, pp->pos_y / 4.0f, pp->pos_z / 4.0f);
+ CVector dir(pp->dir_x / 120.0f, pp->dir_y / 120.0f, pp->dir_z / 120.0f);
+ RwRGBA color;
+ color.red = pp->r;
+ color.green = pp->g;
+ color.blue = pp->b;
+ color.alpha = pp->a;
+ CParticle::AddParticle((tParticleType)pp->particle_type, pos, dir, nil, pp->size, color);
+ buffer->m_nOffset += sizeof(tParticlePacket);
+ break;
+ }
+ case REPLAYPACKET_MISC:
+ {
+ tMiscPacket* pm = (tMiscPacket*)&ptr[offset];
+ TheCamera.m_uiCamShakeStart = pm->cam_shake_start;
+ TheCamera.m_fCamShakeForce = pm->cam_shake_strength;
+ // TODO(MIAMI): SpecialFX
+ CGame::currArea = pm->cur_area;
+ buffer->m_nOffset += sizeof(tMiscPacket);
+ break;
}
default:
break;
@@ -990,6 +1196,7 @@ bool CReplay::PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, flo
return false;
}
+// --MIAMI: Done
void CReplay::FinishPlayback(void)
{
if (Mode != MODE_PLAYBACK)
@@ -1012,6 +1219,7 @@ void CReplay::FinishPlayback(void)
DMAudio.SetMusicFadeVol(127);
}
+// --MIAMI: Done
void CReplay::EmptyReplayBuffer(void)
{
if (Mode == MODE_PLAYBACK)
@@ -1027,6 +1235,7 @@ void CReplay::EmptyReplayBuffer(void)
MarkEverythingAsNew();
}
+// --MIAMI: Done
void CReplay::ProcessReplayCamera(void)
{
switch (CameraMode) {
@@ -1071,6 +1280,9 @@ void CReplay::ProcessReplayCamera(void)
RwFrameUpdateObjects(RwCameraGetFrame(TheCamera.m_pRwCamera));
}
+extern CWeaponEffects gCrossHair;
+
+// --MIAMI: Done except TODO
void CReplay::TriggerPlayback(uint8 cam_mode, float cam_x, float cam_y, float cam_z, bool load_scene)
{
if (Mode != MODE_RECORD)
@@ -1087,6 +1299,8 @@ void CReplay::TriggerPlayback(uint8 cam_mode, float cam_x, float cam_y, float ca
DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND);
DMAudio.SetEffectsFadeVol(0);
DMAudio.SetMusicFadeVol(0);
+ CEscalators::Shutdown();
+ // TODO(MIAMI): CWaterCreatures::RemoveAll();
int current;
for (current = 0; current < NUM_REPLAYBUFFERS; current++)
if (BufferStatus[current] == REPLAYBUFFER_RECORD)
@@ -1119,8 +1333,16 @@ void CReplay::TriggerPlayback(uint8 cam_mode, float cam_x, float cam_y, float ca
}
if (cam_mode == REPLAYCAMMODE_ASSTORED)
TheCamera.CarZoomIndicator = CAM_ZOOM_CINEMATIC;
+ gCrossHair.m_bActive = false;
+ CExplosion::ClearAllExplosions();
+ CPlaneBanners::Init();
+#ifndef FIX_BUGS // this doesn't do anything useful and accesses destroyed player ped
+ TheCamera.Restore();
+#endif
+ CDraw::SetFOV(70.0f);
}
+// --MIAMI: Done
void CReplay::StoreStuffInMem(void)
{
#ifdef FIX_BUGS
@@ -1166,9 +1388,28 @@ void CReplay::StoreStuffInMem(void)
OldWeatherType = CWeather::OldWeatherType;
NewWeatherType = CWeather::NewWeatherType;
WeatherInterpolationValue = CWeather::InterpolationValue;
+ CurrArea = CGame::currArea;
TimeStepNonClipped = CTimer::GetTimeStepNonClipped();
TimeStep = CTimer::GetTimeStep();
TimeScale = CTimer::GetTimeScale();
+ ms_nNumCivMale_Stored = CPopulation::ms_nNumCivMale;
+ ms_nNumCivFemale_Stored = CPopulation::ms_nNumCivFemale;
+ ms_nNumCop_Stored = CPopulation::ms_nNumCop;
+ ms_nNumEmergency_Stored = CPopulation::ms_nNumEmergency;
+ ms_nNumGang1_Stored = CPopulation::ms_nNumGang1;
+ ms_nNumGang2_Stored = CPopulation::ms_nNumGang2;
+ ms_nNumGang3_Stored = CPopulation::ms_nNumGang3;
+ ms_nNumGang4_Stored = CPopulation::ms_nNumGang4;
+ ms_nNumGang5_Stored = CPopulation::ms_nNumGang5;
+ ms_nNumGang6_Stored = CPopulation::ms_nNumGang6;
+ ms_nNumGang7_Stored = CPopulation::ms_nNumGang7;
+ ms_nNumGang8_Stored = CPopulation::ms_nNumGang8;
+ ms_nNumGang9_Stored = CPopulation::ms_nNumGang9;
+ ms_nNumDummy_Stored = CPopulation::ms_nNumDummy;
+ ms_nTotalCivPeds_Stored = CPopulation::ms_nTotalCivPeds;
+ ms_nTotalGangPeds_Stored = CPopulation::ms_nTotalGangPeds;
+ ms_nTotalPeds_Stored = CPopulation::ms_nTotalPeds;
+ ms_nTotalMissionPeds_Stored = CPopulation::ms_nTotalMissionPeds;
int size = CPools::GetPedPool()->GetSize();
pPedAnims = new CStoredDetailedAnimationState[size];
for (int i = 0; i < size; i++) {
@@ -1176,9 +1417,19 @@ void CReplay::StoreStuffInMem(void)
if (ped)
StoreDetailedPedAnimation(ped, &pPedAnims[i]);
}
+ pGarages = new uint8[sizeof(CGarages::aGarages)];
+ memcpy(pGarages, CGarages::aGarages, sizeof(CGarages::aGarages));
+ FireArray = new CFire[NUM_FIRES];
+ memcpy(FireArray, gFireManager.m_aFires, sizeof(gFireManager.m_aFires));
+ NumOfFires = gFireManager.m_nTotalFires;
+ paProjectileInfo = new uint8[sizeof(gaProjectileInfo)];
+ memcpy(paProjectileInfo, gaProjectileInfo, sizeof(gaProjectileInfo));
+ paProjectiles = new uint8[sizeof(CProjectileInfo::ms_apProjectile)];
+ memcpy(paProjectiles, CProjectileInfo::ms_apProjectile, sizeof(CProjectileInfo::ms_apProjectile));
CScriptPaths::Save_ForReplay();
}
+// --MIAMI: Done
void CReplay::RestoreStuffFromMem(void)
{
CPools::GetVehiclePool()->CopyBack(pBuf0, pBuf1);
@@ -1241,8 +1492,14 @@ void CReplay::RestoreStuffFromMem(void)
CStreaming::LoadAllRequestedModels(false);
ped->m_weapons[j].Initialise(ped->m_weapons[j].m_eWeaponType, ped->m_weapons[j].m_nAmmoTotal);
}
- if (ped->m_wepModelID >= 0)
+ if (ped->m_wepModelID >= 0) {
+ ped->m_pWeaponModel = nil;
+ if (ped->IsPlayer())
+ ((CPlayerPed*)ped)->m_pMinigunTopAtomic = nil;
ped->AddWeaponModel(ped->m_wepModelID);
+ }
+ if (ped->m_nPedType == PEDTYPE_COP)
+ ((CCopPed*)ped)->m_pStinger = new CStinger;
}
i = CPools::GetVehiclePool()->GetSize();
while (--i >= 0) {
@@ -1255,14 +1512,26 @@ void CReplay::RestoreStuffFromMem(void)
vehicle->m_rwObject = nil;
vehicle->m_modelIndex = -1;
vehicle->SetModelIndex(mi);
- if (mi == MI_DODO){
- CAutomobile* dodo = (CAutomobile*)vehicle;
- RpAtomicSetFlags((RpAtomic*)GetFirstObject(dodo->m_aCarNodes[CAR_WHEEL_LF]), 0);
- CMatrix tmp1;
- tmp1.Attach(RwFrameGetMatrix(dodo->m_aCarNodes[CAR_WHEEL_RF]), false);
- CMatrix tmp2(RwFrameGetMatrix(dodo->m_aCarNodes[CAR_WHEEL_LF]), false);
- tmp1.GetPosition() += CVector(tmp2.GetPosition().x + 0.1f, 0.0f, tmp2.GetPosition().z);
- tmp1.UpdateRW();
+ if (vehicle->IsCar()) {
+ CAutomobile* car = (CAutomobile*)vehicle;
+ if (mi == MI_DODO) {
+ RpAtomicSetFlags((RpAtomic*)GetFirstObject(car->m_aCarNodes[CAR_WHEEL_LF]), 0);
+ CMatrix tmp1;
+ tmp1.Attach(RwFrameGetMatrix(car->m_aCarNodes[CAR_WHEEL_RF]), false);
+ CMatrix tmp2(RwFrameGetMatrix(car->m_aCarNodes[CAR_WHEEL_LF]), false);
+ tmp1.GetPosition() += CVector(tmp2.GetPosition().x + 0.1f, 0.0f, tmp2.GetPosition().z);
+ tmp1.UpdateRW();
+ }
+ else if (mi == MI_HUNTER) {
+ RpAtomicSetFlags((RpAtomic*)GetFirstObject(car->m_aCarNodes[CAR_WHEEL_LF]), 0);
+ RpAtomicSetFlags((RpAtomic*)GetFirstObject(car->m_aCarNodes[CAR_WHEEL_RF]), 0);
+ RpAtomicSetFlags((RpAtomic*)GetFirstObject(car->m_aCarNodes[CAR_WHEEL_LB]), 0);
+ RpAtomicSetFlags((RpAtomic*)GetFirstObject(car->m_aCarNodes[CAR_WHEEL_RB]), 0);
+ }
+ else if (vehicle->IsRealHeli()) {
+ RpAtomicSetFlags((RpAtomic*)GetFirstObject(car->m_aCarNodes[CAR_WHEEL_LB]), 0);
+ RpAtomicSetFlags((RpAtomic*)GetFirstObject(car->m_aCarNodes[CAR_WHEEL_RB]), 0);
+ }
}
if (vehicle->IsCar()){
CAutomobile* car = (CAutomobile*)vehicle;
@@ -1309,14 +1578,10 @@ void CReplay::RestoreStuffFromMem(void)
if (!object)
continue;
int mi = object->GetModelIndex();
- CStreaming::RequestModel(mi, 0);
- CStreaming::LoadAllRequestedModels(false);
object->m_rwObject = nil;
object->m_modelIndex = -1;
- object->SetModelIndex(mi);
+ object->SetModelIndexNoCreate(mi);
object->GetMatrix().m_attachment = nil;
- if (RwObjectGetType(object->m_rwObject) == rpATOMIC)
- object->GetMatrix().AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)object->m_rwObject)), false);
}
i = CPools::GetDummyPool()->GetSize();
while (--i >= 0) {
@@ -1324,15 +1589,12 @@ void CReplay::RestoreStuffFromMem(void)
if (!dummy)
continue;
int mi = dummy->GetModelIndex();
- CStreaming::RequestModel(mi, 0);
- CStreaming::LoadAllRequestedModels(false);
dummy->m_rwObject = nil;
dummy->m_modelIndex = -1;
- dummy->SetModelIndex(mi);
+ dummy->SetModelIndexNoCreate(mi);
dummy->GetMatrix().m_attachment = nil;
- if (RwObjectGetType(dummy->m_rwObject) == rpATOMIC)
- dummy->GetMatrix().AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)dummy->m_rwObject)), false);
}
+ ++ClockMinutes;
CTimer::SetTimeInMilliseconds(Time1);
CTimer::SetTimeInMillisecondsNonClipped(Time2);
CTimer::SetPreviousTimeInMilliseconds(Time3);
@@ -1345,6 +1607,25 @@ void CReplay::RestoreStuffFromMem(void)
CWeather::OldWeatherType = OldWeatherType;
CWeather::NewWeatherType = NewWeatherType;
CWeather::InterpolationValue = WeatherInterpolationValue;
+ CGame::currArea = CurrArea;
+ CPopulation::ms_nNumCivMale = ms_nNumCivMale_Stored;
+ CPopulation::ms_nNumCivFemale = ms_nNumCivFemale_Stored;
+ CPopulation::ms_nNumCop = ms_nNumCop_Stored;
+ CPopulation::ms_nNumEmergency = ms_nNumEmergency_Stored;
+ CPopulation::ms_nNumGang1 = ms_nNumGang1_Stored;
+ CPopulation::ms_nNumGang2 = ms_nNumGang2_Stored;
+ CPopulation::ms_nNumGang3 = ms_nNumGang3_Stored;
+ CPopulation::ms_nNumGang4 = ms_nNumGang4_Stored;
+ CPopulation::ms_nNumGang5 = ms_nNumGang5_Stored;
+ CPopulation::ms_nNumGang6 = ms_nNumGang6_Stored;
+ CPopulation::ms_nNumGang7 = ms_nNumGang7_Stored;
+ CPopulation::ms_nNumGang8 = ms_nNumGang8_Stored;
+ CPopulation::ms_nNumGang9 = ms_nNumGang9_Stored;
+ CPopulation::ms_nNumDummy = ms_nNumDummy_Stored;
+ CPopulation::ms_nTotalCivPeds = ms_nTotalCivPeds_Stored;
+ CPopulation::ms_nTotalGangPeds = ms_nTotalGangPeds_Stored;
+ CPopulation::ms_nTotalPeds = ms_nTotalPeds_Stored;
+ CPopulation::ms_nTotalMissionPeds = ms_nTotalMissionPeds_Stored;
for (int i = 0; i < CPools::GetPedPool()->GetSize(); i++) {
CPed* ped = CPools::GetPedPool()->GetSlot(i);
if (!ped)
@@ -1353,12 +1634,27 @@ void CReplay::RestoreStuffFromMem(void)
}
delete[] pPedAnims;
pPedAnims = nil;
+ memcpy(CGarages::aGarages, pGarages, sizeof(CGarages::aGarages));
+ delete[] pGarages;
+ pGarages = nil;
+ memcpy(gFireManager.m_aFires, FireArray, sizeof(gFireManager.m_aFires));
+ delete[] FireArray;
+ FireArray = nil;
+ gFireManager.m_nTotalFires = NumOfFires;
+ memcpy(gaProjectileInfo, paProjectileInfo, sizeof(gaProjectileInfo));
+ delete[] paProjectileInfo;
+ paProjectileInfo = nil;
+ memcpy(CProjectileInfo::ms_apProjectile, paProjectiles, sizeof(CProjectileInfo::ms_apProjectile));
+ delete[] paProjectiles;
+ paProjectiles = nil;
CScriptPaths::Load_ForReplay();
+ CExplosion::ClearAllExplosions();
DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND);
DMAudio.SetRadioInCar(OldRadioStation);
DMAudio.ChangeMusicMode(MUSICMODE_GAME);
}
+// --MIAMI: Done
void CReplay::EmptyPedsAndVehiclePools(void)
{
int i = CPools::GetVehiclePool()->GetSize();
@@ -1379,6 +1675,7 @@ void CReplay::EmptyPedsAndVehiclePools(void)
}
}
+// --MIAMI: Done
void CReplay::EmptyAllPools(void)
{
EmptyPedsAndVehiclePools();
@@ -1400,6 +1697,7 @@ void CReplay::EmptyAllPools(void)
}
}
+// --MIAMI: Done
void CReplay::MarkEverythingAsNew(void)
{
int i = CPools::GetVehiclePool()->GetSize();
@@ -1449,6 +1747,7 @@ void CReplay::SaveReplayToHD(void)
CFileMgr::SetDir("");
}
+// --MIAMI: Done
void PlayReplayFromHD(void)
{
CFileMgr::SetDirMyDocuments();
@@ -1481,6 +1780,7 @@ void PlayReplayFromHD(void)
CReplay::StreamAllNecessaryCarsAndPeds();
}
+// --MIAMI: Done
void CReplay::StreamAllNecessaryCarsAndPeds(void)
{
for (int slot = 0; slot < NUM_REPLAYBUFFERS; slot++) {
@@ -1491,6 +1791,9 @@ void CReplay::StreamAllNecessaryCarsAndPeds(void)
case REPLAYPACKET_VEHICLE:
CStreaming::RequestModel(((tVehicleUpdatePacket*)&Buffers[slot][offset])->mi, 0);
break;
+ case REPLAYPACKET_BIKE:
+ CStreaming::RequestModel(((tBikeUpdatePacket*)&Buffers[slot][offset])->mi, 0);
+ break;
case REPLAYPACKET_PED_HEADER:
CStreaming::RequestModel(((tPedHeaderPacket*)&Buffers[slot][offset])->mi, 0);
break;
@@ -1502,6 +1805,7 @@ void CReplay::StreamAllNecessaryCarsAndPeds(void)
CStreaming::LoadAllRequestedModels(false);
}
+// --MIAMI: Done
void CReplay::FindFirstFocusCoordinate(CVector *coord)
{
*coord = CVector(0.0f, 0.0f, 0.0f);
@@ -1517,6 +1821,7 @@ void CReplay::FindFirstFocusCoordinate(CVector *coord)
}
}
+// --MIAMI: Done
bool CReplay::ShouldStandardCameraBeProcessed(void)
{
if (Mode != MODE_PLAYBACK)
@@ -1526,6 +1831,7 @@ bool CReplay::ShouldStandardCameraBeProcessed(void)
return FindPlayerVehicle() != nil;
}
+// --MIAMI: Done
void CReplay::ProcessLookAroundCam(void)
{
if (!bAllowLookAroundCam)
@@ -1582,11 +1888,13 @@ void CReplay::ProcessLookAroundCam(void)
RwFrameUpdateObjects(RwCameraGetFrame(TheCamera.m_pRwCamera));
}
+// --MIAMI: Done
size_t CReplay::FindSizeOfPacket(uint8 type)
{
switch (type) {
case REPLAYPACKET_END: return 4;
case REPLAYPACKET_VEHICLE: return sizeof(tVehicleUpdatePacket);
+ case REPLAYPACKET_BIKE: return sizeof(tBikeUpdatePacket);
case REPLAYPACKET_PED_HEADER: return sizeof(tPedHeaderPacket);
case REPLAYPACKET_PED_UPDATE: return sizeof(tPedUpdatePacket);
case REPLAYPACKET_GENERAL: return sizeof(tGeneralPacket);
@@ -1595,11 +1903,14 @@ size_t CReplay::FindSizeOfPacket(uint8 type)
case REPLAYPACKET_ENDOFFRAME: return 4;
case REPLAYPACKET_TIMER: return sizeof(tTimerPacket);
case REPLAYPACKET_BULLET_TRACES:return sizeof(tBulletTracePacket);
+ case REPLAYPACKET_PARTICLE: return sizeof(tParticlePacket);
+ case REPLAYPACKET_MISC: return sizeof(tMiscPacket);
default: assert(false); break;
}
return 0;
}
+// --MIAMI: Done (function didn't change since III and we already had it modified)
void CReplay::Display()
{
static int TimeCount = 0;
diff --git a/src/control/Replay.h b/src/control/Replay.h
index fd484017..42d6ad1a 100644
--- a/src/control/Replay.h
+++ b/src/control/Replay.h
@@ -2,6 +2,7 @@
#include "Pools.h"
#include "World.h"
+#include "WeaponEffects.h"
#include "ParticleType.h"
#ifdef FIX_BUGS
@@ -25,14 +26,17 @@ struct CStoredAnimationState
uint8 animId;
uint8 time;
uint8 speed;
+ uint8 groupId;
uint8 secAnimId;
uint8 secTime;
uint8 secSpeed;
+ uint8 secGroupId;
uint8 blendAmount;
uint8 partAnimId;
uint8 partAnimTime;
uint8 partAnimSpeed;
uint8 partBlendAmount;
+ uint8 partGroupId;
};
enum {
@@ -46,20 +50,18 @@ struct CStoredDetailedAnimationState
uint8 aCurTime[NUM_MAIN_ANIMS_IN_REPLAY];
uint8 aSpeed[NUM_MAIN_ANIMS_IN_REPLAY];
uint8 aBlendAmount[NUM_MAIN_ANIMS_IN_REPLAY];
-#ifdef FIX_REPLAY_BUGS
int8 aBlendDelta[NUM_MAIN_ANIMS_IN_REPLAY];
-#endif
uint8 aFunctionCallbackID[NUM_MAIN_ANIMS_IN_REPLAY];
uint16 aFlags[NUM_MAIN_ANIMS_IN_REPLAY];
+ uint8 aGroupId[NUM_MAIN_ANIMS_IN_REPLAY];
uint8 aAnimId2[NUM_PARTIAL_ANIMS_IN_REPLAY];
uint8 aCurTime2[NUM_PARTIAL_ANIMS_IN_REPLAY];
uint8 aSpeed2[NUM_PARTIAL_ANIMS_IN_REPLAY];
uint8 aBlendAmount2[NUM_PARTIAL_ANIMS_IN_REPLAY];
-#ifdef FIX_REPLAY_BUGS
int8 aBlendDelta2[NUM_PARTIAL_ANIMS_IN_REPLAY];
-#endif
uint8 aFunctionCallbackID2[NUM_PARTIAL_ANIMS_IN_REPLAY];
uint16 aFlags2[NUM_PARTIAL_ANIMS_IN_REPLAY];
+ uint8 aGroupId2[NUM_PARTIAL_ANIMS_IN_REPLAY];
};
void PlayReplayFromHD(void);
@@ -73,21 +75,24 @@ class CReplay
enum {
REPLAYCAMMODE_ASSTORED = 0,
- REPLAYCAMMODE_TOPDOWN = 1,
- REPLAYCAMMODE_FIXED = 2
+ REPLAYCAMMODE_TOPDOWN,
+ REPLAYCAMMODE_FIXED
};
enum {
REPLAYPACKET_END = 0,
- REPLAYPACKET_VEHICLE = 1,
- REPLAYPACKET_PED_HEADER = 2,
- REPLAYPACKET_PED_UPDATE = 3,
- REPLAYPACKET_GENERAL = 4,
- REPLAYPACKET_CLOCK = 5,
- REPLAYPACKET_WEATHER = 6,
- REPLAYPACKET_ENDOFFRAME = 7,
- REPLAYPACKET_TIMER = 8,
- REPLAYPACKET_BULLET_TRACES = 9
+ REPLAYPACKET_VEHICLE,
+ REPLAYPACKET_BIKE,
+ REPLAYPACKET_PED_HEADER,
+ REPLAYPACKET_PED_UPDATE,
+ REPLAYPACKET_GENERAL,
+ REPLAYPACKET_CLOCK,
+ REPLAYPACKET_WEATHER,
+ REPLAYPACKET_ENDOFFRAME,
+ REPLAYPACKET_TIMER,
+ REPLAYPACKET_BULLET_TRACES,
+ REPLAYPACKET_PARTICLE,
+ REPLAYPACKET_MISC
};
enum {
@@ -176,8 +181,9 @@ class CReplay
int8 vehicle_index;
CStoredAnimationState anim_state;
CCompressedMatrixNotAligned matrix;
- int8 assoc_group_id;
uint16 weapon_model;
+ int8 assoc_group_id;
+ bool is_visible;
};
VALIDATE_SIZE(tPedUpdatePacket, 40);
@@ -203,8 +209,64 @@ class CReplay
uint8 door_status;
uint8 primary_color;
uint8 secondary_color;
+ bool render_scorched;
+ int8 skimmer_speed;
+ int8 vehicle_type;
+
+ };
+ VALIDATE_SIZE(tVehicleUpdatePacket, 52);
+
+ struct tBikeUpdatePacket
+ {
+ uint8 type;
+ uint8 index;
+ uint8 health;
+ uint8 acceleration;
+ CCompressedMatrixNotAligned matrix;
+ int8 door_angles[2];
+ uint16 mi;
+ int8 velocityX;
+ int8 velocityY;
+ int8 velocityZ;
+ int8 wheel_state;
+ uint8 wheel_susp_dist[4];
+ uint8 wheel_rotation[4];
+ uint8 primary_color;
+ uint8 secondary_color;
+ int8 lean_angle;
+ int8 wheel_angle;
+
+ };
+ VALIDATE_SIZE(tBikeUpdatePacket, 44);
+
+ struct tParticlePacket
+ {
+ uint8 type;
+ uint8 particle_type;
+ int8 dir_x;
+ int8 dir_y;
+ int8 dir_z;
+ uint8 r;
+ uint8 g;
+ uint8 b;
+ uint8 a;
+ int16 pos_x;
+ int16 pos_y;
+ int16 pos_z;
+ float size;
+ };
+ VALIDATE_SIZE(tParticlePacket, 20);
+
+ struct tMiscPacket
+ {
+ uint8 type;
+ uint32 cam_shake_start;
+ float cam_shake_strength;
+ uint8 cur_area;
+ uint8 special_fx_flags;
};
- VALIDATE_SIZE(tVehicleUpdatePacket, 48);
+
+ VALIDATE_SIZE(tMiscPacket, 16);
private:
static uint8 Mode;
@@ -269,6 +331,31 @@ private:
static float fDistanceLookAroundCam;
static float fAlphaAngleLookAroundCam;
static float fBetaAngleLookAroundCam;
+ static int ms_nNumCivMale_Stored;
+ static int ms_nNumCivFemale_Stored;
+ static int ms_nNumCop_Stored;
+ static int ms_nNumEmergency_Stored;
+ static int ms_nNumGang1_Stored;
+ static int ms_nNumGang2_Stored;
+ static int ms_nNumGang3_Stored;
+ static int ms_nNumGang4_Stored;
+ static int ms_nNumGang5_Stored;
+ static int ms_nNumGang6_Stored;
+ static int ms_nNumGang7_Stored;
+ static int ms_nNumGang8_Stored;
+ static int ms_nNumGang9_Stored;
+ static int ms_nNumDummy_Stored;
+ static int ms_nTotalCarPassengerPeds_Stored;
+ static int ms_nTotalCivPeds_Stored;
+ static int ms_nTotalGangPeds_Stored;
+ static int ms_nTotalPeds_Stored;
+ static int ms_nTotalMissionPeds_Stored;
+ static uint8* pGarages;
+ static CFire* FireArray;
+ static uint32 NumOfFires;
+ static uint8* paProjectileInfo;
+ static uint8* paProjectiles;
+ static uint8 CurrArea;
#ifdef FIX_BUGS
static int nHandleOfPlayerPed[NUMPLAYERS];
#endif
@@ -288,8 +375,7 @@ public:
static bool IsPlayingBack() { return Mode == MODE_PLAYBACK; }
static bool IsPlayingBackFromFile() { return bPlayingBackFromFile; }
- static void RecordParticle(tParticleType type, CVector const &vecPos, CVector const &vecDir, float fSize, RwRGBA const&color)
- { } //TODO
+ static void RecordParticle(tParticleType type, CVector const& vecPos, CVector const& vecDir, float fSize, RwRGBA const& color);
private:
static void RecordThisFrame(void);
static void StorePedUpdate(CPed *ped, int id);
@@ -302,7 +388,9 @@ private:
static void TriggerPlaybackLastCoupleOfSeconds(uint32, uint8, float, float, float, uint32);
static bool FastForwardToTime(uint32);
static void StoreCarUpdate(CVehicle *vehicle, int id);
+ static void StoreBikeUpdate(CVehicle* vehicle, int id);
static void ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressInReplayBuffer *buffer);
+ static void ProcessBikeUpdate(CVehicle* vehicle, float interpolation, CAddressInReplayBuffer* buffer);
static bool PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, float interpolation, uint32 *pTimer);
static void ProcessReplayCamera(void);
static void StoreStuffInMem(void);
@@ -314,6 +402,7 @@ private:
static void FindFirstFocusCoordinate(CVector *coord);
static void ProcessLookAroundCam(void);
static size_t FindSizeOfPacket(uint8);
+ static void GoToNextBlock(void);
/* Absolute nonsense, but how could this function end up being outside of class? */
friend void PlayReplayFromHD(void);
diff --git a/src/control/RoadBlocks.cpp b/src/control/RoadBlocks.cpp
index e8630bde..e7831b82 100644
--- a/src/control/RoadBlocks.cpp
+++ b/src/control/RoadBlocks.cpp
@@ -92,10 +92,16 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType
pCopPed->SetIdle();
pCopPed->bKindaStayInSamePlace = true;
pCopPed->bNotAllowedToDuck = false;
- pCopPed->bCrouchWhenShooting = roadBlockType != 2;
+ pCopPed->m_nExtendedRangeTimer = CTimer::GetTimeInMilliseconds() + 10000;
+ pCopPed->m_nRoadblockVeh = pVehicle;
+ pCopPed->m_nRoadblockVeh->RegisterReference((CEntity**)&pCopPed->m_nRoadblockVeh);
+ pCopPed->bCrouchWhenShooting = roadBlockType == 2 ? false : true;
if (pEntityToAttack) {
+ if (pCopPed->m_pPointGunAt)
+ pCopPed->m_pPointGunAt->CleanUpOldReference(&pCopPed->m_pPointGunAt);
pCopPed->m_pPointGunAt = pEntityToAttack;
- pEntityToAttack->RegisterReference(&pCopPed->m_pPointGunAt);
+ if (pEntityToAttack)
+ pEntityToAttack->RegisterReference(&pCopPed->m_pPointGunAt);
pCopPed->SetAttack(pEntityToAttack);
}
pCopPed->m_pMyVehicle = pVehicle;
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 5cd20001..4516acf0 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -10098,11 +10098,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
model = CStreaming::ms_vehiclesLoaded[index];
if (model == -1)
continue;
- // desperatly want to believe this was inlined :|
- CBaseModelInfo* pInfo = CModelInfo::GetModelInfo(model);
- script_assert(pInfo->GetModelType() == MITYPE_VEHICLE);
- CVehicleModelInfo* pVehicleInfo = (CVehicleModelInfo*)pInfo;
- if (pVehicleInfo->m_vehicleType != VEHICLE_TYPE_CAR) {
+ if (CModelInfo::IsCarModel(model) || CModelInfo::IsBikeModel(model)) {
switch (model) {
case MI_LANDSTAL:
case MI_LINERUN:
diff --git a/src/core/CdStream.cpp b/src/core/CdStream.cpp
index d9978040..c11fb72a 100644
--- a/src/core/CdStream.cpp
+++ b/src/core/CdStream.cpp
@@ -106,12 +106,14 @@ CdStreamInit(int32 numChannels)
GetDiskFreeSpace(nil, &SectorsPerCluster, &BytesPerSector, &NumberOfFreeClusters, &TotalNumberOfClusters);
_gdwCdStreamFlags = 0;
-
+
+#ifndef FIX_BUGS // this just slows down streaming
if ( BytesPerSector <= CDSTREAM_SECTOR_SIZE )
{
_gdwCdStreamFlags |= FILE_FLAG_NO_BUFFERING;
debug("Using no buffered loading for streaming\n");
}
+#endif
_gbCdStreamOverlapped = TRUE;
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index b0e04e2b..bdfab34c 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -732,10 +732,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_Driving(int32
if (FindPlayerVehicle() && (FindPlayerVehicle()->IsVehicle() && (
FindPlayerVehicle()->GetModelIndex() == MI_DODO
#ifdef FIX_BUGS
- || CVehicle::bAllDodosCheat
-#ifdef ALLCARSHELI_CHEAT
- || bAllCarCheat
-#endif
+ || (CVehicle::bAllDodosCheat && !FindPlayerVehicle()->IsRealHeli())
#endif
)))
{
diff --git a/src/core/EventList.cpp b/src/core/EventList.cpp
index da0a5967..7eb1e186 100644
--- a/src/core/EventList.cpp
+++ b/src/core/EventList.cpp
@@ -230,7 +230,11 @@ CEventList::ReportCrimeForEvent(eEventType type, size_t crimeId, bool copsDontCa
if(crime == CRIME_NONE)
return;
+#ifdef FIX_BUGS
+ CVector playerPedCoors = FindPlayerCoors();
+#else
CVector playerPedCoors = FindPlayerPed()->GetPosition();
+#endif
CVector playerCoors = FindPlayerCoors();
if(CWanted::WorkOutPolicePresence(playerCoors, 14.0f) != 0 ||
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 9c33d48a..6768b901 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -812,7 +812,7 @@ CMenuManager::DoSettingsBeforeStartingAGame()
}
void
-CMenuManager::DrawStandardMenus(bool drawCurrScreen)
+CMenuManager::DrawStandardMenus(bool activeScreen)
{
float nextYToUse = 0.0f; // III leftover, set but unused in VC
#ifdef PS2_LIKE_MENU
@@ -1182,7 +1182,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
}
// Highlight trapezoid
- if (drawCurrScreen && i == m_nCurrOption && itemsAreSelectable && section == 0) {
+ if (activeScreen && i == m_nCurrOption && itemsAreSelectable && section == 0) {
int leftXMax, rightXMin;
@@ -2460,16 +2460,16 @@ CMenuManager::DrawBackground(bool transitionCall)
m_nMenuFadeAlpha = 255 - m_nMenuFadeAlpha;
switch (m_nCurrScreen) {
case MENUPAGE_SKIN_SELECT:
- CMenuManager::DrawPlayerSetupScreen();
+ DrawPlayerSetupScreen(false);
break;
case MENUPAGE_KEYBOARD_CONTROLS:
- CMenuManager::DrawControllerSetupScreen();
+ DrawControllerSetupScreen();
break;
case MENUPAGE_OUTRO:
- CMenuManager::DrawQuitGameScreen();
+ DrawQuitGameScreen();
break;
default:
- CMenuManager::DrawStandardMenus(false);
+ DrawStandardMenus(false);
break;
}
m_nCurrScreen = actualScreen;
@@ -2479,7 +2479,7 @@ CMenuManager::DrawBackground(bool transitionCall)
switch (m_nCurrScreen) {
case MENUPAGE_SKIN_SELECT:
- DrawPlayerSetupScreen();
+ DrawPlayerSetupScreen(true);
break;
case MENUPAGE_KEYBOARD_CONTROLS:
DrawControllerSetupScreen();
@@ -2530,7 +2530,7 @@ CMenuManager::DrawBackground(bool transitionCall)
#endif
void
-CMenuManager::DrawPlayerSetupScreen()
+CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
{
CFont::SetBackgroundOff();
CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT));
@@ -2807,7 +2807,8 @@ CMenuManager::DrawPlayerSetupScreen()
#endif
}
- CPlayerSkin::RenderFrontendSkinEdit();
+ if (activeScreen)
+ CPlayerSkin::RenderFrontendSkinEdit();
// Big apply button
if (strcmp(m_aSkinName, m_PrefsSkinFile) != 0) {
@@ -4112,6 +4113,9 @@ CMenuManager::ProcessButtonPresses(uint8 goDown, uint8 goUp, uint8 optionSelecte
int oldOption = m_nCurrOption;
if (goDown) {
+ if (m_nCurrScreen != MENUPAGE_MAP)
+ DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
+
m_nCurrOption++;
if (m_nCurrOption == NUM_MENUROWS || (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_NOTHING)) {
m_nCurrOption = 0;
@@ -4120,6 +4124,9 @@ CMenuManager::ProcessButtonPresses(uint8 goDown, uint8 goUp, uint8 optionSelecte
m_nOptionHighlightTransitionBlend = 0;
}
if (goUp) {
+ if (m_nCurrScreen != MENUPAGE_MAP)
+ DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
+
if (m_nCurrOption == (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL)) {
while (m_nCurrOption != NUM_MENUROWS - 1
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption + 1].m_Action != MENUACTION_NOTHING) {
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 858ad1f3..456e9bd0 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -663,7 +663,7 @@ public:
void DrawQuitGameScreen();
void DrawFrontEnd();
void DrawBackground(bool transitionCall);
- void DrawPlayerSetupScreen();
+ void DrawPlayerSetupScreen(bool);
int FadeIn(int alpha);
void FilterOutColorMarkersFromString(wchar*);
int GetStartOptionsCntrlConfigScreens();
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index 03d209cd..36e14e55 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -526,7 +526,7 @@ void KangarooCheat()
}
#endif
-#ifdef ALLCARSHELI_CHEAT
+#ifdef RESTORE_ALLCARSHELI_CHEAT
void AllCarsHeliCheat(void)
{
wchar* string;
@@ -1438,7 +1438,7 @@ void CPad::AddToPCCheatString(char c)
CPed::SwitchDebugDisplay();
#endif
-#ifdef ALLCARSHELI_CHEAT
+#ifdef RESTORE_ALLCARSHELI_CHEAT
// "CARSAREHELI"
if (!_CHEATCMP("ILEHERASRAC"))
AllCarsHeliCheat();
@@ -3105,10 +3105,11 @@ void CPad::PrintErrorMessage(void)
{
if ( bDisplayNoControllerMessage && !CGame::playingIntro && !FrontEndMenuManager.m_bMenuActive )
{
- CFont::SetScale(0.85f, 1.0f);
+ CSprite2d::DrawRect(CRect(SCREEN_STRETCH_X(20.0f), SCREEN_SCALE_FROM_BOTTOM(130.0f), SCREEN_STRETCH_FROM_RIGHT(20.0f), SCREEN_SCALE_Y(140.0f)), CRGBA(50, 50, 50, 210));
+ CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_WIDTH - 20);
+ CFont::SetCentreSize(SCREEN_STRETCH_FROM_RIGHT(50.0f));
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetColor(CRGBA(255, 255, 200, 200));
@@ -3116,16 +3117,17 @@ void CPad::PrintErrorMessage(void)
CFont::PrintString
(
SCREEN_WIDTH / 2,
- SCREEN_HEIGHT / 2,
+ SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(40.0f),
TheText.Get("NOCONT") // Please reconnect an analog controller (DUALSHOCK@) or analog controller (DUALSHOCK@2). to controller port 1 to continue
);
}
else if ( bObsoleteControllerMessage )
{
- CFont::SetScale(0.85f, 1.0f);
+ CSprite2d::DrawRect(CRect(SCREEN_STRETCH_X(20.0f), SCREEN_SCALE_FROM_BOTTOM(130.0f), SCREEN_STRETCH_FROM_RIGHT(20.0f), SCREEN_SCALE_Y(140.0f)), CRGBA(50, 50, 50, 210));
+ CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_WIDTH - 20);
+ CFont::SetCentreSize(SCREEN_STRETCH_FROM_RIGHT(50.0f));
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetColor(CRGBA(255, 255, 200, 200));
@@ -3133,7 +3135,7 @@ void CPad::PrintErrorMessage(void)
CFont::PrintString
(
SCREEN_WIDTH / 2,
- SCREEN_HEIGHT / 2,
+ SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(40.0f),
TheText.Get("WRCONT") // The controller connected to controller port 1 is an unsupported controller. Grand Theft Auto III requires an analog controller (DUALSHOCK@) or analog controller (DUALSHOCK@2).
);
}
diff --git a/src/core/Pad.h b/src/core/Pad.h
index 72851317..cde2d3c5 100644
--- a/src/core/Pad.h
+++ b/src/core/Pad.h
@@ -286,6 +286,8 @@ public:
bool GetMiddleMouseJustUp() { return !!(!NewMouseControllerState.MMB && OldMouseControllerState.MMB); }
bool GetMouseWheelUpJustUp() { return !!(!NewMouseControllerState.WHEELUP && OldMouseControllerState.WHEELUP); }
bool GetMouseWheelDownJustUp() { return !!(!NewMouseControllerState.WHEELDN && OldMouseControllerState.WHEELDN); }
+ bool GetMouseX1JustUp() { return !!(!NewMouseControllerState.MXB1 && OldMouseControllerState.MXB1); }
+ bool GetMouseX2JustUp() { return !!(!NewMouseControllerState.MXB2 && OldMouseControllerState.MXB2); }
bool GetLeftMouse() { return NewMouseControllerState.LMB; }
bool GetRightMouse() { return NewMouseControllerState.RMB; }
@@ -469,8 +471,4 @@ public:
};
VALIDATE_SIZE(CPad, 0xFC);
-extern CPad Pads[MAX_PADS];
-
-#ifdef ALLCARSHELI_CHEAT
-extern bool bAllCarCheat;
-#endif
+extern CPad Pads[MAX_PADS]; \ No newline at end of file
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 559a8cd6..b9fc369d 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -1151,6 +1151,10 @@ int CRadar::SetCoordBlip(eBlipType type, CVector pos, int32 color, eBlipDisplay
if (!ms_RadarTrace[nextBlip].m_bInUse)
break;
}
+#ifdef FIX_BUGS
+ if (nextBlip == NUMRADARBLIPS)
+ return -1;
+#endif
ms_RadarTrace[nextBlip].m_eBlipType = type;
ms_RadarTrace[nextBlip].m_nColor = color;
ms_RadarTrace[nextBlip].m_bDim = true;
@@ -1182,6 +1186,10 @@ int CRadar::SetEntityBlip(eBlipType type, int32 handle, int32 color, eBlipDispla
if (!ms_RadarTrace[nextBlip].m_bInUse)
break;
}
+#ifdef FIX_BUGS
+ if (nextBlip == NUMRADARBLIPS)
+ return -1;
+#endif
ms_RadarTrace[nextBlip].m_eBlipType = type;
ms_RadarTrace[nextBlip].m_nColor = color;
ms_RadarTrace[nextBlip].m_bDim = true;
@@ -1526,6 +1534,10 @@ CRadar::ToggleTargetMarker(float x, float y)
if (!ms_RadarTrace[nextBlip].m_bInUse)
break;
}
+#ifdef FIX_BUGS
+ if (nextBlip == NUMRADARBLIPS)
+ return;
+#endif
ms_RadarTrace[nextBlip].m_eBlipType = BLIP_COORD;
ms_RadarTrace[nextBlip].m_nColor = 0x333333FF;
ms_RadarTrace[nextBlip].m_bDim = 1;
diff --git a/src/core/common.h b/src/core/common.h
index ba1d24ef..0a2a236e 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -219,6 +219,8 @@ extern int strncasecmp(const char *str1, const char *str2, size_t len);
#define clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v))
+#define clamp2(v, center, radius) ((v) < (center) ? Max(v, center - radius) : Min(v, center + radius))
+
inline float sq(float x) { return x*x; }
#define SQR(x) ((x) * (x))
diff --git a/src/core/config.h b/src/core/config.h
index 82044f75..327230d0 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -250,7 +250,7 @@ enum Config {
#endif
#define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m
#define KANGAROO_CHEAT
-#define ALLCARSHELI_CHEAT
+#define RESTORE_ALLCARSHELI_CHEAT
#define ALT_DODO_CHEAT
#define WALLCLIMB_CHEAT
#define REGISTER_START_BUTTON
@@ -258,14 +258,13 @@ enum Config {
// Hud, frontend and radar
#define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better.
-#define BETA_SLIDING_TEXT
+//#define BETA_SLIDING_TEXT
#define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC
#define PC_MENU
#ifndef PC_MENU
# define PS2_MENU
//# define PS2_MENU_USEALLPAGEICONS
-//# define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc.
#else
# define MAP_ENHANCEMENTS // Adding waypoint etc.
# define TRIANGLE_BACK_BUTTON
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 5a31ad22..b39a9c8b 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -740,12 +740,14 @@ DisplayGameDebugText()
static bool bDisplayRate = false;
static bool bDisplayCheatStr = false;
+#ifndef FINAL
{
SETTWEAKPATH("GameDebugText");
TWEAKBOOL(bDisplayPosn);
TWEAKBOOL(bDisplayRate);
TWEAKBOOL(bDisplayCheatStr);
}
+#endif
char str[200];
@@ -1091,6 +1093,7 @@ Idle(void *arg)
#endif
#ifdef FIX_BUGS
+ RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE); // TODO: temp? this fixes OpenGL render but there should be a better place for this
// This has to be done BEFORE RwCameraBeginUpdate
RwCameraSetFarClipPlane(Scene.camera, CTimeCycle::GetFarClip());
RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart());
diff --git a/src/core/timebars.cpp b/src/core/timebars.cpp
index 884feffd..31949009 100644
--- a/src/core/timebars.cpp
+++ b/src/core/timebars.cpp
@@ -50,7 +50,7 @@ void tbInit()
#endif
}
-void tbStartTimer(int32 unk, char *name)
+void tbStartTimer(int32 unk, Const char *name)
{
strcpy(TimerBar.Timers[TimerBar.count].name, name);
TimerBar.Timers[TimerBar.count].unk = unk;
@@ -58,7 +58,7 @@ void tbStartTimer(int32 unk, char *name)
TimerBar.count++;
}
-void tbEndTimer(char* name)
+void tbEndTimer(Const char* name)
{
uint32 n = 1500;
for (uint32 i = 0; i < TimerBar.count; i++) {
diff --git a/src/core/timebars.h b/src/core/timebars.h
index 6d3b853e..3871b61c 100644
--- a/src/core/timebars.h
+++ b/src/core/timebars.h
@@ -1,6 +1,6 @@
#pragma once
void tbInit();
-void tbStartTimer(int32, char*);
-void tbEndTimer(char*);
+void tbStartTimer(int32, Const char*);
+void tbEndTimer(Const char*);
void tbDisplay(); \ No newline at end of file
diff --git a/src/modelinfo/ModelIndices.h b/src/modelinfo/ModelIndices.h
index 77085d4e..a8057d26 100644
--- a/src/modelinfo/ModelIndices.h
+++ b/src/modelinfo/ModelIndices.h
@@ -200,7 +200,7 @@ enum
MI_WMYCR,
MI_WFYST,
MI_WFOST,
- MI_WMIST,
+ MI_WMYST,
MI_WMOST,
MI_WFYRI,
MI_WFORI,
@@ -214,6 +214,24 @@ enum
MI_WMYGO,
MI_WFOGO,
MI_WMOGO,
+ MI_WFYLG,
+ MI_WMYLG,
+ MI_WFYBU,
+ MI_WMYBU,
+ MI_WMOBU,
+ MI_WFYPR,
+ MI_WFOTR,
+ MI_WMOTR,
+ MI_WMYPI,
+ MI_WMOCA,
+ MI_WFYJG,
+ MI_WMYJG,
+ MI_WFYSK,
+ MI_WMYSK,
+ MI_WFYSH,
+ MI_WFOSH,
+ MI_JFOTO,
+ MI_JMOTO,
MI_CBA = 83,
MI_CBB,
diff --git a/src/peds/CivilianPed.cpp b/src/peds/CivilianPed.cpp
index ae30fdfe..2be45ba9 100644
--- a/src/peds/CivilianPed.cpp
+++ b/src/peds/CivilianPed.cpp
@@ -18,7 +18,8 @@
#include <float.h>
#endif
-// --MIAMI: Done
+// --MIAMI: file done except TODOs
+
CCivilianPed::CCivilianPed(ePedType pedtype, uint32 mi) : CPed(pedtype)
{
SetModelIndex(mi);
@@ -43,7 +44,6 @@ CCivilianPed::CCivilianPed(ePedType pedtype, uint32 mi) : CPed(pedtype)
m_bAttractorUnk = (CGeneral::GetRandomNumberInRange(0.0f, 1.0f) < 1.25f);
}
-// --MIAMI: Done
void
CCivilianPed::CivilianAI(void)
{
@@ -221,7 +221,6 @@ CCivilianPed::CivilianAI(void)
}
}
-// --MIAMI: Done except comments
void
CCivilianPed::ProcessControl(void)
{
@@ -504,7 +503,6 @@ bool CCivilianPed::IsAttractedTo(int8 type)
return false;
}
-// --MIAMI: Done
void
CCivilianPed::EnterVacantNearbyCars(void)
{
diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp
index 9160319b..10490a69 100644
--- a/src/peds/CopPed.cpp
+++ b/src/peds/CopPed.cpp
@@ -20,6 +20,8 @@
#include "Ropes.h"
#include "Stinger.h"
+// --MIAMI: file done except TODOs
+
CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP)
{
m_nCopType = copType;
@@ -83,10 +85,10 @@ CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP)
m_attackTimer = 0;
m_bBeatingSuspect = false;
m_bStopAndShootDisabledZone = false;
- field_601 = false;
+ m_bDragsPlayerFromCar = false;
m_bZoneDisabled = false;
field_628 = -1;
- m_nRoadblockNode = -1; // TODO(Miami): this will be nil
+ m_nRoadblockVeh = nil;
m_bThrowsSpikeTrap = false;
m_pRopeEntity = nil;
m_fAbseilPos = 0.0f;
@@ -106,7 +108,6 @@ CCopPed::~CCopPed()
delete m_pStinger;
}
-// --MIAMI: Done
// Parameter should always be CPlayerPed, but it seems they considered making civilians arrestable at some point
void
CCopPed::SetArrestPlayer(CPed *player)
@@ -155,7 +156,6 @@ CCopPed::SetArrestPlayer(CPed *player)
SetCurrentWeapon(WEAPONTYPE_COLT45);
}
-// --MIAMI: Done
void
CCopPed::ClearPursuit(void)
{
@@ -194,7 +194,7 @@ CCopPed::ClearPursuit(void)
bNotAllowedToDuck = false;
bKindaStayInSamePlace = false;
m_bStopAndShootDisabledZone = false;
- field_601 = false;
+ m_bDragsPlayerFromCar = false;
m_bZoneDisabled = false;
ClearObjective();
if (IsPedInControl()) {
@@ -212,7 +212,6 @@ CCopPed::ClearPursuit(void)
}
}
-// --MIAMI: Done
// TODO: I don't know why they needed that parameter.
void
CCopPed::SetPursuit(bool ignoreCopLimit)
@@ -245,7 +244,6 @@ CCopPed::SetPursuit(bool ignoreCopLimit)
}
}
-// --MIAMI: Done
void
CCopPed::ArrestPlayer(void)
{
@@ -311,7 +309,6 @@ CCopPed::ScanForCrimes(void)
}
}
-// --MIAMI: Done
void
CCopPed::CopAI(void)
{
@@ -465,17 +462,13 @@ CCopPed::CopAI(void)
bNotAllowedToDuck = false;
bDuckAndCover = false;
} else {
- // TODO(Miami): Roadblock system is still III
float dotProd;
- if (m_nRoadblockNode != -1) {
- CPathNode *roadBlockNode = &ThePaths.m_pathNodes[CRoadBlocks::RoadBlockNodes[m_nRoadblockNode]];
- dotProd = DotProduct2D(playerOrHisVeh->GetPosition() - roadBlockNode->GetPosition(), GetPosition() - roadBlockNode->GetPosition());
+ if (m_nRoadblockVeh) {
+ dotProd = DotProduct2D(playerOrHisVeh->GetPosition() - m_nRoadblockVeh->GetPosition(), GetPosition() - m_nRoadblockVeh->GetPosition());
} else
dotProd = -1.0f;
- if(dotProd >= 0.0f) {
- bIsPointingGunAt = true;
- } else {
+ if(dotProd < 0.0f) {
if (bIsDucking)
ClearDuck();
m_bIsDisabledCop = false;
@@ -484,6 +477,8 @@ CCopPed::CopAI(void)
bCrouchWhenShooting = false;
bDuckAndCover = false;
SetPursuit(false);
+ } else {
+ bIsPointingGunAt = true;
}
}
}
@@ -601,7 +596,6 @@ CCopPed::CopAI(void)
}
}
-// --MIAMI: Done
void
CCopPed::ProcessControl(void)
{
@@ -822,7 +816,6 @@ CCopPed::ProcessControl(void)
field_624 = 0;
}
-// --MIAMI: Done
void
CCopPed::ProcessHeliSwat(void)
{
@@ -858,7 +851,6 @@ CCopPed::ProcessHeliSwat(void)
}
}
-// --MIAMI: Done
void
CCopPed::ProcessStingerCop(void)
{
diff --git a/src/peds/CopPed.h b/src/peds/CopPed.h
index 190d619e..06fe54b0 100644
--- a/src/peds/CopPed.h
+++ b/src/peds/CopPed.h
@@ -14,14 +14,14 @@ enum eCopType
class CCopPed : public CPed
{
public:
- int16 m_nRoadblockNode;
+ CVehicle* m_nRoadblockVeh;
float m_fDistanceToTarget;
bool m_bIsInPursuit;
bool m_bIsDisabledCop;
int8 field_5FE;
bool m_bBeatingSuspect;
bool m_bStopAndShootDisabledZone;
- bool field_601; // set when police dragging player from car
+ bool m_bDragsPlayerFromCar;
bool m_bZoneDisabled;
float m_fAbseilPos;
eCopType m_nCopType;
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 6b704b37..a7c82f0a 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -67,6 +67,8 @@
#include "CutsceneShadow.h"
#include "Clock.h"
+// --MIAMI: file done except TODOs
+
#define CAN_SEE_ENTITY_ANGLE_THRESHOLD DEGTORAD(60.0f)
CPed *gapTempPedList[50];
@@ -10945,7 +10947,7 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
pedToDragOut->RegisterThreatWithGangPeds(ped);
if (ped->m_nPedType == PEDTYPE_COP && pedToDragOut == FindPlayerPed() && veh->IsBike())
- ((CCopPed*)ped)->field_601 = 1;
+ ((CCopPed*)ped)->m_bDragsPlayerFromCar = 1;
if (pedToDragOut == veh->pDriver) {
if (veh->pPassengers[0])
@@ -20894,11 +20896,11 @@ CPed::KillCharOnFootMelee(CVector &ourPos, CVector &targetPos, CVector &distWith
}
if (m_nPedType == PEDTYPE_COP && m_pedInObjective->IsPlayer()) {
float maxArrestDist = 1.5f;
- if (((CCopPed*)this)->field_601) {
+ if (((CCopPed*)this)->m_bDragsPlayerFromCar) {
if (m_nPedState == PED_FALL) {
maxArrestDist = 3.5f;
} else if (m_nPedState != PED_DRAG_FROM_CAR) {
- ((CCopPed*)this)->field_601 = 0;
+ ((CCopPed*)this)->m_bDragsPlayerFromCar = 0;
}
}
@@ -21139,11 +21141,11 @@ CPed::KillCharOnFootArmed(CVector &ourPos, CVector &targetPos, CVector &distWith
}
if (m_nPedType == PEDTYPE_COP && m_pedInObjective->IsPlayer()) {
float maxArrestDist = 1.5f;
- if (((CCopPed*)this)->field_601) {
+ if (((CCopPed*)this)->m_bDragsPlayerFromCar) {
if (m_nPedState == PED_FALL) {
maxArrestDist = 3.5f;
} else if (m_nPedState != PED_DRAG_FROM_CAR) {
- ((CCopPed*)this)->field_601 = 0;
+ ((CCopPed*)this)->m_bDragsPlayerFromCar = 0;
}
}
diff --git a/src/peds/PedType.h b/src/peds/PedType.h
index 3c87c866..e2eafb4f 100644
--- a/src/peds/PedType.h
+++ b/src/peds/PedType.h
@@ -14,9 +14,9 @@ enum ePedType
PEDTYPE_GANG2,
PEDTYPE_GANG3,
PEDTYPE_GANG4,
- PEDTYPE_GANG5,
+ PEDTYPE_GANG5, // Security - hardcoded
PEDTYPE_GANG6,
- PEDTYPE_GANG7, // Vercetti gang
+ PEDTYPE_GANG7, // Vercetti gang - hardcoded
PEDTYPE_GANG8,
PEDTYPE_GANG9,
PEDTYPE_EMERGENCY,
diff --git a/src/render/Coronas.cpp b/src/render/Coronas.cpp
index 2d621d18..c40577d7 100644
--- a/src/render/Coronas.cpp
+++ b/src/render/Coronas.cpp
@@ -490,7 +490,11 @@ CCoronas::RenderReflections(void)
int intensity = distanceFade*heightFade * 230.0 * CWeather::WetRoads;
CSprite::RenderBufferedOneXLUSprite(
+#ifdef FIX_BUGS
+ spriteCoors.x, spriteCoors.y, spriteCoors.z,
+#else
spriteCoors.x, spriteCoors.y, RwIm2DGetNearScreenZ(),
+#endif
spritew * aCoronas[i].size * 0.75f,
spriteh * aCoronas[i].size * 2.0f,
(intensity * CCoronas::aCoronas[i].red)>>8,
diff --git a/src/render/Credits.cpp b/src/render/Credits.cpp
index 26b333fc..4f02eca4 100644
--- a/src/render/Credits.cpp
+++ b/src/render/Credits.cpp
@@ -7,10 +7,21 @@
#include "Camera.h"
#include "Text.h"
#include "Credits.h"
+#include "Pad.h"
+
+// --MIAMI: file done
bool CCredits::bCreditsGoing;
uint32 CCredits::CreditsStartTime;
+#ifdef ASPECT_RATIO_SCALE
+#define SCALE_AND_CENTER(x) ScaleAndCenterX(x)
+extern float ScaleAndCenterX(float x);
+#else
+#define SCALE_AND_CENTER(x) SCREEN_STRETCH_X(x)
+#endif
+
+
void
CCredits::Init(void)
{
@@ -39,13 +50,21 @@ CCredits::PrintCreditSpace(float space, uint32 &line)
void
CCredits::PrintCreditText(float scaleX, float scaleY, wchar *text, uint32 &lineoffset, float scrolloffset)
{
- float start = SCREEN_HEIGHT + 50.0f;
- float y = lineoffset + start - scrolloffset;
- if(y > -50.0f && y < start){
- CFont::SetScale(scaleX, scaleY);
- CFont::PrintString(SCREEN_WIDTH/2.0f, y, (uint16*)text);
+ CPad::UpdatePads();
+ if (CPad::GetPad(0)->GetCrossJustDown())
+ bCreditsGoing = false;
+ else {
+ float start = DEFAULT_SCREEN_HEIGHT + 20.0f;
+ float y = lineoffset + start - scrolloffset;
+ if (y > 20.0f && DEFAULT_SCREEN_HEIGHT - 20.0f > y) {
+ CFont::SetScale(SCREEN_SCALE_X(scaleX), SCREEN_SCALE_Y(scaleY));
+ CFont::SetColor(CRGBA(0, 0, 0, 255));
+ CFont::PrintString(SCREEN_WIDTH / 2.0f, SCREEN_SCALE_Y(y), (uint16*)text);
+ CFont::SetColor(CRGBA(220, 220, 220, 220));
+ CFont::PrintString(SCREEN_WIDTH / 2.0f - SCREEN_SCALE_X(1.0f), SCREEN_SCALE_Y(y - 1.0f), (uint16*)text);
+ }
+ lineoffset += scaleY*25.0f;
}
- lineoffset += scaleY*25.0f;
}
void
@@ -62,434 +81,737 @@ CCredits::Render(void)
scrolloffset = (CTimer::GetTimeInMilliseconds() - CreditsStartTime) / 24.0f;
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_WIDTH - 20);
+ CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.75f));
CFont::SetCentreOn();
CFont::SetPropOn();
- CFont::SetColor(CRGBA(220, 220, 220, 220));
- CFont::SetFontStyle(FONT_HEADING);
-
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED002"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED003"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED004"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED005"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED006"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED007"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED008"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED009"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED010"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED011"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED012"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED013"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED014"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED015"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED016"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED017"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED018"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED019"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED020"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED021"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED022"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED245"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED023"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED024"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED025"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED026"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED027"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED028"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED257"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED029"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED030"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED031"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED032"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED033"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED244"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED034"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED035"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED247"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED036"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED037"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED038"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED039"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED040"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED041"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED042"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED043"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED044"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED045"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED046"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED047"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED048"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED049"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED050"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRD050A"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED051"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED052"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED053"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED054"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED055"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED056"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED248"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED249"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED250"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED251"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED252"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED253"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED057"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED058"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED059"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED254"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED255"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED060"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED061"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED062"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED063"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED064"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED065"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED066"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED067"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED068"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED069"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED070"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED071"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED072"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED073"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED074"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED075"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED076"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED077"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED078"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED079"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED080"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED081"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED082"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED083"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED084"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED242"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED259"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED260"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED261"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED262"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED085"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED086"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED087"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED088"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED089"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED090"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED091"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED094"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED095"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED096"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED097"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED098"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED099"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED263"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED264"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED265"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED267"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED270"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED266"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED100"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED101"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED102"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED103"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED104"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED105"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED106"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED268"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED269"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED107"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED108"), lineoffset, scrolloffset);
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED109"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED110"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED111"), lineoffset, scrolloffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED112"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED113"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED114"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED115"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED116"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED117"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED118"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED119"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED120"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED121"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED122"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED123"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED124"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED125"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED126"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED127"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED128"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED129"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED130"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED131"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED132"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED133"), lineoffset, scrolloffset);
- if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED134"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED135"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED136"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRD136A"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED137"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRD137A"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED138"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRD138A"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRD138B"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED139"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.7f, 1.0f, TheText.Get("CRED140"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRD140A"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRD140B"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRD140C"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRD140D"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRD140E"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED141"), lineoffset, scrolloffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED142"), lineoffset, scrolloffset);
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED143"), lineoffset, scrolloffset);
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditText(1.0f, 1.0f, TheText.Get("CRED144"), lineoffset, scrolloffset);
- PrintCreditSpace(1.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED145"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED146"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED147"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED148"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED149"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED150"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED151"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED152"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED153"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED154"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED155"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED156"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED157"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED158"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED159"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED160"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED161"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED162"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED163"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED164"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED165"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED166"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED167"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED168"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED169"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED170"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED171"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED172"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED173"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED174"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED175"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED176"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED177"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED178"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED179"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED180"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED181"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED182"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED183"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED184"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED185"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED186"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED187"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED188"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED189"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED190"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED191"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED192"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED193"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED194"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED195"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED196"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED197"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED198"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED199"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED200"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED201"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED202"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED203"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED204"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED205"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED206"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED207"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED208"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED209"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED210"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED211"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED212"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED213"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED214"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED215"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED216"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED241"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED217"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED218"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRD218A"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRD218B"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED219"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED220"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED221"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED222"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED223"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED224"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED225"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED226"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED227"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5f, lineoffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED228"), lineoffset, scrolloffset);
- PrintCreditText(1.7f, 1.7f, TheText.Get("CRED229"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.4f, 0.82f, TheText.Get("CRED230"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED231"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED232"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED233"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED234"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED235"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED236"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED237"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED238"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED239"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED240"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("LITTLE"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("NICK"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED243"), lineoffset, scrolloffset);
- PrintCreditText(1.4f, 1.4f, TheText.Get("CRED244"), lineoffset, scrolloffset);
- PrintCreditSpace(2.0f, lineoffset);
- PrintCreditSpace(2.0f, lineoffset);
-
-
- CFont::DrawFonts();
+ CFont::SetFontStyle(FONT_STANDARD);
+
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED001"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED002"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED003"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED004"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED005"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED006"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED007"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED008"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED025"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED026"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED027"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED028"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED029"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED030"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED031"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD031A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD031B"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD031C"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD031D"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD031E"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD024A"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED024"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED023"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD023A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD023B"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED018"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED019"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD018A"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD019A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD019B"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED020"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED021"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD022A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED022"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD022B"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD022C"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED032"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED033"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD032A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED034"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED035"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED036"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED037"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD037A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD037B"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD037C"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD041B"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED042"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED039"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED044"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED040"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD042A"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED142"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD142A"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED009"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED010"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED011"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED012"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED013"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD013A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD013B"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD013C"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED089"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED090"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED347"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED047"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED048"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED049"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED348"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED050"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED051"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED052"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED053"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED054"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED055"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED056"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD056A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD056B"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD056C"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD056D"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED349"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED350"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED351"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED352"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED353"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED354"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED355"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED356"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED357"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED359"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED360"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED361"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED362"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED363"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED364"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED365"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED366"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED367"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED368"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED369"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED370"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED371"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED372"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED373"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED256"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED257"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED258"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED057"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED058"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD057A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED059"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD060A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD060B"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD060C"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD002A"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED003"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD001A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD001B"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED060"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED061"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED062"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED063"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED064"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED069"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED070"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED065"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED066"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED067"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED068"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD071A"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD072A"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED091"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED094"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED095"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED097"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED098"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD098A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD098B"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD098C"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED099"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED096"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED273"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD092A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED092"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD092B"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED073"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED074"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED076"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED075"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED077"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED078"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED081"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED082"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED079"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED080"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED083"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED084"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD084A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD084B"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD084C"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD084D"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD084E"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED085"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED086"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD086A"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED087"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED088"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD088A"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD088B"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD088C"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD088D"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD088E"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD088F"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD088G"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED107"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED108"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED109"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED110"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD110A"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED111"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED112"), lineoffset, scrolloffset);
+
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED113"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED114"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED115"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED116"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED117"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED118"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED119"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED120"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED121"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED122"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED123"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED124"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED125"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED126"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED127"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED128"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED129"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+
+ CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.8f));
+
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRD111A"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED130"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED131"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED132"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED133"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED134"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134A"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134B"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134C"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134D"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134E"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134F"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134G"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134H"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD134I"), lineoffset, scrolloffset);
+
+ CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.7f));
+
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED135"), lineoffset, scrolloffset);
+
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH || FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_SPANISH)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD136A"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD137A"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED138"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED066"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD138B"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED139"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.1f, 0.8f, TheText.Get("CRED140"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_FRENCH)
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140A"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140B"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140C"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140D"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140E"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140F"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140G"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140H"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140I"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140J"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140K"), lineoffset, scrolloffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD140L"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+
+ CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.85f));
+
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED259"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED260"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED261"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED262"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED263"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED264"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED265"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED266"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED141"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD141A"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD141B"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED143"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED144"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED145"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED146"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED147"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED148"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED149"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED150"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED151"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED152"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED153"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED154"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED155"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED156"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED157"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED158"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED159"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED160"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED161"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED162"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED163"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED164"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED165"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED166"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED167"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED168"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED169"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED170"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED171"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED172"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+
+ CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.75f));
+
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED217"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED218"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRD218A"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED219"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED220"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED221"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED222"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED223"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.1f, 1.1f, TheText.Get("CRED224"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED227"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED228"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED229"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD229A"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD229B"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED274"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED275"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED276"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED277"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED278"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED279"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED280"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED281"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED282"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED283"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED284"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED285"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED286"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED287"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED288"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED289"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED290"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED291"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED292"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED293"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED294"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED295"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED296"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED297"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED298"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED299"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED300"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED301"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED302"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED303"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED304"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED305"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED306"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED307"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED308"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED309"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED310"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED314"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED315"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED316"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED317"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED318"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED319"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED320"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED321"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED322"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED323"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED324"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED325"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED326"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED327"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED328"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED329"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED330"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED331"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED332"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+
+ CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.8f));
+
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED333"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED334"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED335"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED336"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED337"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED338"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED339"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED340"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED341"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED342"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD344A"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED344"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED345"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRD345A"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED346"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(1.0f, lineoffset);
+
+ PrintCreditSpace(1.5f, lineoffset);
+
+ CFont::SetCentreSize(SCALE_AND_CENTER(DEFAULT_SCREEN_WIDTH * 0.75f));
+
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED267"), lineoffset, scrolloffset);
+ PrintCreditSpace(0.5f, lineoffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED268"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED269"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED270"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED271"), lineoffset, scrolloffset);
+ PrintCreditText(0.65f, 0.65f, TheText.Get("CRED272"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(0.95f, 0.7f, TheText.Get("CRED230"), lineoffset, scrolloffset);
+ if (FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
+ PrintCreditSpace(0.5f, lineoffset);
+
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED231"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED232"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED233"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED234"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED235"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED236"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED237"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED238"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED239"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED240"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED241"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED242"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED243"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED244"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED245"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED246"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED247"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED248"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED249"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED358"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED250"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED251"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED252"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRD251A"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRD252A"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED253"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED254"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED374"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED375"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED376"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED377"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED378"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED379"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED380"), lineoffset, scrolloffset);
+ PrintCreditText(0.95f, 0.95f, TheText.Get("CRED381"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ CFont::DrawFonts();
if(TheCamera.m_WideScreenOn)
TheCamera.DrawBordersForWideScreen();
- if(lineoffset + SCREEN_HEIGHT - scrolloffset < -10.0f)
+ if(lineoffset + DEFAULT_SCREEN_HEIGHT - scrolloffset < -10.0f)
bCreditsGoing = false;
}
@@ -497,3 +819,5 @@ bool CCredits::AreCreditsDone(void)
{
return !bCreditsGoing;
}
+
+#undef SCALE_AND_CENTER \ No newline at end of file
diff --git a/src/render/Fluff.h b/src/render/Fluff.h
index 0fc57c73..a6a28cb7 100644
--- a/src/render/Fluff.h
+++ b/src/render/Fluff.h
@@ -103,6 +103,8 @@ public:
void Update(void);
void SwitchOff(void);
void AddThisOne(CVector pos0, CVector pos1, CVector pos2, CVector pos3, bool b_isMovingDown);
+ bool IsActive() const { return m_bIsActive; };
+ const CVector& GetPosition() const { return m_midPoint; };
};
class CEscalators
@@ -114,6 +116,7 @@ public:
static void Update(void);
static void AddOne(CVector pos0, CVector pos1, CVector pos2, CVector pos3, bool b_isMovingDown);
static void Shutdown(void);
+ static const CEscalator& GetEscalator(int ind) { return aEscalators[ind]; };
};
class CMovingThing
diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp
index db40781e..2f0c3809 100644
--- a/src/render/Particle.cpp
+++ b/src/render/Particle.cpp
@@ -1261,7 +1261,11 @@ void CParticle::Update()
{
if ( CTimer::GetFrameCounter() & 10 )
{
+#ifdef FIX_BUGS
+ if ( FindPlayerPed() && FindPlayerPed()->GetWeapon()->m_eWeaponType == WEAPONTYPE_MINIGUN )
+#else
if ( FindPlayerPed()->GetWeapon()->m_eWeaponType == WEAPONTYPE_MINIGUN )
+#endif
{
AddParticle(PARTICLE_HEATHAZE, particle->m_vecPosition, CVector(0.0f, 0.0f, 0.0f));
}
diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp
index 13f52334..efcb6c14 100644
--- a/src/render/WaterLevel.cpp
+++ b/src/render/WaterLevel.cpp
@@ -2745,7 +2745,11 @@ CWaterLevel::RenderSeaBirds()
void
CWaterLevel::RenderShipsOnHorizon()
{
+#ifdef FIX_BUGS
+ CVector cur_pos = FindPlayerCoors();
+#else
CVector cur_pos = FindPlayerPed()->GetPosition();
+#endif
static CVector prev_pos(0.0f, 0.0f, 0.0f);
static CVector prev_front(0.0f, 0.0f, 0.0f);
@@ -2847,7 +2851,11 @@ CWaterLevel::HandleSeaLifeForms()
void
CWaterLevel::HandleBeachToysStuff(void)
{
+#ifdef FIX_BUGS
+ CVector cur_pos = FindPlayerCoors();
+#else
CVector cur_pos = FindPlayerPed()->GetPosition();
+#endif
static bool bBeachBallInit = true;
static CVector FirstBeachBallPos = cur_pos;
diff --git a/src/render/WaterLevel.h b/src/render/WaterLevel.h
index 5b02d54f..58940c63 100644
--- a/src/render/WaterLevel.h
+++ b/src/render/WaterLevel.h
@@ -84,7 +84,9 @@ enum eBeachToy
BEACHTOY_2,
BEACHTOY_3,
BEACHTOY_4,
- BEACHTOY_LOUNGE = 5
+ BEACHTOY_LOUNGE = 5,
+ BEACHTOY_6,
+ BEACHTOY_11 = 11
};
extern RwRaster* gpWaterRaster;
diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp
index 21b5c3c0..26208ebf 100644
--- a/src/skel/glfw/glfw.cpp
+++ b/src/skel/glfw/glfw.cpp
@@ -1,5 +1,15 @@
#if defined RW_GL3 && !defined LIBRW_SDL2
+#ifdef _WIN32
+#include <windows.h>
+#include <mmsystem.h>
+#include <shellapi.h>
+#include <windowsx.h>
+#include <basetsd.h>
+#include <regstr.h>
+#include <shlobj.h>
+#endif
+
#define WITHWINDOWS
#include "common.h"
@@ -816,12 +826,28 @@ void joysChangeCB(int jid, int event);
bool IsThisJoystickBlacklisted(int i)
{
- const char *joyname = glfwGetJoystickName(i);
+ if (glfwJoystickIsGamepad(i))
+ return false;
+
+ const char* joyname = glfwGetJoystickName(i);
// this is just a keyboard and mouse
// Microsoft Microsoft® 2.4GHz Transceiver v8.0 Consumer Control
// Microsoft Microsoft® 2.4GHz Transceiver v8.0 System Control
- if(strstr(joyname, "2.4GHz Transceiver"))
+ if (strstr(joyname, "2.4GHz Transceiver"))
+ return true;
+ // COMPANY USB Device System Control
+ // COMPANY USB Device Consumer Control
+ if (strstr(joyname, "COMPANY USB"))
+ return true;
+ // i.e. Synaptics TM2438-005
+ if (strstr(joyname, "Synaptics "))
+ return true;
+ // i.e. ELAN Touchscreen
+ if (strstr(joyname, "ELAN "))
+ return true;
+ // i.e. Primax Electronics, Ltd HP Wireless Keyboard Mouse Kit Consumer Control
+ if (strstr(joyname, "Keyboard"))
return true;
return false;
@@ -1195,7 +1221,11 @@ void resizeCB(GLFWwindow* window, int width, int height) {
* memory things don't work.
*/
/* redraw window */
- if (RwInitialised && (gGameState == GS_PLAYING_GAME || gGameState == GS_ANIMVIEWER))
+ if (RwInitialised && (gGameState == GS_PLAYING_GAME
+#ifndef MASTER
+ || gGameState == GS_ANIMVIEWER
+#endif
+ ))
{
RsEventHandler((gGameState == GS_PLAYING_GAME ? rsIDLE : rsANIMVIEWER), (void*)TRUE);
}
@@ -1625,6 +1655,72 @@ main(int argc, char *argv[])
break;
}
+ case GS_INIT_LOGO_MPEG:
+ {
+ //if (!startupDeactivate)
+ // PlayMovieInWindow(cmdShow, "movies\\Logo.mpg");
+ gGameState = GS_LOGO_MPEG;
+ TRACE("gGameState = GS_LOGO_MPEG;");
+ break;
+ }
+
+ case GS_LOGO_MPEG:
+ {
+// CPad::UpdatePads();
+
+// if (startupDeactivate || ControlsManager.GetJoyButtonJustDown() != 0)
+ ++gGameState;
+// else if (CPad::GetPad(0)->GetLeftMouseJustDown())
+// ++gGameState;
+// else if (CPad::GetPad(0)->GetEnterJustDown())
+// ++gGameState;
+// else if (CPad::GetPad(0)->GetCharJustDown(' '))
+// ++gGameState;
+// else if (CPad::GetPad(0)->GetAltJustDown())
+// ++gGameState;
+// else if (CPad::GetPad(0)->GetTabJustDown())
+// ++gGameState;
+
+ break;
+ }
+
+ case GS_INIT_INTRO_MPEG:
+ {
+//#ifndef NO_MOVIES
+// CloseClip();
+// CoUninitialize();
+//#endif
+//
+// if (CMenuManager::OS_Language == LANG_FRENCH || CMenuManager::OS_Language == LANG_GERMAN)
+// PlayMovieInWindow(cmdShow, "movies\\GTAtitlesGER.mpg");
+// else
+// PlayMovieInWindow(cmdShow, "movies\\GTAtitles.mpg");
+
+ gGameState = GS_INTRO_MPEG;
+ TRACE("gGameState = GS_INTRO_MPEG;");
+ break;
+ }
+
+ case GS_INTRO_MPEG:
+ {
+// CPad::UpdatePads();
+//
+// if (startupDeactivate || ControlsManager.GetJoyButtonJustDown() != 0)
+ ++gGameState;
+// else if (CPad::GetPad(0)->GetLeftMouseJustDown())
+// ++gGameState;
+// else if (CPad::GetPad(0)->GetEnterJustDown())
+// ++gGameState;
+// else if (CPad::GetPad(0)->GetCharJustDown(' '))
+// ++gGameState;
+// else if (CPad::GetPad(0)->GetAltJustDown())
+// ++gGameState;
+// else if (CPad::GetPad(0)->GetTabJustDown())
+// ++gGameState;
+
+ break;
+ }
+
case GS_INIT_ONCE:
{
//CoUninitialize();
@@ -1833,8 +1929,10 @@ main(int argc, char *argv[])
{
if ( gGameState == GS_PLAYING_GAME )
CGame::ShutDown();
+#ifndef MASTER
else if ( gGameState == GS_ANIMVIEWER )
CAnimViewer::Shutdown();
+#endif
CTimer::Stop();
@@ -1858,8 +1956,10 @@ main(int argc, char *argv[])
if ( gGameState == GS_PLAYING_GAME )
CGame::ShutDown();
+#ifndef MASTER
else if ( gGameState == GS_ANIMVIEWER )
CAnimViewer::Shutdown();
+#endif
DMAudio.Terminate();
@@ -1947,11 +2047,11 @@ void CapturePad(RwInt32 padID)
// Gamepad axes are guaranteed to return 0.0f if that particular gamepad doesn't have that axis.
if ( glfwPad != -1 ) {
- leftStickPos.x = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[0] : numAxes >= 0 ? axes[0] : 0.0f;
- leftStickPos.y = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[1] : numAxes >= 1 ? axes[1] : 0.0f;
+ leftStickPos.x = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[0] : numAxes >= 1 ? axes[0] : 0.0f;
+ leftStickPos.y = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[1] : numAxes >= 2 ? axes[1] : 0.0f;
- rightStickPos.x = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[2] : numAxes >= 2 ? axes[2] : 0.0f;
- rightStickPos.y = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[3] : numAxes >= 3 ? axes[3] : 0.0f;
+ rightStickPos.x = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[2] : numAxes >= 3 ? axes[2] : 0.0f;
+ rightStickPos.y = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[3] : numAxes >= 4 ? axes[3] : 0.0f;
}
{
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp
index cc106e39..1f609553 100644
--- a/src/skel/win/win.cpp
+++ b/src/skel/win/win.cpp
@@ -1099,8 +1099,11 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
if ( wParam == VK_SHIFT )
_InputTranslateShiftKeyUpDown(&ks);
-
+#ifdef FIX_BUGS
+ break;
+#else
return 0L;
+#endif
}
case WM_KEYUP:
@@ -1113,7 +1116,11 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
if ( wParam == VK_SHIFT )
_InputTranslateShiftKeyUpDown(&ks);
+#ifdef FIX_BUGS
+ break;
+#else
return 0L;
+#endif
}
case WM_SYSKEYDOWN:
@@ -1126,7 +1133,11 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
if ( wParam == VK_SHIFT )
_InputTranslateShiftKeyUpDown(&ks);
+#ifdef FIX_BUGS
+ break;
+#else
return 0L;
+#endif
}
case WM_SYSKEYUP:
@@ -1139,7 +1150,11 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
if ( wParam == VK_SHIFT )
_InputTranslateShiftKeyUpDown(&ks);
+#ifdef FIX_BUGS
+ break;
+#else
return 0L;
+#endif
}
case WM_ACTIVATEAPP:
@@ -2508,8 +2523,10 @@ WinMain(HINSTANCE instance,
{
if ( gGameState == GS_PLAYING_GAME )
CGame::ShutDown();
+#ifndef MASTER
else if ( gGameState == GS_ANIMVIEWER )
CAnimViewer::Shutdown();
+#endif
CTimer::Stop();
@@ -2533,8 +2550,10 @@ WinMain(HINSTANCE instance,
if ( gGameState == GS_PLAYING_GAME )
CGame::ShutDown();
+#ifndef MASTER
else if ( gGameState == GS_ANIMVIEWER )
CAnimViewer::Shutdown();
+#endif
DMAudio.Terminate();
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index eec44c35..05596e75 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -100,7 +100,7 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy)
}
pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)mi->m_handlingId);
- pFlyingHandling = mod_HandlingManager.GetFlyingPointer((eHandlingId)mi->m_handlingId);
+ pFlyingHandling = mod_HandlingManager.GetFlyingPointer((eHandlingId)mi->m_handlingId);
m_auto_unused1 = 20.0f;
m_auto_unused2 = 0;
@@ -1293,7 +1293,7 @@ CAutomobile::ProcessControl(void)
// Process front wheels off ground
- if(!IsRealHeli()){
+ if (!IsRealHeli()) {
if(m_aWheelTimer[CARWHEEL_FRONT_LEFT] <= 0.0f){
if(mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier) || acceleration == 0.0f)
m_aWheelSpeed[CARWHEEL_FRONT_LEFT] *= 0.95f;
@@ -1384,7 +1384,10 @@ CAutomobile::ProcessControl(void)
playRotorSound = true;
}
}else if((GetModelIndex() == MI_DODO || CVehicle::bAllDodosCheat) &&
- m_vecMoveSpeed.Magnitude() > 0.0f && CTimer::GetTimeStep() > 0.0f){
+#ifdef FIX_BUGS
+ !IsRealHeli() &&
+#endif
+ m_vecMoveSpeed.Magnitude() > 0.0f && CTimer::GetTimeStep() > 0.0f){
#ifdef ALT_DODO_CHEAT
if (bAltDodoCheat)
FlyingControl(FLIGHT_MODEL_PLANE);
@@ -1397,24 +1400,31 @@ CAutomobile::ProcessControl(void)
}else if(GetModelIndex() == MI_RCBARON){
FlyingControl(FLIGHT_MODEL_RCPLANE);
}else if(IsRealHeli() || bAllCarCheat){
- // Speed up rotor
- if(m_aWheelSpeed[1] < 0.22f && !bIsInWater){
- if(GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
- m_aWheelSpeed[1] += 0.003f;
- else
- m_aWheelSpeed[1] += 0.001f;
- }
+#ifdef RESTORE_ALLCARSHELI_CHEAT
+ if (bAllCarCheat)
+ FlyingControl(FLIGHT_MODEL_HELI);
+ else
+#endif
+ {
+ // Speed up rotor
+ if (m_aWheelSpeed[1] < 0.22f && !bIsInWater) {
+ if (GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
+ m_aWheelSpeed[1] += 0.003f;
+ else
+ m_aWheelSpeed[1] += 0.001f;
+ }
- // Fly
- if(m_aWheelSpeed[1] > 0.15f){
- if(GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
- FlyingControl(FLIGHT_MODEL_RCHELI);
- else if(m_nWheelsOnGround < 4 && !(GetModelIndex() == MI_SEASPAR && bTouchingWater) ||
- CPad::GetPad(0)->GetAccelerate() != 0 || CPad::GetPad(0)->GetCarGunUpDown() > 1.0f ||
- Abs(m_vecMoveSpeed.x) > 0.02f ||
- Abs(m_vecMoveSpeed.y) > 0.02f ||
- Abs(m_vecMoveSpeed.z) > 0.02f)
- FlyingControl(FLIGHT_MODEL_HELI);
+ // Fly
+ if (m_aWheelSpeed[1] > 0.15f) {
+ if (GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
+ FlyingControl(FLIGHT_MODEL_RCHELI);
+ else if (m_nWheelsOnGround < 4 && !(GetModelIndex() == MI_SEASPAR && bTouchingWater) ||
+ CPad::GetPad(0)->GetAccelerate() != 0 || CPad::GetPad(0)->GetCarGunUpDown() > 1.0f ||
+ Abs(m_vecMoveSpeed.x) > 0.02f ||
+ Abs(m_vecMoveSpeed.y) > 0.02f ||
+ Abs(m_vecMoveSpeed.z) > 0.02f)
+ FlyingControl(FLIGHT_MODEL_HELI);
+ }
}
// Blade collision
@@ -1486,7 +1496,7 @@ CAutomobile::ProcessControl(void)
CMatrix mat;
mat.Attach(RwFrameGetMatrix(m_aCarNodes[CAR_BONNET]));
CVector blade = mat.GetRight();
- blade = GetMatrix() * blade;
+ blade = Multiply3x3(blade, GetMatrix());
camDist /= Max(Sqrt(distSq), 0.01f);
if(Abs(DotProduct(camDist, blade)) > 0.95f){
DMAudio.PlayOneShot(m_audioEntityId, SOUND_31, 0.0f);
diff --git a/src/vehicles/Automobile.h b/src/vehicles/Automobile.h
index 3dee998d..b2f0643c 100644
--- a/src/vehicles/Automobile.h
+++ b/src/vehicles/Automobile.h
@@ -167,4 +167,5 @@ public:
static void SetAllTaxiLights(bool set);
};
-extern CVector vecHunterGunPos; \ No newline at end of file
+extern CVector vecHunterGunPos;
+extern bool bAllCarCheat; \ No newline at end of file
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp
index 086a5002..1664ffd0 100644
--- a/src/vehicles/Boat.cpp
+++ b/src/vehicles/Boat.cpp
@@ -132,7 +132,11 @@ CBoat::ProcessControl(void)
if(bRenderScorched)
m_fBuoyancy *= 0.99f;
+#ifdef FIX_BUGS
+ if(FindPlayerPed() && FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 && GetModelIndex() == MI_PREDATOR){
+#else
if(FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 && GetModelIndex() == MI_PREDATOR){
+#endif
CVehicle *playerVeh = FindPlayerVehicle();
if(playerVeh && playerVeh->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT &&
(AutoPilot.m_nCarMission == MISSION_RAMPLAYER_FARAWAY ||
diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp
index 84a19b82..130bf1e9 100644
--- a/src/vehicles/CarGen.cpp
+++ b/src/vehicles/CarGen.cpp
@@ -32,7 +32,7 @@ void CCarGenerator::SwitchOff()
void CCarGenerator::SwitchOn()
{
- m_nUsesRemaining = 255;
+ m_nUsesRemaining = UINT16_MAX;
m_nTimer = CalcNextGen();
++CTheCarGenerators::CurrentActiveCount;
}
@@ -143,10 +143,10 @@ void CCarGenerator::DoInternalProcessing()
m_nVehicleHandle = CPools::GetVehiclePool()->GetIndex(pVehicle);
/* I don't think this is a correct comparasion */
#ifdef FIX_BUGS
- if (m_nUsesRemaining != 0)
+ if (m_nUsesRemaining < UINT16_MAX)
--m_nUsesRemaining;
#else
- if (m_nUsesRemaining < -1)
+ if (m_nUsesRemaining < ~0)
--m_nUsesRemaining;
#endif
m_nTimer = CalcNextGen();
diff --git a/src/vehicles/DamageManager.cpp b/src/vehicles/DamageManager.cpp
index e4c28c95..8ba235b7 100644
--- a/src/vehicles/DamageManager.cpp
+++ b/src/vehicles/DamageManager.cpp
@@ -48,8 +48,10 @@ CDamageManager::FuckCarCompletely(void)
#endif
}
// Why set to no damage?
+#ifndef FIX_BUGS
m_lightStatus = 0;
m_panelStatus = 0;
+#endif
SetEngineStatus(250);
}
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index 378a4c0a..2e790e81 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -432,7 +432,12 @@ CVehicle::FlyingControl(eFlightModel flightModel)
case FLIGHT_MODEL_RCHELI:
case FLIGHT_MODEL_HELI:
{
- float rm = Pow(pFlyingHandling->fMoveRes, CTimer::GetTimeStep());
+#ifdef RESTORE_ALLCARSHELI_CHEAT
+ tFlyingHandlingData* flyingHandling = bAllCarCheat && GetStatus() == STATUS_PLAYER && !IsRealHeli() ? mod_HandlingManager.GetFlyingPointer(HANDLING_MAVERICK) : pFlyingHandling;
+#else
+ tFlyingHandlingData* flyingHandling = pFlyingHandling;
+#endif
+ float rm = Pow(flyingHandling->fMoveRes, CTimer::GetTimeStep());
m_vecMoveSpeed *= rm;
if (GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE)
return;
@@ -441,11 +446,11 @@ CVehicle::FlyingControl(eFlightModel flightModel)
if(fThrust < 0.0f)
fThrust *= 2.0f;
if(flightModel == FLIGHT_MODEL_RCHELI){
- fThrust = pFlyingHandling->fThrust * fThrust + 0.45f;
+ fThrust = flyingHandling->fThrust * fThrust + 0.45f;
ApplyMoveForce(GRAVITY * CVector(0.0f, 0.0f, 0.5f) * m_fMass * CTimer::GetTimeStep());
}else
- fThrust = pFlyingHandling->fThrust * fThrust + 0.95f;
- fThrust -= pFlyingHandling->fThrustFallOff * fUpSpeed;
+ fThrust = flyingHandling->fThrust * fThrust + 0.95f;
+ fThrust -= flyingHandling->fThrustFallOff * fUpSpeed;
if(flightModel == FLIGHT_MODEL_RCHELI && GetPosition().z > 40.0f)
fThrust *= 10.0f/(GetPosition().z - 30.0f);
else if(GetPosition().z > 80.0f)
@@ -453,20 +458,20 @@ CVehicle::FlyingControl(eFlightModel flightModel)
ApplyMoveForce(GRAVITY * GetUp() * fThrust * m_fMass * CTimer::GetTimeStep());
if (GetUp().z > 0.0f){
- float upRight = clamp(GetRight().z, -pFlyingHandling->fFormLift, pFlyingHandling->fFormLift);
- float upImpulseRight = -upRight * pFlyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
+ float upRight = clamp(GetRight().z, -flyingHandling->fFormLift, flyingHandling->fFormLift);
+ float upImpulseRight = -upRight * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
ApplyTurnForce(upImpulseRight * GetUp(), GetRight());
- float upFwd = clamp(GetForward().z, -pFlyingHandling->fFormLift, pFlyingHandling->fFormLift);
- float upImpulseFwd = -upFwd * pFlyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
+ float upFwd = clamp(GetForward().z, -flyingHandling->fFormLift, flyingHandling->fFormLift);
+ float upImpulseFwd = -upFwd * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
ApplyTurnForce(upImpulseFwd * GetUp(), GetForward());
}else{
- float upRight = GetRight().z < 0.0f ? -pFlyingHandling->fFormLift : pFlyingHandling->fFormLift;
- float upImpulseRight = -upRight * pFlyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
+ float upRight = GetRight().z < 0.0f ? -flyingHandling->fFormLift : flyingHandling->fFormLift;
+ float upImpulseRight = -upRight * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
ApplyTurnForce(upImpulseRight * GetUp(), GetRight());
- float upFwd = GetForward().z < 0.0f ? -pFlyingHandling->fFormLift : pFlyingHandling->fFormLift;
- float upImpulseFwd = -upFwd * pFlyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
+ float upFwd = GetForward().z < 0.0f ? -flyingHandling->fFormLift : flyingHandling->fFormLift;
+ float upImpulseFwd = -upFwd * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
ApplyTurnForce(upImpulseFwd * GetUp(), GetForward());
}
@@ -490,25 +495,25 @@ CVehicle::FlyingControl(eFlightModel flightModel)
fPitch = -CPad::GetPad(0)->GetCarGunUpDown() / 128.0f;
if (CPad::GetPad(0)->GetHorn()) {
fYaw = 0.0f;
- fPitch = clamp(pFlyingHandling->fPitchStab * DotProduct(m_vecMoveSpeed, GetForward()), -200.0f, 1.3f);
- fRoll = clamp(pFlyingHandling->fRollStab * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f);
+ fPitch = clamp(flyingHandling->fPitchStab * DotProduct(m_vecMoveSpeed, GetForward()), -200.0f, 1.3f);
+ fRoll = clamp(flyingHandling->fRollStab * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f);
}
- ApplyTurnForce(fPitch * GetUp() * pFlyingHandling->fPitch * m_fTurnMass * CTimer::GetTimeStep(), GetForward());
- ApplyTurnForce(fRoll * GetUp() * pFlyingHandling->fRoll * m_fTurnMass * CTimer::GetTimeStep(), GetRight());
+ ApplyTurnForce(fPitch * GetUp() * flyingHandling->fPitch * m_fTurnMass * CTimer::GetTimeStep(), GetForward());
+ ApplyTurnForce(fRoll * GetUp() * flyingHandling->fRoll * m_fTurnMass * CTimer::GetTimeStep(), GetRight());
float fSideSpeed = -DotProduct(GetMoveSpeed(), GetRight());
- float fSideSlipAccel = pFlyingHandling->fSideSlip * fSideSpeed * Abs(fSideSpeed);
+ float fSideSlipAccel = flyingHandling->fSideSlip * fSideSpeed * Abs(fSideSpeed);
ApplyMoveForce(m_fMass * GetRight() * fSideSlipAccel * CTimer::GetTimeStep());
- float fYawAccel = pFlyingHandling->fYawStab * fSideSpeed * Abs(fSideSpeed) + pFlyingHandling->fYaw * fYaw;
+ float fYawAccel = flyingHandling->fYawStab * fSideSpeed * Abs(fSideSpeed) + flyingHandling->fYaw * fYaw;
ApplyTurnForce(fYawAccel * GetRight() * m_fTurnMass * CTimer::GetTimeStep(), -GetForward());
- ApplyTurnForce(fYaw * GetForward() * pFlyingHandling->fYaw * m_fTurnMass * CTimer::GetTimeStep(), GetRight());
+ ApplyTurnForce(fYaw * GetForward() * flyingHandling->fYaw * m_fTurnMass * CTimer::GetTimeStep(), GetRight());
- float rX = Pow(pFlyingHandling->vecTurnRes.x, CTimer::GetTimeStep());
- float rY = Pow(pFlyingHandling->vecTurnRes.y, CTimer::GetTimeStep());
- float rZ = Pow(pFlyingHandling->vecTurnRes.z, CTimer::GetTimeStep());
+ float rX = Pow(flyingHandling->vecTurnRes.x, CTimer::GetTimeStep());
+ float rY = Pow(flyingHandling->vecTurnRes.y, CTimer::GetTimeStep());
+ float rZ = Pow(flyingHandling->vecTurnRes.z, CTimer::GetTimeStep());
CVector vecTurnSpeed = Multiply3x3(m_vecTurnSpeed, GetMatrix());
- float fResistanceMultiplier = Pow(1.0f / (pFlyingHandling->vecSpeedRes.z * SQR(vecTurnSpeed.z) + 1.0f) * rZ, CTimer::GetTimeStep());
+ float fResistanceMultiplier = Pow(1.0f / (flyingHandling->vecSpeedRes.z * SQR(vecTurnSpeed.z) + 1.0f) * rZ, CTimer::GetTimeStep());
float fResistance = vecTurnSpeed.z * fResistanceMultiplier - vecTurnSpeed.z;
vecTurnSpeed.x *= rX;
vecTurnSpeed.y *= rY;
diff --git a/src/weapons/Explosion.cpp b/src/weapons/Explosion.cpp
index 74af1375..5d4b8f80 100644
--- a/src/weapons/Explosion.cpp
+++ b/src/weapons/Explosion.cpp
@@ -31,6 +31,16 @@ void
CExplosion::Initialise()
{
debug("Initialising CExplosion...\n");
+ ClearAllExplosions();
+ AudioHandle = DMAudio.CreateEntity(AUDIOTYPE_EXPLOSION, (void*)1);
+ if (AudioHandle >= 0)
+ DMAudio.SetEntityStatus(AudioHandle, true);
+ debug("CExplosion ready\n");
+}
+
+void
+CExplosion::ClearAllExplosions()
+{
for (int i = 0; i < ARRAY_SIZE(gaExplosion); i++) {
gaExplosion[i].m_ExplosionType = EXPLOSION_GRENADE;
gaExplosion[i].m_vecPosition = CVector(0.0f, 0.0f, 0.0f);
@@ -44,10 +54,6 @@ CExplosion::Initialise()
gaExplosion[i].m_fStartTime = 0.0f;
gaExplosion[i].m_bIsBoat = false;
}
- AudioHandle = DMAudio.CreateEntity(AUDIOTYPE_EXPLOSION, (void*)1);
- if (AudioHandle >= 0)
- DMAudio.SetEntityStatus(AudioHandle, true);
- debug("CExplosion ready\n");
}
void
diff --git a/src/weapons/Explosion.h b/src/weapons/Explosion.h
index cfa75ec1..f709012e 100644
--- a/src/weapons/Explosion.h
+++ b/src/weapons/Explosion.h
@@ -37,6 +37,7 @@ class CExplosion
float m_fZshift;
public:
static void Initialise();
+ static void ClearAllExplosions();
static void Shutdown();
static int8 GetExplosionActiveCounter(uint8 id);
static void ResetExplosionActiveCounter(uint8 id);
diff --git a/vendor/opusfile b/vendor/opusfile
-Subproject 6452e838e68e8f4fc0b3599523c760ac6276ce8
+Subproject f94a1764b0dcdd84ee8c13c040de9f4c1a67e4d