bool CSGTNavigation::EnterViewMsg(CEnterViewMsg *msg) { if (isEquals("SGTLL")) { static const int FRAMES[3] = { 0, 36, 74 }; CPetControl *pet = getPetControl(); loadFrame(FRAMES[pet->getRooms1CC() - 1]); } return true; }
bool CSGTNavigation::StatusChangeMsg(CStatusChangeMsg *msg) { CPetControl *pet = getPetControl(); if (isEquals("SGTLL")) { static const int FRAMES[7] = { 0, 149, 112, 74, 0, 36, 74 }; _statics->_changeViewNum = msg->_newStatus; if (pet->getRooms1CC() != _statics->_changeViewNum) { changeView("SGTLittleLift.Node 1.N"); } int startVal = pet->getRooms1CC(); if (startVal > _statics->_changeViewNum) playMovie(FRAMES[startVal], FRAMES[_statics->_changeViewNum], MOVIE_WAIT_FOR_FINISH); else playMovie(FRAMES[startVal + 3], FRAMES[_statics->_changeViewNum + 3], MOVIE_WAIT_FOR_FINISH); _cursorId = _statics->_changeViewNum != 1 ? CURSOR_MOVE_FORWARD : CURSOR_INVALID; pet->setRooms1CC(_statics->_changeViewNum); pet->resetRoomsHighlight(); } return true; }
bool CSGTDoors::LeaveRoomMsg(CLeaveRoomMsg *msg) { setVisible(true); _open = false; CPetControl *pet = getPetControl(); if (pet) { int roomNum = pet->getRoomsRoomNum(); static const int START_FRAMES[7] = { 12, 69, 65, 61, 57, 53, 49 }; static const int END_FRAMES[7] = { 25, 72, 68, 64, 60, 56, 52 }; if (pet->getRooms1CC() == 1) playMovie(START_FRAMES[roomNum], END_FRAMES[roomNum], MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); else playMovie(12, 25, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); } return true; }
bool CSGTDoors::EnterViewMsg(CEnterViewMsg *msg) { setVisible(true); _open = true; CPetControl *pet = getPetControl(); if (pet) { int roomNum = pet->getRoomsRoomNum(); static const int START_FRAMES[7] = { 0, 26, 30, 34, 38, 42, 46 }; static const int END_FRAMES[7] = { 12, 29, 33, 37, 41, 45, 49 }; if (pet->getRooms1CC() == 1) playMovie(START_FRAMES[roomNum], END_FRAMES[roomNum], MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); else playMovie(0, 12, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); } return true; }