diff --git a/resources/cave_tunnel80x50.xp b/resources/cave_tunnel80x50.xp deleted file mode 100644 index 3b0f9cb..0000000 Binary files a/resources/cave_tunnel80x50.xp and /dev/null differ diff --git a/resources/cave_tunnel80x60.xp b/resources/cave_tunnel80x60.xp new file mode 100644 index 0000000..4ff4a5c Binary files /dev/null and b/resources/cave_tunnel80x60.xp differ diff --git a/src/damage_system.rs b/src/damage_system.rs index 633e708..eb5df75 100644 --- a/src/damage_system.rs +++ b/src/damage_system.rs @@ -50,14 +50,14 @@ pub fn delete_the_dead(ecs: &mut World) { .append("The") .npc_name(&victim_name.name) .colour(rltk::WHITE) - .append("was destroyed.") + .append("was destroyed!") .log(); } else { gamelog::Logger::new() .append("The") .npc_name(&victim_name.name) .colour(rltk::WHITE) - .append("died.") + .append("died!") .log(); } } diff --git a/src/gui.rs b/src/gui.rs index 6786199..bfce50d 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -276,34 +276,34 @@ pub fn main_menu(gs: &mut State, ctx: &mut Rltk) -> MainMenuResult { ctx.render_xp_sprite(&assets.menu, 0, 0); - ctx.print_color(40, 21, RGB::named(rltk::GREEN), RGB::from_f32(0.11, 0.11, 0.11), "RUST-RL"); + ctx.print_color(50, 26, RGB::named(rltk::GREEN), RGB::from_f32(0.11, 0.11, 0.11), "RUST-RL"); if let RunState::MainMenu { menu_selection: selection } = *runstate { - let mut y = 24; + let mut y = 29; if selection == MainMenuSelection::NewGame { - ctx.print_color(37, 24, RGB::named(rltk::YELLOW), RGB::from_f32(0.11, 0.11, 0.11), "["); - ctx.print_color(39, 24, RGB::named(rltk::GREEN), RGB::from_f32(0.11, 0.11, 0.11), "new game"); - ctx.print_color(48, 24, RGB::named(rltk::YELLOW), RGB::from_f32(0.11, 0.11, 0.11), "]"); + ctx.print_color(47, y, RGB::named(rltk::YELLOW), RGB::from_f32(0.11, 0.11, 0.11), "["); + ctx.print_color(49, y, RGB::named(rltk::GREEN), RGB::from_f32(0.11, 0.11, 0.11), "new game"); + ctx.print_color(58, y, RGB::named(rltk::YELLOW), RGB::from_f32(0.11, 0.11, 0.11), "]"); } else { - ctx.print_color(39, 24, RGB::named(rltk::WHITE), RGB::from_f32(0.11, 0.11, 0.11), "new game"); + ctx.print_color(49, y, RGB::named(rltk::WHITE), RGB::from_f32(0.11, 0.11, 0.11), "new game"); } y += 2; if save_exists { if selection == MainMenuSelection::LoadGame { - ctx.print_color(36, y, RGB::named(rltk::YELLOW), RGB::from_f32(0.11, 0.11, 0.11), "["); - ctx.print_color(38, y, RGB::named(rltk::GREEN), RGB::from_f32(0.11, 0.11, 0.11), "load game"); - ctx.print_color(48, y, RGB::named(rltk::YELLOW), RGB::from_f32(0.11, 0.11, 0.11), "]"); + ctx.print_color(46, y, RGB::named(rltk::YELLOW), RGB::from_f32(0.11, 0.11, 0.11), "["); + ctx.print_color(48, y, RGB::named(rltk::GREEN), RGB::from_f32(0.11, 0.11, 0.11), "load game"); + ctx.print_color(58, y, RGB::named(rltk::YELLOW), RGB::from_f32(0.11, 0.11, 0.11), "]"); } else { - ctx.print_color(38, y, RGB::named(rltk::WHITE), RGB::from_f32(0.11, 0.11, 0.11), "load game"); + ctx.print_color(48, y, RGB::named(rltk::WHITE), RGB::from_f32(0.11, 0.11, 0.11), "load game"); } y += 2; } if selection == MainMenuSelection::Quit { - ctx.print_color(37, y, RGB::named(rltk::YELLOW), RGB::from_f32(0.11, 0.11, 0.11), "["); - ctx.print_color(39, y, RGB::named(rltk::GREEN), RGB::from_f32(0.11, 0.11, 0.11), "goodbye!"); - ctx.print_color(48, y, RGB::named(rltk::YELLOW), RGB::from_f32(0.11, 0.11, 0.11), "]"); + ctx.print_color(47, y, RGB::named(rltk::YELLOW), RGB::from_f32(0.11, 0.11, 0.11), "["); + ctx.print_color(49, y, RGB::named(rltk::GREEN), RGB::from_f32(0.11, 0.11, 0.11), "goodbye!"); + ctx.print_color(58, y, RGB::named(rltk::YELLOW), RGB::from_f32(0.11, 0.11, 0.11), "]"); } else { - ctx.print_color(43, y, RGB::named(rltk::WHITE), RGB::from_f32(0.11, 0.11, 0.11), "quit"); + ctx.print_color(53, y, RGB::named(rltk::WHITE), RGB::from_f32(0.11, 0.11, 0.11), "quit"); } match ctx.key { @@ -314,7 +314,7 @@ pub fn main_menu(gs: &mut State, ctx: &mut Rltk) -> MainMenuResult { } VirtualKeyCode::N => return MainMenuResult::NoSelection { selected: MainMenuSelection::NewGame }, VirtualKeyCode::L => return MainMenuResult::NoSelection { selected: MainMenuSelection::LoadGame }, - VirtualKeyCode::Up => { + VirtualKeyCode::Up | VirtualKeyCode::Numpad8 | VirtualKeyCode::J => { let mut new_selection; match selection { MainMenuSelection::NewGame => new_selection = MainMenuSelection::Quit, @@ -326,7 +326,7 @@ pub fn main_menu(gs: &mut State, ctx: &mut Rltk) -> MainMenuResult { } return MainMenuResult::NoSelection { selected: new_selection }; } - VirtualKeyCode::Down => { + VirtualKeyCode::Down | VirtualKeyCode::Numpad2 | VirtualKeyCode::K => { let mut new_selection; match selection { MainMenuSelection::NewGame => new_selection = MainMenuSelection::LoadGame, @@ -338,7 +338,9 @@ pub fn main_menu(gs: &mut State, ctx: &mut Rltk) -> MainMenuResult { } return MainMenuResult::NoSelection { selected: new_selection }; } - VirtualKeyCode::Return => return MainMenuResult::Selected { selected: selection }, + VirtualKeyCode::Return | VirtualKeyCode::NumpadEnter => { + return MainMenuResult::Selected { selected: selection } + } _ => return MainMenuResult::NoSelection { selected: selection }, }, } diff --git a/src/player.rs b/src/player.rs index a031c5c..5e5d296 100644 --- a/src/player.rs +++ b/src/player.rs @@ -119,6 +119,9 @@ pub fn player_input(gs: &mut State, ctx: &mut Rltk) -> RunState { return skip_turn(&mut gs.ecs); // (Wait a turn) } } + VirtualKeyCode::NumpadDecimal => { + return skip_turn(&mut gs.ecs); + } // Items VirtualKeyCode::G => get_item(&mut gs.ecs), diff --git a/src/rex_assets.rs b/src/rex_assets.rs index 2949a5b..caca3fa 100644 --- a/src/rex_assets.rs +++ b/src/rex_assets.rs @@ -1,6 +1,6 @@ use rltk::rex::XpFile; -rltk::embedded_resource!(CAVE_TUNNEL, "../resources/cave_tunnel80x50.xp"); +rltk::embedded_resource!(CAVE_TUNNEL, "../resources/cave_tunnel80x60.xp"); pub struct RexAssets { pub menu: XpFile, @@ -9,8 +9,8 @@ pub struct RexAssets { impl RexAssets { #[allow(clippy::new_without_default)] pub fn new() -> RexAssets { - rltk::link_resource!(CAVE_TUNNEL, "../resources/cave_tunnel80x50.xp"); + rltk::link_resource!(CAVE_TUNNEL, "../resources/cave_tunnel80x60.xp"); - RexAssets { menu: XpFile::from_resource("../resources/cave_tunnel80x50.xp").unwrap() } + RexAssets { menu: XpFile::from_resource("../resources/cave_tunnel80x60.xp").unwrap() } } } diff --git a/src/spawner.rs b/src/spawner.rs index 715a617..b4828de 100644 --- a/src/spawner.rs +++ b/src/spawner.rs @@ -93,15 +93,9 @@ pub fn spawn_room(ecs: &mut World, room: &Rect, map_depth: i32) { let category = category_table().roll(&mut rng); let spawn_table; match category.as_ref() { - "mob" => { - spawn_table = mob_table(map_depth); - } - "item" => { - spawn_table = item_table(map_depth); - } - _ => { - spawn_table = debug_table(); - } + "mob" => spawn_table = mob_table(map_depth), + "item" => spawn_table = item_table(map_depth), + _ => spawn_table = debug_table(), } spawn_points.insert(idx, spawn_table.roll(&mut rng)); added = true;