[Scummvm-git-logs] scummvm master -> 105f5471e5b735e6d923235ff6e01e5b3c3b6ea3
OMGPizzaGuy
noreply at scummvm.org
Fri Nov 17 06:11:50 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
105f5471e5 ULTIMA8: Add more measures to avoid saving modal gumps
Commit: 105f5471e5b735e6d923235ff6e01e5b3c3b6ea3
https://github.com/scummvm/scummvm/commit/105f5471e5b735e6d923235ff6e01e5b3c3b6ea3
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2023-11-17T00:11:10-06:00
Commit Message:
ULTIMA8: Add more measures to avoid saving modal gumps
A closing but not yet deleted gump with FLAG_PREVENT_SAVE will not actually prevent save. Adding FLAG_DONT_SAVE to modal gumps and skip save of a gump with FLAG_CLOSE_AND_DEL should prevent this edge case. Fixes bug #14297
Changed paths:
engines/ultima/ultima8/gumps/gump.cpp
engines/ultima/ultima8/gumps/modal_gump.h
diff --git a/engines/ultima/ultima8/gumps/gump.cpp b/engines/ultima/ultima8/gumps/gump.cpp
index 42834af7f03..17ab61a5ab4 100644
--- a/engines/ultima/ultima8/gumps/gump.cpp
+++ b/engines/ultima/ultima8/gumps/gump.cpp
@@ -766,6 +766,10 @@ bool Gump::mustSave(bool toplevel) const {
if (_flags & FLAG_DONT_SAVE)
return false;
+ // don't save when ready for deletion
+ if (_flags & FLAG_CLOSE_AND_DEL)
+ return false;
+
if (toplevel) {
// don't save gumps with parents, unless parent is a core gump
if (_parent && !(_parent->_flags & FLAG_CORE_GUMP))
diff --git a/engines/ultima/ultima8/gumps/modal_gump.h b/engines/ultima/ultima8/gumps/modal_gump.h
index 9003eb01b30..45509bc7d8f 100644
--- a/engines/ultima/ultima8/gumps/modal_gump.h
+++ b/engines/ultima/ultima8/gumps/modal_gump.h
@@ -37,7 +37,7 @@ public:
ModalGump();
ModalGump(int x, int y, int width, int height, uint16 owner = 0,
- uint32 flags = FLAG_PREVENT_SAVE, int32 layer = LAYER_MODAL);
+ uint32 flags = FLAG_DONT_SAVE | FLAG_PREVENT_SAVE, int32 layer = LAYER_MODAL);
~ModalGump() override;
More information about the Scummvm-git-logs
mailing list