diff options
author | Max Horn | 2011-12-08 20:10:33 +0100 |
---|---|---|
committer | Max Horn | 2011-12-08 20:10:33 +0100 |
commit | c8d4f608526f6843bb942f7b8778df68b14f0aba (patch) | |
tree | 747145c4abf9dba1cee6eb9b0c9f39617a83bc38 /engines/dreamweb/pathfind.cpp | |
parent | 0d7815e9bbfb445d4cdd52a23695bbe5e874ceb4 (diff) | |
download | scummvm-rg350-c8d4f608526f6843bb942f7b8778df68b14f0aba.tar.gz scummvm-rg350-c8d4f608526f6843bb942f7b8778df68b14f0aba.tar.bz2 scummvm-rg350-c8d4f608526f6843bb942f7b8778df68b14f0aba.zip |
DREAMWEB: Move more stuff to DreamBase
Diffstat (limited to 'engines/dreamweb/pathfind.cpp')
-rw-r--r-- | engines/dreamweb/pathfind.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
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); |