diff options
author | Eugene Sandulenko | 2005-07-30 21:11:48 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-07-30 21:11:48 +0000 |
commit | 6b4484472b79dc7ea7d1ce545a28fba7d3b7696f (patch) | |
tree | c44c4e61f18ddd537f7082cb48869cf33d422fbd /scumm/smush | |
parent | 86ab70b149e5cd00cf54f2e41896e2c4e16795e4 (diff) | |
download | scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.gz scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.bz2 scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.zip |
Remove trailing whitespaces.
svn-id: r18604
Diffstat (limited to 'scumm/smush')
-rw-r--r-- | scumm/smush/channel.h | 4 | ||||
-rw-r--r-- | scumm/smush/chunk.cpp | 14 | ||||
-rw-r--r-- | scumm/smush/codec37.cpp | 2 | ||||
-rw-r--r-- | scumm/smush/codec47.cpp | 4 | ||||
-rw-r--r-- | scumm/smush/imuse_channel.cpp | 26 | ||||
-rw-r--r-- | scumm/smush/saud_channel.cpp | 8 | ||||
-rw-r--r-- | scumm/smush/smush_font.cpp | 10 | ||||
-rw-r--r-- | scumm/smush/smush_font.h | 2 | ||||
-rw-r--r-- | scumm/smush/smush_mixer.cpp | 4 | ||||
-rw-r--r-- | scumm/smush/smush_player.cpp | 44 | ||||
-rw-r--r-- | scumm/smush/smush_player.h | 4 |
11 files changed, 61 insertions, 61 deletions
diff --git a/scumm/smush/channel.h b/scumm/smush/channel.h index dcd7c78cc0..797c679727 100644 --- a/scumm/smush/channel.h +++ b/scumm/smush/channel.h @@ -28,7 +28,7 @@ namespace Scumm { class Chunk; class ContChunk; - + class SmushChannel { public: @@ -81,7 +81,7 @@ public: void getSoundData(int16 *sound_buffer, int32 size); void getSoundData(int8 *sound_buffer, int32 size) { error("8bit request for SAUD channel should never happen"); }; int32 getRate() { return _frequency; } - bool getParameters(int32 &rate, bool &stereo, bool &is_16bit, int32 &vol, int32 &pan) { + bool getParameters(int32 &rate, bool &stereo, bool &is_16bit, int32 &vol, int32 &pan) { rate = _frequency; stereo = true; is_16bit = true; diff --git a/scumm/smush/chunk.cpp b/scumm/smush/chunk.cpp index 888e0f9fce..5c290a83f0 100644 --- a/scumm/smush/chunk.cpp +++ b/scumm/smush/chunk.cpp @@ -39,26 +39,26 @@ const char *Chunk::ChunkString(Chunk::type t) { return data; } -BaseChunk::BaseChunk() : +BaseChunk::BaseChunk() : _type(0), _size(0), _curPos(0) { } bool BaseChunk::eof() const { - return _curPos >= _size; + return _curPos >= _size; } uint32 BaseChunk::tell() const { - return _curPos; + return _curPos; } -Chunk::type BaseChunk::getType() const { - return _type; +Chunk::type BaseChunk::getType() const { + return _type; } -uint32 BaseChunk::getSize() const { - return _size; +uint32 BaseChunk::getSize() const { + return _size; } bool BaseChunk::seek(int32 delta, seek_type dir) { diff --git a/scumm/smush/codec37.cpp b/scumm/smush/codec37.cpp index c7ed741156..df578175ce 100644 --- a/scumm/smush/codec37.cpp +++ b/scumm/smush/codec37.cpp @@ -532,7 +532,7 @@ void Codec37Decoder::decode(byte *dst, const byte *src) { if ((seq_nb & 1) || !(mask_flags & 1)) { _curtable ^= 1; } - proc1(_deltaBufs[_curtable], src + 16, _deltaBufs[_curtable ^ 1] - _deltaBufs[_curtable], + proc1(_deltaBufs[_curtable], src + 16, _deltaBufs[_curtable ^ 1] - _deltaBufs[_curtable], bw, bh, pitch, _offsetTable); break; case 2: diff --git a/scumm/smush/codec47.cpp b/scumm/smush/codec47.cpp index 9715a25a49..e0430256c5 100644 --- a/scumm/smush/codec47.cpp +++ b/scumm/smush/codec47.cpp @@ -212,7 +212,7 @@ void Codec47Decoder::makeTablesInterpolation(int param) { } else { b2 = 4; } - + memset(tableSmallBig, 0, param * param * 4); variable2 = ABS(value_table47_2_2 - value_table47_2_1); @@ -339,7 +339,7 @@ void Codec47Decoder::makeTables47(int width) { _tableBig[128 + a + d * 2] = (byte)tmp; _tableBig[128 + a + d * 2 + 1] = tmp >> 8; } - + a += 388; c += 128; } while (c < 32768); diff --git a/scumm/smush/imuse_channel.cpp b/scumm/smush/imuse_channel.cpp index 3adbe4a266..bc80cde6f7 100644 --- a/scumm/smush/imuse_channel.cpp +++ b/scumm/smush/imuse_channel.cpp @@ -27,24 +27,24 @@ namespace Scumm { -ImuseChannel::ImuseChannel(int32 track, int32 freq) : - _track(track), - _tbuffer(0), - _tbufferSize(0), - _sbuffer(0), - _sbufferSize(0), - _frequency(freq), +ImuseChannel::ImuseChannel(int32 track, int32 freq) : + _track(track), + _tbuffer(0), + _tbufferSize(0), + _sbuffer(0), + _sbufferSize(0), + _frequency(freq), _dataSize(-1), _inData(false) { } ImuseChannel::~ImuseChannel() { if (_tbuffer) { - delete []_tbuffer; + delete []_tbuffer; } if (_sbuffer) { warning("_sbuffer should be 0 !!!"); - delete []_sbuffer; + delete []_sbuffer; } } @@ -218,7 +218,7 @@ bool ImuseChannel::handleSubTags(int32 &offset) { uint32 size = READ_BE_UINT32(_tbuffer + offset + 4); uint32 available_size = _tbufferSize - offset; switch(type) { - case TYPE_MAP_: + case TYPE_MAP_: _inData = false; if (available_size >= (size + 8)) { MemoryChunk c((byte *)_tbuffer + offset); @@ -260,9 +260,9 @@ bool ImuseChannel::processBuffer() { assert(_tbufferSize != 0); assert(_sbuffer == 0); assert(_sbufferSize == 0); - + if (_inData) { - if (_dataSize < _tbufferSize) { + if (_dataSize < _tbufferSize) { int32 offset= _dataSize; while (handleSubTags(offset)); _sbufferSize = _dataSize; @@ -278,7 +278,7 @@ bool ImuseChannel::processBuffer() { _tbufferSize = 0; } if (_sbufferSize == 0) { - delete []_sbuffer; + delete []_sbuffer; _sbuffer = 0; } } else { diff --git a/scumm/smush/saud_channel.cpp b/scumm/smush/saud_channel.cpp index a72d1c7fe7..3e18df42e5 100644 --- a/scumm/smush/saud_channel.cpp +++ b/scumm/smush/saud_channel.cpp @@ -94,7 +94,7 @@ bool SaudChannel::processBuffer() { assert(_tbufferSize != 0); assert(_sbuffer == 0); assert(_sbufferSize == 0); - + if (_keepSize) { _sbufferSize = _tbufferSize; _sbuffer = _tbuffer; @@ -118,7 +118,7 @@ bool SaudChannel::processBuffer() { _tbufferSize = 0; } if (_sbufferSize == 0) { - delete []_sbuffer; + delete []_sbuffer; _sbuffer = 0; } } else { @@ -156,8 +156,8 @@ bool SaudChannel::processBuffer() { return true; } -SaudChannel::SaudChannel(int32 track, int32 freq) : - _track(track), +SaudChannel::SaudChannel(int32 track, int32 freq) : + _track(track), _nbframes(0), _dataSize(-1), _frequency(freq), diff --git a/scumm/smush/smush_font.cpp b/scumm/smush/smush_font.cpp index 3b3aed766e..2fc498c696 100644 --- a/scumm/smush/smush_font.cpp +++ b/scumm/smush/smush_font.cpp @@ -237,16 +237,16 @@ void SmushFont::drawStringWrap(const char *str, byte *buffer, int dst_width, int if (y > dst_height - height) { y = dst_height - height; } - + if (center) { max_width = (max_width + 1) / 2; x = left + width / 2; - + if (x < left + max_width) x = left + max_width; if (x > right - max_width) x = right - max_width; - + for (i = 0; i < line_count; i++) { drawSubstring(substrings[i], buffer, dst_width, x - substr_widths[i] / 2, y); y += getStringHeight(substrings[i]); @@ -254,13 +254,13 @@ void SmushFont::drawStringWrap(const char *str, byte *buffer, int dst_width, int } else { if (x > dst_width - max_width) x = dst_width - max_width; - + for (i = 0; i < line_count; i++) { drawSubstring(substrings[i], buffer, dst_width, x, y); y += getStringHeight(substrings[i]); } } - + free(s); } diff --git a/scumm/smush/smush_font.h b/scumm/smush/smush_font.h index 3cb0c4d19f..a2811c2530 100644 --- a/scumm/smush/smush_font.h +++ b/scumm/smush/smush_font.h @@ -32,7 +32,7 @@ protected: int16 _color; bool _new_colors; bool _original; - + int getStringWidth(const char *str); int getStringHeight(const char *str); diff --git a/scumm/smush/smush_mixer.cpp b/scumm/smush/smush_mixer.cpp index dfb467d541..773e09a97e 100644 --- a/scumm/smush/smush_mixer.cpp +++ b/scumm/smush/smush_mixer.cpp @@ -81,8 +81,8 @@ void SmushMixer::addChannel(SmushChannel *c) { } for (i = 0; i < NUM_CHANNELS; i++) { - warning("channel %d : %p(%d, %d)", i, (void *)_channels[i].chan, - _channels[i].chan ? _channels[i].chan->getTrackIdentifier() : -1, + warning("channel %d : %p(%d, %d)", i, (void *)_channels[i].chan, + _channels[i].chan ? _channels[i].chan->getTrackIdentifier() : -1, _channels[i].chan ? _channels[i].chan->isTerminated() : 1); } diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index 68d36c71f2..9ce66eb44e 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -90,7 +90,7 @@ public: assert(def_end != NULL); char *id_end = def_end; - while (id_end >= def_start && !isdigit(*(id_end-1))) { + while (id_end >= def_start && !isdigit(*(id_end-1))) { id_end--; } @@ -238,7 +238,7 @@ SmushPlayer::SmushPlayer(ScummEngine_v6 *scumm, int speed) { _base = NULL; _frameBuffer = NULL; _specialBuffer = NULL; - + _seekPos = -1; _skipNext = false; @@ -273,7 +273,7 @@ void SmushPlayer::init() { _vm->_smushVideoShouldFinish = false; _vm->setDirtyColors(0, 255); _dst = _vm->virtscr[0].getPixels(0, 0); - + // HACK HACK HACK: This is an *evil* trick, beware! // We do this to fix bug #1037052. A proper solution would change all the // drawing code to use the pitch value specified by the virtual screen. @@ -284,7 +284,7 @@ void SmushPlayer::init() { _origNumStrips = _vm->gdi._numStrips; _vm->virtscr[0].pitch = _vm->virtscr[0].w; _vm->gdi._numStrips = _vm->virtscr[0].w / 8; - + _smixer = new SmushMixer(_vm->_mixer); Common::g_timer->installTimerProc(&timerCallback, 1000000 / _speed, this); @@ -338,8 +338,8 @@ void SmushPlayer::release() { // some explanation. _vm->virtscr[0].pitch = _origPitch; _vm->gdi._numStrips = _origNumStrips; - - + + _initDone = false; } @@ -526,9 +526,9 @@ void SmushPlayer::handleIACT(Chunk &b) { *(_IACToutput + _IACTpos) = *d_src++; _IACTpos++; bsize--; - } + } } - + free(src); } } @@ -586,7 +586,7 @@ void SmushPlayer::handleTextResource(Chunk &b) { { int id = str[3] - '0'; str += 4; - sf = _sf[id]; + sf = _sf[id]; } break; case 'c': @@ -613,7 +613,7 @@ void SmushPlayer::handleTextResource(Chunk &b) { // bit 2 - ??? 4 // bit 3 - wrap around 8 switch (flags & 9) { - case 0: + case 0: sf->drawString(str, _dst, _width, _height, pos_x, pos_y, false); break; case 1: @@ -1020,25 +1020,25 @@ void SmushPlayer::setupAnim(const char *file) { } } else { error("SmushPlayer::setupAnim() Unknown font setup for game"); - } + } } void SmushPlayer::parseNextFrame() { Common::StackLock lock(_mutex); - + Chunk *sub; if (_vm->_smushPaused) return; - + if (_seekPos >= 0) { if (_smixer) _smixer->stop(); - + if (_seekFile.size() > 0) { delete _base; _base = new FileChunk(_seekFile); - + if (_seekPos > 0) { assert(_seekPos > 8); // In this case we need to get palette and number of frames @@ -1046,7 +1046,7 @@ void SmushPlayer::parseNextFrame() { checkBlock(*sub, TYPE_AHDR); handleAnimHeader(*sub); delete sub; - + _middleAudio = true; _seekPos -= 8; } else { @@ -1058,10 +1058,10 @@ void SmushPlayer::parseNextFrame() { } else { _skipPalette = true; } - + _base->seek(_seekPos, FileChunk::seek_start); _frame = _seekFrame; - + _seekPos = -1; } @@ -1125,7 +1125,7 @@ void SmushPlayer::updateScreen() { // change path below for dump png files sprintf(fileName, "/path/to/somethere/%s%04d.png", _vm->getGameName(), _frame); FILE *file = fopen(fileName, "wb"); - if (file == NULL) + 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); @@ -1145,7 +1145,7 @@ void SmushPlayer::updateScreen() { png_init_io(png_ptr, file); - png_set_IHDR(png_ptr, info_ptr, _width, _height, 8, PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE, + 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)); @@ -1241,7 +1241,7 @@ void SmushPlayer::play(const char *filename, int32 offset, int32 startFrame) { _warpNeeded = false; _palDirtyMin = 256; _palDirtyMax = -1; - + // Hide mouse bool oldMouseState = _vm->_system->showMouse(false); @@ -1281,7 +1281,7 @@ void SmushPlayer::play(const char *filename, int32 offset, int32 startFrame) { } if (_updateNeeded) { uint32 end_time, start_time; - + start_time = _vm->_system->getMillis(); _vm->_system->copyRectToScreen(_dst, _width, 0, 0, _width, _height); _vm->_system->updateScreen(); diff --git a/scumm/smush/smush_player.h b/scumm/smush/smush_player.h index a138962b7e..ef7c67a44d 100644 --- a/scumm/smush/smush_player.h +++ b/scumm/smush/smush_player.h @@ -102,7 +102,7 @@ public: protected: SmushFont *_sf[5]; int _width, _height; - + int _origPitch, _origNumStrips; void insanity(bool); @@ -138,7 +138,7 @@ private: void handleTextResource(Chunk &); void handleDeltaPalette(Chunk &); void readPalette(byte *, Chunk &); - + static void timerCallback(void *ptr); }; |