move video_t to v_video.h, clean up

This commit is contained in:
Roman Fomin 2023-12-15 20:50:30 +07:00
parent 9921171a9d
commit 06e7a74f82
7 changed files with 37 additions and 45 deletions

View File

@ -18,17 +18,16 @@
//-----------------------------------------------------------------------------
#include "doomstat.h"
#include "doomkeys.h"
#include "st_stuff.h"
#include "r_main.h"
#include "r_things.h"
#include "p_setup.h"
#include "p_maputl.h"
#include "w_wad.h"
#include "i_video.h"
#include "v_video.h"
#include "p_spec.h"
#include "am_map.h"
#include "dstrings.h"
#include "d_deh.h" // Ty 03/27/98 - externalizations
#include "m_input.h"
#include "m_menu.h"

View File

@ -77,12 +77,9 @@ typedef enum
// [FG] flashing disk icon
#define DISK_ICON_THRESHOLD (20 * 1024)
// killough 2/8/98: MAX versions for maximum screen sizes
// allows us to avoid the overhead of dynamic allocation
// when multiple screen sizes are supported
#define SCREENWIDTH 320
#define SCREENHEIGHT 200
#define NONWIDEWIDTH SCREENWIDTH // [crispy] non-widescreen SCREENWIDTH
// The maximum number of players, multiplayer/networking.
#define MAXPLAYERS 4

View File

@ -23,27 +23,6 @@
#include "doomtype.h"
#include "doomdef.h"
#include "tables.h"
#define NONWIDEWIDTH SCREENWIDTH // [crispy] non-widescreen SCREENWIDTH
typedef struct
{
int width;
int height;
int unscaledw;
int deltaw;
fixed_t xscale;
fixed_t yscale;
fixed_t xstep;
fixed_t ystep;
angle_t fov;
} video_t;
extern video_t video;
enum
{
@ -87,7 +66,7 @@ void I_ToggleVsync(void); // [JN] Calls native SDL vsync toggle
extern boolean use_vsync; // killough 2/8/98: controls whether vsync is called
extern boolean disk_icon; // killough 10/98
extern int resolution_mode, default_resolution_mode; // killough 11/98
extern resolution_mode_t resolution_mode, default_resolution_mode;
extern boolean use_aspect;
extern boolean uncapped, default_uncapped; // [FG] uncapped rendering frame rate

View File

@ -25,6 +25,7 @@
#include "r_segs.h"
#include "r_plane.h"
#include "r_things.h"
#include "v_video.h"
seg_t *curline;
side_t *sidedef;

View File

@ -27,10 +27,10 @@
#include "r_draw.h"
#include "r_sky.h"
#include "r_voxel.h"
#include "i_video.h"
#include "v_video.h"
#include "am_map.h"
#include "st_stuff.h"
#include "hu_stuff.h"
// Fineangles in the SCREENWIDTH wide window.
#define FIELDOFVIEW 2048

View File

@ -31,7 +31,6 @@
//
//-----------------------------------------------------------------------------
#include "i_video.h"
#include "z_zone.h" /* memory allocation wrappers -- killough */
#include "doomstat.h"
@ -43,6 +42,7 @@
#include "r_plane.h"
#include "r_bmaps.h" // [crispy] R_BrightmapForTexName()
#include "r_swirl.h" // [crispy] R_DistortedFlat()
#include "v_video.h"
#define MAXVISPLANES 128 /* must be a power of 2 */

View File

@ -25,7 +25,6 @@
#include "doomtype.h"
#include "doomdef.h"
#include "i_video.h"
// Needed because we are refering to patches.
#include "r_data.h"
@ -92,22 +91,39 @@ void V_InitColorTranslation(void);
typedef struct
{
int x; // original x coordinate for upper left corner
int y; // original y coordinate for upper left corner
int w; // original width
int h; // original height
int width;
int height;
int unscaledw;
int deltaw;
int cx1; // clipped x coordinate for left edge
int cx2; // clipped x coordinate for right edge
int cy1; // clipped y coordinate for upper edge
int cy2; // clipped y coordinate for lower edge
int cw; // clipped width
int ch; // clipped height
fixed_t xscale;
fixed_t yscale;
fixed_t xstep;
fixed_t ystep;
int sx; // scaled x
int sy; // scaled y
int sw; // scaled width
int sh; // scaled height
angle_t fov;
} video_t;
extern video_t video;
typedef struct
{
int x; // original x coordinate for upper left corner
int y; // original y coordinate for upper left corner
int w; // original width
int h; // original height
int cx1; // clipped x coordinate for left edge
int cx2; // clipped x coordinate for right edge
int cy1; // clipped y coordinate for upper edge
int cy2; // clipped y coordinate for lower edge
int cw; // clipped width
int ch; // clipped height
int sx; // scaled x
int sy; // scaled y
int sw; // scaled width
int sh; // scaled height
} vrect_t;
void V_ScaleRect(vrect_t *rect);