mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-11 02:08:01 -06:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b66c9ce135 | |||
| f5363516c3 |
@@ -35,7 +35,7 @@ default-features = false
|
|||||||
features = ["ttf","image","gfx","mixer","static-link","use-vcpkg"]
|
features = ["ttf","image","gfx","mixer","static-link","use-vcpkg"]
|
||||||
|
|
||||||
[package.metadata.vcpkg]
|
[package.metadata.vcpkg]
|
||||||
dependencies = ["sdl2", "sdl2-image[libjpeg-turbo,tiff,libwebp]", "sdl2-ttf", "sdl2-gfx", "sdl2-mixer"]
|
dependencies = ["sdl2", "sdl2-image", "sdl2-ttf", "sdl2-gfx", "sdl2-mixer"]
|
||||||
git = "https://github.com/microsoft/vcpkg"
|
git = "https://github.com/microsoft/vcpkg"
|
||||||
rev = "2024.05.24" # release 2024.05.24 # to check for a new one, check https://github.com/microsoft/vcpkg/releases
|
rev = "2024.05.24" # release 2024.05.24 # to check for a new one, check https://github.com/microsoft/vcpkg/releases
|
||||||
|
|
||||||
|
|||||||
19
src/asset.rs
19
src/asset.rs
@@ -31,6 +31,25 @@ pub enum Asset {
|
|||||||
// Add more as needed
|
// Add more as needed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Asset {
|
||||||
|
pub fn path(&self) -> &str {
|
||||||
|
use Asset::*;
|
||||||
|
match self {
|
||||||
|
Wav1 => "wav/1.ogg",
|
||||||
|
Wav2 => "wav/2.ogg",
|
||||||
|
Wav3 => "wav/3.ogg",
|
||||||
|
Wav4 => "wav/4.ogg",
|
||||||
|
Pacman => "32/pacman.png",
|
||||||
|
Pellet => "24/pellet.png",
|
||||||
|
Energizer => "24/energizer.png",
|
||||||
|
Map => "map.png",
|
||||||
|
FontKonami => "font/konami.ttf",
|
||||||
|
GhostBody => "32/ghost_body.png",
|
||||||
|
GhostEyes => "32/ghost_eyes.png",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(not(target_os = "emscripten"))]
|
#[cfg(not(target_os = "emscripten"))]
|
||||||
mod imp {
|
mod imp {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|||||||
Reference in New Issue
Block a user