aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/saga/actor.h20
-rw-r--r--engines/saga/font.h11
2 files changed, 29 insertions, 2 deletions
diff --git a/engines/saga/actor.h b/engines/saga/actor.h
index 8dc27c74be..4a8d6fbde7 100644
--- a/engines/saga/actor.h
+++ b/engines/saga/actor.h
@@ -437,7 +437,25 @@ struct SpeechData {
int playingTime;
SpeechData() {
- memset(this, 0, sizeof(*this));
+ for (uint i = 0; i < ACTOR_SPEECH_ACTORS_MAX; i++) {
+ speechColor[i] = 0;
+ outlineColor[i] = 0;
+ }
+ speechFlags = 0;
+ for (uint i = 0; i < ACTOR_SPEECH_ACTORS_MAX; i++) {
+ strings[i] = nullptr;
+ }
+ // speechBox is initialized by Rect constructor
+ // drawRect is initialized by Rect constructor
+ stringsCount = 0;
+ slowModeCharIndex = 0;
+ for (uint i = 0; i < ACTOR_SPEECH_ACTORS_MAX; i++) {
+ actorIds[i] = 0;
+ }
+ actorsCount = 0;
+ sampleResourceId = 0;
+ playing = false;
+ playingTime = 0;
}
FontEffectFlags getFontFlags(int i) {
diff --git a/engines/saga/font.h b/engines/saga/font.h
index e46468e816..6a483b2867 100644
--- a/engines/saga/font.h
+++ b/engines/saga/font.h
@@ -82,8 +82,17 @@ struct TextListEntry {
FontEffectFlags flags;
KnownFont font;
const char *text;
+
TextListEntry() {
- memset(this, 0, sizeof(*this));
+ display = false;
+ useRect = false;
+ // point initialized by Common::Point constructor
+ // rect initialized by Common::Rect constructor
+ knownColor = kKnownColorTransparent;
+ effectKnownColor = kKnownColorTransparent;
+ flags = kFontNormal;
+ font = kKnownFontSmall;
+ text = nullptr;
}
bool operator==(const TextListEntry &e) const {