refactor: split into gameboy-rust workspace with core, demos, and desktop crates
Move the emulator into crates/gba-core, the original demo programs into crates/gba-demos, and the minifb frontend into crates/desktop. The binary is now gameboy-rust. Imports change from gba_rust to gba_core/gba_demos; no behavior changes. gba-core has no dependencies. Its integration tests use gba-demos as a development dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a8944d1d5f
commit
f8a0676748
113 changed files with 304 additions and 282 deletions
|
|
@ -1,40 +0,0 @@
|
|||
//! Original CPU-driven window and color-effects scene, based on the tile demo.
|
||||
//! The CPU writes window bounds and effect registers during each VBlank.
|
||||
|
||||
use crate::{
|
||||
graphics_demo::{GraphicsDemo, GraphicsError},
|
||||
input::Buttons,
|
||||
machine::Machine,
|
||||
memory::MemoryError,
|
||||
video::Framebuffer,
|
||||
};
|
||||
|
||||
/// Completed updates and nine-bit horizontal/vertical scroll, as three words.
|
||||
pub const EFFECTS_STATE: u32 = crate::tile_demo::TILE_STATE;
|
||||
|
||||
pub struct EffectsDemo {
|
||||
runner: GraphicsDemo,
|
||||
}
|
||||
|
||||
impl EffectsDemo {
|
||||
pub fn new() -> Result<Self, MemoryError> {
|
||||
Ok(Self {
|
||||
runner: GraphicsDemo::with_program(crate::tile_demo::effects_program())?,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn machine(&self) -> &Machine {
|
||||
self.runner.machine()
|
||||
}
|
||||
|
||||
/// Arrows scroll and move WIN0. Z selects alpha; X selects darkening.
|
||||
/// Otherwise the area outside WIN0 is brightened. Enter resets scrolling.
|
||||
/// Q/W retain the tile demo's sprite rotation and zoom controls.
|
||||
pub fn frame(
|
||||
&mut self,
|
||||
buttons: Buttons,
|
||||
output: &mut Framebuffer,
|
||||
) -> Result<usize, GraphicsError> {
|
||||
self.runner.frame_with_control(buttons, output, 0x3340)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue