Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
ipc)
.ok_or(OE::PieceGone)?;
let y = {
- use PriOcculted::*;
+ use PriOG::*;
match pri.occulted {
Visible(y) => y,
Occulted | Displaced(..) => throw!(OE::BadOperation),
}
#[derive(Debug,Clone)]
-pub enum PriOcculted {
+pub enum PriOccultedGeneral<P,Z> {
Visible(ShowUnocculted),
Occulted,
- Displaced(Pos, ZLevel),
+ Displaced(P, Z),
}
+pub type PriOcculted = PriOccultedGeneral<Pos, ZLevel>;
+
impl VisiblePieceAngle {
pub fn to_transform(self) -> VisibleAngleTransform {
VisibleAngleTransform(base_misc::raw_angle_transform(
) -> Option<PieceUpdateOp<PreparedPieceState, ZLevel>>
{
use PieceUpdateOp::*;
- use PriOcculted::*;
+ use PriOG::*;
if matches_doesnot!(
op,
= Move(_) | SetZLevel(_),
pub type OccK = OccultationKind;
pub use OccultationKindGeneral as OccKG;
+// pcrender.rs
+pub use PriOccultedGeneral as PriOG;
+
// updates.rs
pub type PUE = PreparedUpdateEntry;
pub type PUFOS = PieceUpdateFromOpSimple;