This repository has been archived on 2024-06-01. You can view files and clone it, but cannot push or open issues or pull requests.
rustboyadvance-ng/src/lib.rs
Michel Heily 3687161b98 Make the debugger into an optional build option.
This module is written purely and always breaks when changes are being
made into the 'core' module, so as long as I don't use it, I don't feel
like maintaining it.


Former-commit-id: f5b18ba54a27d22e8a195dd0912ec9c8f29fa830
2019-12-29 23:44:34 +02:00

64 lines
1.2 KiB
Rust

#![feature(asm)]
#![feature(core_intrinsics)]
#![feature(exclusive_range_pattern)]
#[macro_use]
extern crate debug_stub_derive;
#[macro_use]
extern crate enum_primitive_derive;
extern crate num;
extern crate num_traits;
extern crate bit;
#[macro_use]
extern crate bitfield;
#[macro_use]
extern crate bitflags;
extern crate byteorder;
extern crate rustyline;
extern crate nom;
extern crate ansi_term;
extern crate colored; // not needed in Rust 2018
extern crate zip;
#[macro_use]
pub mod util;
pub mod core;
pub mod disass;
#[cfg(rba_with_debugger)]
pub mod debugger;
pub trait VideoInterface {
fn render(&mut self, buffer: &[u32]);
}
pub type StereoSample = (i16, i16);
pub trait AudioInterface {
fn get_sample_rate(&self) -> i32;
#[allow(unused_variables)]
fn push_sample(&mut self, samples: StereoSample) {}
}
pub trait InputInterface {
fn poll(&mut self) -> u16;
}
pub mod prelude {
pub use super::core::arm7tdmi;
pub use super::core::cartridge::Cartridge;
pub use super::core::{GBAError, GBAResult, GameBoyAdvance};
#[cfg(rba_with_debugger)]
pub use super::debugger::Debugger;
pub use super::util::read_bin_file;
pub use super::{AudioInterface, InputInterface, VideoInterface};
}