From 3bb25707b23720c23ed5206b9f8023f1381b5dae Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 27 Mar 2006 12:49:17 +0000 Subject: Add FF support to dump_bitmap() svn-id: r21464 --- engines/simon/debug.cpp | 25 +++++++++++++++++-------- engines/simon/items.cpp | 7 +++++++ engines/simon/module.mk | 1 + engines/simon/simon.h | 1 + 4 files changed, 26 insertions(+), 8 deletions(-) (limited to 'engines') diff --git a/engines/simon/debug.cpp b/engines/simon/debug.cpp index 39e462782f..59e351052e 100644 --- a/engines/simon/debug.cpp +++ b/engines/simon/debug.cpp @@ -332,7 +332,7 @@ void dump_bmp(const char *filename, int w, int h, const byte *bytes, const uint3 fclose(out); } -static void dump_bitmap(const char *filename, const byte *offs, int w, int h, int flags, const byte *palette, +void SimonEngine::dump_bitmap(const char *filename, const byte *offs, int w, int h, int flags, const byte *palette, byte base) { /* allocate */ @@ -346,13 +346,22 @@ static void dump_bitmap(const char *filename, const byte *offs, int w, int h, in state.dh = h; state.y_skip = 0; - for (i = 0; i != w; i += 2) { - byte *c = vc10_depack_column(&state); - for (j = 0; j != h; j++) { - byte pix = c[j]; - b[j * w + i] = (pix >> 4) | base; - b[j * w + i + 1] = (pix & 0xF) | base; - + if (getGameType() == GType_FF) { + for (i = 0; i != w; i++) { + byte *c = vc10_depack_column(&state); + for (j = 0; j != h; j++) { + byte pix = c[j]; + b[j * w + i] = pix; + } + } + } else { + for (i = 0; i != w; i += 2) { + byte *c = vc10_depack_column(&state); + for (j = 0; j != h; j++) { + byte pix = c[j]; + b[j * w + i] = (pix >> 4) | base; + b[j * w + i + 1] = (pix & 0xF) | base; + } } } diff --git a/engines/simon/items.cpp b/engines/simon/items.cpp index 0672f6286a..defa75e60a 100644 --- a/engines/simon/items.cpp +++ b/engines/simon/items.cpp @@ -23,6 +23,7 @@ // Item script opcodes for Simon1/Simon2 #include "common/stdafx.h" +#include "simon/dxa_player.h" #include "simon/simon.h" #include "simon/intern.h" @@ -1079,6 +1080,12 @@ int SimonEngine::runScript() { case 183:{ /* unload beard */ if (getGameType() == GType_FF) { + DXA_Player p; + if (p.open((const char *)"icetrench.dxa")) { + p.play(); + p.close(); + } + // Play video debug(1, "Play video"); } else if (getGameType() == GType_SIMON2) { diff --git a/engines/simon/module.mk b/engines/simon/module.mk index be8787e70a..6e625ee1fb 100644 --- a/engines/simon/module.mk +++ b/engines/simon/module.mk @@ -5,6 +5,7 @@ MODULE_OBJS := \ cursor.o \ debug.o \ debugger.o \ + dxa_player.o \ game.o \ icons.o \ items.o \ diff --git a/engines/simon/simon.h b/engines/simon/simon.h index 6a55020659..fed4dc6f44 100644 --- a/engines/simon/simon.h +++ b/engines/simon/simon.h @@ -840,6 +840,7 @@ protected: void dump_vga_script_always(const byte *ptr, uint res, uint sprite_id); void dump_vga_bitmaps(const byte *vga, byte *vga1, int res); void dump_single_bitmap(int file, int image, const byte *offs, int w, int h, byte base); + void dump_bitmap(const char *filename, const byte *offs, int w, int h, int flags, const byte *palette, byte base); void dx_clear_attached_from_top(uint lines); void dx_copy_from_attached_to_2(uint x, uint y, uint w, uint h); -- cgit v1.2.3