aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/surface.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-09-13 12:22:31 -0400
committerPaul Gilbert2015-09-13 12:22:31 -0400
commitbb01b27777bea9531cae117659d14d3d33f44c8a (patch)
tree3e04c6c399b623cd206c38f140ef955c62de7a60 /engines/sherlock/surface.cpp
parentdce5c96cc22ab406e371d7313a26d6d77e25187f (diff)
downloadscummvm-rg350-bb01b27777bea9531cae117659d14d3d33f44c8a.tar.gz
scummvm-rg350-bb01b27777bea9531cae117659d14d3d33f44c8a.tar.bz2
scummvm-rg350-bb01b27777bea9531cae117659d14d3d33f44c8a.zip
SHERLOCK: 3DO: Implementing high-resolution mode for 3DO version
This will allow us to play the portrait movies at full resolution, and better display the fonts, which dont look good at low resolution
Diffstat (limited to 'engines/sherlock/surface.cpp')
-rw-r--r--engines/sherlock/surface.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/sherlock/surface.cpp b/engines/sherlock/surface.cpp
index 2090a334a1..d7d5cd95e8 100644
--- a/engines/sherlock/surface.cpp
+++ b/engines/sherlock/surface.cpp
@@ -211,23 +211,23 @@ void Surface::fillRect(const Common::Rect &r, uint color) {
}
void Surface::fill(uint color) {
- _surface.fillRect(Common::Rect(_surface.w, _surface.h), color);
+ fillRect(Common::Rect(_surface.w, _surface.h), color);
}
bool Surface::clip(Common::Rect &srcBounds, Common::Rect &destBounds) {
- if (destBounds.left >= _surface.w || destBounds.top >= _surface.h ||
+ if (destBounds.left >= w() || destBounds.top >= h() ||
destBounds.right <= 0 || destBounds.bottom <= 0)
return false;
// Clip the bounds if necessary to fit on-screen
- if (destBounds.right > _surface.w) {
- srcBounds.right -= destBounds.right - _surface.w;
- destBounds.right = _surface.w;
+ if (destBounds.right > w()) {
+ srcBounds.right -= destBounds.right - w();
+ destBounds.right = w();
}
- if (destBounds.bottom > _surface.h) {
- srcBounds.bottom -= destBounds.bottom - _surface.h;
- destBounds.bottom = _surface.h;
+ if (destBounds.bottom > h()) {
+ srcBounds.bottom -= destBounds.bottom - h();
+ destBounds.bottom = h();
}
if (destBounds.top < 0) {
@@ -244,7 +244,7 @@ bool Surface::clip(Common::Rect &srcBounds, Common::Rect &destBounds) {
}
void Surface::clear() {
- fillRect(Common::Rect(0, 0, _surface.w, _surface.h), 0);
+ fillRect(Common::Rect(0, 0, w(), h()), 0);
}
void Surface::free() {