aboutsummaryrefslogtreecommitdiff
path: root/src/example
diff options
context:
space:
mode:
Diffstat (limited to 'src/example')
-rw-r--r--src/example/audio_internal.cpp8
-rw-r--r--src/example/particles.cpp2
-rw-r--r--src/example/rendering.cpp10
3 files changed, 10 insertions, 10 deletions
diff --git a/src/example/audio_internal.cpp b/src/example/audio_internal.cpp
index 661161a..1647f20 100644
--- a/src/example/audio_internal.cpp
+++ b/src/example/audio_internal.cpp
@@ -25,11 +25,11 @@ int _ = []() {
int main() {
// Load a background track (Ogg Vorbis)
- auto bgm = Sound("../mwe/audio/bgm.ogg");
+ auto bgm = Sound("mwe/audio/bgm.ogg");
// Load three short samples (WAV)
- auto sfx1 = Sound("../mwe/audio/sfx1.wav");
- auto sfx2 = Sound("../mwe/audio/sfx2.wav");
- auto sfx3 = Sound("../mwe/audio/sfx3.wav");
+ auto sfx1 = Sound("mwe/audio/sfx1.wav");
+ auto sfx2 = Sound("mwe/audio/sfx2.wav");
+ auto sfx3 = Sound("mwe/audio/sfx3.wav");
// Start the background track
bgm.play();
diff --git a/src/example/particles.cpp b/src/example/particles.cpp
index 3d5f676..d4638a2 100644
--- a/src/example/particles.cpp
+++ b/src/example/particles.cpp
@@ -18,7 +18,7 @@ int main(int argc, char * argv[]) {
GameObject game_object = mgr.new_object("", "", Vector2{0, 0}, 0, 0);
Color color(0, 0, 0, 0);
Sprite test_sprite = game_object.add_component<Sprite>(
- make_shared<Texture>("../asset/texture/img.png"), color, FlipSettings{true, true});
+ make_shared<Texture>("asset/texture/img.png"), color, FlipSettings{true, true});
game_object.add_component<ParticleEmitter>(ParticleEmitter::Data{
.position = {0, 0},
.max_particles = 100,
diff --git a/src/example/rendering.cpp b/src/example/rendering.cpp
index ecd3f6a..522ec0f 100644
--- a/src/example/rendering.cpp
+++ b/src/example/rendering.cpp
@@ -31,16 +31,16 @@ int main() {
{
Color color(0, 0, 0, 0);
Sprite & sprite
- = obj.add_component<Sprite>(make_shared<Texture>("../asset/texture/img.png"),
+ = obj.add_component<Sprite>(make_shared<Texture>("asset/texture/img.png"),
color, FlipSettings{false, false});
sprite.sorting_in_layer = 2;
sprite.order_in_layer = 1;
- obj.add_component<Camera>(Color::get_red());
+ obj.add_component<Camera>(Color::RED);
}
{
Color color(0, 0, 0, 0);
Sprite & sprite = obj1.add_component<Sprite>(
- make_shared<Texture>("../asset/texture/img.png"), color, FlipSettings{true, true});
+ make_shared<Texture>("asset/texture/img.png"), color, FlipSettings{true, true});
sprite.sorting_in_layer = 2;
sprite.order_in_layer = 2;
}
@@ -48,7 +48,7 @@ int main() {
{
Color color(0, 0, 0, 0);
Sprite & sprite = obj2.add_component<Sprite>(
- make_shared<Texture>("../asset/texture/img.png"), color, FlipSettings{true, true});
+ make_shared<Texture>("asset/texture/img.png"), color, FlipSettings{true, true});
sprite.sorting_in_layer = 1;
sprite.order_in_layer = 2;
}
@@ -56,7 +56,7 @@ int main() {
/*
{
Color color(0, 0, 0, 0);
- auto img = mgr.cache<Texture>("../asset/texture/second.png");
+ auto img = mgr.cache<Texture>("asset/texture/second.png");
obj2.add_component<Sprite>(img, color, FlipSettings{true, true});
}
*/