diff options
author | Paul Gilbert | 2012-11-25 20:18:38 +1100 |
---|---|---|
committer | Paul Gilbert | 2012-11-25 20:18:38 +1100 |
commit | f6a098bc4f804feb0708ab92b6f9f950d0ac5fdd (patch) | |
tree | cd3128971cdc863d8f91e9de870af2386e4c36e2 /engines | |
parent | cc9a0bbb6d428391a507c71947ae616677153673 (diff) | |
download | scummvm-rg350-f6a098bc4f804feb0708ab92b6f9f950d0ac5fdd.tar.gz scummvm-rg350-f6a098bc4f804feb0708ab92b6f9f950d0ac5fdd.tar.bz2 scummvm-rg350-f6a098bc4f804feb0708ab92b6f9f950d0ac5fdd.zip |
HOPKINS: Bugfix for intermittent crash when opening Save/Load dialog
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/font.cpp | 18 | ||||
-rw-r--r-- | engines/hopkins/font.h | 1 |
2 files changed, 7 insertions, 12 deletions
diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp index 64f39f9c9e..df9aa94458 100644 --- a/engines/hopkins/font.cpp +++ b/engines/hopkins/font.cpp @@ -32,23 +32,17 @@ namespace Hopkins { +FontManager::FontManager() { + clearAll(); +} + void FontManager::setParent(HopkinsEngine *vm) { _vm = vm; } void FontManager::clearAll() { - for (int idx = 0; idx < 11; ++idx) { - Txt[idx].textOn = false; - Txt[idx].lineCount = 0; - Txt[idx].field3FC = 0; - Txt[idx].field3FE = 0; - Txt[idx].textBlock = NULL; - Txt[idx].width = 0; - Txt[idx].height = 0; - Txt[idx].textLoaded = false; - - ListeTxt[idx].enabled = false; - } + for (int idx = 0; idx < 11; ++idx) + Common::fill((byte *)&Txt[idx], (byte *)&Txt[idx] + sizeof(TxtItem), 0); } // Text On diff --git a/engines/hopkins/font.h b/engines/hopkins/font.h index a2ae88a028..08b32377a7 100644 --- a/engines/hopkins/font.h +++ b/engines/hopkins/font.h @@ -71,6 +71,7 @@ public: int Index[4048]; byte *texte_tmp; public: + FontManager(); void setParent(HopkinsEngine *vm); void clearAll(); |