Skip to content

Commit

Permalink
add xkcd piece set
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev committed Feb 26, 2025
1 parent 755d1d2 commit a602f44
Show file tree
Hide file tree
Showing 147 changed files with 101 additions and 1,110 deletions.
10 changes: 9 additions & 1 deletion src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ pub enum PieceSet {
Spatial,
Staunty,
Tatiana,
Xkcd,
}

pub struct ByPieceSet<T> {
inner: [T; 35],
inner: [T; 36],
}

impl<T> ByPieceSet<T> {
Expand Down Expand Up @@ -140,6 +141,7 @@ impl<T> ByPieceSet<T> {
Spatial,
Staunty,
Tatiana,
Xkcd,
]
.map(f),
}
Expand Down Expand Up @@ -189,6 +191,7 @@ pub fn sprite_data(board: BoardTheme, pieces: PieceSet) -> &'static [u8] {
Spatial => include_bytes!("../theme/sprites/blue-spatial.gif"),
Staunty => include_bytes!("../theme/sprites/blue-staunty.gif"),
Tatiana => include_bytes!("../theme/sprites/blue-tatiana.gif"),
Xkcd => include_bytes!("../theme/sprites/blue-xkcd.gif"),
},

BoardTheme::Brown => match pieces {
Expand Down Expand Up @@ -227,6 +230,7 @@ pub fn sprite_data(board: BoardTheme, pieces: PieceSet) -> &'static [u8] {
Spatial => include_bytes!("../theme/sprites/brown-spatial.gif"),
Staunty => include_bytes!("../theme/sprites/brown-staunty.gif"),
Tatiana => include_bytes!("../theme/sprites/brown-tatiana.gif"),
Xkcd => include_bytes!("../theme/sprites/brown-xkcd.gif"),
},

BoardTheme::Green => match pieces {
Expand Down Expand Up @@ -265,6 +269,7 @@ pub fn sprite_data(board: BoardTheme, pieces: PieceSet) -> &'static [u8] {
Spatial => include_bytes!("../theme/sprites/green-spatial.gif"),
Staunty => include_bytes!("../theme/sprites/green-staunty.gif"),
Tatiana => include_bytes!("../theme/sprites/green-tatiana.gif"),
Xkcd => include_bytes!("../theme/sprites/green-xkcd.gif"),
},

BoardTheme::Ic => match pieces {
Expand Down Expand Up @@ -303,6 +308,7 @@ pub fn sprite_data(board: BoardTheme, pieces: PieceSet) -> &'static [u8] {
Spatial => include_bytes!("../theme/sprites/ic-spatial.gif"),
Staunty => include_bytes!("../theme/sprites/ic-staunty.gif"),
Tatiana => include_bytes!("../theme/sprites/ic-tatiana.gif"),
Xkcd => include_bytes!("../theme/sprites/ic-xkcd.gif"),
},

BoardTheme::Pink => match pieces {
Expand Down Expand Up @@ -341,6 +347,7 @@ pub fn sprite_data(board: BoardTheme, pieces: PieceSet) -> &'static [u8] {
Spatial => include_bytes!("../theme/sprites/pink-spatial.gif"),
Staunty => include_bytes!("../theme/sprites/pink-staunty.gif"),
Tatiana => include_bytes!("../theme/sprites/pink-tatiana.gif"),
Xkcd => include_bytes!("../theme/sprites/pink-xkcd.gif"),
},

BoardTheme::Purple => match pieces {
Expand Down Expand Up @@ -379,6 +386,7 @@ pub fn sprite_data(board: BoardTheme, pieces: PieceSet) -> &'static [u8] {
Spatial => include_bytes!("../theme/sprites/purple-spatial.gif"),
Staunty => include_bytes!("../theme/sprites/purple-staunty.gif"),
Tatiana => include_bytes!("../theme/sprites/purple-tatiana.gif"),
Xkcd => include_bytes!("../theme/sprites/purple-xkcd.gif"),
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion theme/piece/chess7/bP.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion theme/piece/chess7/bQ.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion theme/piece/chess7/wP.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a602f44

Please sign in to comment.