aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agi/agi.cpp6
-rw-r--r--engines/agi/agi.h14
-rw-r--r--engines/agi/console.cpp6
-rw-r--r--engines/agi/cycle.cpp2
-rw-r--r--engines/agi/font.cpp2
-rw-r--r--engines/agi/graphics.cpp4
-rw-r--r--engines/agi/graphics.h2
-rw-r--r--engines/agi/objects.cpp5
-rw-r--r--engines/agi/op_cmd.cpp2
-rw-r--r--engines/agi/picture.cpp46
-rw-r--r--engines/agi/savegame.cpp4
-rw-r--r--engines/agi/sound.cpp22
-rw-r--r--engines/agi/sound.h10
-rw-r--r--engines/agi/sprite.cpp37
14 files changed, 9 insertions, 153 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index fddbba7b51..fbdcbb86c1 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -472,9 +472,7 @@ AgiEngine::AgiEngine(OSystem * syst) : Engine(syst) {
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 @@ void AgiEngine::initialize() {
*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 @@ AgiEngine::~AgiEngine() {
deinit_sound();
deinit_video();
deinit_sprites();
-#ifdef USE_HIRES
free(game.hires);
-#endif
free(game.sbuf);
deinit_machine();
delete rnd;
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 3f1b46bae8..60afe27faa 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -45,12 +45,8 @@ typedef signed int Err;
#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 @@ typedef signed int Err;
#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 @@ struct agi_options {
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 @@ struct agi_game {
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];
diff --git a/engines/agi/console.cpp b/engines/agi/console.cpp
index 7b83842d34..e8265fd6eb 100644
--- a/engines/agi/console.cpp
+++ b/engines/agi/console.cpp
@@ -279,8 +279,6 @@ static void ccmd_exec() {
}
#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 @@ static void ccmd_hires() {
return;
}
-#endif
-
static void ccmd_agiver() {
int ver, maj, min;
@@ -505,9 +501,7 @@ int console_init() {
#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);
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 08aea83410..2374d0dccd 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -375,10 +375,8 @@ static int play_game() {
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));
diff --git a/engines/agi/font.cpp b/engines/agi/font.cpp
index 487107dfe8..c383d2391d 100644
--- a/engines/agi/font.cpp
+++ b/engines/agi/font.cpp
@@ -160,7 +160,6 @@ uint8 cur_font[] = {
/*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 @@ uint8 cur_font[] = {
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
diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp
index 32b3a9aa22..cf3ccc3577 100644
--- a/engines/agi/graphics.cpp
+++ b/engines/agi/graphics.cpp
@@ -562,8 +562,6 @@ void put_pixels_a(int x, int y, int n, uint8 *p) {
}
}
-#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 @@ void put_pixels_hires(int x, int y, int n, uint8 *p) {
}
}
-#endif
-
/**
* Schedule blocks for blitting on the output device.
* This function gets the coordinates of a block in the AGI screen and
diff --git a/engines/agi/graphics.h b/engines/agi/graphics.h
index c85ad6dc76..9d7cf20be6 100644
--- a/engines/agi/graphics.h
+++ b/engines/agi/graphics.h
@@ -72,9 +72,7 @@ void init_palette(uint8 *);
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);
diff --git a/engines/agi/objects.cpp b/engines/agi/objects.cpp
index 352dabcf95..cb05cdd891 100644
--- a/engines/agi/objects.cpp
+++ b/engines/agi/objects.cpp
@@ -61,13 +61,8 @@ int decode_objects(uint8 *mem, uint32 flen) {
* 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;
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index e15152be55..a9b2307150 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -1137,12 +1137,10 @@ cmd(clear_text_rect) {
cmd(toggle_monitor) {
report("toggle.monitor\n");
-#ifdef USE_HIRES
opt.hires = !opt.hires;
erase_both();
show_pic();
blit_both();
-#endif
}
cmd(echo_line) {
diff --git a/engines/agi/picture.cpp b/engines/agi/picture.cpp
index 1b9ab22cdf..771f3e2a3e 100644
--- a/engines/agi/picture.cpp
+++ b/engines/agi/picture.cpp
@@ -88,11 +88,7 @@ static void put_virt_pixel(int x, int y, int res) {
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 @@ static void draw_line(int x1, int y1, int x2, int y2, int res) {
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 @@ static void draw_line(int x1, int y1, int x2, int y2, int res) {
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 @@ static void draw_line(int x1, int y1, int x2, int y2, int res) {
}
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 @@ static void draw_line(int x1, int y1, int x2, int y2, int res) {
}
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 void fill() {
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 @@ static int plot_pattern_point(int x, int y, int bitpos, int res) {
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 @@ static int plot_pattern_point(int x, int y, int bitpos, int res) {
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 @@ static void plot_brush(int res) {
foffs--;
}
-#ifdef USE_HIRES
-
static void fix_pixel_bothsides(int x, int y) {
uint8 *p, *s;
@@ -780,14 +756,10 @@ void fix_hires_picture() {
}
}
-#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 @@ static void draw_picture() {
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 @@ static void draw_picture() {
break;
}
-#ifdef USE_HIRES
foffs = save_foffs;
act = next_byte;
@@ -896,7 +863,6 @@ static void draw_picture() {
drawing = 0;
break;
}
-#endif
}
}
@@ -971,16 +937,12 @@ int decode_picture(int n, int clear) {
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 @@ void show_pic() {
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;
diff --git a/engines/agi/savegame.cpp b/engines/agi/savegame.cpp
index 0eb5a27da6..77c46394e2 100644
--- a/engines/agi/savegame.cpp
+++ b/engines/agi/savegame.cpp
@@ -247,7 +247,7 @@ int save_game(char *s, char *d) {
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 @@ int load_game(char *s) {
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 */
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index 963e55c0b3..6eef21802c 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -103,7 +103,6 @@ extern struct sound_driver sound_dummy;
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 @@ static int16 waveform_mac[WAVEFORM_SIZE] = {
-175, -172, -165, -159, -137, -114, -67, -19
};
-#endif /* USE_PCM_SOUND */
-
#ifdef USE_IIGS_SOUND
static uint16 period[] = {
@@ -266,10 +263,8 @@ void start_sound(int resnum, int flag) {
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 @@ void start_sound(int resnum, int flag) {
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 @@ static int16 *buffer;
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 @@ int init_sound() {
waveform = waveform_mac;
break;
}
-#endif
report("Initializing sound:\n");
@@ -356,9 +345,7 @@ void deinit_sound(void) {
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 @@ static void play_note(int i, int freq, int vol) {
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 @@ void play_sound() {
}
}
-#ifdef USE_PCM_SOUND
-
uint32 mix_sound(void) {
register int i, p;
int16 *src;
@@ -767,6 +749,4 @@ AGIMusic::~AGIMusic(void) {
AGIMusic *g_agi_music;
-#endif /* USE_PCM_SOUND */
-
-} // End of namespace Agi
+} // End of namespace Agi
diff --git a/engines/agi/sound.h b/engines/agi/sound.h
index 3d09f01d31..7477aaf4dd 100644
--- a/engines/agi/sound.h
+++ b/engines/agi/sound.h
@@ -84,11 +84,9 @@ struct channel_info {
#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,9 +117,7 @@ extern struct sound_driver *snd;
#endif /* __AGI_SOUND_H */
-#ifdef USE_PCM_SOUND
-
-} // End of namespace Agi
+} // End of namespace Agi
#include "sound/audiostream.h"
@@ -163,6 +159,4 @@ private:
void premixerCall(int16 * buf, uint len);
};
-} // End of namespace Agi
-
-#endif
+} // End of namespace Agi
diff --git a/engines/agi/sprite.cpp b/engines/agi/sprite.cpp
index 3a3ba7354e..f807e1da01 100644
--- a/engines/agi/sprite.cpp
+++ b/engines/agi/sprite.cpp
@@ -45,9 +45,7 @@ struct sprite {
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 @@ struct sprite {
*/
#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 @@ static void blit_pixel(uint8 *p, uint8 *end, uint8 col, int spr, int width, int
}
}
-#ifdef USE_HIRES
#define X_FACT 2 /* Horizontal hires factor */
@@ -175,8 +168,6 @@ static int blit_hires_cel(int x, int y, int spr, struct view_cel *c) {
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 @@ static int blit_cel(int x, int y, int spr, struct view_cel *c) {
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 @@ static void objs_savearea(struct sprite *s) {
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 @@ static void objs_savearea(struct sprite *s) {
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 @@ static void objs_restorearea(struct sprite *s) {
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 @@ static void objs_restorearea(struct sprite *s) {
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 @@ static struct sprite *new_sprite(struct vt_entry *v) {
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 @@ static void free_list(struct list_head *head) {
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 @@ void show_obj(int n) {
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 @@ void show_obj(int n) {
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 @@ void commit_block(int x1, int y1, int x2, int y2) {
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);