Static World Gen and Display for the Overworld #5
2 changed files with 7 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
||||||
use comfy::{draw_circle, vec2, EngineContext, GREEN};
|
use comfy::{draw_circle, draw_sprite, vec2, EngineContext, Vec2, GREEN};
|
||||||
|
|
||||||
use crate::game::ZLayer;
|
use crate::game::ZLayer;
|
||||||
|
|
||||||
pub mod worldgen;
|
pub mod worldgen;
|
||||||
|
|
||||||
pub fn draw(state: &crate::State, _engine: &comfy::EngineContext) {
|
pub fn draw(state: &crate::State, _engine: &comfy::EngineContext<'_>) {
|
||||||
draw_circle(vec2(0.0, 0.0), 0.5, GREEN, 0);
|
draw_circle(vec2(0.0, 0.0), 0.5, GREEN, 0);
|
||||||
for (coords, tile) in state.overworld.iter_tiles() {
|
for (coords, tile) in state.overworld.iter_tiles() {
|
||||||
for (i, texture) in tile.textures.iter().rev().enumerate() {
|
for (i, texture) in tile.textures.iter().rev().enumerate() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#[allow(dead_code, unused_variables)]
|
|
||||||
#![warn(rust_2018_idioms)]
|
#![warn(rust_2018_idioms)]
|
||||||
#![forbid(clippy::wildcard_imports, elided_lifetimes_in_paths, unsafe_code)]
|
#![forbid(clippy::wildcard_imports, elided_lifetimes_in_paths, unsafe_code)]
|
||||||
|
#[allow(dead_code, unused_variables)]
|
||||||
|
|
||||||
mod assets {
|
mod assets {
|
||||||
include!(env!("ASSETS_RS"));
|
include!(env!("ASSETS_RS"));
|
||||||
|
@ -13,7 +13,10 @@ use self::{
|
||||||
activities::{overworld::worldgen::Overworld, Activity},
|
activities::{overworld::worldgen::Overworld, Activity},
|
||||||
assets::Assets
|
assets::Assets
|
||||||
};
|
};
|
||||||
use comfy::{GameLoop, EngineState, EngineContext, GameConfig, init_game_config, run_comfy_main_async, pollster};
|
use comfy::{
|
||||||
|
init_game_config, pollster, run_comfy_main_async, EngineContext, EngineState,
|
||||||
|
GameConfig, GameLoop
|
||||||
|
};
|
||||||
|
|
||||||
const GAME_NAME: &str = "Powercreep";
|
const GAME_NAME: &str = "Powercreep";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue