This commit is contained in:
Fire-Head 2020-06-28 01:57:01 +03:00
parent 233792e2b8
commit b8f633de24
7 changed files with 86 additions and 86 deletions

View File

@ -488,7 +488,7 @@ void
CMenuMultiChoiceTriggered::SelectCurrentOptionUnderCursor(void)
{
CMenuMultiChoice::SelectCurrentOptionUnderCursor();
if(m_cursor != -1 && m_triggers[m_cursor] != NULL )
if(m_cursor != -1 && m_triggers[m_cursor] != nil )
m_triggers[m_cursor](this);
}

View File

@ -16,7 +16,7 @@ class CTriggerCaller
int field_C;
public:
CTriggerCaller() : bHasTrigger(false), pFunc(NULL)
CTriggerCaller() : bHasTrigger(false), pFunc(nil)
{}
void SetTrigger(void *func, void *trigger)
@ -31,11 +31,11 @@ public:
void CallTrigger(void)
{
if ( bHasTrigger && pFunc != NULL )
if ( bHasTrigger && pFunc != nil )
pFunc(pTrigger);
bHasTrigger = false;
pFunc = NULL;
pFunc = nil;
}
bool CanCall()
@ -52,7 +52,7 @@ public:
wchar *m_text;
CPlaceableText(void)
: m_position(0.0f, 0.0f), m_color(255, 255, 255, 255), m_text(NULL) {}
: m_position(0.0f, 0.0f), m_color(255, 255, 255, 255), m_text(nil) {}
void SetPosition(float x, float y) { m_position.x = x; m_position.y = y; }
void SetColor(const CRGBA &color) { m_color = color; }
CRGBA GetColor(void) { return m_color; }

View File

@ -87,14 +87,14 @@ wchar *PrintStatLine(char const *text, void *stat, unsigned char itsFloat, void
if ( itsFloat )
sprintf(line, " %.2f %s %.2f", *(float*)stat, UnicodeToAscii(TheText.Get("FEST_OO")), *(float*)stat2);
else
sprintf(line, " %d %s %d", *(int*)stat, UnicodeToAscii(TheText.Get("FEST_OO")), *(int*)stat2);
sprintf(line, " %d %s %d", *(int32*)stat, UnicodeToAscii(TheText.Get("FEST_OO")), *(int32*)stat2);
}
else
{
if (itsFloat)
sprintf(line, " %.2f", *(float*)stat);
else
sprintf(line, " %d", *(int*)stat);
sprintf(line, " %d", *(int32*)stat);
}
wchar *pStatLine = aStatLines[nStatLinesIndex++];
@ -105,7 +105,7 @@ wchar *PrintStatLine(char const *text, void *stat, unsigned char itsFloat, void
return pStatLine;
}
return NULL;
return nil;
}
void
@ -139,7 +139,7 @@ DisplayMemoryCardAccessMsg(wchar *msg, CRGBA const &color)
}
void
FillMenuWithMemCardFileListing(CMenuMultiChoiceTwoLinesTriggered *widget, void (*cancelTrigger)(CMenuMultiChoiceTwoLinesTriggered *), void (*selectTrigger)(CMenuMultiChoiceTwoLinesTriggered *), wchar *text, int y, int height, int offset)
FillMenuWithMemCardFileListing(CMenuMultiChoiceTwoLinesTriggered *widget, void (*cancelTrigger)(CMenuMultiChoiceTwoLinesTriggered *), void (*selectTrigger)(CMenuMultiChoiceTwoLinesTriggered *), wchar *text, int32 y, int32 height, int32 offset)
{
if ( widget )
{
@ -149,7 +149,7 @@ FillMenuWithMemCardFileListing(CMenuMultiChoiceTwoLinesTriggered *widget, void (
widget->DeactivateMenu(); // TODO check
widget->m_numOptions = 0;
widget->AddTitle(NULL, 0.0f, 0.0f, 0);
widget->AddTitle(nil, 0.0f, 0.0f, 0);
TheMemoryCard.PopulateSlotInfo(CARD_ONE);
@ -169,7 +169,7 @@ FillMenuWithMemCardFileListing(CMenuMultiChoiceTwoLinesTriggered *widget, void (
sprintf(buff, "%s %d ", UnicodeToAscii(TheText.Get("FES_SLO")), i+1);
AsciiToUnicode(buff, MemoryCard_FileNames[i]);
wchar *datetime = NULL;
wchar *datetime = nil;
switch ( TheMemoryCard.GetInfoOnSpecificSlot(i) )
{
@ -181,7 +181,7 @@ FillMenuWithMemCardFileListing(CMenuMultiChoiceTwoLinesTriggered *widget, void (
}
case CMemoryCard::SLOT_PRESENT:
{
if ( TheMemoryCard.GetNameOfSavedGame(i) != NULL )
if ( TheMemoryCard.GetNameOfSavedGame(i) != nil )
{
UnicodeStrcpy(MemoryCard_FileNames[i], TheMemoryCard.GetNameOfSavedGame(i));
datetime = TheMemoryCard.GetDateAndTimeOfSavedGame(i);
@ -273,7 +273,7 @@ TriggerSaveZone_FormatCard(CMenuMultiChoiceTriggered *widget)
{
if ( widget )
{
FillMenuWithMemCardFileListing(&MenuSaveZoneSSL_1, TriggerSaveZone_BackToMainMenuTwoLines, TriggerSaveZone_SaveSlots, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveZoneSSL_1, TriggerSaveZone_BackToMainMenuTwoLines, TriggerSaveZone_SaveSlots, nil, 0, 34, 22);
if ( TheMemoryCard.GetError() == CMemoryCard::NO_ERR_SUCCESS)
{
@ -331,7 +331,7 @@ TriggerSaveZone_FormatCard(CMenuMultiChoiceTriggered *widget)
if ( TheMemoryCard.GetError() == CMemoryCard::NO_ERR_SUCCESS )
{
FillMenuWithMemCardFileListing(&MenuSaveZoneSSL_1, TriggerSaveZone_BackToMainMenuTwoLines, TriggerSaveZone_SaveSlots, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveZoneSSL_1, TriggerSaveZone_BackToMainMenuTwoLines, TriggerSaveZone_SaveSlots, nil, 0, 34, 22);
pActiveMenuPage = &MenuPageSaveZone_SaveSlots;
bMemoryCardSpecialZone = true;
bIgnoreTriangleButton = true;
@ -377,7 +377,7 @@ TriggerSaveZone_FormatCardSelect(CMenuMultiChoiceTriggered *widget)
{
if ( widget )
{
FillMenuWithMemCardFileListing(&MenuSaveZoneSSL_1, TriggerSaveZone_BackToMainMenuTwoLines, TriggerSaveZone_SaveSlots, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveZoneSSL_1, TriggerSaveZone_BackToMainMenuTwoLines, TriggerSaveZone_SaveSlots, nil, 0, 34, 22);
if ( TheMemoryCard.GetError() == CMemoryCard::NO_ERR_SUCCESS )
{
@ -615,7 +615,7 @@ TriggerSaveZone_SaveGameSelect(CMenuMultiChoiceTriggered *widget)
{
if ( widget )
{
FillMenuWithMemCardFileListing(&MenuSaveZoneSSL_1, TriggerSaveZone_BackToMainMenuTwoLines, TriggerSaveZone_SaveSlots, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveZoneSSL_1, TriggerSaveZone_BackToMainMenuTwoLines, TriggerSaveZone_SaveSlots, nil, 0, 34, 22);
if ( TheMemoryCard.GetError() == CMemoryCard::ERR_NOFORMAT)
{
@ -916,8 +916,8 @@ TriggerSave_DeleteGameDeleteGame(CMenuMultiChoiceTriggered *widget)
}
else
{
FillMenuWithMemCardFileListing(&MenuSaveLG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_LoadGameLoadGameSelect, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveDG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_DeleteGameDeleteGameSelect, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveLG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_LoadGameLoadGameSelect, nil, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveDG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_DeleteGameDeleteGameSelect, nil, 0, 34, 22);
pMenuSave = &MenuPage_SaveBasic;
pMenuSave->ActivatePage();
@ -965,8 +965,8 @@ TriggerSave_DeleteGameDeleteGameSelect(CMenuMultiChoiceTwoLinesTriggered *widget
void
TriggerSave_DeleteGameSelect(CMenuMultiChoiceTriggered *widget)
{
FillMenuWithMemCardFileListing(&MenuSaveDG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_DeleteGameDeleteGameSelect, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveLG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_LoadGameLoadGameSelect, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveDG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_DeleteGameDeleteGameSelect, nil, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveLG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_LoadGameLoadGameSelect, nil, 0, 34, 22);
pMenuSave = &MenuPage_SaveDeleteGame;
pMenuSave->ActivatePage();
@ -1078,8 +1078,8 @@ TriggerSave_LoadGameLoadGameSelect(CMenuMultiChoiceTwoLinesTriggered *widget)
void
TriggerSave_LoadGameSelect(CMenuMultiChoiceTriggered *widget)
{
FillMenuWithMemCardFileListing(&MenuSaveLG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_LoadGameLoadGameSelect, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveDG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_DeleteGameDeleteGameSelect, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveLG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_LoadGameLoadGameSelect, nil, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveDG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_DeleteGameDeleteGameSelect, nil, 0, 34, 22);
pMenuSave = &MenuPage_SaveLoadGame;
pMenuSave->ActivatePage();

View File

@ -248,7 +248,7 @@ float CMenuManager::fMapCenterX;
CMenuManager::CMenuManager(void)
{
int i;
int32 i;
SetSoundLevelsForMusicMenu();
@ -289,7 +289,7 @@ CMenuManager::CMenuManager(void)
void
CMenuManager::LoadAllTextures(void)
{
int i;
int32 i;
if(m_bTexturesLoaded)
return;
@ -313,7 +313,7 @@ CMenuManager::LoadAllTextures(void)
CStreaming::MakeSpaceFor(60*1024);
CStreaming::ImGonnaUseStreamingMemory();
CGame::TidyUpMemory(false, true);
int slot = CTxdStore::FindTxdSlot("frontend");
int32 slot = CTxdStore::FindTxdSlot("frontend");
if(slot == -1)
slot = CTxdStore::AddTxdSlot("frontend");
printf("LOAD frontend\n");
@ -334,8 +334,8 @@ CMenuManager::LoadAllTextures(void)
void
CMenuManager::UnloadTextures(void)
{
int slot;
int i;
int32 slot;
int32 i;
if ( !m_bTexturesLoaded )
return;
@ -1079,8 +1079,8 @@ CMenuManager::InitialiseMenuContents(void)
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);
FillMenuWithMemCardFileListing(&MenuSaveLG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_LoadGameLoadGameSelect, nil, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveDG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_DeleteGameDeleteGameSelect, nil, 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:
@ -1120,8 +1120,8 @@ CMenuManager::InitialiseMenuContents(void)
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_HEADER(str) do { MenuStats_1.AddTextLine(TheText.Get(str), nil); } while(0)
#define STAT_PARAM(str) do { MenuStats_1.AddTextLine(nil, 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;
@ -1131,9 +1131,9 @@ CMenuManager::InitialiseMenuContents(void)
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("PER_COM", &percentCompleted, 0, nil);
STAT_LINE("NMISON", &CStats::MissionsGiven, 0, NULL);
STAT_LINE("NMISON", &CStats::MissionsGiven, 0, nil);
STAT_LINE("FEST_MP", &CStats::MissionsPassed, 0, &CStats::TotalNumberMissions);
@ -1144,71 +1144,71 @@ CMenuManager::InitialiseMenuContents(void)
float packagesPercent = 0.0f;
if (player.m_nTotalPackages != 0)
packagesPercent = player.m_nCollectedPackages * 100.0f / player.m_nTotalPackages;
int nPackagesPercent = packagesPercent;
int32 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);
STAT_LINE("DAYSPS", &CStats::DaysPassed, 0, nil);
if ( CGame::nastyGame )
{
STAT_LINE("PE_WAST", &CStats::PeopleKilledByPlayer, 0, NULL);
STAT_LINE("PE_WSOT", &CStats::PeopleKilledByOthers, 0, NULL);
STAT_LINE("PE_WAST", &CStats::PeopleKilledByPlayer, 0, nil);
STAT_LINE("PE_WSOT", &CStats::PeopleKilledByOthers, 0, nil);
}
STAT_LINE("CAR_EXP", &CStats::CarsExploded, 0, NULL);
STAT_LINE("CAR_EXP", &CStats::CarsExploded, 0, nil);
STAT_LINE("TM_BUST", &CStats::TimesArrested, 0, NULL);
STAT_LINE("TM_BUST", &CStats::TimesArrested, 0, nil);
STAT_LINE("TM_DED", &CStats::TimesDied, 0, NULL);
STAT_LINE("TM_DED", &CStats::TimesDied, 0, nil);
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);
STAT_LINE("GNG_WST", &nTemp, 0, nil);
nTemp = CStats::PedsKilledOfThisType[PEDTYPE_CRIMINAL];
STAT_LINE("DED_CRI", &nTemp, 0, NULL);
STAT_LINE("DED_CRI", &nTemp, 0, nil);
STAT_LINE("HEL_DST", &CStats::HelisDestroyed, 0, NULL);
STAT_LINE("HEL_DST", &CStats::HelisDestroyed, 0, nil);
STAT_LINE("KGS_EXP", &CStats::KgsOfExplosivesUsed, 0, NULL);
STAT_LINE("KGS_EXP", &CStats::KgsOfExplosivesUsed, 0, nil);
nTemp = (CStats::InstantHitsFiredByPlayer == 0 ? 0 : CStats::InstantHitsHitByPlayer * 100.0f / CStats::InstantHitsFiredByPlayer);
STAT_LINE("ACCURA", &nTemp, 0, NULL);
STAT_LINE("ACCURA", &nTemp, 0, nil);
if (CStats::ElBurroTime > 0)
STAT_LINE("ELBURRO", &CStats::ElBurroTime, 0, NULL);
STAT_LINE("ELBURRO", &CStats::ElBurroTime, 0, nil);
if (CStats::Record4x4One > 0)
STAT_LINE("FEST_R1", &CStats::Record4x4One, 0, NULL);
STAT_LINE("FEST_R1", &CStats::Record4x4One, 0, nil);
if (CStats::Record4x4Two > 0)
STAT_LINE("FEST_R2", &CStats::Record4x4Two, 0, NULL);
STAT_LINE("FEST_R2", &CStats::Record4x4Two, 0, nil);
if (CStats::Record4x4Three > 0)
STAT_LINE("FEST_R3", &CStats::Record4x4Three, 0, NULL);
STAT_LINE("FEST_R3", &CStats::Record4x4Three, 0, nil);
if (CStats::Record4x4Mayhem > 0)
STAT_LINE("FEST_RM", &CStats::Record4x4Mayhem, 0, NULL);
STAT_LINE("FEST_RM", &CStats::Record4x4Mayhem, 0, nil);
if (CStats::LongestFlightInDodo > 0)
STAT_LINE("FEST_LF", &CStats::LongestFlightInDodo, 0, NULL);
STAT_LINE("FEST_LF", &CStats::LongestFlightInDodo, 0, nil);
if (CStats::TimeTakenDefuseMission > 0)
STAT_LINE("FEST_BD", &CStats::TimeTakenDefuseMission, 0, NULL);
STAT_LINE("FEST_BD", &CStats::TimeTakenDefuseMission, 0, nil);
STAT_LINE("CAR_CRU", &CStats::CarsCrushed, 0, NULL);
STAT_LINE("CAR_CRU", &CStats::CarsCrushed, 0, nil);
if (CStats::HighestScores[0] > 0)
{
STAT_HEADER("FEST_BB");
STAT_LINE("FEST_H0", &CStats::HighestScores[0], 0, NULL);
STAT_LINE("FEST_H0", &CStats::HighestScores[0], 0, nil);
}
int32 hs = 0;
@ -1219,27 +1219,27 @@ CMenuManager::InitialiseMenuContents(void)
STAT_HEADER("FEST_GC");
if (CStats::HighestScores[1] > 0)
STAT_LINE("FEST_H1", &CStats::HighestScores[1], 0, NULL);
STAT_LINE("FEST_H1", &CStats::HighestScores[1], 0, nil);
if (CStats::HighestScores[2] > 0)
STAT_LINE("FEST_H2", &CStats::HighestScores[2], 0, NULL);
STAT_LINE("FEST_H2", &CStats::HighestScores[2], 0, nil);
if (CStats::HighestScores[3] > 0)
STAT_LINE("FEST_H3", &CStats::HighestScores[3], 0, NULL);
STAT_LINE("FEST_H3", &CStats::HighestScores[3], 0, nil);
if (CStats::HighestScores[4] > 0)
STAT_LINE("FEST_H4", &CStats::HighestScores[4], 0, NULL);
STAT_LINE("FEST_H4", &CStats::HighestScores[4], 0, nil);
STAT_LINE("FESTDFM", &CStats::DistanceTravelledOnFoot, 0, NULL);
STAT_LINE("FESTDCM", &CStats::DistanceTravelledInVehicle, 0, NULL);
STAT_LINE("MMRAIN", &CStats::mmRain, 0, NULL);
STAT_LINE("FESTDFM", &CStats::DistanceTravelledOnFoot, 0, nil);
STAT_LINE("FESTDCM", &CStats::DistanceTravelledInVehicle, 0, nil);
STAT_LINE("MMRAIN", &CStats::mmRain, 0, nil);
nTemp = (int32)CStats::MaximumJumpDistance;
STAT_LINE("MXCARDM", &nTemp, 0, NULL);
STAT_LINE("MXCARDM", &nTemp, 0, nil);
nTemp = (int32)CStats::MaximumJumpHeight;
STAT_LINE("MXCARJM", &nTemp, 0, NULL);
STAT_LINE("MXCARJM", &nTemp, 0, nil);
STAT_LINE("MXFLIP", &CStats::MaximumJumpFlips, 0, NULL);
STAT_LINE("MXJUMP", &CStats::MaximumJumpSpins, 0, NULL);
STAT_LINE("MXFLIP", &CStats::MaximumJumpFlips, 0, nil);
STAT_LINE("MXJUMP", &CStats::MaximumJumpSpins, 0, nil);
STAT_HEADER("BSTSTU");
@ -1256,14 +1256,14 @@ CMenuManager::InitialiseMenuContents(void)
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);
STAT_LINE("FEST_HA", &CStats::HighestLevelAmbulanceMission, 0, NULL);
STAT_LINE("FEST_CC", &CStats::CriminalsCaught, 0, NULL);
STAT_LINE("FEST_FE", &CStats::FiresExtinguished, 0, NULL);
STAT_LINE("PASDRO", &CStats::PassengersDroppedOffWithTaxi, 0, nil);
STAT_LINE("MONTAX", &CStats::MoneyMadeWithTaxi, 0, nil);
STAT_LINE("FEST_LS", &CStats::LivesSavedWithAmbulance, 0, nil);
STAT_LINE("FEST_HA", &CStats::HighestLevelAmbulanceMission, 0, nil);
STAT_LINE("FEST_CC", &CStats::CriminalsCaught, 0, nil);
STAT_LINE("FEST_FE", &CStats::FiresExtinguished, 0, nil);
int32 rnd = ((CGeneral::GetRandomNumber() & 255) + 100) * 2384;
STAT_LINE("DAYPLC", &rnd, 0, NULL);
STAT_LINE("DAYPLC", &rnd, 0, nil);
#undef STAT_LINE
@ -1367,8 +1367,8 @@ CMenuManager::DrawFrontEndNormal(void)
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);
FillMenuWithMemCardFileListing(&MenuSaveLG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_LoadGameLoadGameSelect, nil, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveDG_2, TriggerSave_BackToMainMenuTwoLines, TriggerSave_DeleteGameDeleteGameSelect, nil, 0, 34, 22);
}
}
@ -1455,7 +1455,7 @@ CMenuManager::DrawFrontEndNormal(void)
float iconY = 54.0f;
float iconWidth = 540.0f;
float iconHeight = 296.0f;
int sprite = FE_ICONBRIEF;
int32 sprite = FE_ICONBRIEF;
#ifdef PS2_MENU_USEALLPAGEICONS
switch(m_currentPage)
@ -1819,7 +1819,7 @@ CMenuManager::DrawFrontEndSaveZone(void)
counter++;
if ( counter & 63 )
{
FillMenuWithMemCardFileListing(&MenuSaveZoneSSL_1, TriggerSaveZone_BackToMainMenuTwoLines, TriggerSaveZone_SaveSlots, NULL, 0, 34, 22);
FillMenuWithMemCardFileListing(&MenuSaveZoneSSL_1, TriggerSaveZone_BackToMainMenuTwoLines, TriggerSaveZone_SaveSlots, nil, 0, 34, 22);
if ( TheMemoryCard.GetError() == CMemoryCard::ERR_NOFORMAT )
{
@ -1921,7 +1921,7 @@ CMenuManager::DrawMemoryCardStartUpMenus()
}
}
MCMenu.AddOption(TheText.Get("FEM_NO"), X(30.0f), Y(110.0f), NULL, 0, 0);// 125.714294f
MCMenu.AddOption(TheText.Get("FEM_NO"), X(30.0f), Y(110.0f), nil, 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);

View File

@ -369,10 +369,10 @@ CControllerState::Clear(void)
void CKeyboardState::Clear()
{
for ( int32 i = 0; i < 12; i++ )
for ( int32 i = 0; i < ARRAY_SIZE(F); i++ )
F[i] = 0;
for ( int32 i = 0; i < 256; i++ )
for ( int32 i = 0; i < ARRAY_SIZE(VK_KEYS); i++ )
VK_KEYS[i] = 0;
ESC = INS = DEL = HOME = END = PGUP = PGDN = 0;

View File

@ -1859,7 +1859,7 @@ CMemoryCard::SaveGame(void)
buf = work_buff;
reserved = 0;
for (int i = 0; i < 3; i++)
for (int32 i = 0; i < 3; i++)
{
size = align4bytes(saveSize - totalSize - 4);
if (size > sizeof(work_buff))

View File

@ -271,9 +271,9 @@ UnicodeToAscii(wchar *src)
{
static char aStr[256];
int len;
for(len = 0; *src != '\0' && len < 256-1; len++, src++)
for(len = 0; *src != '\0' && len < ARRAY_SIZE(aStr)-1; len++, src++)
#ifdef MORE_LANGUAGES
if(*src < 128 || ((CGame::russianGame || CGame::japaneseGame) && *src < 256))
if(*src < 128 || ((CGame::russianGame || CGame::japaneseGame) && *src < ARRAY_SIZE(aStr)))
#else
if(*src < 128)
#endif
@ -289,8 +289,8 @@ UnicodeToAsciiForSaveLoad(wchar *src)
{
static char aStr[256];
int len;
for(len = 0; *src != '\0' && len < 256-1; len++, src++)
if(*src < 256)
for(len = 0; *src != '\0' && len < ARRAY_SIZE(aStr)-1; len++, src++)
if(*src < ARRAY_SIZE(aStr))
aStr[len] = *src;
else
aStr[len] = '#';
@ -303,8 +303,8 @@ UnicodeToAsciiForMemoryCard(wchar *src)
{
static char aStr[256];
int len;
for(len = 0; *src != '\0' && len < 256-1; len++, src++)
if(*src < 256)
for(len = 0; *src != '\0' && len < ARRAY_SIZE(aStr)-1; len++, src++)
if(*src < ARRAY_SIZE(aStr))
aStr[len] = *src;
else
aStr[len] = '#';