Changed project name (placeholder), some renames
This commit is contained in:
@@ -15,12 +15,12 @@ pub enum GameState {
|
||||
Running
|
||||
}
|
||||
|
||||
pub struct App {
|
||||
pub struct Game {
|
||||
player: Player,
|
||||
world: World
|
||||
}
|
||||
|
||||
impl App {
|
||||
impl Game {
|
||||
pub fn new(content: &mut dyn ContentView) -> Self {
|
||||
let mut app = Self {
|
||||
player: Player::new(),
|
||||
@@ -8,7 +8,7 @@ use cgmath::Point3;
|
||||
use std::io::Write;
|
||||
use std::convert::TryInto;
|
||||
use std::io::Read;
|
||||
use crate::app::world::{WorldBlock, block};
|
||||
use crate::game::world::{WorldBlock, block};
|
||||
|
||||
pub const SIZE: usize = 32;
|
||||
const SIZE_SQ: usize = SIZE*SIZE;
|
||||
@@ -2,7 +2,7 @@ use cgmath::Point3;
|
||||
use noise::{Perlin, NoiseFn};
|
||||
use rand::{Rng, prelude::ThreadRng};
|
||||
|
||||
use crate::app::world::{block, block::WorldBlock};
|
||||
use crate::game::world::{block, block::WorldBlock};
|
||||
|
||||
const SCALE: f64 = 150.0;
|
||||
|
||||
+3
-3
@@ -8,8 +8,8 @@ use winit::{
|
||||
mod renderer;
|
||||
use renderer::Renderer;
|
||||
|
||||
mod app;
|
||||
use app::{App, GameState};
|
||||
mod game;
|
||||
use game::{Game, GameState};
|
||||
|
||||
|
||||
fn main() {
|
||||
@@ -24,7 +24,7 @@ fn main() {
|
||||
.expect("Failed to create window");
|
||||
|
||||
let mut renderer = Renderer::new(&window);
|
||||
let mut app = App::new(&mut renderer);
|
||||
let mut app = Game::new(&mut renderer);
|
||||
|
||||
// Stats
|
||||
let mut fps_timer = std::time::Instant::now();
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::time::Instant;
|
||||
use byteorder::{ByteOrder, LittleEndian};
|
||||
use std::convert::TryInto;
|
||||
use cgmath::Point3;
|
||||
use crate::app::world::block::WorldBlock;
|
||||
use crate::game::world::block::WorldBlock;
|
||||
|
||||
pub const BLOCK_SIZE : usize = 32; // 32x32x32 block size
|
||||
pub const BLOCK_TEX_SIZE : usize = 64; // 64x64 blocks in texture
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::Renderer;
|
||||
use crate::app::world::block::WorldBlock;
|
||||
use crate::game::world::block::WorldBlock;
|
||||
use cgmath::Point3;
|
||||
|
||||
pub trait ContentView {
|
||||
|
||||
Reference in New Issue
Block a user