Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.
/ GLKeeper Public archive

Commit c68dc46

Browse files
committed
-
1 parent b0e7e0e commit c68dc46

4 files changed

Lines changed: 115 additions & 2 deletions

File tree

Makefile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
CPUS := $(shell nproc)
2+
3+
all: build_debug
4+
true
5+
6+
build_debug: premake
7+
.build/premake5 gmake --cc=clang
8+
make -C .build config=debug_x86_64 -j$(CPUS)
9+
test -d bin || mkdir bin
10+
cp .build/bin/x86_64/Debug/glkeeper bin/glkeeper-debug
11+
12+
build_release: premake
13+
.build/premake5 gmake --cc=clang
14+
make -C .build config=release_x86_64 -j$(CPUS)
15+
test -d bin || mkdir bin
16+
cp .build/bin/x86_64/Release/glkeeper bin/glkeeper-release
17+
18+
clean:
19+
.build/premake5 gmake --cc=clang
20+
make -C third_party/Box2D/Build clean
21+
make -C .build clean
22+
23+
run:
24+
./bin/glkeeper-debug -gamedir ../games/dk2
25+
26+
builddir:
27+
test -d .build || mkdir .build
28+
29+
premake: builddir
30+
test -e .build/premake5 || (cd .build && \
31+
wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha14/premake-5.0.0-alpha14-linux.tar.gz && \
32+
tar xzf premake-5.0.0-alpha14-linux.tar.gz && \
33+
rm premake-5.0.0-alpha14-linux.tar.gz)

premake5.lua

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
workspace "glkeeper"
2+
location '.build'
3+
configurations { "Debug", "Release" }
4+
cppdialect 'C++17'
5+
6+
configuration { "linux", "gmake" }
7+
buildoptions { "-Wno-switch" }
8+
9+
filter 'system:linux'
10+
platforms { 'x86_64' }
11+
12+
project "GLFW"
13+
kind "StaticLib"
14+
language "C"
15+
files
16+
{
17+
"src/GLFW/internal.h",
18+
"src/GLFWglfw_config.h",
19+
"src/GLFW/glfw3.h",
20+
"src/GLFW/glfw3native.h",
21+
"src/GLFW/context.c",
22+
"src/GLFW/init.c",
23+
"src/GLFW/input.c",
24+
"src/GLFW/monitor.c",
25+
"src/GLFW/vulkan.c",
26+
"src/GLFW/window.c",
27+
"src/GLFW/x11_platform.h",
28+
"src/GLFW/xkb_unicode.h",
29+
"src/GLFW/linux_joystick.h",
30+
"src/GLFW/posix_time.h",
31+
"src/GLFW/glx_context.h",
32+
"src/GLFW/egl_context.h",
33+
"src/GLFW/x11_init.c",
34+
"src/GLFW/x11_monitor.c",
35+
"src/GLFW/x11_window.c",
36+
"src/GLFW/glx_context.h",
37+
"src/GLFW/glx_context.c",
38+
"src/GLFW/glext.h",
39+
"src/GLFW/xkb_unicode.c",
40+
"src/GLFW/linux_joystick.c",
41+
"src/GLFW/posix_time.c",
42+
"src/GLFW/glx_context.c",
43+
"src/GLFW/egl_context.c",
44+
"src/GLFW/posix_thread.h",
45+
"src/GLFW/posix_thread.c",
46+
"src/GLFW/osmesa_context.c",
47+
"src/GLFW/osmesa_context.h"
48+
}
49+
includedirs { "GLFW" }
50+
links { "GL", "GLEW", "stdc++fs", "X11", "Xrandr", "Xinerama", "Xcursor", "pthread", "dl" }
51+
52+
filter { "configurations:Debug" }
53+
defines { "DEBUG", "_DEBUG" }
54+
symbols "On"
55+
56+
filter { "configurations:Release" }
57+
defines { "NDEBUG" }
58+
optimize "On"
59+
60+
project "glkeeper"
61+
kind "WindowedApp"
62+
language "C++"
63+
files
64+
{
65+
"src/*.h",
66+
"src/*.cpp",
67+
"src/3rd_party/*.h",
68+
"src/3rd_party/*.cpp"
69+
}
70+
includedirs { "src" }
71+
includedirs { "GLFW" }
72+
links { "GL", "GLEW", "stdc++fs", "X11", "Xrandr", "Xinerama", "Xcursor", "pthread", "dl", "GLFW" }
73+
74+
filter { "configurations:Debug" }
75+
defines { "DEBUG", "_DEBUG" }
76+
symbols "On"
77+
78+
filter { "configurations:Release" }
79+
defines { "NDEBUG" }
80+
optimize "On"

src/GameMain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ bool GameMain::Initialize()
3333

3434
// set initial gamestate
3535
//SwitchToGameState(&mMeshViewGamestate);
36-
gGameWorld.LoadScenario("devmap");
36+
gGameWorld.LoadScenario("null");
3737
SwitchToGameState(&mGameplayGamestate);
3838

3939
//SwitchToGameState(&mGuiTestGamestate);

src/ScenarioLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ bool ScenarioLoader::LoadScenarioData(const std::string& scenario)
16391639
gConsole.LogMessage(eLogMessage_Warning, "Cannot locate scenario data file '%s'", pathEntry.mFilePath.c_str());
16401640
continue;
16411641
}
1642-
if (!ReadDataFile(fileStream, pathEntry.mId))
1642+
if (!ReadDataFile(dataFileStream, pathEntry.mId))
16431643
{
16441644
gConsole.LogMessage(eLogMessage_Warning, "Error reading scenario data file '%s'", pathEntry.mFilePath.c_str());
16451645
return false;

0 commit comments

Comments
 (0)