mirror of
https://github.com/italicsjenga/agb.git
synced 2025-02-02 12:36:35 +11:00
initialise to correct values
This commit is contained in:
parent
586f35265b
commit
eb6b2ac5a8
1 changed files with 11 additions and 1 deletions
|
@ -368,11 +368,21 @@ impl ObjectController {
|
|||
index: inner.pop()?,
|
||||
free_list: &self.free_objects,
|
||||
};
|
||||
|
||||
let mut attrs = Attributes::new();
|
||||
|
||||
attrs.a2.set_tile_index(sprite.sprite_location);
|
||||
let shape_size = sprite.id.get_sprite().size.shape_size();
|
||||
attrs.a2.set_palete_bank(sprite.palette_location as u8);
|
||||
attrs.a0.set_shape(shape_size.0);
|
||||
attrs.a1a.set_size(shape_size.1);
|
||||
attrs.a1s.set_size(shape_size.1);
|
||||
|
||||
Some(Object {
|
||||
previous_sprite: sprite.clone(),
|
||||
sprite,
|
||||
loan,
|
||||
attrs: Attributes::new(),
|
||||
attrs,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue