Skip to content
This repository has been archived by the owner on Apr 18, 2022. It is now read-only.

Commit

Permalink
Merge #2036
Browse files Browse the repository at this point in the history
2036: Fix examples using ron spritesheets r=azriel91 a=0x6273

## Description

#2023 changed the spritesheet struct, which broke some of the examples that tried to load the old struct from ron files. This pr updates those ron files to use the new `Sprites` struct. 

## Modifications

- update some example ron files to use the new `Sprites` struct

## PR Checklist

By placing an x in the boxes I certify that I have:

- [x] Updated the content of the book if this PR would make the book outdated.
- [x] Added a changelog entry if this will impact users, or modified more than 5 lines of Rust that wasn't a doc comment.
- [x] Added unit tests for new code added in this PR.
- [x] Acknowledged that by making this pull request I release this code under an MIT/Apache 2.0 dual licensing scheme.

If this modified or created any rs files:

- [x] Ran `cargo +stable fmt --all`
- [x] Ran `cargo clippy --all --features "empty"`
- [x] Ran `cargo test --all --features "empty"`

Co-authored-by: 0x40 <0x40@keemail.me>
  • Loading branch information
bors[bot] and 0x6273 committed Nov 15, 2019
2 parents c02079a + 15dd8c9 commit 821a580
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 1,587 deletions.
24 changes: 10 additions & 14 deletions examples/assets/texture/Background.ron
@@ -1,17 +1,13 @@
/*!
@import /amethyst_rendy/src/sprite/mod.rs#SpriteList
SpriteList
@import /amethyst_rendy/src/sprite/mod.rs#Sprites
Sprites
*/

(
texture_width: 512,
texture_height: 512,
sprites: [
(
x: 0,
y: 0,
width: 512,
height: 512,
),
],
)
#![enable(implicit_some)]

Grid((
texture_width: 512,
texture_height: 512,
columns: 1,
rows: 1,
))
30 changes: 10 additions & 20 deletions examples/assets/texture/Circle_Spritesheet.ron
@@ -1,23 +1,13 @@
/*!
@import /amethyst_rendy/src/sprite/mod.rs#SpriteList
SpriteList
@import /amethyst_rendy/src/sprite/mod.rs#Sprites
Sprites
*/

(
texture_width: 128,
texture_height: 64,
sprites: [
(
x: 0,
y: 0,
width: 64,
height: 64,
),
(
x: 64,
y: 0,
width: 64,
height: 64,
),
],
)
#![enable(implicit_some)]

Grid((
texture_width: 128,
texture_height: 64,
columns: 2,
rows: 1,
))

0 comments on commit 821a580

Please sign in to comment.