mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
clear object when dropped
This commit is contained in:
parent
13dc368d18
commit
a26732e1fa
|
@ -166,6 +166,10 @@ fn set_bits(current: u16, value: u16, length: u16, shift: u16) -> u16 {
|
||||||
|
|
||||||
impl Drop for ObjectLoan<'_> {
|
impl Drop for ObjectLoan<'_> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
|
let attributes = ObjectAttribute::new();
|
||||||
|
unsafe {
|
||||||
|
attributes.commit(self.index);
|
||||||
|
}
|
||||||
let mut objs = self.objects.borrow_mut();
|
let mut objs = self.objects.borrow_mut();
|
||||||
objs.set(self.index as usize, false);
|
objs.set(self.index as usize, false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue