[Scummvm-cvs-logs] SF.net SVN: scummvm: [22609] scummvm/trunk/engines/agi

aquadran at users.sourceforge.net aquadran at users.sourceforge.net
Wed May 24 07:01:20 CEST 2006


Revision: 22609
Author:   aquadran
Date:     2006-05-24 07:00:08 -0700 (Wed, 24 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22609&view=rev

Log Message:
-----------
removed defines USE_PCM_SOUND, AGDS_SUPPORT, USE_HIRES

Modified Paths:
--------------
    scummvm/trunk/engines/agi/agi.cpp
    scummvm/trunk/engines/agi/agi.h
    scummvm/trunk/engines/agi/console.cpp
    scummvm/trunk/engines/agi/cycle.cpp
    scummvm/trunk/engines/agi/font.cpp
    scummvm/trunk/engines/agi/graphics.cpp
    scummvm/trunk/engines/agi/graphics.h
    scummvm/trunk/engines/agi/objects.cpp
    scummvm/trunk/engines/agi/op_cmd.cpp
    scummvm/trunk/engines/agi/picture.cpp
    scummvm/trunk/engines/agi/savegame.cpp
    scummvm/trunk/engines/agi/sound.cpp
    scummvm/trunk/engines/agi/sound.h
    scummvm/trunk/engines/agi/sprite.cpp
Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/agi.cpp	2006-05-24 14:00:08 UTC (rev 22609)
@@ -472,9 +472,7 @@
 void AgiEngine::initialize() {
 	memset(&opt, 0, sizeof(struct agi_options));
 	opt.gamerun = GAMERUN_RUNGAME;
-#ifdef USE_HIRES
 	opt.hires = true;
-#endif
 	opt.soundemu = SOUND_EMU_NONE;
 
 	init_machine();
@@ -485,9 +483,7 @@
 	*game.name = 0;
 
 	game.sbuf = (uint8 *) calloc(_WIDTH, _HEIGHT);
-#ifdef USE_HIRES
 	game.hires = (uint8 *) calloc(_WIDTH * 2, _HEIGHT);
-#endif
 
 	init_sprites();
 	init_video();
@@ -518,9 +514,7 @@
 	deinit_sound();
 	deinit_video();
 	deinit_sprites();
-#ifdef USE_HIRES
 	free(game.hires);
-#endif
 	free(game.sbuf);
 	deinit_machine();
 	delete rnd;

Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/agi.h	2006-05-24 14:00:08 UTC (rev 22609)
@@ -45,12 +45,8 @@
 #define INLINE __inline
 #define VERSION __DATE__ " " __TIME__
 
-/* Default features -- can be overriden in portdefs.h */
 #define USE_CONSOLE
-#define USE_PCM_SOUND
-#define USE_IIGS_SOUND
-#define USE_HIRES
-#define AGDS_SUPPORT
+//#define USE_IIGS_SOUND
 
 #define	TITLE		"AGI engine"
 
@@ -83,10 +79,6 @@
 #define INLINE
 #endif
 
-#ifndef USE_PCM_SOUND
-#undef USE_IIGS_SOUND
-#endif
-
 #define	MSG_BOX_COLOUR	0x0f	/* White */
 #define MSG_BOX_TEXT	0x00	/* Black */
 #define MSG_BOX_LINE	0x04	/* Red */
@@ -214,9 +206,7 @@
 	int nosound;		/**< disable sound */
 	int egapal;		/**< use PC EGA palette */
 	int cgaemu;		/**< use PC CGA emulation */
-#ifdef USE_HIRES
 	int hires;		/**< use hi-res pictures */
-#endif
 	int soundemu;		/**< sound emulation mode */
 	int agimouse;		/**< AGI Mouse 1.0 emulation */
 };
@@ -443,9 +433,7 @@
 	unsigned int color_fg;
 	unsigned int color_bg;
 	uint8 *sbuf;			/**< 160x168 AGI screen buffer */
-#ifdef USE_HIRES
 	uint8 *hires;			/**< 320x168 hi-res buffer */
-#endif
 
 	/* player command line */
 	struct agi_word ego_words[MAX_WORDS];

Modified: scummvm/trunk/engines/agi/console.cpp
===================================================================
--- scummvm/trunk/engines/agi/console.cpp	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/console.cpp	2006-05-24 14:00:08 UTC (rev 22609)
@@ -279,8 +279,6 @@
 }
 #endif
 
-#ifdef USE_HIRES
-
 static void ccmd_hires() {
 	if (_pn != 1 || (strcmp(_p1, "on") && strcmp(_p1, "off"))) {
 		report("Usage: hires on|off\n");
@@ -294,8 +292,6 @@
 	return;
 }
 
-#endif
-
 static void ccmd_agiver() {
 	int ver, maj, min;
 
@@ -505,9 +501,7 @@
 #endif
 	console_cmd("flags", "Dump all AGI flags", ccmd_flags);
 	console_cmd("help", "List available commands", ccmd_help);
-#ifdef USE_HIRES
 	console_cmd("hires", "Turn hi-res mode on/off", ccmd_hires);
-#endif
 	console_cmd("logic0", "Turn logic 0 debugging on/off", ccmd_logic0);
 	console_cmd("objs", "List all objects and locations", ccmd_objs);
 	console_cmd("opcode", "Turn opcodes on/off in debug", ccmd_opcode);

Modified: scummvm/trunk/engines/agi/cycle.cpp
===================================================================
--- scummvm/trunk/engines/agi/cycle.cpp	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/cycle.cpp	2006-05-24 14:00:08 UTC (rev 22609)
@@ -375,10 +375,8 @@
 int run_game() {
 	int i, ec = err_OK;
 
-#ifdef USE_HIRES
 	if (opt.cgaemu)
 		opt.hires = 0;
-#endif
 
 	for (i = 0; i < MAX_DIRS; i++)
 		memset(&game.ev_keyp[i], 0, sizeof(struct agi_event));

Modified: scummvm/trunk/engines/agi/font.cpp
===================================================================
--- scummvm/trunk/engines/agi/font.cpp	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/font.cpp	2006-05-24 14:00:08 UTC (rev 22609)
@@ -160,7 +160,6 @@
 	/*0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0x00, */
 	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,	/*replacement 0x7F */
 
-#ifdef AGDS_SUPPORT
 	0x1E, 0x36, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x00,
 	0x7C, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x7C, 0x00,
 	0x7C, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x7C, 0x00,
@@ -289,7 +288,6 @@
 	0x30, 0x48, 0x10, 0x20, 0x78, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x7E, 0x00
-#endif				/* AGDS_SUPPORT */
 };
 
 }                             // End of namespace Agi

Modified: scummvm/trunk/engines/agi/graphics.cpp
===================================================================
--- scummvm/trunk/engines/agi/graphics.cpp	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/graphics.cpp	2006-05-24 14:00:08 UTC (rev 22609)
@@ -562,8 +562,6 @@
 	}
 }
 
-#ifdef USE_HIRES
-
 void put_pixels_hires(int x, int y, int n, uint8 *p) {
 	//y += CHAR_LINES;
 	for (; n--; p++, x++) {
@@ -576,8 +574,6 @@
 	}
 }
 
-#endif
-
 /**
  * Schedule blocks for blitting on the output device.
  * This function gets the coordinates of a block in the AGI screen and

Modified: scummvm/trunk/engines/agi/graphics.h
===================================================================
--- scummvm/trunk/engines/agi/graphics.h	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/graphics.h	2006-05-24 14:00:08 UTC (rev 22609)
@@ -72,9 +72,7 @@
 
 void put_pixel(int, int, int);
 
-#ifdef USE_HIRES
 void put_pixels_hires(int x, int y, int n, uint8 * p);
-#endif
 int keypress(void);
 int get_key(void);
 void print_character(int, int, char, int, int);

Modified: scummvm/trunk/engines/agi/objects.cpp
===================================================================
--- scummvm/trunk/engines/agi/objects.cpp	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/objects.cpp	2006-05-24 14:00:08 UTC (rev 22609)
@@ -61,13 +61,8 @@
 	 * byte 3 = number of animated objects. this is ignored.. ??
 	 */
 	if (READ_LE_UINT16(mem) / padsize >= 256) {
-#ifdef AGDS_SUPPORT
 		/* die with no error! AGDS game needs not to die to work!! :( */
 		return err_OK;
-#else
-		/* no AGDS support, die with error */
-		return err_BadResource;
-#endif
 	}
 
 	game.num_objects = READ_LE_UINT16(mem) / padsize;

Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/op_cmd.cpp	2006-05-24 14:00:08 UTC (rev 22609)
@@ -1137,12 +1137,10 @@
 
 cmd(toggle_monitor) {
 	report("toggle.monitor\n");
-#ifdef USE_HIRES
 	opt.hires = !opt.hires;
 	erase_both();
 	show_pic();
 	blit_both();
-#endif
 }
 
 cmd(echo_line) {

Modified: scummvm/trunk/engines/agi/picture.cpp
===================================================================
--- scummvm/trunk/engines/agi/picture.cpp	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/picture.cpp	2006-05-24 14:00:08 UTC (rev 22609)
@@ -88,11 +88,7 @@
 	if (x < 0 || y < 0 || x >= width || y >= _HEIGHT)
 		return;
 
-	p =
-#ifdef USE_HIRES
-	    res > 1 ? &game.hires[y * width + x] :
-#endif
-	    &game.sbuf[y * width + x];
+	p = res > 1 ? &game.hires[y * width + x] : &game.sbuf[y * width + x];
 
 	if (pri_on)
 		*p = (pri_colour << 4) | (*p & 0x0f);
@@ -154,10 +150,8 @@
 
 		for (; y1 <= y2; y1++) {
 			put_virt_pixel(x1, y1, res);
-#ifdef USE_HIRES
 			if (res > 1)
 				fix_pixel_bothsides(x1, y1);
-#endif
 		}
 
 		return;
@@ -171,20 +165,16 @@
 			x1 = x2;
 			x2 = x;
 		}
-#ifdef USE_HIRES
 		if (res > 1)
 			fix_pixel_bothsides(x1, y1);
-#endif
 
 		for (; x1 <= x2; x1++)
 			put_virt_pixel(x1, y1, res);
 
-#ifdef USE_HIRES
 		if (res > 1) {
 			put_virt_pixel(x1, y1, res);
 			fix_pixel_bothsides(x1, y1);
 		}
-#endif
 
 		return;
 	}
@@ -219,10 +209,8 @@
 	}
 
 	put_virt_pixel(x, y, res);
-#ifdef USE_HIRES
 	if (res > 1)
 		fix_pixel_bothsides(x, y);
-#endif
 
 	do {
 		errorY += deltaY;
@@ -238,19 +226,15 @@
 		}
 
 		put_virt_pixel(x, y, res);
-#ifdef USE_HIRES
 		if (res > 1)
 			fix_pixel_bothsides(x, y);
-#endif
 		i--;
 	} while (i > 0);
 
-#ifdef USE_HIRES
 	if (res > 1) {
 		put_virt_pixel(x, y, res);
 		fix_pixel_bothsides(x, y);
 	}
-#endif
 }
 
 /**
@@ -484,7 +468,6 @@
 static int plot_pattern_point(int x, int y, int bitpos, int res) {
 	if (pat_code & 0x20) {
 		if ((splatter_map[bitpos >> 3] >> (7 - (bitpos & 7))) & 1) {
-#ifdef USE_HIRES
 			if (res > 1) {
 				/* extra randomness in hi-res brush fill
 				 */
@@ -492,9 +475,7 @@
 					put_virt_pixel(x * 2, y, 2);
 				if (!rnd->getRandomNumber(3))
 					put_virt_pixel(x * 2 + 1, y, 2);
-			} else
-#endif
-			{
+			} else {
 				put_virt_pixel(x, y, 1);
 			}
 		}
@@ -502,16 +483,13 @@
 		if (bitpos == 0xff)
 			bitpos = 0;
 	} else {
-#ifdef USE_HIRES
 		if (res > 1) {
 			/* double width pixels make MUMG and others
 			 * look nicer
 			 */
 			put_virt_pixel(x * 2, y, 2);
 			put_virt_pixel(x * 2 + 1, y, 2);
-		} else
-#endif
-		{
+		} else {
 			put_virt_pixel(x, y, 1);
 		}
 	}
@@ -571,8 +549,6 @@
 	foffs--;
 }
 
-#ifdef USE_HIRES
-
 static void fix_pixel_bothsides(int x, int y) {
 	uint8 *p, *s;
 
@@ -780,14 +756,10 @@
 	}
 }
 
-#endif				/* USE_HIRES */
-
 static void draw_picture() {
 	uint8 act;
 	int drawing;
-#ifdef USE_HIRES
 	int save_foffs;
-#endif
 
 	pat_code = 0;
 	pat_num = 0;
@@ -799,11 +771,7 @@
 
 	debugC(8, kDebugLevelMain, "Drawing picture");
 	for (drawing = 1; drawing && foffs < flen;) {
-
-#ifdef USE_HIRES
 		save_foffs = foffs;
-#endif
-
 		act = next_byte;
 		switch (act) {
 		case 0xf0:	/* set colour on screen */
@@ -849,7 +817,6 @@
 			break;
 		}
 
-#ifdef USE_HIRES
 		foffs = save_foffs;
 
 		act = next_byte;
@@ -896,7 +863,6 @@
 			drawing = 0;
 			break;
 		}
-#endif
 	}
 }
 
@@ -971,16 +937,12 @@
 
 	if (clear) {
 		memset(game.sbuf, 0x4f, _WIDTH * _HEIGHT);
-#ifdef USE_HIRES
 		memset(game.hires, 0x4f, _WIDTH * 2 * _HEIGHT);
-#endif
 	}
 
 	draw_picture();
 
-#ifdef USE_HIRES
 	fix_hires_picture();
-#endif
 
 	if (clear)
 		clear_image_stack();
@@ -1014,12 +976,10 @@
 	int offset;
 
 	debugC(8, kDebugLevelMain, "Show picture!");
-#ifdef USE_HIRES
 	if (opt.hires) {
 		show_hires_pic();
 		return;
 	}
-#endif
 
 	i = 0;
 	offset = game.line_min_print * CHAR_LINES;

Modified: scummvm/trunk/engines/agi/savegame.cpp
===================================================================
--- scummvm/trunk/engines/agi/savegame.cpp	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/savegame.cpp	2006-05-24 14:00:08 UTC (rev 22609)
@@ -247,7 +247,7 @@
 	write_sint16(&f, (int16)game.color_fg);
 	write_sint16(&f, (int16)game.color_bg);
 
-	/* game.hires (#ifdef USE_HIRES) */
+	/* game.hires */
 	/* game.sbuf */
 	/* game.ego_words */
 	/* game.num_ego_words */
@@ -423,7 +423,7 @@
 	game.color_fg = read_sint16(&f);
 	game.color_bg = read_sint16(&f);
 
-	/* game.hires (#ifdef USE_HIRES) - rebuilt from image stack */
+	/* game.hires - rebuilt from image stack */
 	/* game.sbuf - rebuilt from image stack */
 
 	/* game.ego_words - fixed by clean_input */

Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/sound.cpp	2006-05-24 14:00:08 UTC (rev 22609)
@@ -103,7 +103,6 @@
 static void stop_note(int i);
 static void play_note(int i, int freq, int vol);
 
-#ifdef USE_PCM_SOUND
 
 int16 *snd_buffer;
 static int16 *waveform;
@@ -141,8 +140,6 @@
 	-175, -172, -165, -159, -137, -114, -67, -19
 };
 
-#endif				/* USE_PCM_SOUND */
-
 #ifdef USE_IIGS_SOUND
 
 static uint16 period[] = {
@@ -266,10 +263,8 @@
 				chn[i].flags |= AGI_SOUND_ENVELOPE;
 				chn[i].adsr = AGI_SOUND_ENV_ATTACK;
 			}
-#ifdef USE_PCM_SOUND
 			chn[i].ins = waveform;
 			chn[i].size = WAVEFORM_SIZE;
-#endif
 			chn[i].ptr = (struct agi_note *)(song + (song[i << 1] | (song[(i << 1) + 1] << 8)));
 			chn[i].timer = 0;
 			chn[i].vol = 0;
@@ -278,9 +273,7 @@
 		break;
 	}
 
-#ifdef USE_PCM_SOUND
 	memset(snd_buffer, 0, BUFFER_SIZE << 1);
-#endif
 	endflag = flag;
 
 	/* Nat Budin reports that the flag should be reset when sound starts
@@ -314,13 +307,10 @@
 int init_sound() {
 	int r = -1;
 
-#ifdef USE_PCM_SOUND
 	buffer = snd_buffer = (int16 *) calloc(2, BUFFER_SIZE);
-#endif
 
 	env = false;
 
-#ifdef USE_PCM_SOUND
 	switch (opt.soundemu) {
 	case SOUND_EMU_NONE:
 		waveform = waveform_ramp;
@@ -334,7 +324,6 @@
 		waveform = waveform_mac;
 		break;
 	}
-#endif
 
 	report("Initializing sound:\n");
 
@@ -356,9 +345,7 @@
 	debugC(3, kDebugLevelSound, "()");
 	if (snd)
 		snd->deinit();
-#ifdef USE_PCM_SOUND
 	free(snd_buffer);
-#endif
 }
 
 static void stop_note(int i) {
@@ -384,10 +371,7 @@
 	else if (vol && opt.soundemu == SOUND_EMU_PC)
 		vol = 160;
 
-#ifdef USE_PCM_SOUND
 	chn[i].phase = 0;
-#endif
-
 	chn[i].freq = freq;
 	chn[i].vol = vol;
 	chn[i].env = 0x10000;
@@ -546,8 +530,6 @@
 	}
 }
 
-#ifdef USE_PCM_SOUND
-
 uint32 mix_sound(void) {
 	register int i, p;
 	int16 *src;
@@ -767,6 +749,4 @@
 
 AGIMusic *g_agi_music;
 
-#endif				/* USE_PCM_SOUND */
-
-}                             // End of namespace Agi
+} // End of namespace Agi

Modified: scummvm/trunk/engines/agi/sound.h
===================================================================
--- scummvm/trunk/engines/agi/sound.h	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/sound.h	2006-05-24 14:00:08 UTC (rev 22609)
@@ -84,11 +84,9 @@
 #define AGI_SOUND_4CHN		0x0008
 	uint32 type;
 	struct agi_note *ptr;
-#ifdef USE_PCM_SOUND
 	int16 *ins;
 	int32 size;
 	uint32 phase;
-#endif
 #define AGI_SOUND_LOOP		0x0001
 #define AGI_SOUND_ENVELOPE	0x0002
 	uint32 flags;
@@ -119,10 +117,8 @@
 
 #endif				/* __AGI_SOUND_H */
 
-#ifdef USE_PCM_SOUND
+} // End of namespace Agi
 
-}                             // End of namespace Agi
-
 #include "sound/audiostream.h"
 
 namespace Audio {
@@ -163,6 +159,4 @@
 	void premixerCall(int16 * buf, uint len);
 };
 
-}                             // End of namespace Agi
-
-#endif
+} // End of namespace Agi

Modified: scummvm/trunk/engines/agi/sprite.cpp
===================================================================
--- scummvm/trunk/engines/agi/sprite.cpp	2006-05-24 13:38:50 UTC (rev 22608)
+++ scummvm/trunk/engines/agi/sprite.cpp	2006-05-24 14:00:08 UTC (rev 22609)
@@ -45,9 +45,7 @@
 	int16 x_size;			/**< width of the sprite */
 	int16 y_size;			/**< height of the sprite */
 	uint8 *buffer;			/**< buffer to store background data */
-#ifdef USE_HIRES
 	uint8 *hires;			/**< buffer for hi-res background */
-#endif
 };
 
 /*
@@ -55,12 +53,8 @@
  */
 #undef ALLOC_DEBUG
 
-#ifdef USE_HIRES
 #define POOL_SIZE 68000		/* Gold Rush mine room needs > 50000 */
 	/* Speeder bike challenge needs > 67000 */
-#else
-#define POOL_SIZE 25000
-#endif
 static uint8 *sprite_pool;
 static uint8 *pool_top;
 
@@ -139,7 +133,6 @@
 	}
 }
 
-#ifdef USE_HIRES
 
 #define X_FACT 2		/* Horizontal hires factor */
 
@@ -175,8 +168,6 @@
 	return hidden;
 }
 
-#endif
-
 static int blit_cel(int x, int y, int spr, struct view_cel *c) {
 	uint8 *p0, *p, *q = NULL, *end;
 	int i, j, t, m, col;
@@ -192,10 +183,8 @@
 	if (x >= _WIDTH)
 		x = _WIDTH - 1;
 
-#ifdef USE_HIRES
 	if (opt.hires)
 		blit_hires_cel(x, y, spr, c);
-#endif
 
 	q = c->data;
 	t = c->transparency;
@@ -228,9 +217,7 @@
 	int16 x_pos = s->x_pos, y_pos = s->y_pos;
 	int16 x_size = s->x_size, y_size = s->y_size;
 	uint8 *p0, *q;
-#ifdef USE_HIRES
 	uint8 *h0, *k;
-#endif
 
 	if (x_pos + x_size > _WIDTH)
 		x_size = _WIDTH - x_pos;
@@ -253,19 +240,15 @@
 
 	p0 = &game.sbuf[x_pos + y_pos * _WIDTH];
 	q = s->buffer;
-#ifdef USE_HIRES
 	h0 = &game.hires[(x_pos + y_pos * _WIDTH) * 2];
 	k = s->hires;
-#endif
 	for (y = 0; y < y_size; y++) {
 		memcpy(q, p0, x_size);
 		q += x_size;
 		p0 += _WIDTH;
-#ifdef USE_HIRES
 		memcpy(k, h0, x_size * 2);
 		k += x_size * 2;
 		h0 += _WIDTH * 2;
-#endif
 	}
 }
 
@@ -274,9 +257,7 @@
 	int16 x_pos = s->x_pos, y_pos = s->y_pos;
 	int16 x_size = s->x_size, y_size = s->y_size;
 	uint8 *p0, *q;
-#ifdef USE_HIRES
 	uint8 *h0, *k;
-#endif
 
 	if (x_pos + x_size > _WIDTH)
 		x_size = _WIDTH - x_pos;
@@ -299,24 +280,20 @@
 
 	p0 = &game.sbuf[x_pos + y_pos * _WIDTH];
 	q = s->buffer;
-#ifdef USE_HIRES
 	h0 = &game.hires[(x_pos + y_pos * _WIDTH) * 2];
 	k = s->hires;
-#endif
 	offset = game.line_min_print * CHAR_LINES;
 	for (y = 0; y < y_size; y++) {
 		memcpy(p0, q, x_size);
 		put_pixels_a(x_pos, y_pos + y + offset, x_size, p0);
 		q += x_size;
 		p0 += _WIDTH;
-#ifdef USE_HIRES
 		memcpy(h0, k, x_size * 2);
 		if (opt.hires) {
 			put_pixels_hires(x_pos * 2, y_pos + y + offset, x_size * 2, h0);
 		}
 		k += x_size * 2;
 		h0 += _WIDTH * 2;
-#endif
 	}
 }
 
@@ -382,9 +359,7 @@
 	s->x_size = v->x_size;
 	s->y_size = v->y_size;
 	s->buffer = (uint8 *) pool_alloc(s->x_size * s->y_size);
-#ifdef USE_HIRES
 	s->hires = (uint8 *) pool_alloc(s->x_size * s->y_size * 2);
-#endif
 	v->s = s;		/* link view table entry to this sprite */
 
 	return s;
@@ -466,9 +441,7 @@
 	list_for_each(h, head, prev) {
 		s = list_entry(h, struct sprite, list);
 		list_del(h);
-#ifdef USE_HIRES
 		pool_release(s->hires);
-#endif
 		pool_release(s->buffer);
 		pool_release(s);
 	}
@@ -783,9 +756,7 @@
 	s.x_size = c->width;
 	s.y_size = c->height;
 	s.buffer = (uint8 *)malloc(s.x_size * s.y_size);
-#ifdef USE_HIRES
 	s.hires = (uint8 *)malloc(s.x_size * s.y_size * 2);
-#endif
 
 	objs_savearea(&s);
 	blit_cel(x1, y1, s.x_size, c);
@@ -797,17 +768,13 @@
 	free(s.buffer);
 
 	/* Added to fix a memory leak --Vasyl */
-#ifdef USE_HIRES
 	free(s.hires);
-#endif
 }
 
 void commit_block(int x1, int y1, int x2, int y2) {
 	int i, w, offset;
 	uint8 *q;
-#ifdef USE_HIRES
 	uint8 *h;
-#endif
 
 	if (!game.picture_shown)
 		return;
@@ -834,19 +801,15 @@
 
 	w = x2 - x1 + 1;
 	q = &game.sbuf[x1 + _WIDTH * y1];
-#ifdef USE_HIRES
 	h = &game.hires[(x1 + _WIDTH * y1) * 2];
-#endif
 	offset = game.line_min_print * CHAR_LINES;
 	for (i = y1; i <= y2; i++) {
 		put_pixels_a(x1, i + offset, w, q);
 		q += _WIDTH;
-#ifdef USE_HIRES
 		if (opt.hires) {
 			put_pixels_hires(x1 * 2, i + offset, w * 2, h);
 		}
 		h += _WIDTH * 2;
-#endif
 	}
 
 	flush_block_a(x1, y1 + offset, x2, y2 + offset);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list