mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-26 11:04:15 +01:00
Merge branch 'master' into miami
# Conflicts: # gamefiles/TEXT/american.gxt # src/control/Garages.cpp # src/control/Record.cpp # src/control/Script.cpp # src/core/Collision.cpp # src/core/Frontend.cpp # src/core/Frontend.h # src/core/Game.cpp # src/core/MenuScreens.cpp # src/core/Streaming.cpp # src/core/config.h # src/core/re3.cpp # src/modelinfo/ModelInfo.cpp # src/render/Renderer.cpp # src/save/GenericGameStorage.cpp # utils/gxt/american.txt
This commit is contained in:
commit
827b240078
@ -950,6 +950,10 @@ CCarCtrl::RemoveCarsIfThePoolGetsFull(void)
|
|||||||
void
|
void
|
||||||
CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
|
CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
|
||||||
{
|
{
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
if (pVehicle->bIsLocked)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
CVector vecPlayerPos = FindPlayerCentreOfWorld(CWorld::PlayerInFocus);
|
CVector vecPlayerPos = FindPlayerCentreOfWorld(CWorld::PlayerInFocus);
|
||||||
/* BUG: this variable is initialized only in if-block below but can be used outside of it. */
|
/* BUG: this variable is initialized only in if-block below but can be used outside of it. */
|
||||||
if (!IsThisVehicleInteresting(pVehicle) && !pVehicle->bIsLocked &&
|
if (!IsThisVehicleInteresting(pVehicle) && !pVehicle->bIsLocked &&
|
||||||
|
@ -1324,7 +1324,7 @@ void CGarage::RemoveCarsBlockingDoorNotInside()
|
|||||||
if (!IsEntityTouching3D(pVehicle))
|
if (!IsEntityTouching3D(pVehicle))
|
||||||
continue;
|
continue;
|
||||||
if (!IsPointInsideGarage(pVehicle->GetPosition())) {
|
if (!IsPointInsideGarage(pVehicle->GetPosition())) {
|
||||||
if (pVehicle->bIsLocked && pVehicle->CanBeDeleted()) {
|
if (!pVehicle->bIsLocked && pVehicle->CanBeDeleted()) {
|
||||||
CWorld::Remove(pVehicle);
|
CWorld::Remove(pVehicle);
|
||||||
delete pVehicle;
|
delete pVehicle;
|
||||||
return; // WHY?
|
return; // WHY?
|
||||||
@ -1817,8 +1817,9 @@ CVehicle* CStoredCar::RestoreCar()
|
|||||||
pVehicle->m_nRadioStation = m_nRadioStation;
|
pVehicle->m_nRadioStation = m_nRadioStation;
|
||||||
pVehicle->bFreebies = false;
|
pVehicle->bFreebies = false;
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
((CAutomobile*)pVehicle)->m_bombType = m_nCarBombType;
|
if (pVehicle->IsCar())
|
||||||
#endif
|
#endif
|
||||||
|
((CAutomobile*)pVehicle)->m_bombType = m_nCarBombType;
|
||||||
pVehicle->bHasBeenOwnedByPlayer = true;
|
pVehicle->bHasBeenOwnedByPlayer = true;
|
||||||
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||||
pVehicle->bBulletProof = m_bBulletproof;
|
pVehicle->bBulletProof = m_bBulletproof;
|
||||||
|
@ -10228,11 +10228,11 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
|
|||||||
return 0;
|
return 0;
|
||||||
CVehicle* car;
|
CVehicle* car;
|
||||||
if (CModelInfo::IsBikeModel(model)) {
|
if (CModelInfo::IsBikeModel(model)) {
|
||||||
car = new CBike(model, MISSION_VEHICLE);
|
car = new CBike(model, RANDOM_VEHICLE);
|
||||||
((CBike*)(car))->bIsStanding = true;
|
((CBike*)(car))->bIsStanding = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
car = new CAutomobile(model, MISSION_VEHICLE);
|
car = new CAutomobile(model, RANDOM_VEHICLE);
|
||||||
CVector pos = *(CVector*)&ScriptParams[0];
|
CVector pos = *(CVector*)&ScriptParams[0];
|
||||||
pos.z += car->GetDistanceFromCentreOfMassToBaseOfModel();
|
pos.z += car->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||||
car->SetPosition(pos);
|
car->SetPosition(pos);
|
||||||
@ -10590,15 +10590,21 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
|
|||||||
CollectParameters(&m_nIp, 1);
|
CollectParameters(&m_nIp, 1);
|
||||||
CTimer::Stop();
|
CTimer::Stop();
|
||||||
CGame::currLevel = (eLevelName)ScriptParams[0];
|
CGame::currLevel = (eLevelName)ScriptParams[0];
|
||||||
#ifndef NO_ISLAND_LOADING
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
||||||
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
||||||
#endif
|
}
|
||||||
CCollision::SortOutCollisionAfterLoad();
|
CCollision::SortOutCollisionAfterLoad();
|
||||||
#ifndef NO_ISLAND_LOADING
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
CStreaming::RequestIslands(CGame::currLevel);
|
CStreaming::RequestIslands(CGame::currLevel);
|
||||||
CStreaming::LoadAllRequestedModels(true);
|
CStreaming::LoadAllRequestedModels(true);
|
||||||
#endif
|
}
|
||||||
CTimer::Update();
|
CTimer::Update();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -10924,7 +10930,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
|
|||||||
#ifdef USE_MEASUREMENTS_IN_METERS
|
#ifdef USE_MEASUREMENTS_IN_METERS
|
||||||
UpdateCompareFlag(true);
|
UpdateCompareFlag(true);
|
||||||
#else
|
#else
|
||||||
UpdateCompareFlag(false)
|
UpdateCompareFlag(false);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
case COMMAND_CONVERT_METRES_TO_FEET:
|
case COMMAND_CONVERT_METRES_TO_FEET:
|
||||||
@ -11277,24 +11283,40 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
|
|||||||
CTimer::Stop();
|
CTimer::Stop();
|
||||||
CGame::currLevel = (eLevelName)ScriptParams[0];
|
CGame::currLevel = (eLevelName)ScriptParams[0];
|
||||||
if (CGame::currLevel != CCollision::ms_collisionInMemory) {
|
if (CGame::currLevel != CCollision::ms_collisionInMemory) {
|
||||||
#ifndef NO_ISLAND_LOADING
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
DMAudio.SetEffectsFadeVol(0);
|
DMAudio.SetEffectsFadeVol(0);
|
||||||
CPad::StopPadsShaking();
|
CPad::StopPadsShaking();
|
||||||
CCollision::LoadCollisionScreen(CGame::currLevel);
|
CCollision::LoadCollisionScreen(CGame::currLevel);
|
||||||
DMAudio.Service();
|
DMAudio.Service();
|
||||||
#endif
|
}
|
||||||
CPopulation::DealWithZoneChange(CCollision::ms_collisionInMemory, CGame::currLevel, false);
|
CPopulation::DealWithZoneChange(CCollision::ms_collisionInMemory, CGame::currLevel, false);
|
||||||
#ifndef NO_ISLAND_LOADING
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
||||||
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
||||||
#endif
|
}
|
||||||
CCollision::SortOutCollisionAfterLoad();
|
CCollision::SortOutCollisionAfterLoad();
|
||||||
#ifndef NO_ISLAND_LOADING
|
#ifdef NO_ISLAND_LOADING
|
||||||
CStreaming::RequestIslands(CGame::currLevel);
|
if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
|
||||||
CStreaming::RequestBigBuildings(CGame::currLevel);
|
|
||||||
CStreaming::LoadAllRequestedModels(true);
|
|
||||||
DMAudio.SetEffectsFadeVol(127);
|
|
||||||
#endif
|
#endif
|
||||||
|
CStreaming::RequestIslands(CGame::currLevel);
|
||||||
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
||||||
|
#endif
|
||||||
|
CStreaming::RequestBigBuildings(CGame::currLevel);
|
||||||
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_HIGH)
|
||||||
|
#endif
|
||||||
|
CStreaming::LoadAllRequestedModels(true);
|
||||||
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_LOW)
|
||||||
|
#endif
|
||||||
|
DMAudio.SetEffectsFadeVol(127);
|
||||||
}
|
}
|
||||||
CTimer::Update();
|
CTimer::Update();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -290,7 +290,7 @@ CMenuManager::ThingsToDoBeforeLeavingPage()
|
|||||||
DMAudio.StopFrontEndTrack();
|
DMAudio.StopFrontEndTrack();
|
||||||
OutputDebugString("FRONTEND AUDIO TRACK STOPPED");
|
OutputDebugString("FRONTEND AUDIO TRACK STOPPED");
|
||||||
#endif
|
#endif
|
||||||
} else if (m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) {
|
} else if (m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
|
||||||
m_nDisplayVideoMode = m_nPrefsVideoMode;
|
m_nDisplayVideoMode = m_nPrefsVideoMode;
|
||||||
#ifdef IMPROVED_VIDEOMODE
|
#ifdef IMPROVED_VIDEOMODE
|
||||||
m_nSelectedScreenMode = m_nPrefsWindowed;
|
m_nSelectedScreenMode = m_nPrefsWindowed;
|
||||||
@ -300,48 +300,13 @@ CMenuManager::ThingsToDoBeforeLeavingPage()
|
|||||||
if (m_nCurrScreen == MENUPAGE_SKIN_SELECT) {
|
if (m_nCurrScreen == MENUPAGE_SKIN_SELECT) {
|
||||||
CPlayerSkin::EndFrontendSkinEdit();
|
CPlayerSkin::EndFrontendSkinEdit();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
|
||||||
for (int i = 0; i < numCustomFrontendOptions; i++) {
|
|
||||||
FrontendOption& option = customFrontendOptions[i];
|
|
||||||
if (option.type != FEOPTION_REDIRECT && option.type != FEOPTION_GOBACK && m_nCurrScreen == option.screen) {
|
|
||||||
if (option.returnPrevPageFunc)
|
|
||||||
option.returnPrevPageFunc();
|
|
||||||
|
|
||||||
if (m_nCurrOption == option.screenOptionOrder && option.type == FEOPTION_DYNAMIC)
|
|
||||||
option.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
|
|
||||||
|
|
||||||
if (option.onlyApplyOnEnter)
|
|
||||||
option.displayedValue = *option.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int8
|
int8
|
||||||
CMenuManager::GetPreviousPageOption()
|
CMenuManager::GetPreviousPageOption()
|
||||||
{
|
{
|
||||||
#ifndef CUSTOM_FRONTEND_OPTIONS
|
|
||||||
return (!m_bGameNotLoaded ? aScreens[m_nCurrScreen].m_ParentEntry :
|
return (!m_bGameNotLoaded ? aScreens[m_nCurrScreen].m_ParentEntry :
|
||||||
(m_nCurrScreen == MENUPAGE_NEW_GAME ? 0 : (m_nCurrScreen == MENUPAGE_OPTIONS ? 1 : (m_nCurrScreen == MENUPAGE_EXIT ? 2 : aScreens[m_nCurrScreen].m_ParentEntry))));
|
(m_nCurrScreen == MENUPAGE_NEW_GAME ? 0 : (m_nCurrScreen == MENUPAGE_OPTIONS ? 1 : (m_nCurrScreen == MENUPAGE_EXIT ? 2 : aScreens[m_nCurrScreen].m_ParentEntry))));
|
||||||
#else
|
|
||||||
int8 prevPage = aScreens[m_nCurrScreen].m_PreviousPage;
|
|
||||||
|
|
||||||
if (prevPage == -1) // Game also does same
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
prevPage = prevPage == MENUPAGE_NONE ? (!m_bGameNotLoaded ? MENUPAGE_PAUSE_MENU : MENUPAGE_START_MENU) : prevPage;
|
|
||||||
|
|
||||||
for (int i = 0; i < NUM_MENUROWS; i++) {
|
|
||||||
if (aScreens[prevPage].m_aEntries[i].m_TargetMenu == m_nCurrScreen) {
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Couldn't find current screen option on previous page, use default behaviour (maybe save-related screen?)
|
|
||||||
return (!m_bGameNotLoaded ? aScreens[m_nCurrScreen].m_ParentEntry :
|
|
||||||
(m_nCurrScreen == MENUPAGE_NEW_GAME ? 0 : (m_nCurrScreen == MENUPAGE_OPTIONS ? 1 : (m_nCurrScreen == MENUPAGE_EXIT ? 2 : aScreens[m_nCurrScreen].m_ParentEntry))));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------ Functions not in the game/inlined ends
|
// ------ Functions not in the game/inlined ends
|
||||||
@ -1139,7 +1104,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef IMPROVED_VIDEOMODE
|
#ifdef IMPROVED_VIDEOMODE
|
||||||
case MENUACTION_SCREENMODE:
|
case MENUACTION_SCREENFORMAT:
|
||||||
if (m_nSelectedScreenMode == 0)
|
if (m_nSelectedScreenMode == 0)
|
||||||
sprintf(asciiTemp, "FULLSCREEN");
|
sprintf(asciiTemp, "FULLSCREEN");
|
||||||
else
|
else
|
||||||
@ -1210,32 +1175,6 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
|
|||||||
rightText = TheText.Get("FEA_NM3");
|
rightText = TheText.Get("FEA_NM3");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
|
||||||
case MENUACTION_TRIGGERFUNC:
|
|
||||||
FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
|
|
||||||
if (m_nCurrScreen == option.screen && i == option.screenOptionOrder) {
|
|
||||||
leftText = (wchar*)option.leftText;
|
|
||||||
if (option.type == FEOPTION_SELECT) {
|
|
||||||
if (option.displayedValue >= option.numRightTexts || option.displayedValue < 0)
|
|
||||||
option.displayedValue = 0;
|
|
||||||
|
|
||||||
rightText = (wchar*)option.rightTexts[option.displayedValue];
|
|
||||||
|
|
||||||
} else if (option.type == FEOPTION_DYNAMIC) {
|
|
||||||
if (option.drawFunc) {
|
|
||||||
bool isOptionDisabled = false;
|
|
||||||
rightText = option.drawFunc(&isOptionDisabled);
|
|
||||||
if (isOptionDisabled)
|
|
||||||
CFont::SetColor(CRGBA(DARKMENUOPTION_COLOR.r, DARKMENUOPTION_COLOR.g, DARKMENUOPTION_COLOR.b, FadeIn(255)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
debug("A- screen:%d option:%d - totalCo: %d, coId: %d, coScreen:%d, coOption:%d\n", m_nCurrScreen, i, numCustomFrontendOptions, aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu, option.screen, option.screenOptionOrder);
|
|
||||||
assert(0 && "Custom frontend options is borked");
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Highlight trapezoid
|
// Highlight trapezoid
|
||||||
@ -1377,7 +1316,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
|
|||||||
}
|
}
|
||||||
if (m_nDisplayVideoMode != m_nPrefsVideoMode) {
|
if (m_nDisplayVideoMode != m_nPrefsVideoMode) {
|
||||||
if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_RES") != 0
|
if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_RES") != 0
|
||||||
&& m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) {
|
&& m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
|
||||||
m_nDisplayVideoMode = m_nPrefsVideoMode;
|
m_nDisplayVideoMode = m_nPrefsVideoMode;
|
||||||
SetHelperText(3);
|
SetHelperText(3);
|
||||||
}
|
}
|
||||||
@ -1385,29 +1324,11 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
|
|||||||
#ifdef IMPROVED_VIDEOMODE
|
#ifdef IMPROVED_VIDEOMODE
|
||||||
if (m_nSelectedScreenMode != m_nPrefsWindowed) {
|
if (m_nSelectedScreenMode != m_nPrefsWindowed) {
|
||||||
if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_POS") != 0
|
if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FED_POS") != 0
|
||||||
&& m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) {
|
&& m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
|
||||||
m_nSelectedScreenMode = m_nPrefsWindowed;
|
m_nSelectedScreenMode = m_nPrefsWindowed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
|
||||||
static int lastOption = m_nCurrOption;
|
|
||||||
|
|
||||||
if (aScreens[m_nCurrScreen].m_aEntries[i].m_Action == MENUACTION_TRIGGERFUNC) {
|
|
||||||
FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
|
|
||||||
if (option.onlyApplyOnEnter && m_nCurrOption != i)
|
|
||||||
option.displayedValue = *option.value;
|
|
||||||
|
|
||||||
if (m_nCurrOption != lastOption && lastOption == i) {
|
|
||||||
FrontendOption& oldOption = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[lastOption].m_TargetMenu];
|
|
||||||
if (oldOption.type == FEOPTION_DYNAMIC)
|
|
||||||
oldOption.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i == MAX_MENUROWS - 1 || aScreens[m_nCurrScreen].m_aEntries[i + 1].m_EntryName[0] == '\0')
|
|
||||||
lastOption = m_nCurrOption;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// TODO(Miami): check
|
// TODO(Miami): check
|
||||||
// Sliders
|
// Sliders
|
||||||
@ -1464,7 +1385,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
|
|||||||
case MENUPAGE_STATS:
|
case MENUPAGE_STATS:
|
||||||
case MENUPAGE_CONTROLLER_PC:
|
case MENUPAGE_CONTROLLER_PC:
|
||||||
case MENUPAGE_SOUND_SETTINGS:
|
case MENUPAGE_SOUND_SETTINGS:
|
||||||
case MENUPAGE_GRAPHICS_SETTINGS:
|
case MENUPAGE_DISPLAY_SETTINGS:
|
||||||
case MENUPAGE_MOUSE_CONTROLS:
|
case MENUPAGE_MOUSE_CONTROLS:
|
||||||
DisplayHelperText(nil);
|
DisplayHelperText(nil);
|
||||||
break;
|
break;
|
||||||
@ -2140,7 +2061,7 @@ CMenuManager::DrawFrontEnd()
|
|||||||
bbNames[0] = { "FEB_SAV",MENUPAGE_NEW_GAME };
|
bbNames[0] = { "FEB_SAV",MENUPAGE_NEW_GAME };
|
||||||
bbNames[1] = { "FEB_CON",MENUPAGE_CONTROLLER_PC };
|
bbNames[1] = { "FEB_CON",MENUPAGE_CONTROLLER_PC };
|
||||||
bbNames[2] = { "FEB_AUD",MENUPAGE_SOUND_SETTINGS };
|
bbNames[2] = { "FEB_AUD",MENUPAGE_SOUND_SETTINGS };
|
||||||
bbNames[3] = { "FEB_DIS",MENUPAGE_GRAPHICS_SETTINGS };
|
bbNames[3] = { "FEB_DIS",MENUPAGE_DISPLAY_SETTINGS };
|
||||||
bbNames[4] = { "FEB_LAN",MENUPAGE_LANGUAGE_SETTINGS };
|
bbNames[4] = { "FEB_LAN",MENUPAGE_LANGUAGE_SETTINGS };
|
||||||
bbNames[5] = { "FESZ_QU",MENUPAGE_EXIT };
|
bbNames[5] = { "FESZ_QU",MENUPAGE_EXIT };
|
||||||
bbTabCount = 6;
|
bbTabCount = 6;
|
||||||
@ -2152,7 +2073,7 @@ CMenuManager::DrawFrontEnd()
|
|||||||
bbNames[2] = { "FEB_BRI",MENUPAGE_BRIEFS };
|
bbNames[2] = { "FEB_BRI",MENUPAGE_BRIEFS };
|
||||||
bbNames[3] = { "FEB_CON",MENUPAGE_CONTROLLER_PC };
|
bbNames[3] = { "FEB_CON",MENUPAGE_CONTROLLER_PC };
|
||||||
bbNames[4] = { "FEB_AUD",MENUPAGE_SOUND_SETTINGS };
|
bbNames[4] = { "FEB_AUD",MENUPAGE_SOUND_SETTINGS };
|
||||||
bbNames[5] = { "FEB_DIS",MENUPAGE_GRAPHICS_SETTINGS };
|
bbNames[5] = { "FEB_DIS",MENUPAGE_DISPLAY_SETTINGS };
|
||||||
bbNames[6] = { "FEB_LAN",MENUPAGE_LANGUAGE_SETTINGS };
|
bbNames[6] = { "FEB_LAN",MENUPAGE_LANGUAGE_SETTINGS };
|
||||||
bbNames[7] = { "FESZ_QU",MENUPAGE_EXIT };
|
bbNames[7] = { "FESZ_QU",MENUPAGE_EXIT };
|
||||||
bbTabCount = 8;
|
bbTabCount = 8;
|
||||||
@ -2225,7 +2146,7 @@ CMenuManager::DrawBackground()
|
|||||||
case MENUPAGE_DELETE_SLOT_CONFIRM:
|
case MENUPAGE_DELETE_SLOT_CONFIRM:
|
||||||
currentSprite = FE_ICONSAVE;
|
currentSprite = FE_ICONSAVE;
|
||||||
break;
|
break;
|
||||||
case MENUPAGE_GRAPHICS_SETTINGS:
|
case MENUPAGE_DISPLAY_SETTINGS:
|
||||||
currentSprite = FE_ICONDISPLAY;
|
currentSprite = FE_ICONDISPLAY;
|
||||||
break;
|
break;
|
||||||
case MENUPAGE_SOUND_SETTINGS:
|
case MENUPAGE_SOUND_SETTINGS:
|
||||||
@ -2471,7 +2392,7 @@ CMenuManager::DrawBackground(bool transitionCall)
|
|||||||
menuBg.bottomRight_y = 398.0f;
|
menuBg.bottomRight_y = 398.0f;
|
||||||
break;
|
break;
|
||||||
case MENUPAGE_BRIEFS:
|
case MENUPAGE_BRIEFS:
|
||||||
case MENUPAGE_GRAPHICS_SETTINGS:
|
case MENUPAGE_DISPLAY_SETTINGS:
|
||||||
case MENUPAGE_MAP:
|
case MENUPAGE_MAP:
|
||||||
case MENUPAGE_CHOOSE_LOAD_SLOT:
|
case MENUPAGE_CHOOSE_LOAD_SLOT:
|
||||||
case MENUPAGE_CHOOSE_DELETE_SLOT:
|
case MENUPAGE_CHOOSE_DELETE_SLOT:
|
||||||
@ -3106,9 +3027,6 @@ CMenuManager::InitialiseChangedLanguageSettings()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
|
||||||
CustomFrontendOptionsPopulate();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4040,7 +3958,7 @@ CMenuManager::UserInput(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (changeValueBy != 0) {
|
if (changeValueBy != 0) {
|
||||||
if ((m_nCurrScreen == MENUPAGE_SOUND_SETTINGS || m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS || m_nCurrScreen == MENUPAGE_CONTROLLER_PC || m_nCurrScreen == MENUPAGE_MOUSE_CONTROLS)
|
if ((m_nCurrScreen == MENUPAGE_SOUND_SETTINGS || m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS || m_nCurrScreen == MENUPAGE_CONTROLLER_PC || m_nCurrScreen == MENUPAGE_MOUSE_CONTROLS)
|
||||||
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_NOTHING
|
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_NOTHING
|
||||||
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_LABEL
|
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_LABEL
|
||||||
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_YES
|
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_YES
|
||||||
@ -4419,7 +4337,7 @@ CMenuManager::ProcessButtonPresses(uint8 goDown, uint8 goUp, uint8 optionSelecte
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef IMPROVED_VIDEOMODE
|
#ifdef IMPROVED_VIDEOMODE
|
||||||
case MENUACTION_SCREENMODE:
|
case MENUACTION_SCREENFORMAT:
|
||||||
if (m_nSelectedScreenMode != m_nPrefsWindowed) {
|
if (m_nSelectedScreenMode != m_nPrefsWindowed) {
|
||||||
m_nPrefsWindowed = m_nSelectedScreenMode;
|
m_nPrefsWindowed = m_nSelectedScreenMode;
|
||||||
_psSelectScreenVM(m_nPrefsVideoMode); // apply same resolution
|
_psSelectScreenVM(m_nPrefsVideoMode); // apply same resolution
|
||||||
@ -4471,7 +4389,7 @@ CMenuManager::ProcessButtonPresses(uint8 goDown, uint8 goUp, uint8 optionSelecte
|
|||||||
DMAudio.SetRadioInCar(m_PrefsRadioStation);
|
DMAudio.SetRadioInCar(m_PrefsRadioStation);
|
||||||
DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
|
DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
} else if (m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) {
|
} else if (m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
|
||||||
m_PrefsBrightness = 256;
|
m_PrefsBrightness = 256;
|
||||||
m_PrefsLOD = 1.2f;
|
m_PrefsLOD = 1.2f;
|
||||||
#ifdef LEGACY_MENU_OPTIONS
|
#ifdef LEGACY_MENU_OPTIONS
|
||||||
@ -4541,33 +4459,6 @@ CMenuManager::ProcessButtonPresses(uint8 goDown, uint8 goUp, uint8 optionSelecte
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
|
||||||
case MENUACTION_TRIGGERFUNC:
|
|
||||||
FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu];
|
|
||||||
if (m_nCurrScreen == option.screen && m_nCurrOption == option.screenOptionOrder) {
|
|
||||||
if (option.type == FEOPTION_SELECT) {
|
|
||||||
if (!option.onlyApplyOnEnter) {
|
|
||||||
option.displayedValue++;
|
|
||||||
if (option.displayedValue >= option.numRightTexts || option.displayedValue < 0)
|
|
||||||
option.displayedValue = 0;
|
|
||||||
}
|
|
||||||
option.changeFunc(option.displayedValue);
|
|
||||||
*option.value = option.displayedValue;
|
|
||||||
|
|
||||||
} else if (option.type == FEOPTION_DYNAMIC) {
|
|
||||||
option.buttonPressFunc(FEOPTION_ACTION_SELECT);
|
|
||||||
} else if (option.type == FEOPTION_REDIRECT) {
|
|
||||||
ChangeScreen(option.to, option.option, true, option.fadeIn);
|
|
||||||
} else if (option.type == FEOPTION_GOBACK) {
|
|
||||||
goBack = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
debug("B- screen:%d option:%d - totalCo: %d, coId: %d, coScreen:%d, coOption:%d\n", m_nCurrScreen, m_nCurrOption, numCustomFrontendOptions, aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu, option.screen, option.screenOptionOrder);
|
|
||||||
assert(0 && "Custom frontend options are borked");
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ProcessOnOffMenuOptions();
|
ProcessOnOffMenuOptions();
|
||||||
@ -4699,7 +4590,7 @@ CMenuManager::ProcessButtonPresses(uint8 goDown, uint8 goUp, uint8 optionSelecte
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef IMPROVED_VIDEOMODE
|
#ifdef IMPROVED_VIDEOMODE
|
||||||
case MENUACTION_SCREENMODE:
|
case MENUACTION_SCREENFORMAT:
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
||||||
m_nSelectedScreenMode = !m_nSelectedScreenMode;
|
m_nSelectedScreenMode = !m_nSelectedScreenMode;
|
||||||
break;
|
break;
|
||||||
@ -4726,36 +4617,6 @@ CMenuManager::ProcessButtonPresses(uint8 goDown, uint8 goUp, uint8 optionSelecte
|
|||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
break;
|
break;
|
||||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
|
||||||
case MENUACTION_TRIGGERFUNC:
|
|
||||||
FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu];
|
|
||||||
if (m_nCurrScreen == option.screen && m_nCurrOption == option.screenOptionOrder) {
|
|
||||||
if (option.type == FEOPTION_SELECT) {
|
|
||||||
if (changeAmount > 0) {
|
|
||||||
option.displayedValue++;
|
|
||||||
if (option.displayedValue >= option.numRightTexts)
|
|
||||||
option.displayedValue = 0;
|
|
||||||
} else {
|
|
||||||
option.displayedValue--;
|
|
||||||
if (option.displayedValue < 0)
|
|
||||||
option.displayedValue = option.numRightTexts - 1;
|
|
||||||
}
|
|
||||||
if (!option.onlyApplyOnEnter) {
|
|
||||||
option.changeFunc(option.displayedValue);
|
|
||||||
*option.value = option.displayedValue;
|
|
||||||
}
|
|
||||||
} else if (option.type == FEOPTION_DYNAMIC) {
|
|
||||||
option.buttonPressFunc(changeAmount > 0 ? FEOPTION_ACTION_RIGHT : FEOPTION_ACTION_LEFT);
|
|
||||||
}
|
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
debug("C- screen:%d option:%d - totalCo: %d, coId: %d, coScreen:%d, coOption:%d\n", m_nCurrScreen, m_nCurrOption, numCustomFrontendOptions, aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu, option.screen, option.screenOptionOrder);
|
|
||||||
assert(0 && "Custom frontend options are borked");
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
CheckSliderMovement(changeAmount);
|
CheckSliderMovement(changeAmount);
|
||||||
ProcessOnOffMenuOptions();
|
ProcessOnOffMenuOptions();
|
||||||
|
@ -160,7 +160,7 @@ enum eMenuScreen
|
|||||||
MENUPAGE_NEW_GAME = 1,
|
MENUPAGE_NEW_GAME = 1,
|
||||||
MENUPAGE_BRIEFS = 2,
|
MENUPAGE_BRIEFS = 2,
|
||||||
MENUPAGE_SOUND_SETTINGS = 3,
|
MENUPAGE_SOUND_SETTINGS = 3,
|
||||||
MENUPAGE_GRAPHICS_SETTINGS = 4,
|
MENUPAGE_DISPLAY_SETTINGS = 4,
|
||||||
MENUPAGE_LANGUAGE_SETTINGS = 5,
|
MENUPAGE_LANGUAGE_SETTINGS = 5,
|
||||||
MENUPAGE_MAP = 6,
|
MENUPAGE_MAP = 6,
|
||||||
MENUPAGE_NEW_GAME_RELOAD = 7,
|
MENUPAGE_NEW_GAME_RELOAD = 7,
|
||||||
@ -199,6 +199,9 @@ enum eMenuScreen
|
|||||||
MENUPAGE_CONTROLLER_PC_OLD3,
|
MENUPAGE_CONTROLLER_PC_OLD3,
|
||||||
MENUPAGE_CONTROLLER_PC_OLD4,
|
MENUPAGE_CONTROLLER_PC_OLD4,
|
||||||
MENUPAGE_CONTROLLER_DEBUG,
|
MENUPAGE_CONTROLLER_DEBUG,
|
||||||
|
#endif
|
||||||
|
#ifdef GRAPHICS_MENU_OPTIONS
|
||||||
|
MENUPAGE_GRAPHICS_SETTINGS,
|
||||||
#endif
|
#endif
|
||||||
MENUPAGES
|
MENUPAGES
|
||||||
};
|
};
|
||||||
@ -266,12 +269,28 @@ enum eMenuAction
|
|||||||
MENUACTION_MOUSESTEER,
|
MENUACTION_MOUSESTEER,
|
||||||
MENUACTION_UNK110,
|
MENUACTION_UNK110,
|
||||||
#ifdef IMPROVED_VIDEOMODE
|
#ifdef IMPROVED_VIDEOMODE
|
||||||
MENUACTION_SCREENMODE,
|
MENUACTION_SCREENFORMAT,
|
||||||
#endif
|
#endif
|
||||||
#ifdef LEGACY_MENU_OPTIONS
|
#ifdef LEGACY_MENU_OPTIONS
|
||||||
MENUACTION_CTRLVIBRATION,
|
MENUACTION_CTRLVIBRATION,
|
||||||
MENUACTION_CTRLCONFIG,
|
MENUACTION_CTRLCONFIG,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ANISOTROPIC_FILTERING
|
||||||
|
MENUACTION_MIPMAPS,
|
||||||
|
MENUACTION_TEXTURE_FILTERING,
|
||||||
|
#endif
|
||||||
|
#ifdef MULTISAMPLING
|
||||||
|
MENUACTION_MULTISAMPLING,
|
||||||
|
#endif
|
||||||
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
MENUACTION_ISLANDLOADING,
|
||||||
|
#endif
|
||||||
|
#ifdef PS2_ALPHA_TEST
|
||||||
|
MENUACTION_PS2_ALPHA_TEST,
|
||||||
|
#endif
|
||||||
|
#ifdef CUTSCENE_BORDERS_SWITCH
|
||||||
|
MENUACTION_CUTSCENEBORDERS,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
enum eCheckHover
|
enum eCheckHover
|
||||||
@ -576,6 +595,10 @@ public:
|
|||||||
int32 m_nPrefsSubsystem;
|
int32 m_nPrefsSubsystem;
|
||||||
int32 m_nSelectedScreenMode;
|
int32 m_nSelectedScreenMode;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef MULTISAMPLING
|
||||||
|
static int8 m_nPrefsMSAALevel;
|
||||||
|
static int8 m_nDisplayMSAALevel;
|
||||||
|
#endif
|
||||||
|
|
||||||
enum LANGUAGE
|
enum LANGUAGE
|
||||||
{
|
{
|
||||||
@ -604,6 +627,18 @@ public:
|
|||||||
CMenuManager(void);
|
CMenuManager(void);
|
||||||
~CMenuManager(void) { UnloadTextures(); }
|
~CMenuManager(void) { UnloadTextures(); }
|
||||||
|
|
||||||
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
ISLAND_LOADING_LOW = 0,
|
||||||
|
ISLAND_LOADING_MEDIUM,
|
||||||
|
ISLAND_LOADING_HIGH
|
||||||
|
};
|
||||||
|
|
||||||
|
static int8 m_DisplayIslandLoading;
|
||||||
|
static int8 m_PrefsIslandLoading;
|
||||||
|
#endif
|
||||||
|
|
||||||
void Initialise();
|
void Initialise();
|
||||||
void PrintMap();
|
void PrintMap();
|
||||||
void SetFrontEndRenderStates();
|
void SetFrontEndRenderStates();
|
||||||
|
@ -293,10 +293,6 @@ bool CGame::InitialiseOnceAfterRW(void)
|
|||||||
DMAudio.SetEffectsFadeVol(127);
|
DMAudio.SetEffectsFadeVol(127);
|
||||||
DMAudio.SetMusicFadeVol(127);
|
DMAudio.SetMusicFadeVol(127);
|
||||||
CWorld::Players[0].SetPlayerSkin(FrontEndMenuManager.m_PrefsSkinFile);
|
CWorld::Players[0].SetPlayerSkin(FrontEndMenuManager.m_PrefsSkinFile);
|
||||||
|
|
||||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
|
||||||
CustomFrontendOptionsPopulate();
|
|
||||||
#endif
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,43 @@
|
|||||||
#include "Frontend.h"
|
#include "Frontend.h"
|
||||||
#ifdef PC_MENU
|
#ifdef PC_MENU
|
||||||
|
|
||||||
// If you want to add new options, please don't do that here and see CustomFrontendOptionsPopulate in re3.cpp.
|
#ifdef CUTSCENE_BORDERS_SWITCH
|
||||||
|
#define MENU_CUTSCENE_BORDERS_SWITCH(screen) MENUACTION_CUTSCENEBORDERS, "FEM_CSB", SAVESLOT_NONE, screen,
|
||||||
|
#else
|
||||||
|
#define MENU_CUTSCENE_BORDERS_SWITCH(screen)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef IMPROVED_VIDEOMODE
|
||||||
|
#define MENU_IMPROVED_VIDEOMODE(screen) MENUACTION_SCREENFORMAT, "FEM_SCF", SAVESLOT_NONE, screen,
|
||||||
|
#else
|
||||||
|
#define MENU_IMPROVED_VIDEOMODE(screen)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef ANISOTROPIC_FILTERING
|
||||||
|
#define MENU_MIPMAPS(screen) MENUACTION_MIPMAPS, "FED_MIP", SAVESLOT_NONE, screen,
|
||||||
|
#define MENU_TEXTURE_FILTERING(screen) MENUACTION_TEXTURE_FILTERING, "FED_FIL", SAVESLOT_NONE, screen,
|
||||||
|
#else
|
||||||
|
#define MENU_MIPMAPS(screen)
|
||||||
|
#define MENU_TEXTURE_FILTERING(screen)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MULTISAMPLING
|
||||||
|
#define MENU_MULTISAMPLING(screen) MENUACTION_MULTISAMPLING, "FED_AAS", SAVESLOT_NONE, screen,
|
||||||
|
#else
|
||||||
|
#define MENU_MULTISAMPLING(screen)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
#define MENU_ISLAND_LOADING(screen) MENUACTION_ISLANDLOADING, "FEM_ISL", SAVESLOT_NONE, screen,
|
||||||
|
#else
|
||||||
|
#define MENU_ISLAND_LOADING(screen)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PS2_ALPHA_TEST
|
||||||
|
#define MENU_PS2_ALPHA_TEST(screen) MENUACTION_PS2_ALPHA_TEST, "FEM_2PR", SAVESLOT_NONE, screen,
|
||||||
|
#else
|
||||||
|
#define MENU_PS2_ALPHA_TEST(screen)
|
||||||
|
#endif
|
||||||
|
|
||||||
CMenuScreen aScreens[] = {
|
CMenuScreen aScreens[] = {
|
||||||
// MENUPAGE_STATS = 0
|
// MENUPAGE_STATS = 0
|
||||||
@ -44,24 +80,24 @@ CMenuScreen aScreens[] = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
{ "FEH_DIS", MENUPAGE_OPTIONS, 2,
|
{ "FEH_DIS", MENUPAGE_OPTIONS, 2,
|
||||||
MENUACTION_BRIGHTNESS, "FED_BRI", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 40, 78, MENUALIGN_LEFT,
|
MENUACTION_BRIGHTNESS, "FED_BRI", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 78, MENUALIGN_LEFT,
|
||||||
MENUACTION_DRAWDIST, "FEM_LOD", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 40, 103, MENUALIGN_LEFT,
|
MENUACTION_DRAWDIST, "FEM_LOD", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 103, MENUALIGN_LEFT,
|
||||||
#ifdef LEGACY_MENU_OPTIONS
|
#ifdef LEGACY_MENU_OPTIONS
|
||||||
MENUACTION_FRAMESYNC, "FEM_VSC", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 40, 128, MENUALIGN_LEFT,
|
MENUACTION_FRAMESYNC, "FEM_VSC", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 128, MENUALIGN_LEFT,
|
||||||
#endif
|
#endif
|
||||||
MENUACTION_FRAMELIMIT, "FEM_FRM", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 40, 128 + Y_OFFSET/2, MENUALIGN_LEFT,
|
MENUACTION_FRAMELIMIT, "FEM_FRM", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 128 + Y_OFFSET/2, MENUALIGN_LEFT,
|
||||||
#ifdef LEGACY_MENU_OPTIONS
|
#ifdef LEGACY_MENU_OPTIONS
|
||||||
MENUACTION_TRAILS, "FED_TRA", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 40, 178, MENUALIGN_LEFT,
|
MENUACTION_TRAILS, "FED_TRA", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 178, MENUALIGN_LEFT,
|
||||||
#endif
|
#endif
|
||||||
MENUACTION_SUBTITLES, "FED_SUB", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 40, 153 + Y_OFFSET, MENUALIGN_LEFT,
|
MENUACTION_SUBTITLES, "FED_SUB", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 153 + Y_OFFSET, MENUALIGN_LEFT,
|
||||||
MENUACTION_WIDESCREEN, "FED_WIS", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 40, 178 + Y_OFFSET, MENUALIGN_LEFT,
|
MENUACTION_WIDESCREEN, "FED_WIS", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 178 + Y_OFFSET, MENUALIGN_LEFT,
|
||||||
MENUACTION_LEGENDS, "MAP_LEG", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 40, 202 + Y_OFFSET, MENUALIGN_LEFT,
|
MENUACTION_LEGENDS, "MAP_LEG", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 202 + Y_OFFSET, MENUALIGN_LEFT,
|
||||||
MENUACTION_RADARMODE, "FED_RDR", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 40, 228 + Y_OFFSET, MENUALIGN_LEFT,
|
MENUACTION_RADARMODE, "FED_RDR", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 228 + Y_OFFSET, MENUALIGN_LEFT,
|
||||||
MENUACTION_HUD, "FED_HUD", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 40, 253 + Y_OFFSET, MENUALIGN_LEFT,
|
MENUACTION_HUD, "FED_HUD", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 253 + Y_OFFSET, MENUALIGN_LEFT,
|
||||||
MENUACTION_SCREENRES, "FED_RES", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 40, 278 + Y_OFFSET, MENUALIGN_LEFT,
|
MENUACTION_SCREENRES, "FED_RES", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 278 + Y_OFFSET, MENUALIGN_LEFT,
|
||||||
#ifdef IMPROVED_VIDEOMODE
|
#ifdef IMPROVED_VIDEOMODE
|
||||||
MENUACTION_SCREENMODE, "FED_POS", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 40, 303 + Y_OFFSET, MENUALIGN_LEFT,
|
MENUACTION_SCREENFORMAT,"FED_POS", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 40, 303 + Y_OFFSET, MENUALIGN_LEFT,
|
||||||
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 320, 328 + Y_OFFSET, MENUALIGN_CENTER,
|
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 320, 328 + Y_OFFSET, MENUALIGN_CENTER,
|
||||||
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 320, 353 + Y_OFFSET, MENUALIGN_CENTER,
|
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 320, 353 + Y_OFFSET, MENUALIGN_CENTER,
|
||||||
#else
|
#else
|
||||||
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 320, 303 + Y_OFFSET, MENUALIGN_CENTER,
|
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 320, 303 + Y_OFFSET, MENUALIGN_CENTER,
|
||||||
@ -230,7 +266,7 @@ CMenuScreen aScreens[] = {
|
|||||||
{ "FET_OPT", MENUPAGE_NONE, 5,
|
{ "FET_OPT", MENUPAGE_NONE, 5,
|
||||||
MENUACTION_CHANGEMENU, "FEO_CON", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, 320, 132, MENUALIGN_CENTER,
|
MENUACTION_CHANGEMENU, "FEO_CON", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, 320, 132, MENUALIGN_CENTER,
|
||||||
MENUACTION_LOADRADIO, "FEO_AUD", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, 0, 0, MENUALIGN_CENTER,
|
MENUACTION_LOADRADIO, "FEO_AUD", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS, 0, 0, MENUALIGN_CENTER,
|
||||||
MENUACTION_CHANGEMENU, "FEO_DIS", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS, 0, 0, MENUALIGN_CENTER,
|
MENUACTION_CHANGEMENU, "FEO_DIS", SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS, 0, 0, MENUALIGN_CENTER,
|
||||||
MENUACTION_CHANGEMENU, "FEO_LAN", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS, 0, 0, MENUALIGN_CENTER,
|
MENUACTION_CHANGEMENU, "FEO_LAN", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS, 0, 0, MENUALIGN_CENTER,
|
||||||
MENUACTION_PLAYERSETUP, "FET_PS", SAVESLOT_NONE, MENUPAGE_SKIN_SELECT, 0, 0, MENUALIGN_CENTER,
|
MENUACTION_PLAYERSETUP, "FET_PS", SAVESLOT_NONE, MENUPAGE_SKIN_SELECT, 0, 0, MENUALIGN_CENTER,
|
||||||
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, 0, 0, 0, MENUALIGN_CENTER,
|
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, 0, 0, 0, MENUALIGN_CENTER,
|
||||||
|
@ -224,8 +224,14 @@ enum Config {
|
|||||||
//#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
|
//#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
|
||||||
//#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
|
//#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
|
||||||
//#define USE_TEXTURE_POOL
|
//#define USE_TEXTURE_POOL
|
||||||
#define CUTSCENE_BORDERS_SWITCH
|
//#define CUTSCENE_BORDERS_SWITCH
|
||||||
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
|
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
|
||||||
|
//#define MULTISAMPLING // adds MSAA option TODO
|
||||||
|
|
||||||
|
#ifdef LIBRW
|
||||||
|
// these are not supported with librw yet
|
||||||
|
# undef MULTISAMPLING
|
||||||
|
#endif
|
||||||
|
|
||||||
// Water & Particle
|
// Water & Particle
|
||||||
#define PC_PARTICLE
|
#define PC_PARTICLE
|
||||||
@ -255,12 +261,13 @@ enum Config {
|
|||||||
#ifndef PC_MENU
|
#ifndef PC_MENU
|
||||||
# define PS2_MENU
|
# define PS2_MENU
|
||||||
//# define PS2_MENU_USEALLPAGEICONS
|
//# define PS2_MENU_USEALLPAGEICONS
|
||||||
#else
|
|
||||||
//# define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc.
|
//# define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc.
|
||||||
|
#else
|
||||||
# define MAP_ENHANCEMENTS // Adding waypoint etc.
|
# define MAP_ENHANCEMENTS // Adding waypoint etc.
|
||||||
# define TRIANGLE_BACK_BUTTON
|
# define TRIANGLE_BACK_BUTTON
|
||||||
//# define CIRCLE_BACK_BUTTON
|
//# define CIRCLE_BACK_BUTTON
|
||||||
//#define CUSTOM_FRONTEND_OPTIONS
|
//#define CUSTOM_FRONTEND_OPTIONS
|
||||||
|
# define GRAPHICS_MENU_OPTIONS
|
||||||
#define LEGACY_MENU_OPTIONS
|
#define LEGACY_MENU_OPTIONS
|
||||||
#define MUCH_SHORTER_OUTRO_SCREEN
|
#define MUCH_SHORTER_OUTRO_SCREEN
|
||||||
|
|
||||||
|
107
src/core/re3.cpp
107
src/core/re3.cpp
@ -74,110 +74,6 @@ mysrand(unsigned int seed)
|
|||||||
myrand_seed = seed;
|
myrand_seed = seed;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
|
||||||
#include "frontendoption.h"
|
|
||||||
#include "platform.h"
|
|
||||||
|
|
||||||
void ReloadFrontendOptions(void)
|
|
||||||
{
|
|
||||||
CustomFrontendOptionsPopulate();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef MORE_LANGUAGES
|
|
||||||
void LangPolSelect(int8 action)
|
|
||||||
{
|
|
||||||
if (action == FEOPTION_ACTION_SELECT) {
|
|
||||||
FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_POLISH;
|
|
||||||
FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
|
|
||||||
FrontEndMenuManager.InitialiseChangedLanguageSettings();
|
|
||||||
FrontEndMenuManager.SaveSettings();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LangRusSelect(int8 action)
|
|
||||||
{
|
|
||||||
if (action == FEOPTION_ACTION_SELECT) {
|
|
||||||
FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_RUSSIAN;
|
|
||||||
FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
|
|
||||||
FrontEndMenuManager.InitialiseChangedLanguageSettings();
|
|
||||||
FrontEndMenuManager.SaveSettings();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LangJapSelect(int8 action)
|
|
||||||
{
|
|
||||||
if (action == FEOPTION_ACTION_SELECT) {
|
|
||||||
FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_JAPANESE;
|
|
||||||
FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
|
|
||||||
FrontEndMenuManager.InitialiseChangedLanguageSettings();
|
|
||||||
FrontEndMenuManager.SaveSettings();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef IMPROVED_VIDEOMODE
|
|
||||||
void ScreenModeChange(int8 displayedValue)
|
|
||||||
{
|
|
||||||
if (displayedValue != FrontEndMenuManager.m_nPrefsWindowed) {
|
|
||||||
FrontEndMenuManager.m_nPrefsWindowed = displayedValue;
|
|
||||||
_psSelectScreenVM(FrontEndMenuManager.m_nPrefsVideoMode); // apply same resolution
|
|
||||||
FrontEndMenuManager.SetHelperText(0);
|
|
||||||
FrontEndMenuManager.SaveSettings();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FREE_CAM
|
|
||||||
void ToggleFreeCam(int8 action)
|
|
||||||
{
|
|
||||||
if (action == FEOPTION_ACTION_SELECT) {
|
|
||||||
TheCamera.bFreeCam = !TheCamera.bFreeCam;
|
|
||||||
FrontEndMenuManager.SaveSettings();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CUTSCENE_BORDERS_SWITCH
|
|
||||||
void BorderModeChange(int8 displayedValue)
|
|
||||||
{
|
|
||||||
CMenuManager::m_PrefsCutsceneBorders = !!displayedValue;
|
|
||||||
FrontEndMenuManager.SaveSettings();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Reloaded on language change, so you can use hardcoded wchar* and TheText.Get with peace of mind
|
|
||||||
void
|
|
||||||
CustomFrontendOptionsPopulate(void)
|
|
||||||
{
|
|
||||||
RemoveCustomFrontendOptions(); // if exist
|
|
||||||
|
|
||||||
#ifdef MORE_LANGUAGES
|
|
||||||
FrontendOptionSetPosition(MENUPAGE_LANGUAGE_SETTINGS);
|
|
||||||
FrontendOptionAddDynamic(TheText.Get("FEL_POL"), nil, LangPolSelect, nil);
|
|
||||||
FrontendOptionAddDynamic(TheText.Get("FEL_RUS"), nil, LangRusSelect, nil);
|
|
||||||
FrontendOptionAddDynamic(TheText.Get("FEL_JAP"), nil, LangJapSelect, nil);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef IMPROVED_VIDEOMODE
|
|
||||||
static const wchar *screenModes[] = { (wchar*)L"FULLSCREEN", (wchar*)L"WINDOWED" };
|
|
||||||
FrontendOptionSetPosition(MENUPAGE_GRAPHICS_SETTINGS, 8);
|
|
||||||
FrontendOptionAddSelect(TheText.Get("SCRFOR"), screenModes, 2, (int8*)&FrontEndMenuManager.m_nPrefsWindowed, true, ScreenModeChange, nil);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FREE_CAM
|
|
||||||
static const wchar *text = (wchar*)L"TOGGLE FREE CAM";
|
|
||||||
FrontendOptionSetPosition(MENUPAGE_CONTROLLER_PC, 1);
|
|
||||||
FrontendOptionAddDynamic(text, nil, ToggleFreeCam, nil);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CUTSCENE_BORDERS_SWITCH
|
|
||||||
static const wchar *off_on[] = { TheText.Get("FEM_OFF"), TheText.Get("FEM_ON") };
|
|
||||||
FrontendOptionSetPosition(MENUPAGE_GRAPHICS_SETTINGS, 9);
|
|
||||||
FrontendOptionAddSelect((const wchar *)L"CUTSCENE BORDERS", off_on, 2, (int8 *)&CMenuManager::m_PrefsCutsceneBorders, false, BorderModeChange, nil);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUGMENU
|
#ifdef DEBUGMENU
|
||||||
void WeaponCheat1();
|
void WeaponCheat1();
|
||||||
void WeaponCheat2();
|
void WeaponCheat2();
|
||||||
@ -553,9 +449,6 @@ DebugMenuPopulate(void)
|
|||||||
|
|
||||||
DebugMenuAddVarBool8("Debug", "Script Heli On", &CHeli::ScriptHeliOn, nil);
|
DebugMenuAddVarBool8("Debug", "Script Heli On", &CHeli::ScriptHeliOn, nil);
|
||||||
|
|
||||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
|
||||||
DebugMenuAddCmd("Debug", "Reload custom frontend options", ReloadFrontendOptions);
|
|
||||||
#endif
|
|
||||||
DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
|
DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
|
||||||
DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
|
DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
|
||||||
|
|
||||||
|
@ -14611,7 +14611,7 @@ CPed::ProcessObjective(void)
|
|||||||
if (m_pMyVehicle) {
|
if (m_pMyVehicle) {
|
||||||
m_pMyVehicle->AutoPilot.m_nCruiseSpeed = 0;
|
m_pMyVehicle->AutoPilot.m_nCruiseSpeed = 0;
|
||||||
} else {
|
} else {
|
||||||
float closestVehDist = 3600.0f;
|
float closestVehDist = SQR(60.0f);
|
||||||
int16 lastVehicle;
|
int16 lastVehicle;
|
||||||
CEntity* vehicles[8];
|
CEntity* vehicles[8];
|
||||||
CWorld::FindObjectsInRange(GetPosition(), 25.0f, true, &lastVehicle, 6, vehicles, false, true, false, false, false);
|
CWorld::FindObjectsInRange(GetPosition(), 25.0f, true, &lastVehicle, 6, vehicles, false, true, false, false, false);
|
||||||
@ -14624,11 +14624,11 @@ CPed::ProcessObjective(void)
|
|||||||
CVector ourSpeed = GetSpeed();
|
CVector ourSpeed = GetSpeed();
|
||||||
*/
|
*/
|
||||||
CVector vehDistVec = nearVeh->GetPosition() - GetPosition();
|
CVector vehDistVec = nearVeh->GetPosition() - GetPosition();
|
||||||
if (vehDistVec.Magnitude() < closestVehDist
|
if (vehDistVec.MagnitudeSqr() < closestVehDist
|
||||||
&& m_pedInObjective->m_pMyVehicle != nearVeh)
|
&& m_pedInObjective->m_pMyVehicle != nearVeh)
|
||||||
{
|
{
|
||||||
foundVeh = nearVeh;
|
foundVeh = nearVeh;
|
||||||
closestVehDist = vehDistVec.Magnitude();
|
closestVehDist = vehDistVec.MagnitudeSqr();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_pMyVehicle = foundVeh;
|
m_pMyVehicle = foundVeh;
|
||||||
|
@ -127,8 +127,7 @@ CPopulation::Initialise()
|
|||||||
void
|
void
|
||||||
CPopulation::RemovePed(CPed *ent)
|
CPopulation::RemovePed(CPed *ent)
|
||||||
{
|
{
|
||||||
// CPed dtor already does that
|
CWorld::Remove((CEntity*)ent);
|
||||||
// CWorld::Remove((CEntity*)ent);
|
|
||||||
delete ent;
|
delete ent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1610,7 +1610,9 @@ psSelectDevice()
|
|||||||
PSGLOBAL(fullScreen) = FALSE;
|
PSGLOBAL(fullScreen) = FALSE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#ifdef MULTISAMPLING
|
||||||
|
RwD3D8EngineSetMultiSamplingLevels(1 << FrontEndMenuManager.m_nPrefsMSAALevel);
|
||||||
|
#endif
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user