mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
affine object is gettable
This commit is contained in:
parent
4a74d88530
commit
eb596decfc
|
@ -184,7 +184,7 @@ impl ObjectControl {
|
||||||
DISPLAY_CONTROL.set(disp);
|
DISPLAY_CONTROL.set(disp);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_object(&mut self) -> ObjectStandard {
|
pub fn get_object_standard(&mut self) -> ObjectStandard {
|
||||||
let id = self.object_count;
|
let id = self.object_count;
|
||||||
self.object_count += 1;
|
self.object_count += 1;
|
||||||
assert!(id < 128, "object id must be less than 128");
|
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 {
|
pub fn get_affine(&mut self) -> AffineMatrix {
|
||||||
let id = self.affine_count;
|
let id = self.affine_count;
|
||||||
self.affine_count += 1;
|
self.affine_count += 1;
|
||||||
|
|
Loading…
Reference in a new issue