aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/vgagrafx.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-28 11:37:46 +0200
committerFilippos Karapetis2011-12-28 11:38:18 +0200
commitfe98fbe972b4d1a2942bdc8a784f8205ba32fbdd (patch)
treef35d66e107d9ab109c2a63715f3985623f9cbe81 /engines/dreamweb/vgagrafx.cpp
parent826769f8b8937f6d78c213d477a2a1b84be48b6a (diff)
downloadscummvm-rg350-fe98fbe972b4d1a2942bdc8a784f8205ba32fbdd.tar.gz
scummvm-rg350-fe98fbe972b4d1a2942bdc8a784f8205ba32fbdd.tar.bz2
scummvm-rg350-fe98fbe972b4d1a2942bdc8a784f8205ba32fbdd.zip
DREAMWEB: Move all zoom-related functions to vgagrafx.cpp, and remove a lot of unused global constants
Diffstat (limited to 'engines/dreamweb/vgagrafx.cpp')
-rw-r--r--engines/dreamweb/vgagrafx.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index ad5fd34d58..13defb46a2 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -26,6 +26,9 @@
namespace DreamGen {
+const uint16 kZoomx = 8;
+const uint16 kZoomy = 132;
+
void DreamBase::multiGet(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h) {
assert(x < 320);
assert(y < 200);
@@ -332,6 +335,35 @@ void DreamBase::clearWork() {
memset(workspace(), 0, 320*200);
}
+void DreamBase::dumpZoom() {
+ if (data.byte(kZoomon) == 1)
+ multiDump(kZoomx + 5, kZoomy + 4, 46, 40);
+}
+
+void DreamBase::crosshair() {
+ uint8 frame;
+ if ((_commandType != 3) && (_commandType < 10)) {
+ frame = 9;
+ } else {
+ frame = 29;
+ }
+ showFrame(_icons1, kZoomx + 24, kZoomy + 19, frame, 0);
+}
+
+void DreamBase::getUnderZoom() {
+ multiGet(_zoomSpace, kZoomx + 5, kZoomy + 4, 46, 40);
+}
+
+void DreamBase::putUnderZoom() {
+ multiPut(_zoomSpace, kZoomx + 5, kZoomy + 4, 46, 40);
+}
+
+void DreamBase::zoomIcon() {
+ if (data.byte(kZoomon) == 0)
+ return;
+ showFrame(_icons1, kZoomx, kZoomy-1, 8, 0);
+}
+
void DreamBase::zoom() {
if (data.word(kWatchingtime) != 0)
return;