Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated "tiled" dependencies #452

Merged
merged 1 commit into from
Dec 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tiled/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ version = "0.1.0"

[dependencies]
find_folder = "0.3.0"
piston = "0.33.0"
piston_window = "0.70.0"
tiled = "0.7.2"
piston = "0.49.0"
piston_window = "0.105.0"
tiled = "0.8.1"
7 changes: 4 additions & 3 deletions tiled/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ fn main() {
let opengl = OpenGL::V3_2;
let mut window: PistonWindow = WindowSettings::new("piston: tiled", [600, 600])
.exit_on_esc(true)
.opengl(opengl)
.graphics_api(opengl)
.build()
.unwrap();

let tileset = map.get_tileset_by_gid(1).unwrap();
let tile_width = tileset.tile_width;
let tile_height = tileset.tile_height;

let ref mut texture_context = window.create_texture_context();
let tilesheet = assets.join(&tileset.images[0].source);
let tilesheet = Texture::from_path(
&mut window.factory,
texture_context,
&tilesheet,
Flip::None,
&TextureSettings::new(),
Expand All @@ -38,7 +39,7 @@ fn main() {
let image = Image::new();

while let Some(e) = window.next() {
window.draw_2d(&e, |c, g| {
window.draw_2d(&e, |c, g, _| {
clear([0.5; 4], g);

for (y, row) in layer.tiles.iter().enumerate().clone() {
Expand Down