[Scummvm-cvs-logs] scummvm master -> 9aac0bdaaa03dfba9ef2a631fd80fca11cb1ac41
bluegr
bluegr at gmail.com
Fri Feb 19 01:44:52 CET 2016
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
62ae61dd22 SCI: Silence false positive warnings by MSVC
52f11b1357 SCI: Use proper constification in overriden base class functions
b9430d7c72 GRAPHICS: Silence some false positive MSVC warnings
9aac0bdaaa SCI: Compare offsets in the Plane comparison operator
Commit: 62ae61dd221ee83b13d6fea82e39de69cc08c2fc
https://github.com/scummvm/scummvm/commit/62ae61dd221ee83b13d6fea82e39de69cc08c2fc
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-02-19T02:36:12+02:00
Commit Message:
SCI: Silence false positive warnings by MSVC
Changed paths:
engines/sci/engine/kgraphics32.cpp
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index f6b0074..85518ba 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -180,8 +180,8 @@ reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) {
int16 subop = argv[0].toUint16();
- int16 width;
- int16 height;
+ int16 width = 0;
+ int16 height = 0;
reg_t object;
if (subop == 0) {
Commit: 52f11b13578d4e3f6bc399d32e91b2b056f0831e
https://github.com/scummvm/scummvm/commit/52f11b13578d4e3f6bc399d32e91b2b056f0831e
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-02-19T02:37:35+02:00
Commit Message:
SCI: Use proper constification in overriden base class functions
Changed paths:
engines/sci/graphics/celobj32.h
diff --git a/engines/sci/graphics/celobj32.h b/engines/sci/graphics/celobj32.h
index 2e1b425..1877099 100644
--- a/engines/sci/graphics/celobj32.h
+++ b/engines/sci/graphics/celobj32.h
@@ -571,8 +571,8 @@ public:
* Block fills the target buffer with the cel colour.
*/
void draw(Buffer &target, const Common::Rect &targetRect) const;
- virtual void draw(Buffer &target, const ScreenItem &screenItem, const Common::Rect &targetRect, bool mirrorX) override;
- virtual void draw(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition, bool mirrorX) override;
+ virtual void draw(Buffer &target, const ScreenItem &screenItem, const Common::Rect &targetRect, const bool mirrorX) override;
+ virtual void draw(Buffer &target, const Common::Rect &targetRect, const Common::Point &scaledPosition, const bool mirrorX) override;
virtual CelObjColor *duplicate() const override;
virtual byte *getResPointer() const override;
Commit: b9430d7c727d7c1edb865e962b8ea862e6a84ab0
https://github.com/scummvm/scummvm/commit/b9430d7c727d7c1edb865e962b8ea862e6a84ab0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-02-19T02:38:30+02:00
Commit Message:
GRAPHICS: Silence some false positive MSVC warnings
Changed paths:
graphics/primitives.cpp
diff --git a/graphics/primitives.cpp b/graphics/primitives.cpp
index c9fca83..ac1c58b 100644
--- a/graphics/primitives.cpp
+++ b/graphics/primitives.cpp
@@ -258,7 +258,7 @@ void drawRoundRect(Common::Rect &rect, int arc, int color, bool filled, void (*p
int dy = rect.height() - arc * 2;
int r = arc;
int stop = 0;
- int lastx, lasty;
+ int lastx = 0, lasty = 0;
if (dy < 0)
stop = -dy / 2;
@@ -303,7 +303,7 @@ void drawRoundRect(Common::Rect &rect, int arc, int color, bool filled, void (*p
int dx = rect.width() - arc * 2;
int r = arc;
int stop = 0;
- int lastx, lasty;
+ int lastx = 0, lasty = 0;
if (dx < 0)
stop = -dx / 2;
Commit: 9aac0bdaaa03dfba9ef2a631fd80fca11cb1ac41
https://github.com/scummvm/scummvm/commit/9aac0bdaaa03dfba9ef2a631fd80fca11cb1ac41
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-02-19T02:43:55+02:00
Commit Message:
SCI: Compare offsets in the Plane comparison operator
Fixes a crash in the first scene of Torin's Passage
Changed paths:
engines/sci/graphics/plane32.h
diff --git a/engines/sci/graphics/plane32.h b/engines/sci/graphics/plane32.h
index a68700a..8eec417 100644
--- a/engines/sci/graphics/plane32.h
+++ b/engines/sci/graphics/plane32.h
@@ -258,7 +258,13 @@ public:
// other future conflicts with script-generated planes then we need
// to come up with a solution that works, similar to
// reg_t::pointerComparisonWithInteger used by SCI16.
- return _priority < other._priority || (_priority == other._priority && _priority > -1 && _object < other._object);
+ //
+ // For now, we check the object offsets, as this will likely work
+ // like in the original SCI engine, without comparing objects.
+ // However, this whole comparison is quite ugly, and if it still
+ // fails, we should try to change it to something equivalent, to avoid
+ // adding loads of workarounds just for this
+ return _priority < other._priority || (_priority == other._priority && _priority > -1 && _object.getOffset() < other._object.getOffset());
}
/**
More information about the Scummvm-git-logs
mailing list