fixed path stuff
This commit is contained in:
parent
770739c352
commit
a61ff90f8c
4 changed files with 7 additions and 4 deletions
|
@ -7,7 +7,7 @@ private:
|
|||
//CONFIG
|
||||
const double frameTime = 0.2;
|
||||
const int numFrames = 4;
|
||||
const std::string spriteFile = "./Resources/spreadsheet.png";
|
||||
const std::string spriteFile = WORK_DIR+"Resources/spreadsheet.png";
|
||||
//POSICIO PLAYER 1
|
||||
float posX1 = 0, posY1 = 250;
|
||||
//POSICIO PLAYER 2
|
||||
|
|
|
@ -23,7 +23,7 @@ void Combat::initShader() {
|
|||
time = 0;
|
||||
_text.create(W_WIDTH, W_HEIGHT);
|
||||
_background.setTexture(_text);
|
||||
_shader.loadFromFile("./Resources/shader.frag", sf::Shader::Fragment);
|
||||
_shader.loadFromFile(WORK_DIR+"Resources/shader.frag", sf::Shader::Fragment);
|
||||
_shader.setParameter("resolution", sf::Vector2f(W_WIDTH, W_HEIGHT));
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <SFML/Window.hpp>
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h> /* getenv */
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
|
@ -14,6 +15,8 @@ const int SCENE_NUM = 4;
|
|||
#define BLACKVALUE 0.00025f
|
||||
#define W_WIDTH 800
|
||||
#define W_HEIGHT 600
|
||||
const std::string WORK_DIR(getenv("WORK_DIR"));
|
||||
|
||||
|
||||
#define ASSERT(expression) do \
|
||||
{ \
|
||||
|
|
|
@ -14,8 +14,8 @@ class Menu : public Scene{
|
|||
void draw(sf::RenderWindow *window) final override;
|
||||
void updateEvents(sf::Event e) final override;
|
||||
private:
|
||||
Button _start = Button("./Resources/play-spreadsheet.png");
|
||||
Button _exit = Button("./Resources/exit-spreadsheet.png");
|
||||
Button _start = Button(WORK_DIR+"Resources/play-spreadsheet.png");
|
||||
Button _exit = Button(WORK_DIR+"Resources/exit-spreadsheet.png");
|
||||
std::vector<Button*> _buttons;
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue