summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-16 10:30:50 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-16 10:30:50 -0400
commit54b664622737740bbb42c13d594b66a21d58ca5f (patch)
treeddf0ca4f0f30773435ea5814c9a46c6001851968 /src
parentc46db36fe1c319a76cb6bd089b25952db0d98e11 (diff)
downloadtherapy-54b664622737740bbb42c13d594b66a21d58ca5f.tar.gz
therapy-54b664622737740bbb42c13d594b66a21d58ca5f.tar.bz2
therapy-54b664622737740bbb42c13d594b66a21d58ca5f.zip
Removed "../" from file paths
Diffstat (limited to 'src')
-rw-r--r--src/components/map_render.cpp4
-rw-r--r--src/components/player_physics.cpp4
-rw-r--r--src/components/player_sprite.cpp2
-rw-r--r--src/entityfactory.cpp4
-rw-r--r--src/game.cpp2
-rw-r--r--src/map.cpp2
-rw-r--r--src/renderer.cpp18
7 files changed, 18 insertions, 18 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}
diff --git a/src/entityfactory.cpp b/src/entityfactory.cpp index bad72cf..6fb86ca 100644 --- a/src/entityfactory.cpp +++ b/src/entityfactory.cpp
@@ -24,7 +24,7 @@ std::shared_ptr<Entity> EntityFactory::createNamedEntity(const std::string name)
24 EntityData data = factories[name]; 24 EntityData data = factories[name];
25 if (it == factories.end()) 25 if (it == factories.end())
26 { 26 {
27 xmlDocPtr doc = xmlParseFile(("../entities/" + name + ".xml").c_str()); 27 xmlDocPtr doc = xmlParseFile(("entities/" + name + ".xml").c_str());
28 if (doc == nullptr) 28 if (doc == nullptr)
29 { 29 {
30 fprintf(stderr, "Error reading entity %s\n", name.c_str()); 30 fprintf(stderr, "Error reading entity %s\n", name.c_str());
@@ -85,7 +85,7 @@ std::shared_ptr<Entity> EntityFactory::createNamedEntity(const std::string name)
85 if (!strcmp(data.action, "save")) 85 if (!strcmp(data.action, "save"))
86 { 86 {
87 auto component = std::make_shared<SimpleColliderComponent>([&] (Game& game, Entity&) { 87 auto component = std::make_shared<SimpleColliderComponent>([&] (Game& game, Entity&) {
88 playSound("../res/Pickup_Coin23.wav", 0.25); 88 playSound("res/Pickup_Coin23.wav", 0.25);
89 89
90 game.saveGame(); 90 game.saveGame();
91 }); 91 });
diff --git a/src/game.cpp b/src/game.cpp index 20b8564..1c9bb58 100644 --- a/src/game.cpp +++ b/src/game.cpp
@@ -155,7 +155,7 @@ void Game::playerDie()
155{ 155{
156 player->send(*this, Message::Type::die); 156 player->send(*this, Message::Type::die);
157 157
158 playSound("../res/Hit_Hurt5.wav", 0.25); 158 playSound("res/Hit_Hurt5.wav", 0.25);
159 159
160 schedule(0.75, [&] () { 160 schedule(0.75, [&] () {
161 if (*currentMap != *save.map) 161 if (*currentMap != *save.map)
diff --git a/src/map.cpp b/src/map.cpp index 29f22ec..11d1d52 100644 --- a/src/map.cpp +++ b/src/map.cpp
@@ -18,7 +18,7 @@ Map::Map(const std::string name)
18{ 18{
19 this->name = name; 19 this->name = name;
20 20
21 xmlDocPtr doc = xmlParseFile(("../maps/" + name + ".xml").c_str()); 21 xmlDocPtr doc = xmlParseFile(("maps/" + name + ".xml").c_str());
22 if (doc == nullptr) 22 if (doc == nullptr)
23 { 23 {
24 fprintf(stderr, "Error reading map %s\n", name.c_str()); 24 fprintf(stderr, "Error reading map %s\n", name.c_str());
diff --git a/src/renderer.cpp b/src/renderer.cpp index c2b37d2..d50901b 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp
@@ -363,7 +363,7 @@ GLFWwindow* initRenderer()
363 std::vector<glm::vec3> mesh_vertices; 363 std::vector<glm::vec3> mesh_vertices;
364 std::vector<glm::vec2> mesh_uvs; 364 std::vector<glm::vec2> mesh_uvs;
365 std::vector<glm::vec3> mesh_normals; 365 std::vector<glm::vec3> mesh_normals;
366 loadMesh("../res/monitor-fef.obj", mesh_vertices, mesh_uvs, mesh_normals); 366 loadMesh("res/monitor-fef.obj", mesh_vertices, mesh_uvs, mesh_normals);
367 367
368 mesh_numvertices = mesh_vertices.size(); 368 mesh_numvertices = mesh_vertices.size();
369 369
@@ -396,7 +396,7 @@ GLFWwindow* initRenderer()
396 glGenTextures(1, &artifactsTex); 396 glGenTextures(1, &artifactsTex);
397 glBindTexture(GL_TEXTURE_2D, artifactsTex); 397 glBindTexture(GL_TEXTURE_2D, artifactsTex);
398 int atdw, atdh; 398 int atdw, atdh;
399 unsigned char* artifactsTex_data = stbi_load("../res/artifacts.bmp", &atdw, &atdh, 0, 3); 399 unsigned char* artifactsTex_data = stbi_load("res/artifacts.bmp", &atdw, &atdh, 0, 3);
400 flipImageData(artifactsTex_data, atdw, atdh, 3); 400 flipImageData(artifactsTex_data, atdw, atdh, 3);
401 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, atdw, atdh, 0, GL_RGB, GL_UNSIGNED_BYTE, artifactsTex_data); 401 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, atdw, atdh, 0, GL_RGB, GL_UNSIGNED_BYTE, artifactsTex_data);
402 stbi_image_free(artifactsTex_data); 402 stbi_image_free(artifactsTex_data);
@@ -407,7 +407,7 @@ GLFWwindow* initRenderer()
407 glGenTextures(1, &scanlinesTex); 407 glGenTextures(1, &scanlinesTex);
408 glBindTexture(GL_TEXTURE_2D, scanlinesTex); 408 glBindTexture(GL_TEXTURE_2D, scanlinesTex);
409 int stdw, stdh; 409 int stdw, stdh;
410 unsigned char* scanlinesTex_data = stbi_load("../res/scanlines_333.bmp", &stdw, &stdh, 0, 3); 410 unsigned char* scanlinesTex_data = stbi_load("res/scanlines_333.bmp", &stdw, &stdh, 0, 3);
411 flipImageData(scanlinesTex_data, stdw, stdh, 3); 411 flipImageData(scanlinesTex_data, stdw, stdh, 3);
412 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, atdw, atdh, 0, GL_RGB, GL_UNSIGNED_BYTE, scanlinesTex_data); 412 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, atdw, atdh, 0, GL_RGB, GL_UNSIGNED_BYTE, scanlinesTex_data);
413 stbi_image_free(scanlinesTex_data); 413 stbi_image_free(scanlinesTex_data);
@@ -416,12 +416,12 @@ GLFWwindow* initRenderer()
416 glGenerateMipmap(GL_TEXTURE_2D); 416 glGenerateMipmap(GL_TEXTURE_2D);
417 417
418 // Load the shaders 418 // Load the shaders
419 ntscShader = LoadShaders("../shaders/ntsc.vertex", "../shaders/ntsc.fragment"); 419 ntscShader = LoadShaders("shaders/ntsc.vertex", "shaders/ntsc.fragment");
420 finalShader = LoadShaders("../shaders/final.vertex", "../shaders/final.fragment"); 420 finalShader = LoadShaders("shaders/final.vertex", "shaders/final.fragment");
421 blitShader = LoadShaders("../shaders/blit.vertex", "../shaders/blit.fragment"); 421 blitShader = LoadShaders("shaders/blit.vertex", "shaders/blit.fragment");
422 fillShader = LoadShaders("../shaders/fill.vertex", "../shaders/fill.fragment"); 422 fillShader = LoadShaders("shaders/fill.vertex", "shaders/fill.fragment");
423 bloom1Shader = LoadShaders("../shaders/bloom1.vertex", "../shaders/bloom1.fragment"); 423 bloom1Shader = LoadShaders("shaders/bloom1.vertex", "shaders/bloom1.fragment");
424 bloom2Shader = LoadShaders("../shaders/bloom2.vertex", "../shaders/bloom2.fragment"); 424 bloom2Shader = LoadShaders("shaders/bloom2.vertex", "shaders/bloom2.fragment");
425 425
426 rendererInitialized = true; 426 rendererInitialized = true;
427 427