2019-10-23 20:51:11 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-10-23 23:20:58 +00:00
|
|
|
#include "drawparms.h"
|
2019-11-10 09:01:31 +00:00
|
|
|
#include "c_cvars.h"
|
2019-12-23 09:53:58 +00:00
|
|
|
#include "v_video.h"
|
2019-11-10 09:01:31 +00:00
|
|
|
// Undo Windows's forced #defines
|
2019-11-05 18:57:48 +00:00
|
|
|
#ifdef DrawText
|
|
|
|
#undef DrawText
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern int32_t xdim, ydim;
|
2019-10-23 20:51:11 +00:00
|
|
|
|
|
|
|
int GetUIScale(int altval);
|
|
|
|
int GetConScale(int altval);
|
|
|
|
|
2019-11-10 09:01:31 +00:00
|
|
|
|
2019-10-23 20:51:11 +00:00
|
|
|
// [RH] Stretch values to make a 320x200 image best fit the screen
|
|
|
|
// without using fractional steppings
|
|
|
|
extern int CleanXfac, CleanYfac;
|
|
|
|
|
|
|
|
// [RH] Effective screen sizes that the above scale values give you
|
|
|
|
extern int CleanWidth, CleanHeight;
|
|
|
|
|
|
|
|
// Above minus 1 (or 1, if they are already 1)
|
|
|
|
extern int CleanXfac_1, CleanYfac_1, CleanWidth_1, CleanHeight_1;
|
|
|
|
|
|
|
|
|
|
|
|
bool SetTextureParms(DrawParms *parms, FTexture *img, double xx, double yy);
|
|
|
|
bool ParseDrawTextureTags(FTexture *img, double x, double y, uint32_t tag, Va_List& tags, DrawParms *parms, bool fortext);
|
|
|
|
void VirtualToRealCoords(double &x, double &y, double &w, double &h, double vwidth, double vheight, bool vbottom, bool handleaspect);
|
2019-12-23 09:53:58 +00:00
|
|
|
//int ActiveFakeRatio(int width, int height);
|
2019-10-23 20:51:11 +00:00
|
|
|
float ActiveRatio(int width, int height, float* trueratio);
|
|
|
|
int CheckRatio(int width, int height, int* trueratio);
|
|
|
|
int AspectBaseWidth(float aspect);;
|
|
|
|
int AspectBaseHeight(float aspect);
|
|
|
|
double AspectPspriteOffset(float aspect);
|
|
|
|
int AspectMultiplier(float aspect);
|
|
|
|
bool AspectTallerThanWide(float aspect);
|
|
|
|
void ScaleWithAspect(int& w, int& h, int Width, int Height);
|
2019-11-08 22:02:52 +00:00
|
|
|
void V_UpdateModeSize(int width, int height);
|
2019-11-05 18:57:48 +00:00
|
|
|
|
|
|
|
void DrawTexture(F2DDrawer *drawer, FTexture* img, double x, double y, int tags_first, ...);
|
|
|
|
void DrawChar (F2DDrawer* drawer, FFont *font, int normalcolor, double x, double y, int character, int tag_first, ...);
|
|
|
|
void DrawText(F2DDrawer* drawer, FFont *font, int normalcolor, double x, double y, const char *string, int tag_first, ...);
|
|
|
|
void DrawText(F2DDrawer* drawer, FFont *font, int normalcolor, double x, double y, const char32_t *string, int tag_first, ...);
|
2019-11-29 23:49:50 +00:00
|
|
|
void DrawFrame(F2DDrawer* twod, PalEntry color, int left, int top, int width, int height, int thickness);
|
2019-11-10 09:01:31 +00:00
|
|
|
|
|
|
|
EXTERN_CVAR(Int, con_scaletext) // Scale notify text at high resolutions?
|
|
|
|
EXTERN_CVAR(Int, con_scale)
|
|
|
|
|