|
|
@ -15,9 +15,7 @@
|
|
|
|
#include <fstream>
|
|
|
|
#include <fstream>
|
|
|
|
#include <filesystem>
|
|
|
|
#include <filesystem>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#if __linux__
|
|
|
|
#include <pwd.h>
|
|
|
|
#include <pwd.h>
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
|
|
|
#include <packed/SharedResources.hpp>
|
|
|
|
#include <packed/SharedResources.hpp>
|
|
|
@ -113,7 +111,6 @@ int main()
|
|
|
|
PLAYFIELD_Y + ((float)GRID_HEIGHT * TILE_SIZE / 2) - (float)paused_texture_size.y / 2
|
|
|
|
PLAYFIELD_Y + ((float)GRID_HEIGHT * TILE_SIZE / 2) - (float)paused_texture_size.y / 2
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
#if __linux__
|
|
|
|
|
|
|
|
// https://stackoverflow.com/a/478088
|
|
|
|
// https://stackoverflow.com/a/478088
|
|
|
|
const char *homedir;
|
|
|
|
const char *homedir;
|
|
|
|
if ((homedir = getenv("HOME")) == NULL) {
|
|
|
|
if ((homedir = getenv("HOME")) == NULL) {
|
|
|
@ -121,9 +118,6 @@ int main()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
std::string highscore_file_path = homedir;
|
|
|
|
std::string highscore_file_path = homedir;
|
|
|
|
highscore_file_path += "/.septadrop";
|
|
|
|
highscore_file_path += "/.septadrop";
|
|
|
|
#else
|
|
|
|
|
|
|
|
std::string highscore_file_path = ".septadrop";
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!std::filesystem::exists(highscore_file_path)) {
|
|
|
|
if (!std::filesystem::exists(highscore_file_path)) {
|
|
|
|
std::ofstream highscore_file(highscore_file_path);
|
|
|
|
std::ofstream highscore_file(highscore_file_path);
|
|
|
|