aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorMax Horn2011-12-08 20:10:33 +0100
committerMax Horn2011-12-08 20:10:33 +0100
commitc8d4f608526f6843bb942f7b8778df68b14f0aba (patch)
tree747145c4abf9dba1cee6eb9b0c9f39617a83bc38 /engines/dreamweb
parent0d7815e9bbfb445d4cdd52a23695bbe5e874ceb4 (diff)
downloadscummvm-rg350-c8d4f608526f6843bb942f7b8778df68b14f0aba.tar.gz
scummvm-rg350-c8d4f608526f6843bb942f7b8778df68b14f0aba.tar.bz2
scummvm-rg350-c8d4f608526f6843bb942f7b8778df68b14f0aba.zip
DREAMWEB: Move more stuff to DreamBase
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/dreambase.h5
-rw-r--r--engines/dreamweb/pathfind.cpp15
-rw-r--r--engines/dreamweb/sprite.cpp7
-rw-r--r--engines/dreamweb/stubs.h5
4 files changed, 16 insertions, 16 deletions
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index f52ada2a72..bc272c1b19 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -69,6 +69,11 @@ public:
Common::Point _lineData[200]; // Output of Bresenham
void checkDest(const RoomPaths *roomsPaths);
RoomPaths *getRoomsPaths();
+ void faceRightWay();
+ void setWalk();
+ void autoSetWalk();
+ void findXYFromPath();
+ void bresenhams();
void workoutFrames();
// from print.cpp
diff --git a/engines/dreamweb/pathfind.cpp b/engines/dreamweb/pathfind.cpp
index 439ac9b177..ee6ced7e4d 100644
--- a/engines/dreamweb/pathfind.cpp
+++ b/engines/dreamweb/pathfind.cpp
@@ -73,7 +73,14 @@ RoomPaths *DreamBase::getRoomsPaths() {
return (RoomPaths *)result;
}
-void DreamGenContext::setWalk() {
+void DreamBase::faceRightWay() {
+ PathNode *paths = getRoomsPaths()->nodes;
+ uint8 dir = paths[data.byte(kManspath)].dir;
+ data.byte(kTurntoface) = dir;
+ data.byte(kLeavedirection) = dir;
+}
+
+void DreamBase::setWalk() {
if (data.byte(kLinepointer) != 254) {
// Already walking
data.byte(kFinaldest) = data.byte(kPointerspath);
@@ -100,7 +107,7 @@ void DreamGenContext::setWalk() {
}
}
-void DreamGenContext::autoSetWalk() {
+void DreamBase::autoSetWalk() {
if (data.byte(kFinaldest) == data.byte(kManspath))
return;
const RoomPaths *roomsPaths = getRoomsPaths();
@@ -137,7 +144,7 @@ void DreamBase::checkDest(const RoomPaths *roomsPaths) {
data.byte(kDestination) = destination;
}
-void DreamGenContext::findXYFromPath() {
+void DreamBase::findXYFromPath() {
const PathNode *roomsPaths = getRoomsPaths()->nodes;
data.byte(kRyanx) = roomsPaths[data.byte(kManspath)].x - 12;
data.byte(kRyany) = roomsPaths[data.byte(kManspath)].y - 12;
@@ -153,7 +160,7 @@ bool DreamGenContext::checkIfPathIsOn(uint8 index) {
return pathOn == 0xff;
}
-void DreamGenContext::bresenhams() {
+void DreamBase::bresenhams() {
workoutFrames();
Common::Point *lineData = &_lineData[0];
int16 startX = (int16)data.word(kLinestartx);
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 8b8bd230a6..f1f3ff5e48 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -457,13 +457,6 @@ void DreamGenContext::liftSprite(Sprite *sprite, SetObject *objData) {
}
}
-void DreamGenContext::faceRightWay() {
- PathNode *paths = getRoomsPaths()->nodes;
- uint8 dir = paths[data.byte(kManspath)].dir;
- data.byte(kTurntoface) = dir;
- data.byte(kLeavedirection) = dir;
-}
-
Reel *DreamBase::getReelStart(uint16 reelPointer) {
Reel *reel = (Reel *)getSegment(data.word(kReels)).ptr(kReellist + reelPointer * sizeof(Reel) * 8, sizeof(Reel));
return reel;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 27268bb970..f4bc491269 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -96,9 +96,7 @@
void initMan();
void mainMan(Sprite *sprite);
void mainMan();
- void faceRightWay();
void walking(Sprite *sprite);
- void autoSetWalk();
void aboutTurn(Sprite *sprite);
void backObject(Sprite *sprite);
void backObject();
@@ -161,7 +159,6 @@
void blockNameText();
void walkToText();
void personNameText();
- void findXYFromPath();
void findOrMake();
void findOrMake(uint8 index, uint8 value, uint8 type) {
DreamBase::findOrMake(index, value, type);
@@ -239,7 +236,6 @@
void useText();
void getBlockOfPixel();
uint8 getBlockOfPixel(uint8 x, uint8 y);
- void bresenhams();
void examineObText();
void sortOutMap();
void showCity();
@@ -497,7 +493,6 @@
void openSarters();
void openLouis();
void DOSReturn();
- void setWalk();
void useLadder();
void useLadderB();
void useCart();