Package: dosbox
Version: 0.74-4.3
Severity: normal
Tags: patch

Hi!
For historic reasons, scalers are limited only to x3.  Upstream's logic was
that there's no way software scaling could manage a bigger resolution while
still having an acceptable frame rate.

But that was over an decade ago.  Since then, monitors below 1920x1080 don't
really exist, and even crummiest ARM SoCs available for purchase today can
handle that size well.  On the other hand, driver support for OpenGL for
such machines tends to be inexistant.

On DosBox's website, one of forum threads includes a patch to add normal4x,
normal5x and normal6x scalers.  This patch makes the output work well:
320x200 times five is 1600x1000, which fits within a 1920x1080 area.  In
this case, not stretching too much horizontally is good: most modern
monitors and TVs have extremely bad aspect ratios such as 16x9; the typical
DOS resolution of 320x200 already has non-square pixels but distorting them
to square happens to be a reasonable compromise between keeping shapes and
not wasting too much screen area.  For those who want accurate proportions,
DosBox has aspect control.

Tested by sister's rugrats on some random big TV, using my Pine64: normal5x
works fine, trying to emulate OpenGL results in a slideshow.

Patch attached, all I've done was to fix whitespace.


Meow!
-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental')
Architecture: arm64 (aarch64)

Kernel: Linux 4.16.0-00199-ge68d78e24cde (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages dosbox depends on:
ii  libasound2       1.1.3-5
ii  libc6            2.27-3
ii  libgcc1          1:8-20180402-1
ii  libgl1           1.0.0+git20180308-1
ii  libpng16-16      1.6.34-1
ii  libsdl-net1.2    1.2.8-5
ii  libsdl-sound1.2  1.0.3-8
ii  libsdl1.2debian  1.2.15+dfsg2-0.1
ii  libstdc++6       8-20180402-1
ii  libx11-6         2:1.6.5-1
ii  zlib1g           1:1.2.8.dfsg-5

dosbox recommends no packages.

dosbox suggests no packages.

-- no debconf information
>From fa28854405684f179ae34fe8b85e4c14532e7f28 Mon Sep 17 00:00:00 2001
From: Adam Borowski <kilob...@angband.pl>
Date: Fri, 30 Mar 2018 23:13:50 +0200
Subject: [PATCH] allow scaling 4x, 5x, 6x (normal scaler only)

Patch origin: https://www.vogons.org/viewtopic.php?f=41&t=43899
---
 src/dosbox.cpp             |   2 +-
 src/gui/render.cpp         |  19 ++++
 src/gui/render_scalers.cpp | 119 ++++++++++++++++++++++
 src/gui/render_scalers.h   |   7 ++
 src/gui/render_simple.h    |  36 +++++++
 src/gui/render_templates.h | 199 +++++++++++++++++++++++++++++++++++++
 6 files changed, 381 insertions(+), 1 deletion(-)

diff --git a/src/dosbox.cpp b/src/dosbox.cpp
index a4bf564..fdc3064 100644
--- a/src/dosbox.cpp
+++ b/src/dosbox.cpp
@@ -381,7 +381,7 @@ void DOSBOX_Init(void) {
        Pstring = 
Pmulti->GetSection()->Add_string("type",Property::Changeable::Always,"normal2x");
 
        const char *scalers[] = { 
-               "none", "normal2x", "normal3x",
+               "none", "normal2x", "normal3x", "normal4x", "normal5x", 
"normal6x",
 #if RENDER_USE_ADVANCED_SCALERS>2
                "advmame2x", "advmame3x", "advinterp2x", "advinterp3x", "hq2x", 
"hq3x", "2xsai", "super2xsai", "supereagle",
 #endif
diff --git a/src/gui/render.cpp b/src/gui/render.cpp
index 1ba6097..682a94b 100644
--- a/src/gui/render.cpp
+++ b/src/gui/render.cpp
@@ -288,6 +288,12 @@ static void RENDER_Reset( void ) {
                        simpleBlock = &ScaleNormal2x;
                else if (render.scale.size == 3)
                        simpleBlock = &ScaleNormal3x;
+               else if (render.scale.size == 4)
+                       simpleBlock = &ScaleNormal4x;
+               else if (render.scale.size == 5)
+                       simpleBlock = &ScaleNormal5x;
+               else if (render.scale.size == 6)
+                       simpleBlock = &ScaleNormal6x;
                else
                        simpleBlock = &ScaleNormal1x;
                /* Maybe override them */
@@ -348,8 +354,18 @@ static void RENDER_Reset( void ) {
                }
 #endif
        } else if (dblw) {
+               if ((render.scale.size == 2) && (render.scale.forced))
+                       simpleBlock = &ScaleNormalDw2x;
+               else if ((render.scale.size == 3) && (render.scale.forced))
+                       simpleBlock = &ScaleNormalDw3x;
+               else
                simpleBlock = &ScaleNormalDw;
        } else if (dblh) {
+               if ((render.scale.size == 2) && (render.scale.forced))
+                       simpleBlock = &ScaleNormalDh2x;
+               else if ((render.scale.size == 3) && (render.scale.forced))
+                       simpleBlock = &ScaleNormalDh3x;
+               else
                simpleBlock = &ScaleNormalDh;
        } else  {
 forcenormal:
@@ -597,6 +613,9 @@ void RENDER_Init(Section * sec) {
        if (scaler == "none") { render.scale.op = 
scalerOpNormal;render.scale.size = 1; }
        else if (scaler == "normal2x") { render.scale.op = 
scalerOpNormal;render.scale.size = 2; }
        else if (scaler == "normal3x") { render.scale.op = 
scalerOpNormal;render.scale.size = 3; }
+       else if (scaler == "normal4x") { render.scale.op = 
scalerOpNormal;render.scale.size = 4; }
+       else if (scaler == "normal5x") { render.scale.op = 
scalerOpNormal;render.scale.size = 5; }
+       else if (scaler == "normal6x") { render.scale.op = 
scalerOpNormal;render.scale.size = 6; }
 #if RENDER_USE_ADVANCED_SCALERS>2
        else if (scaler == "advmame2x") { render.scale.op = 
scalerOpAdvMame;render.scale.size = 2; }
        else if (scaler == "advmame3x") { render.scale.op = 
scalerOpAdvMame;render.scale.size = 3; }
diff --git a/src/gui/render_scalers.cpp b/src/gui/render_scalers.cpp
index ebcc077..3d8640c 100644
--- a/src/gui/render_scalers.cpp
+++ b/src/gui/render_scalers.cpp
@@ -256,6 +256,125 @@ ScalerSimpleBlock_t ScaleNormal3x = {
 {      Normal3x_8_8_R,         Normal3x_9_15_R ,       Normal3x_9_16_R ,       
Normal3x_9_32_R }
 }};
 
+ScalerSimpleBlock_t ScaleNormal4x = {
+       "Normal4x",
+       GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
+       4,4,{
+{       Normal4x_8_8_L,                Normal4x_8_15_L ,        
Normal4x_8_16_L ,      Normal4x_8_32_L },
+{                                                              0,              
Normal4x_15_15_L,        Normal4x_15_16_L,      Normal4x_15_32_L},
+{                                                              0,              
Normal4x_16_15_L,        Normal4x_16_16_L,      Normal4x_16_32_L},
+{                                                              0,              
Normal4x_32_15_L,        Normal4x_32_16_L,      Normal4x_32_32_L},
+{       Normal4x_8_8_L,                Normal4x_9_15_L ,        
Normal4x_9_16_L ,      Normal4x_9_32_L }
+},{
+{       Normal4x_8_8_R,                Normal4x_8_15_R ,        
Normal4x_8_16_R ,      Normal4x_8_32_R },
+{                                                              0,              
Normal4x_15_15_R,        Normal4x_15_16_R,      Normal4x_15_32_R},
+{                                                              0,              
Normal4x_16_15_R,        Normal4x_16_16_R,      Normal4x_16_32_R},
+{                                                              0,              
Normal4x_32_15_R,        Normal4x_32_16_R,      Normal4x_32_32_R},
+{       Normal4x_8_8_R,                Normal4x_9_15_R ,        
Normal4x_9_16_R ,      Normal4x_9_32_R }
+}};
+
+ScalerSimpleBlock_t    ScaleNormal5x   =       {
+       "Normal5x",
+       GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
+       5,5,{
+{       Normal5x_8_8_L,                Normal5x_8_15_L ,        
Normal5x_8_16_L ,      Normal5x_8_32_L },
+{                                                              0,              
Normal5x_15_15_L,        Normal5x_15_16_L,      Normal5x_15_32_L},
+{                                                              0,              
Normal5x_16_15_L,        Normal5x_16_16_L,      Normal5x_16_32_L},
+{                                                              0,              
Normal5x_32_15_L,        Normal5x_32_16_L,      Normal5x_32_32_L},
+{       Normal5x_8_8_L,                Normal5x_9_15_L ,        
Normal5x_9_16_L ,      Normal5x_9_32_L }
+},{
+{       Normal5x_8_8_R,                Normal5x_8_15_R ,        
Normal5x_8_16_R ,      Normal5x_8_32_R },
+{                                                              0,              
Normal5x_15_15_R,        Normal5x_15_16_R,      Normal5x_15_32_R},
+{                                                              0,              
Normal5x_16_15_R,        Normal5x_16_16_R,      Normal5x_16_32_R},
+{                                                              0,              
Normal5x_32_15_R,        Normal5x_32_16_R,      Normal5x_32_32_R},
+{       Normal5x_8_8_R,                Normal5x_9_15_R ,        
Normal5x_9_16_R ,      Normal5x_9_32_R }
+}};
+
+ScalerSimpleBlock_t    ScaleNormal6x   =       {
+       "Normal6x",
+       GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
+       6,6,{
+{       Normal6x_8_8_L,                Normal6x_8_15_L ,        
Normal6x_8_16_L ,      Normal6x_8_32_L },
+{                                                              0,              
Normal6x_15_15_L,        Normal6x_15_16_L,      Normal6x_15_32_L},
+{                                                              0,              
Normal6x_16_15_L,        Normal6x_16_16_L,      Normal6x_16_32_L},
+{                                                              0,              
Normal6x_32_15_L,        Normal6x_32_16_L,      Normal6x_32_32_L},
+{       Normal6x_8_8_L,                Normal6x_9_15_L ,        
Normal6x_9_16_L ,      Normal6x_9_32_L }
+},{
+{       Normal6x_8_8_R,                Normal6x_8_15_R ,        
Normal6x_8_16_R ,      Normal6x_8_32_R },
+{                                                              0,              
Normal6x_15_15_R,        Normal6x_15_16_R,      Normal6x_15_32_R},
+{                                                              0,              
Normal6x_16_15_R,        Normal6x_16_16_R,      Normal6x_16_32_R},
+{                                                              0,              
Normal6x_32_15_R,        Normal6x_32_16_R,      Normal6x_32_32_R},
+{       Normal6x_8_8_R,                Normal6x_9_15_R ,        
Normal6x_9_16_R ,      Normal6x_9_32_R }
+}};
+
+ScalerSimpleBlock_t ScaleNormalDw2x = {
+       "Normal2x",
+       GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
+       4,2,{
+{      NormalDw2x_8_8_L,               NormalDw2x_8_15_L ,     
NormalDw2x_8_16_L ,     NormalDw2x_8_32_L },
+{                     0,               NormalDw2x_15_15_L,     
NormalDw2x_15_16_L,     NormalDw2x_15_32_L},
+{                     0,               NormalDw2x_16_15_L,     
NormalDw2x_16_16_L,     NormalDw2x_16_32_L},
+{                     0,               NormalDw2x_32_15_L,     
NormalDw2x_32_16_L,     NormalDw2x_32_32_L},
+{      NormalDw2x_8_8_L,               NormalDw2x_9_15_L ,     
NormalDw2x_9_16_L ,     NormalDw2x_9_32_L }
+},{
+{      NormalDw2x_8_8_R,               NormalDw2x_8_15_R ,     
NormalDw2x_8_16_R ,     NormalDw2x_8_32_R },
+{                     0,               NormalDw2x_15_15_R,     
NormalDw2x_15_16_R,     NormalDw2x_15_32_R},
+{                     0,               NormalDw2x_16_15_R,     
NormalDw2x_16_16_R,     NormalDw2x_16_32_R},
+{                     0,               NormalDw2x_32_15_R,     
NormalDw2x_32_16_R,     NormalDw2x_32_32_R},
+{      NormalDw2x_8_8_R,               NormalDw2x_9_15_R ,     
NormalDw2x_9_16_R ,     NormalDw2x_9_32_R }
+}};
+
+ScalerSimpleBlock_t ScaleNormalDh2x = {
+       "Normal2x",
+       GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
+       2,4,{
+{      NormalDh2x_8_8_L,               NormalDh2x_8_15_L ,     
NormalDh2x_8_16_L ,     NormalDh2x_8_32_L },
+{                     0,               NormalDh2x_15_15_L,     
NormalDh2x_15_16_L,     NormalDh2x_15_32_L},
+{                     0,               NormalDh2x_16_15_L,     
NormalDh2x_16_16_L,     NormalDh2x_16_32_L},
+{                     0,               NormalDh2x_32_15_L,     
NormalDh2x_32_16_L,     NormalDh2x_32_32_L},
+{      NormalDh2x_8_8_L,               NormalDh2x_9_15_L ,     
NormalDh2x_9_16_L ,     NormalDh2x_9_32_L }
+},{
+{      NormalDh2x_8_8_R,               NormalDh2x_8_15_R ,     
NormalDh2x_8_16_R ,     NormalDh2x_8_32_R },
+{                     0,               NormalDh2x_15_15_R,     
NormalDh2x_15_16_R,     NormalDh2x_15_32_R},
+{                     0,               NormalDh2x_16_15_R,     
NormalDh2x_16_16_R,     NormalDh2x_16_32_R},
+{                     0,               NormalDh2x_32_15_R,     
NormalDh2x_32_16_R,     NormalDh2x_32_32_R},
+{      NormalDh2x_8_8_R,               NormalDh2x_9_15_R ,     
NormalDh2x_9_16_R ,     NormalDh2x_9_32_R }
+}};
+
+ScalerSimpleBlock_t ScaleNormalDw3x = {
+       "Normal3x",
+       GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
+       6,3,{
+{      NormalDw3x_8_8_L,               NormalDw3x_8_15_L ,     
NormalDw3x_8_16_L ,     NormalDw3x_8_32_L },
+{                     0,               NormalDw3x_15_15_L,     
NormalDw3x_15_16_L,     NormalDw3x_15_32_L},
+{                     0,               NormalDw3x_16_15_L,     
NormalDw3x_16_16_L,     NormalDw3x_16_32_L},
+{                     0,               NormalDw3x_32_15_L,     
NormalDw3x_32_16_L,     NormalDw3x_32_32_L},
+{      NormalDw3x_8_8_L,               NormalDw3x_9_15_L ,     
NormalDw3x_9_16_L ,     NormalDw3x_9_32_L }
+},{
+{      NormalDw3x_8_8_R,               NormalDw3x_8_15_R ,     
NormalDw3x_8_16_R ,     NormalDw3x_8_32_R },
+{                     0,               NormalDw3x_15_15_R,     
NormalDw3x_15_16_R,     NormalDw3x_15_32_R},
+{                     0,               NormalDw3x_16_15_R,     
NormalDw3x_16_16_R,     NormalDw3x_16_32_R},
+{                     0,               NormalDw3x_32_15_R,     
NormalDw3x_32_16_R,     NormalDw3x_32_32_R},
+{      NormalDw3x_8_8_R,               NormalDw3x_9_15_R ,     
NormalDw3x_9_16_R ,     NormalDw3x_9_32_R }
+}};
+
+ScalerSimpleBlock_t ScaleNormalDh3x = {
+       "Normal3x",
+       GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
+       3,6,{
+{      NormalDh3x_8_8_L,               NormalDh3x_8_15_L ,     
NormalDh3x_8_16_L ,     NormalDh3x_8_32_L },
+{                     0,               NormalDh3x_15_15_L,     
NormalDh3x_15_16_L,     NormalDh3x_15_32_L},
+{                     0,               NormalDh3x_16_15_L,     
NormalDh3x_16_16_L,     NormalDh3x_16_32_L},
+{                     0,               NormalDh3x_32_15_L,     
NormalDh3x_32_16_L,     NormalDh3x_32_32_L},
+{      NormalDh3x_8_8_L,               NormalDh3x_9_15_L ,     
NormalDh3x_9_16_L ,     NormalDh3x_9_32_L }
+},{
+{      NormalDh3x_8_8_R,               NormalDh3x_8_15_R ,     
NormalDh3x_8_16_R ,     NormalDh3x_8_32_R },
+{                     0,               NormalDh3x_15_15_R,     
NormalDh3x_15_16_R,     NormalDh3x_15_32_R},
+{                     0,               NormalDh3x_16_15_R,     
NormalDh3x_16_16_R,     NormalDh3x_16_32_R},
+{                     0,               NormalDh3x_32_15_R,     
NormalDh3x_32_16_R,     NormalDh3x_32_32_R},
+{      NormalDh3x_8_8_R,               NormalDh3x_9_15_R ,     
NormalDh3x_9_16_R ,     NormalDh3x_9_32_R }
+}};
+
 #if RENDER_USE_ADVANCED_SCALERS>0
 ScalerSimpleBlock_t ScaleTV2x = {
        "TV2x",
diff --git a/src/gui/render_scalers.h b/src/gui/render_scalers.h
index 9c0de27..656d144 100644
--- a/src/gui/render_scalers.h
+++ b/src/gui/render_scalers.h
@@ -113,6 +113,13 @@ extern ScalerSimpleBlock_t ScaleNormalDw;
 extern ScalerSimpleBlock_t ScaleNormalDh;
 extern ScalerSimpleBlock_t ScaleNormal2x;
 extern ScalerSimpleBlock_t ScaleNormal3x;
+extern ScalerSimpleBlock_t ScaleNormal4x;
+extern ScalerSimpleBlock_t ScaleNormal5x;
+extern ScalerSimpleBlock_t ScaleNormal6x;
+extern ScalerSimpleBlock_t ScaleNormalDw2x;
+extern ScalerSimpleBlock_t ScaleNormalDh2x;
+extern ScalerSimpleBlock_t ScaleNormalDw3x;
+extern ScalerSimpleBlock_t ScaleNormalDh3x;
 #if RENDER_USE_ADVANCED_SCALERS>0
 extern ScalerSimpleBlock_t ScaleTV2x;
 extern ScalerSimpleBlock_t ScaleTV3x;
diff --git a/src/gui/render_simple.h b/src/gui/render_simple.h
index 23f40af..b75f3af 100644
--- a/src/gui/render_simple.h
+++ b/src/gui/render_simple.h
@@ -68,6 +68,15 @@ static void conc4d(SCALERNAME,SBPP,DBPP,R)(const void *s) {
 #if (SCALERHEIGHT > 2) 
                        PTYPE *line2 = WC[1];
 #endif
+#if (SCALERHEIGHT > 3)
+                       PTYPE *line3 = WC[2];
+#endif
+#if (SCALERHEIGHT > 4)
+                       PTYPE *line4 = WC[3];
+#endif
+#if (SCALERHEIGHT > 5)
+                       PTYPE *line5 = WC[4];
+#endif
 #else
 #if (SCALERHEIGHT > 1) 
                PTYPE *line1 = (PTYPE *)(((Bit8u*)line0)+ 
render.scale.outPitch);
@@ -75,6 +84,15 @@ static void conc4d(SCALERNAME,SBPP,DBPP,R)(const void *s) {
 #if (SCALERHEIGHT > 2) 
                PTYPE *line2 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch 
* 2);
 #endif
+#if (SCALERHEIGHT > 3)
+               PTYPE *line3 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch 
* 3);
+#endif
+#if (SCALERHEIGHT > 4)
+               PTYPE *line4 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch 
* 4);
+#endif
+#if (SCALERHEIGHT > 5)
+               PTYPE *line5 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch 
* 5);
+#endif
 #endif //defined(SCALERLINEAR)
                        hadChange = 1;
                        for (Bitu i = x > 32 ? 32 : x;i>0;i--,x--) {
@@ -89,6 +107,15 @@ static void conc4d(SCALERNAME,SBPP,DBPP,R)(const void *s) {
 #endif
 #if (SCALERHEIGHT > 2) 
                                line2 += SCALERWIDTH;
+#endif
+#if (SCALERHEIGHT > 3)
+                               line3 += SCALERWIDTH;
+#endif
+#if (SCALERHEIGHT > 4)
+                               line4 += SCALERWIDTH;
+#endif
+#if (SCALERHEIGHT > 5)
+                               line5 += SCALERWIDTH;
 #endif
                        }
 #if defined(SCALERLINEAR)
@@ -99,6 +126,15 @@ static void conc4d(SCALERNAME,SBPP,DBPP,R)(const void *s) {
 #if (SCALERHEIGHT > 2) 
                        
BituMove(((Bit8u*)line0)-copyLen+render.scale.outPitch*2,WC[1], copyLen );
 #endif
+#if (SCALERHEIGHT > 3)
+                       
BituMove(((Bit8u*)line0)-copyLen+render.scale.outPitch*3,WC[2], copyLen );
+#endif
+#if (SCALERHEIGHT > 4)
+                       
BituMove(((Bit8u*)line0)-copyLen+render.scale.outPitch*4,WC[3], copyLen );
+#endif
+#if (SCALERHEIGHT > 5)
+                       
BituMove(((Bit8u*)line0)-copyLen+render.scale.outPitch*5,WC[4], copyLen );
+#endif
 #endif //defined(SCALERLINEAR)
                }
        }
diff --git a/src/gui/render_templates.h b/src/gui/render_templates.h
index 39ab2ef..f115f78 100644
--- a/src/gui/render_templates.h
+++ b/src/gui/render_templates.h
@@ -257,6 +257,113 @@ static void conc3d(Cache,SBPP,DBPP) (const void * s) {
 #undef SCALERHEIGHT
 #undef SCALERFUNC
 
+#define SCALERNAME             Normal4x
+#define SCALERWIDTH            4
+#define SCALERHEIGHT   4
+#define SCALERFUNC                                                        \
+       line0[0] = P;                                                           
\
+       line0[1] = P;                                                           
\
+       line0[2] = P;                                                           
\
+       line0[3] = P;                                                           
\
+       line1[0] = P;                                                           
\
+       line1[1] = P;                                                           
\
+       line1[2] = P;                                                           
\
+       line1[3] = P;                                                           
\
+       line2[0] = P;                                                           
\
+       line2[1] = P;                                                           
\
+       line2[2] = P;                                                           
\
+       line2[3] = P;                                                           
\
+       line3[0] = P;                                                           
\
+       line3[1] = P;                                                           
\
+       line3[2] = P;                                                           
\
+       line3[3] = P;
+#include "render_simple.h"
+#undef SCALERNAME
+#undef SCALERWIDTH
+#undef SCALERHEIGHT
+#undef SCALERFUNC
+
+#define SCALERNAME             Normal5x
+#define SCALERWIDTH            5
+#define SCALERHEIGHT   5
+#define SCALERFUNC                                                        \
+       line0[0] = P;                                                           
\
+       line0[1] = P;                                                           
\
+       line0[2] = P;                                                           
\
+       line0[3] = P;                                                           
\
+       line0[4] = P;                                                           
\
+       line1[0] = P;                                                           
\
+       line1[1] = P;                                                           
\
+       line1[2] = P;                                                           
\
+       line1[3] = P;                                                           
\
+       line1[4] = P;                                                           
\
+       line2[0] = P;                                                           
\
+       line2[1] = P;                                                           
\
+       line2[2] = P;                                                           
\
+       line2[3] = P;                                                           
\
+       line2[4] = P;                                                           
\
+       line3[0] = P;                                                           
\
+       line3[1] = P;                                                           
\
+       line3[2] = P;                                                           
\
+       line3[3] = P;                                                           
 \
+       line3[4] = P;                                                           
\
+       line4[0] = P;                                                           
\
+       line4[1] = P;                                                           
\
+       line4[2] = P;                                                           
\
+       line4[3] = P;                                                           
 \
+       line4[4] = P;
+#include "render_simple.h"
+#undef SCALERNAME
+#undef SCALERWIDTH
+#undef SCALERHEIGHT
+#undef SCALERFUNC
+
+#define SCALERNAME             Normal6x
+#define SCALERWIDTH            6
+#define SCALERHEIGHT   6
+#define SCALERFUNC                                                        \
+       line0[0] = P;                                                           
\
+       line0[1] = P;                                                           
\
+       line0[2] = P;                                                           
\
+       line0[3] = P;                                                           
\
+       line0[4] = P;                                                           
\
+       line0[5] = P;                                                           
\
+       line1[0] = P;                                                           
\
+       line1[1] = P;                                                           
\
+       line1[2] = P;                                                           
\
+       line1[3] = P;                                                           
\
+       line1[4] = P;                                                           
\
+       line1[5] = P;                                                           
\
+       line2[0] = P;                                                           
\
+       line2[1] = P;                                                           
\
+       line2[2] = P;                                                           
\
+       line2[3] = P;                                                           
\
+       line2[4] = P;                                                           
\
+       line2[5] = P;                                                           
\
+       line3[0] = P;                                                           
\
+       line3[1] = P;                                                           
\
+       line3[2] = P;                                                           
\
+       line3[3] = P;                                                           
 \
+       line3[4] = P;                                                           
\
+       line3[5] = P;                                                           
\
+       line4[0] = P;                                                           
\
+       line4[1] = P;                                                           
\
+       line4[2] = P;                                                           
\
+       line4[3] = P;                                                           
 \
+       line4[4] = P;                                                           
\
+       line4[5] = P;                                                           
\
+       line5[0] = P;                                                           
\
+       line5[1] = P;                                                           
\
+       line5[2] = P;                                                           
\
+       line5[3] = P;                                                           
 \
+       line5[4] = P;                                                           
\
+       line5[5] = P;
+#include "render_simple.h"
+#undef SCALERNAME
+#undef SCALERWIDTH
+#undef SCALERHEIGHT
+#undef SCALERFUNC
+
 #define SCALERNAME             NormalDw
 #define SCALERWIDTH            2
 #define SCALERHEIGHT   1
@@ -281,6 +388,98 @@ static void conc3d(Cache,SBPP,DBPP) (const void * s) {
 #undef SCALERHEIGHT
 #undef SCALERFUNC
 
+#define SCALERNAME             NormalDw2x
+#define SCALERWIDTH            4
+#define SCALERHEIGHT   2
+#define SCALERFUNC                                                             
\
+       line0[0] = P;                                                           
\
+       line0[1] = P;                                                           
\
+       line0[2] = P;                                                           
\
+       line0[3] = P;                                                           
\
+       line1[0] = P;                                                           
\
+       line1[1] = P;                                                           
\
+       line1[2] = P;                                                           
\
+       line1[3] = P;
+#include "render_simple.h"
+#undef SCALERNAME
+#undef SCALERWIDTH
+#undef SCALERHEIGHT
+#undef SCALERFUNC
+
+#define SCALERNAME             NormalDh2x
+#define SCALERWIDTH            2
+#define SCALERHEIGHT   4
+#define SCALERFUNC                                                             
\
+       line0[0] = P;                                                           
\
+       line0[1] = P;                                                   \
+       line1[0] = P;                                                   \
+       line1[1] = P;                                                   \
+       line2[0] = P;                                                   \
+       line2[1] = P;                                                   \
+       line3[0] = P;                                                   \
+       line3[1] = P;
+#include "render_simple.h"
+#undef SCALERNAME
+#undef SCALERWIDTH
+#undef SCALERHEIGHT
+#undef SCALERFUNC
+
+#define SCALERNAME             NormalDw3x
+#define SCALERWIDTH            6
+#define SCALERHEIGHT   3
+#define SCALERFUNC                                                             
\
+       line0[0] = P;                                                           
\
+       line0[1] = P;                                                           
\
+       line0[2] = P;                                                           
\
+       line0[3] = P;                                                           
\
+       line0[4] = P;                                                           
\
+       line0[5] = P;                                                           
\
+       line1[0] = P;                                                           
\
+       line1[1] = P;                                                           
\
+       line1[2] = P;                                                           
\
+       line1[3] = P;                                                           
\
+       line1[4] = P;                                                           
\
+       line1[5] = P;                                                           
\
+       line2[0] = P;                                                           
\
+       line2[1] = P;                                                           
\
+       line2[2] = P;                                                           
\
+       line2[3] = P;                                                           
\
+       line2[4] = P;                                                           
\
+       line2[5] = P;
+#include "render_simple.h"
+#undef SCALERNAME
+#undef SCALERWIDTH
+#undef SCALERHEIGHT
+#undef SCALERFUNC
+
+#define SCALERNAME             NormalDh3x
+#define SCALERWIDTH            3
+#define SCALERHEIGHT   6
+#define SCALERFUNC                                                             
\
+       line0[0] = P;                                                           
\
+       line0[1] = P;                                                   \
+       line0[2] = P;                                                   \
+       line1[0] = P;                                                   \
+       line1[1] = P;                                                   \
+       line1[2] = P;                                                   \
+       line2[0] = P;                                                   \
+       line2[1] = P;                                                   \
+       line2[2] = P;                                                   \
+       line3[0] = P;                                                   \
+       line3[1] = P;                                                   \
+       line3[2] = P;                                                   \
+       line4[0] = P;                                                   \
+       line4[1] = P;                                                   \
+       line4[2] = P;                                                   \
+       line5[0] = P;                                                   \
+       line5[1] = P;                                                   \
+       line5[2] = P;
+#include "render_simple.h"
+#undef SCALERNAME
+#undef SCALERWIDTH
+#undef SCALERHEIGHT
+#undef SCALERFUNC
+
 #if (DBPP > 8)
 
 #if RENDER_USE_ADVANCED_SCALERS>0
-- 
2.17.0

Reply via email to