use glam::IVec2; use gsa::{run, Gsa, FACE_DOWN}; struct Game {} fn init(gsa: &mut Gsa) -> Game { gsa.sprites[0].tile = 0x0300; gsa.sprites[1].tile = 0x0200; gsa.bgs[0].tiles[1][1] = 0x0300; gsa.bgs[1].half_tile = true; gsa.write_string(1, IVec2::ONE, "Hello world nyaa~"); Game {} } fn update(_game: &mut Game, gsa: &mut Gsa) { gsa.sprites[0].pos.x = (gsa.sprites[0].pos.x + 1) % 300; gsa.sprites[1].pos += gsa.input_dir(); gsa.bgs[1].scroll.x += 1; if gsa.button_pressed(FACE_DOWN) { gsa.sprites[1].tile += 1; } } run!(init, update);