aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-28 11:37:46 +0200
committerFilippos Karapetis2011-12-28 11:38:18 +0200
commitfe98fbe972b4d1a2942bdc8a784f8205ba32fbdd (patch)
treef35d66e107d9ab109c2a63715f3985623f9cbe81
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
-rwxr-xr-xdevtools/tasmrecover/tasm-recover13
-rw-r--r--engines/dreamweb/backdrop.cpp4
-rw-r--r--engines/dreamweb/dreamgen.h13
-rw-r--r--engines/dreamweb/stubs.cpp29
-rw-r--r--engines/dreamweb/vgagrafx.cpp32
5 files changed, 47 insertions, 44 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 51e7ce99a9..856b11ccb1 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -500,6 +500,19 @@ p = parser(skip_binary_data = [
'maplen',
'maplength',
'undertimedysize',
+ 'blocktextdat',
+ 'personframes',
+ 'map',
+ 'settextdat',
+ 'textunder',
+ 'pathdata',
+ 'framedata',
+ 'flags',
+ 'intextdat',
+ 'freetextdat',
+ 'frframedata',
+ 'zoomx',
+ 'zoomy',
# vgagrafx.asm
'cityname',
'extragraphics1',
diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp
index e5c2f30abd..2a17a7a1cf 100644
--- a/engines/dreamweb/backdrop.cpp
+++ b/engines/dreamweb/backdrop.cpp
@@ -26,7 +26,7 @@ namespace DreamGen {
void DreamBase::doBlocks() {
uint16 dstOffset = _mapAdY * 320 + _mapAdX;
- uint16 mapOffset = kMap + _mapY * kMapwidth + _mapX;
+ uint16 mapOffset = _mapY * kMapwidth + _mapX;
const uint8 *mapData = _mapData + mapOffset;
uint8 *dstBuffer = workspace() + dstOffset;
@@ -236,7 +236,7 @@ void DreamBase::showAllFree() {
void DreamBase::drawFlags() {
MapFlag *mapFlag = _mapFlags;
- uint16 mapOffset = kMap + _mapY * kMapwidth + _mapX;
+ uint16 mapOffset = _mapY * kMapwidth + _mapX;
const uint8 *mapData = _mapData + mapOffset;
for (size_t i = 0; i < 10; ++i) {
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 7d8e2ea63b..bee03f993f 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -89,25 +89,14 @@ static const uint16 kLastweapon = 64;
static const uint16 kDreamnumber = 65;
static const uint16 kRoomafterdream = 66;
static const uint16 kShakecounter = 67;
-static const uint16 kBlocktextdat = (0);
-static const uint16 kPersonframes = (0);
static const uint16 kDebuglevel1 = (0);
static const uint16 kDebuglevel2 = (0);
static const uint16 kPlayback = (0);
-static const uint16 kMap = (0);
-static const uint16 kSettextdat = (0);
-static const uint16 kTextunder = (0);
static const uint16 kSpanish = (0);
static const uint16 kRecording = (0);
static const uint16 kExframedata = (0);
static const uint16 kGerman = (0);
-static const uint16 kPathdata = (0);
static const uint16 kDemo = (0);
-static const uint16 kFramedata = (0);
-static const uint16 kFlags = (0);
-static const uint16 kIntextdat = (0);
-static const uint16 kFreetextdat = (0);
-static const uint16 kFrframedata = (0);
static const uint16 kExframes = (0+2080);
static const uint16 kExdata = (0+2080+30000);
static const uint16 kExtextdat = (0+2080+30000+(16*114));
@@ -116,7 +105,6 @@ static const uint16 kLengthofextra = (0+2080+30000+(16*114)+((114+2)*2)+18000);
static const uint16 kForeign = (1);
static const uint16 kCd = (1);
static const uint16 kNumexobjects = (114);
-static const uint16 kZoomy = (132);
static const uint16 kFreedatlen = (16*80);
static const uint16 kExtextlen = (18000);
static const uint16 kNumchanges = (250);
@@ -133,7 +121,6 @@ static const uint16 kSymbolx = (64);
static const uint16 kMapwidth = (66);
static const uint16 kDiaryx = (68+24);
static const uint16 kLengthofvars = (68-0);
-static const uint16 kZoomx = (8);
static const uint16 kInventx = (80);
static const uint16 kMenux = (80+40);
static const uint16 kHeaderlen = (96);
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index edd41beb3a..dfc39f8667 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1136,16 +1136,6 @@ void DreamBase::plotReel(uint16 &reelPointer) {
soundOnReels(reelPointer);
}
-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::delTextLine() {
if (_foreignRelease)
multiPut(_textUnder, _textAddressX, _textAddressY - 3, kUnderTextSizeX_f, kUnderTextSizeY_f);
@@ -2001,12 +1991,6 @@ void DreamBase::roomName() {
useCharset1();
}
-void DreamBase::zoomIcon() {
- if (data.byte(kZoomon) == 0)
- return;
- showFrame(_icons1, kZoomx, kZoomy-1, 8, 0);
-}
-
void DreamBase::loadRoom() {
_roomLoaded = 1;
_timeCount = 0;
@@ -2929,11 +2913,6 @@ bool DreamBase::isSetObOnMap(uint8 index) {
return (getSetAd(index)->mapad[0] == 0);
}
-void DreamBase::dumpZoom() {
- if (data.byte(kZoomon) == 1)
- multiDump(kZoomx + 5, kZoomy + 4, 46, 40);
-}
-
void DreamBase::examineInventory() {
if (_commandType != 249) {
_commandType = 249;
@@ -2969,14 +2948,6 @@ void DreamBase::underTextLine() {
multiGet(_textUnder, _textAddressX, _textAddressY, kUnderTextSizeX, kUnderTextSizeY);
}
-void DreamBase::getUnderZoom() {
- multiGet(_zoomSpace, kZoomx + 5, kZoomy + 4, 46, 40);
-}
-
-void DreamBase::putUnderZoom() {
- multiPut(_zoomSpace, kZoomx + 5, kZoomy + 4, 46, 40);
-}
-
void DreamBase::showWatchReel() {
uint16 reelPointer = data.word(kReeltowatch);
plotReel(reelPointer);
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;