summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-11-11 09:37:10 +0100
committeraap <aap@papnet.eu>2020-11-11 09:38:33 +0100
commit48d0653331c8b1debc9d985131c9ea31a0e0c97f (patch)
treeaadeefe2bf09efd2dde21fefed5a8cf0ed553518 /src/core
parentmove stuff into define (diff)
parentMerge pull request #771 from theR4K/miamiDev (diff)
downloadre3-48d0653331c8b1debc9d985131c9ea31a0e0c97f.tar
re3-48d0653331c8b1debc9d985131c9ea31a0e0c97f.tar.gz
re3-48d0653331c8b1debc9d985131c9ea31a0e0c97f.tar.bz2
re3-48d0653331c8b1debc9d985131c9ea31a0e0c97f.tar.lz
re3-48d0653331c8b1debc9d985131c9ea31a0e0c97f.tar.xz
re3-48d0653331c8b1debc9d985131c9ea31a0e0c97f.tar.zst
re3-48d0653331c8b1debc9d985131c9ea31a0e0c97f.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Cam.cpp2
-rw-r--r--src/core/Frontend.cpp35
-rw-r--r--src/core/Frontend.h2
-rw-r--r--src/core/Game.cpp2
-rw-r--r--src/core/Pad.cpp11
-rw-r--r--src/core/config.h2
6 files changed, 31 insertions, 23 deletions
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index 7af652ad..7560a86e 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -4626,7 +4626,7 @@ CCam::Process_FollowPed_Rotation(const CVector &CameraTarget, float TargetOrient
*/
{
LookLeftRight = -CPad::GetPad(0)->LookAroundLeftRight();
- LookUpDown = -CPad::GetPad(0)->LookAroundUpDown();
+ LookUpDown = CPad::GetPad(0)->LookAroundUpDown();
}
float AlphaOffset, BetaOffset;
if(UseMouse){
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index eba0ca18..a52b9bfc 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -767,8 +767,8 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
CFont::SetBackGroundOnlyTextOff();
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
- CFont::SetCentreSize(SCREEN_WIDTH);
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
+ CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH));
switch (m_nCurrScreen) {
case MENUPAGE_CHOOSE_LOAD_SLOT:
@@ -808,7 +808,7 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
wchar *str;
if (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL) {
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENULABEL_X_MARGIN));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENULABEL_WIDTH));
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENULABEL_X_MARGIN));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
CFont::SetScale(MENU_X(BIGTEXT2_X_SCALE), MENU_Y(BIGTEXT2_Y_SCALE));
CFont::SetRightJustifyOff();
@@ -848,7 +848,7 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
CFont::PrintString(MENU_X_LEFT_ALIGNED(100.0f), MENU_Y(97.0f), str);
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
}
if (m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS) {
@@ -1300,14 +1300,17 @@ CMenuManager::DrawStandardMenus(bool activeScreen)
ProcessSlider(TheCamera.m_fMouseAccelHorzntl * 200.0f, 170.0f, HOVEROPTION_INCREASE_MOUSESENS, HOVEROPTION_DECREASE_MOUSESENS, MENU_X_LEFT_ALIGNED(200.0f), SCREEN_WIDTH);
break;
}
-
- nextYToUse = MENU_Y(150.f); // TODO(Miami): Temp
-
+
+ // Not just unused, but also collides with the bug fix in Font.cpp. Yikes.
+#ifndef FIX_BUGS
nextYToUse += MENU_DEFAULT_LINE_HEIGHT * CFont::GetNumberLines(MENU_X_LEFT_ALIGNED(60.0f), MENU_Y(nextYToUse), leftText);
+#endif
- // TODO(Miami): Remove here after audio page is done
+ nextYToUse = 300.0f; // TODO(Miami): temp
// Radio icons
if (aScreens[m_nCurrScreen].m_aEntries[i].m_Action == MENUACTION_RADIO) {
+
+ // TODO(Miami): Remove those after audio page is done
ProcessRadioIcon(m_aFrontEndSprites[MENUSPRITE_WILDSTYLE], MENU_X_LEFT_ALIGNED(30.0f), MENU_Y(nextYToUse), 0, HOVEROPTION_RADIO_0);
ProcessRadioIcon(m_aFrontEndSprites[MENUSPRITE_FLASH], MENU_X_LEFT_ALIGNED(90.0f), MENU_Y(nextYToUse), 1, HOVEROPTION_RADIO_1);
ProcessRadioIcon(m_aFrontEndSprites[MENUSPRITE_KCHAT], MENU_X_LEFT_ALIGNED(150.0f), MENU_Y(nextYToUse), 2, HOVEROPTION_RADIO_2);
@@ -1804,7 +1807,7 @@ CMenuManager::DrawControllerSetupScreen()
CFont::SetRightJustifyOff();
CFont::SetBackGroundOnlyTextOn();
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
PREPARE_MENU_HEADER
switch (m_ControlMethod) {
@@ -2256,7 +2259,7 @@ CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
CFont::SetRightJustifyOff();
CFont::SetBackGroundOnlyTextOn();
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
// lstrcpy's changed with strcpy
if (!m_bSkinsEnumerated) {
@@ -3042,7 +3045,7 @@ CMenuManager::SmallMessageScreen(const char* text)
CFont::SetBackGroundOnlyTextOn();
CSprite2d::DrawRect(CRect(SCREEN_STRETCH_X(95.0f), SCREEN_SCALE_FROM_BOTTOM(165.0f), SCREEN_STRETCH_FROM_RIGHT(95.0f), SCREEN_SCALE_Y(115.0f)), CRGBA(50, 50, 50, FadeIn(210)));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
- CFont::SetCentreSize(SCREEN_STRETCH_X(430.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(430.0f));
CFont::SetCentreOn();
CFont::SetColor(CRGBA(LABEL_COLOR.r, LABEL_COLOR.g, LABEL_COLOR.b, FadeIn(255)));
CFont::SetDropShadowPosition(2);
@@ -4702,8 +4705,8 @@ CMenuManager::PrintMap(void)
CRadar::DrawBlips();
if (m_PrefsShowLegends) {
- CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(40.0f));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(84.0f));
+ CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(40.0f));
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(84.0f));
CFont::SetBackGroundOnlyTextOff();
CFont::SetColor(CRGBA(LABEL_COLOR.r, LABEL_COLOR.g, LABEL_COLOR.b, FadeIn(255)));
CFont::SetDropShadowPosition(2);
@@ -4826,8 +4829,8 @@ CMenuManager::PrintMap(void)
#endif
m_bMenuMapActive = false;
- CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(10.0f));
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(10.0f));
+ CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
+ CFont::SetRightJustifyWrap(MENU_X_LEFT_ALIGNED(MENU_UNK_X_MARGIN));
DisplayHelperText("FEH_MPH");
}
@@ -5049,4 +5052,4 @@ uint8 CMenuManager::GetNumberOfMenuOptions()
#undef GetBackJustUp
#undef GetBackJustDown
-#endif \ No newline at end of file
+#endif
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 4c44e5e6..d2091a52 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -11,12 +11,10 @@
#define MENUHEADER_WIDTH 1.0f
#define MENU_UNK_X_MARGIN 10.0f
-#define MENU_UNK_WIDTH 10.0f
#define MENUACTION_SCALE_MULT 0.9f
#define MENULABEL_X_MARGIN 80.0f
-#define MENULABEL_WIDTH 80.0f
#define MENULABEL_POS_X 100.0f
#define MENULABEL_POS_Y 97.0f
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index a8637980..4034c4b6 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -137,7 +137,7 @@ void MessageScreen(char *msg)
CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(190.0f)); // 450.0f
CFont::SetScale(SCREEN_SCALE_X(1.0f), SCREEN_SCALE_Y(1.0f));
CFont::SetCentreOn();
- CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(190.0f)); // 450.0f
+ CFont::SetCentreSize(SCREEN_SCALE_X(450.0f));
CFont::SetJustifyOff();
CFont::SetColor(CRGBA(255, 255, 255, 255));
CFont::SetDropColor(CRGBA(32, 32, 32, 255));
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index b723eb1d..983fc588 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -3222,6 +3222,9 @@ int16 CPad::SniperModeLookUpDown(void)
int16 axis = NewState.LeftStickY;
int16 dpad;
+#ifdef FIX_BUGS
+ axis = -axis;
+#endif
if (CPad::bInvertLook4Pad) {
axis = -axis;
dpad = (NewState.DPadDown - NewState.DPadUp) / 2;
@@ -3257,7 +3260,9 @@ int16 CPad::LookAroundLeftRight(void)
int16 CPad::LookAroundUpDown(void)
{
int16 axis = GetPad(0)->NewState.RightStickY;
-
+#ifdef FIX_BUGS
+ axis = -axis;
+#endif
if (CPad::bInvertLook4Pad)
axis = -axis;
@@ -3289,7 +3294,7 @@ void CPad::PrintErrorMessage(void)
CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_STRETCH_FROM_RIGHT(50.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetColor(CRGBA(255, 255, 200, 200));
@@ -3307,7 +3312,7 @@ void CPad::PrintErrorMessage(void)
CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
- CFont::SetCentreSize(SCREEN_STRETCH_FROM_RIGHT(50.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetColor(CRGBA(255, 255, 200, 200));
diff --git a/src/core/config.h b/src/core/config.h
index 01d63f89..822cf83f 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -243,9 +243,11 @@ enum Config {
//#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 CUTSCENE_BORDERS_SWITCH
+#ifdef LIBRW
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
//#define EXTENDED_PIPELINES // custom render pipelines (includes Neo)
//#define NEW_RENDERER // leeds-like world rendering, needs librw
+#endif
//#define MULTISAMPLING // adds MSAA option TODO
#ifdef LIBRW