the great admiral 's cabin at the stern had been hastily converted into something of a state apartment for prince yongxing , and the captain 's cabin beneath the poop deck divided for the other two senior envoys , the smaller quarters nearby given over to the crowd of guards and attendants , displacing not only riley himself but also the ship 's first lieutenant , lord purbeck , the surgeon , the master , and several other of his officers .