mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
update chicken example to match
This commit is contained in:
parent
7aa213936e
commit
353fa23876
|
@ -31,8 +31,8 @@ fn tile_is_collidable(tile: u16) -> bool {
|
||||||
masked == 0 || masked == 4
|
masked == 0 || masked == 4
|
||||||
}
|
}
|
||||||
|
|
||||||
fn frame_ranger(count: u32, start: u32, end: u32, delay: u32) -> u32 {
|
fn frame_ranger(count: u32, start: u32, end: u32, delay: u32) -> u16 {
|
||||||
((count / delay) % (end + 1 - start)) + start
|
(((count / delay) % (end + 1 - start)) + start) as u16
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
@ -61,9 +61,8 @@ pub fn main() -> ! {
|
||||||
let mut object = gfx.object;
|
let mut object = gfx.object;
|
||||||
|
|
||||||
object.enable();
|
object.enable();
|
||||||
unsafe { object.clear_objects() };
|
|
||||||
let mut chicken = Character {
|
let mut chicken = Character {
|
||||||
object: unsafe { object.get_object(0) },
|
object: object.get_object(),
|
||||||
position: Vector2D {
|
position: Vector2D {
|
||||||
x: (6 * 8) << 8,
|
x: (6 * 8) << 8,
|
||||||
y: ((7 * 8) - 4) << 8,
|
y: ((7 * 8) - 4) << 8,
|
||||||
|
|
Loading…
Reference in a new issue