diff options
author | Max Horn | 2010-02-02 22:53:33 +0000 |
---|---|---|
committer | Max Horn | 2010-02-02 22:53:33 +0000 |
commit | 2c25dab0e73ddb3f62375c0f340df9b74cd49522 (patch) | |
tree | c109e8f557d4293d5d937970932e54abbeaf91c4 | |
parent | 4b19acf2550be8c55cefd2f1abf0759a61dfca75 (diff) | |
download | scummvm-rg350-2c25dab0e73ddb3f62375c0f340df9b74cd49522.tar.gz scummvm-rg350-2c25dab0e73ddb3f62375c0f340df9b74cd49522.tar.bz2 scummvm-rg350-2c25dab0e73ddb3f62375c0f340df9b74cd49522.zip |
SCI: cleanup
svn-id: r47825
-rw-r--r-- | engines/sci/console.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 34a8562495..99851cb9b2 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -433,7 +433,7 @@ bool Console::cmdGetVersion(int argc, const char **argv) { bool Console::cmdOpcodes(int argc, const char **argv) { // Load the opcode table from vocab.998 if it exists, to obtain the opcode names - Resource* r = _vm->getResourceManager()->findResource(ResourceId(kResourceTypeVocab, 998), 0); + Resource *r = _vm->getResourceManager()->findResource(ResourceId(kResourceTypeVocab, 998), 0); // If the resource couldn't be loaded, leave if (!r) { @@ -450,7 +450,7 @@ bool Console::cmdOpcodes(int argc, const char **argv) { int len = READ_LE_UINT16(r->data + offset) - 2; int type = READ_LE_UINT16(r->data + offset + 2); // QFG3 has empty opcodes - Common::String name = len > 0 ? Common::String((char *)r->data + offset + 4, len) : "Dummy"; + Common::String name = len > 0 ? Common::String((const char *)r->data + offset + 4, len) : "Dummy"; DebugPrintf("%03x: %03x %20s | ", i, type, name.c_str()); if ((i % 3) == 2) DebugPrintf("\n"); @@ -769,7 +769,8 @@ bool Console::cmdHexgrep(int argc, const char **argv) { } for (; resNumber <= resMax; resNumber++) { - if ((script = _vm->getResourceManager()->findResource(ResourceId(restype, resNumber), 0))) { + script = _vm->getResourceManager()->findResource(ResourceId(restype, resNumber), 0); + if (script) { unsigned int seeker = 0, seekerold = 0; uint32 comppos = 0; int output_script_name = 0; @@ -1571,7 +1572,8 @@ bool Console::cmdIsSample(int argc, const char **argv) { return true; } - if ((data = songit->getAudioStream())) { + data = songit->getAudioStream(); + if (data) { // TODO /* DebugPrintf("\nIs sample (encoding %dHz/%s/%04x)", data->conf.rate, (data->conf.stereo) ? |