very basic worldgen

This commit is contained in:
Dominic 2024-07-06 18:45:54 +02:00
parent 7ac86cbc11
commit f3b8d44034
Signed by: msrd0
GPG key ID: AAF7C8430CA3345D
3 changed files with 218 additions and 19 deletions

View file

@ -7,7 +7,7 @@ pub mod worldgen;
pub fn draw(state: &crate::State, _engine: &comfy::EngineContext<'_>) {
draw_circle(vec2(0.0, 0.0), 0.5, GREEN, 0);
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() {
let i = i as i32;
draw_sprite(
*texture,