aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/lzw.cpp1
-rw-r--r--engines/agi/picture.cpp2
-rw-r--r--engines/agi/preagi_mickey.cpp6
-rw-r--r--engines/agi/preagi_mickey.h6
-rw-r--r--engines/agi/sound.cpp1
-rw-r--r--engines/agi/sound_2gs.h1
-rw-r--r--engines/agi/sound_sarien.cpp1
-rw-r--r--engines/agi/text.cpp2
-rw-r--r--engines/agi/view.h2
9 files changed, 16 insertions, 6 deletions
diff --git a/engines/agi/lzw.cpp b/engines/agi/lzw.cpp
index bf41e1f3b4..ecb69543d7 100644
--- a/engines/agi/lzw.cpp
+++ b/engines/agi/lzw.cpp
@@ -72,6 +72,7 @@ LZWDecoder::LZWDecoder() {
appendCharacter = (uint8 *)malloc(TABLE_SIZE * sizeof(uint8));
inputBitCount = 0; // Number of bits in input bit buffer
inputBitBuffer = 0L;
+ BITS = MAX_VALUE = MAX_CODE = 0;
}
LZWDecoder::~LZWDecoder() {
diff --git a/engines/agi/picture.cpp b/engines/agi/picture.cpp
index a80e811f44..2b3bba89db 100644
--- a/engines/agi/picture.cpp
+++ b/engines/agi/picture.cpp
@@ -44,6 +44,8 @@ PictureMgr::PictureMgr(AgiBase *agi, GfxMgr *gfx) {
_minCommand = 0xf0;
_flags = 0;
_currentStep = 0;
+
+ _width = _height = 0;
}
void PictureMgr::putVirtPixel(int x, int y) {
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index e1545cdb68..0584aab683 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -255,7 +255,7 @@ bool MickeyEngine::checkMenu() {
return parse(menu.cmd[iSel0].data[iSel1], menu.arg[iSel0].data[iSel1]);
}
-void MickeyEngine::drawMenu(MSA_MENU menu, int sel0, int sel1) {
+void MickeyEngine::drawMenu(MSA_MENU &menu, int sel0, int sel1) {
int iWord;
int iRow;
int sel;
@@ -286,7 +286,7 @@ void MickeyEngine::drawMenu(MSA_MENU menu, int sel0, int sel1) {
_gfx->updateScreen();
}
-void MickeyEngine::getMouseMenuSelRow(MSA_MENU menu, int *sel0, int *sel1, int iRow, int x, int y) {
+void MickeyEngine::getMouseMenuSelRow(MSA_MENU &menu, int *sel0, int *sel1, int iRow, int x, int y) {
int iWord;
int *sel = 0;
@@ -313,7 +313,7 @@ void MickeyEngine::getMouseMenuSelRow(MSA_MENU menu, int *sel0, int *sel1, int i
}
}
-bool MickeyEngine::getMenuSelRow(MSA_MENU menu, int *sel0, int *sel1, int iRow) {
+bool MickeyEngine::getMenuSelRow(MSA_MENU &menu, int *sel0, int *sel1, int iRow) {
Common::Event event;
int *sel = 0;
int nWords;
diff --git a/engines/agi/preagi_mickey.h b/engines/agi/preagi_mickey.h
index 81565d3982..066880d324 100644
--- a/engines/agi/preagi_mickey.h
+++ b/engines/agi/preagi_mickey.h
@@ -710,9 +710,9 @@ protected:
void printExeMsg(int);
void printDesc(int);
bool checkMenu();
- void drawMenu(MSA_MENU, int, int);
- void getMouseMenuSelRow(MSA_MENU, int *, int *, int, int, int);
- bool getMenuSelRow(MSA_MENU, int *, int *, int);
+ void drawMenu(MSA_MENU &, int, int);
+ void getMouseMenuSelRow(MSA_MENU &, int *, int *, int, int, int);
+ bool getMenuSelRow(MSA_MENU &, int *, int *, int);
void getMenuSel(char *, int *, int *);
void centerMenu(MSA_MENU *);
void patchMenu(MSA_MENU *);
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index 8834068ace..2c1eb021f9 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -193,6 +193,7 @@ SoundMgr::SoundMgr(AgiBase *agi, Audio::Mixer *pMixer) {
_playingSound = -1;
switch (_vm->_soundemu) {
+ default:
case SOUND_EMU_NONE:
case SOUND_EMU_AMIGA:
case SOUND_EMU_MAC:
diff --git a/engines/agi/sound_2gs.h b/engines/agi/sound_2gs.h
index a7a23f5b06..49a375cdbc 100644
--- a/engines/agi/sound_2gs.h
+++ b/engines/agi/sound_2gs.h
@@ -126,6 +126,7 @@ public:
memset(&osc, 0, sizeof(osc));
seg = 0;
a = 0;
+ velocity = 0;
}
const IIgsInstrumentHeader *curInstrument; ///< Currently used instrument
diff --git a/engines/agi/sound_sarien.cpp b/engines/agi/sound_sarien.cpp
index 1b3542b89c..3e44546688 100644
--- a/engines/agi/sound_sarien.cpp
+++ b/engines/agi/sound_sarien.cpp
@@ -74,6 +74,7 @@ SoundGenSarien::SoundGenSarien(AgiBase *vm, Audio::Mixer *pMixer) : SoundGen(vm,
_useChorus = true; // FIXME: Currently always true?
switch (_vm->_soundemu) {
+ default:
case SOUND_EMU_NONE:
_waveform = waveformRamp;
_env = true;
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 274a654547..4aa42ffec3 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -39,6 +39,8 @@ TextMgr::TextMgr(AgiEngine *vm, Words *words, GfxMgr *gfx) {
_words = words;
_gfx = gfx;
+ _systemUI = NULL;
+
memset(&_messageState, 0, sizeof(_messageState));
_textPos.row = 0;
_textPos.column = 0;
diff --git a/engines/agi/view.h b/engines/agi/view.h
index e59916da78..adcf7dd1b3 100644
--- a/engines/agi/view.h
+++ b/engines/agi/view.h
@@ -132,6 +132,8 @@ struct ScreenObjEntry {
uint8 wander_count;
// end of motion related variables
uint8 loop_flag;
+
+ ScreenObjEntry() { memset(this, 0, sizeof(ScreenObjEntry)); }
}; // struct vt_entry
} // End of namespace Agi