DREAMWEB: Removal of a useless stub

This commit is contained in:
Bertrand Augereau 2011-09-02 07:56:50 +02:00
parent 98a6b339af
commit c51797dae6
3 changed files with 8 additions and 14 deletions

View File

@ -33,7 +33,7 @@ void DreamGenContext::turnpathon() {
void DreamGenContext::turnpathon(uint8 param) {
findormake(param, 0xff, data.byte(kRoomnum) + 100);
PathNode *roomsPaths = getroomspathsCPP()->nodes;
PathNode *roomsPaths = getroomspaths()->nodes;
if (param == 0xff)
return;
roomsPaths[param].on = 0xff;
@ -45,7 +45,7 @@ void DreamGenContext::turnpathoff() {
void DreamGenContext::turnpathoff(uint8 param) {
findormake(param, 0x00, data.byte(kRoomnum) + 100);
PathNode *roomsPaths = getroomspathsCPP()->nodes;
PathNode *roomsPaths = getroomspaths()->nodes;
if (param == 0xff)
return;
roomsPaths[param].on = 0x00;
@ -72,12 +72,7 @@ void DreamGenContext::turnanypathoff() {
turnanypathoff(al, ah);
}
void DreamGenContext::getroomspaths() {
es = data.word(kReels);
bx = data.byte(kRoomnum) * 144;
}
RoomPaths *DreamGenContext::getroomspathsCPP() {
RoomPaths *DreamGenContext::getroomspaths() {
void *result = segRef(data.word(kReels)).ptr(data.byte(kRoomnum) * 144, 144);
return (RoomPaths *)result;
}
@ -86,7 +81,7 @@ void DreamGenContext::autosetwalk() {
al = data.byte(kManspath);
if (data.byte(kFinaldest) == al)
return;
const RoomPaths *roomsPaths = getroomspathsCPP();
const RoomPaths *roomsPaths = getroomspaths();
checkdest(roomsPaths);
data.word(kLinestartx) = roomsPaths->nodes[data.byte(kManspath)].x - 12;
data.word(kLinestarty) = roomsPaths->nodes[data.byte(kManspath)].y - 12;
@ -123,7 +118,7 @@ void DreamGenContext::checkdest(const RoomPaths *roomsPaths) {
}
void DreamGenContext::findxyfrompath() {
const PathNode *roomsPaths = getroomspathsCPP()->nodes;
const PathNode *roomsPaths = getroomspaths()->nodes;
data.byte(kRyanx) = roomsPaths[data.byte(kManspath)].x - 12;
data.byte(kRyany) = roomsPaths[data.byte(kManspath)].y - 12;
}
@ -133,7 +128,7 @@ void DreamGenContext::checkifpathison() {
}
bool DreamGenContext::checkifpathison(uint8 index) {
RoomPaths *roomsPaths = getroomspathsCPP();
RoomPaths *roomsPaths = getroomspaths();
uint8 pathOn = roomsPaths->nodes[index].on;
return pathOn == 0xff;
}

View File

@ -501,7 +501,7 @@ void DreamGenContext::liftsprite(Sprite *sprite, SetObject *objData) {
}
void DreamGenContext::facerightway() {
PathNode *paths = getroomspathsCPP()->nodes;
PathNode *paths = getroomspaths()->nodes;
uint8 dir = paths[data.byte(kManspath)].dir;
data.byte(kTurntoface) = dir;
data.byte(kLeavedirection) = dir;

View File

@ -111,8 +111,7 @@
void turnanypathoff(uint8 param, uint8 room);
void turnanypathon();
void turnanypathoff();
void getroomspaths();
RoomPaths *getroomspathsCPP();
RoomPaths *getroomspaths();
void makebackob(SetObject *objData);
void modifychar();
void lockmon();