diff --git a/.gitignore b/.gitignore index 4f8b2e3b..d2ebd0a2 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/Crawler/AttributableStat.h b/Crawler/AttributableStat.h index 9ffbceb4..f8310642 100644 --- a/Crawler/AttributableStat.h +++ b/Crawler/AttributableStat.h @@ -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(); diff --git a/Crawler/C++/scripts/md5 b/Crawler/C++/scripts/md5 index 4e06ad7f..e5ca4867 100644 --- a/Crawler/C++/scripts/md5 +++ b/Crawler/C++/scripts/md5 @@ -4,4 +4,4 @@ debug.sh:8125f303032b6cbc137223df63d10096 - lines.sh:3b907786f7fc9204025993016c9080de - release.sh:b1ce8461a303e8e7aa9ed74259db3873 - temp:d41d8cd98f00b204e9800998ecf8427e - -web.sh:cd3b8a99e208244dee7576bc23c0dc80 - +web.sh:1adf54f3c200922572a24573a0998110 - diff --git a/Crawler/C++/scripts/web.sh b/Crawler/C++/scripts/web.sh index 1097efb7..5122584d 100755 --- a/Crawler/C++/scripts/web.sh +++ b/Crawler/C++/scripts/web.sh @@ -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 diff --git a/Crawler/Crawler b/Crawler/Crawler index 4b0de35a..c93fae1b 100755 Binary files a/Crawler/Crawler and b/Crawler/Crawler differ diff --git a/Crawler/Menu.h b/Crawler/Menu.h index 91e33023..82d3ea44 100644 --- a/Crawler/Menu.h +++ b/Crawler/Menu.h @@ -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{ diff --git a/Crawler/assets/saves/metadata.dat b/Crawler/assets/saves/metadata.dat new file mode 100644 index 00000000..e69de29b diff --git a/Crawler/discord-files/types.h b/Crawler/discord-files/types.h index 76c43117..013df059 100644 --- a/Crawler/discord-files/types.h +++ b/Crawler/discord-files/types.h @@ -7,6 +7,11 @@ #include #endif +#include + +#undef None +#undef Status + namespace discord { enum class Result { diff --git a/Crawler/discord-files/user_manager.h b/Crawler/discord-files/user_manager.h index d85de1b5..f1d001e3 100644 --- a/Crawler/discord-files/user_manager.h +++ b/Crawler/discord-files/user_manager.h @@ -1,6 +1,7 @@ #pragma once #include "types.h" +#include namespace discord { diff --git a/Crawler/sig b/Crawler/sig index b2587723..b61db692 100755 --- a/Crawler/sig +++ b/Crawler/sig @@ -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++"