aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/detection.cpp2
-rw-r--r--engines/kyra/lol.cpp2
-rw-r--r--engines/kyra/screen_lok.cpp2
-rw-r--r--engines/kyra/script.cpp7
-rw-r--r--engines/kyra/script_tim.cpp2
-rw-r--r--engines/kyra/sequences_lol.cpp2
-rw-r--r--engines/kyra/sound_towns.cpp6
-rw-r--r--engines/kyra/text.cpp2
-rw-r--r--engines/kyra/vqa.cpp9
-rw-r--r--engines/kyra/wsamovie.cpp5
10 files changed, 30 insertions, 9 deletions
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index 93845c7c09..002f9dee09 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -1326,7 +1326,7 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const {
Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++) {
+ for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
int slotNum = atoi(file->c_str() + file->size() - 3);
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index f0367a39a4..7b4e2343dd 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -2485,7 +2485,7 @@ int LoLEngine::processMagicFireball(int charNum, int spellLevel) {
numFireballs = fbCnt - 3;
FireballState *fireballState[3];
- memset(fireballState, 0, sizeof(fireballState));
+ memset(&fireballState, 0, sizeof(fireballState));
for (i = 0; i < numFireballs; i++)
fireballState[i] = new FireballState(i);
diff --git a/engines/kyra/screen_lok.cpp b/engines/kyra/screen_lok.cpp
index da82ec947b..553c49de29 100644
--- a/engines/kyra/screen_lok.cpp
+++ b/engines/kyra/screen_lok.cpp
@@ -33,6 +33,8 @@ namespace Kyra {
Screen_LoK::Screen_LoK(KyraEngine_LoK *vm, OSystem *system)
: Screen(vm, system) {
_vm = vm;
+ _unkPtr1 = _unkPtr2 = 0;
+ _bitBlitNum = 0;
}
Screen_LoK::~Screen_LoK() {
diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp
index 87e3456934..9a2f2fa73f 100644
--- a/engines/kyra/script.cpp
+++ b/engines/kyra/script.cpp
@@ -34,7 +34,7 @@
#include "kyra/script.h"
namespace Kyra {
-EMCInterpreter::EMCInterpreter(KyraEngine_v1 *vm) : _vm(vm) {
+EMCInterpreter::EMCInterpreter(KyraEngine_v1 *vm) : _vm(vm), _scriptData(0), _filename(0) {
#define OPCODE(x) { &EMCInterpreter::x, #x }
static const OpcodeEntry opcodes[] = {
// 0x00
@@ -106,7 +106,7 @@ bool EMCInterpreter::load(const char *filename, EMCData *scriptData, const Commo
Common::SeekableReadStream *stream = _vm->resource()->createReadStream(filename);
if (!stream) {
error("Couldn't open script file '%s'", filename);
- return false; // for compilers that don't support NORETURN
+ return false; // for compilers that don't support NORETURN
}
memset(scriptData, 0, sizeof(EMCData));
@@ -134,6 +134,9 @@ bool EMCInterpreter::load(const char *filename, EMCData *scriptData, const Commo
strncpy(_scriptData->filename, filename, 13);
_scriptData->filename[12] = 0;
+ _scriptData = 0;
+ _filename = 0;
+
return true;
}
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index ae4ae04e92..1c928a1e6c 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -105,6 +105,7 @@ TIMInterpreter::TIMInterpreter(KyraEngine_v1 *engine, Screen_v2 *screen_v2, OSys
_palDelayInc = _palDiff = _palDelayAcc = 0;
_abortFlag = 0;
+ _tim = 0;
}
TIMInterpreter::~TIMInterpreter() {
@@ -185,6 +186,7 @@ TIM *TIMInterpreter::load(const char *filename, const Common::Array<const TIMOpc
_tim->isLoLOutro = (_vm->gameFlags().gameID == GI_LOL) && !scumm_stricmp(filename, "LOLFINAL.TIM");
_tim->lolCharacter = 0;
+ _tim = 0;
return _tim;
}
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index da32c3a8e6..3521d30b3e 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -1233,7 +1233,7 @@ void LoLEngine::processCredits(char *t, int dimState, int page, int delayTime) {
int curShapeFile = 0;
uint8 *shapes[12];
- memset(shapes, 0, sizeof(shapes));
+ memset(&shapes, 0, sizeof(shapes));
loadOutroShapes(curShapeFile++, shapes);
uint8 *monsterPal = 0;
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 32be4dd79e..16ba24a5d4 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -33,7 +33,7 @@
#include "common/util.h"
-#define EUPHONY_FADEOUT_TICKS 600
+#define EUPHONY_FADEOUT_TICKS 600
namespace Kyra {
@@ -987,7 +987,7 @@ Towns_EuphonyTrackQueue::Towns_EuphonyTrackQueue(Towns_EuphonyDriver * driver, T
}
void Towns_EuphonyTrackQueue::setPlayBackStatus(bool playing) {
- Towns_EuphonyTrackQueue * i = this;
+ Towns_EuphonyTrackQueue *i = this;
do {
i->_playing = playing;
i = i->_next;
@@ -1013,7 +1013,7 @@ void Towns_EuphonyTrackQueue::loadDataToEndOfQueue(uint8 * trackdata, uint32 siz
return;
}
- Towns_EuphonyTrackQueue * i = this;
+ Towns_EuphonyTrackQueue *i = this;
while (i->_next)
i = i->_next;
diff --git a/engines/kyra/text.cpp b/engines/kyra/text.cpp
index 01ed5ca0e6..09f952f67e 100644
--- a/engines/kyra/text.cpp
+++ b/engines/kyra/text.cpp
@@ -42,6 +42,8 @@ TextDisplayer::TextDisplayer(KyraEngine_v1 *vm, Screen *screen) {
_talkMessageY = 0xC;
_talkMessageH = 0;
_talkMessagePrinted = false;
+ memset(_talkSubstrings, 0, sizeof(_talkSubstrings));
+ memset(_talkBuffer, 0, sizeof(_talkBuffer));
}
void TextDisplayer::setTalkCoords(uint16 y) {
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp
index 2011135adf..1b9683ed65 100644
--- a/engines/kyra/vqa.cpp
+++ b/engines/kyra/vqa.cpp
@@ -50,6 +50,15 @@ VQAMovie::VQAMovie(KyraEngine_v1 *vm, OSystem *system) {
_screen = _vm->screen();
_opened = false;
_x = _y = _drawPage = -1;
+ _frame = 0;
+ _vectorPointers = 0;
+ _numPartialCodeBooks = 0;
+ _partialCodeBookSize = 0;
+ _compressedCodeBook = 0;
+ _partialCodeBook = 0;
+ _codeBook = 0;
+ _frameInfo = 0;
+ memset(_buffers, 0, sizeof(_buffers));
}
VQAMovie::~VQAMovie() {
diff --git a/engines/kyra/wsamovie.cpp b/engines/kyra/wsamovie.cpp
index 05c4ca7747..c9536484a3 100644
--- a/engines/kyra/wsamovie.cpp
+++ b/engines/kyra/wsamovie.cpp
@@ -35,7 +35,10 @@
#include "kyra/resource.h"
namespace Kyra {
-WSAMovie_v1::WSAMovie_v1(KyraEngine_v1 *vm) : Movie(vm) {}
+WSAMovie_v1::WSAMovie_v1(KyraEngine_v1 *vm)
+ : Movie(vm), _frameData(0), _frameOffsTable(0), _offscreenBuffer(0), _deltaBuffer(0) {
+}
+
WSAMovie_v1::~WSAMovie_v1() { close(); }
int WSAMovie_v1::open(const char *filename, int offscreenDecode, Palette *palBuf) {