Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#234 : Big commit. Separates embedding into bracket-embedding crate, …
…and REX loading/saving/color into bracket-rex crate. Passes all local unit testing and examples run, will need integration testing with Hands-on Rust and Roguelike Tutorial.
- Loading branch information
1 parent
1bf31b9
commit aaeecb7
Showing
23 changed files
with
407 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "bracket-embedding" | ||
version = "0.8.0" | ||
edition = "2018" | ||
publish = false | ||
description = "Provides resource embedding services for bracket-lib" | ||
homepage = "https://github.com/thebracket/bracket-lib" | ||
repository = "https://github.com/thebracket/bracket-lib" | ||
readme = "README.md" | ||
keywords = ["roguelike", "gamedev", "terminal", "ascii", "cp437"] | ||
categories = ["game-engines"] | ||
license = "MIT" | ||
|
||
[dependencies] | ||
parking_lot = { version = "~0.11.1" } | ||
lazy_static = "1.4.0" |
6 changes: 3 additions & 3 deletions
6
bracket-terminal/src/embedding.rs → bracket-embedding/src/embedding.rs
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
mod embedding; | ||
|
||
pub mod prelude { | ||
pub use crate::embedding::*; | ||
pub use crate::{embedded_resource, link_resource}; | ||
} | ||
|
||
#[macro_export] | ||
macro_rules! embedded_resource { | ||
($resource_name : ident, $filename : expr) => { | ||
const $resource_name: &'static [u8] = include_bytes!($filename); | ||
}; | ||
} | ||
|
||
#[macro_export] | ||
macro_rules! link_resource { | ||
($resource_name : ident, $filename : expr) => { | ||
EMBED | ||
.lock() | ||
.add_resource($filename.to_string(), $resource_name); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[package] | ||
name = "bracket-rex" | ||
version = "0.8.0" | ||
edition = "2018" | ||
publish = false | ||
description = "Load/save REX Paint files and utilize them in bracket-terminal projects." | ||
homepage = "https://github.com/thebracket/bracket-lib" | ||
repository = "https://github.com/thebracket/bracket-lib" | ||
readme = "README.md" | ||
keywords = ["roguelike", "gamedev", "terminal", "ascii", "cp437"] | ||
categories = ["game-engines"] | ||
license = "MIT" | ||
|
||
[dependencies] | ||
byteorder = "1.4.2" | ||
flate2 = "1.0.20" | ||
bracket-color = { path = "../bracket-color", version = "~0.8.2", features = [ "palette" ] } | ||
bracket-embedding = { path = "../bracket-embedding", version = "~0.8" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
mod rex; | ||
mod xpcolor; | ||
|
||
pub mod prelude { | ||
pub use crate::rex::*; | ||
pub use crate::xpcolor::*; | ||
} |
Oops, something went wrong.