Some paths to assets fixed with Boost::FS
This commit is contained in:
@@ -77,6 +77,8 @@ bool Game::gravityOnPlayer = true;
|
||||
bool Game::playerIsGrounded = false;
|
||||
bool Game::playerIsJumping = false;
|
||||
|
||||
std::string Game::projPath = "";
|
||||
|
||||
int gScale = 0;
|
||||
int last_time;
|
||||
int current_time;
|
||||
@@ -97,9 +99,9 @@ std::string Game::BoolToString(bool b) {
|
||||
return myString;
|
||||
}
|
||||
|
||||
Game::Game() {
|
||||
Game::Game(std::string projectPath) {
|
||||
// TODO Auto-generated constructor stub
|
||||
|
||||
Game::projPath = projectPath;
|
||||
}
|
||||
|
||||
Game::~Game() {
|
||||
@@ -142,7 +144,9 @@ void Game::init(const char *title, int width, int height, bool fullscreen, int g
|
||||
SDL_LogError(SDL_LOG_CATEGORY_ERROR, "Couldn't initialize SDL audio mixer!, Error: %s", SDL_GetError());
|
||||
}
|
||||
|
||||
assets->AddTexture("player", "assets/textures/actors/kaijuturtle.png");
|
||||
std::string kaijuTex = Game::projPath + "assets/textures/actors/kaijuturtle.png";
|
||||
|
||||
assets->AddTexture("player", kaijuTex.c_str());
|
||||
assets->AddTexture("font", "assets/textures/ui/ui-font-lorez5.png");
|
||||
assets->AddTexture("textBox", "assets/textures/ui/ui-element-bubble.png");
|
||||
assets->AddTexture("collider","assets/textures/ColTex.png");
|
||||
@@ -192,7 +196,7 @@ void Game::init(const char *title, int width, int height, bool fullscreen, int g
|
||||
playerPosition = Vector2D().Zero();
|
||||
pVel = Vector2D().Zero();
|
||||
|
||||
printf("Init Completed\n");
|
||||
// printf("Init Completed\n");
|
||||
} else {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't Initialize SDL: %s", SDL_GetError());
|
||||
isRunning = false;
|
||||
|
||||
Reference in New Issue
Block a user