diff options
| author | Arnaud Boutonné | 2010-09-17 22:40:53 +0000 |
|---|---|---|
| committer | Arnaud Boutonné | 2010-09-17 22:40:53 +0000 |
| commit | 1e9e8cd64a97ade7d8f9ff891e511d47b98da70d (patch) | |
| tree | 6c6ab680cfd943bb6915536a64bfe3eae09d09cb /engines/hugo/hugo.cpp | |
| parent | 99cc8051816fca07a185d1b2612271ff04098d65 (diff) | |
| download | scummvm-rg350-1e9e8cd64a97ade7d8f9ff891e511d47b98da70d.tar.gz scummvm-rg350-1e9e8cd64a97ade7d8f9ff891e511d47b98da70d.tar.bz2 scummvm-rg350-1e9e8cd64a97ade7d8f9ff891e511d47b98da70d.zip | |
HUGO: Fix crash in the first screen of H1 Dos
- Fix crash in the first screen of H1 Dos
- Clean up
svn-id: r52787
Diffstat (limited to 'engines/hugo/hugo.cpp')
| -rw-r--r-- | engines/hugo/hugo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 80ae532cf9..9f6a933bbe 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -67,6 +67,9 @@ HugoEngine::HugoEngine(OSystem *syst, const HugoGameDescription *gd) : Engine(sy DebugMan.addDebugChannel(kDebugFile, "File", "File IO debug level"); DebugMan.addDebugChannel(kDebugRoute, "Route", "Route debug level"); DebugMan.addDebugChannel(kDebugInventory, "Inventory", "Inventory debug level"); + + for (int j = 0; j < NUM_FONTS; j++) + _arrayFont[j] = 0; } HugoEngine::~HugoEngine() { @@ -258,7 +261,7 @@ Common::Error HugoEngine::run() { } void HugoEngine::initMachine() { - if (_gameVariant == 3) + if (_gameVariant == kGameVariantH1Dos) readScreenFiles(0); else file().readBackground(_numScreens - 1); // Splash screen @@ -1349,9 +1352,6 @@ bool HugoEngine::loadHugoDat() { _alNewscrIndex = numElem; } - for (int j = 0; j < NUM_FONTS; j++) - _arrayFont[j] = 0; - if (_gameVariant > 2) { _arrayFontSize[0] = in.readUint16BE(); _arrayFont[0] = (byte *)malloc(sizeof(byte) * _arrayFontSize[0]); |
