From bc77c8534cd83b7102b1b80f86d32bc4d61b25f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Boutonn=C3=A9?= Date: Sat, 5 Feb 2011 14:07:30 +0000 Subject: [PATCH] HUGO: Fix 2 uninitialized variables svn-id: r55788 --- engines/hugo/display.cpp | 13 +++++++------ engines/hugo/intro.cpp | 6 ++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index 3ae0e8373f7..edf616a503d 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -45,6 +45,9 @@ namespace Hugo { Screen::Screen(HugoEngine *vm) : _vm(vm) { _mainPalette = 0; _curPalette = 0; + _dlAddIndex = 0; + _dlRestoreIndex = 0; + for (int i = 0; i < kNumFonts; i++) { _arrayFont[i] = 0; fontLoadedFl[i] = false; @@ -55,17 +58,15 @@ Screen::Screen(HugoEngine *vm) : _vm(vm) { _dlBlistList[i].dx = 0; _dlBlistList[i].dy = 0; } - for (int i = 0; i < kRectListSize; i++) { - _dlRestoreList[i].x = 0; - _dlRestoreList[i].y = 0; - _dlRestoreList[i].dx = 0; - _dlRestoreList[i].dy = 0; - } for (int i = 0; i < kRectListSize; i++) { _dlAddList[i].x = 0; _dlAddList[i].y = 0; _dlAddList[i].dx = 0; _dlAddList[i].dy = 0; + _dlRestoreList[i].x = 0; + _dlRestoreList[i].y = 0; + _dlRestoreList[i].dx = 0; + _dlRestoreList[i].dy = 0; } } diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp index 3a958a29887..73e6ab3e29b 100644 --- a/engines/hugo/intro.cpp +++ b/engines/hugo/intro.cpp @@ -64,6 +64,7 @@ void intro_v1d::introInit() { surf.pixels = _vm->_screen->getFrontBuffer(); surf.pitch = 320; surf.bytesPerPixel = 1; + _vm->_screen->displayList(kDisplayInit); } bool intro_v1d::introPlay() { @@ -206,6 +207,7 @@ void intro_v2d::preNewGame() { } void intro_v2d::introInit() { + _vm->_screen->displayList(kDisplayInit); _vm->_file->readBackground(_vm->_numScreens - 1); // display splash screen surf.w = 320; surf.h = 200; @@ -251,6 +253,7 @@ void intro_v3d::preNewGame() { } void intro_v3d::introInit() { + _vm->_screen->displayList(kDisplayInit); _vm->_file->readBackground(_vm->_numScreens - 1); // display splash screen surf.w = 320; surf.h = 200; @@ -365,9 +368,8 @@ void intro_v3w::preNewGame() { * Hugo 3 - show map and set up for introPlay() */ void intro_v3w::introInit() { - + _vm->_screen->displayList(kDisplayInit); _vm->_file->readBackground(_vm->_numScreens - 1); // display splash screen - _vm->_screen->displayBackground(); g_system->updateScreen(); g_system->delayMillis(3000);