diff options
author | Paweł Kołodziejski | 2008-08-24 07:54:36 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2008-08-24 07:54:36 +0000 |
commit | 1f044620111baa9e4169afec74de3f7a23921581 (patch) | |
tree | 3e17af5f8f03af0a30cfb722ee2f6052b5fea91c /engines/scumm | |
parent | cfc274b695e2f3074b23b04ba8338ee5c5f8dcad (diff) | |
download | scummvm-rg350-1f044620111baa9e4169afec74de3f7a23921581.tar.gz scummvm-rg350-1f044620111baa9e4169afec74de3f7a23921581.tar.bz2 scummvm-rg350-1f044620111baa9e4169afec74de3f7a23921581.zip |
remove broken code, but i'll add better feature into compression tool
svn-id: r34119
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/smush/smush_player.cpp | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index d2844d8f8c..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 { @@ -1082,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(); |