mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 08:41:34 +11:00
set palette location on sprite change
This commit is contained in:
parent
2a7b350f57
commit
ae681019bb
|
@ -216,6 +216,7 @@ impl<'a, 'b> Object<'a, 'b> {
|
||||||
pub fn set_sprite(&'_ mut self, sprite: SpriteBorrow<'a>) {
|
pub fn set_sprite(&'_ mut self, sprite: SpriteBorrow<'a>) {
|
||||||
self.attrs.a2.set_tile_index(sprite.sprite_location);
|
self.attrs.a2.set_tile_index(sprite.sprite_location);
|
||||||
let shape_size = sprite.id.get_sprite().size.shape_size();
|
let shape_size = sprite.id.get_sprite().size.shape_size();
|
||||||
|
self.attrs.a2.set_palete_bank(sprite.palette_location as u8);
|
||||||
self.attrs.a0.set_shape(shape_size.0);
|
self.attrs.a0.set_shape(shape_size.0);
|
||||||
self.attrs.a1a.set_size(shape_size.1);
|
self.attrs.a1a.set_size(shape_size.1);
|
||||||
self.attrs.a1s.set_size(shape_size.1);
|
self.attrs.a1s.set_size(shape_size.1);
|
||||||
|
|
Loading…
Reference in a new issue