From bc95293e5f880bffd163504b425123213bd60e04 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 20 Jun 2007 11:21:57 +0000 Subject: Add x5 screen scale (thanks MikeRS!) Subversion-branch: /trunk/chocolate-doom Subversion-revision: 919 --- src/i_scale.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/i_scale.h | 2 ++ src/i_video.c | 25 ++++++++++++-- 3 files changed, 130 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/i_scale.c b/src/i_scale.c index dfba9f60..cba883a5 100644 --- a/src/i_scale.c +++ b/src/i_scale.c @@ -190,6 +190,48 @@ void I_Scale4x(int x1, int y1, int x2, int y2) } } +void I_Scale5x(int x1, int y1, int x2, int y2) +{ + byte *bufp, *screenp, *screenp2, *screenp3, *screenp4, *screenp5; + int x, y; + int multi_pitch; + + multi_pitch = dest_pitch * 5; + bufp = src_buffer + y1 * SCREENWIDTH + x1; + screenp = (byte *) dest_buffer + (y1 * dest_pitch + x1) * 5; + screenp2 = screenp + dest_pitch; + screenp3 = screenp + dest_pitch * 2; + screenp4 = screenp + dest_pitch * 3; + screenp5 = screenp + dest_pitch * 4; + + for (y=y1; y 1200) + + for (y=0; y 0; - // 2x, 3x, 4x scale mode + // 2x, 3x, 4x, 5x scale mode //! // @category video @@ -1008,10 +1016,21 @@ static void CheckCommandLine(void) screenmultiply = 4; } + //! + // @category video + // + // Double up the screen to 5x its size. + // + + if (M_CheckParm("-5")) + { + screenmultiply = 5; + } + if (screenmultiply < 1) screenmultiply = 1; - if (screenmultiply > 4) - screenmultiply = 4; + if (screenmultiply > 5) + screenmultiply = 5; } static void AutoAdjustSettings(void) -- cgit v1.2.3