affine object is gettable

This commit is contained in:
Corwin Kuiper 2021-05-30 19:57:43 +01:00
parent 4a74d88530
commit eb596decfc

View file

@ -184,7 +184,7 @@ impl ObjectControl {
DISPLAY_CONTROL.set(disp);
}
pub fn get_object(&mut self) -> ObjectStandard {
pub fn get_object_standard(&mut self) -> ObjectStandard {
let id = self.object_count;
self.object_count += 1;
assert!(id < 128, "object id must be less than 128");
@ -194,6 +194,17 @@ impl ObjectControl {
}
}
pub fn get_object_affine(&mut self) -> ObjectAffine {
let id = self.object_count;
self.object_count += 1;
assert!(id < 128, "object id must be less than 128");
ObjectAffine {
attributes: ObjectAttribute::new(),
id,
aff_id: None,
}
}
pub fn get_affine(&mut self) -> AffineMatrix {
let id = self.affine_count;
self.affine_count += 1;