diff options
author | Roman Masanin <36927roma@gmail.com> | 2020-09-28 02:40:58 +0200 |
---|---|---|
committer | Roman Masanin <36927roma@gmail.com> | 2020-09-28 02:40:58 +0200 |
commit | 1ea89f5aedbefccd21ad6a7be49afa898a2ab9c4 (patch) | |
tree | 093a94660e494cc1c83ac9d43fc1be520809926f /src/core | |
parent | fix for frequency misscalculation (diff) | |
parent | Fixes: PS2/PS2-like menu, Hud, new sliding text found (diff) | |
download | re3-1ea89f5aedbefccd21ad6a7be49afa898a2ab9c4.tar re3-1ea89f5aedbefccd21ad6a7be49afa898a2ab9c4.tar.gz re3-1ea89f5aedbefccd21ad6a7be49afa898a2ab9c4.tar.bz2 re3-1ea89f5aedbefccd21ad6a7be49afa898a2ab9c4.tar.lz re3-1ea89f5aedbefccd21ad6a7be49afa898a2ab9c4.tar.xz re3-1ea89f5aedbefccd21ad6a7be49afa898a2ab9c4.tar.zst re3-1ea89f5aedbefccd21ad6a7be49afa898a2ab9c4.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Camera.cpp | 8 | ||||
-rw-r--r-- | src/core/CdStream.cpp | 4 | ||||
-rw-r--r-- | src/core/Frontend.cpp | 121 | ||||
-rw-r--r-- | src/core/Frontend_PS2.cpp | 13 | ||||
-rw-r--r-- | src/core/Frontend_PS2.h | 23 | ||||
-rw-r--r-- | src/core/Radar.cpp | 12 | ||||
-rw-r--r-- | src/core/common.h | 3 | ||||
-rw-r--r-- | src/core/config.h | 6 | ||||
-rw-r--r-- | src/core/main.cpp | 4 | ||||
-rw-r--r-- | src/core/re3.cpp | 3 |
10 files changed, 151 insertions, 46 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index abe0833e..13d03213 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -74,7 +74,7 @@ bool bDidWeProcessAnyCinemaCam; CCamera::CCamera(void) { -#ifdef GTA3_1_1_PATCH +#if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS) m_fMouseAccelHorzntl = 0.0025f; m_fMouseAccelVertical = 0.003f; #endif @@ -88,7 +88,7 @@ CCamera::CCamera(float) void CCamera::Init(void) { -#ifdef GTA3_1_1_PATCH +#if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS) float fMouseAccelHorzntl = m_fMouseAccelHorzntl; float fMouseAccelVertical = m_fMouseAccelVertical; #endif @@ -104,7 +104,7 @@ CCamera::Init(void) memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh? #endif - #ifdef GTA3_1_1_PATCH + #if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS) m_fMouseAccelHorzntl = fMouseAccelHorzntl; m_fMouseAccelVertical = fMouseAccelVertical; #endif @@ -237,7 +237,7 @@ CCamera::Init(void) m_uiTransitionState = 0; m_uiTimeTransitionStart = 0; m_bLookingAtPlayer = true; -#ifndef GTA3_1_1_PATCH +#if !defined(GTA3_1_1_PATCH) && !defined(FIX_BUGS) m_fMouseAccelHorzntl = 0.0025f; m_fMouseAccelVertical = 0.003f; #endif diff --git a/src/core/CdStream.cpp b/src/core/CdStream.cpp index d9978040..c11fb72a 100644 --- a/src/core/CdStream.cpp +++ b/src/core/CdStream.cpp @@ -106,12 +106,14 @@ CdStreamInit(int32 numChannels) GetDiskFreeSpace(nil, &SectorsPerCluster, &BytesPerSector, &NumberOfFreeClusters, &TotalNumberOfClusters); _gdwCdStreamFlags = 0; - + +#ifndef FIX_BUGS // this just slows down streaming if ( BytesPerSector <= CDSTREAM_SECTOR_SIZE ) { _gdwCdStreamFlags |= FILE_FLAG_NO_BUFFERING; debug("Using no buffered loading for streaming\n"); } +#endif _gbCdStreamOverlapped = TRUE; diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 0e358fc5..9ead2a0a 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -235,33 +235,26 @@ const char* MenuFilenames[][2] = { { nil, nil } }; +#define MENU_X_RIGHT_ALIGNED(x) SCALE_AND_CENTER_X(DEFAULT_SCREEN_WIDTH - (x)) + #ifdef ASPECT_RATIO_SCALE // All of the defines below replace the StretchX function. Otherwise use SCREEN_SCALE_X. -#define MENU_X_LEFT_ALIGNED(x) ScaleAndCenterX(x) -#define MENU_X_RIGHT_ALIGNED(x) ScaleAndCenterX(DEFAULT_SCREEN_WIDTH - (x)) +#define MENU_X_LEFT_ALIGNED(x) SCALE_AND_CENTER_X(x) #define MENU_X(x) SCREEN_SCALE_X(x) #define MENU_Y(y) SCREEN_SCALE_Y(y) -float -ScaleAndCenterX(float x) -{ - if (SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH) - return x; - else { - if (x > DEFAULT_SCREEN_WIDTH / 2) { - return SCREEN_WIDTH / 2 + SCREEN_SCALE_X(x - DEFAULT_SCREEN_WIDTH / 2); - } else { - return SCREEN_WIDTH / 2 - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH / 2 - x); - } - } -} #else #define MENU_X_LEFT_ALIGNED(x) StretchX(x) -#define MENU_X_RIGHT_ALIGNED(x) SCREEN_STRETCH_FROM_RIGHT(x) #define MENU_X(x) StretchX(x) #define MENU_Y(y) StretchY(y) #endif #ifdef PS2_LIKE_MENU +#define PAGE_NAME_X MENU_X_RIGHT_ALIGNED +#else +#define PAGE_NAME_X SCREEN_SCALE_FROM_RIGHT +#endif + +#ifdef PS2_LIKE_MENU #define ChangeScreen(screen, option, updateDelay, withReverseAlpha) \ do { \ if (reverseAlpha) { \ @@ -272,7 +265,7 @@ ScaleAndCenterX(float x) if (updateDelay) \ m_nScreenChangeDelayTimer = CTimer::GetTimeInMillisecondsPauseMode(); \ } \ - if (withReverseAlpha) { \ + if (withReverseAlpha && !m_bRenderGameInMenu) { \ pendingOption = option; \ pendingScreen = screen; \ reverseAlpha = true; \ @@ -827,7 +820,7 @@ CMenuManager::Draw() if (aScreens[m_nCurrScreen].m_ScreenName[0] != '\0') { PREPARE_MENU_HEADER - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName)); + CFont::PrintString(PAGE_NAME_X(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName)); // Weird place to put that. nextYToUse += 24.0f + 10.0f; @@ -1418,10 +1411,16 @@ CMenuManager::Draw() if (!m_bRenderGameInMenu) #endif if (i == m_nCurrOption && itemsAreSelectable) { +#ifdef PS2_LIKE_MENU + CSprite2d::DrawRect(CRect(MENU_X_LEFT_ALIGNED(29.0f), MENU_Y(bitAboveNextItemY), + MENU_X_RIGHT_ALIGNED(29.0f), MENU_Y(usableLineHeight + nextItemY)), + CRGBA(100, 200, 50, FadeIn(50))); +#else // We keep stretching, because we also stretch background image and we want that bar to be aligned with borders of background CSprite2d::DrawRect(CRect(StretchX(10.0f), MENU_Y(bitAboveNextItemY), - SCREEN_STRETCH_FROM_RIGHT(11.0f), MENU_Y(usableLineHeight + nextItemY)), - CRGBA(100, 200, 50, FadeIn(50))); + SCREEN_STRETCH_FROM_RIGHT(11.0f), MENU_Y(usableLineHeight + nextItemY)), + CRGBA(100, 200, 50, FadeIn(50))); +#endif } CFont::SetColor(CRGBA(0, 0, 0, FadeIn(90))); @@ -2047,11 +2046,11 @@ CMenuManager::DrawControllerSetupScreen() switch (m_ControlMethod) { case CONTROL_STANDARD: - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), + CFont::PrintString(PAGE_NAME_X(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName)); break; case CONTROL_CLASSIC: - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), + CFont::PrintString(PAGE_NAME_X(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get("FET_CTI")); break; default: @@ -2335,12 +2334,11 @@ CMenuManager::DrawFrontEndNormal() if (!m_bGameNotLoaded) { CSprite2d *bg = LoadSplash(nil); - bg->Draw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(255, 255, 255, 255)); + bg->Draw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(48, 48, 48, 255)); } else { CSprite2d::DrawRect(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(0, 0, 0, 255)); } - RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST); RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); @@ -2448,6 +2446,46 @@ CMenuManager::DrawFrontEndNormal() break; } + // Positions/style from PS2 menu, credits to Fire_Head + /* Draw controller buttons */ + CFont::SetFontStyle(FONT_BANK); + CFont::SetBackgroundOff(); + CFont::SetScale(SCREEN_SCALE_X(0.35f), SCREEN_SCALE_Y(0.64f)); + CFont::SetPropOn(); + CFont::SetCentreOff(); + CFont::SetJustifyOn(); + CFont::SetRightJustifyOff(); + CFont::SetBackGroundOnlyTextOn(); + CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(40.0f)); // 600.0f + CFont::SetColor(CRGBA(16, 16, 16, 255)); + switch (m_nCurrScreen) { + + // Page names overlaps buttons on those. + case MENUPAGE_MOUSE_CONTROLS: + case MENUPAGE_KEYBOARD_CONTROLS: + break; + + default: + { + CFont::PrintString(MENU_X_LEFT_ALIGNED(52.0f), MENU_Y(360.0f), TheText.Get("FEDS_SE")); + CFont::PrintString(MENU_X_LEFT_ALIGNED(52.0f), MENU_Y(372.0f), TheText.Get("FEDS_BA")); + if (!m_bGameNotLoaded) + CFont::PrintString(MENU_X_LEFT_ALIGNED(52.0f), MENU_Y(384.0f), TheText.Get("FEDS_ST")); + + if (bottomBarActive) + CFont::PrintString(MENU_X_LEFT_ALIGNED(242.0f), MENU_Y(372.0f), TheText.Get("FEDS_AM")); // <>-CHANGE MENU + else if (m_nCurrScreen != MENUPAGE_STATS && m_nCurrScreen != MENUPAGE_BRIEFS) { + CFont::PrintString(MENU_X_LEFT_ALIGNED(242.0f), MENU_Y(360.0f + 3.5f), TheText.Get("FEA_UP")); // ; + CFont::PrintString(MENU_X_LEFT_ALIGNED(242.0f), MENU_Y(384.0f - 3.5f), TheText.Get("FEA_DO")); // = + CFont::PrintString(MENU_X_LEFT_ALIGNED(242.0f - 10.0f), MENU_Y(372.0f), TheText.Get("FEA_LE")); // < + CFont::PrintString(MENU_X_LEFT_ALIGNED(242.0f + 11.0f), MENU_Y(372.0f), TheText.Get("FEA_RI")); // > + CFont::PrintString(MENU_X_LEFT_ALIGNED(242.0f + 20.0f), MENU_Y(372.0f), TheText.Get("FEDSAS3")); // - CHANGE SELECTION + } + + break; + } + } + #define optionWidth MENU_X(66.0f) #define rawOptionHeight 22.0f #define optionBottom SCREEN_SCALE_FROM_BOTTOM(20.0f) @@ -2753,7 +2791,7 @@ CMenuManager::DrawPlayerSetupScreen() PREPARE_MENU_HEADER - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get("FET_PS")); + CFont::PrintString(PAGE_NAME_X(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get("FET_PS")); // lstrcpy's changed with strcpy @@ -3547,15 +3585,15 @@ CMenuManager::MessageScreen(const char *text) CFont::SetPropOn(); CFont::SetJustifyOn(); CFont::SetBackGroundOnlyTextOn(); - CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(170.0f)); - CFont::SetRightJustifyWrap(SCREEN_SCALE_FROM_RIGHT(170.0f)); - CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(120.0f), SCREEN_SCALE_Y(150.0f), SCREEN_SCALE_FROM_RIGHT(120.0f), SCREEN_SCALE_FROM_BOTTOM(220.0f)), CRGBA(50, 50, 50, 210)); + CFont::SetWrapx(SCREEN_WIDTH - StretchX(170.0f)); + CFont::SetRightJustifyWrap(SCREEN_WIDTH - StretchX(170.0f)); + CSprite2d::DrawRect(CRect(StretchX(120.0f), StretchY(150.0f), SCREEN_WIDTH - StretchX(120.0f), SCREEN_HEIGHT - StretchY(220.0f)), CRGBA(50, 50, 50, 210)); CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); - CFont::SetCentreSize(SCREEN_SCALE_X(380.0f)); + CFont::SetCentreSize(SCREEN_STRETCH_X(380.0f)); CFont::SetCentreOn(); CFont::SetColor(CRGBA(255, 217, 106, 255)); CFont::SetScale(SCREEN_SCALE_X(SMALLTEXT_X_SCALE), SCREEN_SCALE_Y(SMALLTEXT_Y_SCALE)); - CFont::PrintString(SCREEN_SCALE_X(320.0f), SCREEN_SCALE_Y(170.0f), TheText.Get(text)); + CFont::PrintString(StretchX(320.0f), StretchY(170.0f), TheText.Get(text)); CFont::DrawFonts(); DoRWStuffEndOfFrame(); } @@ -3737,7 +3775,7 @@ CMenuManager::PrintStats() // ::Draw already does that. /* PREPARE_MENU_HEADER - CFont::PrintString(MENU_X_RIGHT_ALIGNED(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName)); + CFont::PrintString(PAGE_NAME_X(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName)); */ CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X), MENU_Y(MENU_TEXT_SIZE_Y)); } @@ -4513,30 +4551,41 @@ CMenuManager::ProcessButtonPresses(void) bottomBarActive = false; curBottomBarOption = hoveredBottomBarOption; ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, false); + if (bbNames[curBottomBarOption].screenId == MENUPAGE_SOUND_SETTINGS) + DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1); return; } else if (bottomBarActive) { if (CPad::GetPad(0)->GetEnterJustDown() || CPad::GetPad(0)->GetCrossJustDown()) { DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0); bottomBarActive = false; + if (bbNames[curBottomBarOption].screenId == MENUPAGE_SOUND_SETTINGS) + DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1); + // If there's a menu change with fade ongoing, finish it now if (reverseAlpha) m_nMenuFadeAlpha = 0; return; } else if (CPad::GetPad(0)->GetLeftJustDown() || CPad::GetPad(0)->GetAnaloguePadLeft() || CPad::GetPad(0)->GetDPadLeftJustDown() || CPad::GetPad(0)->GetUpJustDown() || CPad::GetPad(0)->GetAnaloguePadUp() || CPad::GetPad(0)->GetDPadUpJustDown()) { + + if (reverseAlpha && m_nMenuFadeAlpha > 30) + return; + m_bShowMouse = false; DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0); - if (curBottomBarOption > 0) - curBottomBarOption--; + curBottomBarOption = ((curBottomBarOption + bbTabCount) - 1) % bbTabCount; ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true); return; } else if (CPad::GetPad(0)->GetRightJustDown() || CPad::GetPad(0)->GetAnaloguePadRight() || CPad::GetPad(0)->GetDPadRightJustDown() || CPad::GetPad(0)->GetDownJustDown() || CPad::GetPad(0)->GetAnaloguePadDown() || CPad::GetPad(0)->GetDPadDownJustDown()) { + + if (reverseAlpha && m_nMenuFadeAlpha > 30) + return; + m_bShowMouse = false; DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0); - if (curBottomBarOption < bbTabCount-1) - curBottomBarOption++; + curBottomBarOption = ((curBottomBarOption + bbTabCount) + 1) % bbTabCount; ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true); return; } @@ -5103,7 +5152,7 @@ CMenuManager::ProcessButtonPresses(void) return; #endif } -#ifdef PS2_LIKE_MENU +#ifdef PS2_SAVE_DIALOG else if (m_nCurrScreen == MENUPAGE_CHOOSE_SAVE_SLOT || m_nCurrScreen == MENUPAGE_SAVE) { #else else if (m_nCurrScreen == MENUPAGE_CHOOSE_SAVE_SLOT) { diff --git a/src/core/Frontend_PS2.cpp b/src/core/Frontend_PS2.cpp index 8e604978..d474ee65 100644 --- a/src/core/Frontend_PS2.cpp +++ b/src/core/Frontend_PS2.cpp @@ -203,6 +203,19 @@ static const char* FrontendFilenames[][2] = {"fe_radio9", "" }, }; +#ifdef CUTSCENE_BORDERS_SWITCH +bool CMenuManager::m_PrefsCutsceneBorders = true; +#endif + +#ifdef MULTISAMPLING +int8 CMenuManager::m_nPrefsMSAALevel = 0; +int8 CMenuManager::m_nDisplayMSAALevel = 0; +#endif + +#ifdef NO_ISLAND_LOADING +int8 CMenuManager::m_DisplayIslandLoading = ISLAND_LOADING_LOW; +int8 CMenuManager::m_PrefsIslandLoading = ISLAND_LOADING_LOW; +#endif int32 CMenuManager::m_PrefsSfxVolume = 102; int32 CMenuManager::m_PrefsMusicVolume = 102; diff --git a/src/core/Frontend_PS2.h b/src/core/Frontend_PS2.h index 2f226dc3..c1e42291 100644 --- a/src/core/Frontend_PS2.h +++ b/src/core/Frontend_PS2.h @@ -160,7 +160,30 @@ public: static int32 m_PrefsLanguage; static CONTRCONFIG m_PrefsControllerConfig; static bool m_PrefsUseVibration; +#ifdef NO_ISLAND_LOADING + enum + { + ISLAND_LOADING_LOW = 0, + ISLAND_LOADING_MEDIUM, + ISLAND_LOADING_HIGH + }; + + static int8 m_DisplayIslandLoading; + static int8 m_PrefsIslandLoading; +#define ISLAND_LOADING_IS(p) if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_##p) +#define ISLAND_LOADING_ISNT(p) if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_##p) +#else +#define ISLAND_LOADING_IS(p) +#define ISLAND_LOADING_ISNT(p) +#endif +#ifdef CUTSCENE_BORDERS_SWITCH + static bool m_PrefsCutsceneBorders; +#endif +#ifdef MULTISAMPLING + static int8 m_nPrefsMSAALevel; + static int8 m_nDisplayMSAALevel; +#endif #ifdef GTA_PC bool m_bQuitGameNoCD; diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index 05002a3f..af28aae7 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -1100,6 +1100,10 @@ int CRadar::SetCoordBlip(eBlipType type, CVector pos, int32 color, eBlipDisplay if (!ms_RadarTrace[nextBlip].m_bInUse) break; } +#ifdef FIX_BUGS + if (nextBlip == NUMRADARBLIPS) + return -1; +#endif ms_RadarTrace[nextBlip].m_eBlipType = type; ms_RadarTrace[nextBlip].m_nColor = color; ms_RadarTrace[nextBlip].m_bDim = 1; @@ -1121,6 +1125,10 @@ int CRadar::SetEntityBlip(eBlipType type, int32 handle, int32 color, eBlipDispla if (!ms_RadarTrace[nextBlip].m_bInUse) break; } +#ifdef FIX_BUGS + if (nextBlip == NUMRADARBLIPS) + return -1; +#endif ms_RadarTrace[nextBlip].m_eBlipType = type; ms_RadarTrace[nextBlip].m_nColor = color; ms_RadarTrace[nextBlip].m_bDim = 1; @@ -1452,6 +1460,10 @@ CRadar::ToggleTargetMarker(float x, float y) if (!ms_RadarTrace[nextBlip].m_bInUse) break; } +#ifdef FIX_BUGS + if (nextBlip == NUMRADARBLIPS) + return; +#endif ms_RadarTrace[nextBlip].m_eBlipType = BLIP_COORD; ms_RadarTrace[nextBlip].m_nColor = 0x333333FF; ms_RadarTrace[nextBlip].m_bDim = 1; diff --git a/src/core/common.h b/src/core/common.h index e876c4ec..9b5c2369 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -144,8 +144,11 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w) #ifdef ASPECT_RATIO_SCALE #define SCREEN_SCALE_AR(a) ((a) * DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO) +extern float ScaleAndCenterX(float x); +#define SCALE_AND_CENTER_X(x) ScaleAndCenterX(x) #else #define SCREEN_SCALE_AR(a) (a) +#define SCALE_AND_CENTER_X(x) SCREEN_STRETCH_X(x) #endif #include "maths.h" diff --git a/src/core/config.h b/src/core/config.h index 498be8f3..e8e15ebe 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -235,20 +235,20 @@ enum Config { // Hud, frontend and radar #define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better. -#define BETA_SLIDING_TEXT +// #define BETA_SLIDING_TEXT #define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC #define PC_MENU #ifndef PC_MENU # define PS2_MENU //# define PS2_MENU_USEALLPAGEICONS -# define PS2_SAVE_DIALOG // PS2 style save dialog with transparent black box -//# define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc. #else # define MENU_MAP // VC-like menu map. Make sure you have new menu.txd # define SCROLLABLE_STATS_PAGE // only draggable by mouse atm # define TRIANGLE_BACK_BUTTON //# define CIRCLE_BACK_BUTTON +//# define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc. +//# define PS2_SAVE_DIALOG // PS2 style save dialog with transparent black box # define CUSTOM_FRONTEND_OPTIONS # define GRAPHICS_MENU_OPTIONS // otherwise Advanced Options menu will appear if Display is full #endif diff --git a/src/core/main.cpp b/src/core/main.cpp index 99868dbd..5fea9c4b 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -757,12 +757,13 @@ DisplayGameDebugText() { static bool bDisplayPosn = false; static bool bDisplayRate = false; - +#ifndef FINAL { SETTWEAKPATH("GameDebugText"); TWEAKBOOL(bDisplayPosn); TWEAKBOOL(bDisplayRate); } +#endif char str[200]; @@ -1111,6 +1112,7 @@ Idle(void *arg) #endif #ifdef FIX_BUGS + RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE); // TODO: temp? this fixes OpenGL render but there should be a better place for this // This has to be done BEFORE RwCameraBeginUpdate RwCameraSetFarClipPlane(Scene.camera, CTimeCycle::GetFarClip()); RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart()); diff --git a/src/core/re3.cpp b/src/core/re3.cpp index a7a0d7f1..13cb6283 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -267,6 +267,7 @@ void PS2AlphaTestChange(int8 displayedValue) // Important: Make sure to read the warnings/informations in frontendoption.h!! +// For texts: Either use TheText.Get, or use wcsdup(wchar version of strdup) void CustomFrontendOptionsPopulate(void) { @@ -369,7 +370,7 @@ CustomFrontendOptionsPopulate(void) #ifdef FREE_CAM SWITCH_TO_DISPLAY_MENU - static const wchar* text = (wchar*)L"FREE CAM"; + static const wchar* text = (wchar*)wcsdup(L"FREE CAM"); FrontendOptionAddSelect(text, off_on, 2, (int8*)&TheCamera.bFreeCam, false, FreeCamChange, nil, true); #endif |