mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-27 03:24:15 +01:00
Add ped and car density slider to menu, remove dumb collision "optimization"
This commit is contained in:
parent
e80cbf8bb2
commit
192190769d
@ -94,7 +94,7 @@ int32 CCarCtrl::NumRandomCars;
|
|||||||
int32 CCarCtrl::NumParkedCars;
|
int32 CCarCtrl::NumParkedCars;
|
||||||
int32 CCarCtrl::NumPermanentCars;
|
int32 CCarCtrl::NumPermanentCars;
|
||||||
int8 CCarCtrl::CountDownToCarsAtStart;
|
int8 CCarCtrl::CountDownToCarsAtStart;
|
||||||
int32 CCarCtrl::MaxNumberOfCarsInUse = 12;
|
int32 CCarCtrl::MaxNumberOfCarsInUse = DEFAULT_MAX_NUMBER_OF_CARS;
|
||||||
uint32 CCarCtrl::LastTimeLawEnforcerCreated;
|
uint32 CCarCtrl::LastTimeLawEnforcerCreated;
|
||||||
uint32 CCarCtrl::LastTimeFireTruckCreated;
|
uint32 CCarCtrl::LastTimeFireTruckCreated;
|
||||||
uint32 CCarCtrl::LastTimeAmbulanceCreated;
|
uint32 CCarCtrl::LastTimeAmbulanceCreated;
|
||||||
|
@ -208,6 +208,7 @@ wchar* CMenuManager::m_pDialogText = nil;
|
|||||||
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_X_MARGIN)); \
|
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_X_MARGIN)); \
|
||||||
CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_X_MARGIN));
|
CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_X_MARGIN));
|
||||||
|
|
||||||
|
// value must be between 0.0-1.0
|
||||||
#define ProcessSlider(value, origY, increaseAction, decreaseAction, hoverEndX, onlyWhenHoveringRow) \
|
#define ProcessSlider(value, origY, increaseAction, decreaseAction, hoverEndX, onlyWhenHoveringRow) \
|
||||||
do { \
|
do { \
|
||||||
float y = origY MINUS_SCROLL_OFFSET; \
|
float y = origY MINUS_SCROLL_OFFSET; \
|
||||||
@ -346,7 +347,7 @@ CMenuManager::ThingsToDoBeforeLeavingPage()
|
|||||||
option.m_CFODynamic->buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
|
option.m_CFODynamic->buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
|
||||||
|
|
||||||
if (option.m_Action == MENUACTION_CFO_SELECT && option.m_CFOSelect->onlyApplyOnEnter && option.m_CFOSelect->lastSavedValue != option.m_CFOSelect->displayedValue)
|
if (option.m_Action == MENUACTION_CFO_SELECT && option.m_CFOSelect->onlyApplyOnEnter && option.m_CFOSelect->lastSavedValue != option.m_CFOSelect->displayedValue)
|
||||||
option.m_CFOSelect->displayedValue = *option.m_CFO->value = option.m_CFOSelect->lastSavedValue;
|
option.m_CFOSelect->displayedValue = *(int8*)option.m_CFO->value = option.m_CFOSelect->lastSavedValue;
|
||||||
|
|
||||||
if (aScreens[m_nCurrScreen].returnPrevPageFunc) {
|
if (aScreens[m_nCurrScreen].returnPrevPageFunc) {
|
||||||
aScreens[m_nCurrScreen].returnPrevPageFunc();
|
aScreens[m_nCurrScreen].returnPrevPageFunc();
|
||||||
@ -696,27 +697,33 @@ CMenuManager::CheckSliderMovement(int value)
|
|||||||
{
|
{
|
||||||
switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) {
|
switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) {
|
||||||
case MENUACTION_BRIGHTNESS:
|
case MENUACTION_BRIGHTNESS:
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
m_PrefsBrightness += value * (384 / MENUSLIDER_LOGICAL_BARS);
|
||||||
|
#else
|
||||||
m_PrefsBrightness += value * 24.19f;
|
m_PrefsBrightness += value * 24.19f;
|
||||||
|
#endif
|
||||||
m_PrefsBrightness = Clamp(m_PrefsBrightness, 0, 384);
|
m_PrefsBrightness = Clamp(m_PrefsBrightness, 0, 384);
|
||||||
break;
|
break;
|
||||||
case MENUACTION_DRAWDIST:
|
case MENUACTION_DRAWDIST:
|
||||||
if(value > 0)
|
if(value > 0)
|
||||||
m_PrefsLOD += ((1.8f - 0.925f) / 16.0f);
|
m_PrefsLOD += ((1.8f - 0.925f) / MENUSLIDER_LOGICAL_BARS);
|
||||||
else
|
else
|
||||||
m_PrefsLOD -= ((1.8f - 0.925f) / 16.0f);
|
m_PrefsLOD -= ((1.8f - 0.925f) / MENUSLIDER_LOGICAL_BARS);
|
||||||
m_PrefsLOD = Clamp(m_PrefsLOD, 0.925f, 1.8f);
|
m_PrefsLOD = Clamp(m_PrefsLOD, 0.925f, 1.8f);
|
||||||
CRenderer::ms_lodDistScale = m_PrefsLOD;
|
CRenderer::ms_lodDistScale = m_PrefsLOD;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// I wonder the idea behind clamping those max to 65
|
||||||
case MENUACTION_MUSICVOLUME:
|
case MENUACTION_MUSICVOLUME:
|
||||||
if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
|
if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
|
||||||
m_PrefsMusicVolume += value * (128 / 32);
|
m_PrefsMusicVolume += value * (64 / MENUSLIDER_LOGICAL_BARS);
|
||||||
m_PrefsMusicVolume = Clamp(m_PrefsMusicVolume, 0, 65);
|
m_PrefsMusicVolume = Clamp(m_PrefsMusicVolume, 0, 65);
|
||||||
DMAudio.SetMusicMasterVolume(m_PrefsMusicVolume);
|
DMAudio.SetMusicMasterVolume(m_PrefsMusicVolume);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MENUACTION_SFXVOLUME:
|
case MENUACTION_SFXVOLUME:
|
||||||
if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
|
if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
|
||||||
m_PrefsSfxVolume += value * (128 / 32);
|
m_PrefsSfxVolume += value * (64 / MENUSLIDER_LOGICAL_BARS);
|
||||||
m_PrefsSfxVolume = Clamp(m_PrefsSfxVolume, 0, 65);
|
m_PrefsSfxVolume = Clamp(m_PrefsSfxVolume, 0, 65);
|
||||||
DMAudio.SetEffectsMasterVolume(m_PrefsSfxVolume);
|
DMAudio.SetEffectsMasterVolume(m_PrefsSfxVolume);
|
||||||
}
|
}
|
||||||
@ -724,19 +731,33 @@ CMenuManager::CheckSliderMovement(int value)
|
|||||||
case MENUACTION_MP3VOLUMEBOOST:
|
case MENUACTION_MP3VOLUMEBOOST:
|
||||||
if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
|
if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
|
||||||
if (DMAudio.IsMP3RadioChannelAvailable()) {
|
if (DMAudio.IsMP3RadioChannelAvailable()) {
|
||||||
m_PrefsMP3BoostVolume += value * (128 / 32);
|
m_PrefsMP3BoostVolume += value * (64 / MENUSLIDER_LOGICAL_BARS);
|
||||||
m_PrefsMP3BoostVolume = Clamp(m_PrefsMP3BoostVolume, 0, 65);
|
m_PrefsMP3BoostVolume = Clamp(m_PrefsMP3BoostVolume, 0, 65);
|
||||||
DMAudio.SetMP3BoostVolume(m_PrefsMP3BoostVolume);
|
DMAudio.SetMP3BoostVolume(m_PrefsMP3BoostVolume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MENUACTION_MOUSESENS:
|
case MENUACTION_MOUSESENS:
|
||||||
TheCamera.m_fMouseAccelHorzntl += value * 1.0f/200.0f/15.0f; // ???
|
TheCamera.m_fMouseAccelHorzntl += value * 1.0f/200.0f/15.0f; // probably because diving it to 15 instead of 16(MENUSLIDER_LOGICAL_BARS) had more accurate steps
|
||||||
TheCamera.m_fMouseAccelHorzntl = Clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f/3200.0f, 1.0f/200.0f);
|
TheCamera.m_fMouseAccelHorzntl = Clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f/3200.0f, 1.0f/200.0f);
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl + 0.0005f;
|
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl + 0.0005f;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
case MENUACTION_CFO_SLIDER:
|
||||||
|
{
|
||||||
|
CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption];
|
||||||
|
float oldValue = *(float*)option.m_CFOSlider->value;
|
||||||
|
*(float*)option.m_CFOSlider->value += value * ((option.m_CFOSlider->max - option.m_CFOSlider->min) / MENUSLIDER_LOGICAL_BARS);
|
||||||
|
*(float*)option.m_CFOSlider->value = Clamp(*(float*)option.m_CFOSlider->value, option.m_CFOSlider->min, option.m_CFOSlider->max);
|
||||||
|
|
||||||
|
if (*(float*)option.m_CFOSlider->value != oldValue && option.m_CFOSlider->changeFunc)
|
||||||
|
option.m_CFOSlider->changeFunc(oldValue, *(float*)option.m_CFOSlider->value);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -848,10 +869,10 @@ CMenuManager::DisplaySlider(float x, float y, float mostLeftBarSize, float mostR
|
|||||||
|
|
||||||
int lastActiveBarX = 0;
|
int lastActiveBarX = 0;
|
||||||
float curBarX = 0.0f;
|
float curBarX = 0.0f;
|
||||||
for (int i = 0; i < 16; i++) {
|
for (int i = 0; i < MENUSLIDER_BARS; i++) {
|
||||||
curBarX = i * rectSize/16.0f + x;
|
curBarX = i * rectSize/MENUSLIDER_BARS + x;
|
||||||
|
|
||||||
if (i / 16.0f + 1 / 32.0f < progress) {
|
if (i / (float)MENUSLIDER_BARS + 1 / (MENUSLIDER_BARS * 2.f) < progress) {
|
||||||
color = CRGBA(SLIDERON_COLOR.r, SLIDERON_COLOR.g, SLIDERON_COLOR.b, FadeIn(255));
|
color = CRGBA(SLIDERON_COLOR.r, SLIDERON_COLOR.g, SLIDERON_COLOR.b, FadeIn(255));
|
||||||
lastActiveBarX = curBarX;
|
lastActiveBarX = curBarX;
|
||||||
} else
|
} else
|
||||||
@ -859,7 +880,7 @@ CMenuManager::DisplaySlider(float x, float y, float mostLeftBarSize, float mostR
|
|||||||
|
|
||||||
maxBarHeight = Max(mostLeftBarSize, mostRightBarSize);
|
maxBarHeight = Max(mostLeftBarSize, mostRightBarSize);
|
||||||
|
|
||||||
float curBarFreeSpace = ((16 - i) * mostLeftBarSize + i * mostRightBarSize) / 16.0f;
|
float curBarFreeSpace = ((MENUSLIDER_BARS - i) * mostLeftBarSize + i * mostRightBarSize) / (float)MENUSLIDER_BARS;
|
||||||
float left = curBarX;
|
float left = curBarX;
|
||||||
float top = y + maxBarHeight - curBarFreeSpace;
|
float top = y + maxBarHeight - curBarFreeSpace;
|
||||||
float right = spacing + curBarX;
|
float right = spacing + curBarX;
|
||||||
@ -1324,8 +1345,8 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
|
|||||||
CFont::SetColor(CRGBA(DARKMENUOPTION_COLOR.r, DARKMENUOPTION_COLOR.g, DARKMENUOPTION_COLOR.b, FadeIn(255)));
|
CFont::SetColor(CRGBA(DARKMENUOPTION_COLOR.r, DARKMENUOPTION_COLOR.g, DARKMENUOPTION_COLOR.b, FadeIn(255)));
|
||||||
|
|
||||||
// To whom manipulate option.m_CFO->value of static options externally (like RestoreDef functions)
|
// To whom manipulate option.m_CFO->value of static options externally (like RestoreDef functions)
|
||||||
if (*option.m_CFO->value != option.m_CFOSelect->lastSavedValue)
|
if (*(int8*)option.m_CFO->value != option.m_CFOSelect->lastSavedValue)
|
||||||
option.m_CFOSelect->displayedValue = option.m_CFOSelect->lastSavedValue = *option.m_CFO->value;
|
option.m_CFOSelect->displayedValue = option.m_CFOSelect->lastSavedValue = *(int8*)option.m_CFO->value;
|
||||||
|
|
||||||
if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts || option.m_CFOSelect->displayedValue < 0)
|
if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts || option.m_CFOSelect->displayedValue < 0)
|
||||||
option.m_CFOSelect->displayedValue = 0;
|
option.m_CFOSelect->displayedValue = 0;
|
||||||
@ -1375,7 +1396,11 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
|
|||||||
int saveSlot = aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot;
|
int saveSlot = aScreens[m_nCurrScreen].m_aEntries[i].m_SaveSlot;
|
||||||
if (rightText || action == MENUACTION_DRAWDIST || action == MENUACTION_BRIGHTNESS || action == MENUACTION_MUSICVOLUME ||
|
if (rightText || action == MENUACTION_DRAWDIST || action == MENUACTION_BRIGHTNESS || action == MENUACTION_MUSICVOLUME ||
|
||||||
action == MENUACTION_SFXVOLUME || action == MENUACTION_MP3VOLUMEBOOST || action == MENUACTION_MOUSESENS ||
|
action == MENUACTION_SFXVOLUME || action == MENUACTION_MP3VOLUMEBOOST || action == MENUACTION_MOUSESENS ||
|
||||||
saveSlot >= SAVESLOT_1 && saveSlot <= SAVESLOT_8) {
|
saveSlot >= SAVESLOT_1 && saveSlot <= SAVESLOT_8
|
||||||
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
|| action == MENUACTION_CFO_SLIDER
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
rightXMin = 600;
|
rightXMin = 600;
|
||||||
leftXMax = 40;
|
leftXMax = 40;
|
||||||
}
|
}
|
||||||
@ -1502,30 +1527,41 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
#define SLIDER_Y(pos) (aScreens[m_nCurrScreen].m_aEntries[i].m_Y - 5.f)
|
||||||
|
#else
|
||||||
|
#define SLIDER_Y(pos) pos
|
||||||
|
#endif
|
||||||
// Sliders
|
// Sliders
|
||||||
int lastActiveBarX;
|
int lastActiveBarX;
|
||||||
switch (aScreens[m_nCurrScreen].m_aEntries[i].m_Action) {
|
switch (aScreens[m_nCurrScreen].m_aEntries[i].m_Action) {
|
||||||
case MENUACTION_BRIGHTNESS:
|
case MENUACTION_BRIGHTNESS:
|
||||||
ProcessSlider(m_PrefsBrightness / 384.0f, 70.0f, HOVEROPTION_INCREASE_BRIGHTNESS, HOVEROPTION_DECREASE_BRIGHTNESS, SCREEN_WIDTH, true);
|
ProcessSlider(m_PrefsBrightness / 384.0f, SLIDER_Y(70.0f), HOVEROPTION_INCREASE_BRIGHTNESS, HOVEROPTION_DECREASE_BRIGHTNESS, SCREEN_WIDTH, true);
|
||||||
break;
|
break;
|
||||||
case MENUACTION_DRAWDIST:
|
case MENUACTION_DRAWDIST:
|
||||||
ProcessSlider((m_PrefsLOD - 0.925f) / 0.875f, 99.0f, HOVEROPTION_INCREASE_DRAWDIST, HOVEROPTION_DECREASE_DRAWDIST, SCREEN_WIDTH, true);
|
ProcessSlider((m_PrefsLOD - 0.925f) / 0.875f, SLIDER_Y(99.0f), HOVEROPTION_INCREASE_DRAWDIST, HOVEROPTION_DECREASE_DRAWDIST, SCREEN_WIDTH, true);
|
||||||
break;
|
break;
|
||||||
case MENUACTION_MUSICVOLUME:
|
case MENUACTION_MUSICVOLUME:
|
||||||
if(m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER)
|
if(m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER)
|
||||||
ProcessSlider(m_PrefsMusicVolume / 64.0f, 70.0f, HOVEROPTION_INCREASE_MUSICVOLUME, HOVEROPTION_DECREASE_MUSICVOLUME, SCREEN_WIDTH, true);
|
ProcessSlider(m_PrefsMusicVolume / 64.0f, SLIDER_Y(70.0f), HOVEROPTION_INCREASE_MUSICVOLUME, HOVEROPTION_DECREASE_MUSICVOLUME, SCREEN_WIDTH, true);
|
||||||
break;
|
break;
|
||||||
case MENUACTION_SFXVOLUME:
|
case MENUACTION_SFXVOLUME:
|
||||||
if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER)
|
if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER)
|
||||||
ProcessSlider(m_PrefsSfxVolume / 64.0f, 99.0f, HOVEROPTION_INCREASE_SFXVOLUME, HOVEROPTION_DECREASE_SFXVOLUME, SCREEN_WIDTH, true);
|
ProcessSlider(m_PrefsSfxVolume / 64.0f, SLIDER_Y(99.0f), HOVEROPTION_INCREASE_SFXVOLUME, HOVEROPTION_DECREASE_SFXVOLUME, SCREEN_WIDTH, true);
|
||||||
break;
|
break;
|
||||||
case MENUACTION_MOUSESENS:
|
case MENUACTION_MOUSESENS:
|
||||||
ProcessSlider(TheCamera.m_fMouseAccelHorzntl * 200.0f, 170.0f, HOVEROPTION_INCREASE_MOUSESENS, HOVEROPTION_DECREASE_MOUSESENS, SCREEN_WIDTH, false);
|
ProcessSlider(TheCamera.m_fMouseAccelHorzntl * 200.0f, SLIDER_Y(170.0f), HOVEROPTION_INCREASE_MOUSESENS, HOVEROPTION_DECREASE_MOUSESENS, SCREEN_WIDTH, false);
|
||||||
break;
|
break;
|
||||||
case MENUACTION_MP3VOLUMEBOOST:
|
case MENUACTION_MP3VOLUMEBOOST:
|
||||||
if(m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER && DMAudio.IsMP3RadioChannelAvailable())
|
if(m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER && DMAudio.IsMP3RadioChannelAvailable())
|
||||||
ProcessSlider(m_PrefsMP3BoostVolume / 64.f, 128.0f, HOVEROPTION_INCREASE_MP3BOOST, HOVEROPTION_DECREASE_MP3BOOST, SCREEN_WIDTH, true);
|
ProcessSlider(m_PrefsMP3BoostVolume / 64.f, SLIDER_Y(128.0f), HOVEROPTION_INCREASE_MP3BOOST, HOVEROPTION_DECREASE_MP3BOOST, SCREEN_WIDTH, true);
|
||||||
break;
|
break;
|
||||||
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
case MENUACTION_CFO_SLIDER:
|
||||||
|
CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[i];
|
||||||
|
ProcessSlider((*(float*)option.m_CFOSlider->value - option.m_CFOSlider->min) / (option.m_CFOSlider->max - option.m_CFOSlider->min), SLIDER_Y(0), HOVEROPTION_INCREASE_CFO_SLIDER, HOVEROPTION_DECREASE_CFO_SLIDER, SCREEN_WIDTH, true);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not just unused, but also collides with the bug fix in Font.cpp. Yikes.
|
// Not just unused, but also collides with the bug fix in Font.cpp. Yikes.
|
||||||
@ -4263,7 +4299,11 @@ CMenuManager::UserInput(void)
|
|||||||
|
|
||||||
int action = aScreens[m_nCurrScreen].m_aEntries[rowToCheck].m_Action;
|
int action = aScreens[m_nCurrScreen].m_aEntries[rowToCheck].m_Action;
|
||||||
if (action != MENUACTION_BRIGHTNESS && action != MENUACTION_DRAWDIST && action != MENUACTION_MUSICVOLUME
|
if (action != MENUACTION_BRIGHTNESS && action != MENUACTION_DRAWDIST && action != MENUACTION_MUSICVOLUME
|
||||||
&& action != MENUACTION_SFXVOLUME && action != MENUACTION_MOUSESENS && action != MENUACTION_MP3VOLUMEBOOST)
|
&& action != MENUACTION_SFXVOLUME && action != MENUACTION_MOUSESENS && action != MENUACTION_MP3VOLUMEBOOST
|
||||||
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
&& action != MENUACTION_CFO_SLIDER
|
||||||
|
#endif
|
||||||
|
)
|
||||||
m_nHoverOption = HOVEROPTION_RANDOM_ITEM;
|
m_nHoverOption = HOVEROPTION_RANDOM_ITEM;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -4343,6 +4383,9 @@ CMenuManager::UserInput(void)
|
|||||||
case HOVEROPTION_INCREASE_MUSICVOLUME:
|
case HOVEROPTION_INCREASE_MUSICVOLUME:
|
||||||
case HOVEROPTION_INCREASE_SFXVOLUME:
|
case HOVEROPTION_INCREASE_SFXVOLUME:
|
||||||
case HOVEROPTION_INCREASE_MOUSESENS:
|
case HOVEROPTION_INCREASE_MOUSESENS:
|
||||||
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
case HOVEROPTION_INCREASE_CFO_SLIDER:
|
||||||
|
#endif
|
||||||
CheckSliderMovement(1);
|
CheckSliderMovement(1);
|
||||||
break;
|
break;
|
||||||
case HOVEROPTION_DECREASE_BRIGHTNESS:
|
case HOVEROPTION_DECREASE_BRIGHTNESS:
|
||||||
@ -4351,6 +4394,9 @@ CMenuManager::UserInput(void)
|
|||||||
case HOVEROPTION_DECREASE_MUSICVOLUME:
|
case HOVEROPTION_DECREASE_MUSICVOLUME:
|
||||||
case HOVEROPTION_DECREASE_SFXVOLUME:
|
case HOVEROPTION_DECREASE_SFXVOLUME:
|
||||||
case HOVEROPTION_DECREASE_MOUSESENS:
|
case HOVEROPTION_DECREASE_MOUSESENS:
|
||||||
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
case HOVEROPTION_DECREASE_CFO_SLIDER:
|
||||||
|
#endif
|
||||||
CheckSliderMovement(-1);
|
CheckSliderMovement(-1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4382,7 +4428,11 @@ CMenuManager::UserInput(void)
|
|||||||
|| CPad::GetPad(0)->GetAnaloguePadLeftJustUp() || CPad::GetPad(0)->GetAnaloguePadRightJustUp()
|
|| CPad::GetPad(0)->GetAnaloguePadLeftJustUp() || CPad::GetPad(0)->GetAnaloguePadRightJustUp()
|
||||||
|| CPad::GetPad(0)->GetMouseWheelUpJustDown() || CPad::GetPad(0)->GetMouseWheelDownJustDown()) {
|
|| CPad::GetPad(0)->GetMouseWheelUpJustDown() || CPad::GetPad(0)->GetMouseWheelDownJustDown()) {
|
||||||
int option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action;
|
int option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action;
|
||||||
if (option == MENUACTION_BRIGHTNESS)
|
if (option == MENUACTION_BRIGHTNESS
|
||||||
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
|| option == MENUACTION_CFO_SLIDER
|
||||||
|
#endif
|
||||||
|
)
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_ENTER_OR_ADJUST, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_ENTER_OR_ADJUST, 0);
|
||||||
else if (option == MENUACTION_SFXVOLUME)
|
else if (option == MENUACTION_SFXVOLUME)
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_AUDIO_TEST, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_AUDIO_TEST, 0);
|
||||||
@ -4413,7 +4463,11 @@ CMenuManager::UserInput(void)
|
|||||||
if (curAction == MENUACTION_BRIGHTNESS || curAction == MENUACTION_MUSICVOLUME ||
|
if (curAction == MENUACTION_BRIGHTNESS || curAction == MENUACTION_MUSICVOLUME ||
|
||||||
curAction == MENUACTION_SFXVOLUME || curAction == MENUACTION_RADIO ||
|
curAction == MENUACTION_SFXVOLUME || curAction == MENUACTION_RADIO ||
|
||||||
curAction == MENUACTION_DRAWDIST || curAction == MENUACTION_MOUSESENS ||
|
curAction == MENUACTION_DRAWDIST || curAction == MENUACTION_MOUSESENS ||
|
||||||
curAction == MENUACTION_MP3VOLUMEBOOST)
|
curAction == MENUACTION_MP3VOLUMEBOOST
|
||||||
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
|| curAction == MENUACTION_CFO_SLIDER
|
||||||
|
#endif
|
||||||
|
)
|
||||||
changeValueBy = -1;
|
changeValueBy = -1;
|
||||||
|
|
||||||
lastSliderDecrease = CTimer::GetTimeInMillisecondsPauseMode();
|
lastSliderDecrease = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
@ -4424,7 +4478,11 @@ CMenuManager::UserInput(void)
|
|||||||
if (curAction == MENUACTION_BRIGHTNESS || curAction == MENUACTION_MUSICVOLUME ||
|
if (curAction == MENUACTION_BRIGHTNESS || curAction == MENUACTION_MUSICVOLUME ||
|
||||||
curAction == MENUACTION_SFXVOLUME || curAction == MENUACTION_RADIO ||
|
curAction == MENUACTION_SFXVOLUME || curAction == MENUACTION_RADIO ||
|
||||||
curAction == MENUACTION_DRAWDIST || curAction == MENUACTION_MOUSESENS ||
|
curAction == MENUACTION_DRAWDIST || curAction == MENUACTION_MOUSESENS ||
|
||||||
curAction == MENUACTION_MP3VOLUMEBOOST)
|
curAction == MENUACTION_MP3VOLUMEBOOST
|
||||||
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
|| curAction == MENUACTION_CFO_SLIDER
|
||||||
|
#endif
|
||||||
|
)
|
||||||
changeValueBy = 1;
|
changeValueBy = 1;
|
||||||
lastSliderIncrease = CTimer::GetTimeInMillisecondsPauseMode();
|
lastSliderIncrease = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
}
|
}
|
||||||
@ -4483,10 +4541,10 @@ CMenuManager::UserInput(void)
|
|||||||
if (oldEntry.m_CFOSelect->displayedValue != oldEntry.m_CFOSelect->lastSavedValue)
|
if (oldEntry.m_CFOSelect->displayedValue != oldEntry.m_CFOSelect->lastSavedValue)
|
||||||
SetHelperText(3); // Restored original value
|
SetHelperText(3); // Restored original value
|
||||||
|
|
||||||
oldEntry.m_CFOSelect->displayedValue = oldEntry.m_CFOSelect->lastSavedValue = *oldEntry.m_CFO->value;
|
oldEntry.m_CFOSelect->displayedValue = oldEntry.m_CFOSelect->lastSavedValue = *(int8*)oldEntry.m_CFO->value;
|
||||||
}
|
}
|
||||||
} else if (oldEntry.m_Action == MENUACTION_CFO_SELECT && oldEntry.m_CFOSelect->onlyApplyOnEnter) {
|
} else if (oldEntry.m_Action == MENUACTION_CFO_SELECT && oldEntry.m_CFOSelect->onlyApplyOnEnter) {
|
||||||
if (oldEntry.m_CFOSelect->displayedValue != *oldEntry.m_CFO->value)
|
if (oldEntry.m_CFOSelect->displayedValue != *(int8*)oldEntry.m_CFO->value)
|
||||||
SetHelperText(1); // Enter to apply
|
SetHelperText(1); // Enter to apply
|
||||||
else if (m_nHelperTextMsgId == 1)
|
else if (m_nHelperTextMsgId == 1)
|
||||||
ResetHelperText(); // Applied
|
ResetHelperText(); // Applied
|
||||||
@ -4903,9 +4961,9 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
|
|||||||
if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts || option.m_CFOSelect->displayedValue < 0)
|
if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts || option.m_CFOSelect->displayedValue < 0)
|
||||||
option.m_CFOSelect->displayedValue = 0;
|
option.m_CFOSelect->displayedValue = 0;
|
||||||
}
|
}
|
||||||
int8 oldValue = *option.m_CFO->value;
|
int8 oldValue = *(int8*)option.m_CFO->value;
|
||||||
|
|
||||||
*option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
|
*(int8*)option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
|
||||||
|
|
||||||
// Now everything is saved in .ini, and LOAD_INI_SETTINGS is fundamental for CFO
|
// Now everything is saved in .ini, and LOAD_INI_SETTINGS is fundamental for CFO
|
||||||
// if (option.m_CFOSelect->save)
|
// if (option.m_CFOSelect->save)
|
||||||
@ -5070,9 +5128,9 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
|
|||||||
option.m_CFOSelect->displayedValue = option.m_CFOSelect->numRightTexts - 1;
|
option.m_CFOSelect->displayedValue = option.m_CFOSelect->numRightTexts - 1;
|
||||||
}
|
}
|
||||||
if (!option.m_CFOSelect->onlyApplyOnEnter) {
|
if (!option.m_CFOSelect->onlyApplyOnEnter) {
|
||||||
int8 oldValue = *option.m_CFO->value;
|
int8 oldValue = *(int8*)option.m_CFO->value;
|
||||||
|
|
||||||
*option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
|
*(int8*)option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
|
||||||
|
|
||||||
// Now everything is saved in .ini, and LOAD_INI_SETTINGS is fundamental for CFO
|
// Now everything is saved in .ini, and LOAD_INI_SETTINGS is fundamental for CFO
|
||||||
// if (option.m_CFOSelect->save)
|
// if (option.m_CFOSelect->save)
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
|
|
||||||
#define MENUACTION_SCALE_MULT 0.9f
|
#define MENUACTION_SCALE_MULT 0.9f
|
||||||
|
|
||||||
|
#define MENUSLIDER_BARS 16
|
||||||
|
#define MENUSLIDER_LOGICAL_BARS MENUSLIDER_BARS
|
||||||
|
|
||||||
#define MENULABEL_X_MARGIN 80.0f
|
#define MENULABEL_X_MARGIN 80.0f
|
||||||
#define MENULABEL_POS_X 100.0f
|
#define MENULABEL_POS_X 100.0f
|
||||||
#define MENULABEL_POS_Y 97.0f
|
#define MENULABEL_POS_Y 97.0f
|
||||||
@ -227,6 +230,7 @@ enum eMenuScreen
|
|||||||
enum eMenuAction
|
enum eMenuAction
|
||||||
{
|
{
|
||||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
MENUACTION_CFO_SLIDER = -3,
|
||||||
MENUACTION_CFO_SELECT = -2,
|
MENUACTION_CFO_SELECT = -2,
|
||||||
MENUACTION_CFO_DYNAMIC = -1,
|
MENUACTION_CFO_DYNAMIC = -1,
|
||||||
#endif
|
#endif
|
||||||
@ -328,6 +332,10 @@ enum eCheckHover
|
|||||||
HOVEROPTION_DECREASE_MOUSESENS,
|
HOVEROPTION_DECREASE_MOUSESENS,
|
||||||
HOVEROPTION_INCREASE_MP3BOOST,
|
HOVEROPTION_INCREASE_MP3BOOST,
|
||||||
HOVEROPTION_DECREASE_MP3BOOST,
|
HOVEROPTION_DECREASE_MP3BOOST,
|
||||||
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
HOVEROPTION_INCREASE_CFO_SLIDER,
|
||||||
|
HOVEROPTION_DECREASE_CFO_SLIDER,
|
||||||
|
#endif
|
||||||
HOVEROPTION_NOT_HOVERING,
|
HOVEROPTION_NOT_HOVERING,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -400,7 +408,7 @@ struct CCustomScreenLayout {
|
|||||||
|
|
||||||
struct CCFO
|
struct CCFO
|
||||||
{
|
{
|
||||||
int8 *value;
|
void *value;
|
||||||
const char *saveCat;
|
const char *saveCat;
|
||||||
const char *save;
|
const char *save;
|
||||||
};
|
};
|
||||||
@ -431,6 +439,24 @@ struct CCFOSelect : CCFO
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Value is float in here
|
||||||
|
struct CCFOSlider : CCFO
|
||||||
|
{
|
||||||
|
ChangeFuncFloat changeFunc;
|
||||||
|
float min;
|
||||||
|
float max;
|
||||||
|
|
||||||
|
CCFOSlider() {};
|
||||||
|
CCFOSlider(float* value, const char* saveCat, const char* save, float min, float max, ChangeFuncFloat changeFunc = nil){
|
||||||
|
this->value = value;
|
||||||
|
this->saveCat = saveCat;
|
||||||
|
this->save = save;
|
||||||
|
this->changeFunc = changeFunc;
|
||||||
|
this->min = min;
|
||||||
|
this->max = max;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
struct CCFODynamic : CCFO
|
struct CCFODynamic : CCFO
|
||||||
{
|
{
|
||||||
DrawFunc drawFunc;
|
DrawFunc drawFunc;
|
||||||
@ -462,6 +488,7 @@ struct CMenuScreenCustom
|
|||||||
CCFO *m_CFO; // for initializing
|
CCFO *m_CFO; // for initializing
|
||||||
CCFOSelect *m_CFOSelect;
|
CCFOSelect *m_CFOSelect;
|
||||||
CCFODynamic *m_CFODynamic;
|
CCFODynamic *m_CFODynamic;
|
||||||
|
CCFOSlider *m_CFOSlider;
|
||||||
};
|
};
|
||||||
int32 m_SaveSlot; // eSaveSlot
|
int32 m_SaveSlot; // eSaveSlot
|
||||||
int32 m_TargetMenu; // eMenuScreen
|
int32 m_TargetMenu; // eMenuScreen
|
||||||
|
@ -373,7 +373,11 @@ bool CGame::Initialise(const char* datFile)
|
|||||||
CPools::Initialise();
|
CPools::Initialise();
|
||||||
|
|
||||||
#ifndef GTA_PS2
|
#ifndef GTA_PS2
|
||||||
CIniFile::LoadIniFile();
|
#ifdef PED_CAR_DENSITY_SLIDERS
|
||||||
|
// Load density values from gta3.ini only if our reVC.ini have them 0.6f
|
||||||
|
if (CIniFile::PedNumberMultiplier == 0.6f && CIniFile::CarNumberMultiplier == 0.6f)
|
||||||
|
#endif
|
||||||
|
CIniFile::LoadIniFile();
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_TEXTURE_POOL
|
#ifdef USE_TEXTURE_POOL
|
||||||
_TexturePoolsUnknown(false);
|
_TexturePoolsUnknown(false);
|
||||||
|
@ -23,7 +23,7 @@ void CIniFile::LoadIniFile()
|
|||||||
CarNumberMultiplier = Min(3.0f, Max(0.5f, CarNumberMultiplier));
|
CarNumberMultiplier = Min(3.0f, Max(0.5f, CarNumberMultiplier));
|
||||||
CFileMgr::CloseFile(f);
|
CFileMgr::CloseFile(f);
|
||||||
}
|
}
|
||||||
CPopulation::MaxNumberOfPedsInUse = 25.0f * PedNumberMultiplier;
|
CPopulation::MaxNumberOfPedsInUse = DEFAULT_MAX_NUMBER_OF_PEDS * PedNumberMultiplier;
|
||||||
CPopulation::MaxNumberOfPedsInUseInterior = 40.0f * PedNumberMultiplier;
|
CPopulation::MaxNumberOfPedsInUseInterior = DEFAULT_MAX_NUMBER_OF_PEDS_INTERIOR * PedNumberMultiplier;
|
||||||
CCarCtrl::MaxNumberOfCarsInUse = 12.0f * CarNumberMultiplier;
|
CCarCtrl::MaxNumberOfCarsInUse = DEFAULT_MAX_NUMBER_OF_CARS * CarNumberMultiplier;
|
||||||
}
|
}
|
@ -1,5 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#define DEFAULT_MAX_NUMBER_OF_PEDS 25.0f
|
||||||
|
#define DEFAULT_MAX_NUMBER_OF_PEDS_INTERIOR 40.0f
|
||||||
|
#define DEFAULT_MAX_NUMBER_OF_CARS 12.0f
|
||||||
|
|
||||||
class CIniFile
|
class CIniFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
#include "Pad.h"
|
#include "Pad.h"
|
||||||
#include "ControllerConfig.h"
|
#include "ControllerConfig.h"
|
||||||
#include "DMAudio.h"
|
#include "DMAudio.h"
|
||||||
|
#include "IniFile.h"
|
||||||
|
#include "CarCtrl.h"
|
||||||
|
#include "Population.h"
|
||||||
|
|
||||||
// Menu screens array is at the bottom of the file.
|
// Menu screens array is at the bottom of the file.
|
||||||
|
|
||||||
@ -64,6 +67,15 @@
|
|||||||
#define DUALPASS_SELECTOR
|
#define DUALPASS_SELECTOR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PED_CAR_DENSITY_SLIDERS
|
||||||
|
// 0.2f - 3.4f makes it possible to have 1.0f somewhere inbetween
|
||||||
|
#define DENSITY_SLIDERS \
|
||||||
|
MENUACTION_CFO_SLIDER, "FEM_PED", { new CCFOSlider(&CIniFile::PedNumberMultiplier, "Display", "PedDensity", 0.2f, 3.4f, PedDensityChange) }, 0, 0, MENUALIGN_LEFT, \
|
||||||
|
MENUACTION_CFO_SLIDER, "FEM_CAR", { new CCFOSlider(&CIniFile::CarNumberMultiplier, "Display", "CarDensity", 0.2f, 3.4f, CarDensityChange) }, 0, 0, MENUALIGN_LEFT,
|
||||||
|
#else
|
||||||
|
#define DENSITY_SLIDERS
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef NO_ISLAND_LOADING
|
#ifdef NO_ISLAND_LOADING
|
||||||
#define ISLAND_LOADING_SELECTOR MENUACTION_CFO_SELECT, "FEM_ISL", { new CCFOSelect((int8*)&FrontEndMenuManager.m_PrefsIslandLoading, "Graphics", "IslandLoading", islandLoadingOpts, ARRAY_SIZE(islandLoadingOpts), true, IslandLoadingAfterChange) }, 0, 0, MENUALIGN_LEFT,
|
#define ISLAND_LOADING_SELECTOR MENUACTION_CFO_SELECT, "FEM_ISL", { new CCFOSelect((int8*)&FrontEndMenuManager.m_PrefsIslandLoading, "Graphics", "IslandLoading", islandLoadingOpts, ARRAY_SIZE(islandLoadingOpts), true, IslandLoadingAfterChange) }, 0, 0, MENUALIGN_LEFT,
|
||||||
#else
|
#else
|
||||||
@ -136,6 +148,9 @@ void RestoreDefDisplay(int8 action) {
|
|||||||
#ifdef FREE_CAM
|
#ifdef FREE_CAM
|
||||||
TheCamera.bFreeCam = false;
|
TheCamera.bFreeCam = false;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef PED_CAR_DENSITY_SLIDERS
|
||||||
|
CIniFile::LoadIniFile();
|
||||||
|
#endif
|
||||||
#ifdef GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
|
#ifdef GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
|
||||||
FrontEndMenuManager.m_PrefsBrightness = 256;
|
FrontEndMenuManager.m_PrefsBrightness = 256;
|
||||||
FrontEndMenuManager.m_PrefsLOD = 1.2f;
|
FrontEndMenuManager.m_PrefsLOD = 1.2f;
|
||||||
@ -182,6 +197,17 @@ void IslandLoadingAfterChange(int8 before, int8 after) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PED_CAR_DENSITY_SLIDERS
|
||||||
|
void PedDensityChange(float before, float after) {
|
||||||
|
CPopulation::MaxNumberOfPedsInUse = DEFAULT_MAX_NUMBER_OF_PEDS * after;
|
||||||
|
CPopulation::MaxNumberOfPedsInUseInterior = DEFAULT_MAX_NUMBER_OF_PEDS_INTERIOR * after;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CarDensityChange(float before, float after) {
|
||||||
|
CCarCtrl::MaxNumberOfCarsInUse = DEFAULT_MAX_NUMBER_OF_CARS * after;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef MULTISAMPLING
|
#ifndef MULTISAMPLING
|
||||||
void GraphicsGoBack() {
|
void GraphicsGoBack() {
|
||||||
}
|
}
|
||||||
@ -417,6 +443,7 @@ CMenuScreenCustom aScreens[] = {
|
|||||||
DUALPASS_SELECTOR
|
DUALPASS_SELECTOR
|
||||||
CUTSCENE_BORDERS_TOGGLE
|
CUTSCENE_BORDERS_TOGGLE
|
||||||
FREE_CAM_TOGGLE
|
FREE_CAM_TOGGLE
|
||||||
|
DENSITY_SLIDERS
|
||||||
POSTFX_SELECTORS
|
POSTFX_SELECTORS
|
||||||
// re3.cpp inserts here pipeline selectors if neo/neo.txd exists and EXTENDED_PIPELINES defined
|
// re3.cpp inserts here pipeline selectors if neo/neo.txd exists and EXTENDED_PIPELINES defined
|
||||||
MENUACTION_RESTOREDEF, "FET_DEF", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 320, 0, MENUALIGN_CENTER,
|
MENUACTION_RESTOREDEF, "FET_DEF", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 320, 0, MENUALIGN_CENTER,
|
||||||
@ -428,6 +455,7 @@ CMenuScreenCustom aScreens[] = {
|
|||||||
MENUACTION_DRAWDIST, "FEM_LOD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
MENUACTION_DRAWDIST, "FEM_LOD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
||||||
CUTSCENE_BORDERS_TOGGLE
|
CUTSCENE_BORDERS_TOGGLE
|
||||||
FREE_CAM_TOGGLE
|
FREE_CAM_TOGGLE
|
||||||
|
DENSITY_SLIDERS
|
||||||
MENUACTION_LEGENDS, "MAP_LEG", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
MENUACTION_LEGENDS, "MAP_LEG", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
||||||
MENUACTION_RADARMODE, "FED_RDR", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
MENUACTION_RADARMODE, "FED_RDR", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
||||||
MENUACTION_HUD, "FED_HUD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
MENUACTION_HUD, "FED_HUD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
||||||
|
@ -366,6 +366,7 @@ enum Config {
|
|||||||
# define CUTSCENE_BORDERS_SWITCH
|
# define CUTSCENE_BORDERS_SWITCH
|
||||||
# define MULTISAMPLING // adds MSAA option
|
# define MULTISAMPLING // adds MSAA option
|
||||||
# define INVERT_LOOK_FOR_PAD // enable the hidden option
|
# define INVERT_LOOK_FOR_PAD // enable the hidden option
|
||||||
|
# define PED_CAR_DENSITY_SLIDERS
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -460,4 +461,4 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
|
|||||||
#undef USE_CUTSCENE_SHADOW_FOR_PED
|
#undef USE_CUTSCENE_SHADOW_FOR_PED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // VANILLA_DEFINES
|
#endif // VANILLA_DEFINES
|
@ -44,6 +44,9 @@
|
|||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
#include "MBlur.h"
|
#include "MBlur.h"
|
||||||
#include "ControllerConfig.h"
|
#include "ControllerConfig.h"
|
||||||
|
#include "CarCtrl.h"
|
||||||
|
#include "Population.h"
|
||||||
|
#include "IniFile.h"
|
||||||
|
|
||||||
#ifdef DETECT_JOYSTICK_MENU
|
#ifdef DETECT_JOYSTICK_MENU
|
||||||
#include "crossplatform.h"
|
#include "crossplatform.h"
|
||||||
@ -560,22 +563,30 @@ bool LoadINISettings()
|
|||||||
|
|
||||||
// CFO check
|
// CFO check
|
||||||
if (option.m_Action < MENUACTION_NOTHING && option.m_CFO->save) {
|
if (option.m_Action < MENUACTION_NOTHING && option.m_CFO->save) {
|
||||||
// CFO only supports saving uint8 right now
|
|
||||||
|
|
||||||
// Migrate from old .ini to new .ini
|
// Migrate from old .ini to new .ini
|
||||||
if (migrate && ReadIniIfExists("FrontendOptions", option.m_CFO->save, option.m_CFO->value))
|
// Old values can only be int8, new ones can contain float if it is slider
|
||||||
|
if (migrate && ReadIniIfExists("FrontendOptions", option.m_CFO->save, (int8*)option.m_CFO->value))
|
||||||
cfg["FrontendOptions"].remove(option.m_CFO->save);
|
cfg["FrontendOptions"].remove(option.m_CFO->save);
|
||||||
|
else if (option.m_Action == MENUACTION_CFO_SLIDER)
|
||||||
|
ReadIniIfExists(option.m_CFO->saveCat, option.m_CFO->save, (float*)option.m_CFO->value);
|
||||||
else
|
else
|
||||||
ReadIniIfExists(option.m_CFO->saveCat, option.m_CFO->save, option.m_CFO->value);
|
ReadIniIfExists(option.m_CFO->saveCat, option.m_CFO->save, (int8*)option.m_CFO->value);
|
||||||
|
|
||||||
if (option.m_Action == MENUACTION_CFO_SELECT) {
|
if (option.m_Action == MENUACTION_CFO_SELECT) {
|
||||||
option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue = *option.m_CFO->value;
|
option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue = *(int8*)option.m_CFO->value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Fetched in above block, but needs evaluation
|
||||||
|
#ifdef PED_CAR_DENSITY_SLIDERS
|
||||||
|
CPopulation::MaxNumberOfPedsInUse = DEFAULT_MAX_NUMBER_OF_PEDS * CIniFile::PedNumberMultiplier;
|
||||||
|
CPopulation::MaxNumberOfPedsInUseInterior = DEFAULT_MAX_NUMBER_OF_PEDS_INTERIOR * CIniFile::PedNumberMultiplier;
|
||||||
|
CCarCtrl::MaxNumberOfCarsInUse = DEFAULT_MAX_NUMBER_OF_CARS * CIniFile::CarNumberMultiplier;
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -656,8 +667,10 @@ void SaveINISettings()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (option.m_Action < MENUACTION_NOTHING && option.m_CFO->save) {
|
if (option.m_Action < MENUACTION_NOTHING && option.m_CFO->save) {
|
||||||
// Beware: CFO only supports saving uint8 right now
|
if (option.m_Action == MENUACTION_CFO_SLIDER)
|
||||||
StoreIni(option.m_CFO->saveCat, option.m_CFO->save, *option.m_CFO->value);
|
StoreIni(option.m_CFO->saveCat, option.m_CFO->save, *(float*)option.m_CFO->value);
|
||||||
|
else
|
||||||
|
StoreIni(option.m_CFO->saveCat, option.m_CFO->save, *(int8*)option.m_CFO->value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,8 @@ typedef void (*ReturnPrevPageFunc)();
|
|||||||
typedef void (*ChangeFunc)(int8 before, int8 after); // called after updating the value.
|
typedef void (*ChangeFunc)(int8 before, int8 after); // called after updating the value.
|
||||||
// only called on enter if onlyApplyOnEnter set, otherwise called on every value change
|
// only called on enter if onlyApplyOnEnter set, otherwise called on every value change
|
||||||
|
|
||||||
|
typedef void (*ChangeFuncFloat)(float before, float after); // called after updating the value.
|
||||||
|
|
||||||
// for dynamic options
|
// for dynamic options
|
||||||
typedef wchar* (*DrawFunc)(bool* disabled, bool userHovering); // you must return a pointer for right text.
|
typedef wchar* (*DrawFunc)(bool* disabled, bool userHovering); // you must return a pointer for right text.
|
||||||
// you can also set *disabled if you want to gray it out.
|
// you can also set *disabled if you want to gray it out.
|
||||||
|
@ -40,8 +40,8 @@ bool CPopulation::ms_bGivePedsWeapons;
|
|||||||
int32 CPopulation::m_AllRandomPedsThisType = -1;
|
int32 CPopulation::m_AllRandomPedsThisType = -1;
|
||||||
float CPopulation::PedDensityMultiplier = 1.0f;
|
float CPopulation::PedDensityMultiplier = 1.0f;
|
||||||
uint32 CPopulation::ms_nTotalMissionPeds;
|
uint32 CPopulation::ms_nTotalMissionPeds;
|
||||||
int32 CPopulation::MaxNumberOfPedsInUse = 25;
|
int32 CPopulation::MaxNumberOfPedsInUse = DEFAULT_MAX_NUMBER_OF_PEDS;
|
||||||
int32 CPopulation::MaxNumberOfPedsInUseInterior = 40;
|
int32 CPopulation::MaxNumberOfPedsInUseInterior = DEFAULT_MAX_NUMBER_OF_PEDS_INTERIOR;
|
||||||
uint32 CPopulation::ms_nNumCivMale;
|
uint32 CPopulation::ms_nNumCivMale;
|
||||||
uint32 CPopulation::ms_nNumCivFemale;
|
uint32 CPopulation::ms_nNumCivFemale;
|
||||||
uint32 CPopulation::ms_nNumCop;
|
uint32 CPopulation::ms_nNumCop;
|
||||||
@ -1095,6 +1095,7 @@ CPopulation::ManagePopulation(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
float dist = (ped->GetPosition() - playerPos).Magnitude2D();
|
float dist = (ped->GetPosition() - playerPos).Magnitude2D();
|
||||||
|
|
||||||
bool pedIsFarAway = false;
|
bool pedIsFarAway = false;
|
||||||
|
|
||||||
if (ped->IsGangMember())
|
if (ped->IsGangMember())
|
||||||
|
Loading…
Reference in New Issue
Block a user