diff options
Diffstat (limited to 'engines/scumm/smush')
-rw-r--r-- | engines/scumm/smush/smush_player.cpp | 77 | ||||
-rw-r--r-- | engines/scumm/smush/smush_player.h | 5 |
2 files changed, 1 insertions, 81 deletions
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index 850b547021..4a067921c0 100644 --- a/engines/scumm/smush/smush_player.cpp +++ b/engines/scumm/smush/smush_player.cpp @@ -55,10 +55,6 @@ #include "sound/vorbis.h" #include "sound/mp3.h" -#ifdef DUMP_SMUSH_FRAMES -#include <png.h> -#endif - #include "common/zlib.h" namespace Scumm { @@ -212,10 +208,6 @@ static StringResource *getStrings(ScummEngine *vm, const char *file, bool is_enc void SmushPlayer::timerCallback() { parseNextFrame(); -#ifdef _WIN32_WCE - _inTimer = true; - _inTimerCount++; -#endif } SmushPlayer::SmushPlayer(ScummEngine_v7 *scumm) { @@ -252,11 +244,6 @@ SmushPlayer::SmushPlayer(ScummEngine_v7 *scumm) { _paused = false; _pauseStartTime = 0; _pauseTime = 0; -#ifdef _WIN32_WCE - _inTimer = false; - _inTimerCount = 0; - _inTimerCountRedraw = ConfMan.getInt("Smush_force_redraw"); -#endif } SmushPlayer::~SmushPlayer() { @@ -926,14 +913,7 @@ void SmushPlayer::handleFrame(Chunk &b) { } if (_width != 0 && _height != 0) { -#ifdef _WIN32_WCE - if (!_inTimer || _inTimerCount == _inTimerCountRedraw) { - updateScreen(); - _inTimerCount = 0; - } -#else updateScreen(); -#endif } _smixer->handleFrame(); @@ -1098,57 +1078,6 @@ void SmushPlayer::warpMouse(int x, int y, int buttons) { } void SmushPlayer::updateScreen() { -#ifdef DUMP_SMUSH_FRAMES - char fileName[100]; - // change path below for dump png files - sprintf(fileName, "/path/to/somethere/%s%04d.png", _vm->getBaseName(), _frame); - FILE *file = fopen(fileName, "wb"); - if (file == NULL) - error("can't open file for writing png"); - - png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0); - if (png_ptr == NULL) { - fclose(file); - error("can't write png header"); - } - png_infop info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) { - fclose(file); - error("can't create png info struct"); - } - if (setjmp(png_ptr->jmpbuf)) { - fclose(file); - error("png jmpbuf error"); - } - - png_init_io(png_ptr, file); - - png_set_IHDR(png_ptr, info_ptr, _width, _height, 8, PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE, - PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); - - png_colorp palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH * sizeof (png_color)); - for (int i = 0; i != 256; ++i) { - (palette + i)->red = _pal[i * 3 + 0]; - (palette + i)->green = _pal[i * 3 + 1]; - (palette + i)->blue = _pal[i * 3 + 2]; - } - - png_set_PLTE(png_ptr, info_ptr, palette, PNG_MAX_PALETTE_LENGTH); - - png_write_info(png_ptr, info_ptr); - png_set_flush(png_ptr, 10); - - png_bytep row_pointers[480]; - for (int y = 0 ; y < _height ; y++) - row_pointers[y] = (png_byte *) (_dst + y * _width); - png_write_image(png_ptr, row_pointers); - png_write_end(png_ptr, info_ptr); - png_free(png_ptr, palette); - - fclose(file); - png_destroy_write_struct(&png_ptr, &info_ptr); -#endif - uint32 end_time, start_time = _vm->_system->getMillis(); _updateNeeded = true; end_time = _vm->_system->getMillis(); @@ -1326,14 +1255,10 @@ void SmushPlayer::play(const char *filename, int32 speed, int32 offset, int32 st _vm->_system->updateScreen(); _updateNeeded = false; } -#ifdef _WIN32_WCE - _inTimer = false; - _inTimerCount = 0; -#endif } if (_endOfFile) break; - if (_vm->quit() || _vm->_saveLoadFlag || _vm->_smushVideoShouldFinish) { + if (_vm->_quit || _vm->_saveLoadFlag || _vm->_smushVideoShouldFinish) { _smixer->stop(); _vm->_mixer->stopHandle(_compressedFileSoundHandle); _vm->_mixer->stopHandle(_IACTchannel); diff --git a/engines/scumm/smush/smush_player.h b/engines/scumm/smush/smush_player.h index 413a5895d3..64ae167349 100644 --- a/engines/scumm/smush/smush_player.h +++ b/engines/scumm/smush/smush_player.h @@ -84,11 +84,6 @@ private: bool _insanity; bool _middleAudio; bool _skipPalette; -#ifdef _WIN32_WCE - bool _inTimer; - int16 _inTimerCount; - int16 _inTimerCountRedraw; -#endif public: SmushPlayer(ScummEngine_v7 *scumm); |