aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/base_sub_frame.cpp
diff options
context:
space:
mode:
authorTobia Tesan2013-07-15 22:39:55 +0200
committerTobia Tesan2013-08-01 00:21:25 +0200
commitd2d72c0110e4e2c265fcc1413958540f182d4353 (patch)
tree0fc1f91e35c9b84498581ba3cd593ed2993f6d64 /engines/wintermute/base/base_sub_frame.cpp
parent63b8132ea3ec6fe6bcfcb43d1e0c9baf481eab1e (diff)
downloadscummvm-rg350-d2d72c0110e4e2c265fcc1413958540f182d4353.tar.gz
scummvm-rg350-d2d72c0110e4e2c265fcc1413958540f182d4353.tar.bz2
scummvm-rg350-d2d72c0110e4e2c265fcc1413958540f182d4353.zip
WINTERMUTE: #define to const for TransformStruct defaults
Diffstat (limited to 'engines/wintermute/base/base_sub_frame.cpp')
-rw-r--r--engines/wintermute/base/base_sub_frame.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp
index f8c4000324..7012c28feb 100644
--- a/engines/wintermute/base/base_sub_frame.cpp
+++ b/engines/wintermute/base/base_sub_frame.cpp
@@ -48,9 +48,9 @@ IMPLEMENT_PERSISTENT(BaseSubFrame, false)
//////////////////////////////////////////////////////////////////////////
BaseSubFrame::BaseSubFrame(BaseGame *inGame) : BaseScriptable(inGame, true) {
_surface = nullptr;
- _hotspotX = DEFAULT_HOTSPOT_X;
- _hotspotY = DEFAULT_HOTSPOT_Y;
- _alpha = DEFAULT_RGBAMOD;
+ _hotspotX = kDefaultHotspotX;
+ _hotspotY = kDefaultHotspotY;
+ _alpha = kDefaultRgbaMod;
_transparent = 0xFFFF00FF;
_wantsDefaultRect = false;
@@ -247,7 +247,7 @@ bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, fl
}
if (registerOwner != nullptr && !_decoration) {
- if (zoomX == DEFAULT_ZOOM_X && zoomY == DEFAULT_ZOOM_Y) {
+ if (zoomX == kDefaultZoomX && zoomY == kDefaultZoomY) {
BaseEngine::getRenderer()->addRectToList(new BaseActiveRect(_gameRef, registerOwner, this, x - _hotspotX + getRect().left, y - _hotspotY + getRect().top, getRect().right - getRect().left, getRect().bottom - getRect().top, zoomX, zoomY, precise));
} else {
BaseEngine::getRenderer()->addRectToList(new BaseActiveRect(_gameRef, registerOwner, this, (int)(x - (_hotspotX + getRect().left) * (zoomX / 100)), (int)(y - (_hotspotY + getRect().top) * (zoomY / 100)), (int)((getRect().right - getRect().left) * (zoomX / 100)), (int)((getRect().bottom - getRect().top) * (zoomY / 100)), zoomX, zoomY, precise));
@@ -260,11 +260,11 @@ bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, fl
bool res;
//if (Alpha==0xFFFFFFFF) Alpha = _alpha; // TODO: better (combine owner's and self alpha)
- if (_alpha != DEFAULT_RGBAMOD) {
+ if (_alpha != kDefaultRgbaMod) {
alpha = _alpha;
}
- if (rotate != DEFAULT_ANGLE) {
+ if (rotate != kDefaultAngle) {
Point32 boxOffset, rotatedHotspot, hotspotOffset, newOrigin;
Point32 origin(x, y);
Rect32 oldRect = getRect();
@@ -274,10 +274,10 @@ bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, fl
newOrigin = origin - newHotspot;
res = _surface->displayTransform(newOrigin.x, newOrigin.y, oldRect, newRect, transform);
} else {
- if (zoomX == DEFAULT_ZOOM_X && zoomY == DEFAULT_ZOOM_Y) {
+ if (zoomX == kDefaultZoomX && zoomY == kDefaultZoomY) {
res = _surface->displayTrans(x - _hotspotX, y - _hotspotY, getRect(), alpha, blendMode, _mirrorX, _mirrorY);
} else {
- res = _surface->displayTransZoom((int)(x - _hotspotX * (zoomX / DEFAULT_ZOOM_X)), (int)(y - _hotspotY * (zoomY / DEFAULT_ZOOM_Y)), getRect(), zoomX, zoomY, alpha, blendMode, _mirrorX, _mirrorY);
+ res = _surface->displayTransZoom((int)(x - _hotspotX * (zoomX / kDefaultZoomX)), (int)(y - _hotspotY * (zoomY / kDefaultZoomY)), getRect(), zoomX, zoomY, alpha, blendMode, _mirrorX, _mirrorY);
}
}