Use relative paths to load textures and sounds
This commit is contained in:
parent
63096025bd
commit
b048386a1d
@ -76,28 +76,28 @@ impl AudioThread {
|
|||||||
let fan_startup = {
|
let fan_startup = {
|
||||||
let mut fan_startup = Wav::default();
|
let mut fan_startup = Wav::default();
|
||||||
fan_startup
|
fan_startup
|
||||||
.load("/home/pjht/projects/altair_emu/resources/fan1.wav")
|
.load("resources/fan1.wav")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
fan_startup
|
fan_startup
|
||||||
};
|
};
|
||||||
let fan_loop = {
|
let fan_loop = {
|
||||||
let mut fan_loop = Wav::default();
|
let mut fan_loop = Wav::default();
|
||||||
fan_loop
|
fan_loop
|
||||||
.load("/home/pjht/projects/altair_emu/resources/fan2.wav")
|
.load("resources/fan2.wav")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
fan_loop
|
fan_loop
|
||||||
};
|
};
|
||||||
let fan_shutdown = {
|
let fan_shutdown = {
|
||||||
let mut fan_shutdown = Wav::default();
|
let mut fan_shutdown = Wav::default();
|
||||||
fan_shutdown
|
fan_shutdown
|
||||||
.load("/home/pjht/projects/altair_emu/resources/fan3.wav")
|
.load("resources/fan3.wav")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
fan_shutdown
|
fan_shutdown
|
||||||
};
|
};
|
||||||
let sw_click = {
|
let sw_click = {
|
||||||
let mut sw_click = Wav::default();
|
let mut sw_click = Wav::default();
|
||||||
sw_click
|
sw_click
|
||||||
.load("/home/pjht/projects/altair_emu/resources/click2.wav")
|
.load("resources/click2.wav")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
sw_click
|
sw_click
|
||||||
};
|
};
|
||||||
|
@ -236,37 +236,37 @@ impl Textures {
|
|||||||
fp: Self::load_texture(
|
fp: Self::load_texture(
|
||||||
ctx,
|
ctx,
|
||||||
"fp",
|
"fp",
|
||||||
"/home/pjht/projects/altair_emu/resources/altair800.png",
|
"resources/altair800.png",
|
||||||
)
|
)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
sw_up: Self::load_texture(
|
sw_up: Self::load_texture(
|
||||||
ctx,
|
ctx,
|
||||||
"sw_up",
|
"sw_up",
|
||||||
"/home/pjht/projects/altair_emu/resources/Togup.png",
|
"resources/Togup.png",
|
||||||
)
|
)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
sw_neut: Self::load_texture(
|
sw_neut: Self::load_texture(
|
||||||
ctx,
|
ctx,
|
||||||
"sw_neut",
|
"sw_neut",
|
||||||
"/home/pjht/projects/altair_emu/resources/Togneut.png",
|
"resources/Togneut.png",
|
||||||
)
|
)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
sw_down: Self::load_texture(
|
sw_down: Self::load_texture(
|
||||||
ctx,
|
ctx,
|
||||||
"sw_down",
|
"sw_down",
|
||||||
"/home/pjht/projects/altair_emu/resources/Togdown.png",
|
"resources/Togdown.png",
|
||||||
)
|
)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
led_off: Self::load_texture(
|
led_off: Self::load_texture(
|
||||||
ctx,
|
ctx,
|
||||||
"led_off",
|
"led_off",
|
||||||
"/home/pjht/projects/altair_emu/resources/Led_off.png",
|
"resources/Led_off.png",
|
||||||
)
|
)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
led_on: Self::load_texture(
|
led_on: Self::load_texture(
|
||||||
ctx,
|
ctx,
|
||||||
"led_on",
|
"led_on",
|
||||||
"/home/pjht/projects/altair_emu/resources/Led_on.png",
|
"resources/Led_on.png",
|
||||||
)
|
)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user