Adds beginnings of the README

Adds Version class for working with symantic versioning. Also pulls the project version from the LunariumConfig.h file and makes it accessible from any point in the project.
Gui_Panel_Refactor
Joeyrp 4 years ago
parent 81ee7e848c
commit 28da7de122

1
.gitignore vendored

@ -38,6 +38,7 @@
# other
*.zip
*.ini
test_data/test_save.xml
######################## CMAKE IGNORES

@ -14,6 +14,7 @@ set(LUNARIUM_SRC
"src/test_main.cpp"
"src/core/core.cpp"
"src/core/state.cpp"
"src/core/Version.cpp"
"src/utils/Logger.cpp"
"src/utils/HighResTimer.cpp"
"src/utils/helpers.cpp"

@ -0,0 +1,43 @@
# Lunarium
Lunarium is a cross-platform 2D game engine. It runs in windows and Linux. It's tested on Windows 10 and Ubuntu (Kubuntu).
# Building from source
Clone the repository with git and switch to the repository directory
```
git clone https://github.com/`
cd lunarium
```
## On Linux
Run the cmconfig.sh and then the build.sh.
```
./sripts/cmconfig.sh
...
./scripts/build.sh
```
Note the scripts must be run from the root directory of the repo.
Finally you can use run.sh to run the program
```
./scripts/run.sh
```
## On Windows
Run the cmconfig.bat
```
scripts\cmconfig.bat
```
From here you can navigate to the build directory and run the LUNARIUM.sln file to build and run from inside Visual Studio. Or you can use build.bat to build from the command line. If you build from visual studio be sure to copy the test_data directory into the same directory with Lunarium.exe before running.
```
scripts\build.bat
```
Or for a Release build:
```
scripts\build.bat r
```
Then you can run the program:
```
build\Debug\Lunarium
```
OR
```
build\Release\Lunarium
```

@ -1,12 +0,0 @@
[Window][Debug##Default]
Pos=60,60
Size=400,400
Collapsed=0
[Window][Dear ImGui Demo]
Pos=650,20
Size=550,680
Collapsed=0
[Docking][Data]

@ -9,6 +9,7 @@
#include "utils/Logger.h"
#include "utils/OpRes.h"
#include "core/state.h"
#include "core/Version.h"
extern "C"
{
@ -32,9 +33,10 @@ int main(int argc, char** argv)
// VERSION TEST
std::cout << "Hello yall\n";
std::cout << "This is " << argv[0] << " Version " << Lunarium_VERSION_MAJOR
<< "." << Lunarium_VERSION_MINOR
<< "." << Lunarium_VERSION_PATCH << '\n';
// std::cout << "This is " << argv[0] << " Version " << Lunarium_VERSION_MAJOR
// << "." << Lunarium_VERSION_MINOR
// << "." << Lunarium_VERSION_PATCH << '\n';
std::cout << "This is " << argv[0] << " Version " << lunarium::Version::GetVersion().ToString() << "\n";
glm::vec3 testVec = glm::vec3(1.0f, 2.0f, 3.0f);
@ -84,9 +86,9 @@ int main(int argc, char** argv)
if (lunarium::IsOK(lunarium::State::CreateFromFile("test_data/test_state.xml", testState)))
{
std::cout << "\nIt worked! Full Screen Resolution Width: " << testState.Display.FullScreenResolution.Width;
std::cout << "\nSaveing out to test_save.xml";
std::cout << "\nSaving out to test_save.xml";
if (lunarium::IsOK(testState.SaveToFile("../test_data/test_save.xml")))
if (lunarium::IsOK(testState.SaveToFile("test_data/test_save.xml")))
{
std::cout << "\nSuccess!\n";
}
@ -94,7 +96,6 @@ int main(int argc, char** argv)
{
std::cout << "\nFailed to save the file...\n";
}
}
std::cout << "\nTesting GLFW and ImGui\n";

Loading…
Cancel
Save