Fix Linux build and implementations with new systems and C++20 features

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
2024-01-02 00:10:07 -06:00
parent 92ac7e5cf8
commit 5c73ed6cd3
10 changed files with 16 additions and 12 deletions
+2 -1
View File
@@ -28,7 +28,7 @@ memoryleak.txt
[Dd]ebugPublic/
*.tlog/
Crawler/x64/
Crawler/assets/saves/
Crawler/assets/saves/*
[Rr]eleases/
x86/
[Ww][Ii][Nn]32/
@@ -381,3 +381,4 @@ Crawler/pixelGameEngine_wasm.o
/CMakeCache.txt
/cmake_install.cmake
/Makefile
Crawler/out
+3 -2
View File
@@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Portions of this software are copyright © 2023 The FreeType
Portions of this software are copyright � 2023 The FreeType
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
All rights reserved.
*/
@@ -96,10 +96,11 @@ public:
return get_readOnly(ItemAttribute::Get(a));
}
inline const float&get_readOnly(const ItemAttribute&a)const{
static float DEFAULT=0;
if(attributes.count(a)){
return attributes.at(a);
}
return 0;
return DEFAULT;
}
inline auto begin()const{
return attributes.begin();
+1 -1
View File
@@ -4,4 +4,4 @@ debug.sh:8125f303032b6cbc137223df63d10096 -
lines.sh:3b907786f7fc9204025993016c9080de -
release.sh:b1ce8461a303e8e7aa9ed74259db3873 -
temp:d41d8cd98f00b204e9800998ecf8427e -
web.sh:cd3b8a99e208244dee7576bc23c0dc80 -
web.sh:1adf54f3c200922572a24573a0998110 -
+3 -3
View File
@@ -12,12 +12,12 @@ source ../emsdk/emsdk_env.sh
if [ ! -f "pixelGameEngine_wasm.o" ]
then
printf "Pixel Game Engine compile object missing. Compiling for the first time..."
em++ -std=c++20 -O2 ${EMSCRIPTEN_CUSTOM_PARAMS} -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 -c pixelGameEngine.cpp -o pixelGameEngine_wasm.o
em++ -std=c++20 -O2 ${EMSCRIPTEN_CUSTOM_PARAMS} -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 -s USE_FREETYPE=1 -c pixelGameEngine.cpp -o pixelGameEngine_wasm.o
fi
if [ -d "assets" ]; then
em++ -std=c++20 -O2 ${EMSCRIPTEN_CUSTOM_PARAMS} -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html --preload-file ./assets
em++ -std=c++20 -O2 ${EMSCRIPTEN_CUSTOM_PARAMS} -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 -s USE_FREETYPE=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html --preload-file ./assets
else
em++ -std=c++20 -O2 ${EMSCRIPTEN_CUSTOM_PARAMS} -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html
em++ -std=c++20 -O2 ${EMSCRIPTEN_CUSTOM_PARAMS} -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 -s USE_FREETYPE=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html
fi
cp buildtemplate.html ${PROJECT_NAME}.html
BIN
View File
Binary file not shown.
-4
View File
@@ -57,11 +57,9 @@ class ScrollableWindowComponent;
#define STARTING_DEPTH 999999
enum MenuType{
#pragma region Enum Start //DO NOT REMOVE
///////////////////////////////////////////////////////////
/*DO NOT REMOVE!!*/ENUM_START,///////////////////////////////
///////////////////////////////////////////////////////////
#pragma endregion
INVENTORY_CONSUMABLES,
CLASS_INFO,
CLASS_SELECTION,
@@ -81,11 +79,9 @@ enum MenuType{
CONSUMABLE_CRAFT_ITEM,
SAVE_FILE_NAME,
LOAD_GAME,
#pragma region Enum End //DO NOT REMOVE
///////////////////////////////////////////////////////////
/*DO NOT REMOVE!!*/ENUM_END////////////////////////////////
///////////////////////////////////////////////////////////
#pragma endregion
};
class Menu:public IAttributable{
View File
+5
View File
@@ -7,6 +7,11 @@
#include <dxgi.h>
#endif
#include <cstdint>
#undef None
#undef Status
namespace discord {
enum class Result {
+1
View File
@@ -1,6 +1,7 @@
#pragma once
#include "types.h"
#include <cstdint>
namespace discord {
+1 -1
View File
@@ -3,7 +3,7 @@ export AUTO_UPDATE=true
source utils/define.sh
define PROJECT_NAME "Crawler"
define CUSTOM_PARAMS "-I/usr/include/freetype2 -I/usr/include/libpng16 -std=c++20 -lGL -lX11 -lpthread -lpng -lstdc++fs -lfreetype -I/usr/include/lua5.3"
define CUSTOM_PARAMS "-Idiscord-files -I/usr/include/freetype2 -I/usr/include/libpng16 -std=c++20 -lGL -lX11 -lpthread -lpng -lstdc++fs -lfreetype -I/usr/include/lua5.3 ./discord_game_sdk.so"
define EMSCRIPTEN_CUSTOM_PARAMS "-s MAXIMUM_MEMORY=4GB"
define LANGUAGE "C++"