Skip to content

Commit

Permalink
Various small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tversteeg committed Mar 3, 2018
1 parent fac2589 commit 1ec5735
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ cgmath = "0.16"
collision = "0.14"

[build-dependencies]
git2 = "0.6"
git2 = "0.7"
blit = "0.4"
image = "0.18"
2 changes: 0 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ use git2::Repository;
fn save_blit_buffer_from_image(folder: &str, name: &str, mask_color: u32) {
let path = format!("assets/{}/{}", folder, name);

println!("Converting image \"{}\" to blit buffer", path);

let img = image::open(path).unwrap();
let img_as_rgb8 = match img.as_rgb8() {
Some(i) => i,
Expand Down
6 changes: 3 additions & 3 deletions src/level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ pub fn place_turrets(world: &mut World, level: u8) {
..Turret::default()
})
.with(Point::new(1255.0, 315.0))
.with(Arrow(10.0))
.with(Arrow(7.0))
.with(Line::new(0x663931))
.with(ProjectileBoundingBox(BoundingBox::new(Point::new(0.0, 0.0), Point::new(1.0, 1.0))))
.with(Damage(10.0))
.build();

for i in 0..10 {
for i in 0..5 {
let health = 50.0;

world.create_entity()
Expand All @@ -146,7 +146,7 @@ pub fn place_turrets(world: &mut World, level: u8) {
.build();
}

for i in 0..40 {
for i in 0..20 {
let health = 20.0;

world.create_entity()
Expand Down
2 changes: 0 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ fn main() {
let title = format!("Castle Game {} - Press ESC to exit.", env!("CARGO_PKG_VERSION"));
let mut window = Window::new(&title, WIDTH, HEIGHT, WindowOptions::default()).expect("Unable to open window");

window.set_cursor_style(CursorStyle::Crosshair);

// Setup the GUI system
let mut gui = IngameGui::new((WIDTH as i32, HEIGHT as i32));

Expand Down
2 changes: 1 addition & 1 deletion src/turret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<'a> System<'a> for TurretSystem {

let mut variation = 0.0;
if turret.strength_variation > 0.0 {
let between = Range::new(-turret.strength_variation, turret.strength_variation);
let between = Range::new(-turret.strength_variation / 2.0, turret.strength_variation * 2.0);
variation = 1.0 + between.ind_sample(&mut rand::thread_rng());
}

Expand Down

0 comments on commit 1ec5735

Please sign in to comment.