diff options
author | Filippos Karapetis | 2015-07-21 22:06:23 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-15 00:05:02 +0100 |
commit | df3200ef0c0bc590f03888a26e49e52da51d53ce (patch) | |
tree | 9c7d40be657a8bffa3d98a61ce3d307a54ef888f | |
parent | 75882daa498618bba82fe9494f6d7b803e5e8c46 (diff) | |
download | scummvm-rg350-df3200ef0c0bc590f03888a26e49e52da51d53ce.tar.gz scummvm-rg350-df3200ef0c0bc590f03888a26e49e52da51d53ce.tar.bz2 scummvm-rg350-df3200ef0c0bc590f03888a26e49e52da51d53ce.zip |
LAB: Simplify readViews()
-rw-r--r-- | engines/lab/map.cpp | 2 | ||||
-rw-r--r-- | engines/lab/parsefun.h | 2 | ||||
-rw-r--r-- | engines/lab/processroom.cpp | 10 |
3 files changed, 6 insertions, 8 deletions
diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index 3b2eaf67f5..2e3dffc943 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -855,7 +855,7 @@ void processMap(uint16 CurRoom) { if (OldMsg != CurMsg) { if (Rooms[CurMsg].RoomMsg == NULL) - readViews(CurMsg, ViewPath); + readViews(CurMsg); if ((sptr = Rooms[CurMsg].RoomMsg)) { mouseHide(); diff --git a/engines/lab/parsefun.h b/engines/lab/parsefun.h index f5929ae306..b75368d25d 100644 --- a/engines/lab/parsefun.h +++ b/engines/lab/parsefun.h @@ -52,7 +52,7 @@ void allocRoom(void **Ptr, uint16 Size, uint16 RoomNum); bool readRoomData(const char *fileName); bool readInventory(const char *fileName); -bool readViews(uint16 RoomNum, const char *Path); +bool readViews(uint16 RoomNum); /* From ProcessRoom.c */ diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp index 9d501e6b57..c6acf36a32 100644 --- a/engines/lab/processroom.cpp +++ b/engines/lab/processroom.cpp @@ -116,7 +116,7 @@ ViewDataPtr getViewData(uint16 roomNum, uint16 direction) { VPtr = &Rooms[roomNum].WestView; if (*VPtr == NULL) - readViews(roomNum, ViewPath); + readViews(roomNum); ViewPtr = *VPtr; @@ -187,9 +187,7 @@ static CloseDataPtr findCPtrMatch(CloseDataPtr Main, CloseDataPtr List) { /* Returns the current picture name. */ /*****************************************************************************/ char *getPictName(CloseDataPtr *LCPtr) { - ViewDataPtr ViewPtr; - - ViewPtr = getViewData(RoomNum, Direction); + ViewDataPtr ViewPtr = getViewData(RoomNum, Direction); if (*LCPtr != NULL) { *LCPtr = findCPtrMatch(*LCPtr, ViewPtr->closeUps); @@ -675,7 +673,7 @@ static bool doActionRuleSub(int16 action, int16 roomNum, CloseDataPtr LCPtr, Clo RPtr = Rooms[roomNum].RuleList; if ((RPtr == NULL) && (roomNum == 0)) { - readViews(roomNum, ViewPath); + readViews(roomNum); RPtr = Rooms[roomNum].RuleList; } @@ -737,7 +735,7 @@ static bool doOperateRuleSub(int16 ItemNum, int16 roomNum, CloseDataPtr LCPtr, C RPtr = Rooms[roomNum].RuleList; if ((RPtr == NULL) && (roomNum == 0)) { - readViews(roomNum, ViewPath); + readViews(roomNum); RPtr = Rooms[roomNum].RuleList; } |