diff options
author | Filippos Karapetis | 2011-12-16 10:54:31 -0800 |
---|---|---|
committer | Filippos Karapetis | 2011-12-16 10:54:31 -0800 |
commit | 70fd1b604342863778e2cac3e667f4ee2de42b82 (patch) | |
tree | 392e62f0464e7485e95f0c06deb5929b7168c698 /engines/dreamweb/pathfind.cpp | |
parent | 86c3c8b4620f3841ba587790bdad9f262d1ed339 (diff) | |
parent | 1d09f7c12a79416349cb33a7de88792c85ada5c1 (diff) | |
download | scummvm-rg350-70fd1b604342863778e2cac3e667f4ee2de42b82.tar.gz scummvm-rg350-70fd1b604342863778e2cac3e667f4ee2de42b82.tar.bz2 scummvm-rg350-70fd1b604342863778e2cac3e667f4ee2de42b82.zip |
Merge pull request #144 from fingolfin/dreamweb-cleanup
Dreamweb cleanup
Diffstat (limited to 'engines/dreamweb/pathfind.cpp')
-rw-r--r-- | engines/dreamweb/pathfind.cpp | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/engines/dreamweb/pathfind.cpp b/engines/dreamweb/pathfind.cpp index 212d61e6e2..8d9d9a95bb 100644 --- a/engines/dreamweb/pathfind.cpp +++ b/engines/dreamweb/pathfind.cpp @@ -24,11 +24,7 @@ namespace DreamGen { -void DreamGenContext::turnPathOn() { - turnPathOn(al); -} - -void DreamGenContext::turnPathOn(uint8 param) { +void DreamBase::turnPathOn(uint8 param) { findOrMake(param, 0xff, data.byte(kRoomnum) + 100); PathNode *roomsPaths = getRoomsPaths()->nodes; if (param == 0xff) @@ -36,11 +32,7 @@ void DreamGenContext::turnPathOn(uint8 param) { roomsPaths[param].on = 0xff; } -void DreamGenContext::turnPathOff() { - turnPathOff(al); -} - -void DreamGenContext::turnPathOff(uint8 param) { +void DreamBase::turnPathOff(uint8 param) { findOrMake(param, 0x00, data.byte(kRoomnum) + 100); PathNode *roomsPaths = getRoomsPaths()->nodes; if (param == 0xff) @@ -48,26 +40,18 @@ void DreamGenContext::turnPathOff(uint8 param) { roomsPaths[param].on = 0x00; } -void DreamGenContext::turnAnyPathOn(uint8 param, uint8 room) { +void DreamBase::turnAnyPathOn(uint8 param, uint8 room) { findOrMake(param, 0xff, room + 100); PathNode *paths = (PathNode *)getSegment(data.word(kReels)).ptr(kPathdata + 144 * room, 0); paths[param].on = 0xff; } -void DreamGenContext::turnAnyPathOn() { - turnAnyPathOn(al, ah); -} - -void DreamGenContext::turnAnyPathOff(uint8 param, uint8 room) { +void DreamBase::turnAnyPathOff(uint8 param, uint8 room) { findOrMake(param, 0x00, room + 100); PathNode *paths = (PathNode *)getSegment(data.word(kReels)).ptr(kPathdata + 144 * room, 0); paths[param].on = 0x00; } -void DreamGenContext::turnAnyPathOff() { - turnAnyPathOff(al, ah); -} - RoomPaths *DreamBase::getRoomsPaths() { void *result = getSegment(data.word(kReels)).ptr(data.byte(kRoomnum) * 144, 144); return (RoomPaths *)result; @@ -150,11 +134,7 @@ void DreamBase::findXYFromPath() { data.byte(kRyany) = roomsPaths[data.byte(kManspath)].y - 12; } -void DreamGenContext::checkIfPathIsOn() { - flags._z = checkIfPathIsOn(al); -} - -bool DreamGenContext::checkIfPathIsOn(uint8 index) { +bool DreamBase::checkIfPathIsOn(uint8 index) { RoomPaths *roomsPaths = getRoomsPaths(); uint8 pathOn = roomsPaths->nodes[index].on; return pathOn == 0xff; |