summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/character_system.cpp2
-rw-r--r--src/main.cpp10
-rw-r--r--src/message_system.cpp12
-rw-r--r--src/step_type.h22
4 files changed, 23 insertions, 23 deletions
diff --git a/src/character_system.cpp b/src/character_system.cpp index 2f26aee..4d2d338 100644 --- a/src/character_system.cpp +++ b/src/character_system.cpp
@@ -123,7 +123,7 @@ void CharacterSystem::tick(double dt) {
123 123
124 if (blocked && sprite.characterState == CharacterState::Running) { 124 if (blocked && sprite.characterState == CharacterState::Running) {
125 stopRunning(spriteId); 125 stopRunning(spriteId);
126 game_.getMixer().playSound("../res/bump.wav"); 126 game_.getMixer().playSound("../res/sfx/bump.wav");
127 } 127 }
128 128
129 // Move everything 129 // Move everything
diff --git a/src/main.cpp b/src/main.cpp index 8f23881..4c560c7 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -22,28 +22,28 @@ void loop(Renderer& renderer) {
22 game.emplaceSystem<MessageSystem>(); 22 game.emplaceSystem<MessageSystem>();
23 game.emplaceSystem<ScriptSystem>(); 23 game.emplaceSystem<ScriptSystem>();
24 24
25 auto map = std::make_unique<Map>("../res/map1.tmx", renderer); 25 auto map = std::make_unique<Map>("../res/maps/map1.tmx", renderer);
26 game.setMap(std::move(map)); 26 game.setMap(std::move(map));
27 27
28 int lucasSprite = game.emplaceSprite(); 28 int lucasSprite = game.emplaceSprite();
29 game.getSystem<TransformSystem>().initSprite(lucasSprite, {32, 32}); 29 game.getSystem<TransformSystem>().initSprite(lucasSprite, {32, 32});
30 game.getSystem<AnimationSystem>().initSprite(lucasSprite, "../res/lucas_anim.txt", renderer); 30 game.getSystem<AnimationSystem>().initSprite(lucasSprite, "../res/sprites/lucas_anim.txt", renderer);
31 game.getSprite(lucasSprite).controllable = true; 31 game.getSprite(lucasSprite).controllable = true;
32 game.getSystem<CharacterSystem>().initSprite(lucasSprite); 32 game.getSystem<CharacterSystem>().initSprite(lucasSprite);
33 33
34 int kumaSprite = game.emplaceSprite(); 34 int kumaSprite = game.emplaceSprite();
35 game.getSystem<TransformSystem>().initSprite(kumaSprite, {32, 32}); 35 game.getSystem<TransformSystem>().initSprite(kumaSprite, {32, 32});
36 game.getSystem<AnimationSystem>().initSprite(kumaSprite, "../res/kuma_anim.txt", renderer); 36 game.getSystem<AnimationSystem>().initSprite(kumaSprite, "../res/sprites/kuma_anim.txt", renderer);
37 game.getSystem<CharacterSystem>().addSpriteToParty(lucasSprite, kumaSprite); 37 game.getSystem<CharacterSystem>().addSpriteToParty(lucasSprite, kumaSprite);
38 38
39 int dusterSprite = game.emplaceSprite(); 39 int dusterSprite = game.emplaceSprite();
40 game.getSystem<TransformSystem>().initSprite(dusterSprite, {32, 32}); 40 game.getSystem<TransformSystem>().initSprite(dusterSprite, {32, 32});
41 game.getSystem<AnimationSystem>().initSprite(dusterSprite, "../res/duster_anim.txt", renderer); 41 game.getSystem<AnimationSystem>().initSprite(dusterSprite, "../res/sprites/duster_anim.txt", renderer);
42 game.getSystem<CharacterSystem>().addSpriteToParty(lucasSprite, dusterSprite); 42 game.getSystem<CharacterSystem>().addSpriteToParty(lucasSprite, dusterSprite);
43 43
44 int boneySprite = game.emplaceSprite(); 44 int boneySprite = game.emplaceSprite();
45 game.getSystem<TransformSystem>().initSprite(boneySprite, {32, 32}); 45 game.getSystem<TransformSystem>().initSprite(boneySprite, {32, 32});
46 game.getSystem<AnimationSystem>().initSprite(boneySprite, "../res/boney_anim.txt", renderer); 46 game.getSystem<AnimationSystem>().initSprite(boneySprite, "../res/sprites/boney_anim.txt", renderer);
47 game.getSystem<CharacterSystem>().addSpriteToParty(lucasSprite, boneySprite); 47 game.getSystem<CharacterSystem>().addSpriteToParty(lucasSprite, boneySprite);
48 48
49 game.getSystem<CameraSystem>().setFollowingSprite(lucasSprite); 49 game.getSystem<CameraSystem>().setFollowingSprite(lucasSprite);
diff --git a/src/message_system.cpp b/src/message_system.cpp index 67c840e..4a31a69 100644 --- a/src/message_system.cpp +++ b/src/message_system.cpp
@@ -27,15 +27,15 @@ void MessageSystem::tick(double dt) {
27 // Every so often play a beep. 27 // Every so often play a beep.
28 if (line.charsRevealed % CHARS_PER_BEEP == 0) { 28 if (line.charsRevealed % CHARS_PER_BEEP == 0) {
29 if (speaker_ == SpeakerType::Man) { 29 if (speaker_ == SpeakerType::Man) {
30 game_.getMixer().playSound("../res/speaking_man.wav"); 30 game_.getMixer().playSound("../res/sfx/speaking_man.wav");
31 } else if (speaker_ == SpeakerType::Woman) { 31 } else if (speaker_ == SpeakerType::Woman) {
32 game_.getMixer().playSound("../res/speaking_woman.wav"); 32 game_.getMixer().playSound("../res/sfx/speaking_woman.wav");
33 } else if (speaker_ == SpeakerType::Boy) { 33 } else if (speaker_ == SpeakerType::Boy) {
34 game_.getMixer().playSound("../res/speaking_boy.wav"); 34 game_.getMixer().playSound("../res/sfx/speaking_boy.wav");
35 } else if (speaker_ == SpeakerType::Girl) { 35 } else if (speaker_ == SpeakerType::Girl) {
36 game_.getMixer().playSound("../res/speaking_girl.wav"); 36 game_.getMixer().playSound("../res/sfx/speaking_girl.wav");
37 } else if (speaker_ == SpeakerType::Nonhuman) { 37 } else if (speaker_ == SpeakerType::Nonhuman) {
38 game_.getMixer().playSound("../res/speaking_nonhuman.wav"); 38 game_.getMixer().playSound("../res/sfx/speaking_nonhuman.wav");
39 } 39 }
40 } 40 }
41 41
@@ -198,7 +198,7 @@ void MessageSystem::advanceText() {
198 if (lines_.empty()) { 198 if (lines_.empty()) {
199 linesToShow_.clear(); 199 linesToShow_.clear();
200 } else { 200 } else {
201 game_.getMixer().playSound("../res/pageflip.wav"); 201 game_.getMixer().playSound("../res/sfx/pageflip.wav");
202 } 202 }
203} 203}
204 204
diff --git a/src/step_type.h b/src/step_type.h index c38d6f9..a961a8f 100644 --- a/src/step_type.h +++ b/src/step_type.h
@@ -36,17 +36,17 @@ inline StepType stepTypeFromString(std::string_view str) {
36 36
37inline std::string_view runningSfxForStepType(StepType step) { 37inline std::string_view runningSfxForStepType(StepType step) {
38 switch (step) { 38 switch (step) {
39 case StepType::wood: return "../res/running_wood.wav"; 39 case StepType::wood: return "../res/sfx/running_wood.wav";
40 case StepType::land_light: return "../res/running_land_light.wav"; 40 case StepType::land_light: return "../res/sfx/running_land_light.wav";
41 case StepType::land: return "../res/running_land.wav"; 41 case StepType::land: return "../res/sfx/running_land.wav";
42 case StepType::sand: return "../res/running_sand.wav"; 42 case StepType::sand: return "../res/sfx/running_sand.wav";
43 case StepType::water: return "../res/running_water.wav"; 43 case StepType::water: return "../res/sfx/running_water.wav";
44 case StepType::mechanical: return "../res/running_mechanical.wav"; 44 case StepType::mechanical: return "../res/sfx/running_mechanical.wav";
45 case StepType::grass: return "../res/running_grass.wav"; 45 case StepType::grass: return "../res/sfx/running_grass.wav";
46 case StepType::unknown: return "../res/running_unknown.wav"; 46 case StepType::unknown: return "../res/sfx/running_unknown.wav";
47 case StepType::paved: return "../res/running_paved.wav"; 47 case StepType::paved: return "../res/sfx/running_paved.wav";
48 case StepType::carpet: return "../res/running_carpet.wav"; 48 case StepType::carpet: return "../res/sfx/running_carpet.wav";
49 case StepType::weak_wood: return "../res/running_weak_wood.wav"; 49 case StepType::weak_wood: return "../res/sfx/running_weak_wood.wav";
50 case StepType::none: throw std::invalid_argument("No running sfx for none step type"); 50 case StepType::none: throw std::invalid_argument("No running sfx for none step type");
51 } 51 }
52} 52}