Skip to content

Commit

Permalink
Generate levels for each Android asset and use recommended locations.
Browse files Browse the repository at this point in the history
  • Loading branch information
CartBlanche committed Dec 13, 2024
1 parent aa150d0 commit 2508f2e
Show file tree
Hide file tree
Showing 36 changed files with 87 additions and 13 deletions.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#9ACEEB</color>
</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">___SafeGameName___</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<AssemblyName>___SafeGameName___</AssemblyName>
</PropertyGroup>
<ItemGroup>
<AndroidResource Include="Resources\Drawable\Splash.png" />
<AndroidResource Include="Resources\Values\Styles.xml" />
</ItemGroup>
<ItemGroup>
<MonoGameContentReference Include="..\___SafeGameName___.Core\Content\___SafeGameName___.mgcb">
<Link>Content\___SafeGameName___.mgcb</Link>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/zsh

# Declare a constant variables
readonly resources_base_path="../../___SafeGameName___.Android/Resources"
readonly drawable_resources_path="$resources_base_path/drawable-"
readonly mdpi="mdpi"
readonly hdpi="hdpi"
readonly xhdpi="xhdpi"
readonly xxhdpi="xxhdpi"
readonly xxxhdpi="xxxhdpi"

echo "Generating Android icons"

echo "Generating Android splash screens"
mkdir -p "$drawable_resources_path$mdpi"
mkdir -p "$drawable_resources_path$hdpi"
mkdir -p "$drawable_resources_path$xhdpi"
mkdir -p "$drawable_resources_path$xxhdpi"
mkdir -p "$drawable_resources_path$xxxhdpi"

sips -Z 48 icon-1024.png -o "$drawable_resources_path$mdpi/icon.png"
sips -Z 72 icon-1024.png -o "$drawable_resources_path$hdpi/icon.png"
sips -Z 96 icon-1024.png -o "$drawable_resources_path$xhdpi/icon.png"
sips -Z 144 icon-1024.png -o "$drawable_resources_path$xxhdpi/icon.png"
sips -Z 192 icon-1024.png -o "$drawable_resources_path$xxxhdpi/icon.png"

sips -Z 470 splash.png -o "$drawable_resources_path$mdpi/splash.png"
sips -Z 640 splash.png -o "$drawable_resources_path$hdpi/splash.png"
sips -Z 960 splash.png -o "$drawable_resources_path$xhdpi/splash.png"
sips -Z 1440 splash.png -o "$drawable_resources_path$xxhdpi/splash.png"
sips -Z 1920 splash.png -o "$drawable_resources_path$xxxhdpi/splash.png"

echo "Android Generation Complete!"
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ while true; do
read confirm

# Check the user's response
if [[ "$confirm" == "y" || "$confirm" == "yes" ]]; then
if [[ "${confirm:l}" == "y" || "${confirm:l}" == "yes" ]]; then
# Check if the directory exists
if [[ -d "$top_level_path" ]]; then
# Top level directory exists, delete it
Expand All @@ -20,7 +20,7 @@ while true; do
echo "'$top_level_path' directory does not exist. Continuing."
fi
break
elif [[ "$confirm" == "n" || "$confirm" == "no" ]]; then
elif [[ "${confirm:l}" == "n" || "${confirm:l}" == "no" ]]; then
echo "Deletion canceled."
exit 0
else
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#9ACEEB</color>
</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">___SafeGameName___</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
which is used to tint widgets -->
<!--<item name="colorAccent">#FF4081</item>-->
</style>
</resources>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<AssemblyName>___SafeGameName___</AssemblyName>
</PropertyGroup>
<ItemGroup>
<AndroidResource Include="Resources\Drawable\Splash.png" />
<AndroidResource Include="Resources\Values\Styles.xml" />
</ItemGroup>
<ItemGroup>
<MonoGameContentReference Include="..\___SafeGameName___.Core\Content\___SafeGameName___.mgcb">
<Link>Content\___SafeGameName___.mgcb</Link>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/zsh

# Declare a constant variables
readonly resources_base_path="../../___SafeGameName___.Android/Resources"
readonly drawable_resources_path="$resources_base_path/drawable-"
readonly mdpi="mdpi"
readonly hdpi="hdpi"
readonly xhdpi="xhdpi"
readonly xxhdpi="xxhdpi"
readonly xxxhdpi="xxxhdpi"

echo "Generating Android icons"

echo "Generating Android splash screens"
mkdir -p "$drawable_resources_path$mdpi"
mkdir -p "$drawable_resources_path$hdpi"
mkdir -p "$drawable_resources_path$xhdpi"
mkdir -p "$drawable_resources_path$xxhdpi"
mkdir -p "$drawable_resources_path$xxxhdpi"

sips -Z 48 icon-1024.png -o "$drawable_resources_path$mdpi/icon.png"
sips -Z 72 icon-1024.png -o "$drawable_resources_path$hdpi/icon.png"
sips -Z 96 icon-1024.png -o "$drawable_resources_path$xhdpi/icon.png"
sips -Z 144 icon-1024.png -o "$drawable_resources_path$xxhdpi/icon.png"
sips -Z 192 icon-1024.png -o "$drawable_resources_path$xxxhdpi/icon.png"

sips -Z 470 splash.png -o "$drawable_resources_path$mdpi/splash.png"
sips -Z 640 splash.png -o "$drawable_resources_path$hdpi/splash.png"
sips -Z 960 splash.png -o "$drawable_resources_path$xhdpi/splash.png"
sips -Z 1440 splash.png -o "$drawable_resources_path$xxhdpi/splash.png"
sips -Z 1920 splash.png -o "$drawable_resources_path$xxxhdpi/splash.png"

echo "Android Generation Complete!"
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ while true; do
read confirm

# Check the user's response
if [[ "$confirm" == "y" || "$confirm" == "yes" ]]; then
if [[ "${confirm:l}" == "y" || "${confirm:l}" == "yes" ]]; then
# Check if the directory exists
if [[ -d "$top_level_path" ]]; then
# Top level directory exists, delete it
Expand All @@ -20,7 +20,7 @@ while true; do
echo "'$top_level_path' directory does not exist. Continuing."
fi
break
elif [[ "$confirm" == "n" || "$confirm" == "no" ]]; then
elif [[ "${confirm:l}" == "n" || "${confirm:l}" == "no" ]]; then
echo "Deletion canceled."
exit 0
else
Expand Down

0 comments on commit 2508f2e

Please sign in to comment.