diff --git a/.gitignore b/.gitignore index e8bf047..8377dcb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,7 @@ .vscode -bin *config.txt -dll -docs -icon -releases -resources -scripts -*.opk *.DS_Store -jaildoctor* -*plist* -MacOS/* -Resources/* -Frameworks/* \ No newline at end of file +thumbs.db +*.exe +*_macos +*_linux \ No newline at end of file diff --git a/Makefile b/Makefile index 25afbfb..12d8432 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ executable = jaildoctors_dilemma source = source/*.cpp source/common/*.cpp -macosBundle = ../jaildoctors_dilemma_release/JailDoctor's Dilemma.app/Contents/ +appName = JailDoctor's Dilemma +macosBundle = ../jaildoctors_dilemma_release windows: @echo off @@ -11,13 +12,27 @@ macos: rm -rdf data/config mkdir -p data/config g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o $(executable)_macos -macos_f: +macos_release: +# Remove data rm -rdf data/config + rm -rdf "$(macosBundle)/$(appName).app" +# Create folders mkdir -p data/config - cp -r data "$(macosBundle)Resources" - cp -r "$(macosBundle)/Frameworks" . - clang++ $(source) -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(macosBundle)MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12 - rm -rdf ./Frameworks + mkdir -p "$(macosBundle)/$(appName).app/Contents/Frameworks" + mkdir -p "$(macosBundle)/$(appName).app/Contents/MacOS" + mkdir -p "$(macosBundle)/$(appName).app/Contents/Resources" + mkdir -p Frameworks +# Copy folders + cp -R data "$(macosBundle)/$(appName).app/Contents/Resources" + cp -R /Library/Frameworks/SDL2.framework "$(macosBundle)/$(appName).app/Contents/Frameworks" + cp -R /Library/Frameworks/SDL2.framework Frameworks +# Copy files + cp release/*.icns "$(macosBundle)/$(appName).app/Contents/Resources" + cp release/Info.plist "$(macosBundle)/$(appName).app/Contents" +# Build + clang++ $(source) -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(macosBundle)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12 +# Remove folders + rm -rdf Frameworks linux: rm -rdf data/config mkdir -p data/config diff --git a/release/Info.plist b/release/Info.plist new file mode 100644 index 0000000..72b6519 --- /dev/null +++ b/release/Info.plist @@ -0,0 +1,44 @@ + + + + + BuildMachineOSBuild + 19H2 + CFBundleDevelopmentRegion + en + CFBundleDisplayName + jaildoctors_dilemma + CFBundleExecutable + jaildoctors_dilemma + CFBundleIconFile + jaildoctors_dilemma + CFBundleIconName + jaildoctors_dilemma + CFBundleIdentifier + org.jailgames.jaildoctors_dilemma + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + jaildoctors_dilemma + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.4.3 + CFBundleSignature + ???? + CFBundleVersion + 1.0.0 + CSResourcesFileMapped + + LSMinimumSystemVersion + 10.12 + NSHighResolutionCapable + + NSHumanReadableCopyright + Copyright 2022 JailDesigner + NSPrincipalClass + NSApplication + SUPublicDSAKeyFile + dsa_pub.pem + + diff --git a/release/jaildoctors_dilemma.icns b/release/jaildoctors_dilemma.icns new file mode 100644 index 0000000..d6c0528 Binary files /dev/null and b/release/jaildoctors_dilemma.icns differ diff --git a/source/game.cpp b/source/game.cpp index ad09799..86001bc 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -7,7 +7,9 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as // Inicia algunas variables board.iniClock = SDL_GetTicks(); currentRoom = "03.room"; - spawnPoint = {15, 96, 0, 0, 0, s_standing, SDL_FLIP_NONE}; + const int x = 25; + const int y = 13; + spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL}; // Copia los punteros this->resource = resource; @@ -20,9 +22,9 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as #ifndef RELEASE currentRoom = "03.room"; - const int x = 29; - const int y = 13; - spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL}; + const int x1 = 29; + const int y1 = 13; + spawnPoint = {x1 * 8, y1 * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL}; #endif // Crea los objetos