The design/code here is still very much in flux, because it's still unclear exactly how the code is used by some games. svn-id: r55361