324 lines
9.3 KiB
Diff
324 lines
9.3 KiB
Diff
diff '--color=auto' -ruN ../heroes-0.21/src/argv.c ./src/argv.c
|
|
--- ../heroes-0.21/src/argv.c 2002-01-09 18:52:35.000000000 +0000
|
|
+++ ./src/argv.c 2022-06-30 10:55:29.838547018 +0100
|
|
@@ -45,8 +45,8 @@
|
|
char* level_name;
|
|
bool mono = false;
|
|
bool bits8 = false;
|
|
-bool hqmix = false;
|
|
-int stretch = 1;
|
|
+bool hqmix = true;
|
|
+int stretch = 4;
|
|
bool nosound = false;
|
|
bool even_lines = false;
|
|
bool showprefs = false;
|
|
@@ -171,15 +171,11 @@
|
|
-S, --no-sound disable sound\n\
|
|
-X, --no-sfx disable sound-effects\n\
|
|
-m, --mono non-stereo output\n\
|
|
- -8, --8bits 8bits sound output\n\
|
|
- -i, --high-quality high quality mixer\n"));
|
|
+ -8, --8bits 8bits sound output\n"));
|
|
puts (_("\
|
|
Display options:\n\
|
|
-G, --gfx-options=OPTIONS pass OPTIONS to the display driver\n\
|
|
- -F, --full-screen full screen mode\n\
|
|
- -2, --double stretch the display twofold\n\
|
|
- -3, --triple stretch the display threefold\n\
|
|
- -4, --quadruple stretch the display fourfold\n\
|
|
+ -W, --windowed windowed mode\n\
|
|
-e, --even-lines display only even-lines\n"));
|
|
/* TRANS: rotozoom is a graphical effect used in the demo of yore
|
|
where the screen rotate and zoom (actually it doesn't zoom in Heroes);
|
|
@@ -215,15 +211,13 @@
|
|
{"default-saves", no_argument, &reinitsav, 1},
|
|
{"default-scores", no_argument, &reinitsco, 1},
|
|
{"devparm", no_argument, &devparm, 1},
|
|
- {"double", no_argument, NULL, '2'},
|
|
{"driver", required_argument, NULL, 'd'},
|
|
{"drivers-info", no_argument, NULL, 'n'},
|
|
{"even-lines", no_argument, NULL, 'e'},
|
|
- {"full-screen", no_argument, NULL, 'F'},
|
|
+ {"windowed", no_argument, NULL, 'W'},
|
|
{"gfx-options", required_argument, NULL, 'G'},
|
|
{"go", no_argument, NULL, 'g'},
|
|
{"help", no_argument, NULL, 'h'},
|
|
- {"high-quality", no_argument, NULL, 'i'},
|
|
{"list", optional_argument, NULL, 'l'},
|
|
{"load", required_argument, NULL, 'L'},
|
|
{"mono", no_argument, NULL, 'm'},
|
|
@@ -231,11 +225,9 @@
|
|
{"no-joystick", no_argument, NULL, 'J'},
|
|
{"no-sfx", no_argument, NULL, 'X'},
|
|
{"no-sound", no_argument, NULL, 'S'},
|
|
- {"quadruple", no_argument, NULL, '4'},
|
|
{"quiet", no_argument, NULL, 'q'},
|
|
{"really-quiet", no_argument, NULL, 'Q'},
|
|
{"swap-sides", no_argument, NULL, 's'},
|
|
- {"triple", no_argument, NULL, '3'},
|
|
{"verbose", required_argument, NULL, 'v'},
|
|
{"version", no_argument, NULL, 'v'},
|
|
{"x10-saves", no_argument, &x10sav, 1},
|
|
@@ -263,7 +255,7 @@
|
|
for (;;) {
|
|
int option_index = 0;
|
|
|
|
- c = getopt_long (argc, argv, "2348d:eFgG:hiJl::L:mnqQsSv::X",
|
|
+ c = getopt_long (argc, argv, "8d:eWgG:hiJl::L:mnqQsSv::X",
|
|
long_options, &option_index);
|
|
|
|
/* Detect the end of the options. */
|
|
@@ -290,9 +282,6 @@
|
|
case '8':
|
|
bits8 = true;
|
|
break;
|
|
- case 'a':
|
|
- hqmix = true;
|
|
- break;
|
|
case 'X':
|
|
nosfx = true;
|
|
break;
|
|
@@ -319,27 +308,15 @@
|
|
case 'G':
|
|
set_display_params (optarg);
|
|
break;
|
|
- case 'F':
|
|
+ case 'W':
|
|
set_full_screen_mode ();
|
|
break;
|
|
case 'J':
|
|
joyoff = true;
|
|
break;
|
|
- case '2':
|
|
- stretch = 2;
|
|
- break;
|
|
- case '3':
|
|
- stretch = 3;
|
|
- break;
|
|
- case '4':
|
|
- stretch = 4;
|
|
- break;
|
|
case 'e':
|
|
even_lines = true;
|
|
break;
|
|
- case 'i':
|
|
- hqmix = true;
|
|
- break;
|
|
case 'S':
|
|
nosound = true;
|
|
break;
|
|
diff '--color=auto' -ruN ../heroes-0.21/src/hedlite.c ./src/hedlite.c
|
|
--- ../heroes-0.21/src/hedlite.c 2002-02-06 21:49:44.000000000 +0000
|
|
+++ ./src/hedlite.c 2022-06-30 10:55:29.838547018 +0100
|
|
@@ -45,7 +45,6 @@
|
|
#include "dirname.h"
|
|
|
|
static a_pcx_image heditrsc;
|
|
-static a_pcx_image tile_set_img;
|
|
|
|
unsigned short int xdalles = 0;
|
|
unsigned short int ydalles = 0;
|
|
diff '--color=auto' -ruN ../heroes-0.21/src/media/ggi/video.c ./src/media/ggi/video.c
|
|
--- ../heroes-0.21/src/media/ggi/video.c 2002-03-27 19:44:59.000000000 +0000
|
|
+++ ./src/media/ggi/video.c 2022-06-30 10:55:29.838547018 +0100
|
|
@@ -54,7 +54,7 @@
|
|
|
|
static ggi_mode vid_mode;
|
|
static char *display_params = NULL;
|
|
-static int full_screen = 0;
|
|
+static int full_screen = 1;
|
|
/* Direct buffer for each frame.
|
|
We might have db[0] == db[1] if double buffering is not available.*/
|
|
static const ggi_directbuffer *db[2] = { NULL, NULL };
|
|
@@ -88,7 +88,7 @@
|
|
void
|
|
set_full_screen_mode (void)
|
|
{
|
|
- full_screen = 1;
|
|
+ full_screen = 0;
|
|
}
|
|
|
|
static bool
|
|
diff '--color=auto' -ruN ../heroes-0.21/src/media/sdl/video.c ./src/media/sdl/video.c
|
|
--- ../heroes-0.21/src/media/sdl/video.c 2002-01-17 19:59:32.000000000 +0000
|
|
+++ ./src/media/sdl/video.c 2022-06-30 10:55:29.838547018 +0100
|
|
@@ -40,7 +40,7 @@
|
|
it might requires locking. */
|
|
|
|
static SDL_Surface *visu = 0;
|
|
-static int visu_options = SDL_HWPALETTE | SDL_DOUBLEBUF;
|
|
+static int visu_options = SDL_HWPALETTE | SDL_DOUBLEBUF | SDL_FULLSCREEN;
|
|
static bool SDL_initialized = false;
|
|
#define SDL_VIDEODRIVER "SDL_VIDEODRIVER"
|
|
static char *sdl_videodriver = 0;
|
|
@@ -56,7 +56,7 @@
|
|
void
|
|
set_full_screen_mode (void)
|
|
{
|
|
- visu_options |= SDL_FULLSCREEN;
|
|
+ visu_options &= ~SDL_FULLSCREEN;
|
|
}
|
|
|
|
/* Fullscreen mode is toggeled by pressing Alt+Enter.
|
|
diff '--color=auto' -ruN ../heroes-0.21/src/media/video.c ./src/media/video.c
|
|
--- ../heroes-0.21/src/media/video.c 2001-09-21 11:43:57.000000000 +0100
|
|
+++ ./src/media/video.c 2022-06-30 10:55:29.838547018 +0100
|
|
@@ -27,111 +27,6 @@
|
|
/* slow stretching routines */
|
|
|
|
static void
|
|
-stretch_twofold (const a_pixel *s, a_pixel *d, unsigned width)
|
|
-{
|
|
- int rows_left, columns_left;
|
|
-
|
|
- for (rows_left = 200; rows_left; --rows_left) {
|
|
- for (columns_left = width / 2; columns_left; --columns_left) {
|
|
- a_pixel t1, t2;
|
|
- t1 = s[0];
|
|
- t2 = s[1];
|
|
- d[0] = t1;
|
|
- d[640 + 2] = t2;
|
|
- d[1] = t1;
|
|
- d[640 + 3] = t2;
|
|
- d[640 + 0] = t1;
|
|
- d[2] = t2;
|
|
- d[640 + 1] = t1;
|
|
- d[3] = t2;
|
|
- s += 2;
|
|
- d += 4;
|
|
- }
|
|
- d += 2 * (scr_pitch - width);
|
|
- s += xbuf - width;
|
|
- }
|
|
-}
|
|
-
|
|
-static void
|
|
-stretch_twofold_even (const a_pixel *s, a_pixel *d, unsigned width)
|
|
-{
|
|
- int rows_left, columns_left;
|
|
-
|
|
- for (rows_left = 200; rows_left; --rows_left) {
|
|
- for (columns_left = width; columns_left; --columns_left) {
|
|
- d[1] = d[0] = *s;
|
|
- ++s;
|
|
- d += 2;
|
|
- }
|
|
- d += 2 * (scr_pitch - width);
|
|
- s += xbuf - width;
|
|
- }
|
|
-}
|
|
-
|
|
-static void
|
|
-stretch_threefold (const a_pixel* s, a_pixel *d, unsigned width)
|
|
-{
|
|
- int rows_left, columns_left;
|
|
-
|
|
- for (rows_left = 200; rows_left; --rows_left) {
|
|
- for (columns_left = width / 2; columns_left; --columns_left) {
|
|
- a_pixel t1, t2;
|
|
- t1 = s[0];
|
|
- t2 = s[1];
|
|
- d[0] = t1;
|
|
- d[960 + 3] = t2;
|
|
- d[2*960 + 1] = t1;
|
|
- d[4] = t2;
|
|
- d[960 + 2] = t1;
|
|
- d[2*960 + 5] = t2;
|
|
- d[960 + 0] = t1;
|
|
- d[2*960 + 3] = t2;
|
|
- d[1] = t1;
|
|
- d[960 + 4] = t2;
|
|
- d[2*960 + 2] = t1;
|
|
- d[5] = t2;
|
|
- d[2*960 + 0] = t1;
|
|
- d[3] = t2;
|
|
- d[960 + 1] = t1;
|
|
- d[2*960 + 4] = t2;
|
|
- d[2] = t1;
|
|
- d[960 + 5] = t2;
|
|
- s += 2;
|
|
- d += 6;
|
|
- }
|
|
- d += 3 * (scr_pitch - width);
|
|
- s += xbuf - width;
|
|
- }
|
|
-}
|
|
-
|
|
-static void
|
|
-stretch_threefold_even (const a_pixel *s, a_pixel *d, unsigned width)
|
|
-{
|
|
- int rows_left, columns_left;
|
|
-
|
|
- for (rows_left = 200 / 2; rows_left; --rows_left) {
|
|
- for (columns_left = width; columns_left; --columns_left) {
|
|
- a_pixel t1, t2;
|
|
- t1 = s[0];
|
|
- t2 = s[xbuf];
|
|
- d[0] = t1;
|
|
- d[0+960*4] = t2;
|
|
- d[1] = t1;
|
|
- d[2] = t1;
|
|
- d[1+960*4] = t2;
|
|
- d[0+960*2] = t1;
|
|
- d[1+960*2] = t1;
|
|
- d[2+960*4] = t2;
|
|
- d[2+960*2] = t1;
|
|
- ++s;
|
|
- d += 3;
|
|
- }
|
|
- d += 3 * (2 * scr_pitch - width);
|
|
- s += 2 * xbuf - width;
|
|
- }
|
|
-}
|
|
-
|
|
-static void
|
|
stretch_fourfold (const a_pixel *s, a_pixel *d, unsigned width)
|
|
{
|
|
int rows_left, columns_left;
|
|
@@ -196,27 +91,10 @@
|
|
{
|
|
/* the result of stretching routines is written directly
|
|
to the video memory */
|
|
- if (stretch == 2) {
|
|
- if (even_lines)
|
|
- stretch_twofold_even (s, d, width);
|
|
- else
|
|
- stretch_twofold (s, d, width);
|
|
- } else if (stretch == 3) {
|
|
- if (even_lines)
|
|
- stretch_threefold_even (s, d, width);
|
|
- else
|
|
- stretch_threefold (s, d, width);
|
|
- } else if (stretch == 4) {
|
|
- if (even_lines)
|
|
- stretch_fourfold_even (s, d, width);
|
|
- else
|
|
- stretch_fourfold (s, d, width);
|
|
- } else { /* stretch == 1 */
|
|
- if (even_lines)
|
|
- copy_screen_even (s, d, width);
|
|
- else
|
|
- copy_screen (s, d, width);
|
|
- }
|
|
+ if (even_lines)
|
|
+ stretch_fourfold_even (s, d, width);
|
|
+ else
|
|
+ stretch_fourfold (s, d, width);
|
|
}
|
|
|
|
void
|
|
diff '--color=auto' -ruN ../heroes-0.21/src/persona.h ./src/persona.h
|
|
--- ../heroes-0.21/src/persona.h 2001-09-21 11:43:54.000000000 +0100
|
|
+++ ./src/persona.h 2022-06-30 10:55:48.008744082 +0100
|
|
@@ -28,8 +28,8 @@
|
|
* difference only if the program has a sgid or suid bit.
|
|
*/
|
|
|
|
-bool keep_sgid; /* Whether we should keep the */
|
|
-bool keep_suid; /* SGID or SUID priviledge. */
|
|
+extern bool keep_sgid; /* Whether we should keep the */
|
|
+extern bool keep_suid; /* SGID or SUID priviledge. */
|
|
|
|
/* Get information about the current persona,
|
|
and switch to the user persona. */
|