diff options
Diffstat (limited to 'src/misc.cxx')
-rw-r--r-- | src/misc.cxx | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/misc.cxx b/src/misc.cxx index 3884ec7..7a814a6 100644 --- a/src/misc.cxx +++ b/src/misc.cxx @@ -1,7 +1,7 @@ /* * This file is part of the planetblupi source code * Copyright (C) 1997, Daniel Roux & EPSITEC SA - * Copyright (C) 2017, Mathieu Schroeter + * Copyright (C) 2017-2018, Mathieu Schroeter * http://epsitec.ch; http://www.blupi.org; http://github.com/blupi-games * * This program is free software: you can redistribute it and/or modify @@ -30,10 +30,11 @@ #include <sys/stat.h> #endif /*! _WIN32 */ -#include <SDL2/SDL_log.h> -#include <SDL2/SDL_mouse.h> +#include <SDL_log.h> +#include <SDL_mouse.h> #include "blupi.h" +#include "config.h" #include "def.h" #include "misc.h" @@ -105,8 +106,8 @@ GetBaseDir () return GetShareDir () + "planetblupi/"; } -std::string -GetShareDir () +static std::string +GetDataDir () { static std::string basePath; @@ -123,7 +124,21 @@ GetShareDir () SDL_free (sdlBasePath); } - return basePath + "share/"; + return basePath; +} + +std::string +GetShareDir () +{ + return GetDataDir () + "share/"; +} + +std::string +GetBinDir () +{ + std::string abs; + std::string bin = GetDataDir () + PB_BINDIR + "/"; + return bin; } // Ajoute le chemin permettant de lire un fichier |