[Scummvm-git-logs] scummvm master -> 1c0cfe7af19f5773c050c96c9278da6666043dc7
aquadran
noreply at scummvm.org
Sat Aug 9 18:16:37 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
1c0cfe7af1 WINTERMUTE: Restore plugin methods in BaseSubSurface
Commit: 1c0cfe7af19f5773c050c96c9278da6666043dc7
https://github.com/scummvm/scummvm/commit/1c0cfe7af19f5773c050c96c9278da6666043dc7
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2025-08-09T20:16:32+02:00
Commit Message:
WINTERMUTE: Restore plugin methods in BaseSubSurface
Changed paths:
engines/wintermute/base/base_sub_frame.cpp
engines/wintermute/base/base_sub_frame.h
diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp
index e27f0623d0f..671c0a35b52 100644
--- a/engines/wintermute/base/base_sub_frame.cpp
+++ b/engines/wintermute/base/base_sub_frame.cpp
@@ -720,6 +720,59 @@ bool BaseSubFrame::setSurfaceSimple() {
}
}
+bool BaseSubFrame::startPixelOperations() {
+ if (_surface)
+ return _surface->startPixelOp();
+ else
+ return false;
+}
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseSubFrame::endPixelOperations() {
+ if (_surface)
+ return _surface->endPixelOp();
+ else
+ return false;
+}
+
+//////////////////////////////////////////////////////////////////////////
+uint32 BaseSubFrame::getPixel(int32 x, int32 y) {
+ if (_surface) {
+ byte r, g, b, a;
+ _surface->getPixel(x, y, &r, &g, &b, &a);
+ return BYTETORGBA(r, g, b, a);
+ } else
+ return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseSubFrame::putPixel(int32 x, int32 y, uint32 pixel) {
+ if (_surface) {
+ byte r = RGBCOLGetR(pixel);
+ byte g = RGBCOLGetG(pixel);
+ byte b = RGBCOLGetB(pixel);
+ byte a = RGBCOLGetA(pixel);
+ return _surface->putPixel(x, y, r, g, b, a);
+ } else
+ return false;
+}
+
+//////////////////////////////////////////////////////////////////////////
+int32 BaseSubFrame::getWidth() {
+ if (_surface)
+ return _surface->getWidth();
+ else
+ return 0;
+}
+
+//////////////////////////////////////////////////////////////////////////
+int32 BaseSubFrame::getHeight() {
+ if (_surface)
+ return _surface->getHeight();
+ else
+ return 0;
+}
+
Common::String BaseSubFrame::debuggerToString() const {
return Common::String::format("%p: BaseSubFrame \"%s\" - Mirror:(%d, %d), Hotspot:(%d, %d), ", (const void *)this, getName(), _mirrorX, _mirrorY, _hotspotX, _hotspotY);
}
diff --git a/engines/wintermute/base/base_sub_frame.h b/engines/wintermute/base/base_sub_frame.h
index 65303e213d6..6003e90053a 100644
--- a/engines/wintermute/base/base_sub_frame.h
+++ b/engines/wintermute/base/base_sub_frame.h
@@ -87,6 +87,13 @@ public:
const char *scToString() override;
Common::String debuggerToString() const override;
+ bool startPixelOperations();
+ bool endPixelOperations();
+ uint32 getPixel(int32 x, int32 y);
+ bool putPixel(int32 x, int32 y, uint32 pixel);
+ int32 getWidth();
+ int32 getHeight();
+
};
} // End of namespace Wintermute
More information about the Scummvm-git-logs
mailing list