summaryrefslogtreecommitdiff
path: root/graphics/src/render.rs
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/src/render.rs')
-rw-r--r--graphics/src/render.rs21
1 files changed, 9 insertions, 12 deletions
diff --git a/graphics/src/render.rs b/graphics/src/render.rs
index bbfa2b9..9129970 100644
--- a/graphics/src/render.rs
+++ b/graphics/src/render.rs
@@ -48,23 +48,20 @@ macro_rules! draw_text {
#[cfg(not(feature = "static"))]
macro_rules! load_texture {
- ($handle:expr, $thread:expr, $filepath:expr) => (
+ ($handle:expr, $thread:expr, $filepath:expr) => {
$handle.load_texture($thread, $filepath)?
- )
+ };
}
#[cfg(feature = "static")]
macro_rules! load_texture {
- ($handle:expr, $thread:expr, $filepath:expr) => (
- {
- let bytes = include_bytes!(concat!("../../", $filepath));
- let len = $filepath.len();
- let ext = &$filepath[len-4..];
- let image = ::raylib::texture::Image::load_image_from_mem(ext, bytes)?;
- $handle.load_texture_from_image($thread, &image)?
- }
-
- )
+ ($handle:expr, $thread:expr, $filepath:expr) => {{
+ let bytes = include_bytes!(concat!("../../", $filepath));
+ let len = $filepath.len();
+ let ext = &$filepath[len - 4..];
+ let image = ::raylib::texture::Image::load_image_from_mem(ext, bytes)?;
+ $handle.load_texture_from_image($thread, &image)?
+ }};
}
/// The baseline size of all ingame sprites and tile textures