allow inlining (this did not provide a statistically significant performance boost - oh well)
This commit is contained in:
@@ -4,6 +4,7 @@ use crate::game::{RoomType, RoomFormat};
|
||||
pub mod image {
|
||||
use crate::Image;
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn chequers_1() -> Image {
|
||||
Image {
|
||||
pixels: vec![
|
||||
@@ -14,6 +15,7 @@ pub mod image {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn chequers_2() -> Image {
|
||||
Image {
|
||||
pixels: vec![
|
||||
@@ -25,6 +27,7 @@ pub mod image {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn avatar() -> Sprite {
|
||||
Sprite {
|
||||
id: 0,
|
||||
@@ -53,6 +56,7 @@ pub fn avatar() -> Sprite {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn tile_default() -> Tile {
|
||||
Tile {
|
||||
id: 10,
|
||||
@@ -69,6 +73,7 @@ pub fn tile_default() -> Tile {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn sprite() -> Sprite {
|
||||
Sprite {
|
||||
id: 10,
|
||||
@@ -88,6 +93,7 @@ pub fn sprite() -> Sprite {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn item() -> Item {
|
||||
Item {
|
||||
id: 6,
|
||||
@@ -104,6 +110,7 @@ pub fn item() -> Item {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn room() -> Room {
|
||||
Room {
|
||||
id: 10,
|
||||
@@ -407,6 +414,7 @@ pub fn room() -> Room {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn game_default() -> Game {
|
||||
Game {
|
||||
name: "Write your game's title here".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user