merge with upstream

This commit is contained in:
Nikolay Korolev 2020-03-22 19:47:14 +03:00
commit 861506d048
31 changed files with 4593 additions and 4326 deletions

View File

@ -183,8 +183,8 @@ RpAnimBlendClumpGetMainAssociation(RpClump *clump, CAnimBlendAssociation **assoc
CAnimBlendAssociation *mainAssoc = nil; CAnimBlendAssociation *mainAssoc = nil;
CAnimBlendAssociation *secondAssoc = nil; CAnimBlendAssociation *secondAssoc = nil;
float mainBlend = 0.0; float mainBlend = 0.0f;
float secondBlend = 0.0; float secondBlend = 0.0f;
for(CAnimBlendLink *link = clumpData->link.next; link; link = link->next){ for(CAnimBlendLink *link = clumpData->link.next; link; link = link->next){
CAnimBlendAssociation *assoc = CAnimBlendAssociation::FromLink(link); CAnimBlendAssociation *assoc = CAnimBlendAssociation::FromLink(link);
@ -215,7 +215,7 @@ RpAnimBlendClumpGetMainPartialAssociation(RpClump *clump)
if(clumpData == nil) return nil; if(clumpData == nil) return nil;
CAnimBlendAssociation *mainAssoc = nil; CAnimBlendAssociation *mainAssoc = nil;
float mainBlend = 0.0; float mainBlend = 0.0f;
for(CAnimBlendLink *link = clumpData->link.next; link; link = link->next){ for(CAnimBlendLink *link = clumpData->link.next; link; link = link->next){
CAnimBlendAssociation *assoc = CAnimBlendAssociation::FromLink(link); CAnimBlendAssociation *assoc = CAnimBlendAssociation::FromLink(link);

View File

@ -8,6 +8,8 @@
#include "SurfaceTable.h" #include "SurfaceTable.h"
#include "sampman.h" #include "sampman.h"
const int CollisionSoundIntensity = 60;
void void
cAudioCollisionManager::AddCollisionToRequestedQueue() cAudioCollisionManager::AddCollisionToRequestedQueue()
{ {
@ -146,7 +148,8 @@ cAudioManager::SetUpLoopingCollisionSound(cAudioCollision *col, uint8 counter)
uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col); uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col);
if(emittingVol) { if(emittingVol) {
m_sQueueSample.m_fDistance = Sqrt(col->m_fDistance); m_sQueueSample.m_fDistance = Sqrt(col->m_fDistance);
m_sQueueSample.m_bVolume = ComputeVolume(emittingVol, 60.f, m_sQueueSample.m_fDistance); m_sQueueSample.m_bVolume =
ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) { if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = counter; m_sQueueSample.m_counter = counter;
m_sQueueSample.m_vecPos = col->m_vecPosition; m_sQueueSample.m_vecPos = col->m_vecPosition;
@ -160,7 +163,7 @@ cAudioManager::SetUpLoopingCollisionSound(cAudioCollision *col, uint8 counter)
m_sQueueSample.m_nLoopEnd = m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_48 = 4.0f; m_sQueueSample.field_48 = 4.0f;
m_sQueueSample.m_fSoundIntensity = 60.0f; m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity;
m_sQueueSample.field_56 = 0; m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 5; m_sQueueSample.field_76 = 5;
m_sQueueSample.m_bReverbFlag = true; m_sQueueSample.m_bReverbFlag = true;
@ -212,7 +215,8 @@ cAudioManager::SetUpOneShotCollisionSound(cAudioCollision *col)
emittingVol = 40.f * ratio; emittingVol = 40.f * ratio;
if(emittingVol) { if(emittingVol) {
m_sQueueSample.m_fDistance = Sqrt(col->m_fDistance); m_sQueueSample.m_fDistance = Sqrt(col->m_fDistance);
m_sQueueSample.m_bVolume = ComputeVolume(emittingVol, 60.f, m_sQueueSample.m_fDistance); m_sQueueSample.m_bVolume =
ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) { if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = gOneShotCol[s1]; m_sQueueSample.m_nSampleIndex = gOneShotCol[s1];
switch(m_sQueueSample.m_nSampleIndex) { switch(m_sQueueSample.m_nSampleIndex) {
@ -277,7 +281,7 @@ cAudioManager::SetUpOneShotCollisionSound(cAudioCollision *col)
m_sQueueSample.m_nLoopStart = 0; m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1; m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.field_48 = 4.0f; m_sQueueSample.field_48 = 4.0f;
m_sQueueSample.m_fSoundIntensity = 60.0f; m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity;
m_sQueueSample.field_56 = 1; m_sQueueSample.field_56 = 1;
m_sQueueSample.m_bReverbFlag = true; m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false; m_sQueueSample.m_bRequireReflection = false;
@ -356,7 +360,7 @@ void
cAudioManager::ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, cAudioManager::ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower,
float velocity) float velocity)
{ {
float dist; float distSquared;
CVector v1; CVector v1;
CVector v2; CVector v2;
@ -373,8 +377,8 @@ cAudioManager::ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface
v2 = entity2->GetPosition(); v2 = entity2->GetPosition();
} }
CVector pos = (v1 + v2) * 0.5f; CVector pos = (v1 + v2) * 0.5f;
dist = GetDistanceSquared(&pos); distSquared = GetDistanceSquared(&pos);
if(dist < SQR(60.f)) { if(distSquared < SQR(CollisionSoundIntensity)) {
m_sCollisionManager.m_sQueue.m_pEntity1 = entity1; m_sCollisionManager.m_sQueue.m_pEntity1 = entity1;
m_sCollisionManager.m_sQueue.m_pEntity2 = entity2; m_sCollisionManager.m_sQueue.m_pEntity2 = entity2;
m_sCollisionManager.m_sQueue.m_bSurface1 = surface1; m_sCollisionManager.m_sQueue.m_bSurface1 = surface1;
@ -382,7 +386,7 @@ cAudioManager::ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface
m_sCollisionManager.m_sQueue.m_fIntensity1 = collisionPower; m_sCollisionManager.m_sQueue.m_fIntensity1 = collisionPower;
m_sCollisionManager.m_sQueue.m_fIntensity2 = velocity; m_sCollisionManager.m_sQueue.m_fIntensity2 = velocity;
m_sCollisionManager.m_sQueue.m_vecPosition = pos; m_sCollisionManager.m_sQueue.m_vecPosition = pos;
m_sCollisionManager.m_sQueue.m_fDistance = dist; m_sCollisionManager.m_sQueue.m_fDistance = distSquared;
m_sCollisionManager.AddCollisionToRequestedQueue(); m_sCollisionManager.AddCollisionToRequestedQueue();
} }
} }
@ -396,4 +400,4 @@ InjectHook(0x5686D0, &cAudioManager::ServiceCollisions, PATCH_JUMP);
InjectHook(0x568E20, &cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol, PATCH_JUMP); InjectHook(0x568E20, &cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol, PATCH_JUMP);
InjectHook(0x568D30, &cAudioManager::SetUpLoopingCollisionSound, PATCH_JUMP); InjectHook(0x568D30, &cAudioManager::SetUpLoopingCollisionSound, PATCH_JUMP);
InjectHook(0x5689D0, &cAudioManager::SetUpOneShotCollisionSound, PATCH_JUMP); InjectHook(0x5689D0, &cAudioManager::SetUpOneShotCollisionSound, PATCH_JUMP);
ENDPATCHES ENDPATCHES

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@
#include "DMAudio.h" #include "DMAudio.h"
#include "common.h" #include "common.h"
#include "config.h"
#include "AudioCollision.h" #include "AudioCollision.h"
#include "PoliceRadio.h" #include "PoliceRadio.h"
@ -53,8 +54,8 @@ enum eScriptSounds : int16
SCRIPT_SOUND_CHINATOWN_RESTAURANT_L = 43, SCRIPT_SOUND_CHINATOWN_RESTAURANT_L = 43,
SCRIPT_SOUND_CIPRIANI_RESAURANT_S = 44, SCRIPT_SOUND_CIPRIANI_RESAURANT_S = 44,
SCRIPT_SOUND_CIPRIANI_RESAURANT_L = 45, SCRIPT_SOUND_CIPRIANI_RESAURANT_L = 45,
SCRIPT_SOUND_46 = 46, SCRIPT_SOUND_46_S = 46,
SCRIPT_SOUND_47 = 47, SCRIPT_SOUND_47_L = 47,
SCRIPT_SOUND_MARCO_BISTRO_S = 48, SCRIPT_SOUND_MARCO_BISTRO_S = 48,
SCRIPT_SOUND_MARCO_BISTRO_L = 49, SCRIPT_SOUND_MARCO_BISTRO_L = 49,
SCRIPT_SOUND_AIRPORT_LOOP_S = 50, SCRIPT_SOUND_AIRPORT_LOOP_S = 50,
@ -194,9 +195,9 @@ public:
void *m_pEntity; void *m_pEntity;
bool m_bIsUsed; bool m_bIsUsed;
uint8 m_bStatus; uint8 m_bStatus;
int16 m_awAudioEvent[4]; int16 m_awAudioEvent[NUM_AUDIOENTITY_EVENTS];
uint8 gap_18[2]; uint8 gap_18[2];
float m_afVolume[4]; float m_afVolume[NUM_AUDIOENTITY_EVENTS];
uint8 m_AudioEvents; uint8 m_AudioEvents;
uint8 field_25[3]; uint8 field_25[3];
@ -224,9 +225,9 @@ static_assert(sizeof(tPedComment) == 28, "tPedComment: error");
class cPedComments class cPedComments
{ {
public: public:
tPedComment m_asPedComments[2][20]; tPedComment m_asPedComments[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
uint8 indexMap[2][20]; uint8 indexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
uint8 nrOfCommentsInBank[2]; uint8 nrOfCommentsInBank[NUM_PED_COMMENTS_BANKS];
uint8 activeBank; uint8 activeBank;
uint8 gap_1163[1]; uint8 gap_1163[1];
@ -304,16 +305,16 @@ public:
tSound m_sQueueSample; tSound m_sQueueSample;
bool m_bActiveSampleQueue; bool m_bActiveSampleQueue;
uint8 gap_109[3]; uint8 gap_109[3];
tSound m_asSamples[2][27]; tSound m_asSamples[NUM_SOUNDS_SAMPLES_BANKS][NUM_SOUNDS_SAMPLES_SLOTS];
uint8 m_abSampleQueueIndexTable[2][27]; uint8 m_abSampleQueueIndexTable[NUM_SOUNDS_SAMPLES_BANKS][NUM_SOUNDS_SAMPLES_SLOTS];
uint8 m_bSampleRequestQueuesStatus[2]; uint8 m_bSampleRequestQueuesStatus[NUM_SOUNDS_SAMPLES_BANKS];
tSound m_asActiveSamples[27]; tSound m_asActiveSamples[NUM_SOUNDS_SAMPLES_SLOTS];
tAudioEntity m_asAudioEntities[200]; tAudioEntity m_asAudioEntities[NUM_AUDIOENTITIES];
int32 m_anAudioEntityIndices[200]; int32 m_anAudioEntityIndices[NUM_AUDIOENTITIES];
int32 m_nAudioEntitiesTotal; int32 m_nAudioEntitiesTotal;
CVector m_avecReflectionsPos[5]; CVector m_avecReflectionsPos[NUM_AUDIO_REFLECTIONS];
float m_afReflectionsDistances[5]; float m_afReflectionsDistances[NUM_AUDIO_REFLECTIONS];
int32 m_anScriptObjectEntityIndices[40]; int32 m_anScriptObjectEntityIndices[NUM_SCRIPT_MAX_ENTITIES];
int32 m_nScriptObjectEntityTotal; int32 m_nScriptObjectEntityTotal;
cPedComments m_sPedComments; cPedComments m_sPedComments;
int32 m_nFireAudioEntity; int32 m_nFireAudioEntity;
@ -331,10 +332,10 @@ public:
uint8 m_bUserPause; uint8 m_bUserPause;
uint8 m_bPreviousUserPause; uint8 m_bPreviousUserPause;
uint8 field_19195; // time? uint8 field_19195; // time?
uint32 m_nTimeOfRecentCrime; uint32 m_FrameCounter;
// getters // getters
uint32 GetFrameCounter() const { return m_nTimeOfRecentCrime; } uint32 GetFrameCounter() const { return m_FrameCounter; }
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; } float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; }
int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; } int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
bool IsMissionAudioPlaying() const { return m_sMissionAudio.m_bPlayStatus == 1; } bool IsMissionAudioPlaying() const { return m_sMissionAudio.m_bPlayStatus == 1; }
@ -354,10 +355,10 @@ public:
void ClearMissionAudio(); /// ok void ClearMissionAudio(); /// ok
void ClearRequestedQueue(); /// ok void ClearRequestedQueue(); /// ok
int32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, int32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2,
float speedMultiplier) const; /// ok float speedMultiplier) const; /// ok
int32 ComputePan(float, CVector *); /// ok int32 ComputePan(float, CVector *); /// ok
uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const; /// ok uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const; /// ok
int32 CreateEntity(int32 type, void* entity); /// ok int32 CreateEntity(int32 type, void *entity); /// ok
void DestroyAllGameCreatedEntities(); /// ok void DestroyAllGameCreatedEntities(); /// ok
void DestroyEntity(int32 id); /// ok void DestroyEntity(int32 id); /// ok
@ -498,17 +499,17 @@ public:
void ProcessBridgeOneShots(); /// ok void ProcessBridgeOneShots(); /// ok
void ProcessBridgeWarning(); /// ok void ProcessBridgeWarning(); /// ok
bool ProcessCarBombTick(cVehicleParams *params); /// ok bool ProcessCarBombTick(cVehicleParams *params); /// ok
void ProcessCesna(void *); // todo requires CPlane void ProcessCesna(cVehicleParams *params); /// ok
void ProcessCinemaScriptObject(uint8 sound); /// ok void ProcessCinemaScriptObject(uint8 sound); /// ok
void ProcessCrane(); // todo requires CCrane void ProcessCrane(); /// ok
void ProcessDocksScriptObject(uint8 sound); /// ok void ProcessDocksScriptObject(uint8 sound); /// ok
bool ProcessEngineDamage(cVehicleParams *params); /// ok bool ProcessEngineDamage(cVehicleParams *params); /// ok
void ProcessEntity(int32 sound); /// ok void ProcessEntity(int32 sound); /// ok
void ProcessExplosions(int32 explosion); /// ok void ProcessExplosions(int32 explosion); /// ok
void ProcessFireHydrant(); /// ok void ProcessFireHydrant(); /// ok
void ProcessFires(int32 entity); // todo requires gFireManager void ProcessFires(int32 entity); /// ok
void ProcessFrontEnd(); /// ok void ProcessFrontEnd(); /// ok
void ProcessGarages(); // todo requires CGarages::aGarages void ProcessGarages(); /// ok
bool ProcessHelicopter(cVehicleParams *params); /// ok bool ProcessHelicopter(cVehicleParams *params); /// ok
void ProcessHomeScriptObject(uint8 sound); /// ok void ProcessHomeScriptObject(uint8 sound); /// ok
void ProcessJumbo(cVehicleParams *); /// ok void ProcessJumbo(cVehicleParams *); /// ok
@ -535,7 +536,7 @@ public:
void ProcessProjectiles(); /// ok void ProcessProjectiles(); /// ok
void ProcessRainOnVehicle(cVehicleParams *params); /// ok void ProcessRainOnVehicle(cVehicleParams *params); /// ok
void ProcessReverb() const; /// ok void ProcessReverb() const; /// ok
bool ProcessReverseGear(cVehicleParams *a2); /// ok bool ProcessReverseGear(cVehicleParams *params); /// ok
void ProcessSawMillScriptObject(uint8 sound); /// ok void ProcessSawMillScriptObject(uint8 sound); /// ok
void ProcessScriptObject(int32 id); /// ok void ProcessScriptObject(int32 id); /// ok
void ProcessShopScriptObject(uint8 sound); /// ok void ProcessShopScriptObject(uint8 sound); /// ok
@ -558,12 +559,12 @@ public:
int32 RandomDisplacement(uint32 seed) const; int32 RandomDisplacement(uint32 seed) const;
void ReacquireDigitalHandle() const; void ReacquireDigitalHandle() const;
void ReleaseDigitalHandle() const; void ReleaseDigitalHandle() const;
void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower,
float collisionPower, float intensity2); /// ok float intensity2); /// ok
void ReportCrime(int32 crime, const CVector *pos); /// ok void ReportCrime(int32 crime, const CVector *pos); /// ok
void ResetAudioLogicTimers(uint32 timer); /// ok void ResetAudioLogicTimers(uint32 timer); /// ok
void ResetPoliceRadio(); /// ok void ResetPoliceRadio(); /// ok
void ResetTimers(uint32 time); /// ok void ResetTimers(uint32 time); /// ok
void Service(); /// ok void Service(); /// ok
void ServiceCollisions(); /// ok void ServiceCollisions(); /// ok
@ -585,7 +586,7 @@ public:
void SetUpLoopingCollisionSound(cAudioCollision *col, uint8 counter); /// ok void SetUpLoopingCollisionSound(cAudioCollision *col, uint8 counter); /// ok
void SetUpOneShotCollisionSound(cAudioCollision *col); /// ok void SetUpOneShotCollisionSound(cAudioCollision *col); /// ok
bool SetupCrimeReport(); /// ok bool SetupCrimeReport(); /// ok
bool SetupJumboEngineSound(uint8 a2, int32 a3); // todo bool SetupJumboEngineSound(uint8 vol, int32 freq); /// ok
bool SetupJumboFlySound(uint8 emittingVol); /// ok bool SetupJumboFlySound(uint8 emittingVol); /// ok
bool SetupJumboRumbleSound(uint8 emittingVol); /// ok bool SetupJumboRumbleSound(uint8 emittingVol); /// ok
bool SetupJumboTaxiSound(uint8 vol); /// ok bool SetupJumboTaxiSound(uint8 vol); /// ok
@ -606,11 +607,6 @@ public:
void AdjustSamplesVolume(); /// ok void AdjustSamplesVolume(); /// ok
uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity, uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity,
float dist); /// ok float dist); /// ok
public:
static const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples);
static const int policeChannel = channels + 1;
static const int allChannels = channels + 2;
static const int maxVolume = 127;
}; };
static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error"); static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");

File diff suppressed because it is too large Load Diff

View File

@ -21,6 +21,8 @@ uint8 &cDisplay = *(uint8 *)0x650BA1;
int32 &gRetuneCounter = *(int32*)0x650B84; int32 &gRetuneCounter = *(int32*)0x650B84;
bool& bHasStarted = *(bool*)0x650B7C; bool& bHasStarted = *(bool*)0x650B7C;
const int maxVolume = 127;
cMusicManager::cMusicManager() cMusicManager::cMusicManager()
{ {
m_bIsInitialised = false; m_bIsInitialised = false;
@ -365,7 +367,7 @@ cMusicManager::Service()
if (!m_bIsInitialised || m_bDisabled) return; if (!m_bIsInitialised || m_bDisabled) return;
if (m_nMusicMode == MUSICMODE_CUTSCENE) { if (m_nMusicMode == MUSICMODE_CUTSCENE) {
SampleManager.SetStreamedVolumeAndPan(AudioManager.maxVolume, 63, 1, 0); SampleManager.SetStreamedVolumeAndPan(maxVolume, 63, 1, 0);
return; return;
} }
@ -666,7 +668,7 @@ cMusicManager::PreloadCutSceneMusic(uint8 track)
while (SampleManager.IsStreamPlaying(0)) while (SampleManager.IsStreamPlaying(0))
SampleManager.StopStreamedFile(0); SampleManager.StopStreamedFile(0);
SampleManager.PreloadStreamedFile(track, 0); SampleManager.PreloadStreamedFile(track, 0);
SampleManager.SetStreamedVolumeAndPan(AudioManager.maxVolume, 63, 1, 0); SampleManager.SetStreamedVolumeAndPan(maxVolume, 63, 1, 0);
m_nCurrentStreamedSound = track; m_nCurrentStreamedSound = track;
} }
} }

View File

@ -11,6 +11,9 @@
#include "Vehicle.h" #include "Vehicle.h"
#include "World.h" #include "World.h"
const int maxVolume = 127;
const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples);
const int policeChannel = channels + 1;
struct tPoliceRadioZone { struct tPoliceRadioZone {
char m_aName[8]; char m_aName[8];
@ -91,7 +94,7 @@ cAudioManager::InitialisePoliceRadio()
SampleManager.SetChannelReverbFlag(policeChannel, 0); SampleManager.SetChannelReverbFlag(policeChannel, 0);
gSpecialSuspectLastSeenReport = false; gSpecialSuspectLastSeenReport = false;
for (int32 i = 0; i < ARRAY_SIZE(gMinTimeToNextReport); i++) for (int32 i = 0; i < ARRAY_SIZE(gMinTimeToNextReport); i++)
gMinTimeToNextReport[i] = m_nTimeOfRecentCrime; gMinTimeToNextReport[i] = m_FrameCounter;
} }
void void
@ -670,7 +673,7 @@ cAudioManager::ReportCrime(int32 type, const CVector *pos)
{ {
int32 lastCrime = ARRAY_SIZE(m_sPoliceRadioQueue.crimes); int32 lastCrime = ARRAY_SIZE(m_sPoliceRadioQueue.crimes);
if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 && if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 &&
(type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_nTimeOfRecentCrime >= gMinTimeToNextReport[type]) { (type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_FrameCounter >= gMinTimeToNextReport[type]) {
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) { for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
if (m_sPoliceRadioQueue.crimes[i].type) { if (m_sPoliceRadioQueue.crimes[i].type) {
if (m_sPoliceRadioQueue.crimes[i].type == type) { if (m_sPoliceRadioQueue.crimes[i].type == type) {
@ -687,7 +690,7 @@ cAudioManager::ReportCrime(int32 type, const CVector *pos)
m_sPoliceRadioQueue.crimes[lastCrime].type = type; m_sPoliceRadioQueue.crimes[lastCrime].type = type;
m_sPoliceRadioQueue.crimes[lastCrime].position = *pos; m_sPoliceRadioQueue.crimes[lastCrime].position = *pos;
m_sPoliceRadioQueue.crimes[lastCrime].timer = 0; m_sPoliceRadioQueue.crimes[lastCrime].timer = 0;
gMinTimeToNextReport[type] = m_nTimeOfRecentCrime + 500; gMinTimeToNextReport[type] = m_FrameCounter + 500;
} }
} }
} }
@ -783,4 +786,4 @@ InjectHook(0x57F1B0, &cAudioManager::ServicePoliceRadioChannel, PATCH_JUMP);
InjectHook(0x57F020, &cAudioManager::SetMissionScriptPoliceAudio, PATCH_JUMP); InjectHook(0x57F020, &cAudioManager::SetMissionScriptPoliceAudio, PATCH_JUMP);
InjectHook(0x57F5B0, &cAudioManager::SetupCrimeReport, PATCH_JUMP); InjectHook(0x57F5B0, &cAudioManager::SetupCrimeReport, PATCH_JUMP);
InjectHook(0x57FCC0, &cAudioManager::SetupSuspectLastSeenReport, PATCH_JUMP); InjectHook(0x57FCC0, &cAudioManager::SetupSuspectLastSeenReport, PATCH_JUMP);
ENDPATCHES ENDPATCHES

View File

@ -24,7 +24,7 @@ uint32& CBridge::TimeOfBridgeBecomingOperational = *(uint32*)0x8F2BC0;
void CBridge::Init() void CBridge::Init()
{ {
FindBridgeEntities(); FindBridgeEntities();
OldLift = -1.0; OldLift = -1.0f;
if (pLiftPart && pWeight) if (pLiftPart && pWeight)
{ {
DefaultZLiftPart = pLiftPart->GetPosition().z; DefaultZLiftPart = pLiftPart->GetPosition().z;
@ -60,32 +60,32 @@ void CBridge::Update()
if (timeElapsed < 10000) if (timeElapsed < 10000)
{ {
State = STATE_LIFT_PART_MOVING_DOWN; State = STATE_LIFT_PART_MOVING_DOWN;
liftHeight = 25.0 - timeElapsed / 10000.0 * 25.0; liftHeight = 25.0f - timeElapsed / 10000.0f * 25.0f;
} }
else if (timeElapsed < 40000) else if (timeElapsed < 40000)
{ {
liftHeight = 0.0; liftHeight = 0.0f;
State = STATE_LIFT_PART_IS_DOWN; State = STATE_LIFT_PART_IS_DOWN;
} }
else if (timeElapsed < 50000) else if (timeElapsed < 50000)
{ {
liftHeight = 0.0; liftHeight = 0.0f;
State = STATE_LIFT_PART_ABOUT_TO_MOVE_UP; State = STATE_LIFT_PART_ABOUT_TO_MOVE_UP;
} }
else if (timeElapsed < 60000) else if (timeElapsed < 60000)
{ {
State = STATE_LIFT_PART_MOVING_UP; State = STATE_LIFT_PART_MOVING_UP;
liftHeight = (timeElapsed - 50000) / 10000.0 * 25.0; liftHeight = (timeElapsed - 50000) / 10000.0f * 25.0f;
} }
else else
{ {
liftHeight = 25.0; liftHeight = 25.0f;
State = STATE_LIFT_PART_IS_UP; State = STATE_LIFT_PART_IS_UP;
} }
} }
else else
{ {
liftHeight = 25.0; liftHeight = 25.0f;
TimeOfBridgeBecomingOperational = 0; TimeOfBridgeBecomingOperational = 0;
State = STATE_BRIDGE_LOCKED; State = STATE_BRIDGE_LOCKED;
} }
@ -151,4 +151,4 @@ STARTPATCHES
InjectHook(0x413D10, &CBridge::ShouldLightsBeFlashing, PATCH_JUMP); InjectHook(0x413D10, &CBridge::ShouldLightsBeFlashing, PATCH_JUMP);
InjectHook(0x413D20, &CBridge::FindBridgeEntities, PATCH_JUMP); InjectHook(0x413D20, &CBridge::FindBridgeEntities, PATCH_JUMP);
InjectHook(0x413DE0, &CBridge::ThisIsABridgeObjectMovingUp, PATCH_JUMP); InjectHook(0x413DE0, &CBridge::ThisIsABridgeObjectMovingUp, PATCH_JUMP);
ENDPATCHES ENDPATCHES

View File

@ -2,6 +2,47 @@
#include "common.h" #include "common.h"
class CVehicle; class CVehicle;
class CEntity;
class CObject;
class CCrane
{
public:
CEntity *m_pObject;
CObject *m_pMagnet;
int m_nAudioEntity;
float m_fPickupX1;
float m_fPickupX2;
float m_fPickupY1;
float m_fPickupY2;
CVector m_vecDropoffTarget;
float m_fDropoffHeading;
float m_fPickupAngle;
float m_fDropoffAngle;
float m_fPickupDistance;
float m_fDropoffDistance;
float m_fAngle;
float m_fDistance;
float m_fHeight;
float m_fHookOffset;
float m_fHookHeight;
CVector m_vecHookInitPos;
CVector m_vecHookCurPos;
float m_fHookVelocityX;
float m_fHookVelocityY;
CVehicle *m_pVehiclePickedUp;
int m_nUpdateTimer;
char m_bCraneActive;
char m_bCraneStatus;
char m_bVehiclesCollected;
char m_bIsCrusher;
char m_bIsMilitaryCrane;
char field_125;
char m_bNotMilitaryCrane;
char gap_127[1];
};
static_assert(sizeof(CCrane) == 128, "CCrane: error");
class CCranes class CCranes
{ {

View File

@ -991,7 +991,7 @@ float
CPathFind::FindNodeOrientationForCarPlacement(int32 nodeId) CPathFind::FindNodeOrientationForCarPlacement(int32 nodeId)
{ {
if(m_pathNodes[nodeId].numLinks == 0) if(m_pathNodes[nodeId].numLinks == 0)
return 0.0; return 0.0f;
CVector dir = m_pathNodes[m_connections[m_pathNodes[nodeId].firstLink]].pos - m_pathNodes[nodeId].pos; CVector dir = m_pathNodes[m_connections[m_pathNodes[nodeId].firstLink]].pos - m_pathNodes[nodeId].pos;
dir.z = 0.0f; dir.z = 0.0f;
dir.Normalise(); dir.Normalise();
@ -1008,7 +1008,7 @@ CPathFind::FindNodeOrientationForCarPlacementFacingDestination(int32 nodeId, flo
CVector dir; CVector dir;
if(m_pathNodes[nodeId].numLinks == 0) if(m_pathNodes[nodeId].numLinks == 0)
return 0.0; return 0.0f;
int bestNode = m_connections[m_pathNodes[nodeId].firstLink]; int bestNode = m_connections[m_pathNodes[nodeId].firstLink];
#ifdef FIX_BUGS #ifdef FIX_BUGS

View File

@ -1,27 +1,29 @@
#include "common.h" #include "common.h"
#include "patcher.h" #include "patcher.h"
#include "main.h" #include "main.h"
#include "Pickups.h"
#include "Camera.h" #include "Camera.h"
#include "Entity.h"
#include "Timer.h"
#include "Shadows.h"
#include "Coronas.h" #include "Coronas.h"
#include "World.h"
#include "ModelIndices.h"
#include "PlayerPed.h"
#include "Object.h"
#include "Pools.h"
#include "Pad.h"
#include "Script.h"
#include "Darkel.h" #include "Darkel.h"
#include "Garages.h" #include "Entity.h"
#include "Explosion.h" #include "Explosion.h"
#include "WaterLevel.h"
#include "SpecialFX.h"
#include "PointLights.h"
#include "Sprite.h"
#include "Font.h" #include "Font.h"
#include "Garages.h"
#include "General.h"
#include "ModelIndices.h"
#include "Object.h"
#include "Pad.h"
#include "Pickups.h"
#include "PlayerPed.h"
#include "PointLights.h"
#include "Pools.h"
#include "Script.h"
#include "Shadows.h"
#include "SpecialFX.h"
#include "Sprite.h"
#include "Timer.h"
#include "WaterLevel.h"
#include "World.h"
CPickup(&CPickups::aPickUps)[NUMPICKUPS] = *(CPickup(*)[NUMPICKUPS])*(uintptr*)0x878C98; CPickup(&CPickups::aPickUps)[NUMPICKUPS] = *(CPickup(*)[NUMPICKUPS])*(uintptr*)0x878C98;
int16 CPickups::NumMessages;// = *(int16*)0x95CC98; int16 CPickups::NumMessages;// = *(int16*)0x95CC98;
@ -693,7 +695,7 @@ CPickups::DoPickUpEffects(CEntity *entity)
CVector &pos = entity->GetPosition(); CVector &pos = entity->GetPosition();
float colorModifier = ((double)(rand() & 0x1F) * 0.015f + 1.0f) * modifiedSin * 0.15f; float colorModifier = ((CGeneral::GetRandomNumber() & 0x1F) * 0.015f + 1.0f) * modifiedSin * 0.15f;
CShadows::StoreStaticShadow( CShadows::StoreStaticShadow(
(uintptr)entity, (uintptr)entity,
SHADOWTYPE_ADDITIVE, SHADOWTYPE_ADDITIVE,
@ -704,9 +706,9 @@ CPickups::DoPickUpEffects(CEntity *entity)
aWeaponReds[colorId] * colorModifier, aWeaponGreens[colorId] * colorModifier, aWeaponBlues[colorId] * colorModifier, aWeaponReds[colorId] * colorModifier, aWeaponGreens[colorId] * colorModifier, aWeaponBlues[colorId] * colorModifier,
4.0f, 1.0f, 40.0f, false, 0.0f); 4.0f, 1.0f, 40.0f, false, 0.0f);
float radius = (double)(rand() & 0xF) * 0.1 + 3.0; float radius = (CGeneral::GetRandomNumber() & 0xF) * 0.1f + 3.0f;
CPointLights::AddLight(CPointLights::LIGHT_POINT, pos, CVector(0.0f, 0.0f, 0.0f), radius, aWeaponReds[colorId] * modifiedSin / 256.0f, aWeaponGreens[colorId] * modifiedSin / 256.0f, aWeaponBlues[colorId] * modifiedSin / 256.0f, CPointLights::FOG_NONE, true); CPointLights::AddLight(CPointLights::LIGHT_POINT, pos, CVector(0.0f, 0.0f, 0.0f), radius, aWeaponReds[colorId] * modifiedSin / 256.0f, aWeaponGreens[colorId] * modifiedSin / 256.0f, aWeaponBlues[colorId] * modifiedSin / 256.0f, CPointLights::FOG_NONE, true);
float size = (double)(rand() & 0xF) * 0.0005 + 0.6; float size = (CGeneral::GetRandomNumber() & 0xF) * 0.0005f + 0.6f;
CCoronas::RegisterCorona( (uintptr)entity, CCoronas::RegisterCorona( (uintptr)entity,
aWeaponReds[colorId] * modifiedSin / 2.0f, aWeaponGreens[colorId] * modifiedSin / 2.0f, aWeaponBlues[colorId] * modifiedSin / 2.0f, aWeaponReds[colorId] * modifiedSin / 2.0f, aWeaponGreens[colorId] * modifiedSin / 2.0f, aWeaponBlues[colorId] * modifiedSin / 2.0f,
255, 255,
@ -1044,4 +1046,4 @@ STARTPATCHES
InjectHook(0x433E40, CPickups::Save, PATCH_JUMP); InjectHook(0x433E40, CPickups::Save, PATCH_JUMP);
InjectHook(0x433BA0, &CPickup::GiveUsAPickUpObject, PATCH_JUMP); InjectHook(0x433BA0, &CPickup::GiveUsAPickUpObject, PATCH_JUMP);
InjectHook(0x430860, &CPickup::Update, PATCH_JUMP); InjectHook(0x430860, &CPickup::Update, PATCH_JUMP);
ENDPATCHES ENDPATCHES

View File

@ -174,7 +174,7 @@ void CMissionCleanup::Process()
{ {
CPopulation::m_AllRandomPedsThisType = -1; CPopulation::m_AllRandomPedsThisType = -1;
CPopulation::PedDensityMultiplier = 1.0f; CPopulation::PedDensityMultiplier = 1.0f;
CCarCtrl::CarDensityMultiplier = 1.0; CCarCtrl::CarDensityMultiplier = 1.0f;
FindPlayerPed()->m_pWanted->m_fCrimeSensitivity = 1.0f; FindPlayerPed()->m_pWanted->m_fCrimeSensitivity = 1.0f;
TheCamera.Restore(); TheCamera.Restore();
TheCamera.SetWideScreenOff(); TheCamera.SetWideScreenOff();

View File

@ -416,19 +416,19 @@ CCam::Process_FollowPed(const CVector &CameraTarget, float TargetOrientation, fl
// BUG? is this ever used? // BUG? is this ever used?
// The values seem to be roughly m_fPedZoomValueSmooth + 1.85 // The values seem to be roughly m_fPedZoomValueSmooth + 1.85
if(ResetStatics){ if(ResetStatics){
if(TheCamera.PedZoomIndicator == 1.0) m_fRealGroundDist = 2.090556f; if(TheCamera.PedZoomIndicator == 1.0f) m_fRealGroundDist = 2.090556f;
if(TheCamera.PedZoomIndicator == 2.0) m_fRealGroundDist = 3.34973f; if(TheCamera.PedZoomIndicator == 2.0f) m_fRealGroundDist = 3.34973f;
if(TheCamera.PedZoomIndicator == 3.0) m_fRealGroundDist = 4.704914f; if(TheCamera.PedZoomIndicator == 3.0f) m_fRealGroundDist = 4.704914f;
if(TheCamera.PedZoomIndicator == 4.0) m_fRealGroundDist = 2.090556f; if(TheCamera.PedZoomIndicator == 4.0f) m_fRealGroundDist = 2.090556f;
} }
// And what is this? It's only used for collision and rotation it seems // And what is this? It's only used for collision and rotation it seems
float RealGroundDist; float RealGroundDist;
if(TheCamera.PedZoomIndicator == 1.0) RealGroundDist = 2.090556f; if(TheCamera.PedZoomIndicator == 1.0f) RealGroundDist = 2.090556f;
if(TheCamera.PedZoomIndicator == 2.0) RealGroundDist = 3.34973f; if(TheCamera.PedZoomIndicator == 2.0f) RealGroundDist = 3.34973f;
if(TheCamera.PedZoomIndicator == 3.0) RealGroundDist = 4.704914f; if(TheCamera.PedZoomIndicator == 3.0f) RealGroundDist = 4.704914f;
if(TheCamera.PedZoomIndicator == 4.0) RealGroundDist = 2.090556f; if(TheCamera.PedZoomIndicator == 4.0f) RealGroundDist = 2.090556f;
if(m_fCloseInPedHeightOffset > 0.00001f) if(m_fCloseInPedHeightOffset > 0.00001f)
RealGroundDist = 1.7016; RealGroundDist = 1.7016f;
bool Shooting = false; bool Shooting = false;
@ -1344,30 +1344,30 @@ CCamera::SetCamCutSceneOffSet(const CVector &pos)
void void
CCamera::TakeControlWithSpline(short nSwitch) CCamera::TakeControlWithSpline(short nSwitch)
{ {
m_iModeToGoTo = CCam::MODE_FLYBY; m_iModeToGoTo = CCam::MODE_FLYBY;
m_bLookingAtPlayer = false; m_bLookingAtPlayer = false;
m_bLookingAtVector = false; m_bLookingAtVector = false;
m_bcutsceneFinished = false; m_bcutsceneFinished = false;
m_iTypeOfSwitch = nSwitch; m_iTypeOfSwitch = nSwitch;
m_bStartInterScript = true; m_bStartInterScript = true;
//FindPlayerPed(); // unused //FindPlayerPed(); // unused
}; };
void CCamera::SetCameraDirectlyInFrontForFollowPed_CamOnAString() void CCamera::SetCameraDirectlyInFrontForFollowPed_CamOnAString()
{ {
m_bCamDirectlyInFront = true; m_bCamDirectlyInFront = true;
CPlayerPed *player = FindPlayerPed(); CPlayerPed *player = FindPlayerPed();
if (player) if (player)
m_PedOrientForBehindOrInFront = CGeneral::GetATanOfXY(player->GetForward().x, player->GetForward().y); m_PedOrientForBehindOrInFront = CGeneral::GetATanOfXY(player->GetForward().x, player->GetForward().y);
} }
void CCamera::SetCameraDirectlyBehindForFollowPed_CamOnAString() void CCamera::SetCameraDirectlyBehindForFollowPed_CamOnAString()
{ {
m_bCamDirectlyBehind = true; m_bCamDirectlyBehind = true;
CPlayerPed *player = FindPlayerPed(); CPlayerPed *player = FindPlayerPed();
if (player) if (player)
m_PedOrientForBehindOrInFront = CGeneral::GetATanOfXY(player->GetForward().x, player->GetForward().y); m_PedOrientForBehindOrInFront = CGeneral::GetATanOfXY(player->GetForward().x, player->GetForward().y);
} }
void void
@ -1382,80 +1382,80 @@ CCamera::SetWideScreenOff(void)
m_bWantsToSwitchWidescreenOff = m_WideScreenOn; m_bWantsToSwitchWidescreenOff = m_WideScreenOn;
} }
void void
CCamera::SetNewPlayerWeaponMode(int16 mode, int16 minZoom, int16 maxZoom) CCamera::SetNewPlayerWeaponMode(int16 mode, int16 minZoom, int16 maxZoom)
{ {
PlayerWeaponMode.Mode = mode; PlayerWeaponMode.Mode = mode;
PlayerWeaponMode.MaxZoom = maxZoom; PlayerWeaponMode.MaxZoom = maxZoom;
PlayerWeaponMode.MinZoom = minZoom; PlayerWeaponMode.MinZoom = minZoom;
PlayerWeaponMode.Duration = 0.0f; PlayerWeaponMode.Duration = 0.0f;
} }
void void
CCamera::UpdateAimingCoors(CVector const &coors) CCamera::UpdateAimingCoors(CVector const &coors)
{ {
m_cvecAimingTargetCoors = coors; m_cvecAimingTargetCoors = coors;
} }
void void
CCamera::SetCamPositionForFixedMode(const CVector &Source, const CVector &UpOffSet) CCamera::SetCamPositionForFixedMode(const CVector &Source, const CVector &UpOffSet)
{ {
m_vecFixedModeSource = Source; m_vecFixedModeSource = Source;
m_vecFixedModeUpOffSet = UpOffSet; m_vecFixedModeUpOffSet = UpOffSet;
} }
void void
CCamera::SetRwCamera(RwCamera *cam) CCamera::SetRwCamera(RwCamera *cam)
{ {
m_pRwCamera = cam; m_pRwCamera = cam;
m_viewMatrix.Attach(&m_pRwCamera->viewMatrix, false); m_viewMatrix.Attach(&m_pRwCamera->viewMatrix, false);
CMBlur::MotionBlurOpen(m_pRwCamera); CMBlur::MotionBlurOpen(m_pRwCamera);
} }
uint32 uint32
CCamera::GetCutSceneFinishTime(void) CCamera::GetCutSceneFinishTime(void)
{ {
int cam = ActiveCam; int cam = ActiveCam;
if (Cams[cam].Mode == CCam::MODE_FLYBY) if (Cams[cam].Mode == CCam::MODE_FLYBY)
return Cams[cam].m_uiFinishTime; return Cams[cam].m_uiFinishTime;
cam = (cam + 1) % 2; cam = (cam + 1) % 2;
if (Cams[cam].Mode == CCam::MODE_FLYBY) if (Cams[cam].Mode == CCam::MODE_FLYBY)
return Cams[cam].m_uiFinishTime; return Cams[cam].m_uiFinishTime;
return 0; return 0;
} }
void void
CCamera::FinishCutscene(void) CCamera::FinishCutscene(void)
{ {
SetPercentAlongCutScene(100.0f); SetPercentAlongCutScene(100.0f);
m_fPositionAlongSpline = 1.0f; m_fPositionAlongSpline = 1.0f;
m_bcutsceneFinished = true; m_bcutsceneFinished = true;
} }
void void
CCamera::SetZoomValueFollowPedScript(int16 mode) CCamera::SetZoomValueFollowPedScript(int16 mode)
{ {
switch (mode) { switch (mode) {
case 0: m_fPedZoomValueScript = 0.25f; break; case 0: m_fPedZoomValueScript = 0.25f; break;
case 1: m_fPedZoomValueScript = 1.5f; break; case 1: m_fPedZoomValueScript = 1.5f; break;
case 2: m_fPedZoomValueScript = 2.9f; break; case 2: m_fPedZoomValueScript = 2.9f; break;
default: m_fPedZoomValueScript = m_fPedZoomValueScript; break; default: m_fPedZoomValueScript = m_fPedZoomValueScript; break;
} }
m_bUseScriptZoomValuePed = true; m_bUseScriptZoomValuePed = true;
} }
void void
CCamera::SetZoomValueCamStringScript(int16 mode) CCamera::SetZoomValueCamStringScript(int16 mode)
{ {
switch (mode) { switch (mode) {
case 0: m_fCarZoomValueScript = 0.05f; break; case 0: m_fCarZoomValueScript = 0.05f; break;
case 1: m_fCarZoomValueScript = 1.9f; break; case 1: m_fCarZoomValueScript = 1.9f; break;
case 2: m_fCarZoomValueScript = 3.9f; break; case 2: m_fCarZoomValueScript = 3.9f; break;
default: m_fCarZoomValueScript = m_fCarZoomValueScript; break; default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
} }
m_bUseScriptZoomValueCar = true; m_bUseScriptZoomValueCar = true;
} }

View File

@ -28,8 +28,8 @@ class CFireManager
MAX_FIREMEN_ATTENDING = 2, MAX_FIREMEN_ATTENDING = 2,
}; };
uint32 m_nTotalFires; uint32 m_nTotalFires;
CFire m_aFires[NUM_FIRES];
public: public:
CFire m_aFires[NUM_FIRES];
void StartFire(CEntity *entityOnFire, CEntity *culprit, float, uint32); void StartFire(CEntity *entityOnFire, CEntity *culprit, float, uint32);
void StartFire(CVector, float, uint8); void StartFire(CVector, float, uint8);
void Update(void); void Update(void);

View File

@ -103,7 +103,7 @@ void CTimer::Update(void)
{ {
m_snTimeInMilliseconds = m_snTimeInMilliseconds + upd; m_snTimeInMilliseconds = m_snTimeInMilliseconds + upd;
m_snTimeInMillisecondsNonClipped = m_snTimeInMillisecondsNonClipped + upd; m_snTimeInMillisecondsNonClipped = m_snTimeInMillisecondsNonClipped + upd;
ms_fTimeStep = updInCyclesScaled / (double)_nCyclesPerMS / 20.0; ms_fTimeStep = updInCyclesScaled / (double)_nCyclesPerMS / 20.0f;
} }
} }
else else

View File

@ -4,7 +4,6 @@
#define _USE_MATH_DEFINES #define _USE_MATH_DEFINES
#pragma warning(disable: 4244) // int to float #pragma warning(disable: 4244) // int to float
#pragma warning(disable: 4800) // int to bool #pragma warning(disable: 4800) // int to bool
#pragma warning(disable: 4305) // double to float
#pragma warning(disable: 4838) // narrowing conversion #pragma warning(disable: 4838) // narrowing conversion
#pragma warning(disable: 4996) // POSIX names #pragma warning(disable: 4996) // POSIX names

View File

@ -3,8 +3,8 @@
enum Config { enum Config {
NUMPLAYERS = 1, NUMPLAYERS = 1,
NUMCDIMAGES = 12, // gta3.img duplicates (not used on PC) NUMCDIMAGES = 12, // gta3.img duplicates (not used on PC)
MAX_CDIMAGES = 8, // additional cdimages MAX_CDIMAGES = 8, // additional cdimages
MAX_CDCHANNELS = 5, MAX_CDCHANNELS = 5,
MODELINFOSIZE = 5500, MODELINFOSIZE = 5500,
@ -22,15 +22,15 @@ enum Config {
XTRACOMPSMODELSIZE = 2, XTRACOMPSMODELSIZE = 2,
TWODFXSIZE = 2000, TWODFXSIZE = 2000,
MAXVEHICLESLOADED = 50, // 70 on mobile MAXVEHICLESLOADED = 50, // 70 on mobile
NUMOBJECTINFO = 168, // object.dat NUMOBJECTINFO = 168, // object.dat
// Pool sizes // Pool sizes
NUMPTRNODES = 30000, // 26000 on PS2 NUMPTRNODES = 30000, // 26000 on PS2
NUMENTRYINFOS = 5400, // 3200 on PS2 NUMENTRYINFOS = 5400, // 3200 on PS2
NUMPEDS = 140, // 90 on PS2 NUMPEDS = 140, // 90 on PS2
NUMVEHICLES = 110, // 70 on PS2 NUMVEHICLES = 110, // 70 on PS2
NUMBUILDINGS = 5500, // 4915 on PS2 NUMBUILDINGS = 5500, // 4915 on PS2
NUMTREADABLES = 1214, NUMTREADABLES = 1214,
NUMOBJECTS = 450, NUMOBJECTS = 450,
@ -94,6 +94,8 @@ enum Config {
NUM_GARAGES = 32, NUM_GARAGES = 32,
NUM_PROJECTILES = 32, NUM_PROJECTILES = 32,
NUM_WATERCANNONS = 3,
NUMPEDROUTES = 200, NUMPEDROUTES = 200,
NUMPHONES = 50, NUMPHONES = 50,
NUMPEDGROUPS = 31, NUMPEDGROUPS = 31,
@ -102,7 +104,16 @@ enum Config {
NUMVISIBLEENTITIES = 2000, NUMVISIBLEENTITIES = 2000,
NUMINVISIBLEENTITIES = 150, NUMINVISIBLEENTITIES = 150,
NUM_CONSOLEMESSAGES = 8 NUM_AUDIOENTITY_EVENTS = 4,
NUM_PED_COMMENTS_BANKS = 2,
NUM_PED_COMMENTS_SLOTS = 20,
NUM_SOUNDS_SAMPLES_BANKS = 2,
NUM_SOUNDS_SAMPLES_SLOTS = 27,
NUM_AUDIOENTITIES = 200,
NUM_AUDIO_REFLECTIONS = 5,
NUM_SCRIPT_MAX_ENTITIES = 40,
}; };
// We'll use this once we're ready to become independent of the game // We'll use this once we're ready to become independent of the game

View File

@ -217,7 +217,7 @@ Idle(void *arg)
RenderEffects(); RenderEffects();
if((TheCamera.m_BlurType == MBLUR_NONE || TheCamera.m_BlurType == MBLUR_NORMAL) && if((TheCamera.m_BlurType == MBLUR_NONE || TheCamera.m_BlurType == MBLUR_NORMAL) &&
TheCamera.m_ScreenReductionPercentage > 0.0) TheCamera.m_ScreenReductionPercentage > 0.0f)
TheCamera.SetMotionBlurAlpha(150); TheCamera.SetMotionBlurAlpha(150);
TheCamera.RenderMotionBlur(); TheCamera.RenderMotionBlur();

View File

@ -1831,7 +1831,7 @@ CPhysical::ProcessCollision(void)
if(IsPed() && (distSq >= sq(0.2f) || ped->IsPlayer())){ if(IsPed() && (distSq >= sq(0.2f) || ped->IsPlayer())){
if(ped->IsPlayer()) if(ped->IsPlayer())
n = max(NUMSTEPS(0.2f), 2.0); n = max(NUMSTEPS(0.2f), 2.0f);
else else
n = NUMSTEPS(0.3f); n = NUMSTEPS(0.3f);
step = savedTimeStep / n; step = savedTimeStep / n;

View File

@ -90,7 +90,7 @@ CObjectData::SetObjectData(int32 modelId, CObject &object)
object.m_nCollisionDamageEffect = objinfo->m_nCollisionDamageEffect; object.m_nCollisionDamageEffect = objinfo->m_nCollisionDamageEffect;
object.m_nSpecialCollisionResponseCases = objinfo->m_nSpecialCollisionResponseCases; object.m_nSpecialCollisionResponseCases = objinfo->m_nSpecialCollisionResponseCases;
object.m_bCameraToAvoidThisObject = objinfo->m_bCameraToAvoidThisObject; object.m_bCameraToAvoidThisObject = objinfo->m_bCameraToAvoidThisObject;
if(object.m_fMass >= 99998.0){ if(object.m_fMass >= 99998.0f){
object.bInfiniteMass = true; object.bInfiniteMass = true;
object.bAffectedByGravity = false; object.bAffectedByGravity = false;
object.bExplosionProof = true; object.bExplosionProof = true;

View File

@ -7642,21 +7642,21 @@ CPed::Flee(void)
else if (PI + angleToFleeEntity < angleToFleeDamagingThing) else if (PI + angleToFleeEntity < angleToFleeDamagingThing)
angleToFleeDamagingThing -= TWOPI; angleToFleeDamagingThing -= TWOPI;
if (damagingThingPriorityMult <= 1.0) { if (damagingThingPriorityMult <= 1.0f) {
// Range [0.0, 1.0] // Range [0.0, 1.0]
double angleToFleeBoth = (angleToFleeDamagingThing + angleToFleeEntity) * 0.5; float angleToFleeBoth = (angleToFleeDamagingThing + angleToFleeEntity) * 0.5f;
if (m_fRotationDest - PI > angleToFleeBoth) if (m_fRotationDest - PI > angleToFleeBoth)
angleToFleeBoth += TWOPI; angleToFleeBoth += TWOPI;
else if (PI + m_fRotationDest < angleToFleeBoth) else if (PI + m_fRotationDest < angleToFleeBoth)
angleToFleeBoth -= TWOPI; angleToFleeBoth -= TWOPI;
m_fRotationDest = (1.0 - damagingThingPriorityMult) * m_fRotationDest + damagingThingPriorityMult * angleToFleeBoth; m_fRotationDest = (1.0f - damagingThingPriorityMult) * m_fRotationDest + damagingThingPriorityMult * angleToFleeBoth;
} else { } else {
// Range (1.0, 1.5] // Range (1.0, 1.5]
double adjustedMult = (damagingThingPriorityMult - 1.0) * 2.0; double adjustedMult = (damagingThingPriorityMult - 1.0f) * 2.0f;
m_fRotationDest = angleToFleeEntity * (1.0 - adjustedMult) + adjustedMult * angleToFleeDamagingThing; m_fRotationDest = angleToFleeEntity * (1.0 - adjustedMult) + adjustedMult * angleToFleeDamagingThing;
} }
} else { } else {
@ -10169,7 +10169,7 @@ CPed::ProcessControl(void)
} }
if (!bIsStanding && m_vecMoveSpeed.z > 0.25f) { if (!bIsStanding && m_vecMoveSpeed.z > 0.25f) {
double airResistance = Pow(0.95, CTimer::GetTimeStep()); float airResistance = Pow(0.95f, CTimer::GetTimeStep());
m_vecMoveSpeed *= airResistance; m_vecMoveSpeed *= airResistance;
} }
@ -15048,7 +15048,7 @@ CPed::ProcessBuoyancy(void)
m_vecMoveSpeed.y *= speedMult; m_vecMoveSpeed.y *= speedMult;
if (m_vecMoveSpeed.z >= -0.1f) { if (m_vecMoveSpeed.z >= -0.1f) {
if (m_vecMoveSpeed.z < -0.04f) if (m_vecMoveSpeed.z < -0.04f)
m_vecMoveSpeed.z = -0.02; m_vecMoveSpeed.z = -0.02f;
} else { } else {
m_vecMoveSpeed.z = -0.01f; m_vecMoveSpeed.z = -0.01f;
DMAudio.PlayOneShot(m_audioEntityId, SOUND_SPLASH, 0.0f); DMAudio.PlayOneShot(m_audioEntityId, SOUND_SPLASH, 0.0f);
@ -17676,4 +17676,4 @@ STARTPATCHES
InjectHook(0x4E52A0, &CPed::WarpPedToNearLeaderOffScreen, PATCH_JUMP); InjectHook(0x4E52A0, &CPed::WarpPedToNearLeaderOffScreen, PATCH_JUMP);
InjectHook(0x4E0220, &CPed::SetCarJack, PATCH_JUMP); InjectHook(0x4E0220, &CPed::SetCarJack, PATCH_JUMP);
InjectHook(0x4D6780, &CPed::Solicit, PATCH_JUMP); InjectHook(0x4D6780, &CPed::Solicit, PATCH_JUMP);
ENDPATCHES ENDPATCHES

View File

@ -1170,4 +1170,4 @@ STARTPATCHES
InjectHook(0x4F4690, &CPopulation::TestRoomForDummyObject, PATCH_JUMP); InjectHook(0x4F4690, &CPopulation::TestRoomForDummyObject, PATCH_JUMP);
InjectHook(0x4F45A0, &CPopulation::ConvertToDummyObject, PATCH_JUMP); InjectHook(0x4F45A0, &CPopulation::ConvertToDummyObject, PATCH_JUMP);
InjectHook(0x4F4410, &CPopulation::ConvertAllObjectsToDummyObjects, PATCH_JUMP); InjectHook(0x4F4410, &CPopulation::ConvertAllObjectsToDummyObjects, PATCH_JUMP);
ENDPATCHES ENDPATCHES

View File

@ -457,7 +457,7 @@ CCoronas::RenderReflections(void)
continue; continue;
// Don't draw if reflection is too high // Don't draw if reflection is too high
if(aCoronas[i].heightAboveRoad < 20.0){ if(aCoronas[i].heightAboveRoad < 20.0f){
// don't draw if camera is below road // don't draw if camera is below road
if(CCoronas::aCoronas[i].coors.z - aCoronas[i].heightAboveRoad > TheCamera.GetPosition().z) if(CCoronas::aCoronas[i].coors.z - aCoronas[i].heightAboveRoad > TheCamera.GetPosition().z)
continue; continue;

View File

@ -68,199 +68,199 @@ CCredits::Render(void)
CFont::SetColor(CRGBA(220, 220, 220, 220)); CFont::SetColor(CRGBA(220, 220, 220, 220));
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_HEADING);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED002"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED002"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED003"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED003"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED004"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED004"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED005"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED005"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED006"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED006"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED007"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED007"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED008"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED008"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED009"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED009"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED010"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED010"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED011"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED011"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED012"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED012"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED013"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED013"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED014"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED014"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED015"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED015"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED016"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED016"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED017"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED017"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED018"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED018"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED019"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED019"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED020"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED020"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED021"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED021"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED022"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED022"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED245"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED245"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED023"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED023"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED024"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED024"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED025"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED025"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED026"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED026"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED027"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED027"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED028"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED028"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED257"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED257"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED029"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED029"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED030"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED030"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED031"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED031"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED032"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED032"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED033"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED033"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED244"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED244"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED034"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED034"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED035"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED035"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED247"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED247"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED036"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED036"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED037"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED037"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED038"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED038"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED039"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED039"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED040"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED040"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED041"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED041"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED042"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED042"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED043"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED043"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED044"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED044"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED045"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED045"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED046"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED046"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED047"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED047"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED048"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED048"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED049"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED049"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED050"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED050"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRD050A"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRD050A"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED051"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED051"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED052"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED052"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED053"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED053"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED054"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED054"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED055"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED055"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED056"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED056"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED248"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED248"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED249"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED249"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED250"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED250"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED251"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED251"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED252"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED252"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED253"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED253"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED057"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED057"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED058"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED058"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED059"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED059"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED254"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED254"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED255"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED255"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED060"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED060"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED061"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED061"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED062"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED062"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED063"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED063"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED064"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED064"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED065"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED065"), lineoffset, scrolloffset);
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED066"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED066"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED067"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED067"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED068"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED068"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED069"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED069"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED070"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED070"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED071"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED071"), lineoffset, scrolloffset);
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED072"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED072"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED073"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED073"), lineoffset, scrolloffset);
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED074"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED074"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED075"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED075"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED076"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED076"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED077"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED077"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED078"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED078"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED079"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED079"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED080"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED080"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED081"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED081"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED082"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED082"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED083"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED083"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED084"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED084"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED242"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED242"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED259"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED259"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED260"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED260"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED261"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED261"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED262"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED262"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED085"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED085"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED086"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED086"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED087"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED087"), lineoffset, scrolloffset);
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED088"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED088"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED089"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED089"), lineoffset, scrolloffset);
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED090"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED090"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED091"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED091"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED094"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED094"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED095"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED095"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED096"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED096"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED097"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED097"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED098"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED098"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED099"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED099"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED263"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED263"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED264"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED264"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED265"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED265"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED267"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED267"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED270"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED270"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED266"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED266"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED100"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED100"), lineoffset, scrolloffset);
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED101"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED101"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED102"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED102"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED103"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED103"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED104"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED104"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED105"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED105"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED106"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED106"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED268"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED268"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED269"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED269"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED107"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED107"), lineoffset, scrolloffset);
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED108"), lineoffset, scrolloffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED108"), lineoffset, scrolloffset);
PrintCreditSpace(1.0, lineoffset); PrintCreditSpace(1.0, lineoffset);
@ -268,8 +268,8 @@ CCredits::Render(void)
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset); PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED110"), lineoffset, scrolloffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED110"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED111"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED111"), lineoffset, scrolloffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED112"), lineoffset, scrolloffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED112"), lineoffset, scrolloffset);
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset); PrintCreditSpace(1.0, lineoffset);
@ -337,152 +337,152 @@ CCredits::Render(void)
if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN)
PrintCreditSpace(1.0, lineoffset); PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED134"), lineoffset, scrolloffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED134"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED135"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED135"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED136"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED136"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRD136A"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRD136A"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED137"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED137"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRD137A"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRD137A"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED138"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED138"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRD138A"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRD138A"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRD138B"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRD138B"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED139"), lineoffset, scrolloffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED139"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7, 1.0, TheText.Get("CRED140"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED140"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRD140A"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRD140A"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRD140B"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRD140B"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRD140C"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRD140C"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRD140D"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRD140D"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRD140E"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRD140E"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED141"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED141"), lineoffset, scrolloffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED142"), lineoffset, scrolloffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED142"), lineoffset, scrolloffset);
PrintCreditSpace(1.0, lineoffset); PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED143"), lineoffset, scrolloffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED143"), lineoffset, scrolloffset);
PrintCreditSpace(1.0, lineoffset); PrintCreditSpace(1.0, lineoffset);
PrintCreditText(1.0, 1.0, TheText.Get("CRED144"), lineoffset, scrolloffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED144"), lineoffset, scrolloffset);
PrintCreditSpace(1.0, lineoffset); PrintCreditSpace(1.0, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED145"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED145"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED146"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED146"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED147"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED147"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED148"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED148"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED149"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED149"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED150"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED150"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED151"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED151"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED152"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED152"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED153"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED153"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED154"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED154"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED155"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED155"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED156"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED156"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED157"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED157"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED158"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED158"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED159"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED159"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED160"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED160"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED161"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED161"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED162"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED162"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED163"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED163"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED164"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED164"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED165"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED165"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED166"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED166"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED167"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED167"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED168"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED168"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED169"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED169"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED170"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED170"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED171"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED171"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED172"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED172"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED173"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED173"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED174"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED174"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED175"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED175"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED176"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED176"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED177"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED177"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED178"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED178"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED179"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED179"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED180"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED180"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED181"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED181"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED182"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED182"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED183"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED183"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED184"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED184"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED185"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED185"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED186"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED186"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED187"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED187"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED188"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED188"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED189"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED189"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED190"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED190"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED191"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED191"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED192"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED192"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED193"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED193"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED194"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED194"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED195"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED195"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED196"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED196"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED197"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED197"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED198"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED198"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED199"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED199"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED200"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED200"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED201"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED201"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED202"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED202"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED203"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED203"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED204"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED204"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED205"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED205"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED206"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED206"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED207"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED207"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED208"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED208"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED209"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED209"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED210"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED210"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED211"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED211"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED212"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED212"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED213"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED213"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED214"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED214"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED215"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED215"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED216"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED216"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED241"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED241"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED217"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED217"), lineoffset, scrolloffset);
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED218"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED218"), lineoffset, scrolloffset);
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRD218A"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRD218A"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRD218B"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRD218B"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED219"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED219"), lineoffset, scrolloffset);
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED220"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED220"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED221"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED221"), lineoffset, scrolloffset);
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED222"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED222"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED223"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED223"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED224"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED224"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED225"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED225"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED226"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED226"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED227"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED227"), lineoffset, scrolloffset);
PrintCreditSpace(1.5, lineoffset); PrintCreditSpace(1.5, lineoffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED228"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED228"), lineoffset, scrolloffset);
PrintCreditText(1.7, 1.7, TheText.Get("CRED229"), lineoffset, scrolloffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED229"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4, 0.82, TheText.Get("CRED230"), lineoffset, scrolloffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED230"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED231"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED231"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED232"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED232"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED233"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED233"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED234"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED234"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED235"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED235"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED236"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED236"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED237"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED237"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED238"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED238"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED239"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED239"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED240"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED240"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("LITTLE"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("LITTLE"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("NICK"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("NICK"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED243"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED243"), lineoffset, scrolloffset);
PrintCreditText(1.4, 1.4, TheText.Get("CRED244"), lineoffset, scrolloffset); PrintCreditText(1.4f, 1.4f, TheText.Get("CRED244"), lineoffset, scrolloffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0, lineoffset); PrintCreditSpace(2.0f, lineoffset);
CFont::DrawFonts(); CFont::DrawFonts();

View File

@ -106,17 +106,17 @@ void CMovingThings::Init()
Num = 0; Num = 0;
// Initialize scroll bars // Initialize scroll bars
aScrollBars[0].Init(CVector( 228.3f, -669.0f, 39.0f ), SCROLL_BUSINESS, 0.0, 0.5, 0.5, 255, 128, 0, 0.3); aScrollBars[0].Init(CVector( 228.3f, -669.0f, 39.0f ), SCROLL_BUSINESS, 0.0f, 0.5f, 0.5f, 255, 128, 0, 0.3f);
aScrollBars[1].Init(CVector( 772.0f, 164.0f, -9.5f ), SCROLL_TRAFFIC, 0.0, 0.5, 0.25, 128, 255, 0, 0.3); aScrollBars[1].Init(CVector( 772.0f, 164.0f, -9.5f ), SCROLL_TRAFFIC, 0.0f, 0.5f, 0.25f, 128, 255, 0, 0.3f);
aScrollBars[2].Init(CVector(-1089.61f, -584.224f, 13.246f), SCROLL_AIRPORT_DOORS, 0.0, -0.1706, 0.107, 255, 0, 0, 0.11); aScrollBars[2].Init(CVector(-1089.61f, -584.224f, 13.246f), SCROLL_AIRPORT_DOORS, 0.0f, -0.1706f, 0.107f, 255, 0, 0, 0.11f);
aScrollBars[3].Init(CVector(-1089.61f, -602.04602f, 13.246f), SCROLL_AIRPORT_DOORS, 0.0, -0.1706, 0.107, 0, 255, 0, 0.11); aScrollBars[3].Init(CVector(-1089.61f, -602.04602f, 13.246f), SCROLL_AIRPORT_DOORS, 0.0f, -0.1706f, 0.107f, 0, 255, 0, 0.11f);
aScrollBars[4].Init(CVector(-1089.61f, -619.81702f, 13.246f), SCROLL_AIRPORT_DOORS, 0.0, -0.1706, 0.107, 255, 128, 0, 0.11); aScrollBars[4].Init(CVector(-1089.61f, -619.81702f, 13.246f), SCROLL_AIRPORT_DOORS, 0.0f, -0.1706f, 0.107f, 255, 128, 0, 0.11f);
aScrollBars[5].Init(CVector(-754.578f, -633.50897f, 18.411f), SCROLL_AIRPORT_FRONT, 0.0, 0.591, 0.52, 100, 100, 255, 0.3); aScrollBars[5].Init(CVector(-754.578f, -633.50897f, 18.411f), SCROLL_AIRPORT_FRONT, 0.0f, 0.591f, 0.52f, 100, 100, 255, 0.3f);
aScrollBars[6].Init(CVector( -754.578f, -586.672f, 18.411f), SCROLL_AIRPORT_FRONT, 0.0, 0.591, 0.52, 100, 100, 255, 0.3); aScrollBars[6].Init(CVector( -754.578f, -586.672f, 18.411f), SCROLL_AIRPORT_FRONT, 0.0f, 0.591f, 0.52f, 100, 100, 255, 0.3f);
aScrollBars[7].Init(CVector( 85.473f, -1069.512f, 30.5f ), SCROLL_STORE, 0.625, -0.3125, 0.727, 100, 100, 255, 0.5); aScrollBars[7].Init(CVector( 85.473f, -1069.512f, 30.5f ), SCROLL_STORE, 0.625f, -0.3125f, 0.727f, 100, 100, 255, 0.5f);
aScrollBars[8].Init(CVector( 74.823f, -1086.879f, 31.495f), SCROLL_ENTERTAINMENT, -0.2083, 0.1041, 0.5, 255, 255, 128, 0.3); aScrollBars[8].Init(CVector( 74.823f, -1086.879f, 31.495f), SCROLL_ENTERTAINMENT, -0.2083f, 0.1041f, 0.5f, 255, 255, 128, 0.3f);
aScrollBars[9].Init(CVector( -36.459f, -1031.2371f, 32.534f), SCROLL_ENTERTAINMENT, -0.1442, 0.0721, 0.229, 150, 255, 50, 0.3); aScrollBars[9].Init(CVector( -36.459f, -1031.2371f, 32.534f), SCROLL_ENTERTAINMENT, -0.1442f, 0.0721f, 0.229f, 150, 255, 50, 0.3f);
aScrollBars[10].Init(CVector( 1208.0f, -62.208f, 19.157f), SCROLL_USED_CARS, 0.0642, -0.20365, 0.229, 255, 128, 0, 0.3); aScrollBars[10].Init(CVector( 1208.0f, -62.208f, 19.157f), SCROLL_USED_CARS, 0.0642f, -0.20365f, 0.229f, 255, 128, 0, 0.3f);
// Initialize tower clocks // Initialize tower clocks
aTowerClocks[0].Init(CVector(59.4f, -1081.3f, 54.15f), -1.0f, 0.0f, 0, 0, 0, 80.0f, 2.0f); aTowerClocks[0].Init(CVector(59.4f, -1081.3f, 54.15f), -1.0f, 0.0f, 0, 0, 0, 80.0f, 2.0f);
@ -406,9 +406,9 @@ void CScrollBar::Update()
m_pMessage = "KEEP YOUR EYES ON THE ROAD AND NOT ON THIS SIGN "; m_pMessage = "KEEP YOUR EYES ON THE ROAD AND NOT ON THIS SIGN ";
break; break;
case 4: case 4:
if (CWeather::Foggyness > 0.5) if (CWeather::Foggyness > 0.5f)
m_pMessage = "POOR VISIBILITY ! "; m_pMessage = "POOR VISIBILITY ! ";
else if (CWeather::WetRoads > 0.5) else if (CWeather::WetRoads > 0.5f)
m_pMessage = "ROADS ARE SLIPPERY ! "; m_pMessage = "ROADS ARE SLIPPERY ! ";
else else
m_pMessage = "ENJOY YOUR TRIP "; m_pMessage = "ENJOY YOUR TRIP ";
@ -562,7 +562,7 @@ void CScrollBar::Update()
"ONE FOR ALL THE FAMILY. . . "; "ONE FOR ALL THE FAMILY. . . ";
break; break;
case 9: case 9:
m_pMessage = (char*)FindTimeMessage(); m_pMessage = FindTimeMessage();
break; break;
} }
} }
@ -686,7 +686,7 @@ void CScrollBar::Render()
r / 2, r / 2,
g / 2, g / 2,
b / 2, b / 2,
255, 1.0 / screenCoord.z, 255); 255, 1.0f / screenCoord.z, 255);
} }
} }
} }
@ -849,11 +849,11 @@ void CDigitalClock::Render()
{ {
CSprite::RenderBufferedOneXLUSprite( CSprite::RenderBufferedOneXLUSprite(
screenCoord.x, screenCoord.y, screenCoord.z, screenCoord.x, screenCoord.y, screenCoord.z,
screenW * m_fScale * 0.12, screenW * m_fScale * 0.12f,
screenW * m_fScale * 0.12, screenW * m_fScale * 0.12f,
r, g, b, r, g, b,
255, 255,
1.0 / screenCoord.z, 1.0f / screenCoord.z,
255); 255);
} }
} }
@ -891,4 +891,4 @@ InjectHook(0x5001D0, &CTowerClock::Render, PATCH_JUMP);
InjectHook(0x5004F0, &CDigitalClock::Init, PATCH_JUMP); InjectHook(0x5004F0, &CDigitalClock::Init, PATCH_JUMP);
InjectHook(0x500550, &CDigitalClock::Update, PATCH_JUMP); InjectHook(0x500550, &CDigitalClock::Update, PATCH_JUMP);
InjectHook(0x5005F0, &CDigitalClock::Render, PATCH_JUMP); InjectHook(0x5005F0, &CDigitalClock::Render, PATCH_JUMP);
ENDPATCHES ENDPATCHES

View File

@ -84,7 +84,7 @@ CFont::Initialise(void)
Sprite[2].SetTexture("font1", "font1_mask"); Sprite[2].SetTexture("font1", "font1_mask");
SetScale(1.0f, 1.0f); SetScale(1.0f, 1.0f);
SetSlantRefPoint(SCREEN_WIDTH, 0.0f); SetSlantRefPoint(SCREEN_WIDTH, 0.0f);
SetSlant(0.0); SetSlant(0.0f);
SetColor(CRGBA(0xFF, 0xFF, 0xFF, 0)); SetColor(CRGBA(0xFF, 0xFF, 0xFF, 0));
SetJustifyOff(); SetJustifyOff();
SetCentreOff(); SetCentreOff();
@ -95,7 +95,7 @@ CFont::Initialise(void)
SetBackGroundOnlyTextOff(); SetBackGroundOnlyTextOff();
SetPropOn(); SetPropOn();
SetFontStyle(0); SetFontStyle(0);
SetRightJustifyWrap(0.0); SetRightJustifyWrap(0.0f);
SetAlphaFade(255.0f); SetAlphaFade(255.0f);
SetDropShadowPosition(0); SetDropShadowPosition(0);
CTxdStore::PopCurrentTxd(); CTxdStore::PopCurrentTxd();

View File

@ -611,15 +611,15 @@ void CHud::Draw()
/* /*
DrawClock DrawClock
*/ */
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetCentreOff(); CFont::SetCentreOff();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f)); CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
CFont::SetBackGroundOnlyTextOff(); CFont::SetBackGroundOnlyTextOff();
CFont::SetPropOff(); CFont::SetPropOff();
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_HEADING);
CFont::SetRightJustifyOn(); CFont::SetRightJustifyOn();
CFont::SetRightJustifyWrap(0.0); CFont::SetRightJustifyWrap(0.0f);
sprintf(sTemp, "%02d:%02d", CClock::GetHours(), CClock::GetMinutes()); sprintf(sTemp, "%02d:%02d", CClock::GetHours(), CClock::GetMinutes());
AsciiToUnicode(sTemp, sPrint); AsciiToUnicode(sTemp, sPrint);
@ -702,21 +702,21 @@ void CHud::Draw()
AsciiToUnicode(CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterBuffer, sTimer); AsciiToUnicode(CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterBuffer, sTimer);
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f)); CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
CFont::SetCentreOff(); CFont::SetCentreOff();
CFont::SetRightJustifyOn(); CFont::SetRightJustifyOn();
CFont::SetRightJustifyWrap(0.0f); CFont::SetRightJustifyWrap(0.0f);
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_HEADING);
CFont::SetColor(CRGBA(244, 20, 20, 255)); CFont::SetColor(CRGBA(244, 20, 20, 255));
CFont::SetWrapx(SCREEN_SCALE_X(640.0f)); CFont::SetWrapx(SCREEN_SCALE_X(640.0f));
CFont::SetPropOff(); CFont::SetPropOff();
CFont::SetBackGroundOnlyTextOn(); CFont::SetBackGroundOnlyTextOn();
CFont::SetColor(CRGBA(0, 0, 0, 255)); CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(2.0f), sTimer); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(2.0f), sTimer);
CFont::SetColor(CRGBA(0, 106, 164, 255)); CFont::SetColor(CRGBA(0, 106, 164, 255));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET), SCREEN_SCALE_Y(132.0f), sTimer); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET), SCREEN_SCALE_Y(132.0f), sTimer);
} else { } else {
int counter = atoi(CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterBuffer); int counter = atoi(CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterBuffer);
@ -728,7 +728,7 @@ void CHud::Draw()
} }
if (CUserDisplay::OnscnTimer.m_sEntries[0].m_aCounterText[0]) { if (CUserDisplay::OnscnTimer.m_sEntries[0].m_aCounterText[0]) {
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f)); CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
CFont::SetColor(CRGBA(0, 0, 0, 255)); CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(61.0f) + SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(2.0f), TheText.Get(CUserDisplay::OnscnTimer.m_sEntries[0].m_aCounterText)); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(61.0f) + SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(2.0f), TheText.Get(CUserDisplay::OnscnTimer.m_sEntries[0].m_aCounterText));
@ -773,7 +773,7 @@ void CHud::Draw()
fStep = 2.0f; fStep = 2.0f;
PagerXOffset += fStep * CTimer::GetTimeStep(); PagerXOffset += fStep * CTimer::GetTimeStep();
if (PagerXOffset > 150.0f) { if (PagerXOffset > 150.0f) {
PagerXOffset = 150.0; PagerXOffset = 150.0f;
PagerOn = 0; PagerOn = 0;
} }
} }
@ -934,13 +934,13 @@ void CHud::Draw()
BigMessageInUse[0] += CTimer::GetTimeStep(); BigMessageInUse[0] += CTimer::GetTimeStep();
if (BigMessageInUse[0] >= 120.0f) { if (BigMessageInUse[0] >= 120.0f) {
BigMessageInUse[0] = 120.0; BigMessageInUse[0] = 120.0f;
BigMessageAlpha[0] -= (CTimer::GetTimeStepInMilliseconds() * 0.3f); BigMessageAlpha[0] -= (CTimer::GetTimeStepInMilliseconds() * 0.3f);
} }
if (BigMessageAlpha[0] <= 0.0f) { if (BigMessageAlpha[0] <= 0.0f) {
m_BigMessage[0][0] = 0; m_BigMessage[0][0] = 0;
BigMessageAlpha[0] = 0.0; BigMessageAlpha[0] = 0.0f;
} }
} }
else { else {
@ -977,7 +977,7 @@ void CHud::Draw()
BigMessageAlpha[2] += (CTimer::GetTimeStepInSeconds() * 255.0f); BigMessageAlpha[2] += (CTimer::GetTimeStepInSeconds() * 255.0f);
if (BigMessageAlpha[2] > 255.0f) if (BigMessageAlpha[2] > 255.0f)
BigMessageAlpha[2] = 255.0; BigMessageAlpha[2] = 255.0f;
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
@ -997,12 +997,12 @@ void CHud::Draw()
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(82.0f), m_BigMessage[2]); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(82.0f), m_BigMessage[2]);
} }
else { else {
BigMessageAlpha[2] = 0.0; BigMessageAlpha[2] = 0.0f;
BigMessageInUse[2] = 1.0; BigMessageInUse[2] = 1.0f;
} }
} }
else { else {
BigMessageInUse[2] = 0.0; BigMessageInUse[2] = 0.0f;
} }
} }
} }
@ -1231,12 +1231,12 @@ void CHud::DrawAfterFade()
BigMessageInUse[1] += CTimer::GetTimeStep(); BigMessageInUse[1] += CTimer::GetTimeStep();
if (BigMessageInUse[1] >= 120.0f) { if (BigMessageInUse[1] >= 120.0f) {
BigMessageInUse[1] = 120.0; BigMessageInUse[1] = 120.0f;
BigMessageAlpha[1] -= (CTimer::GetTimeStepInMilliseconds() * 0.3f); BigMessageAlpha[1] -= (CTimer::GetTimeStepInMilliseconds() * 0.3f);
} }
if (BigMessageAlpha[1] <= 0) { if (BigMessageAlpha[1] <= 0) {
m_BigMessage[1][0] = 0; m_BigMessage[1][0] = 0;
BigMessageAlpha[1] = 0.0; BigMessageAlpha[1] = 0.0f;
} }
} }
else { else {

View File

@ -116,47 +116,47 @@ void CBulletTrace::Update(void)
WRAPPER void CBrightLights::RegisterOne(CVector pos, CVector up, CVector right, CVector fwd, uint8 type, uint8 unk1, uint8 unk2, uint8 unk3) { EAXJMP(0x51A410); } WRAPPER void CBrightLights::RegisterOne(CVector pos, CVector up, CVector right, CVector fwd, uint8 type, uint8 unk1, uint8 unk2, uint8 unk3) { EAXJMP(0x51A410); }
RpAtomic * RpAtomic *
MarkerAtomicCB(RpAtomic *atomic, void *data) MarkerAtomicCB(RpAtomic *atomic, void *data)
{ {
*(RpAtomic**)data = atomic; *(RpAtomic**)data = atomic;
return atomic; return atomic;
} }
bool bool
C3dMarker::AddMarker(uint32 identifier, uint16 type, float fSize, uint8 r, uint8 g, uint8 b, uint8 a, uint16 pulsePeriod, float pulseFraction, int16 rotateRate) C3dMarker::AddMarker(uint32 identifier, uint16 type, float fSize, uint8 r, uint8 g, uint8 b, uint8 a, uint16 pulsePeriod, float pulseFraction, int16 rotateRate)
{ {
m_nIdentifier = identifier; m_nIdentifier = identifier;
m_Matrix.SetUnity(); m_Matrix.SetUnity();
RpAtomic *origAtomic; RpAtomic *origAtomic;
origAtomic = nil; origAtomic = nil;
RpClumpForAllAtomics(C3dMarkers::m_pRpClumpArray[type], MarkerAtomicCB, &origAtomic); RpClumpForAllAtomics(C3dMarkers::m_pRpClumpArray[type], MarkerAtomicCB, &origAtomic);
RpAtomic *atomic = RpAtomicClone(origAtomic); RpAtomic *atomic = RpAtomicClone(origAtomic);
RwFrame *frame = RwFrameCreate(); RwFrame *frame = RwFrameCreate();
RpAtomicSetFrame(atomic, frame); RpAtomicSetFrame(atomic, frame);
CVisibilityPlugins::SetAtomicRenderCallback(atomic, nil); CVisibilityPlugins::SetAtomicRenderCallback(atomic, nil);
RpGeometry *geometry = RpAtomicGetGeometry(atomic); RpGeometry *geometry = RpAtomicGetGeometry(atomic);
RpGeometrySetFlags(geometry, RpGeometryGetFlags(geometry) | rpGEOMETRYMODULATEMATERIALCOLOR); RpGeometrySetFlags(geometry, RpGeometryGetFlags(geometry) | rpGEOMETRYMODULATEMATERIALCOLOR);
m_pAtomic = atomic; m_pAtomic = atomic;
m_Matrix.Attach(RwFrameGetMatrix(RpAtomicGetFrame(m_pAtomic))); m_Matrix.Attach(RwFrameGetMatrix(RpAtomicGetFrame(m_pAtomic)));
m_pMaterial = RpGeometryGetMaterial(geometry, 0); m_pMaterial = RpGeometryGetMaterial(geometry, 0);
m_fSize = fSize; m_fSize = fSize;
m_fStdSize = m_fSize; m_fStdSize = m_fSize;
m_Color.red = r; m_Color.red = r;
m_Color.green = g; m_Color.green = g;
m_Color.blue = b; m_Color.blue = b;
m_Color.alpha = a; m_Color.alpha = a;
m_nPulsePeriod = pulsePeriod; m_nPulsePeriod = pulsePeriod;
m_fPulseFraction = pulseFraction; m_fPulseFraction = pulseFraction;
m_nRotateRate = rotateRate; m_nRotateRate = rotateRate;
m_nStartTime = CTimer::GetTimeInMilliseconds(); m_nStartTime = CTimer::GetTimeInMilliseconds();
m_nType = type; m_nType = type;
return m_pAtomic != nil; return m_pAtomic != nil;
} }
void void
@ -164,238 +164,238 @@ C3dMarker::DeleteMarkerObject()
{ {
RwFrame *frame; RwFrame *frame;
m_nIdentifier = 0; m_nIdentifier = 0;
m_nStartTime = 0; m_nStartTime = 0;
m_bIsUsed = false; m_bIsUsed = false;
m_nType = MARKERTYPE_INVALID; m_nType = MARKERTYPE_INVALID;
frame = RpAtomicGetFrame(m_pAtomic); frame = RpAtomicGetFrame(m_pAtomic);
RpAtomicDestroy(m_pAtomic); RpAtomicDestroy(m_pAtomic);
RwFrameDestroy(frame); RwFrameDestroy(frame);
m_pAtomic = nil; m_pAtomic = nil;
} }
void void
C3dMarker::Render() C3dMarker::Render()
{ {
if (m_pAtomic == nil) return; if (m_pAtomic == nil) return;
RwRGBA *color = RpMaterialGetColor(m_pMaterial); RwRGBA *color = RpMaterialGetColor(m_pMaterial);
*color = m_Color; *color = m_Color;
m_Matrix.UpdateRW(); m_Matrix.UpdateRW();
CMatrix matrix; CMatrix matrix;
matrix.Attach(m_Matrix.m_attachment); matrix.Attach(m_Matrix.m_attachment);
matrix.Scale(m_fSize); matrix.Scale(m_fSize);
matrix.UpdateRW(); matrix.UpdateRW();
RwFrameUpdateObjects(RpAtomicGetFrame(m_pAtomic)); RwFrameUpdateObjects(RpAtomicGetFrame(m_pAtomic));
SetBrightMarkerColours(m_fBrightness); SetBrightMarkerColours(m_fBrightness);
if (m_nType != MARKERTYPE_ARROW) if (m_nType != MARKERTYPE_ARROW)
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
RpAtomicRender(m_pAtomic); RpAtomicRender(m_pAtomic);
if (m_nType != MARKERTYPE_ARROW) if (m_nType != MARKERTYPE_ARROW)
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
ReSetAmbientAndDirectionalColours(); ReSetAmbientAndDirectionalColours();
} }
C3dMarker(&C3dMarkers::m_aMarkerArray)[NUM3DMARKERS] = *(C3dMarker(*)[NUM3DMARKERS])*(uintptr*)0x72D408; C3dMarker(&C3dMarkers::m_aMarkerArray)[NUM3DMARKERS] = *(C3dMarker(*)[NUM3DMARKERS])*(uintptr*)0x72D408;
int32 &C3dMarkers::NumActiveMarkers = *(int32*)0x8F2A08; int32 &C3dMarkers::NumActiveMarkers = *(int32*)0x8F2A08;
RpClump* (&C3dMarkers::m_pRpClumpArray)[NUMMARKERTYPES] = *(RpClump*(*)[NUMMARKERTYPES])*(uintptr*)0x8E2888; RpClump* (&C3dMarkers::m_pRpClumpArray)[NUMMARKERTYPES] = *(RpClump*(*)[NUMMARKERTYPES])*(uintptr*)0x8E2888;
void void
C3dMarkers::Init() C3dMarkers::Init()
{ {
for (int i = 0; i < NUM3DMARKERS; i++) { for (int i = 0; i < NUM3DMARKERS; i++) {
m_aMarkerArray[i].m_pAtomic = nil; m_aMarkerArray[i].m_pAtomic = nil;
m_aMarkerArray[i].m_nType = MARKERTYPE_INVALID; m_aMarkerArray[i].m_nType = MARKERTYPE_INVALID;
m_aMarkerArray[i].m_bIsUsed = false; m_aMarkerArray[i].m_bIsUsed = false;
m_aMarkerArray[i].m_nIdentifier = 0; m_aMarkerArray[i].m_nIdentifier = 0;
m_aMarkerArray[i].m_Color.red = 255; m_aMarkerArray[i].m_Color.red = 255;
m_aMarkerArray[i].m_Color.green = 255; m_aMarkerArray[i].m_Color.green = 255;
m_aMarkerArray[i].m_Color.blue = 255; m_aMarkerArray[i].m_Color.blue = 255;
m_aMarkerArray[i].m_Color.alpha = 255; m_aMarkerArray[i].m_Color.alpha = 255;
m_aMarkerArray[i].m_nPulsePeriod = 1024; m_aMarkerArray[i].m_nPulsePeriod = 1024;
m_aMarkerArray[i].m_nRotateRate = 5; m_aMarkerArray[i].m_nRotateRate = 5;
m_aMarkerArray[i].m_nStartTime = 0; m_aMarkerArray[i].m_nStartTime = 0;
m_aMarkerArray[i].m_fPulseFraction = 0.25f; m_aMarkerArray[i].m_fPulseFraction = 0.25f;
m_aMarkerArray[i].m_fStdSize = 1.0f; m_aMarkerArray[i].m_fStdSize = 1.0f;
m_aMarkerArray[i].m_fSize = 1.0f; m_aMarkerArray[i].m_fSize = 1.0f;
m_aMarkerArray[i].m_fBrightness = 1.0f; m_aMarkerArray[i].m_fBrightness = 1.0f;
m_aMarkerArray[i].m_fCameraRange = 0.0f; m_aMarkerArray[i].m_fCameraRange = 0.0f;
} }
NumActiveMarkers = 0; NumActiveMarkers = 0;
int txdSlot = CTxdStore::FindTxdSlot("particle"); int txdSlot = CTxdStore::FindTxdSlot("particle");
CTxdStore::PushCurrentTxd(); CTxdStore::PushCurrentTxd();
CTxdStore::SetCurrentTxd(txdSlot); CTxdStore::SetCurrentTxd(txdSlot);
CFileMgr::ChangeDir("\\"); CFileMgr::ChangeDir("\\");
m_pRpClumpArray[MARKERTYPE_ARROW] = CFileLoader::LoadAtomicFile2Return("models/generic/arrow.dff"); m_pRpClumpArray[MARKERTYPE_ARROW] = CFileLoader::LoadAtomicFile2Return("models/generic/arrow.dff");
m_pRpClumpArray[MARKERTYPE_CYLINDER] = CFileLoader::LoadAtomicFile2Return("models/generic/zonecylb.dff"); m_pRpClumpArray[MARKERTYPE_CYLINDER] = CFileLoader::LoadAtomicFile2Return("models/generic/zonecylb.dff");
CTxdStore::PopCurrentTxd(); CTxdStore::PopCurrentTxd();
} }
void void
C3dMarkers::Shutdown() C3dMarkers::Shutdown()
{ {
for (int i = 0; i < NUM3DMARKERS; i++) { for (int i = 0; i < NUM3DMARKERS; i++) {
if (m_aMarkerArray[i].m_pAtomic != nil) if (m_aMarkerArray[i].m_pAtomic != nil)
m_aMarkerArray[i].DeleteMarkerObject(); m_aMarkerArray[i].DeleteMarkerObject();
} }
for (int i = 0; i < NUMMARKERTYPES; i++) { for (int i = 0; i < NUMMARKERTYPES; i++) {
if (m_pRpClumpArray[i] != nil) if (m_pRpClumpArray[i] != nil)
RpClumpDestroy(m_pRpClumpArray[i]); RpClumpDestroy(m_pRpClumpArray[i]);
} }
} }
void void
C3dMarkers::Render() C3dMarkers::Render()
{ {
NumActiveMarkers = 0; NumActiveMarkers = 0;
ActivateDirectional(); ActivateDirectional();
for (int i = 0; i < NUM3DMARKERS; i++) { for (int i = 0; i < NUM3DMARKERS; i++) {
if (m_aMarkerArray[i].m_bIsUsed) { if (m_aMarkerArray[i].m_bIsUsed) {
if (m_aMarkerArray[i].m_fCameraRange < 120.0f) if (m_aMarkerArray[i].m_fCameraRange < 120.0f)
m_aMarkerArray[i].Render(); m_aMarkerArray[i].Render();
NumActiveMarkers++; NumActiveMarkers++;
m_aMarkerArray[i].m_bIsUsed = false; m_aMarkerArray[i].m_bIsUsed = false;
} else if (m_aMarkerArray[i].m_pAtomic != nil) { } else if (m_aMarkerArray[i].m_pAtomic != nil) {
m_aMarkerArray[i].DeleteMarkerObject(); m_aMarkerArray[i].DeleteMarkerObject();
} }
} }
} }
C3dMarker * C3dMarker *
C3dMarkers::PlaceMarker(uint32 identifier, uint16 type, CVector &pos, float size, uint8 r, uint8 g, uint8 b, uint8 a, uint16 pulsePeriod, float pulseFraction, int16 rotateRate) C3dMarkers::PlaceMarker(uint32 identifier, uint16 type, CVector &pos, float size, uint8 r, uint8 g, uint8 b, uint8 a, uint16 pulsePeriod, float pulseFraction, int16 rotateRate)
{ {
C3dMarker *pMarker; C3dMarker *pMarker;
pMarker = nil; pMarker = nil;
float dist = Sqrt((pos.x - FindPlayerCentreOfWorld(0).x) * (pos.x - FindPlayerCentreOfWorld(0).x) + (pos.y - FindPlayerCentreOfWorld(0).y) * (pos.y - FindPlayerCentreOfWorld(0).y)); float dist = Sqrt((pos.x - FindPlayerCentreOfWorld(0).x) * (pos.x - FindPlayerCentreOfWorld(0).x) + (pos.y - FindPlayerCentreOfWorld(0).y) * (pos.y - FindPlayerCentreOfWorld(0).y));
if (type != MARKERTYPE_ARROW && type != MARKERTYPE_CYLINDER) return nil; if (type != MARKERTYPE_ARROW && type != MARKERTYPE_CYLINDER) return nil;
for (int i = 0; i < NUM3DMARKERS; i++) { for (int i = 0; i < NUM3DMARKERS; i++) {
if (!m_aMarkerArray[i].m_bIsUsed && m_aMarkerArray[i].m_nIdentifier == identifier) { if (!m_aMarkerArray[i].m_bIsUsed && m_aMarkerArray[i].m_nIdentifier == identifier) {
pMarker = &m_aMarkerArray[i]; pMarker = &m_aMarkerArray[i];
break; break;
} }
} }
if (pMarker == nil) { if (pMarker == nil) {
for (int i = 0; i < NUM3DMARKERS; i++) { for (int i = 0; i < NUM3DMARKERS; i++) {
if (m_aMarkerArray[i].m_nType == MARKERTYPE_INVALID) { if (m_aMarkerArray[i].m_nType == MARKERTYPE_INVALID) {
pMarker = &m_aMarkerArray[i]; pMarker = &m_aMarkerArray[i];
break; break;
} }
} }
} }
if (pMarker == nil && type == MARKERTYPE_ARROW) { if (pMarker == nil && type == MARKERTYPE_ARROW) {
for (int i = 0; i < NUM3DMARKERS; i++) { for (int i = 0; i < NUM3DMARKERS; i++) {
if (dist < m_aMarkerArray[i].m_fCameraRange && m_aMarkerArray[i].m_nType == MARKERTYPE_ARROW && (pMarker == nil || m_aMarkerArray[i].m_fCameraRange > pMarker->m_fCameraRange)) { if (dist < m_aMarkerArray[i].m_fCameraRange && m_aMarkerArray[i].m_nType == MARKERTYPE_ARROW && (pMarker == nil || m_aMarkerArray[i].m_fCameraRange > pMarker->m_fCameraRange)) {
pMarker = &m_aMarkerArray[i]; pMarker = &m_aMarkerArray[i];
break; break;
} }
} }
if (pMarker != nil) if (pMarker != nil)
pMarker->m_nType = MARKERTYPE_INVALID; pMarker->m_nType = MARKERTYPE_INVALID;
} }
if (pMarker == nil) return pMarker; if (pMarker == nil) return pMarker;
pMarker->m_fCameraRange = dist; pMarker->m_fCameraRange = dist;
if (pMarker->m_nIdentifier == identifier && pMarker->m_nType == type) { if (pMarker->m_nIdentifier == identifier && pMarker->m_nType == type) {
if (type == MARKERTYPE_ARROW) { if (type == MARKERTYPE_ARROW) {
if (dist < 25.0f) { if (dist < 25.0f) {
if (dist > 5.0f) if (dist > 5.0f)
pMarker->m_fStdSize = size - (25.0f - dist) * (0.3f * size) / 20.0f; pMarker->m_fStdSize = size - (25.0f - dist) * (0.3f * size) / 20.0f;
else else
pMarker->m_fStdSize = size - 0.3f * size; pMarker->m_fStdSize = size - 0.3f * size;
} else { } else {
pMarker->m_fStdSize = size; pMarker->m_fStdSize = size;
} }
} else if (type == MARKERTYPE_CYLINDER) { } else if (type == MARKERTYPE_CYLINDER) {
if (dist < size + 12.0f) { if (dist < size + 12.0f) {
if (dist > size + 1.0f) if (dist > size + 1.0f)
pMarker->m_Color.alpha = (1.0f - (size + 12.0f - dist) * 0.7f / 11.0f) * (float)a; pMarker->m_Color.alpha = (1.0f - (size + 12.0f - dist) * 0.7f / 11.0f) * (float)a;
else else
pMarker->m_Color.alpha = (float)a * 0.3f; pMarker->m_Color.alpha = (float)a * 0.3f;
} else { } else {
pMarker->m_Color.alpha = a; pMarker->m_Color.alpha = a;
} }
} }
float someSin = Sin(TWOPI * (float)((pMarker->m_nPulsePeriod - 1) & (CTimer::GetTimeInMilliseconds() - pMarker->m_nStartTime)) / (float)pMarker->m_nPulsePeriod); float someSin = Sin(TWOPI * (float)((pMarker->m_nPulsePeriod - 1) & (CTimer::GetTimeInMilliseconds() - pMarker->m_nStartTime)) / (float)pMarker->m_nPulsePeriod);
pMarker->m_fSize = pMarker->m_fStdSize - pulseFraction * pMarker->m_fStdSize * someSin; pMarker->m_fSize = pMarker->m_fStdSize - pulseFraction * pMarker->m_fStdSize * someSin;
if (type == MARKERTYPE_ARROW) { if (type == MARKERTYPE_ARROW) {
pos.z += 0.25f * pMarker->m_fStdSize * someSin; pos.z += 0.25f * pMarker->m_fStdSize * someSin;
} else if (type == MARKERTYPE_0) { } else if (type == MARKERTYPE_0) {
if (someSin > 0.0f) if (someSin > 0.0f)
pMarker->m_Color.alpha = (float)a * 0.7f * someSin + a; pMarker->m_Color.alpha = (float)a * 0.7f * someSin + a;
else else
pMarker->m_Color.alpha = (float)a * 0.4f * someSin + a; pMarker->m_Color.alpha = (float)a * 0.4f * someSin + a;
} }
if (pMarker->m_nRotateRate) { if (pMarker->m_nRotateRate) {
RwV3d pos = pMarker->m_Matrix.m_matrix.pos; RwV3d pos = pMarker->m_Matrix.m_matrix.pos;
pMarker->m_Matrix.RotateZ(DEGTORAD(pMarker->m_nRotateRate * CTimer::GetTimeStep())); pMarker->m_Matrix.RotateZ(DEGTORAD(pMarker->m_nRotateRate * CTimer::GetTimeStep()));
pMarker->m_Matrix.GetPosition() = pos; pMarker->m_Matrix.GetPosition() = pos;
} }
if (type == MARKERTYPE_ARROW) if (type == MARKERTYPE_ARROW)
pMarker->m_Matrix.GetPosition() = pos; pMarker->m_Matrix.GetPosition() = pos;
pMarker->m_bIsUsed = true; pMarker->m_bIsUsed = true;
return pMarker; return pMarker;
} }
if (pMarker->m_nIdentifier != 0) if (pMarker->m_nIdentifier != 0)
pMarker->DeleteMarkerObject(); pMarker->DeleteMarkerObject();
pMarker->AddMarker(identifier, type, size, r, g, b, a, pulsePeriod, pulseFraction, rotateRate); pMarker->AddMarker(identifier, type, size, r, g, b, a, pulsePeriod, pulseFraction, rotateRate);
if (type == MARKERTYPE_CYLINDER || type == MARKERTYPE_0 || type == MARKERTYPE_2) { if (type == MARKERTYPE_CYLINDER || type == MARKERTYPE_0 || type == MARKERTYPE_2) {
float z = CWorld::FindGroundZFor3DCoord(pos.x, pos.y, pos.z + 1.0f, nil); float z = CWorld::FindGroundZFor3DCoord(pos.x, pos.y, pos.z + 1.0f, nil);
if (z != 0.0f) if (z != 0.0f)
pos.z = z - 0.05f * size; pos.z = z - 0.05f * size;
} }
pMarker->m_Matrix.SetTranslate(pos.x, pos.y, pos.z); pMarker->m_Matrix.SetTranslate(pos.x, pos.y, pos.z);
if (type == MARKERTYPE_2) { if (type == MARKERTYPE_2) {
pMarker->m_Matrix.RotateX(PI); pMarker->m_Matrix.RotateX(PI);
pMarker->m_Matrix.GetPosition() = pos; pMarker->m_Matrix.GetPosition() = pos;
} }
pMarker->m_Matrix.UpdateRW(); pMarker->m_Matrix.UpdateRW();
if (type == MARKERTYPE_ARROW) { if (type == MARKERTYPE_ARROW) {
if (dist < 25.0f) { if (dist < 25.0f) {
if (dist > 5.0f) if (dist > 5.0f)
pMarker->m_fStdSize = size - (25.0f - dist) * (0.3f * size) / 20.0f; pMarker->m_fStdSize = size - (25.0f - dist) * (0.3f * size) / 20.0f;
else else
pMarker->m_fStdSize = size - 0.3f * size; pMarker->m_fStdSize = size - 0.3f * size;
} else { } else {
pMarker->m_fStdSize = size; pMarker->m_fStdSize = size;
} }
} else if (type == MARKERTYPE_CYLINDER) { } else if (type == MARKERTYPE_CYLINDER) {
if (dist < size + 12.0f) { if (dist < size + 12.0f) {
if (dist > size + 1.0f) if (dist > size + 1.0f)
pMarker->m_Color.alpha = (1.0f - (size + 12.0f - dist) * 0.7f / 11.0f) * (float)a; pMarker->m_Color.alpha = (1.0f - (size + 12.0f - dist) * 0.7f / 11.0f) * (float)a;
else else
pMarker->m_Color.alpha = (float)a * 0.3f; pMarker->m_Color.alpha = (float)a * 0.3f;
} else { } else {
pMarker->m_Color.alpha = a; pMarker->m_Color.alpha = a;
} }
} }
pMarker->m_bIsUsed = true; pMarker->m_bIsUsed = true;
return pMarker; return pMarker;
} }
void void
C3dMarkers::PlaceMarkerSet(uint32 id, uint16 type, CVector &pos, float size, uint8 r, uint8 g, uint8 b, uint8 a, uint16 pulsePeriod, float pulseFraction, int16 rotateRate) C3dMarkers::PlaceMarkerSet(uint32 id, uint16 type, CVector &pos, float size, uint8 r, uint8 g, uint8 b, uint8 a, uint16 pulsePeriod, float pulseFraction, int16 rotateRate)
{ {
PlaceMarker(id, type, pos, size, r, g, b, a, pulsePeriod, pulseFraction, 1); PlaceMarker(id, type, pos, size, r, g, b, a, pulsePeriod, pulseFraction, 1);
PlaceMarker(id, type, pos, size * 0.93f, r, g, b, a, pulsePeriod, pulseFraction, 2); PlaceMarker(id, type, pos, size * 0.93f, r, g, b, a, pulsePeriod, pulseFraction, 2);
PlaceMarker(id, type, pos, size * 0.86f, r, g, b, a, pulsePeriod, pulseFraction, -1); PlaceMarker(id, type, pos, size * 0.86f, r, g, b, a, pulsePeriod, pulseFraction, -1);
} }
void void
C3dMarkers::Update() C3dMarkers::Update()
{ {
@ -403,151 +403,151 @@ C3dMarkers::Update()
#define MONEY_MESSAGE_LIFETIME_MS 2000 #define MONEY_MESSAGE_LIFETIME_MS 2000
CMoneyMessage CMoneyMessages::aMoneyMessages[NUMMONEYMESSAGES]; CMoneyMessage CMoneyMessages::aMoneyMessages[NUMMONEYMESSAGES];
void void
CMoneyMessage::Render() CMoneyMessage::Render()
{ {
const float MAX_SCALE = 4.0f; const float MAX_SCALE = 4.0f;
uint32 nLifeTime = CTimer::GetTimeInMilliseconds() - m_nTimeRegistered; uint32 nLifeTime = CTimer::GetTimeInMilliseconds() - m_nTimeRegistered;
if (nLifeTime >= MONEY_MESSAGE_LIFETIME_MS) m_nTimeRegistered = 0; if (nLifeTime >= MONEY_MESSAGE_LIFETIME_MS) m_nTimeRegistered = 0;
else { else {
float fLifeTime = (float)nLifeTime / MONEY_MESSAGE_LIFETIME_MS; float fLifeTime = (float)nLifeTime / MONEY_MESSAGE_LIFETIME_MS;
RwV3d vecOut; RwV3d vecOut;
float fDistX, fDistY; float fDistX, fDistY;
if (CSprite::CalcScreenCoors(m_vecPosition + CVector(0.0f, 0.0f, fLifeTime), &vecOut, &fDistX, &fDistY, true)) { if (CSprite::CalcScreenCoors(m_vecPosition + CVector(0.0f, 0.0f, fLifeTime), &vecOut, &fDistX, &fDistY, true)) {
fDistX *= (0.7 * fLifeTime + 2.0) * m_fSize; fDistX *= (0.7 * fLifeTime + 2.0) * m_fSize;
fDistY *= (0.7 * fLifeTime + 2.0) * m_fSize; fDistY *= (0.7 * fLifeTime + 2.0) * m_fSize;
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
float fScaleY = fDistY / 100.0f; float fScaleY = fDistY / 100.0f;
if (fScaleY > MAX_SCALE) fScaleY = MAX_SCALE; if (fScaleY > MAX_SCALE) fScaleY = MAX_SCALE;
float fScaleX = fDistX / 100.0f; float fScaleX = fDistX / 100.0f;
if (fScaleX > MAX_SCALE) fScaleX = MAX_SCALE; if (fScaleX > MAX_SCALE) fScaleX = MAX_SCALE;
CFont::SetScale(fScaleX, fScaleY); // maybe use SCREEN_SCALE_X and SCREEN_SCALE_Y here? CFont::SetScale(fScaleX, fScaleY); // maybe use SCREEN_SCALE_X and SCREEN_SCALE_Y here?
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetCentreSize(SCREEN_WIDTH); CFont::SetCentreSize(SCREEN_WIDTH);
CFont::SetJustifyOff(); CFont::SetJustifyOff();
CFont::SetColor(CRGBA(m_Colour.r, m_Colour.g, m_Colour.b, (255.0f - 255.0f * fLifeTime) * m_fOpacity)); CFont::SetColor(CRGBA(m_Colour.r, m_Colour.g, m_Colour.b, (255.0f - 255.0f * fLifeTime) * m_fOpacity));
CFont::SetBackGroundOnlyTextOff(); CFont::SetBackGroundOnlyTextOff();
CFont::SetFontStyle(FONT_BANK); CFont::SetFontStyle(FONT_BANK);
CFont::PrintString(vecOut.x, vecOut.y, m_aText); CFont::PrintString(vecOut.x, vecOut.y, m_aText);
} }
} }
} }
void void
CMoneyMessages::Init() CMoneyMessages::Init()
{ {
for (int32 i = 0; i < NUMMONEYMESSAGES; i++) for (int32 i = 0; i < NUMMONEYMESSAGES; i++)
aMoneyMessages[i].m_nTimeRegistered = 0; aMoneyMessages[i].m_nTimeRegistered = 0;
} }
void void
CMoneyMessages::Render() CMoneyMessages::Render()
{ {
for (int32 i = 0; i < NUMMONEYMESSAGES; i++) { for (int32 i = 0; i < NUMMONEYMESSAGES; i++) {
if (aMoneyMessages[i].m_nTimeRegistered != 0) if (aMoneyMessages[i].m_nTimeRegistered != 0)
aMoneyMessages[i].Render(); aMoneyMessages[i].Render();
} }
} }
void void
CMoneyMessages::RegisterOne(CVector vecPos, const char *pText, uint8 bRed, uint8 bGreen, uint8 bBlue, float fSize, float fOpacity) CMoneyMessages::RegisterOne(CVector vecPos, const char *pText, uint8 bRed, uint8 bGreen, uint8 bBlue, float fSize, float fOpacity)
{ {
uint32 nIndex = 0; uint32 nIndex = 0;
while (aMoneyMessages[nIndex].m_nTimeRegistered != 0) { while (aMoneyMessages[nIndex].m_nTimeRegistered != 0) {
if (++nIndex >= NUMMONEYMESSAGES) return; if (++nIndex >= NUMMONEYMESSAGES) return;
} }
// Add data of this money message to the array // Add data of this money message to the array
AsciiToUnicode(pText, aMoneyMessages[nIndex].m_aText); AsciiToUnicode(pText, aMoneyMessages[nIndex].m_aText);
aMoneyMessages[nIndex].m_nTimeRegistered = CTimer::GetTimeInMilliseconds(); aMoneyMessages[nIndex].m_nTimeRegistered = CTimer::GetTimeInMilliseconds();
aMoneyMessages[nIndex].m_vecPosition = vecPos; aMoneyMessages[nIndex].m_vecPosition = vecPos;
aMoneyMessages[nIndex].m_Colour.red = bRed; aMoneyMessages[nIndex].m_Colour.red = bRed;
aMoneyMessages[nIndex].m_Colour.green = bGreen; aMoneyMessages[nIndex].m_Colour.green = bGreen;
aMoneyMessages[nIndex].m_Colour.blue = bBlue; aMoneyMessages[nIndex].m_Colour.blue = bBlue;
aMoneyMessages[nIndex].m_fSize = fSize; aMoneyMessages[nIndex].m_fSize = fSize;
aMoneyMessages[nIndex].m_fOpacity = fOpacity; aMoneyMessages[nIndex].m_fOpacity = fOpacity;
} }
CRGBA FoamColour(255, 255, 255, 255); CRGBA FoamColour(255, 255, 255, 255);
unsigned int CSpecialParticleStuff::BoatFromStart; unsigned int CSpecialParticleStuff::BoatFromStart;
void void
CSpecialParticleStuff::CreateFoamAroundObject(CMatrix* pMatrix, float innerFw, float innerRg, float innerUp, int32 particles) CSpecialParticleStuff::CreateFoamAroundObject(CMatrix* pMatrix, float innerFw, float innerRg, float innerUp, int32 particles)
{ {
float outerFw = innerFw + 5.0f; float outerFw = innerFw + 5.0f;
float outerRg = innerRg + 5.0f; float outerRg = innerRg + 5.0f;
float outerUp = innerUp + 5.0f; float outerUp = innerUp + 5.0f;
for (int attempts = 0; particles > 0 && attempts < 1000; attempts++) { for (int attempts = 0; particles > 0 && attempts < 1000; attempts++) {
CVector pos; CVector pos;
int rnd = CGeneral::GetRandomNumber(); int rnd = CGeneral::GetRandomNumber();
pos.x = (int8)(rnd - 128) * innerFw / 110.0f; pos.x = (int8)(rnd - 128) * innerFw / 110.0f;
pos.y = (int8)((rnd >> 8) - 128) * innerFw / 110.0f; pos.y = (int8)((rnd >> 8) - 128) * innerFw / 110.0f;
pos.z = 0.0f; pos.z = 0.0f;
if (DotProduct2D(pos, TheCamera.GetForward()) >= 0) if (DotProduct2D(pos, TheCamera.GetForward()) >= 0)
continue; continue;
// was there any point in adding it here? // was there any point in adding it here?
pos += pMatrix->GetPosition(); pos += pMatrix->GetPosition();
pos.z = 2.0f; pos.z = 2.0f;
float fw = Abs(DotProduct(pMatrix->GetForward(), pos - pMatrix->GetPosition())); float fw = Abs(DotProduct(pMatrix->GetForward(), pos - pMatrix->GetPosition()));
if (fw >= outerFw) if (fw >= outerFw)
continue; continue;
float rg = Abs(DotProduct(pMatrix->GetRight(), pos - pMatrix->GetPosition())); float rg = Abs(DotProduct(pMatrix->GetRight(), pos - pMatrix->GetPosition()));
if (rg >= outerRg) if (rg >= outerRg)
continue; continue;
float up = Abs(DotProduct(pMatrix->GetUp(), pos - pMatrix->GetPosition())); float up = Abs(DotProduct(pMatrix->GetUp(), pos - pMatrix->GetPosition()));
if (up >= outerUp) if (up >= outerUp)
continue; continue;
if (fw > innerFw || rg > innerRg || up > innerUp) { if (fw > innerFw || rg > innerRg || up > innerUp) {
CParticle::AddParticle(PARTICLE_STEAM2, pos, CVector(0.0f, 0.0f, 0.0f), nil, 4.0f, FoamColour, 1, 0, 0, 0); CParticle::AddParticle(PARTICLE_STEAM2, pos, CVector(0.0f, 0.0f, 0.0f), nil, 4.0f, FoamColour, 1, 0, 0, 0);
particles--; particles--;
} }
} }
} }
void void
CSpecialParticleStuff::StartBoatFoamAnimation() CSpecialParticleStuff::StartBoatFoamAnimation()
{ {
BoatFromStart = CTimer::GetTimeInMilliseconds(); BoatFromStart = CTimer::GetTimeInMilliseconds();
} }
void void
CSpecialParticleStuff::UpdateBoatFoamAnimation(CMatrix* pMatrix) CSpecialParticleStuff::UpdateBoatFoamAnimation(CMatrix* pMatrix)
{ {
static int32 FrameInAnimation = 0; static int32 FrameInAnimation = 0;
static float X, Y, Z, dX, dY, dZ; static float X, Y, Z, dX, dY, dZ;
CreateFoamAroundObject(pMatrix, 107.0f, 24.1f, 30.5f, 2); CreateFoamAroundObject(pMatrix, 107.0f, 24.1f, 30.5f, 2);
uint32 prev = CTimer::GetPreviousTimeInMilliseconds(); uint32 prev = CTimer::GetPreviousTimeInMilliseconds();
uint32 cur = CTimer::GetTimeInMilliseconds(); uint32 cur = CTimer::GetTimeInMilliseconds();
if (FrameInAnimation != 0) { if (FrameInAnimation != 0) {
X += dX; X += dX;
Y += dY; Y += dY;
Z += dZ; Z += dZ;
CVector pos = *pMatrix * CVector(X, Y, Z); CVector pos = *pMatrix * CVector(X, Y, Z);
CParticle::AddParticle(PARTICLE_STEAM_NY, pos, CVector(0.0f, 0.0f, 0.0f), CParticle::AddParticle(PARTICLE_STEAM_NY, pos, CVector(0.0f, 0.0f, 0.0f),
nil, FrameInAnimation * 0.5f + 2.0f, FoamColour, 1, 0, 0, 0); nil, FrameInAnimation * 0.5f + 2.0f, FoamColour, 1, 0, 0, 0);
if (++FrameInAnimation > 15) if (++FrameInAnimation > 15)
FrameInAnimation = 0; FrameInAnimation = 0;
} }
if ((cur & 0x3FF) < (prev & 0x3FF)) { if ((cur & 0x3FF) < (prev & 0x3FF)) {
FrameInAnimation = 1; FrameInAnimation = 1;
int rnd = CGeneral::GetRandomNumber(); int rnd = CGeneral::GetRandomNumber();
X = (int8)(rnd - 128) * 0.2f; X = (int8)(rnd - 128) * 0.2f;
Y = (int8)((rnd >> 8) - 128) * 0.2f; Y = (int8)((rnd >> 8) - 128) * 0.2f;
Z = 10.0f; Z = 10.0f;
rnd = CGeneral::GetRandomNumber(); rnd = CGeneral::GetRandomNumber();
dX = (int8)(rnd - 128) * 0.02f; dX = (int8)(rnd - 128) * 0.02f;
dY = (int8)((rnd >> 8) - 128) * 0.02f; dY = (int8)((rnd >> 8) - 128) * 0.02f;
dZ = 2.0f; dZ = 2.0f;
} }
} }
STARTPATCHES STARTPATCHES
InjectHook(0x518DE0, &CBulletTraces::Init, PATCH_JUMP); InjectHook(0x518DE0, &CBulletTraces::Init, PATCH_JUMP);
InjectHook(0x518E90, &CBulletTraces::AddTrace, PATCH_JUMP); InjectHook(0x518E90, &CBulletTraces::AddTrace, PATCH_JUMP);

View File

@ -2,7 +2,7 @@
#include "patcher.h" #include "patcher.h"
#include "WaterCannon.h" #include "WaterCannon.h"
CWaterCannon* aCannons = (CWaterCannon*)0x8F2CA8; CWaterCannon (&aCannons)[NUM_WATERCANNONS] = *(CWaterCannon(*)[NUM_WATERCANNONS])*(uintptr*)0x8F2CA8;
WRAPPER void CWaterCannons::Update(void) { EAXJMP(0x522510); } WRAPPER void CWaterCannons::Update(void) { EAXJMP(0x522510); }
WRAPPER void CWaterCannons::UpdateOne(uint32 id, CVector *pos, CVector *dir) { EAXJMP(0x522470); } WRAPPER void CWaterCannons::UpdateOne(uint32 id, CVector *pos, CVector *dir) { EAXJMP(0x522470); }

View File

@ -23,4 +23,5 @@ public:
static void Init(void); static void Init(void);
}; };
extern CWaterCannon *aCannons; extern CWaterCannon (&aCannons)[NUM_WATERCANNONS];

View File

@ -584,7 +584,7 @@ void _psPrintCpuInfo()
RwBool RwBool
psInitialise(void) psInitialise(void)
{ {
PsGlobal.lastMousePos.x = PsGlobal.lastMousePos.y = 0.0; PsGlobal.lastMousePos.x = PsGlobal.lastMousePos.y = 0.0f;
RsGlobal.ps = &PsGlobal; RsGlobal.ps = &PsGlobal;
@ -3066,4 +3066,4 @@ STARTPATCHES
InjectHook(0x583DC0, _InputTranslateShiftKeyUpDown, PATCH_JUMP); InjectHook(0x583DC0, _InputTranslateShiftKeyUpDown, PATCH_JUMP);
InjectHook(0x583E50, _InputTranslateShiftKey, PATCH_JUMP); InjectHook(0x583E50, _InputTranslateShiftKey, PATCH_JUMP);
InjectHook(0x583EE0, _InputIsExtended, PATCH_JUMP); InjectHook(0x583EE0, _InputIsExtended, PATCH_JUMP);
ENDPATCHES ENDPATCHES