Add FF support to dump_bitmap()
svn-id: r21464
This commit is contained in:
parent
23c692f09f
commit
3bb25707b2
4 changed files with 26 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -5,6 +5,7 @@ MODULE_OBJS := \
|
|||
cursor.o \
|
||||
debug.o \
|
||||
debugger.o \
|
||||
dxa_player.o \
|
||||
game.o \
|
||||
icons.o \
|
||||
items.o \
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue