diff options
Diffstat (limited to 'scumm/smush')
-rw-r--r-- | scumm/smush/chunk.cpp | 8 | ||||
-rw-r--r-- | scumm/smush/chunk.h | 2 | ||||
-rw-r--r-- | scumm/smush/smush_player.cpp | 42 | ||||
-rw-r--r-- | scumm/smush/smush_player.h | 8 |
4 files changed, 30 insertions, 30 deletions
diff --git a/scumm/smush/chunk.cpp b/scumm/smush/chunk.cpp index 6df6a7fb74..04a57557f2 100644 --- a/scumm/smush/chunk.cpp +++ b/scumm/smush/chunk.cpp @@ -32,11 +32,11 @@ class FilePtr : public File { Common::String _filename; int32 _refcount; public: - FilePtr(const char *fname, const char *directory) : + FilePtr(const char *fname) : _filename(fname), _refcount(1) { debug(9, "FilePtr created for %s", fname); - open(fname, directory); + open(fname); if (isOpen() == false) error("FilePtr unable to read file %s", fname); } @@ -115,8 +115,8 @@ FileChunk::FileChunk() : _data(0) { } -FileChunk::FileChunk(const char *fname, const char *directory) { - _data = new FilePtr(fname, directory); +FileChunk::FileChunk(const char *fname) { + _data = new FilePtr(fname); _type = _data->readUint32BE(); _size = _data->readUint32BE(); _offset = sizeof(Chunk::type) + sizeof(uint32); diff --git a/scumm/smush/chunk.h b/scumm/smush/chunk.h index 3e5bc59c9a..b37eb806c2 100644 --- a/scumm/smush/chunk.h +++ b/scumm/smush/chunk.h @@ -74,7 +74,7 @@ protected: FileChunk(); public: - FileChunk(const char *fname, const char *directory); + FileChunk(const char *fname); virtual ~FileChunk(); Chunk *subBlock(); bool read(void *buffer, uint32 size); diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index a0dddb6aa0..2950c150c0 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -171,11 +171,11 @@ public: } }; -static StringResource *getStrings(const char *file, const char *directory, bool is_encoded) { +static StringResource *getStrings(const char *file, bool is_encoded) { debug(7, "trying to read text ressources from %s", file); File theFile; - theFile.open(file, directory); + theFile.open(file); if (!theFile.isOpen()) { return 0; } @@ -192,7 +192,7 @@ static StringResource *getStrings(const char *file, const char *directory, bool if (type != TYPE_ETRS) { delete [] filebuffer; - return getStrings(file, directory, false); + return getStrings(file, false); } char *old = filebuffer; @@ -601,7 +601,7 @@ const char *SmushPlayer::getString(int id) { return _strings->get(id); } -bool SmushPlayer::readString(const char *file, const char *directory) { +bool SmushPlayer::readString(const char *file) { const char *i = strrchr(file, '.'); if (i == NULL) { error("invalid filename : %s", file); @@ -609,11 +609,11 @@ bool SmushPlayer::readString(const char *file, const char *directory) { char fname[260]; memcpy(fname, file, i - file); strcpy(fname + (i - file), ".trs"); - if ((_strings = getStrings(fname, directory, false)) != 0) { + if ((_strings = getStrings(fname, false)) != 0) { return true; } - if ((_strings = getStrings("digtxt.trs", directory, true)) != 0) { + if ((_strings = getStrings("digtxt.trs", true)) != 0) { return true; } return false; @@ -913,21 +913,21 @@ void SmushPlayer::handleAnimHeader(Chunk &b) { } } -void SmushPlayer::setupAnim(const char *file, const char *directory) { +void SmushPlayer::setupAnim(const char *file) { Chunk *sub; int i; char file_font[11]; - _base = new FileChunk(file, directory); + _base = new FileChunk(file); sub = _base->subBlock(); checkBlock(*sub, TYPE_AHDR); handleAnimHeader(*sub); if (_insanity) { if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) - readString("mineroad.trs", directory); + readString("mineroad.trs"); } else - readString(file, directory); + readString(file); if (_vm->_gameId == GID_FT) { if (!((_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) { @@ -935,17 +935,17 @@ void SmushPlayer::setupAnim(const char *file, const char *directory) { _sf[1] = new SmushFont(true, false); _sf[2] = new SmushFont(true, false); _sf[3] = new SmushFont(true, false); - _sf[0]->loadFont("scummfnt.nut", directory); - _sf[1]->loadFont("techfnt.nut", directory); - _sf[2]->loadFont("titlfnt.nut", directory); - _sf[3]->loadFont("specfnt.nut", directory); + _sf[0]->loadFont("scummfnt.nut"); + _sf[1]->loadFont("techfnt.nut"); + _sf[2]->loadFont("titlfnt.nut"); + _sf[3]->loadFont("specfnt.nut"); } } else if (_vm->_gameId == GID_DIG) { if (!(_vm->_features & GF_DEMO)) { for (i = 0; i < 4; i++) { sprintf(file_font, "font%d.nut", i); _sf[i] = new SmushFont(i != 0, false); - _sf[i]->loadFont(file_font, directory); + _sf[i]->loadFont(file_font); } } } else if (_vm->_gameId == GID_CMI) { @@ -954,7 +954,7 @@ void SmushPlayer::setupAnim(const char *file, const char *directory) { break; sprintf(file_font, "font%d.nut", i); _sf[i] = new SmushFont(false, true); - _sf[i]->loadFont(file_font, directory); + _sf[i]->loadFont(file_font); } } else { error("SmushPlayer::setupAnim() Unknown font setup for game"); @@ -1077,7 +1077,7 @@ void SmushPlayer::insanity(bool flag) { _insanity = flag; } -void SmushPlayer::seekSan(const char *file, const char *directory, int32 pos, int32 contFrame) { +void SmushPlayer::seekSan(const char *file, int32 pos, int32 contFrame) { if(_smixer) _smixer->stop(); @@ -1087,7 +1087,7 @@ void SmushPlayer::seekSan(const char *file, const char *directory, int32 pos, in delete _base; } - _base = new FileChunk(file, directory); + _base = new FileChunk(file); // In this case we need to get palette and number of frames if (pos > 8) { Chunk *sub = _base->subBlock(); @@ -1113,11 +1113,11 @@ void SmushPlayer::seekSan(const char *file, const char *directory, int32 pos, in _frame = contFrame; } -void SmushPlayer::play(const char *filename, const char *directory, int32 offset, int32 startFrame) { +void SmushPlayer::play(const char *filename, int32 offset, int32 startFrame) { // Verify the specified file exists File f; - f.open(filename, directory); + f.open(filename); if (!f.isOpen()) { warning("SmushPlayer::play() File not found %s", filename); return; @@ -1130,7 +1130,7 @@ void SmushPlayer::play(const char *filename, const char *directory, int32 offset bool oldMouseState = _vm->_system->showMouse(false); // Load the video - setupAnim(filename, directory); + setupAnim(filename); init(); if (offset) { diff --git a/scumm/smush/smush_player.h b/scumm/smush/smush_player.h index 37e1299e10..8b433ffc37 100644 --- a/scumm/smush/smush_player.h +++ b/scumm/smush/smush_player.h @@ -75,7 +75,7 @@ public: SmushPlayer(ScummEngine_v6 *scumm, int speed); ~SmushPlayer(); - void play(const char *filename, const char *directory, int32 offset = 0, int32 startFrame = 0); + void play(const char *filename, int32 offset = 0, int32 startFrame = 0); protected: SmushFont *_sf[5]; @@ -84,7 +84,7 @@ protected: void insanity(bool); void setPalette(const byte *palette); void setPaletteValue(int n, byte r, byte g, byte b); - void seekSan(const char *file, const char *directory, int32 pos, int32 contFrame); + void seekSan(const char *file, int32 pos, int32 contFrame); const char *getString(int id); private: @@ -92,10 +92,10 @@ private: void parseNextFrame(); void init(); void release(); - void setupAnim(const char *file, const char *directory); + void setupAnim(const char *file); void updateScreen(); - bool readString(const char *file, const char *directory); + bool readString(const char *file); void checkBlock(const Chunk &, Chunk::type, uint32 = 0); void handleAnimHeader(Chunk &); void handleFrame(Chunk &); |