mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 11:40:00 +00:00
merge upstream
This commit is contained in:
commit
44bbcbd14a
|
@ -47,7 +47,7 @@ deploy:
|
||||||
publish: true
|
publish: true
|
||||||
on:
|
on:
|
||||||
branch: miami
|
branch: miami
|
||||||
APPVEYOR_REPO_TAG: false
|
APPVEYOR_REPO_TAG: true
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- "%GLEW_FILE%"
|
- "%GLEW_FILE%"
|
||||||
|
|
|
@ -4899,7 +4899,7 @@ cAudioManager::SetPedTalkingStatus(CPed *ped, uint8 status)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cAudioManager::SetPlayersMood(uint8 mood, int32 time)
|
cAudioManager::SetPlayersMood(uint8 mood, uint32 time)
|
||||||
{
|
{
|
||||||
if (!m_bIsInitialised) return;
|
if (!m_bIsInitialised) return;
|
||||||
|
|
||||||
|
@ -5907,18 +5907,21 @@ cAudioManager::ProcessFrontEnd()
|
||||||
bool stereo;
|
bool stereo;
|
||||||
bool processedPickup;
|
bool processedPickup;
|
||||||
bool processedMission;
|
bool processedMission;
|
||||||
bool frontendBank;
|
bool staticFreq;
|
||||||
|
bool center;
|
||||||
int16 sample;
|
int16 sample;
|
||||||
|
|
||||||
static uint8 iSound = 0;
|
static uint8 iSound = 0;
|
||||||
static uint32 cPickupNextFrame = 0;
|
static uint32 cPickupNextFrame = 0;
|
||||||
static uint32 cPartMisComNextFrame = 0;
|
static uint32 cPartMisComNextFrame = 0;
|
||||||
|
static uint32 radioDial = SFX_RADIO_DIAL_1;
|
||||||
|
|
||||||
for (uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
|
for (uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
|
||||||
|
staticFreq = false;
|
||||||
processedPickup = false;
|
processedPickup = false;
|
||||||
stereo = false;
|
center = false;
|
||||||
processedMission = false;
|
processedMission = false;
|
||||||
frontendBank = false;
|
stereo = false;
|
||||||
switch (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i]) {
|
switch (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i]) {
|
||||||
case SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM:
|
case SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM:
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_ERROR_FIRE_RIFLE;
|
m_sQueueSample.m_nSampleIndex = SFX_ERROR_FIRE_RIFLE;
|
||||||
|
@ -5926,102 +5929,124 @@ cAudioManager::ProcessFrontEnd()
|
||||||
case SOUND_WEAPON_ROCKET_SHOT_NO_ZOOM:
|
case SOUND_WEAPON_ROCKET_SHOT_NO_ZOOM:
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_ERROR_FIRE_ROCKET_LAUNCHER;
|
m_sQueueSample.m_nSampleIndex = SFX_ERROR_FIRE_ROCKET_LAUNCHER;
|
||||||
break;
|
break;
|
||||||
//case SOUND_GARAGE_NO_MONEY:
|
case SOUND_GARAGE_NO_MONEY:
|
||||||
//case SOUND_GARAGE_BAD_VEHICLE:
|
case SOUND_GARAGE_BAD_VEHICLE:
|
||||||
//case SOUND_GARAGE_BOMB_ALREADY_SET:
|
case SOUND_GARAGE_BOMB_ALREADY_SET:
|
||||||
// m_sQueueSample.m_nSampleIndex = SFX_PICKUP_ERROR_LEFT;
|
m_sQueueSample.m_nSampleIndex = SFX_WEAPON_LEFT;
|
||||||
// stereo = true;
|
stereo = true;
|
||||||
// break;
|
staticFreq = true;
|
||||||
//case SOUND_GARAGE_OPENING:
|
center = true;
|
||||||
//case SOUND_GARAGE_BOMB1_SET:
|
break;
|
||||||
//case SOUND_GARAGE_BOMB2_SET:
|
case SOUND_GARAGE_OPENING:
|
||||||
//case SOUND_GARAGE_BOMB3_SET:
|
case SOUND_71: //case SOUND_41:
|
||||||
//case SOUND_41:
|
case SOUND_GARAGE_VEHICLE_DECLINED:
|
||||||
//case SOUND_GARAGE_VEHICLE_DECLINED:
|
case SOUND_GARAGE_VEHICLE_ACCEPTED:
|
||||||
//case SOUND_GARAGE_VEHICLE_ACCEPTED:
|
case SOUND_EVIDENCE_PICKUP:
|
||||||
//case SOUND_PICKUP_HEALTH:
|
case SOUND_UNLOAD_GOLD:
|
||||||
//case SOUND_4B:
|
stereo = true;
|
||||||
//case SOUND_PICKUP_ADRENALINE:
|
processedPickup = true;
|
||||||
//case SOUND_PICKUP_ARMOUR:
|
m_sQueueSample.m_nSampleIndex = SFX_MONEY_LEFT;
|
||||||
//case SOUND_EVIDENCE_PICKUP:
|
break;
|
||||||
//case SOUND_UNLOAD_GOLD:
|
case SOUND_GARAGE_BOMB1_SET:
|
||||||
// m_sQueueSample.m_nSampleIndex = SFX_PICKUP_2_LEFT;
|
case SOUND_GARAGE_BOMB2_SET:
|
||||||
// processedPickup = true;
|
case SOUND_GARAGE_BOMB3_SET:
|
||||||
// stereo = true;
|
center = true;
|
||||||
// break;
|
processedPickup = true;
|
||||||
//case SOUND_PICKUP_WEAPON_BOUGHT:
|
m_sQueueSample.m_nSampleIndex = SFX_WEAPON_LEFT;
|
||||||
//case SOUND_PICKUP_WEAPON:
|
stereo = true;
|
||||||
// m_sQueueSample.m_nSampleIndex = SFX_PICKUP_1_LEFT;
|
break;
|
||||||
// processedPickup = true;
|
case SOUND_PICKUP_HEALTH:
|
||||||
// stereo = true;
|
case SOUND_81: //case SOUND_4B:
|
||||||
// break;
|
case SOUND_PICKUP_ADRENALINE:
|
||||||
//case SOUND_PICKUP_ERROR:
|
case SOUND_PICKUP_ARMOUR:
|
||||||
// m_sQueueSample.m_nSampleIndex = SFX_PICKUP_ERROR_LEFT;
|
stereo = true;
|
||||||
// processedPickup = true;
|
processedPickup = true;
|
||||||
// stereo = true;
|
m_sQueueSample.m_nSampleIndex = SFX_MONEY_LEFT;
|
||||||
// break;
|
break;
|
||||||
//case SOUND_PICKUP_BONUS:
|
case SOUND_80:
|
||||||
//case SOUND_PICKUP_MONEY:
|
stereo = true;
|
||||||
//case SOUND_PICKUP_HIDDEN_PACKAGE:
|
processedPickup = true;
|
||||||
//case SOUND_PICKUP_PACMAN_PILL:
|
m_sQueueSample.m_nSampleIndex = SFX_WEAPON_LEFT;
|
||||||
//case SOUND_PICKUP_PACMAN_PACKAGE:
|
center = true;
|
||||||
//case SOUND_PICKUP_FLOAT_PACKAGE:
|
staticFreq = true;
|
||||||
// m_sQueueSample.m_nSampleIndex = SFX_PICKUP_3_LEFT;
|
break;
|
||||||
// processedPickup = true;
|
case SOUND_PICKUP_BONUS:
|
||||||
// stereo = true;
|
case SOUND_FRONTEND_MENU_STARTING:
|
||||||
// break;
|
case SOUND_HUD_SOUND:
|
||||||
//case SOUND_PAGER:
|
stereo = true;
|
||||||
// m_sQueueSample.m_nSampleIndex = SFX_PAGER;
|
m_sQueueSample.m_nSampleIndex = SFX_INFO_LEFT;
|
||||||
// break;
|
center = true;
|
||||||
|
break;
|
||||||
|
case SOUND_PICKUP_MONEY:
|
||||||
|
stereo = true;
|
||||||
|
processedPickup = true;
|
||||||
|
m_sQueueSample.m_nSampleIndex = SFX_MONEY_LEFT;
|
||||||
|
break;
|
||||||
|
case SOUND_PICKUP_HIDDEN_PACKAGE:
|
||||||
|
case SOUND_PICKUP_PACMAN_PILL:
|
||||||
|
case SOUND_PICKUP_PACMAN_PACKAGE:
|
||||||
|
case SOUND_PICKUP_FLOAT_PACKAGE:
|
||||||
|
center = true;
|
||||||
|
processedPickup = true;
|
||||||
|
m_sQueueSample.m_nSampleIndex = SFX_PART_MISSION_COMPLETE_LEFT;
|
||||||
|
stereo = true;
|
||||||
|
break;
|
||||||
case SOUND_RACE_START_3:
|
case SOUND_RACE_START_3:
|
||||||
case SOUND_RACE_START_2:
|
case SOUND_RACE_START_2:
|
||||||
case SOUND_RACE_START_1:
|
case SOUND_RACE_START_1:
|
||||||
case SOUND_CLOCK_TICK:
|
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_TIMER_BEEP;
|
|
||||||
break;
|
|
||||||
case SOUND_RACE_START_GO:
|
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_PART_MISSION_COMPLETE_LEFT;
|
|
||||||
break;
|
|
||||||
case SOUND_PART_MISSION_COMPLETE:
|
case SOUND_PART_MISSION_COMPLETE:
|
||||||
|
stereo = true;
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_PART_MISSION_COMPLETE_LEFT;
|
m_sQueueSample.m_nSampleIndex = SFX_PART_MISSION_COMPLETE_LEFT;
|
||||||
processedMission = true;
|
processedMission = true;
|
||||||
|
center = true;
|
||||||
break;
|
break;
|
||||||
case SOUND_FRONTEND_MENU_STARTING:
|
case SOUND_RACE_START_GO:
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_FE_HIGHLIGHT_LEFT;
|
|
||||||
stereo = true;
|
stereo = true;
|
||||||
|
m_sQueueSample.m_nSampleIndex = SFX_GO_LEFT;
|
||||||
|
center = true;
|
||||||
break;
|
break;
|
||||||
case SOUND_FRONTEND_MENU_NEW_PAGE:
|
case SOUND_CLOCK_TICK:
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_FE_HIGHLIGHT_LEFT;
|
m_sQueueSample.m_nSampleIndex = SFX_TIMER;
|
||||||
stereo = true;
|
|
||||||
frontendBank = true;
|
|
||||||
frontendBank = true;
|
|
||||||
break;
|
|
||||||
case SOUND_FRONTEND_MENU_SETTING_CHANGE:
|
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_FE_SELECT_LEFT;
|
|
||||||
stereo = true;
|
|
||||||
frontendBank = true;
|
|
||||||
|
|
||||||
|
|
||||||
break;
|
|
||||||
//case SOUND_FRONTEND_EXIT:
|
|
||||||
// m_sQueueSample.m_nSampleIndex = SFX_SUB_MENU_BACK_LEFT;
|
|
||||||
// stereo = true;
|
|
||||||
// break;
|
|
||||||
//case SOUND_FRONTEND_AUDIO_TEST:
|
|
||||||
// m_sQueueSample.m_nSampleIndex = m_anRandomTable[0] % 3 + SFX_NOISE_BURST_1;
|
|
||||||
// break;
|
|
||||||
case SOUND_FRONTEND_FAIL:
|
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_FE_ERROR_LEFT;
|
|
||||||
frontendBank = true;
|
|
||||||
stereo = true;
|
|
||||||
break;
|
break;
|
||||||
case SOUND_FRONTEND_NO_RADIO:
|
case SOUND_FRONTEND_NO_RADIO:
|
||||||
case SOUND_FRONTEND_RADIO_CHANGE:
|
case SOUND_FRONTEND_RADIO_CHANGE:
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_RADIO_CLICK;
|
m_sQueueSample.m_nSampleIndex = SFX_RADIO_CLICK;
|
||||||
break;
|
break;
|
||||||
//case SOUND_HUD_SOUND:
|
case SOUND_FRONTEND_RADIO_CHANGE_2:
|
||||||
// m_sQueueSample.m_nSampleIndex = SFX_INFO;
|
m_sQueueSample.m_nSampleIndex = SFX_HURRICANE_MA;
|
||||||
// break;
|
break;
|
||||||
|
case SOUND_BULLETTRACE_1:
|
||||||
|
case SOUND_BULLETTRACE_2:
|
||||||
|
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[0] % 2) + SFX_BULLET_PASS_1;
|
||||||
|
break;
|
||||||
|
case SOUND_AMMUNATION_IMRAN_ARM_BOMB:
|
||||||
|
m_sQueueSample.m_nSampleIndex = SFX_ARM_BOMB;
|
||||||
|
break;
|
||||||
|
case SOUND_RADIO_CHANGE:
|
||||||
|
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[1] % 2) ? radioDial + 1 : radioDial + 2;
|
||||||
|
if (m_sQueueSample.m_nSampleIndex > SFX_RADIO_DIAL_12)
|
||||||
|
m_sQueueSample.m_nSampleIndex -= 12;
|
||||||
|
radioDial = m_sQueueSample.m_nSampleIndex;
|
||||||
|
break;
|
||||||
|
case SOUND_FRONTEND_HIGHLIGHT_OPTION:
|
||||||
|
stereo = true;
|
||||||
|
m_sQueueSample.m_nSampleIndex = SFX_FE_HIGHLIGHT_LEFT;
|
||||||
|
break;
|
||||||
|
case SOUND_FRONTEND_ENTER_OR_ADJUST:
|
||||||
|
stereo = true;
|
||||||
|
m_sQueueSample.m_nSampleIndex = SFX_FE_SELECT_LEFT;
|
||||||
|
break;
|
||||||
|
case SOUND_FRONTEND_BACK:
|
||||||
|
stereo = true;
|
||||||
|
m_sQueueSample.m_nSampleIndex = SFX_FE_BACK_LEFT;
|
||||||
|
break;
|
||||||
|
case SOUND_FRONTEND_FAIL:
|
||||||
|
stereo = true;
|
||||||
|
m_sQueueSample.m_nSampleIndex = SFX_FE_ERROR_LEFT;
|
||||||
|
break;
|
||||||
|
case SOUND_FRONTEND_AUDIO_TEST:
|
||||||
|
m_sQueueSample.m_nSampleIndex = m_anRandomTable[0] % 3 + SFX_FE_NOISE_BURST_1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -6037,37 +6062,64 @@ cAudioManager::ProcessFrontEnd()
|
||||||
}
|
}
|
||||||
|
|
||||||
sample = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
|
sample = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
|
||||||
if (sample == SFX_RAIN) {
|
|
||||||
|
if (sample == SOUND_FRONTEND_NO_RADIO)
|
||||||
m_sQueueSample.m_nFrequency = 28509;
|
m_sQueueSample.m_nFrequency = 28509;
|
||||||
/*} else if (sample == SFX_PICKUP_1_LEFT) {
|
else if (sample == SOUND_FRONTEND_RADIO_CHANGE)
|
||||||
if (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i] == 1.0f)
|
m_sQueueSample.m_nFrequency = 32000;
|
||||||
m_sQueueSample.m_nFrequency = 32000;
|
else if (sample == SOUND_BULLETTRACE_1 || sample == SOUND_BULLETTRACE_2) {
|
||||||
else
|
|
||||||
m_sQueueSample.m_nFrequency = 48000;*/
|
|
||||||
} else {
|
|
||||||
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
|
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
|
||||||
}
|
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
|
||||||
m_sQueueSample.m_nVolume = 110;
|
} else if (staticFreq)
|
||||||
|
m_sQueueSample.m_nFrequency = 5382;
|
||||||
|
else
|
||||||
|
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
|
||||||
|
|
||||||
|
m_sQueueSample.m_nVolume = 127;
|
||||||
|
if (m_sQueueSample.m_nSampleIndex == SFX_HURRICANE_MA && CWeather::Wind > 1.0f)
|
||||||
|
m_sQueueSample.m_nVolume = (CWeather::Wind - 1.0f) * m_sQueueSample.m_nVolume;
|
||||||
m_sQueueSample.m_nCounter = iSound++;
|
m_sQueueSample.m_nCounter = iSound++;
|
||||||
m_sQueueSample.m_nLoopCount = 1;
|
m_sQueueSample.m_nLoopCount = 1;
|
||||||
m_sQueueSample.m_bReleasingSoundFlag = true;
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
||||||
m_sQueueSample.m_nBankIndex = frontendBank ? SFX_BANK_FRONT_END_MENU : SFX_BANK_0;
|
m_sQueueSample.m_nBankIndex = SFX_BANK_FRONT_END_MENU;
|
||||||
m_sQueueSample.m_nReleasingVolumeModificator = 0;
|
m_sQueueSample.m_nReleasingVolumeModificator = 0;
|
||||||
m_sQueueSample.m_bIs2D = true;
|
m_sQueueSample.m_bIs2D = true;
|
||||||
m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
|
m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
|
||||||
m_sQueueSample.m_nLoopStart = 0;
|
m_sQueueSample.m_nLoopStart = 0;
|
||||||
m_sQueueSample.m_nLoopEnd = -1;
|
m_sQueueSample.m_nLoopEnd = -1;
|
||||||
if (stereo)
|
m_sQueueSample.m_fDistance = 1.0f;
|
||||||
m_sQueueSample.m_nOffset = m_anRandomTable[0] & 31;
|
if (stereo)
|
||||||
else
|
m_sQueueSample.m_nOffset = 0;
|
||||||
|
else {
|
||||||
|
sample = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
|
||||||
|
if (sample == SOUND_BULLETTRACE_1) {
|
||||||
|
m_sQueueSample.m_nOffset = 20;
|
||||||
|
m_sQueueSample.m_nVolume = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
|
||||||
|
m_sQueueSample.m_nReleasingVolumeModificator = 10;
|
||||||
|
m_sQueueSample.m_fDistance = 100.0f;
|
||||||
|
}
|
||||||
|
if (sample == SOUND_BULLETTRACE_2) {
|
||||||
|
m_sQueueSample.m_nOffset = 107;
|
||||||
|
m_sQueueSample.m_nVolume = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
|
||||||
|
m_sQueueSample.m_nReleasingVolumeModificator = 10;
|
||||||
|
m_sQueueSample.m_fDistance = 100.0f;
|
||||||
|
}
|
||||||
m_sQueueSample.m_nOffset = 63;
|
m_sQueueSample.m_nOffset = 63;
|
||||||
|
}
|
||||||
m_sQueueSample.m_bReverbFlag = false;
|
m_sQueueSample.m_bReverbFlag = false;
|
||||||
m_sQueueSample.m_bRequireReflection = false;
|
m_sQueueSample.m_bRequireReflection = false;
|
||||||
AddSampleToRequestedQueue();
|
AddSampleToRequestedQueue();
|
||||||
if (stereo) {
|
if (stereo) {
|
||||||
++m_sQueueSample.m_nSampleIndex;
|
++m_sQueueSample.m_nSampleIndex;
|
||||||
m_sQueueSample.m_nCounter = iSound++;
|
m_sQueueSample.m_nCounter = iSound++;
|
||||||
m_sQueueSample.m_nOffset = MAX_VOLUME - m_sQueueSample.m_nOffset;
|
m_sQueueSample.m_nOffset = 127 - m_sQueueSample.m_nOffset;
|
||||||
|
AddSampleToRequestedQueue();
|
||||||
|
}
|
||||||
|
if (center) {
|
||||||
|
++m_sQueueSample.m_nSampleIndex;
|
||||||
|
m_sQueueSample.m_nCounter = iSound++;
|
||||||
|
m_sQueueSample.m_nOffset = 63;
|
||||||
|
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
|
||||||
AddSampleToRequestedQueue();
|
AddSampleToRequestedQueue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,8 +321,8 @@ public:
|
||||||
void ProcessEntity(int32 sound); // done
|
void ProcessEntity(int32 sound); // done
|
||||||
void ProcessExplosions(int32 explosion); // done
|
void ProcessExplosions(int32 explosion); // done
|
||||||
void ProcessFireHydrant(); // done
|
void ProcessFireHydrant(); // done
|
||||||
void ProcessFires(int32 entity); // done
|
void ProcessFires(int32 entity); //
|
||||||
void ProcessFrontEnd(); //
|
void ProcessFrontEnd(); // done
|
||||||
void ProcessGarages(); //
|
void ProcessGarages(); //
|
||||||
void ProcessCarHeli(cVehicleParams* params); // done
|
void ProcessCarHeli(cVehicleParams* params); // done
|
||||||
void ProcessVehicleFlatTyre(cVehicleParams* params); // done
|
void ProcessVehicleFlatTyre(cVehicleParams* params); // done
|
||||||
|
@ -418,7 +418,7 @@ public:
|
||||||
|
|
||||||
CVehicle *FindVehicleOfPlayer(); //done
|
CVehicle *FindVehicleOfPlayer(); //done
|
||||||
void SetPedTalkingStatus(CPed *ped, uint8 status);
|
void SetPedTalkingStatus(CPed *ped, uint8 status);
|
||||||
void SetPlayersMood(uint8 mood, int32 time);
|
void SetPlayersMood(uint8 mood, uint32 time);
|
||||||
|
|
||||||
#ifdef GTA_PC
|
#ifdef GTA_PC
|
||||||
// only used in pc
|
// only used in pc
|
||||||
|
|
|
@ -5,9 +5,6 @@
|
||||||
#include "AudioManager.h"
|
#include "AudioManager.h"
|
||||||
#include "AudioScriptObject.h"
|
#include "AudioScriptObject.h"
|
||||||
#include "sampman.h"
|
#include "sampman.h"
|
||||||
#include "Font.h"
|
|
||||||
#include "Text.h"
|
|
||||||
#include "crossplatform.h"
|
|
||||||
|
|
||||||
cDMAudio DMAudio;
|
cDMAudio DMAudio;
|
||||||
|
|
||||||
|
@ -241,13 +238,13 @@ cDMAudio::PlayFrontEndSound(uint16 frontend, uint32 volume)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PlayRadioAnnouncement(uint8 announcement)
|
cDMAudio::PlayRadioAnnouncement(uint32 announcement)
|
||||||
{
|
{
|
||||||
MusicManager.PlayAnnouncement(announcement);
|
MusicManager.PlayAnnouncement(announcement);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PlayFrontEndTrack(uint8 track, uint8 frontendFlag)
|
cDMAudio::PlayFrontEndTrack(uint32 track, uint8 frontendFlag)
|
||||||
{
|
{
|
||||||
MusicManager.PlayFrontEndTrack(track, frontendFlag);
|
MusicManager.PlayFrontEndTrack(track, frontendFlag);
|
||||||
}
|
}
|
||||||
|
@ -271,7 +268,7 @@ cDMAudio::ChangeMusicMode(uint8 mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PreloadCutSceneMusic(uint8 track)
|
cDMAudio::PreloadCutSceneMusic(uint32 track)
|
||||||
{
|
{
|
||||||
MusicManager.PreloadCutSceneMusic(track);
|
MusicManager.PreloadCutSceneMusic(track);
|
||||||
}
|
}
|
||||||
|
@ -337,7 +334,7 @@ cDMAudio::SetRadioInCar(uint32 radio)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::SetRadioChannel(int8 radio, int32 pos)
|
cDMAudio::SetRadioChannel(uint32 radio, int32 pos)
|
||||||
{
|
{
|
||||||
MusicManager.SetRadioChannelByScript(radio, pos);
|
MusicManager.SetRadioChannelByScript(radio, pos);
|
||||||
}
|
}
|
||||||
|
@ -373,7 +370,7 @@ cDMAudio::SetPedTalkingStatus(CPed *ped, uint8 status)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::SetPlayersMood(uint8 mood, int32 time)
|
cDMAudio::SetPlayersMood(uint8 mood, uint32 time)
|
||||||
{
|
{
|
||||||
return AudioManager.SetPlayersMood(mood, time);
|
return AudioManager.SetPlayersMood(mood, time);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,15 +69,15 @@ public:
|
||||||
void ReportCollision(CEntity *entityA, CEntity *entityB, uint8 surfaceTypeA, uint8 surfaceTypeB, float collisionPower, float velocity);
|
void ReportCollision(CEntity *entityA, CEntity *entityB, uint8 surfaceTypeA, uint8 surfaceTypeB, float collisionPower, float velocity);
|
||||||
|
|
||||||
void PlayFrontEndSound(uint16 frontend, uint32 volume);
|
void PlayFrontEndSound(uint16 frontend, uint32 volume);
|
||||||
void PlayRadioAnnouncement(uint8 announcement);
|
void PlayRadioAnnouncement(uint32 announcement);
|
||||||
void PlayFrontEndTrack(uint8 track, uint8 frontendFlag);
|
void PlayFrontEndTrack(uint32 track, uint8 frontendFlag);
|
||||||
void StopFrontEndTrack(void);
|
void StopFrontEndTrack(void);
|
||||||
|
|
||||||
void ResetTimers(uint32 time);
|
void ResetTimers(uint32 time);
|
||||||
|
|
||||||
void ChangeMusicMode(uint8 mode);
|
void ChangeMusicMode(uint8 mode);
|
||||||
|
|
||||||
void PreloadCutSceneMusic(uint8 track);
|
void PreloadCutSceneMusic(uint32 track);
|
||||||
void PlayPreloadedCutSceneMusic(void);
|
void PlayPreloadedCutSceneMusic(void);
|
||||||
void StopCutSceneMusic(void);
|
void StopCutSceneMusic(void);
|
||||||
|
|
||||||
|
@ -90,14 +90,14 @@ public:
|
||||||
|
|
||||||
uint8 GetRadioInCar(void);
|
uint8 GetRadioInCar(void);
|
||||||
void SetRadioInCar(uint32 radio);
|
void SetRadioInCar(uint32 radio);
|
||||||
void SetRadioChannel(int8 radio, int32 pos);
|
void SetRadioChannel(uint32 radio, int32 pos);
|
||||||
|
|
||||||
void SetStartingTrackPositions(uint8 isStartGame);
|
void SetStartingTrackPositions(uint8 isStartGame);
|
||||||
float *GetListenTimeArray();
|
float *GetListenTimeArray();
|
||||||
uint32 GetFavouriteRadioStation();
|
uint32 GetFavouriteRadioStation();
|
||||||
int32 GetRadioPosition(uint32 station);
|
int32 GetRadioPosition(uint32 station);
|
||||||
void SetPedTalkingStatus(class CPed *ped, uint8 status);
|
void SetPedTalkingStatus(class CPed *ped, uint8 status);
|
||||||
void SetPlayersMood(uint8 mood, int32 time);
|
void SetPlayersMood(uint8 mood, uint32 time);
|
||||||
void ShutUpPlayerTalking(uint8 state);
|
void ShutUpPlayerTalking(uint8 state);
|
||||||
};
|
};
|
||||||
extern cDMAudio DMAudio;
|
extern cDMAudio DMAudio;
|
||||||
|
|
|
@ -618,7 +618,7 @@ cMusicManager::ServiceGameMode()
|
||||||
}
|
}
|
||||||
if (RadioStaticCounter < 2 && CTimer::GetTimeInMilliseconds() > RadioStaticTimer + 800)
|
if (RadioStaticCounter < 2 && CTimer::GetTimeInMilliseconds() > RadioStaticTimer + 800)
|
||||||
{
|
{
|
||||||
AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_194, 0.0f);
|
AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_RADIO_CHANGE, 0.0f);
|
||||||
RadioStaticCounter++;
|
RadioStaticCounter++;
|
||||||
RadioStaticTimer = CTimer::GetTimeInMilliseconds();
|
RadioStaticTimer = CTimer::GetTimeInMilliseconds();
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,15 +193,12 @@ enum eSound : uint16
|
||||||
SOUND_WEAPON_MINIGUN_2,
|
SOUND_WEAPON_MINIGUN_2,
|
||||||
SOUND_WEAPON_MINIGUN_3,
|
SOUND_WEAPON_MINIGUN_3,
|
||||||
SOUND_AMMUNATION_IMRAN_ARM_BOMB,
|
SOUND_AMMUNATION_IMRAN_ARM_BOMB,
|
||||||
SOUND_194,
|
SOUND_RADIO_CHANGE,
|
||||||
|
SOUND_FRONTEND_HIGHLIGHT_OPTION,
|
||||||
// TODO(Miami): They're frontend sounds but names are copy-paste and incorrect
|
SOUND_FRONTEND_ENTER_OR_ADJUST,
|
||||||
SOUND_FRONTEND_MENU_NEW_PAGE,
|
SOUND_FRONTEND_BACK,
|
||||||
SOUND_FRONTEND_FAIL,
|
SOUND_FRONTEND_FAIL,
|
||||||
SOUND_FRONTEND_MENU_SETTING_CHANGE,
|
|
||||||
SOUND_FRONTEND_MENU_BACK,
|
|
||||||
SOUND_FRONTEND_AUDIO_TEST,
|
SOUND_FRONTEND_AUDIO_TEST,
|
||||||
|
|
||||||
SOUND_INJURED_PED_MALE_OUCH,
|
SOUND_INJURED_PED_MALE_OUCH,
|
||||||
SOUND_INJURED_PED_FEMALE,
|
SOUND_INJURED_PED_FEMALE,
|
||||||
SOUND_SET_202,
|
SOUND_SET_202,
|
||||||
|
|
|
@ -219,7 +219,7 @@ CMenuManager::PageUpList(bool playSoundOnSuccess)
|
||||||
if (m_nTotalListRow > MAX_VISIBLE_LIST_ROW) {
|
if (m_nTotalListRow > MAX_VISIBLE_LIST_ROW) {
|
||||||
if (m_nFirstVisibleRowOnList > 0) {
|
if (m_nFirstVisibleRowOnList > 0) {
|
||||||
if(playSoundOnSuccess)
|
if(playSoundOnSuccess)
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_HIGHLIGHT_OPTION, 0);
|
||||||
|
|
||||||
m_nFirstVisibleRowOnList = Max(0, m_nFirstVisibleRowOnList - MAX_VISIBLE_LIST_ROW);
|
m_nFirstVisibleRowOnList = Max(0, m_nFirstVisibleRowOnList - MAX_VISIBLE_LIST_ROW);
|
||||||
m_nSelectedListRow = Min(m_nSelectedListRow, m_nFirstVisibleRowOnList + MAX_VISIBLE_LIST_ROW - 1);
|
m_nSelectedListRow = Min(m_nSelectedListRow, m_nFirstVisibleRowOnList + MAX_VISIBLE_LIST_ROW - 1);
|
||||||
|
@ -237,7 +237,7 @@ CMenuManager::PageDownList(bool playSoundOnSuccess)
|
||||||
if (m_nTotalListRow > MAX_VISIBLE_LIST_ROW) {
|
if (m_nTotalListRow > MAX_VISIBLE_LIST_ROW) {
|
||||||
if (m_nFirstVisibleRowOnList < m_nTotalListRow - MAX_VISIBLE_LIST_ROW) {
|
if (m_nFirstVisibleRowOnList < m_nTotalListRow - MAX_VISIBLE_LIST_ROW) {
|
||||||
if(playSoundOnSuccess)
|
if(playSoundOnSuccess)
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_HIGHLIGHT_OPTION, 0);
|
||||||
|
|
||||||
m_nFirstVisibleRowOnList = Min(m_nFirstVisibleRowOnList + MAX_VISIBLE_LIST_ROW, m_nTotalListRow - MAX_VISIBLE_LIST_ROW);
|
m_nFirstVisibleRowOnList = Min(m_nFirstVisibleRowOnList + MAX_VISIBLE_LIST_ROW, m_nTotalListRow - MAX_VISIBLE_LIST_ROW);
|
||||||
m_nSelectedListRow = Max(m_nSelectedListRow, m_nFirstVisibleRowOnList);
|
m_nSelectedListRow = Max(m_nSelectedListRow, m_nFirstVisibleRowOnList);
|
||||||
|
@ -489,6 +489,7 @@ CMenuManager::CentreMousePointer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --MIAMI: Done
|
||||||
void
|
void
|
||||||
CMenuManager::CheckCodesForControls(int typeOfControl)
|
CMenuManager::CheckCodesForControls(int typeOfControl)
|
||||||
{
|
{
|
||||||
|
@ -524,26 +525,23 @@ CMenuManager::CheckCodesForControls(int typeOfControl)
|
||||||
if(!escPressed && !invalidKey)
|
if(!escPressed && !invalidKey)
|
||||||
#endif
|
#endif
|
||||||
ControlsManager.ClearSettingsAssociatedWithAction(action, typeToSave);
|
ControlsManager.ClearSettingsAssociatedWithAction(action, typeToSave);
|
||||||
|
|
||||||
if (!DisplayComboButtonErrMsg && !escPressed && !invalidKey) {
|
if (!DisplayComboButtonErrMsg && !escPressed && !invalidKey) {
|
||||||
if (typeOfControl == KEYBOARD) {
|
if (typeOfControl == KEYBOARD) {
|
||||||
ControlsManager.DeleteMatchingActionInitiators(action, *pControlEdit, KEYBOARD);
|
ControlsManager.DeleteMatchingActionInitiators(action, *pControlEdit, KEYBOARD);
|
||||||
ControlsManager.DeleteMatchingActionInitiators(action, *pControlEdit, OPTIONAL_EXTRA);
|
ControlsManager.DeleteMatchingActionInitiators(action, *pControlEdit, OPTIONAL_EXTRA);
|
||||||
} else {
|
} else if (typeOfControl == MOUSE) {
|
||||||
if (typeOfControl == MOUSE) {
|
ControlsManager.DeleteMatchingActionInitiators(action, MouseButtonJustClicked, MOUSE);
|
||||||
ControlsManager.DeleteMatchingActionInitiators(action, MouseButtonJustClicked, MOUSE);
|
} else if (typeOfControl == JOYSTICK) {
|
||||||
} else if (typeOfControl == JOYSTICK) {
|
ControlsManager.DeleteMatchingActionInitiators(action, JoyButtonJustClicked, JOYSTICK);
|
||||||
ControlsManager.DeleteMatchingActionInitiators(action, JoyButtonJustClicked, JOYSTICK);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeOfControl == KEYBOARD) {
|
if (typeOfControl == KEYBOARD) {
|
||||||
ControlsManager.SetControllerKeyAssociatedWithAction(action, *pControlEdit, typeToSave);
|
ControlsManager.SetControllerKeyAssociatedWithAction(action, *pControlEdit, typeToSave);
|
||||||
|
|
||||||
} else if (typeOfControl == MOUSE) {
|
} else if (typeOfControl == MOUSE) {
|
||||||
ControlsManager.SetControllerKeyAssociatedWithAction(action, MouseButtonJustClicked, typeToSave);
|
ControlsManager.SetControllerKeyAssociatedWithAction(action, MouseButtonJustClicked, typeToSave);
|
||||||
} else {
|
} else if (typeOfControl == JOYSTICK) {
|
||||||
if (typeOfControl == JOYSTICK) {
|
ControlsManager.SetControllerKeyAssociatedWithAction(action, JoyButtonJustClicked, typeToSave);
|
||||||
ControlsManager.SetControllerKeyAssociatedWithAction(action, JoyButtonJustClicked, typeToSave);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
pControlEdit = nil;
|
pControlEdit = nil;
|
||||||
m_bWaitingForNewKeyBind = false;
|
m_bWaitingForNewKeyBind = false;
|
||||||
|
@ -551,14 +549,6 @@ CMenuManager::CheckCodesForControls(int typeOfControl)
|
||||||
m_bStartWaitingForKeyBind = false;
|
m_bStartWaitingForKeyBind = false;
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (escPressed) {
|
|
||||||
pControlEdit = nil;
|
|
||||||
m_bWaitingForNewKeyBind = false;
|
|
||||||
m_KeyPressedCode = -1;
|
|
||||||
m_bStartWaitingForKeyBind = false;
|
|
||||||
SaveSettings();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -1360,6 +1350,7 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --MIAMI: Done
|
||||||
int
|
int
|
||||||
CMenuManager::GetNumOptionsCntrlConfigScreens(void)
|
CMenuManager::GetNumOptionsCntrlConfigScreens(void)
|
||||||
{
|
{
|
||||||
|
@ -1376,10 +1367,10 @@ CMenuManager::GetNumOptionsCntrlConfigScreens(void)
|
||||||
case MENUPAGE_KEYBOARD_CONTROLS:
|
case MENUPAGE_KEYBOARD_CONTROLS:
|
||||||
switch (m_ControlMethod) {
|
switch (m_ControlMethod) {
|
||||||
case CONTROL_STANDARD:
|
case CONTROL_STANDARD:
|
||||||
number = 25;
|
number = 27;
|
||||||
break;
|
break;
|
||||||
case CONTROL_CLASSIC:
|
case CONTROL_CLASSIC:
|
||||||
number = 30;
|
number = 32;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1706,8 +1697,6 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE));
|
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE));
|
||||||
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
|
||||||
if (!m_bKeyIsOK)
|
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
|
|
||||||
|
|
||||||
m_bKeyIsOK = true;
|
m_bKeyIsOK = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1736,6 +1725,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --MIAMI: Done
|
||||||
void
|
void
|
||||||
CMenuManager::DrawControllerScreenExtraText(int yStart, int xStart, int lineHeight)
|
CMenuManager::DrawControllerScreenExtraText(int yStart, int xStart, int lineHeight)
|
||||||
{
|
{
|
||||||
|
@ -1777,7 +1767,7 @@ CMenuManager::DrawControllerScreenExtraText(int yStart, int xStart, int lineHeig
|
||||||
if (waitingTextVisible) {
|
if (waitingTextVisible) {
|
||||||
CFont::SetColor(CRGBA(255, 255, 0, FadeIn(255)));
|
CFont::SetColor(CRGBA(255, 255, 0, FadeIn(255)));
|
||||||
CFont::PrintString(nextX, MENU_Y(yStart), TheText.Get("FEC_QUE"));
|
CFont::PrintString(nextX, MENU_Y(yStart), TheText.Get("FEC_QUE"));
|
||||||
CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
|
CFont::SetColor(CRGBA(LABEL_COLOR.r, LABEL_COLOR.g, LABEL_COLOR.b, FadeIn(255)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
yStart += lineHeight;
|
yStart += lineHeight;
|
||||||
|
@ -1815,20 +1805,19 @@ CMenuManager::DrawControllerSetupScreen()
|
||||||
CFont::SetBackGroundOnlyTextOn();
|
CFont::SetBackGroundOnlyTextOn();
|
||||||
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
|
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
|
||||||
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
|
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
|
||||||
|
PREPARE_MENU_HEADER
|
||||||
|
|
||||||
switch (m_ControlMethod) {
|
switch (m_ControlMethod) {
|
||||||
case CONTROL_STANDARD:
|
case CONTROL_STANDARD:
|
||||||
PREPARE_MENU_HEADER
|
|
||||||
CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255)));
|
CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255)));
|
||||||
CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f),
|
CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f),
|
||||||
TheText.Get(aScreens[m_nCurrScreen].m_ScreenName));
|
TheText.Get("FET_STI"));
|
||||||
|
|
||||||
CFont::SetColor(CRGBA(HEADER_COLOR.r, HEADER_COLOR.g, HEADER_COLOR.b, FadeIn(255)));
|
CFont::SetColor(CRGBA(HEADER_COLOR.r, HEADER_COLOR.g, HEADER_COLOR.b, FadeIn(255)));
|
||||||
CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y),
|
CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y),
|
||||||
TheText.Get(aScreens[m_nCurrScreen].m_ScreenName));
|
TheText.Get("FET_STI"));
|
||||||
break;
|
break;
|
||||||
case CONTROL_CLASSIC:
|
case CONTROL_CLASSIC:
|
||||||
PREPARE_MENU_HEADER
|
|
||||||
CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255)));
|
CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255)));
|
||||||
CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f),
|
CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f),
|
||||||
TheText.Get("FET_CTI"));
|
TheText.Get("FET_CTI"));
|
||||||
|
@ -1840,7 +1829,7 @@ CMenuManager::DrawControllerSetupScreen()
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wchar *actionTexts[31];
|
wchar *actionTexts[33];
|
||||||
actionTexts[0] = TheText.Get("FEC_FIR");
|
actionTexts[0] = TheText.Get("FEC_FIR");
|
||||||
actionTexts[1] = TheText.Get("FEC_NWE");
|
actionTexts[1] = TheText.Get("FEC_NWE");
|
||||||
actionTexts[2] = TheText.Get("FEC_PWE");
|
actionTexts[2] = TheText.Get("FEC_PWE");
|
||||||
|
@ -1859,29 +1848,31 @@ CMenuManager::DrawControllerSetupScreen()
|
||||||
actionTexts[15] = TheText.Get("FEC_SPN");
|
actionTexts[15] = TheText.Get("FEC_SPN");
|
||||||
actionTexts[16] = TheText.Get("FEC_HND");
|
actionTexts[16] = TheText.Get("FEC_HND");
|
||||||
actionTexts[17] = TheText.Get("FEC_TAR");
|
actionTexts[17] = TheText.Get("FEC_TAR");
|
||||||
|
actionTexts[18] = TheText.Get("FEC_CRO");
|
||||||
|
actionTexts[19] = TheText.Get("FEC_ANS");
|
||||||
if (m_ControlMethod == CONTROL_CLASSIC) {
|
if (m_ControlMethod == CONTROL_CLASSIC) {
|
||||||
actionTexts[18] = TheText.Get("FEC_TFL");
|
actionTexts[20] = TheText.Get("FEC_TFL");
|
||||||
actionTexts[19] = TheText.Get("FEC_TFR");
|
actionTexts[21] = TheText.Get("FEC_TFR");
|
||||||
actionTexts[20] = TheText.Get("FEC_TFU");
|
actionTexts[22] = TheText.Get("FEC_TFU");
|
||||||
actionTexts[21] = TheText.Get("FEC_TFD");
|
actionTexts[23] = TheText.Get("FEC_TFD");
|
||||||
actionTexts[22] = TheText.Get("FEC_LBA");
|
actionTexts[24] = TheText.Get("FEC_LBA");
|
||||||
actionTexts[23] = TheText.Get("FEC_LOL");
|
actionTexts[25] = TheText.Get("FEC_LOL");
|
||||||
actionTexts[24] = TheText.Get("FEC_LOR");
|
actionTexts[26] = TheText.Get("FEC_LOR");
|
||||||
actionTexts[25] = TheText.Get("FEC_LUD");
|
actionTexts[27] = TheText.Get("FEC_LUD");
|
||||||
actionTexts[26] = TheText.Get("FEC_LDU");
|
actionTexts[28] = TheText.Get("FEC_LDU");
|
||||||
actionTexts[27] = TheText.Get("FEC_NTR");
|
actionTexts[29] = TheText.Get("FEC_NTR");
|
||||||
actionTexts[28] = TheText.Get("FEC_PTT");
|
actionTexts[30] = TheText.Get("FEC_PTT");
|
||||||
actionTexts[29] = TheText.Get("FEC_CEN");
|
actionTexts[31] = TheText.Get("FEC_CEN");
|
||||||
actionTexts[30] = nil;
|
actionTexts[32] = nil;
|
||||||
} else {
|
} else {
|
||||||
actionTexts[18] = TheText.Get("FEC_TFL");
|
actionTexts[20] = TheText.Get("FEC_TFL");
|
||||||
actionTexts[19] = TheText.Get("FEC_TFR");
|
actionTexts[21] = TheText.Get("FEC_TFR");
|
||||||
actionTexts[20] = TheText.Get("FEC_TFU");
|
actionTexts[22] = TheText.Get("FEC_TFU");
|
||||||
actionTexts[21] = TheText.Get("FEC_TFD");
|
actionTexts[23] = TheText.Get("FEC_TFD");
|
||||||
actionTexts[22] = TheText.Get("FEC_LBA");
|
actionTexts[24] = TheText.Get("FEC_LBA");
|
||||||
actionTexts[23] = TheText.Get("FEC_LOL");
|
actionTexts[25] = TheText.Get("FEC_LOL");
|
||||||
actionTexts[24] = TheText.Get("FEC_LOR");
|
actionTexts[26] = TheText.Get("FEC_LOR");
|
||||||
actionTexts[25] = nil;
|
actionTexts[27] = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gray panel background
|
// Gray panel background
|
||||||
|
@ -1915,56 +1906,49 @@ CMenuManager::DrawControllerSetupScreen()
|
||||||
if (!actionText)
|
if (!actionText)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (m_nMousePosX > MENU_X_LEFT_ALIGNED(CONTSETUP_LIST_LEFT + 2.0f) &&
|
if (!m_bWaitingForNewKeyBind) {
|
||||||
m_nMousePosX < MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_3_X + CONTSETUP_BOUND_COLUMN_WIDTH)) {
|
if (m_nMousePosX > MENU_X_LEFT_ALIGNED(CONTSETUP_LIST_LEFT + 2.0f) &&
|
||||||
|
m_nMousePosX < MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_3_X + CONTSETUP_BOUND_COLUMN_WIDTH)) {
|
||||||
|
|
||||||
float curOptY = i * rowHeight + yStart;
|
float curOptY = i * rowHeight + yStart;
|
||||||
if (m_nMousePosY > MENU_Y(curOptY) && m_nMousePosY < MENU_Y(rowHeight + curOptY)) {
|
if (m_nMousePosY > MENU_Y(curOptY) && m_nMousePosY < MENU_Y(rowHeight + curOptY)) {
|
||||||
if (m_nOptionMouseHovering != i && m_nCurrExLayer == HOVEROPTION_LIST)
|
m_nOptionMouseHovering = i;
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
if (m_nMouseOldPosX != m_nMousePosX || m_nMouseOldPosY != m_nMousePosY) {
|
||||||
|
m_nCurrExLayer = HOVEROPTION_LIST;
|
||||||
|
m_nSelectedListRow = i;
|
||||||
|
|
||||||
m_nOptionMouseHovering = i;
|
// why different number for 3rd column hovering X?? this function is a mess
|
||||||
if (m_nMouseOldPosX != m_nMousePosX || m_nMouseOldPosY != m_nMousePosY) {
|
|
||||||
m_nCurrExLayer = HOVEROPTION_LIST;
|
|
||||||
m_nSelectedListRow = i;
|
|
||||||
|
|
||||||
// why different number for 3rd column hovering X?? this function is a mess
|
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
if (m_nMousePosX > MENU_X_LEFT_ALIGNED(0.0f) && m_nMousePosX < MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_2_X + CONTSETUP_BOUND_COLUMN_WIDTH)) {
|
if (m_nMousePosX > MENU_X_LEFT_ALIGNED(0.0f) && m_nMousePosX < MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_2_X + CONTSETUP_BOUND_COLUMN_WIDTH)) {
|
||||||
#else
|
#else
|
||||||
if (m_nMousePosX > MENU_X_LEFT_ALIGNED(0.0f) && m_nMousePosX < MENU_X_LEFT_ALIGNED(370.0f)) {
|
if (m_nMousePosX > MENU_X_LEFT_ALIGNED(0.0f) && m_nMousePosX < MENU_X_LEFT_ALIGNED(370.0f)) {
|
||||||
#endif
|
#endif
|
||||||
if (m_nSelectedContSetupColumn != CONTSETUP_PED_COLUMN && m_nCurrExLayer == HOVEROPTION_LIST)
|
m_nSelectedContSetupColumn = CONTSETUP_PED_COLUMN;
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
|
||||||
|
|
||||||
m_nSelectedContSetupColumn = CONTSETUP_PED_COLUMN;
|
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
} else if (m_nMousePosX > MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_2_X + CONTSETUP_BOUND_COLUMN_WIDTH) && m_nMousePosX < SCREEN_WIDTH) {
|
} else if (m_nMousePosX > MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_2_X + CONTSETUP_BOUND_COLUMN_WIDTH) && m_nMousePosX < SCREEN_WIDTH) {
|
||||||
#else
|
#else
|
||||||
} else if (m_nMousePosX > MENU_X_LEFT_ALIGNED(370.0f) && m_nMousePosX < SCREEN_WIDTH) {
|
} else if (m_nMousePosX > MENU_X_LEFT_ALIGNED(370.0f) && m_nMousePosX < SCREEN_WIDTH) {
|
||||||
#endif
|
#endif
|
||||||
if (m_nSelectedContSetupColumn != CONTSETUP_VEHICLE_COLUMN && m_nCurrExLayer == HOVEROPTION_LIST)
|
m_nSelectedContSetupColumn = CONTSETUP_VEHICLE_COLUMN;
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
}
|
||||||
|
|
||||||
m_nSelectedContSetupColumn = CONTSETUP_VEHICLE_COLUMN;
|
|
||||||
}
|
}
|
||||||
}
|
// what??
|
||||||
// what??
|
if (m_nHoverOption == HOVEROPTION_SKIN) {
|
||||||
if (m_nHoverOption == HOVEROPTION_SKIN) {
|
if (i == m_nSelectedListRow) {
|
||||||
if (i == m_nSelectedListRow) {
|
m_nHoverOption = HOVEROPTION_NOT_HOVERING;
|
||||||
|
m_bWaitingForNewKeyBind = true;
|
||||||
|
m_bStartWaitingForKeyBind = true;
|
||||||
|
pControlEdit = &m_KeyPressedCode;
|
||||||
|
}
|
||||||
|
} else
|
||||||
m_nHoverOption = HOVEROPTION_NOT_HOVERING;
|
m_nHoverOption = HOVEROPTION_NOT_HOVERING;
|
||||||
m_bWaitingForNewKeyBind = true;
|
}
|
||||||
m_bStartWaitingForKeyBind = true;
|
|
||||||
pControlEdit = &m_KeyPressedCode;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
m_nHoverOption = HOVEROPTION_NOT_HOVERING;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_nSelectedListRow != 35)
|
if (m_nSelectedListRow != i)
|
||||||
CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
|
CFont::SetColor(CRGBA(MENUOPTION_COLOR.r, MENUOPTION_COLOR.g, MENUOPTION_COLOR.b, FadeIn(255)));
|
||||||
else if (m_nCurrExLayer == HOVEROPTION_LIST)
|
else if (m_nCurrExLayer == HOVEROPTION_LIST)
|
||||||
CFont::SetColor(CRGBA(255, 217, 106, FadeIn(255)));
|
CFont::SetColor(CRGBA(SELECTEDMENUOPTION_COLOR.r, SELECTEDMENUOPTION_COLOR.g, SELECTEDMENUOPTION_COLOR.b, FadeIn(255)));
|
||||||
|
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
if (m_PrefsLanguage != LANGUAGE_GERMAN || i != 20 && i != 21)
|
if (m_PrefsLanguage != LANGUAGE_GERMAN || i != 20 && i != 21)
|
||||||
|
@ -1976,19 +1960,22 @@ CMenuManager::DrawControllerSetupScreen()
|
||||||
}
|
}
|
||||||
DrawControllerBound(yStart, MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_2_X), rowHeight, CONTSETUP_PED_COLUMN);
|
DrawControllerBound(yStart, MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_2_X), rowHeight, CONTSETUP_PED_COLUMN);
|
||||||
DrawControllerBound(yStart, MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_3_X), rowHeight, CONTSETUP_VEHICLE_COLUMN);
|
DrawControllerBound(yStart, MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_3_X), rowHeight, CONTSETUP_VEHICLE_COLUMN);
|
||||||
CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X), MENU_Y(MENU_TEXT_SIZE_Y));
|
|
||||||
|
|
||||||
if ((m_nMousePosX > MENU_X_RIGHT_ALIGNED(CONTSETUP_BACK_RIGHT) - CFont::GetStringWidth(TheText.Get("FEDS_TB"), true)
|
if (!m_bWaitingForNewKeyBind) {
|
||||||
&& m_nMousePosX < MENU_X_RIGHT_ALIGNED(CONTSETUP_BACK_RIGHT) && m_nMousePosY > SCREEN_SCALE_FROM_BOTTOM(CONTSETUP_BACK_BOTTOM)
|
CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X), MENU_Y(MENU_TEXT_SIZE_Y));
|
||||||
&& m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(CONTSETUP_BACK_BOTTOM - CONTSETUP_BACK_HEIGHT)) || m_nCurrExLayer == HOVEROPTION_BACK) {
|
|
||||||
m_nHoverOption = HOVEROPTION_BACK;
|
|
||||||
|
|
||||||
} else if (m_nMousePosX > MENU_X_LEFT_ALIGNED(CONTSETUP_LIST_LEFT + 2.0f) && m_nMousePosX < MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_3_X + CONTSETUP_BOUND_COLUMN_WIDTH)
|
if ((m_nMousePosX > MENU_X_RIGHT_ALIGNED(CONTSETUP_BACK_RIGHT) - CFont::GetStringWidth(TheText.Get("FEDS_TB"), true)
|
||||||
&& m_nMousePosY > MENU_Y(CONTSETUP_LIST_TOP + CONTSETUP_LIST_HEADER_HEIGHT) && m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(CONTSETUP_LIST_BOTTOM + 5.0f)) {
|
&& m_nMousePosX < MENU_X_RIGHT_ALIGNED(CONTSETUP_BACK_RIGHT) && m_nMousePosY > SCREEN_SCALE_FROM_BOTTOM(CONTSETUP_BACK_BOTTOM)
|
||||||
m_nHoverOption = HOVEROPTION_LIST;
|
&& m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(CONTSETUP_BACK_BOTTOM - CONTSETUP_BACK_HEIGHT)) || m_nCurrExLayer == HOVEROPTION_BACK) {
|
||||||
|
m_nHoverOption = HOVEROPTION_BACK;
|
||||||
|
|
||||||
} else {
|
} else if (m_nMousePosX > MENU_X_LEFT_ALIGNED(CONTSETUP_LIST_LEFT + 2.0f) && m_nMousePosX < MENU_X_LEFT_ALIGNED(CONTSETUP_COLUMN_3_X + CONTSETUP_BOUND_COLUMN_WIDTH)
|
||||||
m_nHoverOption = HOVEROPTION_NOT_HOVERING;
|
&& m_nMousePosY > MENU_Y(CONTSETUP_LIST_TOP + CONTSETUP_LIST_HEADER_HEIGHT) && m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(CONTSETUP_LIST_BOTTOM + 5.0f)) {
|
||||||
|
m_nHoverOption = HOVEROPTION_LIST;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
m_nHoverOption = HOVEROPTION_NOT_HOVERING;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Back button and it's shadow
|
// Back button and it's shadow
|
||||||
|
@ -2257,6 +2244,7 @@ CMenuManager::DrawBackground(bool transitionCall)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --MIAMI: Done
|
||||||
void
|
void
|
||||||
CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
|
CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
|
||||||
{
|
{
|
||||||
|
@ -2270,12 +2258,7 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
|
||||||
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
|
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
|
||||||
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
|
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
|
||||||
|
|
||||||
PREPARE_MENU_HEADER
|
|
||||||
|
|
||||||
CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get("FET_PS"));
|
|
||||||
|
|
||||||
// lstrcpy's changed with strcpy
|
// lstrcpy's changed with strcpy
|
||||||
|
|
||||||
if (!m_bSkinsEnumerated) {
|
if (!m_bSkinsEnumerated) {
|
||||||
OutputDebugString("Enumerating skin filenames from skins...");
|
OutputDebugString("Enumerating skin filenames from skins...");
|
||||||
m_pSkinListHead.nextSkin = nil;
|
m_pSkinListHead.nextSkin = nil;
|
||||||
|
@ -2358,15 +2341,23 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
|
||||||
m_bSkinsEnumerated = true;
|
m_bSkinsEnumerated = true;
|
||||||
}
|
}
|
||||||
CSprite2d::DrawRect(CRect(MENU_X_LEFT_ALIGNED(PLAYERSETUP_LIST_LEFT), MENU_Y(PLAYERSETUP_LIST_TOP),
|
CSprite2d::DrawRect(CRect(MENU_X_LEFT_ALIGNED(PLAYERSETUP_LIST_LEFT), MENU_Y(PLAYERSETUP_LIST_TOP),
|
||||||
MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT), SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM)), CRGBA(200, 200, 50, FadeIn(50)));
|
MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT), SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM)), CRGBA(49, 101, 148, FadeIn(130)));
|
||||||
|
|
||||||
|
PREPARE_MENU_HEADER
|
||||||
|
CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255)));
|
||||||
|
CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f), TheText.Get("FET_PS"));
|
||||||
|
|
||||||
|
CFont::SetColor(CRGBA(HEADER_COLOR.r, HEADER_COLOR.g, HEADER_COLOR.b, FadeIn(255)));
|
||||||
|
CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y), TheText.Get("FET_PS"));
|
||||||
|
|
||||||
// Header (Skin - Date)
|
// Header (Skin - Date)
|
||||||
if (m_nCurrExLayer == HOVEROPTION_LIST) {
|
if (m_nCurrExLayer == HOVEROPTION_LIST) {
|
||||||
CFont::SetColor(CRGBA(255, 217, 106, FadeIn(255)));
|
CFont::SetColor(CRGBA(SELECTEDMENUOPTION_COLOR.r, SELECTEDMENUOPTION_COLOR.g, SELECTEDMENUOPTION_COLOR.b, FadeIn(255)));
|
||||||
} else {
|
} else {
|
||||||
CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
|
CFont::SetColor(CRGBA(MENUOPTION_COLOR.r, MENUOPTION_COLOR.g, MENUOPTION_COLOR.b, FadeIn(255)));
|
||||||
}
|
}
|
||||||
CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
|
CFont::SetDropShadowPosition(2);
|
||||||
|
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
|
||||||
CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT));
|
CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT));
|
||||||
CFont::SetRightJustifyOn();
|
CFont::SetRightJustifyOn();
|
||||||
CFont::PrintString(MENU_X_RIGHT_ALIGNED(PLAYERSETUP_DATE_COLUMN_RIGHT), MENU_Y(PLAYERSETUP_LIST_TOP), TheText.Get("FES_DAT"));
|
CFont::PrintString(MENU_X_RIGHT_ALIGNED(PLAYERSETUP_DATE_COLUMN_RIGHT), MENU_Y(PLAYERSETUP_LIST_TOP), TheText.Get("FES_DAT"));
|
||||||
|
@ -2381,6 +2372,7 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
|
||||||
}
|
}
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
CFont::PrintString(MENU_X_LEFT_ALIGNED(PLAYERSETUP_SKIN_COLUMN_LEFT), MENU_Y(PLAYERSETUP_LIST_TOP), TheText.Get("FES_SKN"));
|
CFont::PrintString(MENU_X_LEFT_ALIGNED(PLAYERSETUP_SKIN_COLUMN_LEFT), MENU_Y(PLAYERSETUP_LIST_TOP), TheText.Get("FES_SKN"));
|
||||||
|
CFont::SetDropShadowPosition(0);
|
||||||
|
|
||||||
// Skin list
|
// Skin list
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
|
@ -2407,13 +2399,11 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
|
||||||
if (rowIdx == m_nSelectedListRow) {
|
if (rowIdx == m_nSelectedListRow) {
|
||||||
m_nHoverOption = HOVEROPTION_NOT_HOVERING;
|
m_nHoverOption = HOVEROPTION_NOT_HOVERING;
|
||||||
if (m_nSkinsTotal > 0) {
|
if (m_nSkinsTotal > 0) {
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
|
|
||||||
strcpy(m_PrefsSkinFile, m_aSkinName);
|
strcpy(m_PrefsSkinFile, m_aSkinName);
|
||||||
CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile);
|
CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile);
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
|
||||||
m_nCurrExLayer = HOVEROPTION_LIST;
|
m_nCurrExLayer = HOVEROPTION_LIST;
|
||||||
m_nSelectedListRow = rowIdx;
|
m_nSelectedListRow = rowIdx;
|
||||||
m_nHoverOption = HOVEROPTION_NOT_HOVERING;
|
m_nHoverOption = HOVEROPTION_NOT_HOVERING;
|
||||||
|
@ -2486,7 +2476,7 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
|
||||||
}
|
}
|
||||||
CSprite2d::DrawRect(CRect(MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - 4), scrollbarTop,
|
CSprite2d::DrawRect(CRect(MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - 4), scrollbarTop,
|
||||||
MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - PLAYERSETUP_SCROLLBAR_WIDTH), scrollbarBottom),
|
MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - PLAYERSETUP_SCROLLBAR_WIDTH), scrollbarBottom),
|
||||||
CRGBA(235, 170, 50, FadeIn(255)));
|
CRGBA(255, 150, 225, FadeIn(255)));
|
||||||
|
|
||||||
// FIX: Scroll button dimensions are buggy, because:
|
// FIX: Scroll button dimensions are buggy, because:
|
||||||
// 1 - stretches the original image
|
// 1 - stretches the original image
|
||||||
|
@ -2556,35 +2546,29 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
|
||||||
CFont::SetScale(MENU_X(1.9f), MENU_Y(1.9f));
|
CFont::SetScale(MENU_X(1.9f), MENU_Y(1.9f));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
CFont::SetColor(CRGBA(255, 217, 106, FadeIn(120)));
|
CFont::SetColor(CRGBA(MENUOPTION_COLOR.r, MENUOPTION_COLOR.g, MENUOPTION_COLOR.b, FadeIn(120)));
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
CFont::PrintString(MENU_X_LEFT_ALIGNED(20.0f), MENU_Y(220.0f), TheText.Get("FET_APL"));
|
CFont::PrintString(MENU_X_LEFT_ALIGNED(24.0f), MENU_Y(220.0f), TheText.Get("FET_APP"));
|
||||||
}
|
}
|
||||||
CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
|
||||||
|
|
||||||
CFont::SetScale(MENU_X(SMALLTEXT_X_SCALE), MENU_Y(SMALLTEXT_Y_SCALE));
|
CFont::SetScale(MENU_X(BIGTEXT_X_SCALE), MENU_Y(BIGTEXT_Y_SCALE));
|
||||||
|
|
||||||
if ((m_nMousePosX > MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - 1) - CFont::GetStringWidth(TheText.Get("FEDS_TB"), true)
|
if ((m_nMousePosX > MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - 1) - CFont::GetStringWidth(TheText.Get("FEDS_TB"), true)
|
||||||
&& m_nMousePosX < MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - 1)
|
&& m_nMousePosX < MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - 1)
|
||||||
&& m_nMousePosY > SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 3)
|
&& m_nMousePosY > SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 3)
|
||||||
&& m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 26))
|
&& m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 26))
|
||||||
|| m_nCurrExLayer == HOVEROPTION_BACK) {
|
|| m_nCurrExLayer == HOVEROPTION_BACK) {
|
||||||
if (m_nHoverOption != HOVEROPTION_BACK)
|
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
|
||||||
|
|
||||||
m_nHoverOption = HOVEROPTION_BACK;
|
m_nHoverOption = HOVEROPTION_BACK;
|
||||||
|
|
||||||
} else if ((strcmp(m_aSkinName, m_PrefsSkinFile) != 0
|
} else if ((strcmp(m_aSkinName, m_PrefsSkinFile) != 0
|
||||||
&& m_nMousePosX > MENU_X_LEFT_ALIGNED(PLAYERSETUP_LIST_LEFT)
|
&& m_nMousePosX > MENU_X_LEFT_ALIGNED(PLAYERSETUP_LIST_LEFT)
|
||||||
&& m_nMousePosX < MENU_X_LEFT_ALIGNED(PLAYERSETUP_LIST_LEFT) + CFont::GetStringWidth(TheText.Get("FES_SET"), true)
|
&& m_nMousePosX < MENU_X_LEFT_ALIGNED(PLAYERSETUP_LIST_LEFT) + CFont::GetStringWidth(TheText.Get("FES_SET"), true)
|
||||||
&& m_nMousePosY > SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 3)
|
&& m_nMousePosY > SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 3)
|
||||||
&& m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 26))
|
&& m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 26))
|
||||||
|| m_nCurrExLayer == HOVEROPTION_USESKIN) {
|
|| m_nCurrExLayer == HOVEROPTION_USESKIN) {
|
||||||
if (m_nHoverOption != HOVEROPTION_USESKIN)
|
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
|
||||||
|
|
||||||
m_nHoverOption = HOVEROPTION_USESKIN;
|
m_nHoverOption = HOVEROPTION_USESKIN;
|
||||||
|
|
||||||
} else if (m_nMousePosX > MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - 2)
|
} else if (m_nMousePosX > MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - 2)
|
||||||
&& m_nMousePosX < MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - PLAYERSETUP_SCROLLBAR_WIDTH - 2)
|
&& m_nMousePosX < MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - PLAYERSETUP_SCROLLBAR_WIDTH - 2)
|
||||||
&& m_nMousePosY > MENU_Y(PLAYERSETUP_LIST_TOP)
|
&& m_nMousePosY > MENU_Y(PLAYERSETUP_LIST_TOP)
|
||||||
|
@ -2639,36 +2623,28 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
|
CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
|
||||||
CFont::SetScale(MENU_X(SMALLTEXT_X_SCALE), MENU_Y(SMALLTEXT_Y_SCALE));
|
CFont::SetScale(MENU_X(BIGTEXT_X_SCALE), MENU_Y(BIGTEXT_Y_SCALE));
|
||||||
CFont::SetRightJustifyOn();
|
CFont::SetRightJustifyOn();
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, FadeIn(90)));
|
CFont::SetColor(CRGBA(MENUOPTION_COLOR.r, MENUOPTION_COLOR.g, MENUOPTION_COLOR.b, FadeIn(255)));
|
||||||
|
CFont::SetDropShadowPosition(2);
|
||||||
|
CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(255)));
|
||||||
|
|
||||||
// Back button
|
// Back button
|
||||||
for (int i = 0; i < 2; i++) {
|
CFont::PrintString(MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - 3), SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 5), TheText.Get("FEDS_TB"));
|
||||||
CFont::PrintString(MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT - 3 - i), SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 5 - i), TheText.Get("FEDS_TB"));
|
|
||||||
if (m_nHoverOption == HOVEROPTION_BACK) {
|
|
||||||
CFont::SetColor(CRGBA(255, 217, 106, FadeIn(255)));
|
|
||||||
} else {
|
|
||||||
CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CFont::SetRightJustifyOff();
|
CFont::SetRightJustifyOff();
|
||||||
CFont::SetColor(CRGBA(0, 0, 0, FadeIn(90)));
|
|
||||||
|
if (!strcmp(m_aSkinName, m_PrefsSkinFile)) {
|
||||||
|
CFont::SetColor(CRGBA(DARKMENUOPTION_COLOR.r, DARKMENUOPTION_COLOR.g, DARKMENUOPTION_COLOR.b, FadeIn(255)));
|
||||||
|
} else {
|
||||||
|
CFont::SetColor(CRGBA(MENUOPTION_COLOR.r, MENUOPTION_COLOR.g, MENUOPTION_COLOR.b, FadeIn(255)));
|
||||||
|
}
|
||||||
|
|
||||||
// Use skin button
|
// Use skin button
|
||||||
for (int i = 0; i < 2; i++) {
|
CFont::PrintString(MENU_X_LEFT_ALIGNED(PLAYERSETUP_LIST_LEFT), SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 5), TheText.Get("FES_SET"));
|
||||||
CFont::PrintString(MENU_X_LEFT_ALIGNED(i + PLAYERSETUP_LIST_LEFT), SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 5 - i), TheText.Get("FES_SET"));
|
CFont::SetDropShadowPosition(0);
|
||||||
if (!strcmp(m_aSkinName, m_PrefsSkinFile)) {
|
|
||||||
CFont::SetColor(CRGBA(155, 117, 6, FadeIn(255)));
|
|
||||||
} else if (m_nHoverOption == HOVEROPTION_USESKIN) {
|
|
||||||
CFont::SetColor(CRGBA(255, 217, 106, FadeIn(255)));
|
|
||||||
} else {
|
|
||||||
CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --MIAMI: Done
|
||||||
int
|
int
|
||||||
CMenuManager::FadeIn(int alpha)
|
CMenuManager::FadeIn(int alpha)
|
||||||
{
|
{
|
||||||
|
@ -2693,6 +2669,7 @@ CMenuManager::FilterOutColorMarkersFromString(wchar *str)
|
||||||
str[newIdx] = '\0';
|
str[newIdx] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --MIAMI: Done
|
||||||
int
|
int
|
||||||
CMenuManager::GetStartOptionsCntrlConfigScreens()
|
CMenuManager::GetStartOptionsCntrlConfigScreens()
|
||||||
{
|
{
|
||||||
|
@ -3292,7 +3269,7 @@ CMenuManager::ProcessList(bool &optionSelected, bool &goBack)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CPad::GetPad(0)->GetTabJustDown()) {
|
if (CPad::GetPad(0)->GetTabJustDown()) {
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_HIGHLIGHT_OPTION, 0);
|
||||||
m_bShowMouse = false;
|
m_bShowMouse = false;
|
||||||
switch (m_nCurrExLayer) {
|
switch (m_nCurrExLayer) {
|
||||||
case HOVEROPTION_BACK:
|
case HOVEROPTION_BACK:
|
||||||
|
@ -3328,7 +3305,7 @@ CMenuManager::ProcessList(bool &optionSelected, bool &goBack)
|
||||||
if (!m_bPressedUpOnList) {
|
if (!m_bPressedUpOnList) {
|
||||||
m_bPressedUpOnList = true;
|
m_bPressedUpOnList = true;
|
||||||
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_HIGHLIGHT_OPTION, 0);
|
||||||
ScrollUpListByOne();
|
ScrollUpListByOne();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -3350,7 +3327,7 @@ CMenuManager::ProcessList(bool &optionSelected, bool &goBack)
|
||||||
if (!m_bPressedDownOnList) {
|
if (!m_bPressedDownOnList) {
|
||||||
m_bPressedDownOnList = true;
|
m_bPressedDownOnList = true;
|
||||||
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_HIGHLIGHT_OPTION, 0);
|
||||||
ScrollDownListByOne();
|
ScrollDownListByOne();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -3366,7 +3343,7 @@ CMenuManager::ProcessList(bool &optionSelected, bool &goBack)
|
||||||
m_bPressedPgUpOnList = true;
|
m_bPressedPgUpOnList = true;
|
||||||
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
m_bShowMouse = false;
|
m_bShowMouse = false;
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_HIGHLIGHT_OPTION, 0);
|
||||||
PageUpList(false);
|
PageUpList(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3378,14 +3355,14 @@ CMenuManager::ProcessList(bool &optionSelected, bool &goBack)
|
||||||
m_bPressedPgDnOnList = true;
|
m_bPressedPgDnOnList = true;
|
||||||
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
m_bShowMouse = false;
|
m_bShowMouse = false;
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_HIGHLIGHT_OPTION, 0);
|
||||||
PageDownList(false);
|
PageDownList(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CPad::GetPad(0)->GetHome()) {
|
if (CPad::GetPad(0)->GetHome()) {
|
||||||
m_nCurrExLayer = HOVEROPTION_LIST;
|
m_nCurrExLayer = HOVEROPTION_LIST;
|
||||||
m_bShowMouse = false;
|
m_bShowMouse = false;
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_HIGHLIGHT_OPTION, 0);
|
||||||
if (m_nTotalListRow >= MAX_VISIBLE_LIST_ROW) {
|
if (m_nTotalListRow >= MAX_VISIBLE_LIST_ROW) {
|
||||||
m_nFirstVisibleRowOnList = 0;
|
m_nFirstVisibleRowOnList = 0;
|
||||||
}
|
}
|
||||||
|
@ -3395,7 +3372,7 @@ CMenuManager::ProcessList(bool &optionSelected, bool &goBack)
|
||||||
if (CPad::GetPad(0)->GetEnd()) {
|
if (CPad::GetPad(0)->GetEnd()) {
|
||||||
m_nCurrExLayer = HOVEROPTION_LIST;
|
m_nCurrExLayer = HOVEROPTION_LIST;
|
||||||
m_bShowMouse = false;
|
m_bShowMouse = false;
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_HIGHLIGHT_OPTION, 0);
|
||||||
if (m_nTotalListRow >= MAX_VISIBLE_LIST_ROW) {
|
if (m_nTotalListRow >= MAX_VISIBLE_LIST_ROW) {
|
||||||
m_nFirstVisibleRowOnList = m_nTotalListRow - MAX_VISIBLE_LIST_ROW;
|
m_nFirstVisibleRowOnList = m_nTotalListRow - MAX_VISIBLE_LIST_ROW;
|
||||||
}
|
}
|
||||||
|
@ -3422,7 +3399,6 @@ CMenuManager::ProcessList(bool &optionSelected, bool &goBack)
|
||||||
break;
|
break;
|
||||||
case HOVEROPTION_USESKIN:
|
case HOVEROPTION_USESKIN:
|
||||||
if (m_nSkinsTotal > 0) {
|
if (m_nSkinsTotal > 0) {
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
|
|
||||||
m_pSelectedSkin = m_pSkinListHead.nextSkin;
|
m_pSelectedSkin = m_pSkinListHead.nextSkin;
|
||||||
strcpy(m_PrefsSkinFile, m_aSkinName);
|
strcpy(m_PrefsSkinFile, m_aSkinName);
|
||||||
CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile);
|
CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile);
|
||||||
|
@ -3535,7 +3511,7 @@ CMenuManager::UserInput(void)
|
||||||
++m_nOptionMouseHovering;
|
++m_nOptionMouseHovering;
|
||||||
}
|
}
|
||||||
m_nOptionHighlightTransitionBlend = 0;
|
m_nOptionHighlightTransitionBlend = 0;
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_HIGHLIGHT_OPTION, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3623,11 +3599,11 @@ CMenuManager::UserInput(void)
|
||||||
|| CPad::GetPad(0)->GetMouseWheelUpJustDown() || CPad::GetPad(0)->GetMouseWheelDownJustDown()) {
|
|| CPad::GetPad(0)->GetMouseWheelUpJustDown() || CPad::GetPad(0)->GetMouseWheelDownJustDown()) {
|
||||||
int option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action;
|
int option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action;
|
||||||
if (option == MENUACTION_BRIGHTNESS)
|
if (option == MENUACTION_BRIGHTNESS)
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_ENTER_OR_ADJUST, 0);
|
||||||
else if (option == MENUACTION_SFXVOLUME)
|
else if (option == MENUACTION_SFXVOLUME)
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_AUDIO_TEST, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_AUDIO_TEST, 0);
|
||||||
else if (option == MENUACTION_DRAWDIST || option == MENUACTION_MOUSESTEER)
|
else if (option == MENUACTION_DRAWDIST || option == MENUACTION_MOUSESTEER)
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_ENTER_OR_ADJUST, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (CPad::GetPad(0)->GetBackJustDown() || CPad::GetPad(0)->GetEscapeJustDown()) {
|
if (CPad::GetPad(0)->GetBackJustDown() || CPad::GetPad(0)->GetEscapeJustDown()) {
|
||||||
|
@ -3702,7 +3678,7 @@ CMenuManager::UserInput(void)
|
||||||
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_DRAWDIST
|
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_DRAWDIST
|
||||||
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_MOUSESENS
|
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_MOUSESENS
|
||||||
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_MP3VOLUMEBOOST) {
|
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_MP3VOLUMEBOOST) {
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_ENTER_OR_ADJUST, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ProcessUserInput(goDown, goUp, optionSelected, goBack, changeValueBy);
|
ProcessUserInput(goDown, goUp, optionSelected, goBack, changeValueBy);
|
||||||
|
@ -3749,28 +3725,20 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
|
||||||
TypeOfControl = KEYBOARD;
|
TypeOfControl = KEYBOARD;
|
||||||
|
|
||||||
if (!m_bKeyIsOK) {
|
if (!m_bKeyIsOK) {
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
|
|
||||||
pControlEdit = nil;
|
pControlEdit = nil;
|
||||||
m_bWaitingForNewKeyBind = false;
|
m_bWaitingForNewKeyBind = false;
|
||||||
m_KeyPressedCode = -1;
|
m_KeyPressedCode = -1;
|
||||||
m_bStartWaitingForKeyBind = false;
|
m_bStartWaitingForKeyBind = false;
|
||||||
}
|
} else if (!m_bKeyChangeNotProcessed) {
|
||||||
else if (!m_bKeyChangeNotProcessed) {
|
|
||||||
if (*pControlEdit != rsNULL || MouseButtonJustClicked || JoyButtonJustClicked)
|
if (*pControlEdit != rsNULL || MouseButtonJustClicked || JoyButtonJustClicked)
|
||||||
CheckCodesForControls(TypeOfControl);
|
CheckCodesForControls(TypeOfControl);
|
||||||
|
|
||||||
field_159 = true;
|
field_159 = true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
|
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
ControlsManager.ClearSettingsAssociatedWithAction((e_ControllerAction)m_CurrCntrlAction, (eControllerType)i);
|
ControlsManager.ClearSettingsAssociatedWithAction((e_ControllerAction)m_CurrCntrlAction, (eControllerType)i);
|
||||||
m_bKeyIsOK = false;
|
m_bKeyIsOK = false;
|
||||||
m_bKeyChangeNotProcessed = false;
|
m_bKeyChangeNotProcessed = false;
|
||||||
pControlEdit = nil;
|
|
||||||
m_bWaitingForNewKeyBind = false;
|
|
||||||
m_KeyPressedCode = -1;
|
|
||||||
m_bStartWaitingForKeyBind = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3799,7 +3767,7 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
|
||||||
int oldOption = m_nCurrOption;
|
int oldOption = m_nCurrOption;
|
||||||
if (goDown) {
|
if (goDown) {
|
||||||
if (m_nCurrScreen != MENUPAGE_MAP)
|
if (m_nCurrScreen != MENUPAGE_MAP)
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_HIGHLIGHT_OPTION, 0);
|
||||||
|
|
||||||
m_nCurrOption++;
|
m_nCurrOption++;
|
||||||
if (m_nCurrOption == NUM_MENUROWS || (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_NOTHING)) {
|
if (m_nCurrOption == NUM_MENUROWS || (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_NOTHING)) {
|
||||||
|
@ -3810,7 +3778,7 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
|
||||||
}
|
}
|
||||||
if (goUp) {
|
if (goUp) {
|
||||||
if (m_nCurrScreen != MENUPAGE_MAP)
|
if (m_nCurrScreen != MENUPAGE_MAP)
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_HIGHLIGHT_OPTION, 0);
|
||||||
|
|
||||||
if (m_nCurrOption == (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL)) {
|
if (m_nCurrOption == (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL)) {
|
||||||
while (m_nCurrOption != NUM_MENUROWS - 1
|
while (m_nCurrOption != NUM_MENUROWS - 1
|
||||||
|
@ -4116,21 +4084,21 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
|
||||||
int saveSlot = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot;
|
int saveSlot = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot;
|
||||||
|
|
||||||
if (saveSlot >= 2 && saveSlot <= 9 && Slots[m_nCurrOption] != SLOT_OK)
|
if (saveSlot >= 2 && saveSlot <= 9 && Slots[m_nCurrOption] != SLOT_OK)
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_BACK, 0);
|
|
||||||
else
|
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
|
||||||
|
else
|
||||||
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_ENTER_OR_ADJUST, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (goBack) {
|
if (goBack) {
|
||||||
if (m_NoEmptyBinding) {
|
if (m_NoEmptyBinding) {
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_BACK, 0);
|
||||||
SwitchToNewScreen(-2);
|
SwitchToNewScreen(-2);
|
||||||
if ((m_nCurrScreen == MENUPAGE_SKIN_SELECT) || (m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS)) {
|
if ((m_nCurrScreen == MENUPAGE_SKIN_SELECT) || (m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS)) {
|
||||||
m_nTotalListRow = 0;
|
m_nTotalListRow = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_BACK, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
|
||||||
m_ShowEmptyBindingError = true;
|
m_ShowEmptyBindingError = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4158,14 +4126,12 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
|
||||||
if (m_PrefsUseWideScreen < 0)
|
if (m_PrefsUseWideScreen < 0)
|
||||||
m_PrefsUseWideScreen = 2;
|
m_PrefsUseWideScreen = 2;
|
||||||
}
|
}
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
|
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case MENUACTION_SCREENRES:
|
case MENUACTION_SCREENRES:
|
||||||
if (m_bGameNotLoaded) {
|
if (m_bGameNotLoaded) {
|
||||||
RwChar** videoMods = _psGetVideoModeList();
|
RwChar** videoMods = _psGetVideoModeList();
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
|
||||||
if (changeAmount > 0) {
|
if (changeAmount > 0) {
|
||||||
do {
|
do {
|
||||||
++m_nDisplayVideoMode;
|
++m_nDisplayVideoMode;
|
||||||
|
@ -4185,7 +4151,6 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
|
||||||
break;
|
break;
|
||||||
#ifdef IMPROVED_VIDEOMODE
|
#ifdef IMPROVED_VIDEOMODE
|
||||||
case MENUACTION_SCREENFORMAT:
|
case MENUACTION_SCREENFORMAT:
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
|
||||||
m_nSelectedScreenMode = !m_nSelectedScreenMode;
|
m_nSelectedScreenMode = !m_nSelectedScreenMode;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@ -4740,7 +4705,7 @@ CMenuManager::PrintMap(void)
|
||||||
CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(40.0f));
|
CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(40.0f));
|
||||||
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(84.0f));
|
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(84.0f));
|
||||||
CFont::SetBackGroundOnlyTextOff();
|
CFont::SetBackGroundOnlyTextOff();
|
||||||
CFont::SetColor(CRGBA(255, 150, 225, FadeIn(255)));
|
CFont::SetColor(CRGBA(LABEL_COLOR.r, LABEL_COLOR.g, LABEL_COLOR.b, FadeIn(255)));
|
||||||
CFont::SetDropShadowPosition(2);
|
CFont::SetDropShadowPosition(2);
|
||||||
CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(255)));
|
CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(255)));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
|
@ -4812,7 +4777,7 @@ CMenuManager::PrintMap(void)
|
||||||
float x = ((mapPoint.x - diffX) / (m_fMapSize * 2)) * (WORLD_SIZE_X / MENU_MAP_WIDTH_SCALE) - (WORLD_SIZE_X / 2 + MENU_MAP_LEFT_OFFSET * MENU_MAP_LENGTH_UNIT);
|
float x = ((mapPoint.x - diffX) / (m_fMapSize * 2)) * (WORLD_SIZE_X / MENU_MAP_WIDTH_SCALE) - (WORLD_SIZE_X / 2 + MENU_MAP_LEFT_OFFSET * MENU_MAP_LENGTH_UNIT);
|
||||||
float y = (WORLD_SIZE_Y / 2 - MENU_MAP_TOP_OFFSET * MENU_MAP_LENGTH_UNIT) - ((mapPoint.y - diffY) / (m_fMapSize * 2)) * (WORLD_SIZE_Y / MENU_MAP_HEIGHT_SCALE);
|
float y = (WORLD_SIZE_Y / 2 - MENU_MAP_TOP_OFFSET * MENU_MAP_LENGTH_UNIT) - ((mapPoint.y - diffY) / (m_fMapSize * 2)) * (WORLD_SIZE_Y / MENU_MAP_HEIGHT_SCALE);
|
||||||
CRadar::ToggleTargetMarker(x, y);
|
CRadar::ToggleTargetMarker(x, y);
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_BACK, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5037,10 +5002,10 @@ CMenuManager::ChangeRadioStation(uint8 increaseBy)
|
||||||
#if 0
|
#if 0
|
||||||
m_ScrollRadioBy = increaseBy;
|
m_ScrollRadioBy = increaseBy;
|
||||||
if (m_ScrollRadioBy == 1) {
|
if (m_ScrollRadioBy == 1) {
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_ENTER_OR_ADJUST, 0);
|
||||||
field_F0 = 238.0f;
|
field_F0 = 238.0f;
|
||||||
} else {
|
} else {
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_ENTER_OR_ADJUST, 0);
|
||||||
field_F0 = 118.0f;
|
field_F0 = 118.0f;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -5058,7 +5023,7 @@ CMenuManager::ChangeRadioStation(uint8 increaseBy)
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
DMAudio.StopFrontEndTrack();
|
DMAudio.StopFrontEndTrack();
|
||||||
DMAudio.PlayFrontEndSound(SOUND_194, 0);
|
DMAudio.PlayFrontEndSound(SOUND_RADIO_CHANGE, 0);
|
||||||
#else
|
#else
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
DMAudio.SetRadioInCar(m_PrefsRadioStation);
|
DMAudio.SetRadioInCar(m_PrefsRadioStation);
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
#define SMALLESTTEXT_X_SCALE 0.3f
|
#define SMALLESTTEXT_X_SCALE 0.3f
|
||||||
#define SMALLESTTEXT_Y_SCALE 0.7f
|
#define SMALLESTTEXT_Y_SCALE 0.7f
|
||||||
|
|
||||||
#define PLAYERSETUP_LIST_TOP 28.0f
|
#define PLAYERSETUP_LIST_TOP 58.0f
|
||||||
#define PLAYERSETUP_LIST_BOTTOM 125.0f
|
#define PLAYERSETUP_LIST_BOTTOM 95.0f
|
||||||
#define PLAYERSETUP_LIST_LEFT 200.0f
|
#define PLAYERSETUP_LIST_LEFT 200.0f
|
||||||
#define PLAYERSETUP_LIST_RIGHT 36.0f
|
#define PLAYERSETUP_LIST_RIGHT 36.0f
|
||||||
#ifdef FIX_BUGS // See the scrollbar button drawing code
|
#ifdef FIX_BUGS // See the scrollbar button drawing code
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
#define PLAYERSETUP_ROW_TEXT_Y_SCALE 0.6f
|
#define PLAYERSETUP_ROW_TEXT_Y_SCALE 0.6f
|
||||||
#define PLAYERSETUP_SKIN_COLUMN_LEFT 220.0f
|
#define PLAYERSETUP_SKIN_COLUMN_LEFT 220.0f
|
||||||
#define PLAYERSETUP_DATE_COLUMN_RIGHT 56.0f
|
#define PLAYERSETUP_DATE_COLUMN_RIGHT 56.0f
|
||||||
#define PLAYERSETUP_LIST_BODY_TOP 47
|
#define PLAYERSETUP_LIST_BODY_TOP 77
|
||||||
#define PLAYERSETUP_ROW_HEIGHT 9
|
#define PLAYERSETUP_ROW_HEIGHT 9
|
||||||
|
|
||||||
#define STATS_ROW_HEIGHT 17.0f
|
#define STATS_ROW_HEIGHT 17.0f
|
||||||
|
|
|
@ -1009,28 +1009,20 @@ Idle(void *arg)
|
||||||
{
|
{
|
||||||
CTimer::Update();
|
CTimer::Update();
|
||||||
|
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbInit();
|
tbInit();
|
||||||
#endif
|
|
||||||
|
|
||||||
CSprite2d::InitPerFrame();
|
CSprite2d::InitPerFrame();
|
||||||
CFont::InitPerFrame();
|
CFont::InitPerFrame();
|
||||||
|
|
||||||
CPointLights::InitPerFrame();
|
CPointLights::InitPerFrame();
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbStartTimer(0, "CGame::Process");
|
tbStartTimer(0, "CGame::Process");
|
||||||
#endif
|
|
||||||
CGame::Process();
|
CGame::Process();
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbEndTimer("CGame::Process");
|
tbEndTimer("CGame::Process");
|
||||||
|
|
||||||
tbStartTimer(0, "DMAudio.Service");
|
tbStartTimer(0, "DMAudio.Service");
|
||||||
#endif
|
|
||||||
|
|
||||||
DMAudio.Service();
|
DMAudio.Service();
|
||||||
|
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbEndTimer("DMAudio.Service");
|
tbEndTimer("DMAudio.Service");
|
||||||
#endif
|
|
||||||
|
|
||||||
if(CGame::bDemoMode && CTimer::GetTimeInMilliseconds() > (3*60 + 30)*1000 && !CCutsceneMgr::IsCutsceneProcessing()){
|
if(CGame::bDemoMode && CTimer::GetTimeInMilliseconds() > (3*60 + 30)*1000 && !CCutsceneMgr::IsCutsceneProcessing()){
|
||||||
#ifdef PS2_MENU
|
#ifdef PS2_MENU
|
||||||
|
@ -1066,21 +1058,16 @@ Idle(void *arg)
|
||||||
pos.y = SCREEN_HEIGHT / 2.0f;
|
pos.y = SCREEN_HEIGHT / 2.0f;
|
||||||
RsMouseSetPos(&pos);
|
RsMouseSetPos(&pos);
|
||||||
#endif
|
#endif
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbStartTimer(0, "CnstrRenderList");
|
tbStartTimer(0, "CnstrRenderList");
|
||||||
#endif
|
|
||||||
#ifdef PC_WATER
|
#ifdef PC_WATER
|
||||||
CWaterLevel::PreCalcWaterGeometry();
|
CWaterLevel::PreCalcWaterGeometry();
|
||||||
#endif
|
#endif
|
||||||
CRenderer::ConstructRenderList();
|
CRenderer::ConstructRenderList();
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbEndTimer("CnstrRenderList");
|
tbEndTimer("CnstrRenderList");
|
||||||
|
|
||||||
tbStartTimer(0, "PreRender");
|
tbStartTimer(0, "PreRender");
|
||||||
#endif
|
|
||||||
CRenderer::PreRender();
|
CRenderer::PreRender();
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbEndTimer("PreRender");
|
tbEndTimer("PreRender");
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE); // TODO: temp? this fixes OpenGL render but there should be a better place for this
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE); // TODO: temp? this fixes OpenGL render but there should be a better place for this
|
||||||
|
@ -1106,13 +1093,9 @@ Idle(void *arg)
|
||||||
RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart());
|
RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbStartTimer(0, "RenderScene");
|
tbStartTimer(0, "RenderScene");
|
||||||
#endif
|
|
||||||
RenderScene();
|
RenderScene();
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbEndTimer("RenderScene");
|
tbEndTimer("RenderScene");
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef EXTENDED_PIPELINES
|
#ifdef EXTENDED_PIPELINES
|
||||||
CustomPipes::EnvMapRender();
|
CustomPipes::EnvMapRender();
|
||||||
|
@ -1121,21 +1104,16 @@ Idle(void *arg)
|
||||||
RenderDebugShit();
|
RenderDebugShit();
|
||||||
RenderEffects();
|
RenderEffects();
|
||||||
|
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbStartTimer(0, "RenderMotionBlur");
|
tbStartTimer(0, "RenderMotionBlur");
|
||||||
#endif
|
|
||||||
if((TheCamera.m_BlurType == MOTION_BLUR_NONE || TheCamera.m_BlurType == MOTION_BLUR_LIGHT_SCENE) &&
|
if((TheCamera.m_BlurType == MOTION_BLUR_NONE || TheCamera.m_BlurType == MOTION_BLUR_LIGHT_SCENE) &&
|
||||||
TheCamera.m_ScreenReductionPercentage > 0.0f)
|
TheCamera.m_ScreenReductionPercentage > 0.0f)
|
||||||
TheCamera.SetMotionBlurAlpha(150);
|
TheCamera.SetMotionBlurAlpha(150);
|
||||||
TheCamera.RenderMotionBlur();
|
TheCamera.RenderMotionBlur();
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbEndTimer("RenderMotionBlur");
|
tbEndTimer("RenderMotionBlur");
|
||||||
|
|
||||||
tbStartTimer(0, "Render2dStuff");
|
tbStartTimer(0, "Render2dStuff");
|
||||||
#endif
|
|
||||||
Render2dStuff();
|
Render2dStuff();
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbEndTimer("Render2dStuff");
|
tbEndTimer("Render2dStuff");
|
||||||
#endif
|
|
||||||
}else{
|
}else{
|
||||||
CDraw::CalculateAspectRatio();
|
CDraw::CalculateAspectRatio();
|
||||||
#ifdef ASPECT_RATIO_SCALE
|
#ifdef ASPECT_RATIO_SCALE
|
||||||
|
@ -1149,35 +1127,27 @@ Idle(void *arg)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbStartTimer(0, "RenderMenus");
|
tbStartTimer(0, "RenderMenus");
|
||||||
#endif
|
|
||||||
RenderMenus();
|
RenderMenus();
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbEndTimer("RenderMenus");
|
tbEndTimer("RenderMenus");
|
||||||
tbStartTimer(0, "DoFade");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PS2_MENU
|
#ifdef PS2_MENU
|
||||||
if ( TheMemoryCard.m_bWantToLoad )
|
if ( TheMemoryCard.m_bWantToLoad )
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
tbStartTimer(0, "DoFade");
|
||||||
DoFade();
|
DoFade();
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbEndTimer("DoFade");
|
tbEndTimer("DoFade");
|
||||||
|
|
||||||
tbStartTimer(0, "Render2dStuff-Fade");
|
tbStartTimer(0, "Render2dStuff-Fade");
|
||||||
#endif
|
|
||||||
Render2dStuffAfterFade();
|
Render2dStuffAfterFade();
|
||||||
#ifdef TIMEBARS
|
|
||||||
tbEndTimer("Render2dStuff-Fade");
|
tbEndTimer("Render2dStuff-Fade");
|
||||||
#endif
|
|
||||||
// CCredits::Render(); // They added it to function above and also forgot it here
|
// CCredits::Render(); // They added it to function above and also forgot it here
|
||||||
|
|
||||||
|
|
||||||
#ifdef TIMEBARS
|
|
||||||
if (gbShowTimebars)
|
if (gbShowTimebars)
|
||||||
tbDisplay();
|
tbDisplay();
|
||||||
#endif
|
|
||||||
|
|
||||||
DoRWStuffEndOfFrame();
|
DoRWStuffEndOfFrame();
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ extern bool gbPrintShite;
|
||||||
extern bool gbModelViewer;
|
extern bool gbModelViewer;
|
||||||
#ifdef TIMEBARS
|
#ifdef TIMEBARS
|
||||||
extern bool gbShowTimebars;
|
extern bool gbShowTimebars;
|
||||||
|
#else
|
||||||
|
#define gbShowTimebars false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class CSprite2d;
|
class CSprite2d;
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef TIMEBARS
|
||||||
void tbInit();
|
void tbInit();
|
||||||
void tbStartTimer(int32, Const char*);
|
void tbStartTimer(int32, Const char*);
|
||||||
void tbEndTimer(Const char*);
|
void tbEndTimer(Const char*);
|
||||||
void tbDisplay();
|
void tbDisplay();
|
||||||
|
#else
|
||||||
|
#define tbInit()
|
||||||
|
#define tbStartTimer(a, b)
|
||||||
|
#define tbEndTimer(a)
|
||||||
|
#define tbDisplay()
|
||||||
|
#endif
|
||||||
|
|
|
@ -668,7 +668,7 @@ CGlass::WindowRespondsToCollision(CEntity *entity, float amount, CVector speed,
|
||||||
|
|
||||||
object->bGlassBroken = true;
|
object->bGlassBroken = true;
|
||||||
object->bIsVisible = false;
|
object->bIsVisible = false;
|
||||||
object->bUsesCollision = true;
|
object->bUsesCollision = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -868,11 +868,11 @@ CGlass::HasGlassBeenShatteredAtCoors(float x, float y, float z)
|
||||||
|
|
||||||
CWorld::AdvanceCurrentScanCode();
|
CWorld::AdvanceCurrentScanCode();
|
||||||
|
|
||||||
for ( int32 y = nStartY; y <= nEndY; y++ )
|
for ( int32 ys = nStartY; ys <= nEndY; ys++ )
|
||||||
{
|
{
|
||||||
for ( int32 x = nStartX; x <= nEndX; x++ )
|
for ( int32 xs = nStartX; xs <= nEndX; xs++ )
|
||||||
{
|
{
|
||||||
CSector *sector = CWorld::GetSector(x, y);
|
CSector *sector = CWorld::GetSector(xs, ys);
|
||||||
|
|
||||||
ASSERT(sector != nil);
|
ASSERT(sector != nil);
|
||||||
|
|
||||||
|
|
|
@ -468,14 +468,10 @@ void CHud::Draw()
|
||||||
Sprites[WeaponType].Draw(
|
Sprites[WeaponType].Draw(
|
||||||
CRect(SCREEN_SCALE_FROM_RIGHT(99.0f), SCREEN_SCALE_Y(27.0f), SCREEN_SCALE_FROM_RIGHT(35.0f), SCREEN_SCALE_Y(91.0f)),
|
CRect(SCREEN_SCALE_FROM_RIGHT(99.0f), SCREEN_SCALE_Y(27.0f), SCREEN_SCALE_FROM_RIGHT(35.0f), SCREEN_SCALE_Y(91.0f)),
|
||||||
CRGBA(255, 255, 255, alpha),
|
CRGBA(255, 255, 255, alpha),
|
||||||
0.015f,
|
0.015f, 0.015f,
|
||||||
0.015f,
|
1.0f, 0.0f,
|
||||||
1.0f,
|
0.015f, 1.0f,
|
||||||
0.0f,
|
1.0f, 1.0f);
|
||||||
0.015f,
|
|
||||||
1.0f,
|
|
||||||
1.0f,
|
|
||||||
1.0f);
|
|
||||||
} else {
|
} else {
|
||||||
CBaseModelInfo *weaponModel = CModelInfo::GetModelInfo(weaponInfo->m_nModelId);
|
CBaseModelInfo *weaponModel = CModelInfo::GetModelInfo(weaponInfo->m_nModelId);
|
||||||
RwTexDictionary *weaponTxd = CTxdStore::GetSlot(weaponModel->GetTxdSlot())->texDict;
|
RwTexDictionary *weaponTxd = CTxdStore::GetSlot(weaponModel->GetTxdSlot())->texDict;
|
||||||
|
@ -483,13 +479,26 @@ void CHud::Draw()
|
||||||
RwTexture *weaponIcon = RwTexDictionaryFindNamedTexture(weaponTxd, weaponModel->GetName());
|
RwTexture *weaponIcon = RwTexDictionaryFindNamedTexture(weaponTxd, weaponModel->GetName());
|
||||||
if (weaponIcon) {
|
if (weaponIcon) {
|
||||||
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
|
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
|
||||||
|
#ifndef FIX_BUGS
|
||||||
|
const float xSize = SCREEN_SCALE_X(64.0f / 2.0f);
|
||||||
|
const float ySize = SCREEN_SCALE_Y(64.0f / 2.0f);
|
||||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE);
|
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE);
|
||||||
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(weaponIcon));
|
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(weaponIcon));
|
||||||
const float xSize = SCREEN_SCALE_X(64.0f / 2.0f);
|
|
||||||
const float ySize = SCREEN_SCALE_X(64.0f / 2.0f);
|
|
||||||
CSprite::RenderOneXLUSprite(SCREEN_SCALE_FROM_RIGHT(99.0f) + xSize, SCREEN_SCALE_Y(25.0f) + ySize, 1.0f, xSize, ySize,
|
CSprite::RenderOneXLUSprite(SCREEN_SCALE_FROM_RIGHT(99.0f) + xSize, SCREEN_SCALE_Y(25.0f) + ySize, 1.0f, xSize, ySize,
|
||||||
255, 255, 255, 255, 1.0f, 255);
|
255, 255, 255, 255, 1.0f, 255);
|
||||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
||||||
|
#else
|
||||||
|
static CSprite2d sprite;
|
||||||
|
sprite.m_pTexture = weaponIcon;
|
||||||
|
sprite.Draw(
|
||||||
|
CRect(SCREEN_SCALE_FROM_RIGHT(99.0f), SCREEN_SCALE_Y(27.0f), SCREEN_SCALE_FROM_RIGHT(35.0f), SCREEN_SCALE_Y(91.0f)),
|
||||||
|
CRGBA(255, 255, 255, alpha),
|
||||||
|
0.015f, 0.015f,
|
||||||
|
1.0f, 0.0f,
|
||||||
|
0.015f, 1.0f,
|
||||||
|
1.0f, 1.0f);
|
||||||
|
sprite.m_pTexture = nil;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ CWindModifiers::FindWindModifier(CVector pos, float *x, float *y)
|
||||||
float dist = (pos - Array[i].m_pos).Magnitude();
|
float dist = (pos - Array[i].m_pos).Magnitude();
|
||||||
if (dist < MAX_FADE_DIST) {
|
if (dist < MAX_FADE_DIST) {
|
||||||
float distFade = dist < MIN_FADE_DIST ? 1.0f : 1.0f - (dist - MIN_FADE_DIST) / (MAX_FADE_DIST - MIN_FADE_DIST);
|
float distFade = dist < MIN_FADE_DIST ? 1.0f : 1.0f - (dist - MIN_FADE_DIST) / (MAX_FADE_DIST - MIN_FADE_DIST);
|
||||||
float heightFade = 1.0f - zDist / MAX_HEIGHT_DIST;
|
float heightFade = distFade * ((1.0f - zDist / MAX_HEIGHT_DIST) / 2.0f);
|
||||||
dir = (pos - Array[i].m_pos) * heightFade / dist;
|
dir = (pos - Array[i].m_pos) * heightFade / dist;
|
||||||
bWasWindModifierFound = true;
|
bWasWindModifierFound = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -549,12 +549,14 @@ CameraSize(RwCamera * camera, RwRect * rect,
|
||||||
if( raster )
|
if( raster )
|
||||||
{
|
{
|
||||||
RwRasterDestroy(raster);
|
RwRasterDestroy(raster);
|
||||||
|
camera->frameBuffer = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
zRaster = RwCameraGetZRaster(camera);
|
zRaster = RwCameraGetZRaster(camera);
|
||||||
if( zRaster )
|
if( zRaster )
|
||||||
{
|
{
|
||||||
RwRasterDestroy(zRaster);
|
RwRasterDestroy(zRaster);
|
||||||
|
camera->zBuffer = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -71,7 +71,7 @@ CMessages::WideStringCompare(wchar *str1, wchar *str2, uint16 size)
|
||||||
if (len1 != len2 && (len1 < size || len2 < size))
|
if (len1 != len2 && (len1 < size || len2 < size))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (int32 i = 0; FixupChar(str1[i]) != '\0' && i < size; i++) {
|
for (int32 i = 0; i < size && FixupChar(str1[i]) != '\0'; i++) {
|
||||||
if (FixupChar(str1[i]) != FixupChar(str2[i]))
|
if (FixupChar(str1[i]) != FixupChar(str2[i]))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -99,13 +99,9 @@ CMessages::Process()
|
||||||
|
|
||||||
if (BriefMessages[0].m_pText != nil && CTimer::GetTimeInMilliseconds() > BriefMessages[0].m_nTime + BriefMessages[0].m_nStartTime) {
|
if (BriefMessages[0].m_pText != nil && CTimer::GetTimeInMilliseconds() > BriefMessages[0].m_nTime + BriefMessages[0].m_nStartTime) {
|
||||||
BriefMessages[0].m_pText = nil;
|
BriefMessages[0].m_pText = nil;
|
||||||
int32 i = 0;
|
int32 i;
|
||||||
while (i < NUMBRIEFMESSAGES-1) {
|
for (i = 0; i < NUMBRIEFMESSAGES-1 && BriefMessages[i + 1].m_pText != nil; i++) {
|
||||||
if (BriefMessages[i + 1].m_pText == nil)
|
|
||||||
break;
|
|
||||||
|
|
||||||
BriefMessages[i] = BriefMessages[i + 1];
|
BriefMessages[i] = BriefMessages[i + 1];
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
CMessages::BriefMessages[i].m_pText = nil;
|
CMessages::BriefMessages[i].m_pText = nil;
|
||||||
CMessages::BriefMessages[0].m_nStartTime = CTimer::GetTimeInMilliseconds();
|
CMessages::BriefMessages[0].m_nStartTime = CTimer::GetTimeInMilliseconds();
|
||||||
|
@ -328,7 +324,7 @@ void
|
||||||
CMessages::AddToPreviousBriefArray(wchar *text, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6, wchar *string)
|
CMessages::AddToPreviousBriefArray(wchar *text, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6, wchar *string)
|
||||||
{
|
{
|
||||||
int32 i;
|
int32 i;
|
||||||
for (i = 0; PreviousBriefs[i].m_pText && i < NUMPREVIOUSBRIEFS; i++) {
|
for (i = 0; i < NUMPREVIOUSBRIEFS && PreviousBriefs[i].m_pText != nil; i++) {
|
||||||
if (PreviousBriefs[i].m_nNumber[0] == n1
|
if (PreviousBriefs[i].m_nNumber[0] == n1
|
||||||
&& PreviousBriefs[i].m_nNumber[1] == n2
|
&& PreviousBriefs[i].m_nNumber[1] == n2
|
||||||
&& PreviousBriefs[i].m_nNumber[2] == n3
|
&& PreviousBriefs[i].m_nNumber[2] == n3
|
||||||
|
@ -505,7 +501,7 @@ CMessages::AddMessageWithNumber(wchar *str, uint32 time, uint16 flag, int32 n1,
|
||||||
GetWideStringLength(outstr);
|
GetWideStringLength(outstr);
|
||||||
|
|
||||||
uint16 i = 0;
|
uint16 i = 0;
|
||||||
while (i < NUMBRIEFMESSAGES && BriefMessages[i].m_pText)
|
while (i < NUMBRIEFMESSAGES && BriefMessages[i].m_pText != nil)
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
if (i >= NUMBRIEFMESSAGES) return;
|
if (i >= NUMBRIEFMESSAGES) return;
|
||||||
|
@ -722,35 +718,24 @@ CMessages::ClearThisPrint(wchar *str)
|
||||||
|
|
||||||
do {
|
do {
|
||||||
equal = false;
|
equal = false;
|
||||||
uint16 i = 0;
|
uint16 i;
|
||||||
while (i < NUMBRIEFMESSAGES) {
|
for (i = 0; i < NUMBRIEFMESSAGES && BriefMessages[i].m_pText != nil; i++) {
|
||||||
if (BriefMessages[i].m_pText == nil)
|
|
||||||
break;
|
|
||||||
|
|
||||||
equal = FastWideStringComparison(str, BriefMessages[i].m_pText);
|
equal = FastWideStringComparison(str, BriefMessages[i].m_pText);
|
||||||
|
|
||||||
if (equal) break;
|
if (equal) break;
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (equal) {
|
if (equal) {
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
BriefMessages[i].m_pText = nil;
|
BriefMessages[i].m_pText = nil;
|
||||||
while (i < NUMBRIEFMESSAGES-1) {
|
for (; i < NUMBRIEFMESSAGES-1 && BriefMessages[i+1].m_pText != nil; i++) {
|
||||||
if (BriefMessages[i + 1].m_pText == nil)
|
|
||||||
break;
|
|
||||||
|
|
||||||
BriefMessages[i] = BriefMessages[i + 1];
|
BriefMessages[i] = BriefMessages[i + 1];
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
BriefMessages[i].m_pText = nil;
|
BriefMessages[i].m_pText = nil;
|
||||||
} else {
|
} else {
|
||||||
BriefMessages[0].m_pText = nil;
|
BriefMessages[0].m_pText = nil;
|
||||||
while (i < NUMBRIEFMESSAGES-1) {
|
for (; i < NUMBRIEFMESSAGES-1 && BriefMessages[i+1].m_pText != nil; i++) {
|
||||||
if (BriefMessages[i + 1].m_pText == nil)
|
|
||||||
break;
|
|
||||||
BriefMessages[i] = BriefMessages[i + 1];
|
BriefMessages[i] = BriefMessages[i + 1];
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
BriefMessages[i].m_pText = nil;
|
BriefMessages[i].m_pText = nil;
|
||||||
BriefMessages[0].m_nStartTime = CTimer::GetTimeInMilliseconds();
|
BriefMessages[0].m_nStartTime = CTimer::GetTimeInMilliseconds();
|
||||||
|
|
2
vendor/librw
vendored
2
vendor/librw
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit edc77742c512b85ad35544b2cfbe3f359dc75805
|
Subproject commit 5e5a624681a268e759df53edc15a73f587fda6df
|
2
vendor/opusfile
vendored
2
vendor/opusfile
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit f94a1764b0dcdd84ee8c13c040de9f4c1a67e4df
|
Subproject commit 4174c26e0aaab19d01afdea0a46f7f95fdc6b3e6
|
Loading…
Reference in a new issue