summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/Frontend_PS2.cpp616
-rw-r--r--src/core/Frontend_PS2.h7
-rw-r--r--src/core/Pad.cpp798
-rw-r--r--src/render/MBlur.cpp6
4 files changed, 711 insertions, 716 deletions
diff --git a/src/core/Frontend_PS2.cpp b/src/core/Frontend_PS2.cpp
index f96363ae..79400b37 100644
--- a/src/core/Frontend_PS2.cpp
+++ b/src/core/Frontend_PS2.cpp
@@ -249,7 +249,7 @@ float CMenuManager::fMapCenterX;
CMenuManager::CMenuManager(void)
{
int i;
-
+
SetSoundLevelsForMusicMenu();
m_pageState = PAGESTATE_NORMAL;
@@ -274,12 +274,12 @@ CMenuManager::CMenuManager(void)
m_bWantToUpdateContent = false;
field_3C = 0;
m_bInSaveZone = false;
-
+
for(i = 0; i < NUM_PAGES; i++){
BUTTONTAB_TEXT_X_SCALES[i] = 1.0f;
PANEL_TEXT_X_SCALES[i] = 1.0f;
}
-
+
#ifdef GTA_PC
TheCamera.m_bUseMouse3rdPerson = m_ControlMethod == CONTROL_STANDARD;
CMBlur::BlurOn = m_PrefsShowTrails;
@@ -308,7 +308,7 @@ CMenuManager::LoadAllTextures(void)
CFileMgr::SetDir("");
CFileMgr::SetDir("");
-
+
CTimer::Stop();
CStreaming::MakeSpaceFor(60*1024);
CStreaming::ImGonnaUseStreamingMemory();
@@ -336,7 +336,7 @@ CMenuManager::UnloadTextures(void)
{
int slot;
int i;
-
+
if ( !m_bTexturesLoaded )
return;
@@ -854,188 +854,188 @@ CMenuManager::InitialiseChangedLanguageSettings(void)
if ( bFrontEnd_ReloadObrTxtGxt )
{
bFrontEnd_ReloadObrTxtGxt = false;
-
+
CTimer::Stop();
TheText.Unload();
TheText.Load();
CTimer::Update();
-
+
FrontEndMenuManager.AnaliseMenuContents();
CGame::frenchGame = false;
CGame::germanGame = false;
- if ( m_PrefsAllowNastyGame )
+ if ( m_PrefsAllowNastyGame )
CGame::nastyGame = true;
-
+
for ( int32 i = 0; i < NUM_PAGES; i++ )
{
BUTTONTAB_TEXT_X_SCALES[i] = 1.0f;
PANEL_TEXT_X_SCALES[i] = 1.0f;
}
-
+
switch ( m_PrefsLanguage )
{
case LANGUAGE_AMERICAN:
{
MENU_TEXT_SIZE_X = 0.644f;
MENU_TEXT_SIZE_Y = 0.84f;//0.96f;
-
+
BUTTONTAB_TEXT_SIZE_X = 0.35f;
BUTTONTAB_TEXT_SIZE_Y = 0.7f;//0.8f;
-
+
BUTTONTAB_TEXT_X_SCALES[6] = 0.94f;
-
+
CONTR_DESCR_NEW_TEXTSCALE.x = 0.4564f;
CONTR_DESCR_NEW_TEXTSCALE.y = 0.63f;//0.72f;
-
+
CONFIGS_NEW_TEXTSCALE.x = 0.49f;
CONFIGS_NEW_TEXTSCALE.y = 0.7f;//0.8f;
-
+
AUDIO_OUTPUT_POS.x = 0.0f;
AUDIO_OUTPUT_POS.y = 0.0f;
-
+
AUDIO_RSTATION_POS.x = 154.0f;
AUDIO_RSTATION_POS.y = 0.0f;
-
+
DISPLAY_BRIGHTNESS_POS.x = 0.0f;
DISPLAY_BRIGHTNESS_POS.y = 0.0f;
-
+
MEMCARD_ACCESS_MSG_SIZE_X = 0.84f;
MEMCARD_ACCESS_MSG_SIZE_Y = 1.12f;//1.28f;
-
+
break;
}
-
+
case LANGUAGE_FRENCH:
{
CGame::frenchGame = true;
if ( m_PrefsAllowNastyGame )
CGame::nastyGame = false;
-
+
MENU_TEXT_SIZE_X = 0.504f;
MENU_TEXT_SIZE_Y = 0.84f;//0.96f;
-
+
BUTTONTAB_TEXT_SIZE_X = 0.32f;
BUTTONTAB_TEXT_SIZE_Y = 0.7f;//0.8f;
-
+
BUTTONTAB_TEXT_X_SCALES[0] = 0.84f;
BUTTONTAB_TEXT_X_SCALES[3] = 0.84f;
PANEL_TEXT_X_SCALES[1] = 0.8f;
-
+
CONTR_DESCR_NEW_TEXTSCALE.x = 0.385f;
CONTR_DESCR_NEW_TEXTSCALE.y = 0.63f;//0.72f;
-
+
CONFIGS_NEW_TEXTSCALE.x = 0.455f;
CONFIGS_NEW_TEXTSCALE.y = 0.7f;//0.8f;
-
+
AUDIO_OUTPUT_POS.x = -15.0f;
AUDIO_OUTPUT_POS.y = 0.0f;
-
+
AUDIO_RSTATION_POS.x = 184.0f;
AUDIO_RSTATION_POS.y = 0.0f;
-
+
DISPLAY_BRIGHTNESS_POS.x = 20.0f;
DISPLAY_BRIGHTNESS_POS.y = 0.0f;
-
+
MEMCARD_ACCESS_MSG_SIZE_X = 0.84f;
MEMCARD_ACCESS_MSG_SIZE_Y = 1.12f;//1.28f;
-
+
break;
}
-
+
case LANGUAGE_GERMAN:
{
CGame::germanGame = true;
if ( m_PrefsAllowNastyGame )
CGame::nastyGame = false;
-
+
MENU_TEXT_SIZE_X = 0.546f;
MENU_TEXT_SIZE_Y = 0.84f;//0.96f;
-
+
BUTTONTAB_TEXT_SIZE_X = 0.32f;
BUTTONTAB_TEXT_SIZE_Y = 0.7f;//0.8f;
-
+
CONTR_DESCR_NEW_TEXTSCALE.x = 0.35f;
CONTR_DESCR_NEW_TEXTSCALE.y = 0.63f;//0.72f;
-
+
CONFIGS_NEW_TEXTSCALE.x = 0.434f;
CONFIGS_NEW_TEXTSCALE.y = 0.7f;//0.8f;
-
+
AUDIO_OUTPUT_POS.x = -15.0f;
AUDIO_OUTPUT_POS.y = 0.0f;
-
+
AUDIO_RSTATION_POS.x = 154.0f;
AUDIO_RSTATION_POS.y = 0.0f;
-
+
DISPLAY_BRIGHTNESS_POS.x = 20.0f;
DISPLAY_BRIGHTNESS_POS.y = 0.0f;
-
+
MEMCARD_ACCESS_MSG_SIZE_X = 0.7f;
MEMCARD_ACCESS_MSG_SIZE_Y = 1.12f;//1.28f;
-
+
break;
}
-
+
case LANGUAGE_ITALIAN:
{
MENU_TEXT_SIZE_X = 0.574f;
MENU_TEXT_SIZE_Y = 0.84f;//0.96f;
-
+
BUTTONTAB_TEXT_SIZE_X = 0.32f;
BUTTONTAB_TEXT_SIZE_Y = 0.7f;//0.8f;
-
+
BUTTONTAB_TEXT_X_SCALES[0] = 0.86f;
PANEL_TEXT_X_SCALES[1] = 0.9f;
-
+
CONTR_DESCR_NEW_TEXTSCALE.x = 0.385f;
CONTR_DESCR_NEW_TEXTSCALE.y = 0.63f;//0.72f;
-
+
CONFIGS_NEW_TEXTSCALE.x = 0.42f;
CONFIGS_NEW_TEXTSCALE.y = 0.7f;//0.8f;
-
+
AUDIO_OUTPUT_POS.x = 10.0f;
AUDIO_OUTPUT_POS.y = 0.0f;
-
+
AUDIO_RSTATION_POS.x = 194.0f;
AUDIO_RSTATION_POS.y = 0.0f;
-
+
DISPLAY_BRIGHTNESS_POS.x = 10.0f;
DISPLAY_BRIGHTNESS_POS.y = 0.0f;
-
+
MEMCARD_ACCESS_MSG_SIZE_X = 0.84f;
MEMCARD_ACCESS_MSG_SIZE_Y = 1.12f;//1.28f;
-
+
break;
}
-
+
case LANGUAGE_SPANISH:
{
MENU_TEXT_SIZE_X = 0.546f;
MENU_TEXT_SIZE_Y = 0.84f;//0.96f;
-
+
BUTTONTAB_TEXT_SIZE_X = 0.35f;
BUTTONTAB_TEXT_SIZE_Y = 0.7f;//0.8f;
-
+
BUTTONTAB_TEXT_X_SCALES[0] = 0.78f;
PANEL_TEXT_X_SCALES[1] = 0.95f;
-
+
CONTR_DESCR_NEW_TEXTSCALE.x = 0.364f;
CONTR_DESCR_NEW_TEXTSCALE.y = 0.63f;//0.72f;
-
+
CONFIGS_NEW_TEXTSCALE.x = 0.455f;
CONFIGS_NEW_TEXTSCALE.y = 0.7f;//0.8f;
-
+
AUDIO_OUTPUT_POS.x = 10.0f;
AUDIO_OUTPUT_POS.y = 0.0f;
-
+
AUDIO_RSTATION_POS.x = 124.0f;
AUDIO_RSTATION_POS.y = 0.0f;
-
+
DISPLAY_BRIGHTNESS_POS.x = 30.0f;
DISPLAY_BRIGHTNESS_POS.y = 0.0f;
-
+
MEMCARD_ACCESS_MSG_SIZE_X = 0.84f;
MEMCARD_ACCESS_MSG_SIZE_Y = 1.12f;//1.28f;
-
+
break;
}
}
@@ -1048,9 +1048,9 @@ CMenuManager::InitialiseMenuContents(void)
if ( m_bWantToUpdateContent == false )
{
m_bWantToUpdateContent = true;
-
+
m_pageState = PAGESTATE_NORMAL;
-
+
switch ( CPad::GetPad(0)->GetMode() )
{
case 3: m_PrefsControllerConfig = CONFIG_4; break;
@@ -1058,38 +1058,38 @@ CMenuManager::InitialiseMenuContents(void)
case 1: m_PrefsControllerConfig = CONFIG_2; break;
case 0: m_PrefsControllerConfig = CONFIG_1; break;
}
-
+
MenuControls_1.SetMenuSelection(m_PrefsControllerConfig);
MenuControls_5.SetMenuSelection(m_PrefsUseVibration);
-
+
MenuAudio_1.SetMenuSelection(m_PrefsMusicVolume / 127.0f * 100.0f + 0.5f);
MenuAudio_2.SetMenuSelection(m_PrefsSfxVolume / 127.0f * 100.0f + 0.5f);
MenuAudio_3.SetMenuSelection(m_PrefsRadioStation);
MenuAudio_4.SetMenuSelection(m_PrefsStereoMono);
-
+
MenuDisplay_1.SetMenuSelection(m_PrefsBrightness / 512.0f * 100.0f + 0.5f);
#ifdef PS2
m_PrefsShowTrails = BlurOn;
#else
m_PrefsShowTrails = CMBlur::BlurOn;
#endif
- MenuDisplay_2.SetMenuSelection(m_PrefsShowTrails);
+ MenuDisplay_2.SetMenuSelection(m_PrefsShowTrails);
MenuDisplay_3.SetMenuSelection(m_PrefsShowSubtitles);
MenuDisplay_4.SetMenuSelection(m_PrefsUseWideScreen);
-
+
MenuLanguage_1.SetMenuSelection(m_PrefsLanguage);
-
+
FillMenuWithMemCardFileListing(&MenuSaveLG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_LoadGameLoadGameSelect, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveDG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_DeleteGameDeleteGameSelect, NULL, 0, 34, 22);
-
+
MenuBriefs_1.m_numTexts = 0;
MenuBriefs_1.AddText(TheText.Get("FEB_PMB"), 0.0f, 0.0f, TITLE_TEXT_COLOR, 0); // Previous Mission Briefs:
-
+
static wchar StringsToDisplay[NUMPREVIOUSBRIEFS][256];
-
+
CRGBA newColor;
int32 brierY = 36;
-
+
for ( int32 i = NUMPREVIOUSBRIEFS-1; i >= 0; i-- )
{
tPreviousBrief &brief = CMessages::PreviousBriefs[i];
@@ -1114,122 +1114,122 @@ CMenuManager::InitialiseMenuContents(void)
brierY += 54;
}
}
-
+
MenuStats_1.m_scrollPosition = 0.0f;
MenuStats_1.ResetNumberOfTextLines();
-
+
nStatLinesIndex = 0;
-
+
#define STAT_HEADER(str) do { MenuStats_1.AddTextLine(TheText.Get(str), NULL); } while(0)
#define STAT_PARAM(str) do { MenuStats_1.AddTextLine(NULL, TheText.Get(str)); } while(0)
#define STAT_LINE(str, left, isFloat, right) do { MenuStats_1.AddTextLine(TheText.Get(str), PrintStatLine(str, left, isFloat, right)); } while(0)
-
+
int32 nTemp;
-
+
STAT_HEADER("PL_STAT");
-
+
int32 percentCompleted = (CStats::TotalProgressInGame == 0 ? 0 : CStats::ProgressMade * 100.0f / (CGame::nastyGame ? CStats::TotalProgressInGame : CStats::TotalProgressInGame - 1));
percentCompleted = Min(percentCompleted, 100);
-
+
STAT_LINE("PER_COM", &percentCompleted, 0, NULL);
-
+
STAT_LINE("NMISON", &CStats::MissionsGiven, 0, NULL);
-
+
STAT_LINE("FEST_MP", &CStats::MissionsPassed, 0, &CStats::TotalNumberMissions);
-
+
if ( CGame::nastyGame )
STAT_LINE("FEST_RP", &CStats::NumberKillFrenziesPassed, 0, &CStats::TotalNumberKillFrenzies);
-
+
CPlayerInfo &player = CWorld::Players[CWorld::PlayerInFocus];
float packagesPercent = 0.0f;
if (player.m_nTotalPackages != 0)
packagesPercent = player.m_nCollectedPackages * 100.0f / player.m_nTotalPackages;
int nPackagesPercent = packagesPercent;
nTemp = 100;
-
+
STAT_LINE("PERPIC", &nPackagesPercent, 0, &nTemp);
-
+
STAT_LINE("NOUNIF", &CStats::NumberOfUniqueJumpsFound, 0, &CStats::TotalNumberOfUniqueJumps);
-
+
STAT_LINE("DAYSPS", &CStats::DaysPassed, 0, NULL);
-
+
if ( CGame::nastyGame )
{
STAT_LINE("PE_WAST", &CStats::PeopleKilledByPlayer, 0, NULL);
STAT_LINE("PE_WSOT", &CStats::PeopleKilledByOthers, 0, NULL);
}
-
+
STAT_LINE("CAR_EXP", &CStats::CarsExploded, 0, NULL);
-
+
STAT_LINE("TM_BUST", &CStats::TimesArrested, 0, NULL);
-
+
STAT_LINE("TM_DED", &CStats::TimesDied, 0, NULL);
-
+
nTemp = CStats::PedsKilledOfThisType[PEDTYPE_GANG9] + CStats::PedsKilledOfThisType[PEDTYPE_GANG8]
+ CStats::PedsKilledOfThisType[PEDTYPE_GANG7] + CStats::PedsKilledOfThisType[PEDTYPE_GANG6]
+ CStats::PedsKilledOfThisType[PEDTYPE_GANG5] + CStats::PedsKilledOfThisType[PEDTYPE_GANG4]
+ CStats::PedsKilledOfThisType[PEDTYPE_GANG3] + CStats::PedsKilledOfThisType[PEDTYPE_GANG2]
+ CStats::PedsKilledOfThisType[PEDTYPE_GANG1];
STAT_LINE("GNG_WST", &nTemp, 0, NULL);
-
+
nTemp = CStats::PedsKilledOfThisType[PEDTYPE_CRIMINAL];
STAT_LINE("DED_CRI", &nTemp, 0, NULL);
-
+
STAT_LINE("HEL_DST", &CStats::HelisDestroyed, 0, NULL);
-
+
STAT_LINE("KGS_EXP", &CStats::KgsOfExplosivesUsed, 0, NULL);
-
+
nTemp = (CStats::InstantHitsFiredByPlayer == 0 ? 0 : CStats::InstantHitsHitByPlayer * 100.0f / CStats::InstantHitsFiredByPlayer);
STAT_LINE("ACCURA", &nTemp, 0, NULL);
-
+
if (CStats::ElBurroTime > 0)
STAT_LINE("ELBURRO", &CStats::ElBurroTime, 0, NULL);
-
+
if (CStats::Record4x4One > 0)
STAT_LINE("FEST_R1", &CStats::Record4x4One, 0, NULL);
-
+
if (CStats::Record4x4Two > 0)
STAT_LINE("FEST_R2", &CStats::Record4x4Two, 0, NULL);
-
+
if (CStats::Record4x4Three > 0)
STAT_LINE("FEST_R3", &CStats::Record4x4Three, 0, NULL);
-
+
if (CStats::Record4x4Mayhem > 0)
STAT_LINE("FEST_RM", &CStats::Record4x4Mayhem, 0, NULL);
-
+
if (CStats::LongestFlightInDodo > 0)
STAT_LINE("FEST_LF", &CStats::LongestFlightInDodo, 0, NULL);
-
+
if (CStats::TimeTakenDefuseMission > 0)
STAT_LINE("FEST_BD", &CStats::TimeTakenDefuseMission, 0, NULL);
-
+
STAT_LINE("CAR_CRU", &CStats::CarsCrushed, 0, NULL);
-
+
if (CStats::HighestScores[0] > 0)
{
STAT_HEADER("FEST_BB");
STAT_LINE("FEST_H0", &CStats::HighestScores[0], 0, NULL);
}
-
+
int32 hs = 0;
for ( int32 i = 1; i < 5; i++ )
hs += CStats::HighestScores[i];
if (hs > 0)
STAT_HEADER("FEST_GC");
-
+
if (CStats::HighestScores[1] > 0)
STAT_LINE("FEST_H1", &CStats::HighestScores[1], 0, NULL);
-
+
if (CStats::HighestScores[2] > 0)
STAT_LINE("FEST_H2", &CStats::HighestScores[2], 0, NULL);
-
+
if (CStats::HighestScores[3] > 0)
STAT_LINE("FEST_H3", &CStats::HighestScores[3], 0, NULL);
-
+
if (CStats::HighestScores[4] > 0)
STAT_LINE("FEST_H4", &CStats::HighestScores[4], 0, NULL);
-
+
STAT_LINE("FESTDFM", &CStats::DistanceTravelledOnFoot, 0, NULL);
STAT_LINE("FESTDCM", &CStats::DistanceTravelledInVehicle, 0, NULL);
STAT_LINE("MMRAIN", &CStats::mmRain, 0, NULL);
@@ -1237,10 +1237,10 @@ CMenuManager::InitialiseMenuContents(void)
STAT_LINE("MXCARDM", &nTemp, 0, NULL);
nTemp = (int32)CStats::MaximumJumpHeight;
STAT_LINE("MXCARJM", &nTemp, 0, NULL);
-
+
STAT_LINE("MXFLIP", &CStats::MaximumJumpFlips, 0, NULL);
STAT_LINE("MXJUMP", &CStats::MaximumJumpSpins, 0, NULL);
-
+
STAT_HEADER("BSTSTU");
switch (CStats::BestStuntJump)
@@ -1255,7 +1255,7 @@ CMenuManager::InitialiseMenuContents(void)
case 8: STAT_PARAM("PQUINS"); break;
default: STAT_PARAM("NOSTUC"); break;
}
-
+
STAT_LINE("PASDRO", &CStats::PassengersDroppedOffWithTaxi, 0, NULL);
STAT_LINE("MONTAX", &CStats::MoneyMadeWithTaxi, 0, NULL);
STAT_LINE("FEST_LS", &CStats::LivesSavedWithAmbulance, 0, NULL);
@@ -1264,23 +1264,23 @@ CMenuManager::InitialiseMenuContents(void)
STAT_LINE("FEST_FE", &CStats::FiresExtinguished, 0, NULL);
int32 rnd = ((CGeneral::GetRandomNumber() & 255) + 100) * 2384;
STAT_LINE("DAYPLC", &rnd, 0, NULL);
-
+
#undef STAT_LINE
-
+
MenuStats_2.m_numTexts = 0;
MenuStats_2.AddText(TheText.Get("CRIMRA"), 0.0f, 0.0f, CRIM_RATING_TEXT_COLOR, 0);
-
+
char rating[16];
wchar urating[16];
sprintf(rating, " %d", CStats::FindCriminalRatingNumber());
AsciiToUnicode(rating, urating);
-
+
wchar *pStatLine = aStatLines[nStatLinesIndex++];
UnicodeStrcpy(pStatLine, CStats::FindCriminalRatingString());
UnicodeStrcat(pStatLine, urating);
-
+
MenuStats_2.AddText(pStatLine, X(MenuStats_1.m_width), 0.0f, CRIM_RATING_TEXT_COLOR, 1);
-
+
MenuSaveZoneSG_1.SetMenuSelection(1);
MenuSaveZoneFC_1.SetMenuSelection(1);
}
@@ -1293,8 +1293,8 @@ CMenuManager::AnaliseMenuContents(void)
if ( m_bWantToUpdateContent )
{
m_bWantToUpdateContent = false;
-
- m_PrefsControllerConfig = (CONTRCONFIG)MenuControls_1.GetMenuSelection();
+
+ m_PrefsControllerConfig = (CONTRCONFIG)MenuControls_1.GetMenuSelection();
switch ( m_PrefsControllerConfig )
{
case CONFIG_4: CPad::GetPad(0)->SetMode(3); break;
@@ -1302,15 +1302,15 @@ CMenuManager::AnaliseMenuContents(void)
case CONFIG_2: CPad::GetPad(0)->SetMode(1); break;
case CONFIG_1: CPad::GetPad(0)->SetMode(0); break;
}
-
+
m_PrefsUseVibration = MenuControls_5.m_title.m_bSelected;
-
+
m_PrefsMusicVolume = float(MenuAudio_1.GetMenuSelection())/100.0f*127.0f+0.5f;
m_PrefsSfxVolume = float(MenuAudio_2.GetMenuSelection())/100.0f*127.0f+0.5f;
m_PrefsRadioStation = MenuAudio_3.GetMenuSelection();
m_PrefsStereoMono = MenuAudio_4.GetMenuSelection();
m_PrefsBrightness = float(MenuDisplay_1.GetMenuSelection()) / 100.0f*512.0f + 0.5f;
- m_PrefsShowTrails = MenuDisplay_2.GetMenuSelection();
+ m_PrefsShowTrails = MenuDisplay_2.GetMenuSelection();
m_PrefsShowSubtitles = MenuDisplay_3.GetMenuSelection();
m_PrefsUseWideScreen = MenuDisplay_4.GetMenuSelection();
#ifdef PS2
@@ -1318,7 +1318,7 @@ CMenuManager::AnaliseMenuContents(void)
#else
CMBlur::BlurOn = m_PrefsShowTrails;
#endif
-
+
if ( m_PrefsLanguage != MenuLanguage_1.GetMenuSelection() )
{
m_PrefsLanguage = MenuLanguage_1.GetMenuSelection();
@@ -1346,10 +1346,10 @@ CMenuManager::DrawFrontEnd(void)
DrawFrontEndSaveZone();
else
DrawFrontEndNormal();
-
+
if ( MemCardAccessTriggerCaller.CanCall() )
MemCardAccessTriggerCaller.CallTrigger();
-
+
DisplayWarningControllerMsg();
}
@@ -1358,39 +1358,39 @@ CMenuManager::DrawFrontEndNormal(void)
{
CSprite2d::InitPerFrame();
CFont::InitPerFrame();
-
+
if ( bMemoryCardSpecialZone )
{
static uint8 counter = 0;
-
+
counter++;
-
+
if ( (counter & 63 ) == 0 )
{
FillMenuWithMemCardFileListing(&MenuSaveLG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_LoadGameLoadGameSelect, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveDG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_DeleteGameDeleteGameSelect, NULL, 0, 34, 22);
}
}
-
+
m_fade = 255;
if ( m_nChangePageTimer != 0 && m_nChangePageTimer >= CTimer::GetTimeInMillisecondsPauseMode() )
m_fade = uint32(float(m_nChangePageTimer - CTimer::GetTimeInMillisecondsPauseMode()) / 250.0f * 255.0f);
-
+
m_someAlpha = 255;
-
+
m_position.x = 0.0f;
m_position.y = 0.0f;
-
+
if ( m_nStartPauseTimer != 0 && m_nStartPauseTimer >= CTimer::GetTimeInMillisecondsPauseMode() )
{
float slide = float(m_nStartPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) / 800.0f;
float alpha = 1.0f;
-
+
if ((m_nStartPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) <= 1600)
alpha = float(m_nStartPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) / 400.0f;
-
+
m_someAlpha = 255 - clamp(alpha, 0.0f, 1.0f) * 255.0f;
-
+
switch ( m_nSlidingDir )
{
case SLIDE_TO_RIGHT: m_position.x = slide * X(700.0f); break;
@@ -1400,27 +1400,27 @@ CMenuManager::DrawFrontEndNormal(void)
default: m_position.y = slide * Y(500.0f); break;
}
}
-
+
if ( m_nEndPauseTimer != 0 && m_nEndPauseTimer >= CTimer::GetTimeInMillisecondsPauseMode() )
{
float slide = float(m_nEndPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) / 800.0f;
float alpha = float((int32)(m_nEndPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) + -266) / 533.0f;
-
+
m_someAlpha = clamp(alpha, 0.0f, 1.0f) * 255.0f;
-
+
switch ( m_nSlidingDir )
{
case SLIDE_TO_TOP: m_position.y = (1.0f - slide) * Y(500.0f); break;
case SLIDE_TO_RIGHT: m_position.x = (1.0f - slide) * X(700.0f); break;
case SLIDE_TO_LEFT: m_position.x = (1.0f - slide) * X(700.0f); break;
case SLIDE_TO_BOTTOM: m_position.y = -((1.0f - slide) * Y(500.0f)); break;
- default: m_position.y = -((1.0f - slide) * Y(500.0f)); break;
+ default: m_position.y = -((1.0f - slide) * Y(500.0f)); break;
}
}
-
+
if ( m_someAlpha < 255 )
m_fade = m_someAlpha;
-
+
float posX, posY;
/* Draw splash */
@@ -1456,7 +1456,7 @@ CMenuManager::DrawFrontEndNormal(void)
float iconWidth = 540.0f;
float iconHeight = 296.0f;
int sprite = FE_ICONBRIEF;
-
+
#ifdef PS2_MENU_USEALLPAGEICONS
switch(m_currentPage)
{
@@ -1511,18 +1511,18 @@ CMenuManager::DrawFrontEndNormal(void)
/* Overwrite tab buttons if entered page */
bool bOverwriteTab = false;
-
+
switch ( m_pageState )
{
case PAGESTATE_NORMAL:
case PAGESTATE_HIGHLIGHTED:
break;
-
+
case PAGESTATE_SELECTED:
bOverwriteTab = true;
break;
}
-
+
if( bOverwriteTab )
{
CRGBA shadow(41, 101, 102, m_someAlpha);
@@ -1623,12 +1623,12 @@ CMenuManager::DrawFrontEndNormal(void)
CFont::PrintString(m_position.x+X(242.0f), m_position.y+Y(360.0f), TheText.Get("FEDSSC1"));
CFont::PrintString(m_position.x+X(242.0f), m_position.y+Y(372.0f), TheText.Get("FEDSSC2"));
break;
-
+
case PAGE_BRIEFS:
CFont::PrintString(m_position.x+X(52.0f), m_position.y+Y(360.0f), TheText.Get("FEDS_ST"));
CFont::PrintString(m_position.x+X(52.0f), m_position.y+Y(372.0f), TheText.Get("FEDS_AM"));
break;
-
+
case PAGE_LOAD:
case PAGE_CONTROLS:
case PAGE_AUDIO:
@@ -1638,13 +1638,13 @@ CMenuManager::DrawFrontEndNormal(void)
CFont::PrintString(m_position.x+X(52.0f), m_position.y+Y(360.0f), TheText.Get("FEDS_SE"));
CFont::PrintString(m_position.x+X(52.0f), m_position.y+Y(372.0f), TheText.Get("FEDS_BA"));
CFont::PrintString(m_position.x+X(52.0f), m_position.y+Y(384.0f), TheText.Get("FEDS_ST"));
-
+
switch ( m_pageState )
{
case PAGESTATE_NORMAL:
CFont::PrintString(m_position.x+X(242.0f), m_position.y+Y(372.0f), TheText.Get("FEDS_AM")); // <>-CHANGE MENU
break;
-
+
case PAGESTATE_HIGHLIGHTED:
case PAGESTATE_SELECTED:
{
@@ -1653,15 +1653,15 @@ CMenuManager::DrawFrontEndNormal(void)
CFont::PrintString(m_position.x+X(242.0f-10.0f), m_position.y+Y(372.0f), TheText.Get("FEA_LE")); // <
CFont::PrintString(m_position.x+X(242.0f+11.0f), m_position.y+Y(372.0f), TheText.Get("FEA_RI")); // >
CFont::PrintString(m_position.x+X(242.0f+20.0f), m_position.y+Y(372.0f), TheText.Get("FEDSAS3")); // - CHANGE SELECTION
-
+
break;
}
}
-
+
break;
}
}
-
+
CFont::DrawFonts();
/* Draw tab button texts */
@@ -1673,7 +1673,7 @@ CMenuManager::DrawFrontEndNormal(void)
CFont::SetRightJustifyOff();
CFont::SetBackGroundOnlyTextOn();
CFont::SetWrapx(SCRW-X(40.0f)); // 600.0f
-
+
switch ( m_pageState )
{
case PAGESTATE_NORMAL:
@@ -1693,10 +1693,10 @@ CMenuManager::DrawFrontEndNormal(void)
CFont::PrintString(m_position.x+X(422.0f), m_position.y+Y(408.0f), TheText.Get("FEB_DIS"));
CFont::SetScale(X(BUTTONTAB_TEXT_SIZE_X*BUTTONTAB_TEXT_X_SCALES[PAGE_LANGUAGE]), Y(BUTTONTAB_TEXT_SIZE_Y));
CFont::PrintString(m_position.x+X(488.0f), m_position.y+Y(408.0f), TheText.Get("FEB_LAN"));
-
+
break;
}
-
+
case PAGESTATE_HIGHLIGHTED:
case PAGESTATE_SELECTED:
{
@@ -1733,11 +1733,11 @@ CMenuManager::DrawFrontEndNormal(void)
CFont::PrintString(m_position.x+X(488.0f), m_position.y+Y(408.0f), TheText.Get("FEB_LAN"));
break;
}
-
+
break;
}
}
-
+
CFont::DrawFonts();
pActiveMenuPage = nil;
@@ -1751,7 +1751,7 @@ CMenuManager::DrawFrontEndNormal(void)
case PAGE_DISPLAY: pActiveMenuPage = &MenuPage_Display; break;
case PAGE_LANGUAGE: pActiveMenuPage = &MenuPage_Language; break;
}
-
+
CFont::SetFontStyle(FONT_BANK);
CFont::SetBackgroundOff();
CFont::SetScale(X(MENU_TEXT_SIZE_X), Y(MENU_TEXT_SIZE_Y));
@@ -1762,13 +1762,13 @@ CMenuManager::DrawFrontEndNormal(void)
CFont::SetBackGroundOnlyTextOn();
CFont::SetWrapx(SCRW-X(40.0f)); // 600.0f
CFont::SetRightJustifyWrap(X(38.0f));
-
+
if(m_currentPage == PAGE_LANGUAGE)
{
CFont::SetCentreOn();
CFont::SetCentreSize(SCRW-X(40.0f)); // 600.0f
}
-
+
if ( m_nEndPauseTimer != 0 )
{
switch ( m_currentPage )
@@ -1777,33 +1777,33 @@ CMenuManager::DrawFrontEndNormal(void)
case PAGE_BRIEFS:
case PAGE_CONTROLS:
break;
-
+
default:
CFont::SetWrapx(X(1200.0f));
break;
}
}
-
+
if(pActiveMenuPage)
{
pActiveMenuPage->SetAlpha(m_fade);
-
+
switch ( m_pageState )
{
case PAGESTATE_NORMAL:
pActiveMenuPage->DrawNormal(m_position.x, m_position.y);
break;
-
+
case PAGESTATE_HIGHLIGHTED:
pActiveMenuPage->DrawHighlighted(CRGBA(rgbaATC.r, rgbaATC.g, rgbaATC.b, m_fade), m_position.x, m_position.y);
break;
-
+
case PAGESTATE_SELECTED:
pActiveMenuPage->Draw(CRGBA(rgbaATC.r, rgbaATC.g, rgbaATC.b, m_fade), CRGBA(MENU_SELECTED_COLOR.r, MENU_SELECTED_COLOR.g, MENU_SELECTED_COLOR.b, m_fade), m_position.x, m_position.y);
break;
}
}
-
+
CFont::DrawFonts();
CFont::DrawFonts();
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
@@ -1820,7 +1820,7 @@ CMenuManager::DrawFrontEndSaveZone(void)
if ( counter & 63 )
{
FillMenuWithMemCardFileListing(&MenuSaveZoneSSL_1, TriggerSaveZone_BackToMainMenuTwoLines, TriggerSaveZone_SaveSlots, NULL, 0, 34, 22);
-
+
if ( TheMemoryCard.GetError() == CMemoryCard::ERR_NOFORMAT )
{
pActiveMenuPage = &MenuPageSaveZone_FormatCard;
@@ -1829,16 +1829,16 @@ CMenuManager::DrawFrontEndSaveZone(void)
}
}
}
-
+
CSprite2d::InitPerFrame();
CFont::InitPerFrame();
-
+
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST);
-
+
m_fade = 255;
-
+
CSprite2d::DrawRect(CRect(X(50.0f), Y(50.0f), X(590.0f), Y(398.0f)), CRGBA(0, 0, 0, 175)); //CRect(50.0f, 57.142f, 590.0f, 454.857147f)
-
+
CFont::SetFontStyle(FONT_BANK);
CFont::SetBackgroundOff();
CFont::SetScale(X(MENU_TEXT_SIZE_X), Y(MENU_TEXT_SIZE_Y));
@@ -1849,14 +1849,14 @@ CMenuManager::DrawFrontEndSaveZone(void)
CFont::SetBackGroundOnlyTextOn();
CFont::SetRightJustifyWrap(X(70.0f));
CFont::SetWrapx(SCRW-X(70.0f)); // 570.0f
-
+
if ( pActiveMenuPage )
{
pActiveMenuPage->SetAlpha(m_fade);
pActiveMenuPage->Draw(CRGBA(rgbaATC.r, rgbaATC.g, rgbaATC.b, m_fade), TITLE_TEXT_COLOR, 0.0f, 0.0f);
}
-
-
+
+
CFont::DrawFonts();
CFont::SetFontStyle(FONT_BANK);
CFont::SetBackgroundOff();
@@ -1868,22 +1868,22 @@ CMenuManager::DrawFrontEndSaveZone(void)
CFont::SetBackGroundOnlyTextOn();
CFont::SetWrapx(SCRW-X(40.0f)); //600.0f
CFont::SetColor(TEXT_COLOR);
-
+
wchar *text;
if ( pActiveMenuPage == &MenuPageSaveZone_FormatCard
|| pActiveMenuPage == &MenuPageSaveZone_SaveSlots
|| pActiveMenuPage == &MenuPageSaveZone_SaveGame )
{
- text = TheText.Get("FEDS_SB"); // / button - SELECT " button - BACK
+ text = TheText.Get("FEDS_SB"); // / button - SELECT " button - BACK
}
else
{
text = TheText.Get("FEDS_SE"); // / button - SELECT
}
-
+
CFont::PrintString(X(180.0f), Y(376.0f), text); // 180.0f, 429.714294f
CFont::DrawFonts();
-
+
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
}
@@ -1892,11 +1892,11 @@ CMenuManager::DrawMemoryCardStartUpMenus()
{
CFont::SetAlphaFade(255.0f);
bMemoryCardStartUpMenus_ExitNow = false;
-
+
CMenuPage page; // + 0x40 data
CMenuMultiChoiceTriggered MCMenu;
MCMenu.SetPosition(X(320.0f), Y(150.0f)); //171.428574f
-
+
switch ( TheMemoryCard.CheckCardStateAtGameStartUp(CARD_ONE) )
{
case CMemoryCard::MCSTATE_NEED_200KB: // 200KB
@@ -1905,14 +1905,14 @@ CMenuManager::DrawMemoryCardStartUpMenus()
MCMenu.AddTitle(TheText.Get("MCGNSP"), 0.0f, 0.0f, 0);
break;
}
-
+
case CMemoryCard::MCSTATE_NEED_500KB: // 500KB
{
// There is insufficient space on the Memory Card (PS2) in MEMORY CARD slot 1. At least 500KB is needed to save this application data. Do you wish to start? (YES or NO)
MCMenu.AddTitle(TheText.Get("MCDNSP"), 0.0f, 0.0f, 0);
break;
}
-
+
case CMemoryCard::MCSTATE_OK:
case CMemoryCard::MCSTATE_NOCARD:
{
@@ -1920,24 +1920,24 @@ CMenuManager::DrawMemoryCardStartUpMenus()
break;
}
}
-
+
MCMenu.AddOption(TheText.Get("FEM_NO"), X(30.0f), Y(110.0f), NULL, 0, 0);// 125.714294f
MCMenu.AddOption(TheText.Get("FEM_YES"), X(-30.0f), Y(110.0f), TriggerMCSUM_Yes, 0, 0);// 125.714294f
MCMenu.SetColors(TITLE_TEXT_COLOR, TEXT_COLOR, TEXT_COLOR);
page.AddMenu(&MCMenu);
-
+
MCMenu.GoFirst();
-
+
page.SetShadows(true, TEXT_SHADOW_COLOR, SHADOW_VECTOR);
-
+
CTimer::Initialise();
CTimer::StartUserPause();
-
- while ( !bMemoryCardStartUpMenus_ExitNow )
+
+ while ( !bMemoryCardStartUpMenus_ExitNow )
{
#ifdef GTA_PC
HandleExit();
-
+
if(RsGlobal.quit)
return;
#endif
@@ -1953,7 +1953,7 @@ CMenuManager::DrawMemoryCardStartUpMenus()
page.GoUp();
if ( CPad::GetPad(0)->GetCrossJustDown() || CPad::GetPad(0)->GetEnterJustDown() || CPad::GetPad(0)->GetRightMouseJustDown() )
page.SelectCurrentOptionUnderCursor();
-
+
if ( CPad::GetPad(0)->GetCircleJustDown() || CPad::GetPad(0)->GetEscapeJustDown() )
;
#else
@@ -1970,15 +1970,15 @@ CMenuManager::DrawMemoryCardStartUpMenus()
if ( CPad::GetPad(0)->GetCircleJustDown() )
;
#endif
-
+
static int32 MemCardStatusWaiter = 0;
-
+
MemCardStatusWaiter++;
-
+
if ( MemCardStatusWaiter > 120 )
{
MemCardStatusWaiter = 0;
-
+
switch ( TheMemoryCard.CheckCardStateAtGameStartUp(CARD_ONE) )
{
case CMemoryCard::MCSTATE_NEED_200KB:
@@ -1987,21 +1987,21 @@ CMenuManager::DrawMemoryCardStartUpMenus()
MCMenu.AddTitle(TheText.Get("MCGNSP"), 0.0f, 0.0f, 0);
break;
}
-
+
case CMemoryCard::MCSTATE_NEED_500KB:
{
// There is insufficient space on the Memory Card (PS2) in MEMORY CARD slot 1. At least 500KB is needed to save this application data. Do you wish to start? (YES or NO)
MCMenu.AddTitle(TheText.Get("MCDNSP"), 0.0f, 0.0f, 0);
break;
}
-
+
case CMemoryCard::MCSTATE_NOCARD:
{
// There is no Memory Card (PS2) in MEMORY CARD slot 1. Do you wish to start? (YES or NO)
MCMenu.AddTitle(TheText.Get("MCSTNS"), 0.0f, 0.0f, 0);
break;
}
-
+
case CMemoryCard::MCSTATE_OK:
{
bMemoryCardStartUpMenus_ExitNow = true;
@@ -2009,17 +2009,17 @@ CMenuManager::DrawMemoryCardStartUpMenus()
}
}
}
-
+
DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255);
CFont::InitPerFrame();
-
+
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
CSprite2d *splash = LoadSplash("splash1");
splash->Draw(CRect(0.0f, 0.0f, SCRW, SCRH), BACKGROUND_SPLASH_COLOR);
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST);
-
+
SetRandomActiveTextlineColor(1);
-
+
CRGBA col(rgbaATC.r, rgbaATC.g, rgbaATC.b, 255);
CFont::SetFontStyle(FONT_BANK);
CFont::SetBackgroundOff();
@@ -2031,10 +2031,10 @@ CMenuManager::DrawMemoryCardStartUpMenus()
CFont::SetWrapx(SCRW-X(60.0f)); // 580.0f
CFont::SetCentreOn();
CFont::SetCentreSize(SCRW-X(120.0f)); // 520.0f
-
+
MCMenu.Draw(col, TITLE_TEXT_COLOR, 0.0f, 0.0f);
CFont::DrawFonts();
-
+
CFont::SetFontStyle(FONT_BANK);
CFont::SetScale(X(0.4f), Y(0.64f)); // 0.731429
CFont::SetPropOn();
@@ -2044,37 +2044,37 @@ CMenuManager::DrawMemoryCardStartUpMenus()
CFont::SetBackGroundOnlyTextOn();
CFont::SetWrapx(SCRW-X(60.0f)); // 580.0f
CFont::SetColor(TEXT_COLOR);
-
-
+
+
CPlaceableShText text;
text.SetPosition(X(240.0f), Y(378.0f), false); // 432.000000
text.SetColor(TEXT_COLOR);
text.m_text = TheText.Get("FEDS_SE"); // / button - SELECT
text.SetShadows(true, TEXT_SHADOW_COLOR, SHADOW_VECTOR);
text.Draw(0.0f, 0.0f);
-
+
CFont::DrawFonts();
DisplayWarningControllerMsg();
DoRWStuffEndOfFrame();
CPad::UpdatePads();
CTimer::Update();
}
-
+
CTimer::EndUserPause();
CTimer::Stop();
-
+
for ( int32 i = 0; i < 100; i++ )
{
#ifdef GTA_PC
HandleExit();
#endif
DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255);
-
+
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
CSprite2d *splash = LoadSplash("splash1");
splash->Draw(CRect(0.0f, 0.0f, SCRW, SCRH), BACKGROUND_SPLASH_COLOR);
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST);
-
+
DoRWStuffEndOfFrame();
}
}
@@ -2087,7 +2087,7 @@ CMenuManager::Process(void)
InitialiseMenusOnce();
m_bWantToRestart = false;
WorkOutMenuState(false);
-
+
if ( m_bMenuActive )
{
if ( !m_bInSaveZone )
@@ -2121,13 +2121,13 @@ CMenuManager::WorkOutMenuState(uint8 bExit)
#endif
bool bIsCreditsOrDraw = CCredits::AreCreditsDone() || m_bMenuActive;
bool bIsDemoOrDraw = m_bMenuActive || CGame::bDemoMode;
-
+
if ( (bIsStartPressed && bIsCreditsOrDraw) || bExit || (!bIsDemoOrDraw && CPad::IsNoOrObsolete()) )
{
if ( m_nStartPauseTimer == 0 && m_nEndPauseTimer == 0 )
{
m_bMenuActive = !m_bMenuActive;
-
+
if ( !m_bMenuActive )
{
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_STARTING, 0);
@@ -2135,38 +2135,38 @@ CMenuManager::WorkOutMenuState(uint8 bExit)
gMusicPlaying = false;
bMemoryCardSpecialZone = false;
bIgnoreTriangleButton = false;
-
+
m_bMenuActive = true;
-
+
m_nEndPauseTimer = CTimer::GetTimeInMillisecondsPauseMode() + 800;
-
+
if ( m_currentPage == PAGE_CONTROLS || m_currentPage == PAGE_BRIEFS || m_currentPage == PAGE_LOAD )
{
m_nSlidingDir = CGeneral::GetRandomNumber() & (SLIDE_MAX-1);
-
+
switch ( m_nSlidingDir ) //m_nSlidingDir &= ~1;
{
case SLIDE_TO_LEFT: m_nSlidingDir = SLIDE_TO_TOP; break;
case SLIDE_TO_RIGHT: m_nSlidingDir = SLIDE_TO_BOTTOM; break;
}
-
+
m_position.y = Y(500.0f); // 571.428589f;
}
}
else
{
DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND);
-
+
if ( DMAudio.GetRadioInCar() < 9 )
m_PrefsRadioStation = DMAudio.GetRadioInCar();
else
m_PrefsRadioStation = CGeneral::GetRandomNumber() % 9;
-
+
CTimer::StartUserPause();
CPad::StopPadsShaking();
m_nStartPauseTimer = CTimer::GetTimeInMillisecondsPauseMode() + 800;
m_nSlidingDir = CGeneral::GetRandomNumber() & (SLIDE_MAX-1);
-
+
switch ( m_nSlidingDir )
{
case SLIDE_TO_RIGHT: m_position.y = Y(612.5f); break;
@@ -2175,17 +2175,17 @@ CMenuManager::WorkOutMenuState(uint8 bExit)
case SLIDE_TO_TOP: m_position.y = Y(500.0f); break;
default: m_position.y = Y(500.0f); break;
}
-
+
if ( m_currentPage == PAGE_CONTROLS || m_currentPage == PAGE_BRIEFS )
{
m_nSlidingDir = CGeneral::GetRandomNumber() & (SLIDE_MAX-1);
-
+
switch ( m_nSlidingDir ) //m_nSlidingDir &= ~1;
{
case SLIDE_TO_LEFT: m_nSlidingDir = SLIDE_TO_TOP; break;
case SLIDE_TO_RIGHT: m_nSlidingDir = SLIDE_TO_BOTTOM; break;
}
-
+
m_position.y = Y(500.0f); //571.428589f
}
}
@@ -2201,29 +2201,29 @@ CMenuManager::WorkOutMenuState(uint8 bExit)
CTimer::StartUserPause();
pActiveMenuPage = &MenuPageSaveZone_SaveGame;
}
-
+
if ( m_pageState == PAGESTATE_NORMAL && gMusicPlaying )
{
DMAudio.StopFrontEndTrack();
gMusicPlaying = false;
}
-
+
if ( m_nChangePageTimer != 0 && CTimer::GetTimeInMillisecondsPauseMode() >= m_nChangePageTimer )
{
m_nChangePageTimer = 0;
pMenuSave = &MenuPage_SaveBasic;
m_currentPage = m_newPage;
}
-
+
if ( m_nPageLeftTimer != 0 && CTimer::GetTimeInMillisecondsPauseMode() >= m_nPageLeftTimer )
m_nPageLeftTimer = 0;
-
+
if ( m_nPageRightTimer != 0 && CTimer::GetTimeInMillisecondsPauseMode() >= m_nPageRightTimer )
m_nPageRightTimer = 0;
-
+
if ( m_nStartPauseTimer != 0 && CTimer::GetTimeInMillisecondsPauseMode() >= m_nStartPauseTimer )
m_nStartPauseTimer = 0;
-
+
if ( m_nEndPauseTimer != 0 && CTimer::GetTimeInMillisecondsPauseMode() >= m_nEndPauseTimer )
{
m_nEndPauseTimer = 0;
@@ -2242,7 +2242,7 @@ CMenuManager::ProcessControllerInput(void)
CPad::StopPadsShaking();
TimeToStopPadShaking = 0;
}
-
+
#ifdef GTA_PC
if ( CPad::GetPad(0)->GetDPadLeft() || CPad::GetPad(0)->GetLeft() )
#else
@@ -2254,7 +2254,7 @@ CMenuManager::ProcessControllerInput(void)
case PAGESTATE_NORMAL:
case PAGESTATE_HIGHLIGHTED:
break;
-
+
case PAGESTATE_SELECTED:
{
if ( pActiveMenuPage )
@@ -2275,7 +2275,7 @@ CMenuManager::ProcessControllerInput(void)
case PAGESTATE_NORMAL:
case PAGESTATE_HIGHLIGHTED:
break;
-
+
case PAGESTATE_SELECTED:
{
if ( pActiveMenuPage )
@@ -2284,21 +2284,21 @@ CMenuManager::ProcessControllerInput(void)
}
}
}
-
+
#ifdef GTA_PC
if ( CPad::GetPad(0)->GetDPadLeftJustDown() || CPad::GetPad(0)->GetLeftJustDown() )
#else
if ( CPad::GetPad(0)->GetDPadLeftJustDown() )
#endif
ProcessDPadLeftJustDown();
-
+
#ifdef GTA_PC
if ( CPad::GetPad(0)->GetDPadRightJustDown() || CPad::GetPad(0)->GetRightJustDown() )
#else
if ( CPad::GetPad(0)->GetDPadRightJustDown() )
#endif
ProcessDPadRightJustDown();
-
+
#ifdef GTA_PC
if ( CPad::GetPad(0)->GetDPadUp() || CPad::GetPad(0)->GetUp() )
#else
@@ -2316,10 +2316,10 @@ CMenuManager::ProcessControllerInput(void)
}
break;
}
-
+
case PAGESTATE_HIGHLIGHTED:
break;
-
+
case PAGESTATE_SELECTED:
{
if ( pActiveMenuPage )
@@ -2328,7 +2328,7 @@ CMenuManager::ProcessControllerInput(void)
}
}
}
-
+
#ifdef GTA_PC
if ( CPad::GetPad(0)->GetDPadDown() || CPad::GetPad(0)->GetDown() )
#else
@@ -2344,12 +2344,12 @@ CMenuManager::ProcessControllerInput(void)
if ( pActiveMenuPage )
pActiveMenuPage->GoDownStill();
}
-
+
break;
}
case PAGESTATE_HIGHLIGHTED:
break;
-
+
case PAGESTATE_SELECTED:
{
if ( pActiveMenuPage )
@@ -2358,21 +2358,21 @@ CMenuManager::ProcessControllerInput(void)
}
}
}
-
+
#ifdef GTA_PC
if ( CPad::GetPad(0)->GetDPadUpJustDown() || CPad::GetPad(0)->GetUpJustDown() )
#else
if ( CPad::GetPad(0)->GetDPadUpJustDown() )
#endif
ProcessDPadUpJustDown();
-
+
#ifdef GTA_PC
if ( CPad::GetPad(0)->GetDPadDownJustDown() || CPad::GetPad(0)->GetDownJustDown() )
#else
if ( CPad::GetPad(0)->GetDPadDownJustDown() )
#endif
ProcessDPadDownJustDown();
-
+
if ( CPad::GetPad(0)->GetLeftShoulder1JustDown() )
{
switch ( m_pageState )
@@ -2380,13 +2380,13 @@ CMenuManager::ProcessControllerInput(void)
case PAGESTATE_NORMAL:
ProcessDPadLeftJustDown();
break;
-
+
case PAGESTATE_HIGHLIGHTED:
case PAGESTATE_SELECTED:
break;
}
}
-
+
if ( CPad::GetPad(0)->GetRightShoulder1JustDown() )
{
switch ( m_pageState )
@@ -2394,20 +2394,20 @@ CMenuManager::ProcessControllerInput(void)
case PAGESTATE_NORMAL:
ProcessDPadRightJustDown();
break;
-
+
case PAGESTATE_HIGHLIGHTED:
case PAGESTATE_SELECTED:
break;
}
}
-
+
#ifdef GTA_PC
if ( CPad::GetPad(0)->GetCrossJustDown() || CPad::GetPad(0)->GetEnterJustDown() || CPad::GetPad(0)->GetRightMouseJustDown() )
#else
if ( CPad::GetPad(0)->GetCrossJustDown() )
#endif
ProcessDPadCrossJustDown();
-
+
#ifdef GTA_PC
if ( CPad::GetPad(0)->GetTriangleJustDown() || CPad::GetPad(0)->GetBackspaceJustDown() || (m_pageState != PAGESTATE_NORMAL && CPad::GetPad(0)->GetEscapeJustDown()) )
#else
@@ -2425,7 +2425,7 @@ CMenuManager::ProcessDPadLeftJustDown(void)
if ( pActiveMenuPage )
{
pActiveMenuPage->GoLeft();
-
+
if ( pActiveMenuPage->m_pCurrentControl == &MenuSaveZoneSSL_1 )
{
if ( MenuSaveZoneSSL_1.m_numOptions < 2 )
@@ -2448,7 +2448,7 @@ CMenuManager::ProcessDPadLeftJustDown(void)
if ( m_nChangePageTimer == 0 )
{
if ( --m_newPage < PAGE_FIRST ) m_newPage = PAGE_LAST;
-
+
m_nPageLeftTimer = CTimer::GetTimeInMillisecondsPauseMode() + 300;
m_nPageRightTimer = 0;
m_nChangePageTimer = CTimer::GetTimeInMillisecondsPauseMode() + 250;
@@ -2456,26 +2456,26 @@ CMenuManager::ProcessDPadLeftJustDown(void)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0);
}
}
-
+
break;
}
-
+
case PAGESTATE_HIGHLIGHTED:
{
if ( pActiveMenuPage )
pActiveMenuPage->GoLeftMenuOnPage();
-
+
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
-
+
break;
}
-
+
case PAGESTATE_SELECTED:
{
if ( pActiveMenuPage )
{
pActiveMenuPage->GoLeft();
-
+
if ( m_currentPage == PAGE_AUDIO)
{
if ( pActiveMenuPage->m_pCurrentControl == &MenuAudio_1 )
@@ -2512,7 +2512,7 @@ CMenuManager::ProcessDPadLeftJustDown(void)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
}
}
-
+
break;
}
}
@@ -2527,7 +2527,7 @@ CMenuManager::ProcessDPadRightJustDown(void)
if ( pActiveMenuPage )
{
pActiveMenuPage->GoRight();
-
+
if ( pActiveMenuPage->m_pCurrentControl == &MenuSaveZoneSSL_1 )
{
if ( MenuSaveZoneSSL_1.m_numOptions < 2 )
@@ -2550,7 +2550,7 @@ CMenuManager::ProcessDPadRightJustDown(void)
if ( m_nChangePageTimer == 0 )
{
if ( ++m_newPage > PAGE_LAST ) m_newPage = PAGE_FIRST;
-
+
m_nPageLeftTimer = 0;
m_nPageRightTimer = CTimer::GetTimeInMillisecondsPauseMode() + 300;
m_nChangePageTimer = CTimer::GetTimeInMillisecondsPauseMode() + 250;
@@ -2558,26 +2558,26 @@ CMenuManager::ProcessDPadRightJustDown(void)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0);
}
}
-
+
break;
}
-
+
case PAGESTATE_HIGHLIGHTED:
{
if ( pActiveMenuPage )
pActiveMenuPage->GoRightMenuOnPage();
-
+
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
-
+
break;
}
-
+
case PAGESTATE_SELECTED:
{
if ( pActiveMenuPage )
{
pActiveMenuPage->GoRight();
-
+
if ( m_currentPage == PAGE_AUDIO)
{
if ( pActiveMenuPage->m_pCurrentControl == &MenuAudio_1 )
@@ -2614,7 +2614,7 @@ CMenuManager::ProcessDPadRightJustDown(void)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
}
}
-
+
break;
}
}
@@ -2629,7 +2629,7 @@ CMenuManager::ProcessDPadUpJustDown(void)
if ( pActiveMenuPage )
{
pActiveMenuPage->GoUp();
-
+
if ( pActiveMenuPage->m_pCurrentControl == &MenuSaveZoneSSL_1 )
{
if ( MenuSaveZoneSSL_1.m_numOptions < 2 )
@@ -2647,22 +2647,22 @@ CMenuManager::ProcessDPadUpJustDown(void)
{
case PAGESTATE_NORMAL:
break;
-
+
case PAGESTATE_HIGHLIGHTED:
{
if ( pActiveMenuPage )
pActiveMenuPage->GoUpMenuOnPage();
-
+
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
break;
}
-
+
case PAGESTATE_SELECTED:
{
if ( pActiveMenuPage )
{
pActiveMenuPage->GoUp();
-
+
if ( pActiveMenuPage->m_pCurrentControl == &MenuSaveDG_2 )
{
if ( MenuSaveDG_2.m_numOptions < 2 )
@@ -2680,7 +2680,7 @@ CMenuManager::ProcessDPadUpJustDown(void)
else
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
}
-
+
break;
}
}
@@ -2695,7 +2695,7 @@ CMenuManager::ProcessDPadDownJustDown(void)
if ( pActiveMenuPage )
{
pActiveMenuPage->GoDown();
-
+
if ( pActiveMenuPage->m_pCurrentControl == &MenuSaveZoneSSL_1 )
{
if ( MenuSaveZoneSSL_1.m_numOptions < 2 )
@@ -2713,23 +2713,23 @@ CMenuManager::ProcessDPadDownJustDown(void)
{
case PAGESTATE_NORMAL:
break;
-
+
case PAGESTATE_HIGHLIGHTED:
{
if ( pActiveMenuPage )
pActiveMenuPage->GoDownMenuOnPage();
-
+
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
-
+
break;
}
-
+
case PAGESTATE_SELECTED:
{
if ( pActiveMenuPage )
{
pActiveMenuPage->GoDown();
-
+
if ( pActiveMenuPage->m_pCurrentControl == &MenuSaveDG_2 )
{
if ( MenuSaveDG_2.m_numOptions < 2 )
@@ -2759,7 +2759,7 @@ CMenuManager::ProcessDPadTriangleJustDown(void)
if ( pActiveMenuPage )
{
pActiveMenuPage->SelectDefaultCancelAction();
-
+
if ( m_bMenuActive || m_bInSaveZone )
{
if ( bIgnoreTriangleButton )
@@ -2776,12 +2776,12 @@ CMenuManager::ProcessDPadTriangleJustDown(void)
case PAGESTATE_NORMAL:
WorkOutMenuState(true);
break;
-
+
case PAGESTATE_HIGHLIGHTED:
m_pageState = PAGESTATE_NORMAL;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0);
break;
-
+
case PAGESTATE_SELECTED:
{
m_pageState = PAGESTATE_HIGHLIGHTED;
@@ -2810,12 +2810,12 @@ CMenuManager::ProcessDPadTriangleJustDown(void)
case PAGESTATE_NORMAL:
WorkOutMenuState(false);
break;
-
+
case PAGESTATE_HIGHLIGHTED:
m_pageState = PAGESTATE_NORMAL;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0);
break;
-
+
case PAGESTATE_SELECTED:
{
m_pageState = PAGESTATE_HIGHLIGHTED;
@@ -2843,7 +2843,7 @@ CMenuManager::ProcessDPadCrossJustDown(void)
{
if ( pActiveMenuPage )
pActiveMenuPage->SelectCurrentOptionUnderCursor();
-
+
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0);
}
else
@@ -2860,7 +2860,7 @@ CMenuManager::ProcessDPadCrossJustDown(void)
if ( pActiveMenuPage->m_numControls == 1 )
m_pageState = PAGESTATE_SELECTED;
}
-
+
switch ( m_currentPage )
{
case PAGE_AUDIO:
@@ -2884,11 +2884,11 @@ CMenuManager::ProcessDPadCrossJustDown(void)
break;
}
}
-
+
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0);
break;
}
-
+
case PAGESTATE_HIGHLIGHTED:
{
m_pageState = PAGESTATE_SELECTED;
@@ -2901,17 +2901,17 @@ CMenuManager::ProcessDPadCrossJustDown(void)
pActiveMenuPage->ActiveMenuTwoState_SelectNextPosition();
}
}
-
+
switch ( m_currentPage )
{
case PAGE_AUDIO:
{
if ( pActiveMenuPage->m_pCurrentControl != &MenuAudio_4 )
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0);
-
+
break;
}
-
+
default:
{
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0);
@@ -2922,13 +2922,13 @@ CMenuManager::ProcessDPadCrossJustDown(void)
}
break;
}
-
+
case PAGESTATE_SELECTED:
{
if ( pActiveMenuPage )
- {
+ {
pActiveMenuPage->SelectCurrentOptionUnderCursor();
-
+
switch ( m_currentPage )
{
case PAGE_AUDIO:
@@ -2937,17 +2937,17 @@ CMenuManager::ProcessDPadCrossJustDown(void)
m_pageState = PAGESTATE_HIGHLIGHTED;
break;
}
-
+
case PAGE_LOAD:
case PAGE_LANGUAGE:
break;
-
+
default:
m_pageState = PAGESTATE_HIGHLIGHTED;
break;
}
}
-
+
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0);
break;
}
@@ -2969,25 +2969,25 @@ CMenuManager::DoHackingMenusAtPageBrowse(void)
{
int32 sel = MenuControls_1.GetMenuSelection();
MenuControls_1.GoFirst();
-
+
for ( int32 i = 0; i < sel; i++ )
MenuControls_1.GoNext();
}
break;
}
-
+
case PAGE_AUDIO:
{
if ( pActiveMenuPage->m_pCurrentControl == &MenuAudio_3 )
{
int32 sel = MenuAudio_3.GetMenuSelection();
MenuAudio_3.GoFirst();
-
+
for ( int32 i = 0; i < sel; i++ )
MenuAudio_3.GoNext();
}
break;
- }
+ }
}
}
}
@@ -3004,7 +3004,7 @@ CMenuManager::FilterOutColorMarkersFromString(wchar *string, CRGBA &color)
{
wchar buf[300];
UnicodeStrcpy(buf, string);
-
+
wchar *src = buf;
wchar *dst = string;
while ( *src != '\0' )
@@ -3012,7 +3012,7 @@ CMenuManager::FilterOutColorMarkersFromString(wchar *string, CRGBA &color)
if ( *src == '~' )
{
src++;
-
+
if ( *src == 'l' ) color = CRGBA(0, 0, 0, 255);
else if ( *src == 'p' ) color = CRGBA(255, 0, 255, 255);
else if ( *src == 'y' ) color = CRGBA(255, 255, 0, 255);
@@ -3020,14 +3020,14 @@ CMenuManager::FilterOutColorMarkersFromString(wchar *string, CRGBA &color)
else if ( *src == 'b' ) color = CRGBA(40, 40, 255, 255);
else if ( *src == 'g' ) color = CRGBA(40, 235, 40, 255);
else if ( *src == 'r' ) color = CRGBA(255, 0, 0, 255);
-
+
while ( *src++ != '~' )
;
}
else
*dst++ = *src++;
}
-
+
*dst = '\0';
}
diff --git a/src/core/Frontend_PS2.h b/src/core/Frontend_PS2.h
index 950c1abd..2f226dc3 100644
--- a/src/core/Frontend_PS2.h
+++ b/src/core/Frontend_PS2.h
@@ -193,12 +193,7 @@ public:
static float fMapCenterX;
#endif
-#ifdef IMPROVED_VIDEOMODE
- //int32 m_nPrefsWidth = 1280 ;//640;
- //int32 m_nPrefsHeight = 960;//480;
- //int32 m_nPrefsWidth = 1024;
- //int32 m_nPrefsHeight = 768;
-
+#ifdef IMPROVED_VIDEOMODE
int32 m_nPrefsWidth = 640;
int32 m_nPrefsHeight = 480;
int32 m_nPrefsDepth = 32;
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index c10544f1..31289c73 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -113,7 +113,7 @@ void TankCheat()
int32 node = ThePaths.FindNodeClosestToCoors(FindPlayerCoors(), PATH_CAR, 100.0f);
if (node < 0) return;
-
+
#ifdef FIX_BUGS
CAutomobile* tank = new CAutomobile(MI_RHINO, RANDOM_VEHICLE);
#else
@@ -346,7 +346,7 @@ void AltDodoCheat(void)
bool
CControllerState::IsAnyButtonPressed(void)
{
- return !!RightStickX || !!RightStickY || !!LeftStickX || !!LeftStickY
+ return !!RightStickX || !!RightStickY || !!LeftStickX || !!LeftStickY
|| !!DPadUp || !!DPadDown || !!DPadLeft || !!DPadRight
|| !!Triangle || !!Cross || !!Circle || !!Square
|| !!Start || !!Select
@@ -369,24 +369,24 @@ CControllerState::Clear(void)
void CKeyboardState::Clear()
{
- for ( int32 i = 0; i < 12; i++ )
+ for ( int32 i = 0; i < 12; i++ )
F[i] = 0;
-
- for ( int32 i = 0; i < 256; i++ )
+
+ for ( int32 i = 0; i < 256; i++ )
VK_KEYS[i] = 0;
ESC = INS = DEL = HOME = END = PGUP = PGDN = 0;
-
+
UP = DOWN = LEFT = RIGHT = 0;
-
+
NUMLOCK = 0;
-
+
DIV = MUL = SUB = ADD = 0;
-
+
DECIMAL = NUM1 = NUM2 = NUM3 = NUM4 = 0;
-
+
NUM5 = NUM6 = NUM7 = NUM8 = 0;
-
+
NUM9 = NUM0 = SCROLLLOCK = PAUSE = 0;
BACKSP = TAB = CAPSLOCK = EXTENTER = 0;
@@ -401,19 +401,19 @@ void CPad::Initialise(void)
{
#ifdef GTA_PS2
scePadInit(0);
-
- scePadPortOpen(0, 0, pad_dma_buf );
- scePadPortOpen(1, 0, pad2_dma_buf );
+
+ scePadPortOpen(0, 0, pad_dma_buf );
+ scePadPortOpen(1, 0, pad2_dma_buf );
#endif
for (int i = 0; i < MAX_PADS; i++)
{
CPad::GetPad(i)->Clear(true);
CPad::GetPad(i)->Mode = 0;
}
-
- bObsoleteControllerMessage = false;
+
+ bObsoleteControllerMessage = false;
bOldDisplayNoControllerMessage = false;
- bDisplayNoControllerMessage = false;
+ bDisplayNoControllerMessage = false;
}
#endif
@@ -421,37 +421,37 @@ void CPad::Clear(bool bResetPlayerControls)
{
NewState.Clear();
OldState.Clear();
-
+
PCTempKeyState.Clear();
PCTempJoyState.Clear();
PCTempMouseState.Clear();
-
+
NewKeyState.Clear();
OldKeyState.Clear();
TempKeyState.Clear();
-
+
NewMouseControllerState.Clear();
OldMouseControllerState.Clear();
PCTempMouseControllerState.Clear();
-
+
Phase = 0;
ShakeFreq = 0;
ShakeDur = 0;
-
+
if ( bResetPlayerControls )
DisablePlayerControls = PLAYERCONTROL_ENABLED;
-
+
bApplyBrakes = false;
-
-
+
+
for ( int32 i = 0; i < HORNHISTORY_SIZE; i++ )
bHornHistory[i] = false;
-
+
iCurrHornHistory = 0;
-
+
for ( int32 i = 0; i < ARRAY_SIZE(CheatString); i++ )
CheatString[i] = ' ';
-
+
LastTimeTouched = CTimer::GetTimeInMilliseconds();
AverageWeapon = 0;
AverageEntries = 0;
@@ -473,7 +473,7 @@ CMouseControllerState::CMouseControllerState()
WHEELDN = 0;
MXB1 = 0;
MXB2 = 0;
-
+
x = 0.0f;
y = 0.0f;
}
@@ -492,16 +492,16 @@ void CMouseControllerState::Clear()
CMouseControllerState CMousePointerStateHelper::GetMouseSetUp()
{
CMouseControllerState state;
-
+
#if defined RW_D3D9 || defined RWLIBS
if ( PSGLOBAL(mouse) == nil )
_InputInitialiseMouse();
-
+
if ( PSGLOBAL(mouse) != nil )
{
DIDEVCAPS devCaps;
devCaps.dwSize = sizeof(DIDEVCAPS);
-
+
PSGLOBAL(mouse)->GetCapabilities(&devCaps);
switch ( devCaps.dwButtons )
{
@@ -512,14 +512,14 @@ CMouseControllerState CMousePointerStateHelper::GetMouseSetUp()
case 7:
case 8:
state.MMB = true;
-
+
case 2:
state.RMB = true;
-
+
case 1:
state.LMB = true;
}
-
+
if ( devCaps.dwAxes == 3 )
{
state.WHEELDN = true;
@@ -550,9 +550,9 @@ void CPad::UpdateMouse()
#if defined RW_D3D9 || defined RWLIBS
if ( PSGLOBAL(mouse) == nil )
_InputInitialiseMouse();
-
+
DIMOUSESTATE2 state;
-
+
if ( PSGLOBAL(mouse) != nil && SUCCEEDED(_InputGetMouseState(&state)) )
{
int32 signX = 1;
@@ -565,9 +565,9 @@ void CPad::UpdateMouse()
if ( MousePointerStateHelper.bInvertHorizontally )
signX = -1;
}
-
+
PCTempMouseControllerState.Clear();
-
+
PCTempMouseControllerState.x = (float)(signX * state.lX);
PCTempMouseControllerState.y = (float)(signy * state.lY);
PCTempMouseControllerState.LMB = state.rgbButtons[0] & 128;
@@ -575,12 +575,12 @@ void CPad::UpdateMouse()
PCTempMouseControllerState.MMB = state.rgbButtons[2] & 128;
PCTempMouseControllerState.MXB1 = state.rgbButtons[3] & 128;
PCTempMouseControllerState.MXB2 = state.rgbButtons[4] & 128;
-
+
if ( state.lZ > 0 )
PCTempMouseControllerState.WHEELUP = 1;
else if ( state.lZ < 0 )
PCTempMouseControllerState.WHEELDN = 1;
-
+
OldMouseControllerState = NewMouseControllerState;
NewMouseControllerState = PCTempMouseControllerState;
}
@@ -629,12 +629,12 @@ void CPad::UpdateMouse()
CControllerState CPad::ReconcileTwoControllersInput(CControllerState const &State1, CControllerState const &State2)
{
static CControllerState ReconState;
-
+
ReconState.Clear();
#define _RECONCILE_BUTTON(button) \
{ if ( State1.button || State2.button ) ReconState.button = 255; }
-
+
#define _RECONCILE_AXIS_POSITIVE(axis) \
{ if ( State1.axis >= 0 && State2.axis >= 0 ) ReconState.axis = Max(State1.axis, State2.axis); }
@@ -643,10 +643,10 @@ CControllerState CPad::ReconcileTwoControllersInput(CControllerState const &Stat
#define _RECONCILE_AXIS(axis) \
{ _RECONCILE_AXIS_POSITIVE(axis); _RECONCILE_AXIS_NEGATIVE(axis); }
-
+
#define _FIX_AXIS_DIR(axis) \
{ if ( State1.axis > 0 && State2.axis < 0 || State1.axis < 0 && State2.axis > 0 ) ReconState.axis = 0; }
-
+
#define _FIX_RECON_DIR(pos, neg, axis) \
{ if ( (ReconState.pos || ReconState.axis < 0) && (ReconState.neg || ReconState.axis > 0) ) { ReconState.pos = 0; ReconState.neg = 0; ReconState.axis = 0; } }
@@ -679,7 +679,7 @@ CControllerState CPad::ReconcileTwoControllersInput(CControllerState const &Stat
_FIX_RECON_DIR(DPadLeft, DPadRight, LeftStickX);
return ReconState;
-
+
#undef _RECONCILE_BUTTON
#undef _RECONCILE_AXIS_POSITIVE
#undef _RECONCILE_AXIS_NEGATIVE
@@ -692,17 +692,17 @@ void CPad::StartShake(int16 nDur, uint8 nFreq)
{
if ( !CMenuManager::m_PrefsUseVibration )
return;
-
+
if ( CCutsceneMgr::IsRunning() || CGame::playingIntro )
return;
-
+
if ( nFreq == 0 )
{
ShakeDur = 0;
ShakeFreq = 0;
return;
}
-
+
if ( nDur > ShakeDur )
{
ShakeDur = nDur;
@@ -714,12 +714,12 @@ void CPad::StartShake_Distance(int16 nDur, uint8 nFreq, float fX, float fY, floa
{
if ( !CMenuManager::m_PrefsUseVibration )
return;
-
+
if ( CCutsceneMgr::IsRunning() || CGame::playingIntro )
return;
-
+
float fDist = ( TheCamera.GetPosition() - CVector(fX, fY, fZ) ).Magnitude();
-
+
if ( fDist < 70.0f )
{
if ( nFreq == 0 )
@@ -728,7 +728,7 @@ void CPad::StartShake_Distance(int16 nDur, uint8 nFreq, float fX, float fY, floa
ShakeFreq = 0;
return;
}
-
+
if ( nDur > ShakeDur )
{
ShakeDur = nDur;
@@ -741,15 +741,15 @@ void CPad::StartShake_Train(float fX, float fY)
{
if ( !CMenuManager::m_PrefsUseVibration )
return;
-
+
if ( CCutsceneMgr::IsRunning() || CGame::playingIntro )
return;
-
+
if (FindPlayerVehicle() != nil && FindPlayerVehicle()->IsTrain() )
return;
-
+
float fDist = ( TheCamera.GetPosition() - CVector(fX, fY, 0.0f) ).Magnitude2D();
-
+
if ( fDist < 70.0f )
{
int32 freq = (int32)((70.0f - fDist) * 70.0f / 70.0f + 30.0f);
@@ -767,10 +767,10 @@ void CPad::AddToCheatString(char c)
{
for ( int32 i = ARRAY_SIZE(CheatString) - 2; i >= 0; i-- )
CheatString[i + 1] = CheatString[i];
-
+
CheatString[0] = c;
-#define _CHEATCMP(str) strncmp(str, CheatString, sizeof(str)-1)
+#define _CHEATCMP(str) strncmp(str, CheatString, sizeof(str)-1)
// "4414LDRULDRU" - R2 R2 L1 R2 LEFT DOWN RIGHT UP LEFT DOWN RIGHT UP
if ( !_CHEATCMP("URDLURDL4144") )
WeaponCheat();
@@ -778,11 +778,11 @@ void CPad::AddToCheatString(char c)
// "4411LDRULDRU" - R2 R2 L1 L1 LEFT DOWN RIGHT UP LEFT DOWN RIGHT UP
else if ( !_CHEATCMP("URDLURDL1144") )
MoneyCheat();
-
+
// "4412LDRULDRU" - R2 R2 L1 L2 LEFT DOWN RIGHT UP LEFT DOWN RIGHT UP
else if ( !_CHEATCMP("URDLURDL2144") )
ArmourCheat();
-
+
// "4413LDRULDRU" - R2 R2 L1 R1 LEFT DOWN RIGHT UP LEFT DOWN RIGHT UP
else if ( !_CHEATCMP("URDLURDL3144") )
HealthCheat();
@@ -790,59 +790,59 @@ void CPad::AddToCheatString(char c)
// "4414LRLRLR" - R2 R2 L1 R2 LEFT RIGHT LEFT RIGHT LEFT RIGHT
else if ( !_CHEATCMP("RLRLRL4144") )
WantedLevelUpCheat();
-
+
// "4414UDUDUD" - R2 R2 L1 R2 UP DOWN UP DOWN UP DOWN
else if ( !_CHEATCMP("DUDUDU4144") )
WantedLevelDownCheat();
-
+
// "1234432T" - L1 L2 R1 R2 R2 R1 L2 TRIANGLE
else if ( !_CHEATCMP("T2344321") )
SunnyWeatherCheat();
-
+
// "1234432S" - L1 L2 R1 R2 R2 R1 L2 SQUARE
else if ( !_CHEATCMP("S2344321") )
CloudyWeatherCheat();
-
+
// "1234432C" - L1 L2 R1 R2 R2 R1 L2 CIRCLE
else if ( !_CHEATCMP("C2344321") )
RainyWeatherCheat();
-
+
// "1234432X" - L1 L2 R1 R2 R2 R1 L2 CROSS
else if ( !_CHEATCMP("X2344321") )
FoggyWeatherCheat();
-
+
// "CCCCCC321TCT" - CIRCLE CIRCLE CIRCLE CIRCLE CIRCLE CIRCLE R1 L2 L1 TRIANGLE CIRCLE TRIANGLE
else if ( !_CHEATCMP("TCT123CCCCCC") )
TankCheat();
-
+
// "CCCSSSSS1TCT" - CIRCLE CIRCLE CIRCLE SQUARE SQUARE SQUARE SQUARE SQUARE L1 TRIANGLE CIRCLE TRIANGLE
else if ( !_CHEATCMP("TCT1SSSSSCCC") )
FastWeatherCheat();
-
+
// "241324TSCT21" - L2 R2 L1 R1 L2 R2 TRIANGLE SQUARE CIRCLE TRIANGLE L2 L1
else if ( !_CHEATCMP("12TCST423142") )
BlowUpCarsCheat();
-
+
// "RDLU12ULDR" - RIGHT DOWN LEFT UP L1 L2 UP LEFT DOWN RIGHT
else if ( !_CHEATCMP("RDLU21ULDR") )
ChangePlayerCheat();
-
+
// "DULUX3421" - DOWN UP LEFT UP CROSS R1 R2 L2 L1
else if ( !_CHEATCMP("1243XULUD") )
MayhemCheat();
-
+
// "DULUX3412" - DOWN UP LEFT UP CROSS R1 R2 L1 L2
else if ( !_CHEATCMP("2143XULUD") )
EverybodyAttacksPlayerCheat();
-
+
// "43TX21UD" - R2 R1 TRIANGLE CROSS L2 L1 UP DOWN
else if ( !_CHEATCMP("DU12XT34") )
WeaponsForAllCheat();
-
+
// "TURDS12" - TRIANGLE UP RIGHT DOWN SQUARE L1 L2
else if ( !_CHEATCMP("21SDRUT") )
FastTimeCheat();
-
+
// "TURDS34" - TRIANGLE UP RIGHT DOWN SQUARE R1 R2
else if ( !_CHEATCMP("43SDRUT") )
SlowTimeCheat();
@@ -850,15 +850,15 @@ void CPad::AddToCheatString(char c)
// "11S4T1T" - L1 L1 SQUARE R2 TRIANGLE L1 TRIANGLE
else if ( !_CHEATCMP("T1T4S11") )
OnlyRenderWheelsCheat();
-
+
// "R4C32D13" - RIGHT R2 CIRCLE R1 L2 DOWN L1 R1
else if ( !_CHEATCMP("31D23C4R") )
ChittyChittyBangBangCheat();
-
+
// "3141L33T" - R1 L1 R2 L1 LEFT R1 R1 TRIANGLE
else if ( !_CHEATCMP("T33L1413") )
StrongGripCheat();
-
+
// "S1CD13TR1X" - SQUARE L1 CIRCLE DOWN L1 R1 TRIANGLE RIGHT L1 CROSS
else if ( !_CHEATCMP("X1RT31DC1S") )
NastyLimbsCheat();
@@ -870,11 +870,11 @@ void CPad::AddToPCCheatString(char c)
{
for ( int32 i = ARRAY_SIZE(KeyBoardCheatString) - 2; i >= 0; i-- )
KeyBoardCheatString[i + 1] = KeyBoardCheatString[i];
-
+
KeyBoardCheatString[0] = c;
-
+
#define _CHEATCMP(str) strncmp(str, KeyBoardCheatString, sizeof(str)-1)
-
+
// "GUNSGUNSGUNS"
if ( !_CHEATCMP("SNUGSNUGSNUG") )
WeaponCheat();
@@ -882,93 +882,93 @@ void CPad::AddToPCCheatString(char c)
// "IFIWEREARICHMAN"
if ( !_CHEATCMP("NAMHCIRAEREWIFI") )
MoneyCheat();
-
+
// "GESUNDHEIT"
if ( !_CHEATCMP("TIEHDNUSEG") )
HealthCheat();
-
+
// "MOREPOLICEPLEASE"
if ( !_CHEATCMP("ESAELPECILOPEROM") )
WantedLevelUpCheat();
-
+
// "NOPOLICEPLEASE"
if ( !_CHEATCMP("ESAELPECILOPON") )
WantedLevelDownCheat();
-
+
// "GIVEUSATANK"
if ( !_CHEATCMP("KNATASUEVIG") )
TankCheat();
-
+
// "BANGBANGBANG"
if ( !_CHEATCMP("GNABGNABGNAB") )
BlowUpCarsCheat();
-
+
// "ILIKEDRESSINGUP"
if ( !_CHEATCMP("PUGNISSERDEKILI") )
ChangePlayerCheat();
-
+
// "ITSALLGOINGMAAAD"
if ( !_CHEATCMP("DAAAMGNIOGLLASTI") )
MayhemCheat();
-
+
// "NOBODYLIKESME"
if ( !_CHEATCMP("EMSEKILYDOBON") )
EverybodyAttacksPlayerCheat();
-
+
// "WEAPONSFORALL"
if ( !_CHEATCMP("LLAROFSNOPAEW") )
WeaponsForAllCheat();
-
+
// "TIMEFLIESWHENYOU"
if ( !_CHEATCMP("UOYNEHWSEILFEMIT") )
FastTimeCheat();
-
+
// "BOOOOORING"
if ( !_CHEATCMP("GNIROOOOOB") )
SlowTimeCheat();
-
+
#ifndef GTA3_1_1_PATCH
// "TURTOISE"
if ( !_CHEATCMP("ESIOTRUT") )
ArmourCheat();
-#else
+#else
// "TORTOISE"
if ( !_CHEATCMP("ESIOTROT") )
ArmourCheat();
#endif
-
+
// "SKINCANCERFORME"
if ( !_CHEATCMP("EMROFRECNACNIKS") )
SunnyWeatherCheat();
-
+
// "ILIKESCOTLAND"
if ( !_CHEATCMP("DNALTOCSEKILI") )
CloudyWeatherCheat();
-
+
// "ILOVESCOTLAND"
if ( !_CHEATCMP("DNALTOCSEVOLI") )
RainyWeatherCheat();
-
+
// "PEASOUP"
if ( !_CHEATCMP("PUOSAEP") )
FoggyWeatherCheat();
-
+
// "MADWEATHER"
if ( !_CHEATCMP("REHTAEWDAM") )
FastWeatherCheat();
-
+
// "ANICESETOFWHEELS"
if ( !_CHEATCMP("SLEEHWFOTESECINA") )
OnlyRenderWheelsCheat();
-
+
// "CHITTYCHITTYBB"
if ( !_CHEATCMP("BBYTTIHCYTTIHC") )
ChittyChittyBangBangCheat();
-
+
// "CORNERSLIKEMAD"
if ( !_CHEATCMP("DAMEKILSRENROC") )
StrongGripCheat();
-
+
// "NASTYLIMBSCHEAT"
if ( !_CHEATCMP("TAEHCSBMILYTSAN") )
NastyLimbsCheat();
@@ -996,7 +996,7 @@ void CPad::AddToPCCheatString(char c)
if (!_CHEATCMP("ODODRETSAMOTTNAWI"))
AltDodoCheat();
#endif
-
+
#undef _CHEATCMP
}
@@ -1047,7 +1047,7 @@ void CPad::AffectFromXinput(uint32 pad)
uint16 iLeftMotor = (uint16)((float)ShakeFreq / 255.0f * (float)0xffff);
uint16 iRightMotor = (uint16)((float)ShakeFreq / 255.0f * (float)0xffff);
-
+
if (ShakeDur < CTimer::GetTimeStepInMilliseconds())
ShakeDur = 0;
else
@@ -1062,10 +1062,10 @@ void CPad::AffectFromXinput(uint32 pad)
}
#endif
-void CPad::UpdatePads(void)
+void CPad::UpdatePads(void)
{
bool bUpdate = true;
-
+
GetPad(0)->UpdateMouse();
#ifdef XINPUT
GetPad(0)->AffectFromXinput(0);
@@ -1087,10 +1087,10 @@ void CPad::UpdatePads(void)
if (IsAffectedByController && (GetPad(0)->PCTempKeyState.IsAnyButtonPressed() || GetPad(0)->PCTempMouseState.IsAnyButtonPressed()))
IsAffectedByController = false;
#endif
-
+
if ( CReplay::IsPlayingBackFromFile() )
bUpdate = false;
-
+
if ( bUpdate )
{
GetPad(0)->Update(0);
@@ -1101,7 +1101,7 @@ void CPad::UpdatePads(void)
GetPad(1)->NewState.Clear();
GetPad(1)->OldState.Clear();
#endif
-
+
OldKeyState = NewKeyState;
NewKeyState = TempKeyState;
}
@@ -1117,7 +1117,7 @@ void CPad::Update(int16 pad)
#ifdef GTA_PS2
bObsoleteControllerMessage = false;
-
+
//int iPressureBtn;
int id;
int ext_id=0;
@@ -1125,20 +1125,20 @@ void CPad::Update(int16 pad)
int rterm_id = 0;
unsigned short paddata, tpad;
unsigned char rdata[32];
-
+
state = scePadGetState(pad, 0);
-
+
switch(Phase)
- {
- case 0:
- if (state != scePadStateStable && state != scePadStateFindCTP1)
+ {
+ case 0:
+ if (state != scePadStateStable && state != scePadStateFindCTP1)
break;
id = scePadInfoMode(pad, 0, InfoModeCurID, 0);
- if (id==0) break;
-
+ if (id==0) break;
+
ext_id = scePadInfoMode(pad, 0, InfoModeCurExID, 0);
if (ext_id>0) id = ext_id;
-
+
switch(id)
{
case 4: // Digital controller
@@ -1154,57 +1154,57 @@ void CPad::Update(int16 pad)
break;
// Analog Controller (old dualshock)
- case 40: // Analog Contoller check valid (otherwise fail phase)
+ case 40: // Analog Contoller check valid (otherwise fail phase)
if (scePadInfoMode(pad, 0, InfoModeIdTable, -1)==0)
{
Phase = 99;
break;
}
Phase++;
-
- case 41: // Analog controller: Request Lock analog mode (asynchronous)
+
+ case 41: // Analog controller: Request Lock analog mode (asynchronous)
if (scePadSetMainMode(pad, 0, 1, 3)==1) Phase++;
break;
-
- case 42: // Analog controller: Check state of previous request
+
+ case 42: // Analog controller: Check state of previous request
if (scePadGetReqState(pad, 0)==scePadReqStateFaild)
{
Phase--;
}
if (scePadGetReqState(pad, 0)==scePadReqStateComplete)
- {
+ {
// Lock mode complete
Phase=0; // Accept normal dualshock
}
break;
-
- // DualShock 2 Controller
- case 50: // Analog Contoller check valid (otherwise fail phase)
+
+ // DualShock 2 Controller
+ case 50: // Analog Contoller check valid (otherwise fail phase)
if (scePadInfoMode(pad, 0, InfoModeIdTable, -1)==0)
{
Phase = 99;
break;
}
Phase++;
-
- case 51: // Analog controller: Request Lock analog mode (asynchronous)
+
+ case 51: // Analog controller: Request Lock analog mode (asynchronous)
if (scePadSetMainMode(pad, 0, 1, 3)==1) Phase++;
break;
-
- case 52: // Analog controller: Check state of previous request
+
+ case 52: // Analog controller: Check state of previous request
if (scePadGetReqState(pad, 0)==scePadReqStateFaild)
{
Phase--;
}
if (scePadGetReqState(pad, 0)==scePadReqStateComplete)
- {
+ {
// Lock mode complete
Phase=0; // Accept normal dualshock
}
break;
-
+
case 70: // DualShock 2 check pressure sensitive possible
if (scePadInfoPressMode(pad, 0)==1)
{
@@ -1213,11 +1213,11 @@ void CPad::Update(int16 pad)
}
Phase = 99;
break;
-
+
case 76: // DualShock2 enable pressure sensitive mode (asynchronous function)
if (scePadEnterPressMode(pad, 0)==1) Phase++;
break;
-
+
case 77: // Dualshock2 check status of request pressure sensitive mode
if (scePadGetReqState(pad, 0)==scePadReqStateFaild) Phase--;
if (scePadGetReqState(pad, 0)==scePadReqStateComplete)
@@ -1225,45 +1225,45 @@ void CPad::Update(int16 pad)
Phase=80;
}
break;
-
- // DualShock 2 Controller
- case 80: // Set motors
+
+ // DualShock 2 Controller
+ case 80: // Set motors
if (scePadInfoAct(pad, 0, -1, 0)==0)
{
Phase = 99;
}
-
+
act_align[0] = 0; // Offset 0 for motor0
act_align[1] = 1; // Offset 1 for motor1
-
+
act_align[2] = 0xff;
act_align[3] = 0xff;
act_align[4] = 0xff;
act_align[5] = 0xff;
-
+
// Asynchronous function
if (scePadSetActAlign(pad, 0, act_align)==0) break;
Phase++;
break;
-
-
- case 81:
+
+
+ case 81:
if ( scePadGetState(pad, 0) != scePadStateExecCmd )
{
Phase = 99;
}
-
+
break;
-
+
default:
if ( state == scePadStateError ) break;
-
+
if ( state == scePadStateStable || state == scePadStateFindCTP1 )
{
if ( ShakeDur )
{
ShakeDur = Max(ShakeDur - CTimer::GetTimeStepInMilliseconds(), 0);
-
+
if ( ShakeDur == 0 )
{
act_direct[0] = 0;
@@ -1277,53 +1277,53 @@ void CPad::Update(int16 pad)
scePadSetActDirect(pad, 0, act_direct);
}
}
-
+
if (scePadRead( pad, 0, rdata )==0)
{
NewState.Clear();
break;
}
-
+
if ((rdata[0] == 0))
{
paddata = (unsigned short) ( 0xffff ^ ((rdata[2]<<8)|rdata[3]) );
rterm_id = (rdata[1]);
-
+
if ( (rterm_id>>4) == 7 ) // DUALSHOCK
{
if (!CRecordDataForGame::IsPlayingBack() && !CRecordDataForChase::ShouldThisPadBeLeftAlone(pad))
{
tpad = paddata;
-
- NewState.DPadUp = ( tpad & SCE_PADLup ) ? 255 : 0;
- NewState.DPadDown = ( tpad & SCE_PADLdown ) ? 255 : 0;
- NewState.DPadLeft = ( tpad & SCE_PADLleft ) ? 255 : 0;
- NewState.DPadRight = ( tpad & SCE_PADLright ) ? 255 : 0;
- NewState.Triangle = ( tpad & SCE_PADRup ) ? 255 : 0;
- NewState.Cross = ( tpad & SCE_PADRdown ) ? 255 : 0;
- NewState.Square = ( tpad & SCE_PADRleft ) ? 255 : 0;
- NewState.Circle = ( tpad & SCE_PADRright ) ? 255 : 0;
- NewState.Start = ( tpad & SCE_PADstart ) ? 255 : 0;
- NewState.Select = ( tpad & SCE_PADselect ) ? 255 : 0;
- NewState.LeftShoulder1 = ( tpad & SCE_PADL1 ) ? 255 : 0;
- NewState.LeftShoulder2 = ( tpad & SCE_PADL2 ) ? 255 : 0;
- NewState.RightShoulder1 = ( tpad & SCE_PADR1 ) ? 255 : 0;
- NewState.RightShoulder2 = ( tpad & SCE_PADR2 ) ? 255 : 0;
- NewState.LeftShock = ( tpad & SCE_PADi ) ? 255 : 0;
- NewState.RightShock = ( tpad & SCE_PADj ) ? 255 : 0;
- NewState.RightStickX = (short)rdata[4];
- NewState.RightStickY = (short)rdata[5];
- NewState.LeftStickX = (short)rdata[6];
- NewState.LeftStickY = (short)rdata[7];
-
+
+ NewState.DPadUp = ( tpad & SCE_PADLup ) ? 255 : 0;
+ NewState.DPadDown = ( tpad & SCE_PADLdown ) ? 255 : 0;
+ NewState.DPadLeft = ( tpad & SCE_PADLleft ) ? 255 : 0;
+ NewState.DPadRight = ( tpad & SCE_PADLright ) ? 255 : 0;
+ NewState.Triangle = ( tpad & SCE_PADRup ) ? 255 : 0;
+ NewState.Cross = ( tpad & SCE_PADRdown ) ? 255 : 0;
+ NewState.Square = ( tpad & SCE_PADRleft ) ? 255 : 0;
+ NewState.Circle = ( tpad & SCE_PADRright ) ? 255 : 0;
+ NewState.Start = ( tpad & SCE_PADstart ) ? 255 : 0;
+ NewState.Select = ( tpad & SCE_PADselect ) ? 255 : 0;
+ NewState.LeftShoulder1 = ( tpad & SCE_PADL1 ) ? 255 : 0;
+ NewState.LeftShoulder2 = ( tpad & SCE_PADL2 ) ? 255 : 0;
+ NewState.RightShoulder1 = ( tpad & SCE_PADR1 ) ? 255 : 0;
+ NewState.RightShoulder2 = ( tpad & SCE_PADR2 ) ? 255 : 0;
+ NewState.LeftShock = ( tpad & SCE_PADi ) ? 255 : 0;
+ NewState.RightShock = ( tpad & SCE_PADj ) ? 255 : 0;
+ NewState.RightStickX = (short)rdata[4];
+ NewState.RightStickY = (short)rdata[5];
+ NewState.LeftStickX = (short)rdata[6];
+ NewState.LeftStickY = (short)rdata[7];
+
#define CLAMP_AXIS(x) (((x) < 43 && (x) >= -42) ? 0 : (((x) > 0) ? (Max((x)-42, 0)*127/85) : Min((x)+42, 0)*127/85))
#define FIX_AXIS(x) CLAMP_AXIS((x)-128)
-
+
NewState.RightStickX = FIX_AXIS(NewState.RightStickX);
NewState.RightStickY = FIX_AXIS(NewState.RightStickY);
- NewState.LeftStickX = FIX_AXIS(NewState.LeftStickX);
- NewState.LeftStickY = FIX_AXIS(NewState.LeftStickY);
-
+ NewState.LeftStickX = FIX_AXIS(NewState.LeftStickX);
+ NewState.LeftStickY = FIX_AXIS(NewState.LeftStickY);
+
#undef FIX_AXIS
#undef CLAMP_AXIS
}
@@ -1334,13 +1334,13 @@ void CPad::Update(int16 pad)
bObsoleteControllerMessage = true;
NewState.Clear();
}
-
+
if ( NewState.IsAnyButtonPressed() )
LastTimeTouched = CTimer::GetTimeInMilliseconds();
-
+
break;
}
-
+
if ( ++iCurrHornHistory >= HORNHISTORY_SIZE )
iCurrHornHistory = 0;
@@ -1349,8 +1349,8 @@ void CPad::Update(int16 pad)
return;
}
break;
- }
-
+ }
+
if ( pad == 0 )
{
bOldDisplayNoControllerMessage = bDisplayNoControllerMessage;
@@ -1362,7 +1362,7 @@ void CPad::Update(int16 pad)
else
bDisplayNoControllerMessage = false;
}
-
+
if ( ++iCurrHornHistory >= HORNHISTORY_SIZE )
iCurrHornHistory = 0;
@@ -1371,7 +1371,7 @@ void CPad::Update(int16 pad)
if ( !bDisplayNoControllerMessage )
CGame::bDemoMode = false;
#endif
-
+
#if (defined GTA_PS2 || defined FIX_BUGS)
if (!CRecordDataForGame::IsPlayingBack() && !CRecordDataForChase::ShouldThisPadBeLeftAlone(pad))
#endif
@@ -1383,9 +1383,9 @@ void CPad::Update(int16 pad)
PCTempJoyState.Clear();
PCTempKeyState.Clear();
PCTempMouseState.Clear();
-
+
ProcessPCSpecificStuff();
-
+
if ( ++iCurrHornHistory >= HORNHISTORY_SIZE )
iCurrHornHistory = 0;
@@ -1409,37 +1409,37 @@ void CPad::DoCheats(int16 unk)
#ifdef GTA_PS2_STUFF
if ( GetTriangleJustDown() )
AddToCheatString('T');
-
+
if ( GetCircleJustDown() )
AddToCheatString('C');
-
+
if ( GetCrossJustDown() )
AddToCheatString('X');
-
+
if ( GetSquareJustDown() )
AddToCheatString('S');
-
+
if ( GetDPadUpJustDown() )
AddToCheatString('U');
-
+
if ( GetDPadDownJustDown() )
AddToCheatString('D');
-
+
if ( GetDPadLeftJustDown() )
AddToCheatString('L');
-
+
if ( GetDPadRightJustDown() )
AddToCheatString('R');
-
+
if ( GetLeftShoulder1JustDown() )
AddToCheatString('1');
-
+
if ( GetLeftShoulder2JustDown() )
AddToCheatString('2');
-
+
if ( GetRightShoulder1JustDown() )
AddToCheatString('3');
-
+
if ( GetRightShoulder2JustDown() )
AddToCheatString('4');
#endif
@@ -1455,7 +1455,7 @@ void CPad::StopShaking(int16 pad)
#ifdef GTA_PS2_STUFF
ShakeFreq = 0;
ShakeDur = 0;
-
+
#ifdef GTA_PS2
if ( Phase == 99 )
{
@@ -1464,7 +1464,7 @@ void CPad::StopShaking(int16 pad)
scePadSetActDirect(pad, 0, act_direct);
}
#endif
-
+
#endif
}
@@ -1491,15 +1491,15 @@ int16 CPad::GetSteeringLeftRight(void)
{
int16 axis = NewState.LeftStickX;
int16 dpad = (NewState.DPadRight - NewState.DPadLeft) / 2;
-
+
if ( Abs(axis) > Abs(dpad) )
return axis;
else
return dpad;
-
+
break;
}
-
+
case 1:
case 3:
{
@@ -1508,7 +1508,7 @@ int16 CPad::GetSteeringLeftRight(void)
break;
}
}
-
+
return 0;
}
@@ -1524,15 +1524,15 @@ int16 CPad::GetSteeringUpDown(void)
{
int16 axis = NewState.LeftStickY;
int16 dpad = (NewState.DPadUp - NewState.DPadDown) / 2;
-
+
if ( Abs(axis) > Abs(dpad) )
return axis;
else
return dpad;
-
+
break;
}
-
+
case 1:
case 3:
{
@@ -1541,7 +1541,7 @@ int16 CPad::GetSteeringUpDown(void)
break;
}
}
-
+
return 0;
}
@@ -1557,18 +1557,18 @@ int16 CPad::GetCarGunUpDown(void)
case 2:
{
return NewState.RightStickY;
-
+
break;
}
-
+
case 3:
{
return (NewState.DPadUp - NewState.DPadDown) / 2;
-
+
break;
}
}
-
+
return 0;
}
@@ -1584,18 +1584,18 @@ int16 CPad::GetCarGunLeftRight(void)
case 2:
{
return NewState.RightStickX;
-
+
break;
}
-
+
case 3:
{
return (NewState.DPadRight - NewState.DPadLeft) / 2;
-
+
break;
}
}
-
+
return 0;
}
@@ -1611,15 +1611,15 @@ int16 CPad::GetPedWalkLeftRight(void)
{
int16 axis = NewState.LeftStickX;
int16 dpad = (NewState.DPadRight - NewState.DPadLeft) / 2;
-
+
if ( Abs(axis) > Abs(dpad) )
return axis;
else
return dpad;
-
+
break;
}
-
+
case 1:
case 3:
{
@@ -1628,7 +1628,7 @@ int16 CPad::GetPedWalkLeftRight(void)
break;
}
}
-
+
return 0;
}
@@ -1645,15 +1645,15 @@ int16 CPad::GetPedWalkUpDown(void)
{
int16 axis = NewState.LeftStickY;
int16 dpad = (NewState.DPadDown - NewState.DPadUp) / 2;
-
+
if ( Abs(axis) > Abs(dpad) )
return axis;
else
return dpad;
-
+
break;
}
-
+
case 1:
case 3:
{
@@ -1662,7 +1662,7 @@ int16 CPad::GetPedWalkUpDown(void)
break;
}
}
-
+
return 0;
}
@@ -1675,15 +1675,15 @@ int16 CPad::GetAnalogueUpDown(void)
{
int16 axis = NewState.LeftStickY;
int16 dpad = (NewState.DPadDown - NewState.DPadUp) / 2;
-
+
if ( Abs(axis) > Abs(dpad) )
return axis;
else
return dpad;
-
+
break;
}
-
+
case 1:
case 3:
{
@@ -1692,7 +1692,7 @@ int16 CPad::GetAnalogueUpDown(void)
break;
}
}
-
+
return 0;
}
@@ -1700,7 +1700,7 @@ bool CPad::GetLookLeft(void)
{
if ( ArePlayerControlsDisabled() )
return false;
-
+
return !!(NewState.LeftShoulder2 && !NewState.RightShoulder2);
}
@@ -1742,21 +1742,21 @@ bool CPad::GetHorn(void)
break;
}
-
+
case 1:
{
return !!NewState.LeftShoulder1;
break;
}
-
+
case 2:
{
return !!NewState.RightShoulder1;
break;
}
-
+
case 3:
{
return !!NewState.LeftShock;
@@ -1764,7 +1764,7 @@ bool CPad::GetHorn(void)
break;
}
}
-
+
return false;
}
@@ -1781,21 +1781,21 @@ bool CPad::HornJustDown(void)
break;
}
-
+
case 1:
{
return !!(NewState.LeftShoulder1 && !OldState.LeftShoulder1);
break;
}
-
+
case 2:
{
return !!(NewState.RightShoulder1 && !OldState.RightShoulder1);
break;
}
-
+
case 3:
{
return !!(NewState.LeftShock && !OldState.LeftShock);
@@ -1803,7 +1803,7 @@ bool CPad::HornJustDown(void)
break;
}
}
-
+
return false;
}
@@ -1823,7 +1823,7 @@ bool CPad::GetCarGunFired(void)
break;
}
-
+
case 3:
{
return !!NewState.RightShoulder1;
@@ -1831,7 +1831,7 @@ bool CPad::GetCarGunFired(void)
break;
}
}
-
+
return false;
}
@@ -1850,7 +1850,7 @@ bool CPad::CarGunJustDown(void)
break;
}
-
+
case 3:
{
return !!(NewState.RightShoulder1 && !OldState.RightShoulder1);
@@ -1858,7 +1858,7 @@ bool CPad::CarGunJustDown(void)
break;
}
}
-
+
return false;
}
@@ -1873,25 +1873,25 @@ int16 CPad::GetHandBrake(void)
case 1:
{
return NewState.RightShoulder1;
-
+
break;
}
-
+
case 2:
{
return NewState.Triangle;
-
+
break;
}
-
+
case 3:
{
return NewState.LeftShoulder1;
-
+
break;
}
}
-
+
return 0;
}
@@ -1906,30 +1906,30 @@ int16 CPad::GetBrake(void)
case 2:
{
return NewState.Square;
-
+
break;
}
-
+
case 1:
{
return NewState.Square;
break;
}
-
+
case 3:
{
int16 axis = 2 * NewState.RightStickY;
-
+
if ( axis < 0 )
return 0;
else
return axis;
-
+
break;
}
}
-
+
return 0;
}
@@ -1945,18 +1945,18 @@ bool CPad::GetExitVehicle(void)
case 3:
{
return !!NewState.Triangle;
-
+
break;
}
-
+
case 2:
{
return !!NewState.LeftShoulder1;
-
+
break;
}
}
-
+
return false;
}
@@ -1972,18 +1972,18 @@ bool CPad::ExitVehicleJustDown(void)
case 3:
{
return !!(NewState.Triangle && !OldState.Triangle);
-
+
break;
}
-
+
case 2:
{
return !!(NewState.LeftShoulder1 && !OldState.LeftShoulder1);
-
+
break;
}
}
-
+
return false;
}
@@ -1998,25 +1998,25 @@ int32 CPad::GetWeapon(void)
case 1:
{
return NewState.Circle;
-
+
break;
}
-
+
case 2:
{
return NewState.Cross;
-
+
break;
}
-
+
case 3:
{
return NewState.RightShoulder1;
-
+
break;
}
}
-
+
return false;
}
@@ -2031,25 +2031,25 @@ bool CPad::WeaponJustDown(void)
case 1:
{
return !!(NewState.Circle && !OldState.Circle);
-
+
break;
}
-
+
case 2:
{
return !!(NewState.Cross && !OldState.Cross);
-
+
break;
}
-
+
case 3:
{
return !!(NewState.RightShoulder1 && !OldState.RightShoulder1);
-
+
break;
}
}
-
+
return false;
}
@@ -2064,30 +2064,30 @@ int16 CPad::GetAccelerate(void)
case 2:
{
return NewState.Cross;
-
+
break;
}
-
+
case 1:
{
return NewState.Cross;
-
+
break;
}
-
+
case 3:
{
int16 axis = -2 * NewState.RightStickY;
-
+
if ( axis < 0 )
return 0;
- else
+ else
return axis;
-
+
break;
}
}
-
+
return 0;
}
@@ -2100,18 +2100,18 @@ bool CPad::CycleCameraModeUpJustDown(void)
case 3:
{
return !!(NewState.Select && !OldState.Select);
-
+
break;
}
-
+
case 1:
{
return !!(NewState.DPadUp && !OldState.DPadUp);
-
+
break;
}
}
-
+
return false;
}
@@ -2124,18 +2124,18 @@ bool CPad::CycleCameraModeDownJustDown(void)
case 3:
{
return false;
-
+
break;
}
-
+
case 1:
{
return !!(NewState.DPadDown && !OldState.DPadDown);
-
+
break;
}
}
-
+
return false;
}
@@ -2149,32 +2149,32 @@ bool CPad::ChangeStationJustDown(void)
case 0:
{
return !!(NewState.LeftShoulder1 && !OldState.LeftShoulder1);
-
+
break;
}
-
+
case 1:
{
return !!(NewState.Select && !OldState.Select);
-
+
break;
}
-
+
case 2:
{
return !!(NewState.LeftShock && !OldState.LeftShock);
-
+
break;
}
-
+
case 3:
{
return !!(NewState.Circle && !OldState.Circle);
-
+
break;
}
}
-
+
return false;
}
@@ -2183,7 +2183,7 @@ bool CPad::CycleWeaponLeftJustDown(void)
{
if ( ArePlayerControlsDisabled() )
return false;
-
+
return !!(NewState.LeftShoulder2 && !OldState.LeftShoulder2);
}
@@ -2207,18 +2207,18 @@ bool CPad::GetTarget(void)
case 2:
{
return !!NewState.RightShoulder1;
-
+
break;
}
-
+
case 3:
{
return !!NewState.LeftShoulder1;
-
+
break;
}
}
-
+
return false;
}
@@ -2234,18 +2234,18 @@ bool CPad::TargetJustDown(void)
case 2:
{
return !!(NewState.RightShoulder1 && !OldState.RightShoulder1);
-
+
break;
}
-
+
case 3:
{
return !!(NewState.LeftShoulder1 && !OldState.LeftShoulder1);
-
+
break;
}
}
-
+
return false;
}
@@ -2253,7 +2253,7 @@ bool CPad::JumpJustDown(void)
{
if ( ArePlayerControlsDisabled() )
return false;
-
+
return !!(NewState.Square && !OldState.Square);
}
@@ -2269,18 +2269,18 @@ bool CPad::GetSprint(void)
case 3:
{
return !!NewState.Cross;
-
+
break;
}
-
+
case 2:
{
return !!NewState.Circle;
-
+
break;
}
}
-
+
return false;
}
@@ -2303,9 +2303,9 @@ bool CPad::ShiftTargetRightJustDown(void)
bool CPad::GetAnaloguePadUp(void)
{
static int16 oldfStickY = 0;
-
+
int16 Y = CPad::GetPad(0)->GetAnalogueUpDown();
-
+
if ( Y < 0 && oldfStickY >= 0 )
{
oldfStickY = Y;
@@ -2321,9 +2321,9 @@ bool CPad::GetAnaloguePadUp(void)
bool CPad::GetAnaloguePadDown(void)
{
static int16 oldfStickY = 0;
-
+
int16 Y = CPad::GetPad(0)->GetAnalogueUpDown();
-
+
if ( Y > 0 && oldfStickY <= 0 )
{
oldfStickY = Y;
@@ -2339,9 +2339,9 @@ bool CPad::GetAnaloguePadDown(void)
bool CPad::GetAnaloguePadLeft(void)
{
static int16 oldfStickX = 0;
-
+
int16 X = CPad::GetPad(0)->GetPedWalkLeftRight();
-
+
if ( X < 0 && oldfStickX >= 0 )
{
oldfStickX = X;
@@ -2357,9 +2357,9 @@ bool CPad::GetAnaloguePadLeft(void)
bool CPad::GetAnaloguePadRight(void)
{
static int16 oldfStickX = 0;
-
+
int16 X = CPad::GetPad(0)->GetPedWalkLeftRight();
-
+
if ( X > 0 && oldfStickX <= 0 )
{
oldfStickX = X;
@@ -2375,19 +2375,19 @@ bool CPad::GetAnaloguePadRight(void)
bool CPad::GetAnaloguePadLeftJustUp(void)
{
static int16 oldfStickX = 0;
-
+
int16 X = GetPad(0)->GetPedWalkLeftRight();
-
+
if ( X == 0 && oldfStickX < 0 )
{
oldfStickX = X;
-
+
return true;
}
else
{
oldfStickX = X;
-
+
return false;
}
}
@@ -2395,19 +2395,19 @@ bool CPad::GetAnaloguePadLeftJustUp(void)
bool CPad::GetAnaloguePadRightJustUp(void)
{
static int16 oldfStickX = 0;
-
+
int16 X = GetPad(0)->GetPedWalkLeftRight();
-
+
if ( X == 0 && oldfStickX > 0 )
{
oldfStickX = X;
-
+
return true;
}
else
{
oldfStickX = X;
-
+
return false;
}
}
@@ -2423,25 +2423,25 @@ bool CPad::ForceCameraBehindPlayer(void)
case 1:
{
return !!NewState.LeftShoulder1;
-
+
break;
}
-
+
case 2:
{
return !!NewState.Triangle;
-
+
break;
}
-
+
case 3:
{
return !!NewState.Circle;
-
+
break;
}
}
-
+
return false;
}
@@ -2460,15 +2460,15 @@ bool CPad::SniperZoomIn(void)
break;
}
-
+
case 2:
{
return !!NewState.Triangle;
-
+
break;
}
}
-
+
return false;
}
@@ -2487,15 +2487,15 @@ bool CPad::SniperZoomOut(void)
break;
}
-
+
case 2:
{
return !!NewState.Square;
-
+
break;
}
}
-
+
return false;
}
@@ -2505,7 +2505,7 @@ int16 CPad::SniperModeLookLeftRight(void)
{
int16 axis = NewState.LeftStickX;
int16 dpad = (NewState.DPadRight - NewState.DPadLeft) / 2;
-
+
if ( Abs(axis) > Abs(dpad) )
return axis;
else
@@ -2519,7 +2519,7 @@ int16 CPad::SniperModeLookUpDown(void)
axis = -axis;
#endif
int16 dpad = (NewState.DPadUp - NewState.DPadDown) / 2;
-
+
if ( Abs(axis) > Abs(dpad) )
return axis;
else
@@ -2529,7 +2529,7 @@ int16 CPad::SniperModeLookUpDown(void)
int16 CPad::LookAroundLeftRight(void)
{
float axis = GetPad(0)->NewState.RightStickX;
-
+
if ( Abs(axis) > 85 && !GetLookBehindForPed() )
return (int16) ( (axis + ( ( axis > 0 ) ? -85 : 85) )
* (127.0f / 32.0f) ); // 3.96875f
@@ -2537,7 +2537,7 @@ int16 CPad::LookAroundLeftRight(void)
else if ( TheCamera.Cams[0].Using3rdPersonMouseCam() && Abs(axis) > 10 )
return (int16) ( (axis + ( ( axis > 0 ) ? -10 : 10) )
* (127.0f / 64.0f) ); // 1.984375f
-
+
return 0;
}
@@ -2603,32 +2603,32 @@ void CPad::PrintErrorMessage(void)
TheText.Get("WRCONT") // The controller connected to controller port 1 is an unsupported controller. Grand Theft Auto III requires an analog controller (DUALSHOCK@) or analog controller (DUALSHOCK@2).
);
}
-
+
}
void LittleTest(void)
{
static int32 Cunt = 0;
-
+
Cunt++; // ???
}
void CPad::ResetCheats(void)
{
CWeather::ReleaseWeather();
-
+
CPopulation::ms_bGivePedsWeapons = false;
-
+
CPed::bNastyLimbsCheat = false;
CPed::bPedCheat2 = false;
CPed::bPedCheat3 = false;
-
+
CVehicle::bWheelsOnlyCheat = false;
CVehicle::bAllDodosCheat = false;
CVehicle::bCheat3 = false;
CVehicle::bCheat4 = false;
CVehicle::bCheat5 = false;
-
+
gbFastTime = false;
CTimer::SetTimeScale(1.0f);
}
@@ -2636,7 +2636,7 @@ void CPad::ResetCheats(void)
char *CPad::EditString(char *pStr, int32 nSize)
{
int32 pos = strlen(pStr);
-
+
// letters
for ( int32 i = 0; i < ('Z' - 'A' + 1); i++ )
{
@@ -2645,15 +2645,15 @@ char *CPad::EditString(char *pStr, int32 nSize)
pStr[pos++] = i + 'A';
pStr[pos] = '\0';
}
-
+
if ( GetPad(0)->GetCharJustDown(i + 'a') && pos < nSize - 1 )
{
pStr[pos++] = i + 'a';
pStr[pos] = '\0';
}
}
-
- // numbers
+
+ // numbers
for ( int32 i = 0; i < ('9' - '0' + 1); i++ )
{
if ( GetPad(0)->GetCharJustDown(i + '0') && pos < nSize - 1 )
@@ -2662,15 +2662,15 @@ char *CPad::EditString(char *pStr, int32 nSize)
pStr[pos] = '\0';
}
}
-
+
// space
if ( GetPad(0)->GetCharJustDown(' ') && pos < nSize - 1 )
{
pStr[pos++] = ' ';
pStr[pos] = '\0';
}
-
-
+
+
// del
if ( GetPad(0)->GetDeleteJustDown() || GetPad(0)->GetBackspaceJustDown() )
{
@@ -2681,7 +2681,7 @@ char *CPad::EditString(char *pStr, int32 nSize)
// extenter/up/down
if ( GetPad(0)->GetReturnJustDown() || GetPad(0)->GetUpJustDown() || GetPad(0)->GetDownJustDown() )
return nil;
-
+
return pStr;
}
@@ -2694,64 +2694,64 @@ int32 *CPad::EditCodesForControls(int32 *pRsKeys, int32 nSize)
if ( GetPad(0)->GetCharJustDown(i) )
*pRsKeys = i;
}
-
+
for ( int32 i = 0; i < 12; i++ )
{
if ( GetPad(0)->GetFJustDown(i) )
*pRsKeys = i + rsF1;
}
-
+
if ( GetPad(0)->GetEscapeJustDown() )
*pRsKeys = rsESC;
-
+
if ( GetPad(0)->GetInsertJustDown() )
*pRsKeys = rsINS;
-
+
if ( GetPad(0)->GetDeleteJustDown() )
*pRsKeys = rsDEL;
-
+
if ( GetPad(0)->GetHomeJustDown() )
*pRsKeys = rsHOME;
-
+
if ( GetPad(0)->GetEndJustDown() )
*pRsKeys = rsEND;
-
+
if ( GetPad(0)->GetPageUpJustDown() )
*pRsKeys = rsPGUP;
-
+
if ( GetPad(0)->GetPageDownJustDown() )
*pRsKeys = rsPGDN;
-
+
if ( GetPad(0)->GetUpJustDown() )
*pRsKeys = rsUP;
-
+
if ( GetPad(0)->GetDownJustDown() )
*pRsKeys = rsDOWN;
-
+
if ( GetPad(0)->GetLeftJustDown() )
*pRsKeys = rsLEFT;
-
+
if ( GetPad(0)->GetRightJustDown() )
*pRsKeys = rsRIGHT;
-
+
if ( GetPad(0)->GetScrollLockJustDown() )
*pRsKeys = rsSCROLL;
-
+
if ( GetPad(0)->GetPauseJustDown() )
*pRsKeys = rsPAUSE;
-
+
if ( GetPad(0)->GetNumLockJustDown() )
*pRsKeys = rsNUMLOCK;
-
+
if ( GetPad(0)->GetDivideJustDown() )
*pRsKeys = rsDIVIDE;
-
+
if ( GetPad(0)->GetTimesJustDown() )
*pRsKeys = rsTIMES;
-
+
if ( GetPad(0)->GetMinusJustDown() )
*pRsKeys = rsMINUS;
-
+
if ( GetPad(0)->GetPlusJustDown() )
*pRsKeys = rsPLUS;
@@ -2763,75 +2763,75 @@ int32 *CPad::EditCodesForControls(int32 *pRsKeys, int32 nSize)
if ( GetPad(0)->GetPad1JustDown() )
*pRsKeys = rsPADEND;
-
+
if ( GetPad(0)->GetPad2JustDown() )
*pRsKeys = rsPADDOWN;
-
+
if ( GetPad(0)->GetPad3JustDown() )
*pRsKeys = rsPADPGDN;
-
+
if ( GetPad(0)->GetPad4JustDown() )
*pRsKeys = rsPADLEFT;
-
+
if ( GetPad(0)->GetPad5JustDown() )
*pRsKeys = rsPAD5;
-
+
if ( GetPad(0)->GetPad6JustDown() )
*pRsKeys = rsPADRIGHT;
-
+
if ( GetPad(0)->GetPad7JustDown() )
*pRsKeys = rsPADHOME;
-
+
if ( GetPad(0)->GetPad8JustDown() )
*pRsKeys = rsPADUP;
-
+
if ( GetPad(0)->GetPad9JustDown() )
*pRsKeys = rsPADPGUP;
-
+
if ( GetPad(0)->GetPad0JustDown() )
*pRsKeys = rsPADINS;
if ( GetPad(0)->GetBackspaceJustDown() )
*pRsKeys = rsBACKSP;
-
+
if ( GetPad(0)->GetTabJustDown() )
*pRsKeys = rsTAB;
-
+
if ( GetPad(0)->GetCapsLockJustDown() )
*pRsKeys = rsCAPSLK;
-
+
if ( GetPad(0)->GetReturnJustDown() )
*pRsKeys = rsENTER;
-
+
if ( GetPad(0)->GetLeftShiftJustDown() )
*pRsKeys = rsLSHIFT;
-
+
if ( GetPad(0)->GetShiftJustDown() )
*pRsKeys = rsSHIFT;
-
+
if ( GetPad(0)->GetRightShiftJustDown() )
*pRsKeys = rsRSHIFT;
-
+
if ( GetPad(0)->GetLeftCtrlJustDown() )
*pRsKeys = rsLCTRL;
-
+
if ( GetPad(0)->GetRightCtrlJustDown() )
*pRsKeys = rsRCTRL;
-
+
if ( GetPad(0)->GetLeftAltJustDown() )
*pRsKeys = rsLALT;
-
+
if ( GetPad(0)->GetRightAltJustDown() )
*pRsKeys = rsRALT;
-
+
if ( GetPad(0)->GetLeftWinJustDown() )
*pRsKeys = rsLWIN;
-
+
if ( GetPad(0)->GetRightWinJustDown() )
*pRsKeys = rsRWIN;
-
+
if ( GetPad(0)->GetAppsJustDown() )
*pRsKeys = rsAPPS;
-
+
return pRsKeys;
}
diff --git a/src/render/MBlur.cpp b/src/render/MBlur.cpp
index f6c16cfd..45224d05 100644
--- a/src/render/MBlur.cpp
+++ b/src/render/MBlur.cpp
@@ -20,14 +20,14 @@ CMBlur::MotionBlurOpen(RwCamera *cam)
{
#ifdef GTA_PS2
RwRect rect = {0, 0, 0, 0};
-
+
if (pFrontBuffer)
- return TRUE;
+ return TRUE;
BlurOn = true;
rect.w = RwRasterGetWidth(RwCameraGetRaster(cam));
- rect.h = RwRasterGetHeight(RwCameraGetRaster(cam));
+ rect.h = RwRasterGetHeight(RwCameraGetRaster(cam));
pFrontBuffer = RwRasterCreate(0, 0, 0, rwRASTERDONTALLOCATE|rwRASTERTYPECAMERATEXTURE);
if (!pFrontBuffer)