[Scummvm-git-logs] scummvm master -> a6844cc4c68c5a973e331173a24fb37d80b7a100
aquadran
noreply at scummvm.org
Sun Aug 10 18:02:47 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:
a6844cc4c6 WINTERMUTE: Synced code placement with original
Commit: a6844cc4c68c5a973e331173a24fb37d80b7a100
https://github.com/scummvm/scummvm/commit/a6844cc4c68c5a973e331173a24fb37d80b7a100
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2025-08-10T20:02:42+02:00
Commit Message:
WINTERMUTE: Synced code placement with original
Changed paths:
engines/wintermute/base/gfx/base_renderer.cpp
diff --git a/engines/wintermute/base/gfx/base_renderer.cpp b/engines/wintermute/base/gfx/base_renderer.cpp
index fbe342a472f..89090c9c169 100644
--- a/engines/wintermute/base/gfx/base_renderer.cpp
+++ b/engines/wintermute/base/gfx/base_renderer.cpp
@@ -87,6 +87,98 @@ void BaseRenderer::initLoop() {
deleteRectList();
}
+//////////////////////////////////////////////////////////////////////
+BaseObject *BaseRenderer::getObjectAt(int x, int y) {
+ Point32 point;
+ point.x = x;
+ point.y = y;
+
+ for (int32 i = (int32)_rectList.getSize() - 1; i >= 0; i--) {
+ if (BasePlatform::ptInRect(&_rectList[i]->_rect, point)) {
+ if (_rectList[i]->_precise) {
+ // frame
+ if (_rectList[i]->_frame) {
+ int xx = (int)((_rectList[i]->_frame->getRect().left + x - _rectList[i]->_rect.left + _rectList[i]->_offsetX) / (float)((float)_rectList[i]->_zoomX / (float)100));
+ int yy = (int)((_rectList[i]->_frame->getRect().top + y - _rectList[i]->_rect.top + _rectList[i]->_offsetY) / (float)((float)_rectList[i]->_zoomY / (float)100));
+
+ if (_rectList[i]->_frame->_mirrorX) {
+ int width = _rectList[i]->_frame->getRect().right - _rectList[i]->_frame->getRect().left;
+ xx = width - xx;
+ }
+
+ if (_rectList[i]->_frame->_mirrorY) {
+ int height = _rectList[i]->_frame->getRect().bottom - _rectList[i]->_frame->getRect().top;
+ yy = height - yy;
+ }
+
+ if (!_rectList[i]->_frame->_surface->isTransparentAt(xx, yy)) {
+ return _rectList[i]->_owner;
+ }
+ }
+
+#ifdef ENABLE_WME3D
+ if (_rectList[i]->_xmodel) {
+ if (!_rectList[i]->_xmodel->isTransparentAt(x, y)) {
+ return _rectList[i]->_owner;
+ }
+ }
+#endif
+ // region
+ else if (_rectList[i]->_region) {
+ if (_rectList[i]->_region->pointInRegion(x + _rectList[i]->_offsetX, y + _rectList[i]->_offsetY)) {
+ return _rectList[i]->_owner;
+ }
+ }
+ } else {
+ return _rectList[i]->_owner;
+ }
+ }
+ }
+
+ return (BaseObject *)nullptr;
+}
+
+//////////////////////////////////////////////////////////////////////////
+void BaseRenderer::deleteRectList() {
+ for (uint32 i = 0; i < _rectList.getSize(); i++) {
+ delete _rectList[i];
+ }
+ _rectList.removeAll();
+}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
+bool BaseRenderer::initRenderer(int width, int height, bool windowed) {
+ return STATUS_FAILED;
+}
+
+//////////////////////////////////////////////////////////////////////
+void BaseRenderer::onWindowChange() {
+}
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseRenderer::windowedBlt() {
+ return STATUS_FAILED;
+}
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseRenderer::setup2D(bool Force) {
+ return STATUS_FAILED;
+}
+
+#ifdef ENABLE_WME3D
+//////////////////////////////////////////////////////////////////////////
+bool BaseRenderer::setup3D(Camera3D *camera, bool force) {
+ return STATUS_FAILED;
+}
+#endif
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseRenderer::fillRect(int x, int y, int w, int h, uint32 color) {
+ return STATUS_FAILED;
+}
+
+//////////////////////////////////////////////////////////////////////////
void BaseRenderer::initIndicator() {
if (_indicatorY == -1) {
_indicatorY = _height - _indicatorHeight;
@@ -183,102 +275,12 @@ void BaseRenderer::persistSaveLoadImages(BasePersistenceManager *persistMgr) {
persistMgr->transferSint32(TMEMBER(_loadImageY));
}
-//////////////////////////////////////////////////////////////////////
-BaseObject *BaseRenderer::getObjectAt(int x, int y) {
- Point32 point;
- point.x = x;
- point.y = y;
-
- for (int i = _rectList.getSize() - 1; i >= 0; i--) {
- if (BasePlatform::ptInRect(&_rectList[i]->_rect, point)) {
- if (_rectList[i]->_precise) {
- // frame
- if (_rectList[i]->_frame) {
- int xx = (int)((_rectList[i]->_frame->getRect().left + x - _rectList[i]->_rect.left + _rectList[i]->_offsetX) / (float)((float)_rectList[i]->_zoomX / (float)100));
- int yy = (int)((_rectList[i]->_frame->getRect().top + y - _rectList[i]->_rect.top + _rectList[i]->_offsetY) / (float)((float)_rectList[i]->_zoomY / (float)100));
-
- if (_rectList[i]->_frame->_mirrorX) {
- int width = _rectList[i]->_frame->getRect().right - _rectList[i]->_frame->getRect().left;
- xx = width - xx;
- }
-
- if (_rectList[i]->_frame->_mirrorY) {
- int height = _rectList[i]->_frame->getRect().bottom - _rectList[i]->_frame->getRect().top;
- yy = height - yy;
- }
-
- if (!_rectList[i]->_frame->_surface->isTransparentAt(xx, yy)) {
- return _rectList[i]->_owner;
- }
- }
-
-#ifdef ENABLE_WME3D
- if (_rectList[i]->_xmodel) {
- if (!_rectList[i]->_xmodel->isTransparentAt(x, y)) {
- return _rectList[i]->_owner;
- }
- }
-#endif
- // region
- else if (_rectList[i]->_region) {
- if (_rectList[i]->_region->pointInRegion(x + _rectList[i]->_offsetX, y + _rectList[i]->_offsetY)) {
- return _rectList[i]->_owner;
- }
- }
- } else {
- return _rectList[i]->_owner;
- }
- }
- }
-
- return (BaseObject *)nullptr;
-}
-
//////////////////////////////////////////////////////////////////////////
-void BaseRenderer::deleteRectList() {
- for (uint32 i = 0; i < _rectList.getSize(); i++) {
- delete _rectList[i];
- }
- _rectList.removeAll();
-}
-
-//////////////////////////////////////////////////////////////////////
-bool BaseRenderer::initRenderer(int width, int height, bool windowed) {
- return STATUS_FAILED;
-}
-
-//////////////////////////////////////////////////////////////////////
-void BaseRenderer::onWindowChange() {
-}
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseRenderer::windowedBlt() {
- return STATUS_FAILED;
-}
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseRenderer::setup2D(bool Force) {
- return STATUS_FAILED;
-}
-
-#ifdef ENABLE_WME3D
-//////////////////////////////////////////////////////////////////////////
-bool BaseRenderer::setup3D(Camera3D *camera, bool force) {
- return STATUS_FAILED;
-}
-#endif
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseRenderer::fillRect(int x, int y, int w, int h, uint32 color) {
- return STATUS_FAILED;
-}
-
//////////////////////////////////////////////////////////////////////////
bool BaseRenderer::setViewport(int left, int top, int right, int bottom) {
return STATUS_FAILED;
}
-
//////////////////////////////////////////////////////////////////////////
bool BaseRenderer::setScreenViewport() {
return setViewport(_drawOffsetX, _drawOffsetY, _width + _drawOffsetX, _height + _drawOffsetY);
More information about the Scummvm-git-logs
mailing list