Added quotes for linux build script. Automatically create metadata file if missing when hitting Load Game

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
pull/30/head
sigonasr2 11 months ago
parent b97afb24bd
commit 705bb9b9fb
  1. 12
      Adventures in Lestoria/C++/scripts/build.sh
  2. 0
      Adventures in Lestoria/C++/scripts/commit.sh
  3. 0
      Adventures in Lestoria/C++/scripts/debug.sh
  4. 0
      Adventures in Lestoria/C++/scripts/lines.sh
  5. 0
      Adventures in Lestoria/C++/scripts/release.sh
  6. 0
      Adventures in Lestoria/C++/scripts/temp
  7. 0
      Adventures in Lestoria/C++/scripts/web.sh
  8. 8
      Adventures in Lestoria/SaveFile.cpp
  9. 2
      Adventures in Lestoria/sig

@ -15,20 +15,20 @@ if [ "$1" = "test" ]
then
printf "Running tests...\n"
echo "#define TEST_SUITE" > ./test/test.h
if g++ $(find . -type f -name "*.cpp" -not -name "pixelGameEngine.cpp") pixelGameEngine.o ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then
./${PROJECT_NAME} "$@"
if g++ $(find . -type f -name "*.cpp" -not -name "pixelGameEngine.cpp") pixelGameEngine.o ${CUSTOM_PARAMS} -o "${PROJECT_NAME}"; then
"./${PROJECT_NAME}" "$@"
fi
elif [ "$1" = "full" ]
then
echo "" > ./test/test.h
g++ ${CUSTOM_PARAMS} -c pixelGameEngine.cpp
if g++ $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine.o ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then
./${PROJECT_NAME} "$@"
if g++ $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine.o ${CUSTOM_PARAMS} -o "${PROJECT_NAME}"; then
"./${PROJECT_NAME}" "$@"
fi
else
echo "" > ./test/test.h
if g++ $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine.o ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then
./${PROJECT_NAME} "$@"
if g++ $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine.o ${CUSTOM_PARAMS} -o "${PROJECT_NAME}"; then
"./${PROJECT_NAME}" "$@"
fi
fi
printf "\n\n"

@ -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 <EFBFBD> 2023 The FreeType
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
All rights reserved.
*/
@ -210,11 +210,15 @@ const void SaveFile::SetSaveFileID(size_t saveFileID){
}
const void SaveFile::UpdateSaveGameData(){
std::filesystem::create_directories("save_file_path"_S);
auto LoadMetadataFile=[](){
auto gameFilesList=Component<ScrollableWindowComponent>(LOAD_GAME,"Game Files List");
gameFilesList->RemoveAllComponents();
const size_t saveFileCount=GetSaveFileCount();
utils::datafile metadata;
if(!std::filesystem::exists("save_file_path"_S+"metadata.dat")){
utils::datafile::Write(metadata,"save_file_path"_S+"metadata.dat");
}
utils::datafile::Read(metadata,"save_file_path"_S+"metadata.dat");
float offsetY=0;
for(size_t i=0;i<saveFileCount;i++){
@ -257,7 +261,7 @@ const std::string SaveFile::CreateServerRequest(const SaveFileOperation::Operati
; / ? : @ & = + $ ,
uriMark ::: one of
- _ . ! ~ * ' ( )
Let unescapedURISet be a String containing one instance of each character valid in uriReserved and uriUnescaped plus #.
Let unescapedURISet be a String containing one instance of each character valid in uriReserved and uriUnescaped plus <EFBFBD>#<EFBFBD>.
*/
const std::array uriReserved={';','/','?',':','@','&','=','+','$',',','-','_','.','!','~','*','\'','(',')','#'};
if(c>='A'&&c<='Z'||c>='a'&&c<='z'||c>='0'&&c<='9'||std::find(uriReserved.begin(),uriReserved.end(),c)!=uriReserved.end())return std::move(str)+c;

@ -1,4 +1,4 @@
export AUTO_UPDATE=true
export AUTO_UPDATE=false
source utils/define.sh

Loading…
Cancel
Save