Skip to content

Commit

Permalink
Release 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
camerondubas committed Aug 20, 2021
1 parent 4b869ad commit f7bdf4f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions resources/template.ron
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Templates(
Template(
entity_type: Enemy,
name: "Goblin",
glyphs: ['g','h'],
glyphs: ['g'],
levels: [0,1,2],
hp: Some(1),
frequency: 3,
Expand All @@ -60,7 +60,7 @@ Templates(
Template(
entity_type: Enemy,
name: "Orc",
glyphs: ['n', 'o'],
glyphs: ['o'],
levels: [0,1,2],
hp: Some(2),
base_damage: Some(1), // This cannot be the bottom item in the Template, due to a parsing error in the RON crate
Expand All @@ -69,7 +69,7 @@ Templates(
Template(
entity_type: Enemy,
name: "Ogre",
glyphs: ['N', 'O'],
glyphs: ['O'],
levels: [ 1, 2 ],
hp: Some(5),
frequency: 1,
Expand All @@ -78,7 +78,7 @@ Templates(
Template(
entity_type: Enemy,
name: "Ettin",
glyphs: ['E', 'F'],
glyphs: ['E'],
levels: [ 2 ],
hp: Some(10),
frequency: 1,
Expand Down
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ mod prelude {
pub const DISPLAY_WIDTH: i32 = SCREEN_WIDTH / 2;
pub const DISPLAY_HEIGHT: i32 = SCREEN_HEIGHT / 2;
pub const NUM_TILES: usize = (SCREEN_WIDTH * SCREEN_HEIGHT) as usize;
pub const TILE_WIDTH: i32 = 16;
pub const TILE_HEIGHT: i32 = 16;
pub const TILESET: &str = "Sprite-0001.png";
pub const TILE_WIDTH: i32 = 32;
pub const TILE_HEIGHT: i32 = 32;
pub const TILESET: &str = "dungeonfont.png";

pub use crate::camera::*;
pub use crate::components::*;
Expand Down Expand Up @@ -282,7 +282,7 @@ fn main() -> BError {
let context = BTermBuilder::new()
.with_title("Dungeon Crawler")
.with_fps_cap(30.0)
.with_dimensions(DISPLAY_WIDTH * 3, DISPLAY_HEIGHT * 3)
.with_dimensions(DISPLAY_WIDTH, DISPLAY_HEIGHT)
.with_tile_dimensions(TILE_WIDTH, TILE_HEIGHT)
.with_resource_path("resources/")
.with_font(TILESET, TILE_WIDTH, TILE_HEIGHT)
Expand Down
9 changes: 4 additions & 5 deletions src/map_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,18 @@ pub struct MapBuilder {

impl MapBuilder {
pub fn new(rng: &mut RandomNumberGenerator) -> Self {
let mut architect: Box<dyn MapArchitect> = match rng.range(0, 4) {
0 => Box::new(EmptyArchitect {}),
let mut architect: Box<dyn MapArchitect> = match rng.range(0, 3) {
0 => Box::new(RoomsArchitect {}),
1 => Box::new(CellularAutomataArchitect {}),
2 => Box::new(DrunkardsWalkArchitect {}),
_ => Box::new(RoomsArchitect {}),
_ => Box::new(DrunkardsWalkArchitect {}),
};

let mut mb = architect.new(rng);
apply_prefab(&mut mb, rng);

mb.theme = match rng.range(0, 2) {
0 => DungeonTheme::new(),
_ => DungeonTheme::new(),
_ => ForestTheme::new(),
};

mb
Expand Down
2 changes: 1 addition & 1 deletion src/spawner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn spawn_player(ecs: &mut World, pos: Point) {
pos,
Render {
color: ColorPair::new(WHITE, BLACK),
glyphs: vec![to_cp437('@'), to_cp437('A')],
glyphs: vec![to_cp437('@')],
},
Health {
current: 10,
Expand Down
3 changes: 2 additions & 1 deletion src/systems/hud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ pub fn hud(ecs: &SubWorld) {

let mut draw_batch = DrawBatch::new();
draw_batch.target(2);
draw_batch.print_centered(1, "Explore te Dungeon. Cursor keys to move.");
draw_batch.print_centered(1, "Explore te Dungeon. WASD to move.");
draw_batch.print_centered(2, "E to pick up. Number keys to use items.");
draw_batch.bar_horizontal(
Point::zero(),
SCREEN_WIDTH * 2,
Expand Down

0 comments on commit f7bdf4f

Please # to comment.