Changed project name (placeholder), some renames
This commit is contained in:
Generated
+24
-24
@@ -1,5 +1,29 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "VoxelGame"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytemuck",
|
||||
"byteorder",
|
||||
"cgmath",
|
||||
"dirs",
|
||||
"flate2",
|
||||
"fs_extra",
|
||||
"futures",
|
||||
"glob",
|
||||
"image",
|
||||
"linked-hash-map",
|
||||
"noise",
|
||||
"rand 0.8.3",
|
||||
"shaderc",
|
||||
"wgpu",
|
||||
"wgpu_glyph",
|
||||
"winit",
|
||||
"yaml-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ab_glyph"
|
||||
version = "0.2.10"
|
||||
@@ -2273,30 +2297,6 @@ dependencies = [
|
||||
"wgpu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wgpufun"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytemuck",
|
||||
"byteorder",
|
||||
"cgmath",
|
||||
"dirs",
|
||||
"flate2",
|
||||
"fs_extra",
|
||||
"futures",
|
||||
"glob",
|
||||
"image",
|
||||
"linked-hash-map",
|
||||
"noise",
|
||||
"rand 0.8.3",
|
||||
"shaderc",
|
||||
"wgpu",
|
||||
"wgpu_glyph",
|
||||
"winit",
|
||||
"yaml-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.2.8"
|
||||
|
||||
+2
-4
@@ -1,11 +1,9 @@
|
||||
[package]
|
||||
name = "wgpufun"
|
||||
name = "VoxelGame"
|
||||
version = "0.1.0"
|
||||
authors = ["Piotrek <piotrek54pl@gmail.com>"]
|
||||
authors = ["Piotrek <hello@pbaja.me>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
winit = "0.24"
|
||||
wgpu = "0.7"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
Reference in New Issue
Block a user