Update to rust 2018

This commit is contained in:
Thomas Forgione 2019-03-30 09:33:33 +01:00
parent f84aabf4c6
commit 1ef818f58a
No known key found for this signature in database
GPG Key ID: BFD17A2D71B3B5E7
7 changed files with 16 additions and 23 deletions

View File

@ -2,6 +2,7 @@
name = "rusty" name = "rusty"
version = "0.1.0" version = "0.1.0"
authors = ["Thomas Forgione <thomas@forgione.fr>"] authors = ["Thomas Forgione <thomas@forgione.fr>"]
edition = "2018"
[dependencies] [dependencies]
clap = "2.32.0" clap = "2.32.0"

View File

@ -1,11 +1,6 @@
#[macro_use]
extern crate clap;
extern crate rusty;
extern crate sfml;
use std::time::Instant; use std::time::Instant;
use clap::{App, Arg}; use clap::{App, Arg, crate_version};
use sfml::window::{joystick, Event, Key}; use sfml::window::{joystick, Event, Key};

View File

@ -4,13 +4,12 @@ use sfml::graphics::{FloatRect, IntRect, View};
use sfml::system::Vector2; use sfml::system::Vector2;
use sfml::window::Event; use sfml::window::Event;
use engine::controls::{Action, Controls}; use crate::engine::controls::{Action, Controls};
use engine::scene::Updatable; use crate::engine::scene::Updatable;
use crate::engine::math::{clamp, duration_as_f32, duration_as_frame};
use engine::math::{clamp, duration_as_f32, duration_as_frame}; use crate::engine::physics;
use engine::physics; use crate::engine::renderer::Drawable;
use engine::renderer::Drawable; use crate::engine::texture::Texture;
use engine::texture::Texture;
/// The different sides a character can face. /// The different sides a character can face.
pub enum Side { pub enum Side {

View File

@ -1,9 +1,9 @@
use sfml::graphics::{FloatRect, IntRect}; use sfml::graphics::{FloatRect, IntRect};
use sfml::system::Vector2; use sfml::system::Vector2;
use engine::math::{clamp, Matrix}; use crate::engine::math::{clamp, Matrix};
use engine::renderer::Drawable; use crate::engine::renderer::Drawable;
use engine::texture::Texture; use crate::engine::texture::Texture;
/// This enum represents if the collision happens on the X axis or the Y axis. /// This enum represents if the collision happens on the X axis or the Y axis.
#[derive(Copy, Clone)] #[derive(Copy, Clone)]

View File

@ -6,9 +6,9 @@ use sfml::window::{Event, Style};
use sfml::system::Vector2; use sfml::system::Vector2;
use engine::map::GraphicTile; use crate::engine::map::GraphicTile;
use engine::scene::Scene; use crate::engine::scene::Scene;
use engine::texture::{Texture, TextureManager}; use crate::engine::texture::{Texture, TextureManager};
/// Our custom drawable trait. /// Our custom drawable trait.
pub trait Drawable { pub trait Drawable {

View File

@ -4,8 +4,8 @@ use sfml::graphics::View;
use sfml::system::Vector2; use sfml::system::Vector2;
use sfml::window::Event; use sfml::window::Event;
use engine::character::Character; use crate::engine::character::Character;
use engine::map::Map; use crate::engine::map::Map;
/// Contains everything needed to play. /// Contains everything needed to play.
pub struct Scene { pub struct Scene {

View File

@ -2,7 +2,5 @@
//! This crates contains the (future) rusty game. //! This crates contains the (future) rusty game.
extern crate sfml;
/// This module contains all the tools needed for the game. /// This module contains all the tools needed for the game.
pub mod engine; pub mod engine;