summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/i_scale.c73
-rw-r--r--src/i_scale.h2
-rw-r--r--src/i_video.c1
-rw-r--r--src/setup/display.c1
4 files changed, 9 insertions, 68 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
diff --git a/src/i_scale.h b/src/i_scale.h
index 48231f5e..3922272e 100644
--- a/src/i_scale.h
+++ b/src/i_scale.h
@@ -47,7 +47,7 @@ extern screen_mode_t mode_squash_1x;
extern screen_mode_t mode_squash_2x;
extern screen_mode_t mode_squash_3x;
extern screen_mode_t mode_squash_4x;
-extern screen_mode_t mode_squash_5x;
+// we don't do 5x.
#endif /* #ifndef __I_SCALE__ */
diff --git a/src/i_video.c b/src/i_video.c
index 242f3ac5..76ad23af 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -122,7 +122,6 @@ static screen_mode_t *screen_modes_corrected[] = {
&mode_squash_2x,
&mode_squash_3x,
&mode_squash_4x,
- &mode_squash_5x,
};
// SDL video driver name
diff --git a/src/setup/display.c b/src/setup/display.c
index e712df94..090fd445 100644
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -80,7 +80,6 @@ static screen_mode_t screen_modes_scaled[] =
{ 960, 720 },
{ 1024, 800 },
{ 1280, 960 },
- { 1280, 1000 },
{ 1600, 1200 },
{ 0, 0},
};