aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/agos.h13
-rw-r--r--engines/agos/vga.cpp2
2 files changed, 13 insertions, 2 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 551df6e19b..2874c3378a 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -132,7 +132,18 @@ struct VgaSprite {
uint16 priority;
uint16 windowNum;
uint16 zoneNum;
- VgaSprite() { memset(this, 0, sizeof(*this)); }
+ VgaSprite() { reset(); }
+
+ void reset() {
+ id = 0;
+ image = 0;
+ palette = 0;
+ x = y = 0;
+ flags = 0;
+ priority = 0;
+ windowNum = 0;
+ zoneNum = 0;
+ }
};
struct VgaSleepStruct {
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index 2a675bf6e8..7926f7f4fe 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -1083,7 +1083,7 @@ void AGOSEngine::vc27_resetSprite() {
_lastVgaWaitFor = 0;
- memset(&bak, 0, sizeof(bak));
+ bak.reset();
vsp = _vgaSprites;
while (vsp->id) {