player controller + renderer

This commit is contained in:
Hunter 2023-05-27 13:10:56 -04:00
parent 4913fc7667
commit a1f8e26d9a
21 changed files with 348 additions and 279 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
b/ b/
imgui.ini imgui.ini
compile_commands.json compile_commands.json
.cache/

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

View file

@ -198,7 +198,7 @@
"file": "CMakeCXXCompilerId.cpp" "file": "CMakeCXXCompilerId.cpp"
}, },
{ {
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b/CMakeFiles/CMakeScratch/TryCompile-Xf3mlM", "directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b/CMakeFiles/CMakeScratch/TryCompile-1omL2G",
"arguments": [ "arguments": [
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/bin/gcc", "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/bin/gcc",
"-fPIC", "-fPIC",
@ -214,7 +214,7 @@
"-fno-strict-overflow", "-fno-strict-overflow",
"-v", "-v",
"-o", "-o",
"CMakeFiles/cmTC_1860e.dir/CMakeCCompilerABI.c.o", "CMakeFiles/cmTC_221be.dir/CMakeCCompilerABI.c.o",
"-c", "-c",
"/nix/store/9d67jcm1wj09wqgffh8v5mkgil9psnrw-cmake-3.25.3/share/cmake-3.25/Modules/CMakeCCompilerABI.c", "/nix/store/9d67jcm1wj09wqgffh8v5mkgil9psnrw-cmake-3.25.3/share/cmake-3.25/Modules/CMakeCCompilerABI.c",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/", "-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
@ -272,7 +272,7 @@
"file": "/nix/store/9d67jcm1wj09wqgffh8v5mkgil9psnrw-cmake-3.25.3/share/cmake-3.25/Modules/CMakeCCompilerABI.c" "file": "/nix/store/9d67jcm1wj09wqgffh8v5mkgil9psnrw-cmake-3.25.3/share/cmake-3.25/Modules/CMakeCCompilerABI.c"
}, },
{ {
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b/CMakeFiles/CMakeScratch/TryCompile-tcL71N", "directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b/CMakeFiles/CMakeScratch/TryCompile-JXAD6c",
"arguments": [ "arguments": [
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/bin/g++", "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/bin/g++",
"-fPIC", "-fPIC",
@ -288,7 +288,7 @@
"-fno-strict-overflow", "-fno-strict-overflow",
"-v", "-v",
"-o", "-o",
"CMakeFiles/cmTC_244a7.dir/CMakeCXXCompilerABI.cpp.o", "CMakeFiles/cmTC_5aee7.dir/CMakeCXXCompilerABI.cpp.o",
"-c", "-c",
"/nix/store/9d67jcm1wj09wqgffh8v5mkgil9psnrw-cmake-3.25.3/share/cmake-3.25/Modules/CMakeCXXCompilerABI.cpp", "/nix/store/9d67jcm1wj09wqgffh8v5mkgil9psnrw-cmake-3.25.3/share/cmake-3.25/Modules/CMakeCXXCompilerABI.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/", "-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
@ -371,19 +371,19 @@
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2", "-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2", "-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem", "-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2", "/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD", "-MD",
"-MT", "-MT",
"CMakeFiles/PhoenixGame.dir/src/mapEditor.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui.cpp.o",
"-MF", "-MF",
"CMakeFiles/PhoenixGame.dir/src/mapEditor.cpp.o.d", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui.cpp.o.d",
"-o", "-o",
"CMakeFiles/PhoenixGame.dir/src/mapEditor.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui.cpp.o",
"-c", "-c",
"/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/src/mapEditor.cpp", "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/imgui.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/", "-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include", "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include",
@ -444,7 +444,7 @@
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu" "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
], ],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/src/mapEditor.cpp" "file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/imgui.cpp"
}, },
{ {
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b", "directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b",
@ -464,8 +464,8 @@
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2", "-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2", "-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem", "-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2", "/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD", "-MD",
@ -557,8 +557,8 @@
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2", "-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2", "-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem", "-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2", "/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD", "-MD",
@ -650,19 +650,19 @@
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2", "-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2", "-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem", "-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2", "/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD", "-MD",
"-MT", "-MT",
"CMakeFiles/PhoenixGame.dir/src/map.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui_draw.cpp.o",
"-MF", "-MF",
"CMakeFiles/PhoenixGame.dir/src/map.cpp.o.d", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui_draw.cpp.o.d",
"-o", "-o",
"CMakeFiles/PhoenixGame.dir/src/map.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui_draw.cpp.o",
"-c", "-c",
"/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/src/map.cpp", "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/imgui_draw.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/", "-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include", "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include",
@ -723,7 +723,7 @@
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu" "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
], ],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/src/map.cpp" "file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/imgui_draw.cpp"
}, },
{ {
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b", "directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b",
@ -743,19 +743,19 @@
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2", "-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2", "-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem", "-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2", "/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD", "-MD",
"-MT", "-MT",
"CMakeFiles/PhoenixGame.dir/imgui/imgui_draw.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui_demo.cpp.o",
"-MF", "-MF",
"CMakeFiles/PhoenixGame.dir/imgui/imgui_draw.cpp.o.d", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui_demo.cpp.o.d",
"-o", "-o",
"CMakeFiles/PhoenixGame.dir/imgui/imgui_draw.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui_demo.cpp.o",
"-c", "-c",
"/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/imgui_draw.cpp", "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/imgui_demo.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/", "-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include", "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include",
@ -816,7 +816,7 @@
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu" "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
], ],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/imgui_draw.cpp" "file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/imgui_demo.cpp"
}, },
{ {
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b", "directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b",
@ -836,19 +836,19 @@
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2", "-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2", "-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem", "-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2", "/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD", "-MD",
"-MT", "-MT",
"CMakeFiles/PhoenixGame.dir/imgui/imgui_demo.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui_tables.cpp.o",
"-MF", "-MF",
"CMakeFiles/PhoenixGame.dir/imgui/imgui_demo.cpp.o.d", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui_tables.cpp.o.d",
"-o", "-o",
"CMakeFiles/PhoenixGame.dir/imgui/imgui_demo.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui_tables.cpp.o",
"-c", "-c",
"/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/imgui_demo.cpp", "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/imgui_tables.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/", "-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include", "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include",
@ -909,7 +909,7 @@
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu" "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
], ],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/imgui_demo.cpp" "file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/imgui_tables.cpp"
}, },
{ {
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b", "directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b",
@ -929,194 +929,8 @@
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2", "-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2", "-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD",
"-MT",
"CMakeFiles/PhoenixGame.dir/imgui/imgui.cpp.o",
"-MF",
"CMakeFiles/PhoenixGame.dir/imgui/imgui.cpp.o.d",
"-o",
"CMakeFiles/PhoenixGame.dir/imgui/imgui.cpp.o",
"-c",
"/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/imgui.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include",
"-idirafter",
"/nix/store/wb2dlc8kpvrn960vq7j7c8822pi43n48-glibc-2.37-8-dev/include",
"-idirafter",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include-fixed",
"-B/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0",
"-B/nix/store/g012c53brxmb0if3lpmkjwmxk74hjflh-gcc-12.2.0-lib/lib",
"-B/nix/store/r5pv6ikzhq0wy3s66vv4wgzgdy9v8iw6-gcc-wrapper-12.2.0/bin/",
"-frandom-seed=zxrbhgzyrk",
"-isystem",
"/nix/store/h23v44i19x491njf1dc1zq9vg8i0a0hg-gnumake-4.4.1/include",
"-isystem",
"/nix/store/1aiwpacfrbcp1rnjf4q89kyywvisfb2i-assimp-5.2.5-dev/include",
"-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include",
"-isystem",
"/nix/store/sr9gwxbdmpi3lb1bz0v5dvgck95fcv58-libGL-1.6.0-dev/include",
"-isystem",
"/nix/store/whgh6f2vlyv980fbip076wsnjca34r1r-libglvnd-1.6.0-dev/include",
"-isystem",
"/nix/store/f525j4v68yl89l93iz0wjq0gkxrhx70z-libX11-1.8.4-dev/include",
"-isystem",
"/nix/store/qjlpy5db17yzcari5qgrw4wazf63vp0q-xorgproto-2021.5/include",
"-isystem",
"/nix/store/fafw3wb5wvamqaqdjlabqyrypapl1xd8-libxcb-1.14-dev/include",
"-isystem",
"/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include",
"-isystem",
"/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include",
"-isystem",
"/nix/store/h23v44i19x491njf1dc1zq9vg8i0a0hg-gnumake-4.4.1/include",
"-isystem",
"/nix/store/1aiwpacfrbcp1rnjf4q89kyywvisfb2i-assimp-5.2.5-dev/include",
"-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include",
"-isystem",
"/nix/store/sr9gwxbdmpi3lb1bz0v5dvgck95fcv58-libGL-1.6.0-dev/include",
"-isystem",
"/nix/store/whgh6f2vlyv980fbip076wsnjca34r1r-libglvnd-1.6.0-dev/include",
"-isystem",
"/nix/store/f525j4v68yl89l93iz0wjq0gkxrhx70z-libX11-1.8.4-dev/include",
"-isystem",
"/nix/store/qjlpy5db17yzcari5qgrw4wazf63vp0q-xorgproto-2021.5/include",
"-isystem",
"/nix/store/fafw3wb5wvamqaqdjlabqyrypapl1xd8-libxcb-1.14-dev/include",
"-isystem",
"/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include",
"-isystem",
"/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/imgui.cpp"
},
{
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b",
"arguments": [
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/bin/g++",
"-fPIC",
"-Wformat",
"-Wformat-security",
"-Werror=format-security",
"-fstack-protector-strong",
"--param",
"ssp-buffer-size=4",
"-O2",
"-U_FORTIFY_SOURCE",
"-D_FORTIFY_SOURCE=2",
"-fno-strict-overflow",
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends",
"-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD",
"-MT",
"CMakeFiles/PhoenixGame.dir/imgui/backends/imgui_impl_sdlrenderer.cpp.o",
"-MF",
"CMakeFiles/PhoenixGame.dir/imgui/backends/imgui_impl_sdlrenderer.cpp.o.d",
"-o",
"CMakeFiles/PhoenixGame.dir/imgui/backends/imgui_impl_sdlrenderer.cpp.o",
"-c",
"/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends/imgui_impl_sdlrenderer.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include",
"-idirafter",
"/nix/store/wb2dlc8kpvrn960vq7j7c8822pi43n48-glibc-2.37-8-dev/include",
"-idirafter",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include-fixed",
"-B/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0",
"-B/nix/store/g012c53brxmb0if3lpmkjwmxk74hjflh-gcc-12.2.0-lib/lib",
"-B/nix/store/r5pv6ikzhq0wy3s66vv4wgzgdy9v8iw6-gcc-wrapper-12.2.0/bin/",
"-frandom-seed=zxrbhgzyrk",
"-isystem",
"/nix/store/h23v44i19x491njf1dc1zq9vg8i0a0hg-gnumake-4.4.1/include",
"-isystem",
"/nix/store/1aiwpacfrbcp1rnjf4q89kyywvisfb2i-assimp-5.2.5-dev/include",
"-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include",
"-isystem",
"/nix/store/sr9gwxbdmpi3lb1bz0v5dvgck95fcv58-libGL-1.6.0-dev/include",
"-isystem",
"/nix/store/whgh6f2vlyv980fbip076wsnjca34r1r-libglvnd-1.6.0-dev/include",
"-isystem",
"/nix/store/f525j4v68yl89l93iz0wjq0gkxrhx70z-libX11-1.8.4-dev/include",
"-isystem",
"/nix/store/qjlpy5db17yzcari5qgrw4wazf63vp0q-xorgproto-2021.5/include",
"-isystem",
"/nix/store/fafw3wb5wvamqaqdjlabqyrypapl1xd8-libxcb-1.14-dev/include",
"-isystem",
"/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include",
"-isystem",
"/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include",
"-isystem",
"/nix/store/h23v44i19x491njf1dc1zq9vg8i0a0hg-gnumake-4.4.1/include",
"-isystem",
"/nix/store/1aiwpacfrbcp1rnjf4q89kyywvisfb2i-assimp-5.2.5-dev/include",
"-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include",
"-isystem",
"/nix/store/sr9gwxbdmpi3lb1bz0v5dvgck95fcv58-libGL-1.6.0-dev/include",
"-isystem",
"/nix/store/whgh6f2vlyv980fbip076wsnjca34r1r-libglvnd-1.6.0-dev/include",
"-isystem",
"/nix/store/f525j4v68yl89l93iz0wjq0gkxrhx70z-libX11-1.8.4-dev/include",
"-isystem",
"/nix/store/qjlpy5db17yzcari5qgrw4wazf63vp0q-xorgproto-2021.5/include",
"-isystem",
"/nix/store/fafw3wb5wvamqaqdjlabqyrypapl1xd8-libxcb-1.14-dev/include",
"-isystem",
"/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include",
"-isystem",
"/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends/imgui_impl_sdlrenderer.cpp"
},
{
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b",
"arguments": [
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/bin/g++",
"-fPIC",
"-Wformat",
"-Wformat-security",
"-Werror=format-security",
"-fstack-protector-strong",
"--param",
"ssp-buffer-size=4",
"-O2",
"-U_FORTIFY_SOURCE",
"-D_FORTIFY_SOURCE=2",
"-fno-strict-overflow",
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends",
"-isystem", "-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2", "/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD", "-MD",
@ -1208,19 +1022,19 @@
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2", "-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2", "-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem", "-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2", "/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD", "-MD",
"-MT", "-MT",
"CMakeFiles/PhoenixGame.dir/imgui/backends/imgui_impl_sdl2.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/backends/imgui_impl_sdlrenderer.cpp.o",
"-MF", "-MF",
"CMakeFiles/PhoenixGame.dir/imgui/backends/imgui_impl_sdl2.cpp.o.d", "CMakeFiles/PhoenixGame.dir/vendor/imgui/backends/imgui_impl_sdlrenderer.cpp.o.d",
"-o", "-o",
"CMakeFiles/PhoenixGame.dir/imgui/backends/imgui_impl_sdl2.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/backends/imgui_impl_sdlrenderer.cpp.o",
"-c", "-c",
"/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends/imgui_impl_sdl2.cpp", "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends/imgui_impl_sdlrenderer.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/", "-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include", "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include",
@ -1281,7 +1095,7 @@
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu" "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
], ],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends/imgui_impl_sdl2.cpp" "file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends/imgui_impl_sdlrenderer.cpp"
}, },
{ {
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b", "directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b",
@ -1301,19 +1115,19 @@
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2", "-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2", "-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem", "-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2", "/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD", "-MD",
"-MT", "-MT",
"CMakeFiles/PhoenixGame.dir/imgui/imgui_tables.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/backends/imgui_impl_sdl2.cpp.o",
"-MF", "-MF",
"CMakeFiles/PhoenixGame.dir/imgui/imgui_tables.cpp.o.d", "CMakeFiles/PhoenixGame.dir/vendor/imgui/backends/imgui_impl_sdl2.cpp.o.d",
"-o", "-o",
"CMakeFiles/PhoenixGame.dir/imgui/imgui_tables.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/backends/imgui_impl_sdl2.cpp.o",
"-c", "-c",
"/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/imgui_tables.cpp", "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends/imgui_impl_sdl2.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/", "-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include", "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include",
@ -1374,7 +1188,7 @@
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu" "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
], ],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/imgui_tables.cpp" "file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends/imgui_impl_sdl2.cpp"
}, },
{ {
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b", "directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b",
@ -1394,19 +1208,19 @@
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2", "-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2", "-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem", "-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2", "/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD", "-MD",
"-MT", "-MT",
"CMakeFiles/PhoenixGame.dir/imgui/imgui_widgets.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui_widgets.cpp.o",
"-MF", "-MF",
"CMakeFiles/PhoenixGame.dir/imgui/imgui_widgets.cpp.o.d", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui_widgets.cpp.o.d",
"-o", "-o",
"CMakeFiles/PhoenixGame.dir/imgui/imgui_widgets.cpp.o", "CMakeFiles/PhoenixGame.dir/vendor/imgui/imgui_widgets.cpp.o",
"-c", "-c",
"/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/imgui_widgets.cpp", "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/imgui_widgets.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/", "-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include", "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include",
@ -1467,7 +1281,7 @@
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu" "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
], ],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/imgui_widgets.cpp" "file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/imgui_widgets.cpp"
}, },
{ {
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b", "directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b",
@ -1487,19 +1301,19 @@
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2", "-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2", "-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem", "-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2", "/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD", "-MD",
"-MT", "-MT",
"CMakeFiles/PhoenixGame.dir/imgui/misc/cpp/imgui_stdlib.cpp.o", "CMakeFiles/PhoenixGame.dir/src/map.cpp.o",
"-MF", "-MF",
"CMakeFiles/PhoenixGame.dir/imgui/misc/cpp/imgui_stdlib.cpp.o.d", "CMakeFiles/PhoenixGame.dir/src/map.cpp.o.d",
"-o", "-o",
"CMakeFiles/PhoenixGame.dir/imgui/misc/cpp/imgui_stdlib.cpp.o", "CMakeFiles/PhoenixGame.dir/src/map.cpp.o",
"-c", "-c",
"/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/misc/cpp/imgui_stdlib.cpp", "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/src/map.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/", "-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include", "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include",
@ -1560,7 +1374,7 @@
"-isystem", "-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu" "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
], ],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/misc/cpp/imgui_stdlib.cpp" "file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/src/map.cpp"
}, },
{ {
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b", "directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b",
@ -1580,8 +1394,8 @@
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2", "-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2", "-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/imgui/backends", "-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem", "-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2", "/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD", "-MD",
@ -1654,5 +1468,191 @@
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu" "/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
], ],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/src/assets.cpp" "file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/src/assets.cpp"
},
{
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b",
"arguments": [
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/bin/g++",
"-fPIC",
"-Wformat",
"-Wformat-security",
"-Werror=format-security",
"-fstack-protector-strong",
"--param",
"ssp-buffer-size=4",
"-O2",
"-U_FORTIFY_SOURCE",
"-D_FORTIFY_SOURCE=2",
"-fno-strict-overflow",
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD",
"-MT",
"CMakeFiles/PhoenixGame.dir/src/mapEditor.cpp.o",
"-MF",
"CMakeFiles/PhoenixGame.dir/src/mapEditor.cpp.o.d",
"-o",
"CMakeFiles/PhoenixGame.dir/src/mapEditor.cpp.o",
"-c",
"/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/src/mapEditor.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include",
"-idirafter",
"/nix/store/wb2dlc8kpvrn960vq7j7c8822pi43n48-glibc-2.37-8-dev/include",
"-idirafter",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include-fixed",
"-B/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0",
"-B/nix/store/g012c53brxmb0if3lpmkjwmxk74hjflh-gcc-12.2.0-lib/lib",
"-B/nix/store/r5pv6ikzhq0wy3s66vv4wgzgdy9v8iw6-gcc-wrapper-12.2.0/bin/",
"-frandom-seed=zxrbhgzyrk",
"-isystem",
"/nix/store/h23v44i19x491njf1dc1zq9vg8i0a0hg-gnumake-4.4.1/include",
"-isystem",
"/nix/store/1aiwpacfrbcp1rnjf4q89kyywvisfb2i-assimp-5.2.5-dev/include",
"-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include",
"-isystem",
"/nix/store/sr9gwxbdmpi3lb1bz0v5dvgck95fcv58-libGL-1.6.0-dev/include",
"-isystem",
"/nix/store/whgh6f2vlyv980fbip076wsnjca34r1r-libglvnd-1.6.0-dev/include",
"-isystem",
"/nix/store/f525j4v68yl89l93iz0wjq0gkxrhx70z-libX11-1.8.4-dev/include",
"-isystem",
"/nix/store/qjlpy5db17yzcari5qgrw4wazf63vp0q-xorgproto-2021.5/include",
"-isystem",
"/nix/store/fafw3wb5wvamqaqdjlabqyrypapl1xd8-libxcb-1.14-dev/include",
"-isystem",
"/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include",
"-isystem",
"/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include",
"-isystem",
"/nix/store/h23v44i19x491njf1dc1zq9vg8i0a0hg-gnumake-4.4.1/include",
"-isystem",
"/nix/store/1aiwpacfrbcp1rnjf4q89kyywvisfb2i-assimp-5.2.5-dev/include",
"-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include",
"-isystem",
"/nix/store/sr9gwxbdmpi3lb1bz0v5dvgck95fcv58-libGL-1.6.0-dev/include",
"-isystem",
"/nix/store/whgh6f2vlyv980fbip076wsnjca34r1r-libglvnd-1.6.0-dev/include",
"-isystem",
"/nix/store/f525j4v68yl89l93iz0wjq0gkxrhx70z-libX11-1.8.4-dev/include",
"-isystem",
"/nix/store/qjlpy5db17yzcari5qgrw4wazf63vp0q-xorgproto-2021.5/include",
"-isystem",
"/nix/store/fafw3wb5wvamqaqdjlabqyrypapl1xd8-libxcb-1.14-dev/include",
"-isystem",
"/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include",
"-isystem",
"/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/src/mapEditor.cpp"
},
{
"directory": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/b",
"arguments": [
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/bin/g++",
"-fPIC",
"-Wformat",
"-Wformat-security",
"-Werror=format-security",
"-fstack-protector-strong",
"--param",
"ssp-buffer-size=4",
"-O2",
"-U_FORTIFY_SOURCE",
"-D_FORTIFY_SOURCE=2",
"-fno-strict-overflow",
"-I/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include/SDL2",
"-I/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include/SDL2",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/include",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui",
"-I/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/backends",
"-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2",
"-MD",
"-MT",
"CMakeFiles/PhoenixGame.dir/vendor/imgui/misc/cpp/imgui_stdlib.cpp.o",
"-MF",
"CMakeFiles/PhoenixGame.dir/vendor/imgui/misc/cpp/imgui_stdlib.cpp.o.d",
"-o",
"CMakeFiles/PhoenixGame.dir/vendor/imgui/misc/cpp/imgui_stdlib.cpp.o",
"-c",
"/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/misc/cpp/imgui_stdlib.cpp",
"-B/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include",
"-idirafter",
"/nix/store/wb2dlc8kpvrn960vq7j7c8822pi43n48-glibc-2.37-8-dev/include",
"-idirafter",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include-fixed",
"-B/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0",
"-B/nix/store/g012c53brxmb0if3lpmkjwmxk74hjflh-gcc-12.2.0-lib/lib",
"-B/nix/store/r5pv6ikzhq0wy3s66vv4wgzgdy9v8iw6-gcc-wrapper-12.2.0/bin/",
"-frandom-seed=zxrbhgzyrk",
"-isystem",
"/nix/store/h23v44i19x491njf1dc1zq9vg8i0a0hg-gnumake-4.4.1/include",
"-isystem",
"/nix/store/1aiwpacfrbcp1rnjf4q89kyywvisfb2i-assimp-5.2.5-dev/include",
"-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include",
"-isystem",
"/nix/store/sr9gwxbdmpi3lb1bz0v5dvgck95fcv58-libGL-1.6.0-dev/include",
"-isystem",
"/nix/store/whgh6f2vlyv980fbip076wsnjca34r1r-libglvnd-1.6.0-dev/include",
"-isystem",
"/nix/store/f525j4v68yl89l93iz0wjq0gkxrhx70z-libX11-1.8.4-dev/include",
"-isystem",
"/nix/store/qjlpy5db17yzcari5qgrw4wazf63vp0q-xorgproto-2021.5/include",
"-isystem",
"/nix/store/fafw3wb5wvamqaqdjlabqyrypapl1xd8-libxcb-1.14-dev/include",
"-isystem",
"/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include",
"-isystem",
"/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include",
"-isystem",
"/nix/store/h23v44i19x491njf1dc1zq9vg8i0a0hg-gnumake-4.4.1/include",
"-isystem",
"/nix/store/1aiwpacfrbcp1rnjf4q89kyywvisfb2i-assimp-5.2.5-dev/include",
"-isystem",
"/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include",
"-isystem",
"/nix/store/sr9gwxbdmpi3lb1bz0v5dvgck95fcv58-libGL-1.6.0-dev/include",
"-isystem",
"/nix/store/whgh6f2vlyv980fbip076wsnjca34r1r-libglvnd-1.6.0-dev/include",
"-isystem",
"/nix/store/f525j4v68yl89l93iz0wjq0gkxrhx70z-libX11-1.8.4-dev/include",
"-isystem",
"/nix/store/qjlpy5db17yzcari5qgrw4wazf63vp0q-xorgproto-2021.5/include",
"-isystem",
"/nix/store/fafw3wb5wvamqaqdjlabqyrypapl1xd8-libxcb-1.14-dev/include",
"-isystem",
"/nix/store/yhcggksfqz4kr45p3j8fs7dq2iifcavg-SDL2_ttf-2.20.2/include",
"-isystem",
"/nix/store/frhqd181g2g6l468g1gzx055dw0y560n-SDL2_image-2.6.3/include",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0",
"-isystem",
"/nix/store/aafdki1nf49k5vxq6gx2yabiybk2bjmw-gcc-12.2.0/include/c++/12.2.0/x86_64-unknown-linux-gnu"
],
"file": "/home/interfiber/repos/Interfiber/Linux-Game-Jam-Game/vendor/imgui/misc/cpp/imgui_stdlib.cpp"
} }
] ]

View file

@ -4,12 +4,12 @@ Size=400,400
Collapsed=0 Collapsed=0
[Window][Phoenix Map Editor] [Window][Phoenix Map Editor]
Pos=1739,1007 Pos=1261,211
Size=521,71 Size=556,101
Collapsed=0 Collapsed=0
[Window][Map Editor Tools] [Window][Map Editor Tools]
Pos=1716,555 Pos=3009,535
Size=338,211 Size=338,211
Collapsed=0 Collapsed=0

View file

@ -1,8 +1,8 @@
#pragma once #pragma once
// GFX constants
#define SCREEN_WIDTH 1000 #define SCREEN_WIDTH 1000
#define SCREEN_HEIGHT 1000 #define SCREEN_HEIGHT 1000
#define MAX_AMMO 400
// 32x32 textures // 32x32 textures
#define TEXTURE_WIDTH 32 #define TEXTURE_WIDTH 32
@ -11,3 +11,12 @@
// Texture IDs // Texture IDs
#define BRICK_WALL_TEXTURE_ID 0 #define BRICK_WALL_TEXTURE_ID 0
#define FLOOR_TEXTURE_ID 1 #define FLOOR_TEXTURE_ID 1
// Player texture IDs
#define PLAYER_WALK_DOWN_TEXTURE_ID 2
#define PLAYER_WALK_UP_TEXTURE_ID 3
#define PLAYER_WALK_LEFT_TEXTURE_ID 4
#define PLAYER_WALK_RIGHT_TEXTURE_ID 5
// Gameplay constants
#define MAX_AMMO 200

15
include/player.hpp Normal file
View file

@ -0,0 +1,15 @@
#pragma once
#include <string>
enum PPlayerFacingDirection { Up, Down, Left, Right };
struct PPlayer {
std::string name;
int x;
int y;
int health = 100;
int maxHealth = 100;
PPlayerFacingDirection facing = Up;
};
void PRenderPlayer(PPlayer *player);

View file

@ -1,11 +1,13 @@
#pragma once #pragma once
#include "assets.hpp" #include "assets.hpp"
#include "config.hpp" #include "config.hpp"
#include "player.hpp"
#include <SDL.h> #include <SDL.h>
struct GlobalState { struct GlobalState {
SDL_Window *window; SDL_Window *window;
SDL_Renderer *renderer; SDL_Renderer *renderer;
PPlayer player;
PhoenixAssets assets; PhoenixAssets assets;
int scale = 20; int scale = 20;
}; };

View file

@ -204,4 +204,14 @@ TILE FLOOR
TILE WALL TILE WALL
TILE WALL TILE WALL
TILE WALL TILE WALL
TILE WALL
TILE WALL
TILE WALL
TILE WALL
TILE WALL
TILE WALL
TILE WALL
TILE WALL
TILE WALL
TILE WALL
ENDMAP ENDMAP

View file

@ -106,7 +106,6 @@ void runMapEditor() {
done = true; done = true;
} }
// Start the Dear ImGui frame // Start the Dear ImGui frame
ImGui_ImplSDLRenderer_NewFrame(); ImGui_ImplSDLRenderer_NewFrame();
ImGui_ImplSDL2_NewFrame(); ImGui_ImplSDL2_NewFrame();

View file

@ -13,6 +13,10 @@ GlobalState state;
void PRunBoostrap() { void PRunBoostrap() {
PLoadTextureAsset("assets/textures/wall_brick.png"); PLoadTextureAsset("assets/textures/wall_brick.png");
PLoadTextureAsset("assets/textures/floor.png"); PLoadTextureAsset("assets/textures/floor.png");
PLoadTextureAsset("assets/player/player_walk_down.png");
PLoadTextureAsset("assets/player/player_walk_up.png");
PLoadTextureAsset("assets/player/player_walk_left.png");
PLoadTextureAsset("assets/player/player_walk_right.png");
} }
PhoenixGame::PhoenixGame() { PhoenixGame::PhoenixGame() {
@ -46,6 +50,7 @@ void PhoenixGame::render() {
SDL_RenderClear(state.renderer); SDL_RenderClear(state.renderer);
PRenderMap(&m_currentMap); PRenderMap(&m_currentMap);
PRenderPlayer(&state.player);
// PRenderTexture(&m_texture, 0, 0); // PRenderTexture(&m_texture, 0, 0);
} }
@ -64,26 +69,25 @@ void PhoenixGame::run() {
} }
unsigned char const *keys = SDL_GetKeyboardState(nullptr); unsigned char const *keys = SDL_GetKeyboardState(nullptr);
if (keys[SDL_SCANCODE_UP]) {
m_viewport.w += 5; if (keys[SDL_SCANCODE_W]) {
m_viewport.h += 5; state.player.facing = Up;
} else if (keys[SDL_SCANCODE_DOWN]) { state.player.y -= 5;
m_viewport.w -= 5; }
m_viewport.h -= 5;
} else if (keys[SDL_SCANCODE_W]) { if (keys[SDL_SCANCODE_S]) {
m_viewport.y += 20; state.player.facing = Down;
if (m_viewport.y > 0) state.player.y += 5;
m_viewport.y = 0; }
} else if (keys[SDL_SCANCODE_S]) {
m_viewport.y -= 20; if (keys[SDL_SCANCODE_A]) {
if (m_viewport.y < -720) state.player.facing = Left;
m_viewport.y = -720; state.player.x -= 5;
} else if (keys[SDL_SCANCODE_A]) { }
m_viewport.x += 20;
} else if (keys[SDL_SCANCODE_D]) { if (keys[SDL_SCANCODE_D]) {
m_viewport.x -= 20; state.player.facing = Right;
if (m_viewport.x < -1280) state.player.x += 5;
m_viewport.x = -1280;
} }
// Rendering code // Rendering code

29
src/player.cpp Normal file
View file

@ -0,0 +1,29 @@
#include "player.hpp"
#include "assets.hpp"
#include "config.hpp"
#include "state.hpp"
#include "texture.hpp"
#include <stdexcept>
void PRenderPlayer(PPlayer *player) {
PhoenixTexture *playerUpTexture = PGetTextureById(PLAYER_WALK_UP_TEXTURE_ID);
PhoenixTexture *playerDownTexture =
PGetTextureById(PLAYER_WALK_DOWN_TEXTURE_ID);
PhoenixTexture *playerLeftTexture =
PGetTextureById(PLAYER_WALK_LEFT_TEXTURE_ID);
PhoenixTexture *playerRightTexture =
PGetTextureById(PLAYER_WALK_RIGHT_TEXTURE_ID);
if (player->facing == Up) {
PRenderTexture(playerUpTexture, player->x, player->y);
} else if (player->facing == Down) {
PRenderTexture(playerDownTexture, player->x, player->y);
} else if (player->facing == Left) {
PRenderTexture(playerLeftTexture, player->x, player->y);
} else if (player->facing == Right) {
PRenderTexture(playerRightTexture, player->x, player->y);
} else {
throw std::runtime_error(
"Invalid player->facing direction, expected Up, Down, Left, or Right");
}
}