mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-10 09:01:34 +11:00
Fix doc errors and warnings
This commit is contained in:
parent
e24ef69e0f
commit
6319fd3a20
|
@ -14,7 +14,7 @@ use crate::{
|
||||||
/// The abstraction allows only for static tiles, but it is possible to animate the tiles if needed.
|
/// The abstraction allows only for static tiles, but it is possible to animate the tiles if needed.
|
||||||
///
|
///
|
||||||
/// When you create a new infinite scrolled map, you need to provide a background which it will render itself
|
/// When you create a new infinite scrolled map, you need to provide a background which it will render itself
|
||||||
/// onto and a function which takes a Vector2D<i32> position and returns which tile should be rendered there.
|
/// onto and a function which takes a `Vector2D<i32>` position and returns which tile should be rendered there.
|
||||||
///
|
///
|
||||||
/// The passed function should handle being out of bounds, as the scrolled map does buffer around the edges slightly.
|
/// The passed function should handle being out of bounds, as the scrolled map does buffer around the edges slightly.
|
||||||
///
|
///
|
||||||
|
|
|
@ -153,7 +153,7 @@ impl ButtonController {
|
||||||
#[must_use]
|
#[must_use]
|
||||||
/// Returns [Tri::Positive] if left was just pressed, [Tri::Negative] if right was just pressed and [Tri::Zero] if neither or both are just pressed.
|
/// Returns [Tri::Positive] if left was just pressed, [Tri::Negative] if right was just pressed and [Tri::Zero] if neither or both are just pressed.
|
||||||
///
|
///
|
||||||
/// Also returns [Tri::Zero] after the call to [update()] if the button is still held.
|
/// Also returns [Tri::Zero] after the call to [`update()`](ButtonController::update()) if the button is still held.
|
||||||
pub fn just_pressed_x_tri(&self) -> Tri {
|
pub fn just_pressed_x_tri(&self) -> Tri {
|
||||||
let left = self.is_just_pressed(Button::LEFT);
|
let left = self.is_just_pressed(Button::LEFT);
|
||||||
let right = self.is_just_pressed(Button::RIGHT);
|
let right = self.is_just_pressed(Button::RIGHT);
|
||||||
|
@ -164,7 +164,7 @@ impl ButtonController {
|
||||||
#[must_use]
|
#[must_use]
|
||||||
/// Returns [Tri::Positive] if down was just pressed, [Tri::Negative] if up was just pressed and [Tri::Zero] if neither or both are just pressed.
|
/// Returns [Tri::Positive] if down was just pressed, [Tri::Negative] if up was just pressed and [Tri::Zero] if neither or both are just pressed.
|
||||||
///
|
///
|
||||||
/// Also returns [Tri::Zero] after the call to [update()] if the button is still held.
|
/// Also returns [Tri::Zero] after the call to [`update()`](ButtonController::update()) if the button is still held.
|
||||||
pub fn just_pressed_y_tri(&self) -> Tri {
|
pub fn just_pressed_y_tri(&self) -> Tri {
|
||||||
let up = self.is_just_pressed(Button::UP);
|
let up = self.is_just_pressed(Button::UP);
|
||||||
let down = self.is_just_pressed(Button::DOWN);
|
let down = self.is_just_pressed(Button::DOWN);
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#![deny(clippy::cloned_instead_of_copied)]
|
#![deny(clippy::cloned_instead_of_copied)]
|
||||||
#![deny(rustdoc::broken_intra_doc_links)]
|
#![deny(rustdoc::broken_intra_doc_links)]
|
||||||
#![deny(rustdoc::private_intra_doc_links)]
|
#![deny(rustdoc::private_intra_doc_links)]
|
||||||
|
#![deny(rustdoc::invalid_html_tags)]
|
||||||
|
|
||||||
//! # agb
|
//! # agb
|
||||||
//! `agb` is a library for making games on the Game Boy Advance using the Rust
|
//! `agb` is a library for making games on the Game Boy Advance using the Rust
|
||||||
|
|
Loading…
Reference in a new issue