From 92cc1cf3af5c5454eddd464e42c495d3739a1cce Mon Sep 17 00:00:00 2001 From: _AG Date: Sat, 15 Jun 2019 01:34:19 +0200 Subject: New updates for Hud.cpp and more. --- src/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common.h') diff --git a/src/common.h b/src/common.h index 4187e0c3..966af022 100644 --- a/src/common.h +++ b/src/common.h @@ -67,7 +67,7 @@ extern void **rwengine; #define DEFAULT_SCREEN_HEIGHT (448) #define SCREEN_WIDTH Float(RsGlobal.width) #define SCREEN_HEIGHT Float(RsGlobal.height) -#define SCREEN_STRETCH_X(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH))) +#define SCREEN_STRETCH_X(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH))) * Float(1.33334f / (CMenuManager::m_PrefsUseWideScreen ? 16.0f / 9.0f : 4.0f / 3.0f)) #define SCREEN_STRETCH_Y(a) Float((a) * (SCREEN_HEIGHT / Float(DEFAULT_SCREEN_HEIGHT))) #define SCREEN_FROM_RIGHT(a) Float(SCREEN_WIDTH - SCREEN_STRETCH_X(a)) #define SCREEN_FROM_BOTTOM(a) Float(SCREEN_HEIGHT - SCREEN_STRETCH_Y(a)) -- cgit v1.2.3 From b83a0d469af25f9756698378e6e928abaa4ec7d0 Mon Sep 17 00:00:00 2001 From: _AG Date: Sun, 16 Jun 2019 00:20:55 +0200 Subject: Updates Draw.cpp, MusicManager.cpp. --- src/common.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/common.h') diff --git a/src/common.h b/src/common.h index 966af022..d31ad18c 100644 --- a/src/common.h +++ b/src/common.h @@ -59,6 +59,9 @@ extern void **rwengine; #define RwEngineInstance (*rwengine) #include "skel\skeleton.h" +#include "Draw.h" + +#define SCREEN_ASPECT_RATIO (CDraw::GetAspectRatio()) #define SCREENW (RsGlobal.maximumWidth) #define SCREENH (RsGlobal.maximumHeight) @@ -67,7 +70,7 @@ extern void **rwengine; #define DEFAULT_SCREEN_HEIGHT (448) #define SCREEN_WIDTH Float(RsGlobal.width) #define SCREEN_HEIGHT Float(RsGlobal.height) -#define SCREEN_STRETCH_X(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH))) * Float(1.33334f / (CMenuManager::m_PrefsUseWideScreen ? 16.0f / 9.0f : 4.0f / 3.0f)) +#define SCREEN_STRETCH_X(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH))) * Float((1.3333334f) / (SCREEN_ASPECT_RATIO)) #define SCREEN_STRETCH_Y(a) Float((a) * (SCREEN_HEIGHT / Float(DEFAULT_SCREEN_HEIGHT))) #define SCREEN_FROM_RIGHT(a) Float(SCREEN_WIDTH - SCREEN_STRETCH_X(a)) #define SCREEN_FROM_BOTTOM(a) Float(SCREEN_HEIGHT - SCREEN_STRETCH_Y(a)) -- cgit v1.2.3 From 2a207af49a922fe65bb3e69489aa3e075b72c3e3 Mon Sep 17 00:00:00 2001 From: aap Date: Sun, 16 Jun 2019 19:06:01 +0200 Subject: some cleanup --- src/common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/common.h') diff --git a/src/common.h b/src/common.h index d31ad18c..9635f01e 100644 --- a/src/common.h +++ b/src/common.h @@ -70,11 +70,15 @@ extern void **rwengine; #define DEFAULT_SCREEN_HEIGHT (448) #define SCREEN_WIDTH Float(RsGlobal.width) #define SCREEN_HEIGHT Float(RsGlobal.height) -#define SCREEN_STRETCH_X(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH))) * Float((1.3333334f) / (SCREEN_ASPECT_RATIO)) +#define SCREEN_STRETCH_X(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH))) +#define SCREEN_STRETCH_X_AR(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH)) * (4.0/3.0f)/SCREEN_ASPECT_RATIO) #define SCREEN_STRETCH_Y(a) Float((a) * (SCREEN_HEIGHT / Float(DEFAULT_SCREEN_HEIGHT))) #define SCREEN_FROM_RIGHT(a) Float(SCREEN_WIDTH - SCREEN_STRETCH_X(a)) #define SCREEN_FROM_BOTTOM(a) Float(SCREEN_HEIGHT - SCREEN_STRETCH_Y(a)) +#define HUD_STRETCH_X SCREEN_STRETCH_X_AR +#define HUD_STRETCH_Y SCREEN_STRETCH_Y + struct GlobalScene { RpWorld *world; -- cgit v1.2.3 From 71ac32cbd7c801eb0c8f9e487faf9c547f6361ce Mon Sep 17 00:00:00 2001 From: aap Date: Sun, 16 Jun 2019 21:41:58 +0200 Subject: fix the cleanup... --- src/common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/common.h') diff --git a/src/common.h b/src/common.h index 9635f01e..a9055391 100644 --- a/src/common.h +++ b/src/common.h @@ -78,6 +78,8 @@ extern void **rwengine; #define HUD_STRETCH_X SCREEN_STRETCH_X_AR #define HUD_STRETCH_Y SCREEN_STRETCH_Y +#define HUD_FROM_RIGHT(a) (SCREEN_WIDTH - HUD_STRETCH_X(a)) +#define HUD_FROM_BOTTOM(a) (SCREEN_HEIGHT - HUD_STRETCH_Y(a)) struct GlobalScene { -- cgit v1.2.3