diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/kfile.cpp | 12 | ||||
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/state.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/state.h | 7 |
5 files changed, 12 insertions, 13 deletions
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp index 1db605af1e..e3cc938b1b 100644 --- a/engines/sci/engine/kernel32.cpp +++ b/engines/sci/engine/kernel32.cpp @@ -645,7 +645,7 @@ reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv) { } reg_t kUpdateScreenItem(EngineState *s, int argc, reg_t *argv) { - reg_t viewObj = argv[0]; + //reg_t viewObj = argv[0]; //warning("kUpdateScreenItem, object %04x:%04x, view %d, loop %d, cel %d, pri %d", PRINT_REG(viewObj), viewId, loopNo, celNo, priority); return NULL_REG; diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 5610a5c751..1b5b94589a 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -652,7 +652,7 @@ enum { K_FILEIO_WRITE_WORD = 16 }; -reg_t DirSeeker::firstFile(const Common::String &mask, reg_t buffer) { +reg_t DirSeeker::firstFile(const Common::String &mask, reg_t buffer, SegManager *segMan) { // Verify that we are given a valid buffer if (!buffer.segment) { error("DirSeeker::firstFile('%s') invoked with invalid buffer", mask.c_str()); @@ -669,10 +669,10 @@ reg_t DirSeeker::firstFile(const Common::String &mask, reg_t buffer) { // Reset the list iterator and write the first match to the output buffer, if any. _iter = _savefiles.begin(); - return nextFile(); + return nextFile(segMan); } -reg_t DirSeeker::nextFile() { +reg_t DirSeeker::nextFile(SegManager *segMan) { if (_iter == _savefiles.end()) { return NULL_REG; } @@ -683,7 +683,7 @@ reg_t DirSeeker::nextFile() { Common::String string = ((Sci::SciEngine*)g_engine)->unwrapFilename(wrappedString); if (string.size() > 12) string = Common::String(string.c_str(), 12); - _state->_segMan->strcpy(_outbuffer, string.c_str()); + segMan->strcpy(_outbuffer, string.c_str()); // Return the result and advance the list iterator :) ++_iter; @@ -832,13 +832,13 @@ reg_t kFileIO(EngineState *s, int argc, reg_t *argv) { // if (mask == "*.*") // mask = "*"; // For UNIX //#endif - s->r_acc = s->_dirseeker.firstFile(mask, buf); + s->r_acc = s->_dirseeker.firstFile(mask, buf, s->_segMan); break; } case K_FILEIO_FIND_NEXT : { debug(3, "K_FILEIO_FIND_NEXT()"); - s->r_acc = s->_dirseeker.nextFile(); + s->r_acc = s->_dirseeker.nextFile(s->_segMan); break; } case K_FILEIO_FILE_EXISTS : { diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 0f263fd1bb..5916e850bf 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -1810,7 +1810,7 @@ reg_t kAvoidPath(EngineState *s, int argc, reg_t *argv) { case 8 : { Common::Point end = Common::Point(argv[2].toSint16(), argv[3].toSint16()); reg_t poly_list, output; - int width, height, opt; + int width, height, opt = 0; if (getSciVersion() >= SCI_VERSION_2) { if (argc < 7) diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp index 255a8e0f36..f9330e424e 100644 --- a/engines/sci/engine/state.cpp +++ b/engines/sci/engine/state.cpp @@ -33,7 +33,7 @@ namespace Sci { EngineState::EngineState(ResourceManager *res, Kernel *kernel, Vocabulary *voc, SegManager *segMan, SciGui *gui, AudioPlayer *audio) -: resMan(res), _kernel(kernel), _voc(voc), _segMan(segMan), _gui(gui), _audio(audio), _dirseeker(this) { +: resMan(res), _kernel(kernel), _voc(voc), _segMan(segMan), _gui(gui), _audio(audio), _dirseeker() { sfx_init_flags = 0; diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index 26e4893b27..3d6178b07e 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -65,19 +65,18 @@ struct GfxList; class DirSeeker { protected: - EngineState *_state; reg_t _outbuffer; Common::StringList _savefiles; Common::StringList::const_iterator _iter; public: - DirSeeker(EngineState *s) : _state(s) { + DirSeeker() { _outbuffer = NULL_REG; _iter = _savefiles.begin(); } - reg_t firstFile(const Common::String &mask, reg_t buffer); - reg_t nextFile(); + reg_t firstFile(const Common::String &mask, reg_t buffer, SegManager *segMan); + reg_t nextFile(SegManager *segMan); }; enum { |