From 9c547a62b12bf1ef4350ac1b8df484a34e187b30 Mon Sep 17 00:00:00 2001 From: Lokathor Date: Sat, 8 Dec 2018 01:53:37 -0700 Subject: [PATCH] new aims --- .travis.yml | 2 +- book/src/SUMMARY.md | 19 +++++++++++++------ src/lib.rs | 11 ++++++----- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9abb417..45e0d04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ before_script: - cargo install-update -a script: - # Obtain the devkitPro tools, using target as a temp directory + # Obtain the devkitPro tools, using `target/` as a temp directory - mkdir -p target - cd target - wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 1847cab..ece03a0 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -1,12 +1,16 @@ +# Rust GBA Guide + * Introduction - * Goals Of This Book - * Prerequisites + * Reader Requirements + * Book Goals and Style * Getting Outside Help * Development Setup * Hello Magic - * Volatile +* GBA Limitations + * No Floats * Core Only + * Volatile Destination * Broad Concepts * BIOS * Working RAM @@ -16,13 +20,13 @@ * Object Attribute Memory * Game Pak ROM / Flash ROM * Save RAM -* Video Modes +* Video * RBG15 Color * Bitmap Modes * Tiled Modes * Affine Math * Special Effects -* Non-Video Hardware +* Non-Video * Buttons * Timers * Direct Memory Access @@ -31,4 +35,7 @@ * Network * Game Pak * Examples - * for example in example_list + * hello_magic + * hello_world + * light_cycle + * bg_demo diff --git a/src/lib.rs b/src/lib.rs index fc08aa5..80f491c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,7 @@ #![cfg_attr(not(test), feature(asm))] #![warn(missing_docs)] #![allow(clippy::cast_lossless)] +#![deny(clippy::float_arithmetic)] //! This crate helps you write GBA ROMs. //! @@ -77,11 +78,11 @@ pub fn div_modulus(numerator: i32, denominator: i32) -> (i32, i32) { let mod_out: i32; unsafe { asm!(/* assembly template */ "swi 0x06" - :/* output operands */ "={r0}"(div_out), "={r1}"(mod_out) - :/* input operands */ "{r0}"(numerator), "{r1}"(denominator) - :/* clobbers */ "r3" - :/* options */ - ); + :/* output operands */ "={r0}"(div_out), "={r1}"(mod_out) + :/* input operands */ "{r0}"(numerator), "{r1}"(denominator) + :/* clobbers */ "r3" + :/* options */ + ); } (div_out, mod_out) }