Mercurial > touhou
diff src/th06/anm0_vm.rs @ 742:0a250ddfae79
examples: Update luminance.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 07 Jan 2020 00:23:15 +0100 |
parents | 3555845f8cf4 |
children | 3687205fe620 |
line wrap: on
line diff
--- a/src/th06/anm0_vm.rs +++ b/src/th06/anm0_vm.rs @@ -215,11 +215,11 @@ impl Sprite { } struct Anms { - inner: Rc<RefCell<[Anm0; 2]>>, + inner: Rc<RefCell<[Anm0]>>, } impl Anms { - fn new(anms: Rc<RefCell<[Anm0; 2]>>) -> Anms { + fn new(anms: Rc<RefCell<[Anm0]>>) -> Anms { Anms { inner: anms, } @@ -272,7 +272,7 @@ pub struct AnmRunner { impl AnmRunner { /// Create a new `AnmRunner`. - pub fn new(anms: Rc<RefCell<[Anm0; 2]>>, script_id: u8, sprite: Rc<RefCell<Sprite>>, prng: Weak<RefCell<Prng>>, sprite_index_offset: u32) -> AnmRunner { + pub fn new(anms: Rc<RefCell<[Anm0]>>, script_id: u8, sprite: Rc<RefCell<Sprite>>, prng: Weak<RefCell<Prng>>, sprite_index_offset: u32) -> AnmRunner { let anms = Anms::new(anms); let script = anms.get_script(script_id); let mut runner = AnmRunner {