summaryrefslogtreecommitdiff
path: root/src/i_scale.c
diff options
context:
space:
mode:
authorSimon Howard2014-10-25 14:58:31 -0400
committerSimon Howard2014-10-25 14:58:31 -0400
commitd91383ee4057a2fc6fc2fb80144abb34273a6d7f (patch)
treee1de73592bfed31af418a7af24a06900f48257ff /src/i_scale.c
parent9d01d090c48c74a29b4ef67e0cd204772a2193c3 (diff)
downloadchocolate-doom-d91383ee4057a2fc6fc2fb80144abb34273a6d7f.tar.gz
chocolate-doom-d91383ee4057a2fc6fc2fb80144abb34273a6d7f.tar.bz2
chocolate-doom-d91383ee4057a2fc6fc2fb80144abb34273a6d7f.zip
Remove 1280x1000 scaling.
We already have 1280x960, which is the correct aspect ratio. This means that when running at 1080p the windowboxing borders will be slightly thicker, but if we're already showing borders anyway, it's better to at least use the correct aspect ratio. This fixes #460. Thanks to Doom_user for asking about this on Doomworld: http://www.doomworld.com/vb/post/1316735
Diffstat (limited to 'src/i_scale.c')
-rw-r--r--src/i_scale.c73
1 files changed, 8 insertions, 65 deletions
diff --git a/src/i_scale.c b/src/i_scale.c
index f88c6944..4d7bb22c 100644
--- a/src/i_scale.c
+++ b/src/i_scale.c
@@ -1384,69 +1384,12 @@ screen_mode_t mode_squash_4x = {
false,
};
-#define DRAW_PIXEL5 \
- *dest++ = *dest2++ = *dest3++ = *dest4++ = *dest5++ = c
-
-static inline void WriteSquashedLine5x(byte *dest, byte *src)
-{
- int x;
- int c;
- byte *dest2, *dest3, *dest4, *dest5;
-
- dest2 = dest + dest_pitch;
- dest3 = dest + dest_pitch * 2;
- dest4 = dest + dest_pitch * 3;
- dest5 = dest + dest_pitch * 4;
-
- for (x=0; x<SCREENWIDTH; ++x)
- {
- // Draw in blocks of 5
-
- // 100% pixel 0 x4
-
- c = *src++;
- DRAW_PIXEL5;
- DRAW_PIXEL5;
- DRAW_PIXEL5;
- DRAW_PIXEL5;
- }
-}
-
-//
-// 5x squashed (1280x1000)
-//
-
-static boolean I_Squash5x(int x1, int y1, int x2, int y2)
-{
- byte *bufp, *screenp;
- int y;
-
- // Only works with full screen update
-
- if (x1 != 0 || y1 != 0 || x2 != SCREENWIDTH || y2 != SCREENHEIGHT)
- {
- return false;
- }
-
- bufp = src_buffer;
- screenp = (byte *) dest_buffer;
-
- for (y=0; y<SCREENHEIGHT; ++y)
- {
- WriteSquashedLine5x(screenp, bufp);
-
- screenp += dest_pitch * 5;
- bufp += SCREENWIDTH;
- }
-
- return true;
-}
-
-screen_mode_t mode_squash_5x = {
- SCREENWIDTH_4_3 * 5, SCREENHEIGHT * 5,
- I_InitStretchTables,
- I_Squash5x,
- false,
-};
-
+// We used to have mode_squash_5x here as well, but it got removed.
+// 5x squashing gives 1280x1000, which is very close to the 4x stretched
+// 1280x960. The difference is that 1280x1000 is the wrong aspect ratio.
+// It was ultimately decided that it was better to use the right aspect
+// ratio and have slightly larger borders than to have slightly smaller
+// windowboxing borders. It also means that the aspect ratio is correct
+// when running at 1280x1024. See bug #460 for more details, or this
+// post: http://www.doomworld.com/vb/post/1316735