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 --- NEWS | 2 +- setup/display.c | 1 + src/i_scale.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/i_scale.h | 2 ++ src/i_video.c | 25 +++++++++++-- 5 files changed, 132 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 9923fb5f..1e30d05e 100644 --- a/NEWS +++ b/NEWS @@ -30,7 +30,7 @@ Doom .mus format to .mid a lot better. As one example, tnt.wad Map02 is now a lot closer to how Vanilla says. Also, the music on the deca.wad titlescreen now plays! - * x3 and x4 display scale. + * x3, x4 and x5 display scale (thanks to MikeRS for x5 scale). * Fullscreen "letterbox" mode allows Chocolate Doom to run on machines where 1.6:1 aspect ratio modes are unavailable (320x200/640x400). The game runs in 320x240/640x480 instead, with black borders. diff --git a/setup/display.c b/setup/display.c index 531473ce..840938af 100644 --- a/setup/display.c +++ b/setup/display.c @@ -47,6 +47,7 @@ static vidmode_t modes[] = { "960x600", "960x720", 3, NULL }, { "640x400", "640x480", 2, NULL }, { "1280x800", "1280x960", 4, NULL }, + { "1600x1000", "1600x1200", 5, NULL }, { NULL, NULL, 0, NULL }, }; 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