summary refs log tree commit diff stats
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/map_render.cpp4
-rw-r--r--src/components/player_physics.cpp4
-rw-r--r--src/components/player_sprite.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/components/map_render.cpp b/src/components/map_render.cpp index 3b6b9c4..10c5db8 100644 --- a/src/components/map_render.cpp +++ b/src/components/map_render.cpp
@@ -6,7 +6,7 @@ MapRenderComponent::MapRenderComponent(const Map& map) : screen(GAME_WIDTH, GAME
6{ 6{
7 screen.fill(screen.entirety(), 0, 0, 0); 7 screen.fill(screen.entirety(), 0, 0, 0);
8 8
9 Texture tiles("../res/tiles.png"); 9 Texture tiles("res/tiles.png");
10 10
11 for (int i=0; i<MAP_WIDTH*MAP_HEIGHT; i++) 11 for (int i=0; i<MAP_WIDTH*MAP_HEIGHT; i++)
12 { 12 {
@@ -22,7 +22,7 @@ MapRenderComponent::MapRenderComponent(const Map& map) : screen(GAME_WIDTH, GAME
22 } 22 }
23 } 23 }
24 24
25 Texture font("../res/font.bmp"); 25 Texture font("res/font.bmp");
26 std::string map_name = map.getTitle(); 26 std::string map_name = map.getTitle();
27 int start_x = (40/2) - (map_name.length()/2); 27 int start_x = (40/2) - (map_name.length()/2);
28 for (size_t i=0; i<map_name.length(); i++) 28 for (size_t i=0; i<map_name.length(); i++)
diff --git a/src/components/player_physics.cpp b/src/components/player_physics.cpp index 1be43b6..e366d6e 100644 --- a/src/components/player_physics.cpp +++ b/src/components/player_physics.cpp
@@ -38,14 +38,14 @@ void PlayerPhysicsComponent::receive(Game&, Entity& entity, const Message& msg)
38 { 38 {
39 if (isFalling) 39 if (isFalling)
40 { 40 {
41 playSound("../res/Randomize27.wav", 0.05); 41 playSound("res/Randomize27.wav", 0.05);
42 isFalling = false; 42 isFalling = false;
43 } 43 }
44 44
45 velocity.second = 0.0; 45 velocity.second = 0.0;
46 } else if (msg.type == Message::Type::jump) 46 } else if (msg.type == Message::Type::jump)
47 { 47 {
48 playSound("../res/Randomize87.wav", 0.25); 48 playSound("res/Randomize87.wav", 0.25);
49 49
50 velocity.second = jump_velocity; 50 velocity.second = jump_velocity;
51 accel.second = jump_gravity; 51 accel.second = jump_gravity;
diff --git a/src/components/player_sprite.cpp b/src/components/player_sprite.cpp index 2814852..452a940 100644 --- a/src/components/player_sprite.cpp +++ b/src/components/player_sprite.cpp
@@ -1,6 +1,6 @@
1#include "player_sprite.h" 1#include "player_sprite.h"
2 2
3PlayerSpriteComponent::PlayerSpriteComponent() : sprite("../res/Starla.png") 3PlayerSpriteComponent::PlayerSpriteComponent() : sprite("res/Starla.png")
4{ 4{
5 5
6} 6}