mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-01 05:30:58 +00:00
Use real height/width instead warp dimensions
This commit is contained in:
parent
3adb4a62d7
commit
f48e3e5b4d
4 changed files with 5 additions and 8 deletions
|
@ -140,9 +140,6 @@ extern oldrefdef_t r_refdef;
|
|||
#define MAXWORKINGVERTS (MAXVERTS+4) // max points in an intermediate
|
||||
// polygon (while processing)
|
||||
|
||||
#define WARP_WIDTH 320
|
||||
#define WARP_HEIGHT 240
|
||||
|
||||
#define PARTICLE_Z_CLIP 8.0
|
||||
|
||||
#define TRANSPARENT_COLOR 0xFF
|
||||
|
|
|
@ -1907,7 +1907,7 @@ SWimp_InitGraphics(int fullscreen, int *pwidth, int *pheight)
|
|||
finalverts = malloc((MAXALIASVERTS + 3) * sizeof(finalvert_t));
|
||||
ledges = malloc((NUMSTACKEDGES + 1) * sizeof(edge_t));
|
||||
lsurfs = malloc((NUMSTACKSURFACES + 1) * sizeof(surf_t));
|
||||
r_warpbuffer = malloc(WARP_WIDTH * WARP_HEIGHT * sizeof(pixel_t));
|
||||
r_warpbuffer = malloc(vid.height * vid.width * sizeof(pixel_t));
|
||||
|
||||
if ((vid.width >= 2048) && (sizeof(shift20_t) == 4)) // 2k+ resolution and 32 == shift20_t
|
||||
{
|
||||
|
|
|
@ -355,11 +355,11 @@ void R_SetupFrame (void)
|
|||
// warp into off screen buffer
|
||||
vrect.x = 0;
|
||||
vrect.y = 0;
|
||||
vrect.width = r_newrefdef.width < WARP_WIDTH ? r_newrefdef.width : WARP_WIDTH;
|
||||
vrect.height = r_newrefdef.height < WARP_HEIGHT ? r_newrefdef.height : WARP_HEIGHT;
|
||||
vrect.width = r_newrefdef.width;
|
||||
vrect.height = r_newrefdef.height;
|
||||
|
||||
d_viewbuffer = r_warpbuffer;
|
||||
r_screenwidth = WARP_WIDTH;
|
||||
r_screenwidth = vid.width;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@ void D_WarpScreen (void)
|
|||
int v2;
|
||||
|
||||
v2 = (int)((float)v/(h + AMP2 * 2) * r_refdef.vrect.height);
|
||||
warp_rowptr[v] = r_warpbuffer + (WARP_WIDTH * v2);
|
||||
warp_rowptr[v] = r_warpbuffer + (r_refdef.vrect.width * v2);
|
||||
}
|
||||
|
||||
for (u=0 ; u<w+AMP2*2 ; u++)
|
||||
|
|
Loading…
Reference in a new issue