LAB: Simplify readViews()

This commit is contained in:
Filippos Karapetis 2015-07-21 22:06:23 +03:00 committed by Eugene Sandulenko
parent 75882daa49
commit df3200ef0c
3 changed files with 6 additions and 8 deletions

View File

@ -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();

View File

@ -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 */

View File

@ -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;
}