diff --git a/.gitignore b/.gitignore index ec7dd87..b6d56a4 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ build/ # personnal documentation doc/*.txt doc/*.violet.html +doc/mockups/* # pieces files data/pieces/*.bin diff --git a/README.md b/README.md index 3762672..243c716 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ # jminos +Modern stacker game with every polyominos from size 1 to 15, made in C++ with [SFML 3](https://www.sfml-dev.org/)! + ## Manual build and run -You need to install xmake and have a compiler with c++20 compatibility +This project uses xmake for compiling. +To be able to build it, you need to [install xmake](https://xmake.io) and have a compiler with c++20 compatibility, xmake will install SFML for you. ### Build the project @@ -15,8 +18,8 @@ If you need to change the toolchain (for example using gcc): ### Run the project -Graphical version: -``xmake run graph`` +``xmake run`` +Note that the program will genereate the polyomino files for you. This can be quite long so it only does it up to size 10. -Command line version: +If for some reasons you wanna run the command line version: ``xmake run text`` diff --git a/src/GraphicalUI/Settings.h b/src/GraphicalUI/Settings.h index 4531aa9..2027d39 100644 --- a/src/GraphicalUI/Settings.h +++ b/src/GraphicalUI/Settings.h @@ -10,7 +10,12 @@ static const int MAXIMUM_BOARD_WIDTH = 40; static const int MAXIMUM_BOARD_HEIGHT = 40; +//#define __JMINOS_RELEASE__ +#ifdef __JMINOS_RELEASE__ +static const int MAXIMUM_PIECES_SIZE = 15; +#else static const int MAXIMUM_PIECES_SIZE = 10; +#endif class Settings { diff --git a/src/GraphicalUI/main.cpp b/src/GraphicalUI/main.cpp index 0f7b8e0..0a1945c 100644 --- a/src/GraphicalUI/main.cpp +++ b/src/GraphicalUI/main.cpp @@ -12,7 +12,8 @@ void resetKeybindFile(int layout); int main() { std::srand(std::time(NULL)); - // keep only for dev +#ifndef __JMINOS_RELEASE__ + PiecesFiles pf; for (int i = 1; i <= MAXIMUM_PIECES_SIZE; i++) { if (!std::filesystem::exists("data/pieces/" + std::to_string(i) + "minos.bin")) { @@ -29,8 +30,10 @@ int main() { } } - // before compiling release version - resetConfigFiles(); + // uncomment before compiling release version + //resetConfigFiles(); + +#endif GraphApp UI; UI.run(); diff --git a/xmake.lua b/xmake.lua index d534d59..ac7511a 100644 --- a/xmake.lua +++ b/xmake.lua @@ -6,6 +6,8 @@ set_languages("c++20") set_rundir(".") +set_optimize("fastest") + target("core") set_kind("$(kind)") add_files("src/Pieces/*.cpp")