示例#1
0
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;
}
示例#2
0
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;
}