mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
BaseRatioSizes replacement functions
This commit is contained in:
parent
5720634045
commit
6d4e4dad25
2 changed files with 25 additions and 0 deletions
|
@ -1721,6 +1721,26 @@ const int BaseRatioSizes[7][4] =
|
||||||
{ 1707, 338, 0, 48*9/16 } // 21:9 568.8889, 337.5, multiplied by three
|
{ 1707, 338, 0, 48*9/16 } // 21:9 568.8889, 337.5, multiplied by three
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int AspectBaseWidth(float aspect)
|
||||||
|
{
|
||||||
|
return (int)round(240.0f * aspect * 3.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
int AspectBaseHeight(float aspect)
|
||||||
|
{
|
||||||
|
return (int)round(200.0f * (320.0f / (240.0f * aspect)) * 3.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
int AspectPspriteOffset(float aspect)
|
||||||
|
{
|
||||||
|
return aspect < 1.3f ? (int)(6.5*FRACUNIT) : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int AspectMultiplier(float aspect)
|
||||||
|
{
|
||||||
|
return (int)round(320.0f / (240.0f * aspect) * 48.0f);
|
||||||
|
}
|
||||||
|
|
||||||
void IVideo::DumpAdapters ()
|
void IVideo::DumpAdapters ()
|
||||||
{
|
{
|
||||||
Printf("Multi-monitor support unavailable.\n");
|
Printf("Multi-monitor support unavailable.\n");
|
||||||
|
|
|
@ -518,6 +518,11 @@ int CheckRatio (int width, int height, int *trueratio=NULL);
|
||||||
static inline int CheckRatio (double width, double height) { return CheckRatio(int(width), int(height)); }
|
static inline int CheckRatio (double width, double height) { return CheckRatio(int(width), int(height)); }
|
||||||
float ActiveRatio (int width, int height, float *trueratio = NULL);
|
float ActiveRatio (int width, int height, float *trueratio = NULL);
|
||||||
static inline double ActiveRatio (double width, double height) { return ActiveRatio(int(width), int(height)); }
|
static inline double ActiveRatio (double width, double height) { return ActiveRatio(int(width), int(height)); }
|
||||||
|
|
||||||
|
int AspectBaseWidth(float aspect);
|
||||||
|
int AspectBaseHeight(float aspect);
|
||||||
|
int AspectPspriteOffset(float aspect);
|
||||||
|
int AspectMultiplier(float aspect);
|
||||||
extern const int BaseRatioSizes[7][4];
|
extern const int BaseRatioSizes[7][4];
|
||||||
|
|
||||||
inline bool IsRatioWidescreen(int ratio) {
|
inline bool IsRatioWidescreen(int ratio) {
|
||||||
|
|
Loading…
Reference in a new issue