Skip to content

Commit

Permalink
Merge pull request #632 from JeodC/iosas
Browse files Browse the repository at this point in the history
Isles of Sea & Sky
  • Loading branch information
kloptops authored Sep 4, 2024
2 parents 6a2f304 + f9ac65d commit a66653b
Show file tree
Hide file tree
Showing 33 changed files with 776 additions and 0 deletions.
118 changes: 118 additions & 0 deletions ports/iosas/Isles of Sea and Sky.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#!/bin/bash

XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}

if [ -d "/opt/system/Tools/PortMaster/" ]; then
controlfolder="/opt/system/Tools/PortMaster"
elif [ -d "/opt/tools/PortMaster/" ]; then
controlfolder="/opt/tools/PortMaster"
elif [ -d "$XDG_DATA_HOME/PortMaster/" ]; then
controlfolder="$XDG_DATA_HOME/PortMaster"
else
controlfolder="/roms/ports/PortMaster"
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"
get_controls

# Setup permissions
$ESUDO chmod 666 /dev/tty1
$ESUDO chmod 666 /dev/uinput
echo "Loading, please wait... (might take a while!)" > /dev/tty0

# Variables
GAMEDIR="/$directory/ports/iosas"
BITRATE=64

cd $GAMEDIR
> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1

$ESUDO chmod 777 "$GAMEDIR/gmloadernext"
$ESUDO chmod 777 "$GAMEDIR/libs/splash"
$ESUDO chmod 777 "$GAMEDIR/tools/gm-Ktool.py"

# Exports
export LD_LIBRARY_PATH="$GAMEDIR/libs:$GAMEDIR/tools/lib:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"
export PATH="$GAMEDIR/tools:$PATH"

# Display loading splash
if [ -f "$GAMEDIR/game.droid" ]; then
$ESUDO ./libs/splash "splash.png" 1
$ESUDO ./libs/splash "splash.png" 8000
fi

# Functions
install() {
echo "Performing first-run setup..." > $CUR_TTY
# Purge unneeded files
rm -rf assets/*.exe assets/*.dll assets/.gitkeep
# Rename data.win
echo "Moving game files..." > $CUR_TTY
mv "./assets/data.win" "./game.droid"
mv assets/* ./
rmdir assets
apply_patch
compress_audio || return 1
# Only do this during the install step so the user can turn it back on if they wish post-install
if [ $DEVICE_RAM -lt 2 ]; then
sed -i "s/^IdolSFX=[0-9]\+/IdolSFX=0/" "$GAMEDIR/pm-config.ini"
fi
}

apply_patch() {
echo "Applying patch..." > $CUR_TTY
if [ -f "$controlfolder/xdelta3" ]; then
error=$("$controlfolder/xdelta3" -d -s "$GAMEDIR/game.droid" "$GAMEDIR/tools/patch_idol_sfx.xdelta" "$GAMEDIR/game2.droid" 2>&1)
if [ $? -eq 0 ]; then
rm -rf "$GAMEDIR/game.droid"
mv "$GAMEDIR/game2.droid" "$GAMEDIR/game.droid"
echo "Patch applied successfully." > $CUR_TTY
else
echo "Failed to apply patch. Error: $error" > $CUR_TTY
rm -f "$GAMEDIR/game2.droid"
return 1
fi
else
echo "Error: xdelta3 not found in $controlfolder. Try updating PortMaster." > $CUR_TTY
return 1
fi
}

compress_audio() {
echo "Compressing audio. The process will take 5-10 minutes" > $CUR_TTY

gm-Ktool.py -b $BITRATE "$GAMEDIR/game.droid" "$GAMEDIR/game2.droid"

if [ $? -eq 0 ]; then
rm -rf "$GAMEDIR/game.droid"
mv "$GAMEDIR/game2.droid" "$GAMEDIR/game.droid"
echo "Audio compression applied successfully." > $CUR_TTY
else
echo "Audio compression failed." > $CUR_TTY
rm -f "$GAMEDIR/game2.droid"
return 1
fi
}

if [ ! -f "$GAMEDIR/game.droid" ]; then
$ESUDO ./libs/splash "patching_splash.png" 1
$ESUDO ./libs/splash "patching_splash.png" 12000 &
install || return 1
fi

# Font replacements
if [ -f "localization_fonts.csv" ]; then
sed -i 's/malgun\.ttf/BMDOHYEON_ttf.ttf/g' localization_fonts.csv # Korean
fi

# Assign gptokeyb and load the game
$GPTOKEYB "gmloadernext" -c "control.gptk" &
./gmloadernext game.apk

# Kill processes
$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
44 changes: 44 additions & 0 deletions ports/iosas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Isles of Sea and Sky -- PortMaster Edition
Isles of Sea and Sky is a sokoban block puzzle game with Zelda-like elements and a stunning soundtrack. With a lot of effort, this game is able to be run on small-arm linux handhelds using a Game Maker compatibility layer called GMLoader-Next and some patches to reduce memory and cpu usage.

<div align="center">
<table>
<tr>
<td align="center">
<p align="center">Isles of Sea and Sky Launch Trailer</p>
<a href="https://www.youtube.com/watch?v=euaG9rsGrfA">
<img src="https://img.youtube.com/vi/euaG9rsGrfA/0.jpg" alt="Isles of Sea and Sky Launch Trailer" width="300"/>
</a>
</td>
<td align="center">
<p>&nbsp;</p> <!-- Adjust spaces to match -->
<img src="https://images.squarespace-cdn.com/content/v1/5cef1ac40bf916000135fdcc/f4b9a8a8-b054-4e14-9f1e-cc2687e888e2/iss_river.gif" alt="Isles of Sea and Sky GIF" width="300"/>
</td>
</tr>
</table>
</div>

## Installation
Add your game data from your Steam installation to `ports/iosas/assets`. First-time run will handle sorting data.

## Default Gameplay Controls
| Button | Action |
|--|--|
|START|Menus|
|SELECT|Map|
|D-PAD / Analog|Move|
|L1|Undo|
|R1|Reset room|

## Config
The xdelta patch enables `pm-config.ini`, which has some performance options. Testing found that `FrameSkip=40` works pretty well for the H700 chip. For no stuttering at all, you can set `IdolSFX=0` to turn off the special effect that bogs down the cpu.

## Importing / Exporting Save Data
Steam saves are located at `\AppData\Local\IslesOfSeaAndSky` on Windows. Copy `save_v1_000.dat` or similar to `ports/iosas` to use it. To export save data to your Steam install, do the reverse.

## Thanks
Cicada Games -- The game and [press kit materials](https://islesofseaandsky.com/press-kit) used to create the splash screens
Cyril "kotzebuedog" Delétré -- The phenomenal audio patch that makes this port possible
nate -- Custom loading splash engine
JohnnyOnFlame -- GMLoaderNext
Testers and Devs from the PortMaster Discord
Binary file added ports/iosas/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions ports/iosas/gameinfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version='1.0' encoding='utf-8'?>
<gameList>
<game>
<path>./Isles of Sea and Sky.sh</path>
<name>Isles of Sea and Sky</name>
<desc>A fantastic, oceanic, open world puzzle adventure. Solve innovative block puzzles while unearthing a mystifying story, gaining new friends that change the puzzle landscape, and unlocking powers that provide more options for how you choose to progress through the enigmatic Isles of Sea and Sky.</desc>
<releasedate>20240522</releasedate>
<publisher>Cicada Games, Gamera Games</publisher>
<image>./iosas/cover.png</image>
</game>
</gameList>
Binary file added ports/iosas/iosas/BMDOHYEON_ttf.ttf
Binary file not shown.
54 changes: 54 additions & 0 deletions ports/iosas/iosas/LICENSE_bmdohyeon.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Baedal Minjok Font License Policy
---------------------------------

The intellectual property rights of Hanna, Hanna Air, Hanna Pro, Jua, Dohyeon, Yeonsung, KirangHaerang, Euljiro, and Euljiro 10 Years Later, Baemin Geullim, Baemin Euljiro OraeOrae fonts are held by Woowa Brothers.

Fonts distributed free of charge by Baedal Minjok (Hanna, Jua, Dohyeon, Yeonsung, KirangHaerang, Hanna Air, Hanna Pro, Euljiro, Euljiro 10 Years Later, Baemin Geullim, Baemin Euljiro OraeOrae) can be modified and changed freely and used by both individual and corporate users for commercial or non- profit purposes.

However, please note that sales of the font file (OTF/TTF) is prohibited.

- Permitted use: Commercial/non-commercial products such as signboards, banners, brochures, posters, books, magazines, business cards, stickers, packages, goods, webpages, advertisement banners, e-brochures, video captions, movies, TV advertisements, webcomics, game UI, app UI, newsletters, online magazines, presentations, e-books, messaging/chat stickers, logos, marks, newspaper advertisements, magazine advertisements, print advertisements, cup sleeves, hand fans, wrapping paper, mobile phone cases, notebooks, bags, shoes, and clothing.
- Prohibited use: Paid sales of font files (OTF/TTF)
Images of prints, advertisements (including online advertisements), and other products using free fonts distributed by Baemin (Hanna, Jua, Dohyeon, Yeonsung, KirangHaerang, Hanna Air, Hanna Pro, Euljiro, Euljiro 10 Years Later, Baemin Geullim, Baemin Euljiro OraeOrae) may be used for the company’s data collection and research purposes. If you wish to opt out of such use, please feel free to contact our Customer Service Center (+82-1600-0987 / [email protected]).

Provided that the full text of the "Intellectual Property Guide and License" below is shown, the fonts may be bundled, redistributed, or sold with other software.

Baedal Minjok Font License Policy
Copyright © 2013, Woowa Brothers Corporation (https://www.woowahan.com), with Reserved Font Name BM HANNA 11yrs old, BM HANNA 11yrs old OTF, BMHANNAAir_otf, BMHANNAAir_ttf, BMHANNAPro_otf, BMHANNAPro_ttf, BM JUA_TTF, BM JUA_OTF, BM DoHyeon, BM DoHyeon OTF, BM YEONSUNG, BM YEONSUNG OTF, BM KIRANGHAERANG, BM KIRANGHAERANG OTF, BMEULJIRO, BMEULJIROTTF, BM EULJITO 10 YEARS LATER, BM EULJITO 10 YEARS LATER TTF, BMEuljirooraeoraeOTF.

This Font Software is licensed under the SIL Open Font License, Version 1.1.

This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL

SIL OPEN FONT LICENSE
Version 1.1 - 26 February 2007

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.

The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the copyright statement(s).

"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting, or substituting — in part or in whole — any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.

"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:

1. Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
2. Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
3. No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
4. The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
5. The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
Empty file.
24 changes: 24 additions & 0 deletions ports/iosas/iosas/control.gptk
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
back = \"
start = \"
up = \"
down = \"
left = \"
right = \"
a = \"
b = \"
x = \"
y = \"
l1 = \"
l2 = \"
l3 = \"
r1 = \"
r2 = \"
r3 = \"
left_analog_up = \"
left_analog_down = \"
left_analog_left = \"
left_analog_right = \"
right_analog_up = \"
right_analog_down = \"
right_analog_left = \"
right_analog_right = \"
Binary file added ports/iosas/iosas/game.apk
Binary file not shown.
Binary file added ports/iosas/iosas/gmloadernext
Binary file not shown.
Binary file added ports/iosas/iosas/lib/arm64-v8a/libc++_shared.so
Binary file not shown.
Binary file not shown.
Binary file added ports/iosas/iosas/lib/arm64-v8a/libm.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added ports/iosas/iosas/lib/armeabi-v7a/libm.so
Binary file not shown.
Binary file added ports/iosas/iosas/libs/libcrypto.so.1.1
Binary file not shown.
Binary file added ports/iosas/iosas/libs/libopenal.so.1
Binary file not shown.
Binary file added ports/iosas/iosas/libs/libzip.so.5
Binary file not shown.
Binary file added ports/iosas/iosas/libs/splash
Binary file not shown.
Binary file added ports/iosas/iosas/patching_splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions ports/iosas/iosas/pm-config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Performance]
FrameSkip=20
IdolSFX=1
Binary file added ports/iosas/iosas/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a66653b

Please sign in to comment.