mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 03:12:00 -04:00
move video definition to v_video.c, add comments
This commit is contained in:
parent
6a214d5b9c
commit
f012f8f839
@ -46,8 +46,6 @@
|
||||
|
||||
#define ACTUALHEIGHT 240
|
||||
|
||||
video_t video;
|
||||
|
||||
resolution_mode_t resolution_mode, default_resolution_mode;
|
||||
|
||||
boolean use_vsync; // killough 2/8/98: controls whether vsync is called
|
||||
@ -1033,11 +1031,6 @@ static void ResetResolution(int height)
|
||||
|
||||
video.fov = 2 * atan(video.unscaledw / (1.2 * SCREENHEIGHT) * 3 / 4) / M_PI * ANG180;
|
||||
|
||||
video.xscale = (video.width << FRACBITS) / video.unscaledw;
|
||||
video.yscale = (video.height << FRACBITS) / SCREENHEIGHT;
|
||||
video.xstep = ((video.unscaledw << FRACBITS) / video.width) + 1;
|
||||
video.ystep = ((SCREENHEIGHT << FRACBITS) / video.height) + 1;
|
||||
|
||||
Z_FreeTag(PU_VALLOC);
|
||||
|
||||
V_Init();
|
||||
|
@ -282,6 +282,8 @@ void WriteGeneratedLumpWad(const char *filename)
|
||||
free(lumps);
|
||||
}
|
||||
|
||||
video_t video;
|
||||
|
||||
#define WIDE_SCREENWIDTH 576 // corresponds to 2.4 aspect ratio
|
||||
|
||||
static int x1lookup[WIDE_SCREENWIDTH + 1];
|
||||
@ -970,6 +972,11 @@ void V_Init(void)
|
||||
|
||||
linesize = video.width;
|
||||
|
||||
video.xscale = (video.width << FRACBITS) / video.unscaledw;
|
||||
video.yscale = (video.height << FRACBITS) / SCREENHEIGHT;
|
||||
video.xstep = ((video.unscaledw << FRACBITS) / video.width) + 1;
|
||||
video.ystep = ((SCREENHEIGHT << FRACBITS) / video.height) + 1;
|
||||
|
||||
x1lookup[0] = 0;
|
||||
lastfrac = frac = 0;
|
||||
for (i = 0; i < video.width; i++)
|
||||
|
@ -93,15 +93,15 @@ typedef struct
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
int unscaledw;
|
||||
int deltaw;
|
||||
int unscaledw; // unscaled width with correction for widecreen
|
||||
int deltaw; // widescreen delta
|
||||
|
||||
fixed_t xscale;
|
||||
fixed_t yscale;
|
||||
fixed_t xstep;
|
||||
fixed_t ystep;
|
||||
fixed_t xscale; // x-axis scaling multiplier
|
||||
fixed_t yscale; // y-axis scaling multiplier
|
||||
fixed_t xstep; // x-axis scaling step
|
||||
fixed_t ystep; // y-axis scaling step
|
||||
|
||||
angle_t fov;
|
||||
angle_t fov; // widescreen FOV
|
||||
} video_t;
|
||||
|
||||
extern video_t video;
|
||||
|
Loading…
x
Reference in New Issue
Block a user