From 54b664622737740bbb42c13d594b66a21d58ca5f Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 16 Mar 2015 10:30:50 -0400 Subject: Removed "../" from file paths --- src/components/map_render.cpp | 4 ++-- src/components/player_physics.cpp | 4 ++-- src/components/player_sprite.cpp | 2 +- src/entityfactory.cpp | 4 ++-- src/game.cpp | 2 +- src/map.cpp | 2 +- src/renderer.cpp | 18 +++++++++--------- 7 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src') 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 { screen.fill(screen.entirety(), 0, 0, 0); - Texture tiles("../res/tiles.png"); + Texture tiles("res/tiles.png"); for (int i=0; i EntityFactory::createNamedEntity(const std::string name) EntityData data = factories[name]; if (it == factories.end()) { - xmlDocPtr doc = xmlParseFile(("../entities/" + name + ".xml").c_str()); + xmlDocPtr doc = xmlParseFile(("entities/" + name + ".xml").c_str()); if (doc == nullptr) { fprintf(stderr, "Error reading entity %s\n", name.c_str()); @@ -85,7 +85,7 @@ std::shared_ptr EntityFactory::createNamedEntity(const std::string name) if (!strcmp(data.action, "save")) { auto component = std::make_shared([&] (Game& game, Entity&) { - playSound("../res/Pickup_Coin23.wav", 0.25); + playSound("res/Pickup_Coin23.wav", 0.25); game.saveGame(); }); 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() { player->send(*this, Message::Type::die); - playSound("../res/Hit_Hurt5.wav", 0.25); + playSound("res/Hit_Hurt5.wav", 0.25); schedule(0.75, [&] () { 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) { this->name = name; - xmlDocPtr doc = xmlParseFile(("../maps/" + name + ".xml").c_str()); + xmlDocPtr doc = xmlParseFile(("maps/" + name + ".xml").c_str()); if (doc == nullptr) { 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() std::vector mesh_vertices; std::vector mesh_uvs; std::vector mesh_normals; - loadMesh("../res/monitor-fef.obj", mesh_vertices, mesh_uvs, mesh_normals); + loadMesh("res/monitor-fef.obj", mesh_vertices, mesh_uvs, mesh_normals); mesh_numvertices = mesh_vertices.size(); @@ -396,7 +396,7 @@ GLFWwindow* initRenderer() glGenTextures(1, &artifactsTex); glBindTexture(GL_TEXTURE_2D, artifactsTex); int atdw, atdh; - unsigned char* artifactsTex_data = stbi_load("../res/artifacts.bmp", &atdw, &atdh, 0, 3); + unsigned char* artifactsTex_data = stbi_load("res/artifacts.bmp", &atdw, &atdh, 0, 3); flipImageData(artifactsTex_data, atdw, atdh, 3); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, atdw, atdh, 0, GL_RGB, GL_UNSIGNED_BYTE, artifactsTex_data); stbi_image_free(artifactsTex_data); @@ -407,7 +407,7 @@ GLFWwindow* initRenderer() glGenTextures(1, &scanlinesTex); glBindTexture(GL_TEXTURE_2D, scanlinesTex); int stdw, stdh; - unsigned char* scanlinesTex_data = stbi_load("../res/scanlines_333.bmp", &stdw, &stdh, 0, 3); + unsigned char* scanlinesTex_data = stbi_load("res/scanlines_333.bmp", &stdw, &stdh, 0, 3); flipImageData(scanlinesTex_data, stdw, stdh, 3); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, atdw, atdh, 0, GL_RGB, GL_UNSIGNED_BYTE, scanlinesTex_data); stbi_image_free(scanlinesTex_data); @@ -416,12 +416,12 @@ GLFWwindow* initRenderer() glGenerateMipmap(GL_TEXTURE_2D); // Load the shaders - ntscShader = LoadShaders("../shaders/ntsc.vertex", "../shaders/ntsc.fragment"); - finalShader = LoadShaders("../shaders/final.vertex", "../shaders/final.fragment"); - blitShader = LoadShaders("../shaders/blit.vertex", "../shaders/blit.fragment"); - fillShader = LoadShaders("../shaders/fill.vertex", "../shaders/fill.fragment"); - bloom1Shader = LoadShaders("../shaders/bloom1.vertex", "../shaders/bloom1.fragment"); - bloom2Shader = LoadShaders("../shaders/bloom2.vertex", "../shaders/bloom2.fragment"); + ntscShader = LoadShaders("shaders/ntsc.vertex", "shaders/ntsc.fragment"); + finalShader = LoadShaders("shaders/final.vertex", "shaders/final.fragment"); + blitShader = LoadShaders("shaders/blit.vertex", "shaders/blit.fragment"); + fillShader = LoadShaders("shaders/fill.vertex", "shaders/fill.fragment"); + bloom1Shader = LoadShaders("shaders/bloom1.vertex", "shaders/bloom1.fragment"); + bloom2Shader = LoadShaders("shaders/bloom2.vertex", "shaders/bloom2.fragment"); rendererInitialized = true; -- cgit 1.4.1