Added quotes for linux build script. Automatically create metadata file if missing when hitting Load Game
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
b97afb24bd
commit
705bb9b9fb
12
Adventures in Lestoria/C++/scripts/build.sh
Normal file → Executable file
12
Adventures in Lestoria/C++/scripts/build.sh
Normal file → Executable file
@ -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"
|
||||
|
0
Adventures in Lestoria/C++/scripts/commit.sh
Normal file → Executable file
0
Adventures in Lestoria/C++/scripts/commit.sh
Normal file → Executable file
0
Adventures in Lestoria/C++/scripts/debug.sh
Normal file → Executable file
0
Adventures in Lestoria/C++/scripts/debug.sh
Normal file → Executable file
0
Adventures in Lestoria/C++/scripts/lines.sh
Normal file → Executable file
0
Adventures in Lestoria/C++/scripts/lines.sh
Normal file → Executable file
0
Adventures in Lestoria/C++/scripts/release.sh
Normal file → Executable file
0
Adventures in Lestoria/C++/scripts/release.sh
Normal file → Executable file
0
Adventures in Lestoria/C++/scripts/temp
Normal file → Executable file
0
Adventures in Lestoria/C++/scripts/temp
Normal file → Executable file
0
Adventures in Lestoria/C++/scripts/web.sh
Normal file → Executable file
0
Adventures in Lestoria/C++/scripts/web.sh
Normal file → Executable 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 <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;
|
||||
|
2
Adventures in Lestoria/sig
Normal file → Executable file
2
Adventures in Lestoria/sig
Normal file → Executable file
@ -1,4 +1,4 @@
|
||||
export AUTO_UPDATE=true
|
||||
export AUTO_UPDATE=false
|
||||
|
||||
source utils/define.sh
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user