diff options
author | Filippos Karapetis | 2010-01-10 21:13:38 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-01-10 21:13:38 +0000 |
commit | a637f50862ca03f3af22ed71e29ae4792219219d (patch) | |
tree | 3590aad9dc1a196bece6aa575f46ae0438127ff8 /engines | |
parent | 2ae12749a981be8d0d915bf9ecb6b9596e6298f8 (diff) | |
download | scummvm-rg350-a637f50862ca03f3af22ed71e29ae4792219219d.tar.gz scummvm-rg350-a637f50862ca03f3af22ed71e29ae4792219219d.tar.bz2 scummvm-rg350-a637f50862ca03f3af22ed71e29ae4792219219d.zip |
Silenced warnings ("this" isn't defined on object instantiation, and commented out some unused variables)
svn-id: r47237
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 { |