mirror of
https://github.com/HarbourMasters/Starship
synced 2026-07-03 05:03:22 -04:00
use forced aspect ratio instead
This commit is contained in:
+8
-8
@@ -547,12 +547,12 @@ extern "C" float OTRGetDimensionFromRightEdge(float v) {
|
||||
(gfx_native_dimensions.width - v));
|
||||
}
|
||||
|
||||
extern "C" float OTRGetDimensionFromLeftEdgeCentered(float v) {
|
||||
return (gfx_native_dimensions.width / 2 - gfx_native_dimensions.height / 2 + (v));
|
||||
extern "C" float OTRGetDimensionFromLeftEdgeForcedAspect(float v, float aspectRatio) {
|
||||
return (gfx_native_dimensions.width / 2 - gfx_native_dimensions.height / 2 * (aspectRatio > 0 ? aspectRatio : OTRGetAspectRatio()) + (v));
|
||||
}
|
||||
|
||||
extern "C" float OTRGetDimensionFromRightEdgeCentered(float v) {
|
||||
return (gfx_native_dimensions.width / 2 + gfx_native_dimensions.height / 2 -
|
||||
extern "C" float OTRGetDimensionFromRightEdgeForcedAspect(float v, float aspectRatio) {
|
||||
return (gfx_native_dimensions.width / 2 + gfx_native_dimensions.height / 2 * (aspectRatio > 0 ? aspectRatio : OTRGetAspectRatio()) -
|
||||
(gfx_native_dimensions.width - v));
|
||||
}
|
||||
// Gets the width of the current render target area
|
||||
@@ -573,12 +573,12 @@ extern "C" int16_t OTRGetRectDimensionFromRightEdge(float v) {
|
||||
return ((int) ceilf(OTRGetDimensionFromRightEdge(v)));
|
||||
}
|
||||
|
||||
extern "C" int16_t OTRGetRectDimensionFromLeftEdgeCentered(float v) {
|
||||
return ((int) floorf(OTRGetDimensionFromLeftEdgeCentered(v)));
|
||||
extern "C" int16_t OTRGetRectDimensionFromLeftEdgeForcedAspect(float v, float aspectRatio) {
|
||||
return ((int) floorf(OTRGetDimensionFromLeftEdgeForcedAspect(v, aspectRatio)));
|
||||
}
|
||||
|
||||
extern "C" int16_t OTRGetRectDimensionFromRightEdgeCentered(float v) {
|
||||
return ((int) ceilf(OTRGetDimensionFromRightEdgeCentered(v)));
|
||||
extern "C" int16_t OTRGetRectDimensionFromRightEdgeForcedAspect(float v, float aspectRatio) {
|
||||
return ((int) ceilf(OTRGetDimensionFromRightEdgeForcedAspect(v, aspectRatio)));
|
||||
}
|
||||
|
||||
extern "C" int32_t OTRConvertHUDXToScreenX(int32_t v) {
|
||||
|
||||
Reference in New Issue
Block a user