[Scummvm-cvs-logs] CVS: scummvm/smush blitter.cpp,1.1,1.2 blitter.h,1.1,1.2 channel.h,1.1,1.2 codec1.cpp,1.1,1.2 codec1.h,1.1,1.2 codec37.cpp,1.1,1.2 codec37.h,1.1,1.2 codec44.cpp,1.1,1.2 codec44.h,1.1,1.2 codec47.cpp,1.1,1.2 codec47.h,1.1,1.2 color.h,1.1,1.2 decoder.h,1.1,1.2 frenderer.h,1.1,1.2 imuse_channel.cpp,1.1,1.2 player.cpp,1.1,1.2 player.h,1.1,1.2 saud_channel.cpp,1.1,1.2 chunck.cpp,1.1,NONE chunck.h,1.1,NONE chunck_type.h,1.1,NONE
Pawe? Ko?odziejski
aquadran at users.sourceforge.net
Sat Aug 24 10:13:04 CEST 2002
Update of /cvsroot/scummvm/scummvm/smush
In directory usw-pr-cvs1:/tmp/cvs-serv13752/smush
Modified Files:
blitter.cpp blitter.h channel.h codec1.cpp codec1.h
codec37.cpp codec37.h codec44.cpp codec44.h codec47.cpp
codec47.h color.h decoder.h frenderer.h imuse_channel.cpp
player.cpp player.h saud_channel.cpp
Removed Files:
chunck.cpp chunck.h chunck_type.h
Log Message:
changed name from Chunck to Chunk
Index: blitter.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/blitter.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- blitter.cpp 24 Aug 2002 13:16:54 -0000 1.1
+++ blitter.cpp 24 Aug 2002 17:12:31 -0000 1.2
@@ -21,7 +21,7 @@
#include <stdafx.h>
#include "blitter.h"
-#include "chunck.h"
+#include "chunk.h"
#include <assert.h>
#include <string.h> // for memcpy
@@ -114,7 +114,7 @@
}
}
-void Blitter::blit(Chunck & src, unsigned int len) {
+void Blitter::blit(Chunk & src, unsigned int len) {
while(len) {
if(_outside) {
#ifdef DEBUG_CLIPPER
@@ -185,7 +185,7 @@
advanceBlock();
}
-void Blitter::putBlock(Chunck & src) {
+void Blitter::putBlock(Chunk & src) {
if(_cur.getX() + 3 < _src.right() && _cur.getY() + 3 < _src.bottom()) { // This is clipping
assert((_clip.getX() & 3) == 0);
unsigned int * dst = (unsigned int *)_offset;
Index: blitter.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/blitter.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- blitter.h 24 Aug 2002 13:16:54 -0000 1.1
+++ blitter.h 24 Aug 2002 17:12:31 -0000 1.2
@@ -36,7 +36,7 @@
#include "rect.h"
-class Chunck;
+class Chunk;
/*! @brief class for handling blitting on a frame buffer
This class allows to perform secure blitting to a frame buffer in several ways.
@@ -64,13 +64,13 @@
Blitter(char * buffer, const Point & dstsize, const Rect & src);
virtual ~Blitter();
void blit(char *, unsigned int); //!< This method allows to blit directly some data from a buffer
- void blit(Chunck &, unsigned int); //!< This method allows to blit directly some data from a chunck
+ void blit(Chunk &, unsigned int); //!< This method allows to blit directly some data from a Chunk
void put(char); //!< This method allows to blit one byte
void put(char, unsigned int); //!< This method allows to blit one byte several times
void advance(int = 1, int = 0); //!< This method allows to advance the current position in the blitter
void advanceBlock(int = 1, int = 0); //!< This method allows to advance the current position in the blitter in terms of blocks
void putBlock(unsigned int); //!< This method allows to blit one block from an int value repeated 4 time
- void putBlock(Chunck &); //!< This method allows to blit one block directly read from a chunck
+ void putBlock(Chunk &); //!< This method allows to blit one block directly read from a Chunk
void putBlock(unsigned char *); //!< This method allows to blit one block directly from a buffer
void putBlock(unsigned int, unsigned int, unsigned int, unsigned int); //!< This method allows to blit one block from a 4 int value
void blockCopy(int); //!< This method allows to copy one block from another separated by the given offset
Index: channel.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/channel.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- channel.h 24 Aug 2002 13:16:54 -0000 1.1
+++ channel.h 24 Aug 2002 17:12:31 -0000 1.2
@@ -34,8 +34,8 @@
# endif
#endif
-class Chunck;
-class ContChunck;
+class Chunk;
+class ContChunk;
/*! @brief interface for a sound channel (a track)
@@ -45,7 +45,7 @@
public:
virtual ~_Channel() {};
// called by the smush_player
- virtual bool appendData(Chunck & b, int size) = 0;
+ virtual bool appendData(Chunk & b, int size) = 0;
virtual bool setParameters(int, int, int, int) = 0;
virtual bool checkParameters(int, int, int, int, int) = 0;
// called by the mixer
@@ -76,9 +76,9 @@
int _sbufferSize; //!< sound buffer size
protected:
- void handleStrk(Chunck & c);
- void handleSmrk(Chunck & c);
- void handleShdr(Chunck & c);
+ void handleStrk(Chunk & c);
+ void handleSmrk(Chunk & c);
+ void handleShdr(Chunk & c);
bool handleSubTags(int & offset);
bool processBuffer();
void recalcVolumeTable();
@@ -89,7 +89,7 @@
bool isTerminated() const;
bool setParameters(int duration, int flags, int vol1, int vol2);
bool checkParameters(int index, int duration, int flags, int vol1, int vol2);
- bool appendData(Chunck & b, int size);
+ bool appendData(Chunk & b, int size);
int availableSoundData() const;
void getSoundData(short * sound_buffer, int size);
void getSoundData(char * sound_buffer, int size) { error("16bit request for SAUD channel should never happen"); };
@@ -128,11 +128,11 @@
int decode(int size, int &ret);
void decode();
bool processBuffer();
- bool handleMap(Chunck &);
- bool handleFormat(Chunck &);
- bool handleText(Chunck &);
- bool handleRegion(Chunck &);
- bool handleStop(Chunck &);
+ bool handleMap(Chunk &);
+ bool handleFormat(Chunk &);
+ bool handleText(Chunk &);
+ bool handleRegion(Chunk &);
+ bool handleStop(Chunk &);
bool handleSubTags(int & offset);
public:
@@ -141,7 +141,7 @@
bool isTerminated() const;
bool setParameters(int nbframes, int size, int unk1, int unk2);
bool checkParameters(int index, int nbframes, int size, int unk1, int unk2);
- bool appendData(Chunck & b, int size);
+ bool appendData(Chunk & b, int size);
int availableSoundData() const;
void getSoundData(short * sound_buffer, int size);
void getSoundData(char * sound_buffer, int size);
Index: codec1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/codec1.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- codec1.cpp 24 Aug 2002 13:16:54 -0000 1.1
+++ codec1.cpp 24 Aug 2002 17:12:31 -0000 1.2
@@ -21,13 +21,13 @@
#include <stdafx.h>
#include "codec1.h"
-#include "chunck.h"
+#include "chunk.h"
#include "blitter.h"
Codec1Decoder::~Codec1Decoder() {
}
-bool Codec1Decoder::decode(Blitter & dst, Chunck & src) {
+bool Codec1Decoder::decode(Blitter & dst, Chunk & src) {
int val;
int size_line;
int code, length;
Index: codec1.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/codec1.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- codec1.h 24 Aug 2002 13:16:54 -0000 1.1
+++ codec1.h 24 Aug 2002 17:12:31 -0000 1.2
@@ -42,7 +42,7 @@
class Codec1Decoder : public Decoder {
public:
virtual ~Codec1Decoder();
- bool decode(Blitter &, Chunck &);
+ bool decode(Blitter &, Chunk &);
};
#endif
Index: codec37.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/codec37.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- codec37.cpp 24 Aug 2002 13:16:54 -0000 1.1
+++ codec37.cpp 24 Aug 2002 17:12:31 -0000 1.2
@@ -21,7 +21,7 @@
#include <stdafx.h>
#include "codec37.h"
-#include "chunck.h"
+#include "chunk.h"
#include "blitter.h"
#include <assert.h>
@@ -200,7 +200,7 @@
}
}
-void Codec37Decoder::proc1(Blitter & dst, Chunck & src, int next_offs, int bw, int bh, int size) {
+void Codec37Decoder::proc1(Blitter & dst, Chunk & src, int next_offs, int bw, int bh, int size) {
unsigned char * decoded = new unsigned char[size];
int w = 0;
while(!src.eof()) {
@@ -234,7 +234,7 @@
delete []decoded;
}
-void Codec37Decoder::proc2(Blitter & dst, Chunck & src, int size) { // This is codec1 like...
+void Codec37Decoder::proc2(Blitter & dst, Chunk & src, int size) { // This is codec1 like...
#ifdef DEBUG_CODEC37_PROC2
int decoded_size = 0;
int coded_size = 0;
@@ -258,7 +258,7 @@
} while (size);
}
-void Codec37Decoder::proc3WithFDFE(Blitter & dst, Chunck & src, int next_offs, int bw, int bh) {
+void Codec37Decoder::proc3WithFDFE(Blitter & dst, Chunk & src, int next_offs, int bw, int bh) {
do {
int i = bw;
do {
@@ -293,7 +293,7 @@
} while (--bh);
}
-void Codec37Decoder::proc3WithoutFDFE(Blitter & dst, Chunck & src, int next_offs, int bw, int bh) {
+void Codec37Decoder::proc3WithoutFDFE(Blitter & dst, Chunk & src, int next_offs, int bw, int bh) {
do {
int i = bw;
do {
@@ -316,7 +316,7 @@
} while (--bh);
}
-void Codec37Decoder::proc4(Blitter & dst, Chunck & src, int next_offs, int bw, int bh) {
+void Codec37Decoder::proc4(Blitter & dst, Chunk & src, int next_offs, int bw, int bh) {
#ifdef DEBUG_CODEC37_PROC4
int b_nb = 0;
#endif
@@ -371,7 +371,7 @@
} while (--bh);
}
-bool Codec37Decoder::decode(Blitter & dst, Chunck & src) {
+bool Codec37Decoder::decode(Blitter & dst, Chunk & src) {
int width = getRect().width();
int height = getRect().height();
int bw = (width + 3) >> 2, bh = (height + 3) >> 2;
Index: codec37.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/codec37.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- codec37.h 24 Aug 2002 13:16:54 -0000 1.1
+++ codec37.h 24 Aug 2002 17:12:31 -0000 1.2
@@ -74,13 +74,13 @@
return r | (r << 16);
}
void maketable(int, int);
- void proc1(Blitter &, Chunck &, int, int, int, int);
- void proc2(Blitter &, Chunck &, int);
- void proc3WithFDFE(Blitter &, Chunck &, int, int, int);
- void proc3WithoutFDFE(Blitter &, Chunck &, int, int, int);
- void proc4(Blitter &, Chunck &, int, int, int);
+ void proc1(Blitter &, Chunk &, int, int, int, int);
+ void proc2(Blitter &, Chunk &, int);
+ void proc3WithFDFE(Blitter &, Chunk &, int, int, int);
+ void proc3WithoutFDFE(Blitter &, Chunk &, int, int, int);
+ void proc4(Blitter &, Chunk &, int, int, int);
public:
- bool decode(Blitter &, Chunck &);
+ bool decode(Blitter &, Chunk &);
};
#endif
Index: codec44.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/codec44.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- codec44.cpp 24 Aug 2002 13:16:54 -0000 1.1
+++ codec44.cpp 24 Aug 2002 17:12:31 -0000 1.2
@@ -21,10 +21,10 @@
#include <stdafx.h>
#include "codec44.h"
-#include "chunck.h"
+#include "chunk.h"
#include "blitter.h"
-bool Codec44Decoder::decode(Blitter & dst, Chunck & src) {
+bool Codec44Decoder::decode(Blitter & dst, Chunk & src) {
int size_line;
int num;
int w, width = getRect().width() + 1;
Index: codec44.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/codec44.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- codec44.h 24 Aug 2002 13:16:54 -0000 1.1
+++ codec44.h 24 Aug 2002 17:12:31 -0000 1.2
@@ -41,7 +41,7 @@
*/
class Codec44Decoder : public Decoder {
public:
- bool decode(Blitter & dst, Chunck & src);
+ bool decode(Blitter & dst, Chunk & src);
};
#endif
Index: codec47.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/codec47.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- codec47.cpp 24 Aug 2002 13:16:54 -0000 1.1
+++ codec47.cpp 24 Aug 2002 17:12:31 -0000 1.2
@@ -21,13 +21,13 @@
#include <stdafx.h>
#include "codec47.h"
-#include "chunck.h"
+#include "chunk.h"
#include "blitter.h"
DumpDecoder::~DumpDecoder() {
}
-bool DumpDecoder::decode(Blitter & dst, Chunck & src) {
+bool DumpDecoder::decode(Blitter & dst, Chunk & src) {
int n = 0, i = 0;
int seq = src.getWord();
int codec = src.getByte();
Index: codec47.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/codec47.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- codec47.h 24 Aug 2002 13:16:54 -0000 1.1
+++ codec47.h 24 Aug 2002 17:12:31 -0000 1.2
@@ -32,7 +32,7 @@
class DumpDecoder : public Decoder {
public:
virtual ~DumpDecoder();
- bool decode(Blitter &, Chunck &);
+ bool decode(Blitter &, Chunk &);
};
#endif
Index: color.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/color.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- color.h 24 Aug 2002 13:16:54 -0000 1.1
+++ color.h 24 Aug 2002 17:12:31 -0000 1.2
@@ -19,18 +19,18 @@
*
*/
-#ifndef __COLOR_H_
-#define __COLOR_H_
+#ifndef __Chunk_H_
+#define __Chunk_H_
#include "config.h"
-/*! @brief simple class for handling a color.
+/*! @brief simple class for handling a Chunk.
- This small class is an helper for colors.
+ This small class is an helper for Chunks.
*/
class Color {
public:
- typedef unsigned char value_type; //!< The type of the color components.
+ typedef unsigned char value_type; //!< The type of the Chunk components.
private:
value_type _r; //!< The red component.
value_type _g; //!< The green component.
@@ -47,7 +47,7 @@
/*! @brief handle delta palette modification
This method is used specifically by player::handleDeltaPalette().
- It updates the color component using delta values given as short.
+ It updates the Chunk component using delta values given as short.
@param ptr pointer to a table of 3 shorts that contain delta values to use.
*/
Index: decoder.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/decoder.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- decoder.h 24 Aug 2002 13:16:54 -0000 1.1
+++ decoder.h 24 Aug 2002 17:12:31 -0000 1.2
@@ -27,7 +27,7 @@
#include "rect.h"
class Blitter;
-class Chunck;
+class Chunk;
/*! @brief base class for codec decompression.
@@ -45,7 +45,7 @@
Decoder() {};
virtual ~Decoder() {};
virtual bool initSize(const Point & p, const Rect & r) { _p = p; _r = r; return true; };
- virtual bool decode(Blitter &, Chunck &) = 0;
+ virtual bool decode(Blitter &, Chunk &) = 0;
};
#endif
Index: frenderer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/frenderer.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- frenderer.h 24 Aug 2002 13:16:54 -0000 1.1
+++ frenderer.h 24 Aug 2002 17:12:31 -0000 1.2
@@ -131,7 +131,7 @@
/*! @brief draw a centered and possibly using multiple lines string.
This method performs calculation of the string size before choosing where to draw it.
- As I still not have figured out exactly what is the meaning of the fields in the TRES chunck,
+ As I still not have figured out exactly what is the meaning of the fields in the TRES Chunk,
the real meaning of the parameters can be quite difficult to understand.
@remark The current implementation is incorrect in the sense that it does not conform to the original game.
Index: imuse_channel.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/imuse_channel.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- imuse_channel.cpp 24 Aug 2002 13:16:54 -0000 1.1
+++ imuse_channel.cpp 24 Aug 2002 17:12:31 -0000 1.2
@@ -21,8 +21,8 @@
#include <stdafx.h>
#include "channel.h"
-#include "chunck.h"
-#include "chunck_type.h"
+#include "chunk.h"
+#include "chunk_type.h"
#include <assert.h>
#include <string.h> // for memcpy.h
@@ -63,12 +63,12 @@
return true;
}
-bool ImuseChannel::appendData(Chunck & b, int size) {
+bool ImuseChannel::appendData(Chunk & b, int size) {
if(_dataSize == -1) { // First call
assert(size > 8);
- Chunck::type imus_type = b.getDword(); imus_type = TO_BE_32(imus_type);
+ Chunk::type imus_type = b.getDword(); imus_type = TO_BE_32(imus_type);
unsigned int imus_size = b.getDword(); imus_size = TO_BE_32(imus_size);
- if(imus_type != TYPE_iMUS) error("Invalid CHUNCK for imuse_channel");
+ if(imus_type != TYPE_iMUS) error("Invalid Chunk for imuse_channel");
size -= 8;
_tbufferSize = size;
assert(_tbufferSize);
@@ -96,8 +96,8 @@
return processBuffer();
}
-bool ImuseChannel::handleFormat(Chunck & src) {
- if(src.getSize() != 20) error("invalid size for FRMT chunck");
+bool ImuseChannel::handleFormat(Chunk & src) {
+ if(src.getSize() != 20) error("invalid size for FRMT Chunk");
unsigned imuse_start = src.getDword();
imuse_start = TO_BE_32(imuse_start);
src.seek(4);
@@ -111,23 +111,23 @@
return true;
}
-bool ImuseChannel::handleText(Chunck & src) {
+bool ImuseChannel::handleText(Chunk & src) {
return true;
}
-bool ImuseChannel::handleRegion(Chunck & src) {
- if(src.getSize() != 8) error("invalid size for REGN chunck");
+bool ImuseChannel::handleRegion(Chunk & src) {
+ if(src.getSize() != 8) error("invalid size for REGN Chunk");
return true;
}
-bool ImuseChannel::handleStop(Chunck & src) {
- if(src.getSize() != 4) error("invalid size for STOP chunck");
+bool ImuseChannel::handleStop(Chunk & src) {
+ if(src.getSize() != 4) error("invalid size for STOP Chunk");
return true;
}
-bool ImuseChannel::handleMap(Chunck & map) {
+bool ImuseChannel::handleMap(Chunk & map) {
while(!map.eof()) {
- Chunck * sub = map.subBlock();
+ Chunk * sub = map.subBlock();
switch(sub->getType()) {
case TYPE_FRMT:
handleFormat(*sub);
@@ -142,7 +142,7 @@
handleStop(*sub);
break;
default:
- error("Unknown iMUS subchunck found : %s, %d", Chunck::ChunckString(sub->getType()), sub->getSize());
+ error("Unknown iMUS subChunk found : %s, %d", Chunk::ChunkString(sub->getType()), sub->getSize());
}
delete sub;
}
@@ -195,13 +195,13 @@
bool ImuseChannel::handleSubTags(int & offset) {
int available_size = _tbufferSize - offset;
if(available_size >= 8) {
- Chunck::type type = READ_BE_UINT32(_tbuffer + offset);
+ Chunk::type type = READ_BE_UINT32(_tbuffer + offset);
unsigned int size = READ_BE_UINT32(_tbuffer + offset + 4);
switch(type) {
case TYPE_MAP_:
_inData = false;
if(available_size >= (size + 8)) {
- ContChunck c((char*)_tbuffer + offset);
+ ContChunk c((char*)_tbuffer + offset);
handleMap(c);
}
break;
@@ -225,7 +225,7 @@
}
return false;
default:
- error("unknown chunck in iMUS track : %s ", Chunck::ChunckString(type));
+ error("unknown Chunk in iMUS track : %s ", Chunk::ChunkString(type));
}
offset += size + 8;
return true;
Index: player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/player.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- player.cpp 24 Aug 2002 13:16:54 -0000 1.1
+++ player.cpp 24 Aug 2002 17:12:31 -0000 1.2
@@ -24,7 +24,7 @@
#include "renderer.h"
#include "channel.h"
-#include "chunck_type.h"
+#include "Chunk_type.h"
#include "rect.h"
#include "blitter.h"
@@ -209,16 +209,16 @@
if(_fr[3]) delete _fr[3];
}
-void SmushPlayer::checkBlock(const Chunck & b, Chunck::type type_expected, unsigned int min_size) {
+void SmushPlayer::checkBlock(const Chunk & b, Chunk::type type_expected, unsigned int min_size) {
if(type_expected != b.getType()) {
- error("chunck type is different from expected : %d != %d", b.getType(), type_expected);
+ error("Chunk type is different from expected : %d != %d", b.getType(), type_expected);
}
if(min_size > b.getSize()) {
- error( "chunck size is inferior than minimum required size : %d < %d", b.getSize(), min_size);
+ error( "Chunk size is inferior than minimum required size : %d < %d", b.getSize(), min_size);
}
}
-void SmushPlayer::handleSoundBuffer(int track_id, int index, int max_frames, int flags, int vol, int bal, Chunck & b, int size) {
+void SmushPlayer::handleSoundBuffer(int track_id, int index, int max_frames, int flags, int vol, int bal, Chunk & b, int size) {
debug(6, "smush_player::handleSoundBuffer(%d)", track_id);
if(!_voices && (flags & 128) == 128) return;
if(!_bgmusic && (flags & 64) == 64) return;
@@ -234,7 +234,7 @@
c->appendData(b, size);
}
-void SmushPlayer::handleSoundFrame(Chunck & b) {
+void SmushPlayer::handleSoundFrame(Chunk & b) {
checkBlock(b, TYPE_PSAD);
debug(6, "SmushPlayer::handleSoundFrame()");
if(!_outputSound) return;
@@ -253,7 +253,7 @@
handleSoundBuffer(track_id, index, max_frames, flags, vol, bal, b, size);
}
-void SmushPlayer::handleSkip(Chunck & b) {
+void SmushPlayer::handleSkip(Chunk & b) {
checkBlock(b, TYPE_SKIP, 4);
int code = b.getDword();
debug(6, "SmushPlayer::handleSkip(%d)", code);
@@ -263,17 +263,17 @@
_skipNext =true;
}
-void SmushPlayer::handleStore(Chunck & b) {
+void SmushPlayer::handleStore(Chunk & b) {
checkBlock(b, TYPE_STOR, 4);
debug(6, "SmushPlayer::handleStore()");
}
-void SmushPlayer::handleFetch(Chunck & b) {
+void SmushPlayer::handleFetch(Chunk & b) {
checkBlock(b, TYPE_FTCH, 6);
debug(6, "SmushPlayer::handleFetch()");
}
-void SmushPlayer::handleImuseBuffer(int track_id, int index, int nbframes, int size, int unk1, int unk2, Chunck & b, int bsize) {
+void SmushPlayer::handleImuseBuffer(int track_id, int index, int nbframes, int size, int unk1, int unk2, Chunk & b, int bsize) {
_Channel * c = _mixer->findChannel(track_id);
if(c == 0) {
c = new ImuseChannel(track_id, _soundFrequency);
@@ -286,7 +286,7 @@
c->appendData(b, bsize);
}
-void SmushPlayer::handleImuseAction8(Chunck & b, int flags, int unknown, int track_id) {
+void SmushPlayer::handleImuseAction8(Chunk & b, int flags, int unknown, int track_id) {
assert(flags == 46 && unknown == 0);
int unknown2 = b.getWord();
track_id |= unknown2 << 16;
@@ -297,7 +297,7 @@
handleImuseBuffer(track_id, index, nbframes, size, unknown, unknown2, b, bsize);
}
-void SmushPlayer::handleImuseAction(Chunck & b) {
+void SmushPlayer::handleImuseAction(Chunk & b) {
checkBlock(b, TYPE_IACT, 8);
debug(6, "SmushPlayer::handleImuseAction()");
if(!_outputSound) return;
@@ -320,7 +320,7 @@
}
}
-void SmushPlayer::handleTextResource(Chunck & b) {
+void SmushPlayer::handleTextResource(Chunk & b) {
checkBlock(b, TYPE_TRES, 18);
int pos_x = b.getShort();
int pos_y = b.getShort();
@@ -375,13 +375,13 @@
}
}
-void SmushPlayer::readPalette(Palette & out, Chunck & in) {
+void SmushPlayer::readPalette(Palette & out, Chunk & in) {
unsigned char buffer[768];
in.read(buffer, 768);
out = Palette(buffer);
}
-void SmushPlayer::handleDeltaPalette(Chunck & b) {
+void SmushPlayer::handleDeltaPalette(Chunk & b) {
checkBlock(b, TYPE_XPAL);
debug(6, "SmushPlayer::handleDeltaPalette()");
if(b.getSize() == 768 * 3 + 4) {
@@ -407,14 +407,14 @@
}
}
-void SmushPlayer::handleNewPalette(Chunck & b) {
+void SmushPlayer::handleNewPalette(Chunk & b) {
checkBlock(b, TYPE_NPAL, 768);
debug(6, "SmushPlayer::handleNewPalette()");
readPalette(_pal, b);
updatePalette();
}
-void SmushPlayer::decodeCodec(Chunck & b, const Rect & r, Decoder & codec) {
+void SmushPlayer::decodeCodec(Chunk & b, const Rect & r, Decoder & codec) {
assert(_curBuffer);
Blitter blit(_curBuffer, _frameSize, r);
codec.decode(blit, b);
@@ -449,7 +449,7 @@
_alreadyInit = true;
}
-void SmushPlayer::handleFrameObject(Chunck & b) {
+void SmushPlayer::handleFrameObject(Chunk & b) {
checkBlock(b, TYPE_FOBJ, 14);
if(_skipNext) {
_skipNext = false;
@@ -496,14 +496,14 @@
}
}
-void SmushPlayer::handleFrame(Chunck & b) {
+void SmushPlayer::handleFrame(Chunk & b) {
checkBlock(b, TYPE_FRME);
debug(6, "SmushPlayer::handleFrame(%d)", _frame);
_alreadyInit = false;
_skipNext = false;
while(!b.eof()) {
- Chunck * sub = b.subBlock();
+ Chunk * sub = b.subBlock();
if(sub->getSize() & 1) b.seek(1);
switch(sub->getType()) {
case TYPE_NPAL:
@@ -534,7 +534,7 @@
handleSkip(*sub);
break;
default:
- error("Unknown frame subchunck found : %s, %d", Chunck::ChunckString(sub->getType()), sub->getSize());
+ error("Unknown frame subChunk found : %s, %d", Chunk::ChunkString(sub->getType()), sub->getSize());
}
delete sub;
}
@@ -553,7 +553,7 @@
_frame++;
}
-void SmushPlayer::handleAnimHeader(Chunck & b) {
+void SmushPlayer::handleAnimHeader(Chunk & b) {
checkBlock(b, TYPE_AHDR, 774);
debug(6, "SmushPlayer::handleAnimHeader()");
_version = b.getWord();
@@ -619,7 +619,7 @@
if(is_encoded) {
static const int ETRS_HEADER_LENGTH = 16;
assert(length > ETRS_HEADER_LENGTH);
- Chunck::type type = READ_BE_UINT32(filebuffer);
+ Chunk::type type = READ_BE_UINT32(filebuffer);
if(type != TYPE_ETRS) error("invalid type for file"); // mem leak !!!
char * old = filebuffer;
filebuffer = new char[length - ETRS_HEADER_LENGTH];
@@ -730,12 +730,12 @@
}
}
}
- FileChunck base = FileChunck(file);
+ FileChunk base = FileChunk(file);
checkBlock(base, TYPE_ANIM);
while(!base.eof()) {
- Chunck * sub = base.subBlock();
+ Chunk * sub = base.subBlock();
switch(sub->getType()) {
case TYPE_AHDR:
handleAnimHeader(*sub);
@@ -744,7 +744,7 @@
handleFrame(*sub);
break;
default:
- error("Unknown chunck found : %d, %d", sub->getType(), sub->getSize());
+ error("Unknown Chunk found : %d, %d", sub->getType(), sub->getSize());
}
delete sub;
if(_renderer->prematureClose())
Index: player.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/player.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- player.h 24 Aug 2002 13:16:54 -0000 1.1
+++ player.h 24 Aug 2002 17:12:31 -0000 1.2
@@ -26,7 +26,7 @@
#include "rect.h"
#include "mixer.h"
-#include "chunck.h"
+#include "chunk.h"
#include "palette.h"
#include "codec1.h"
#include "codec37.h"
@@ -81,23 +81,23 @@
protected:
bool readString(const char * file, bool &);
void clean();
- void checkBlock(const Chunck &, Chunck::type, unsigned int = 0);
- void handleAnimHeader(Chunck &);
- void handleFrame(Chunck &);
- void handleNewPalette(Chunck &);
- void handleFrameObject(Chunck &);
- void handleSoundBuffer(int, int, int, int, int, int, Chunck &, int);
- void handleImuseBuffer(int, int, int, int, int, int, Chunck &, int);
- void handleSoundFrame(Chunck &);
- void handleSkip(Chunck &);
- void handleStore(Chunck &);
- void handleFetch(Chunck &);
- void handleImuseAction8(Chunck &, int flags, int unknown, int track_id);
- void handleImuseAction(Chunck &);
- void handleTextResource(Chunck &);
- void handleDeltaPalette(Chunck &);
- void decodeCodec(Chunck &, const Rect &, Decoder &);
- void readPalette(Palette &, Chunck &);
+ void checkBlock(const Chunk &, Chunk::type, unsigned int = 0);
+ void handleAnimHeader(Chunk &);
+ void handleFrame(Chunk &);
+ void handleNewPalette(Chunk &);
+ void handleFrameObject(Chunk &);
+ void handleSoundBuffer(int, int, int, int, int, int, Chunk &, int);
+ void handleImuseBuffer(int, int, int, int, int, int, Chunk &, int);
+ void handleSoundFrame(Chunk &);
+ void handleSkip(Chunk &);
+ void handleStore(Chunk &);
+ void handleFetch(Chunk &);
+ void handleImuseAction8(Chunk &, int flags, int unknown, int track_id);
+ void handleImuseAction(Chunk &);
+ void handleTextResource(Chunk &);
+ void handleDeltaPalette(Chunk &);
+ void decodeCodec(Chunk &, const Rect &, Decoder &);
+ void readPalette(Palette &, Chunk &);
void initSize(const Rect &, bool, bool);
};
Index: saud_channel.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/smush/saud_channel.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- saud_channel.cpp 24 Aug 2002 13:16:54 -0000 1.1
+++ saud_channel.cpp 24 Aug 2002 17:12:31 -0000 1.2
@@ -21,8 +21,8 @@
#include <stdafx.h>
#include "channel.h"
-#include "chunck.h"
-#include "chunck_type.h"
+#include "chunk.h"
+#include "chunk_type.h"
#include <assert.h>
#include <string.h> // for memcpy.h
@@ -30,18 +30,18 @@
#define min(x, y) ((x) > (y) ? (y) : (x))
#endif
-void SaudChannel::handleStrk(Chunck & b) {
+void SaudChannel::handleStrk(Chunk & b) {
int size = b.getSize();
if(size != 14 && size != 10) {
error("STRK has a invalid size : %d", size);
}
}
-void SaudChannel::handleSmrk(Chunck & b) {
+void SaudChannel::handleSmrk(Chunk & b) {
_markReached = true;
}
-void SaudChannel::handleShdr(Chunck & b) {
+void SaudChannel::handleShdr(Chunk & b) {
int size = b.getSize();
if(size != 4) warning("SMRK has a invalid size : %d", size);
}
@@ -49,14 +49,14 @@
bool SaudChannel::handleSubTags(int & offset) {
int available_size = _tbufferSize - offset;
if(available_size >= 8) {
- Chunck::type type = READ_BE_UINT32(_tbuffer + offset);
+ Chunk::type type = READ_BE_UINT32(_tbuffer + offset);
unsigned int size = READ_BE_UINT32(_tbuffer + offset + 4);
switch(type) {
case TYPE_STRK:
_inData = false;
if(available_size >= (size + 8)) {
- ContChunck c((char*)_tbuffer + offset);
+ ContChunk c((char*)_tbuffer + offset);
handleStrk(c);
}
else
@@ -65,7 +65,7 @@
case TYPE_SMRK:
_inData = false;
if(available_size >= (size + 8)) {
- ContChunck c((char*)_tbuffer + offset);
+ ContChunk c((char*)_tbuffer + offset);
handleSmrk(c);
}
else
@@ -74,7 +74,7 @@
case TYPE_SHDR:
_inData = false;
if(available_size >= (size + 8)) {
- ContChunck c((char*)_tbuffer + offset);
+ ContChunk c((char*)_tbuffer + offset);
handleShdr(c);
}
else
@@ -86,7 +86,7 @@
offset += 8;
return false;
default:
- error("unknown chunck in SAUD track : %s ", Chunck::ChunckString(type));
+ error("unknown Chunk in SAUD track : %s ", Chunk::ChunkString(type));
}
offset += size + 8;
return true;
@@ -232,12 +232,12 @@
return true;
}
-bool SaudChannel::appendData(Chunck & b, int size) {
+bool SaudChannel::appendData(Chunk & b, int size) {
if(_dataSize == -1) { // First call
assert(size > 8);
- Chunck::type saud_type = b.getDword(); saud_type = TO_BE_32(saud_type);
+ Chunk::type saud_type = b.getDword(); saud_type = TO_BE_32(saud_type);
unsigned int saud_size = b.getDword(); saud_size = TO_BE_32(saud_size);
- if(saud_type != TYPE_SAUD) error("Invalid CHUNCK for SaudChannel : %X", saud_type);
+ if(saud_type != TYPE_SAUD) error("Invalid Chunk for SaudChannel : %X", saud_type);
size -= 8;
_dataSize = -2; // We don't get here again...
}
--- chunck.cpp DELETED ---
--- chunck.h DELETED ---
--- chunck_type.h DELETED ---
More information about the Scummvm-git-logs
mailing list