Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Port Bot Vice #74

Merged
merged 7 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions ports/botvice/Bot Vice.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/bin/bash
# PORTMASTER: botvice.zip, Bot Vice.sh
# Below we assign the source of the control folder (which is the PortMaster folder) based on the distro:
if [ -d "/opt/system/Tools/PortMaster/" ]; then
controlfolder="/opt/system/Tools/PortMaster"
elif [ -d "/opt/tools/PortMaster/" ]; then
controlfolder="/opt/tools/PortMaster"
else
controlfolder="/roms/ports/PortMaster"
fi

# We source the control.txt file contents here
# The $ESUDO, $directory, $param_device and necessary
# Sdl configuration controller configurations will be sourced from the control.txt
source $controlfolder/control.txt

# We pull the controller configs from the get_controls function from the control.txt file here
get_controls

$ESUDO chmod 666 /dev/tty0

# We check on emuelec based CFWs the OS_NAME
[ -f "/etc/os-release" ] && source "/etc/os-release"

GAMEDIR=/$directory/ports/botvice

if [ "$OS_NAME" == "JELOS" ]; then
export SPA_PLUGIN_DIR="/usr/lib32/spa-0.2"
export PIPEWIRE_MODULE_DIR="/usr/lib32/pipewire-0.3/"
fi

# Port specific additional libraries should be included within the port's directory in a separate subfolder named libs.
# Prioritize the armhf libs to avoid conflicts with aarch64
export LD_LIBRARY_PATH="/usr/lib32:$GAMEDIR/libs:$GAMEDIR/utils/libs"
export GMLOADER_DEPTH_DISABLE=1
export GMLOADER_SAVEDIR="$GAMEDIR/gamedata/"

# We log the execution of the script into log.txt
exec > >(tee "$GAMEDIR/log.txt") 2>&1

# Patch game
cd "$GAMEDIR"
# If "gamedata/game.unx" exists and its size is 4,660,180 bytes, apply the xdelta3 patch
if [ -f "./gamedata/game.unx" ]; then
file_size=$(ls -l "./gamedata/game.unx" | awk '{print $5}')
if [ "$file_size" -eq 4660180 ]; then
$ESUDO ./patch/xdelta3 -d -s gamedata/game.unx -f ./patch/botvice.xdelta gamedata/game.unx
fi
fi

# If "gamedata/audiogroup1.dat" exists and its size is 12,241,788 bytes, apply the xdelta3 patch
if [ -f "./gamedata/audiogroup1.dat" ]; then
file_size=$(ls -l "./gamedata/audiogroup1.dat" | awk '{print $5}')
if [ "$file_size" -eq 12241788 ]; then
$ESUDO ./patch/xdelta3 -d -s gamedata/audiogroup1.dat -f ./patch/audio1.xdelta gamedata/audiogroup1.dat
fi
fi

# If "gamedata/audiogroup2.dat" exists and its size is 27,416,556 bytes, apply the xdelta3 patch
if [ -f "./gamedata/audiogroup2.dat" ]; then
file_size=$(ls -l "./gamedata/audiogroup2.dat" | awk '{print $5}')
if [ "$file_size" -eq 27416556 ]; then
$ESUDO ./patch/xdelta3 -d -s gamedata/audiogroup2.dat -f ./patch/audio2.xdelta gamedata/audiogroup2.dat
fi
fi

cd $GAMEDIR

# Check for file existence before trying to manipulate them:
[ -f "./gamedata/data.unx" ] && mv gamedata/data.unx gamedata/game.droid
[ -f "./gamedata/game.unx" ] && mv gamedata/game.unx gamedata/game.droid

# Make sure uinput is accessible so we can make use of the gptokeyb controls
$ESUDO chmod 666 /dev/uinput

$GPTOKEYB "gmloader" -c ./botvice.gptk &

$ESUDO chmod +x "$GAMEDIR/gmloader"

./gmloader botvice.apk

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
21 changes: 21 additions & 0 deletions ports/botvice/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Notes

Special thanks to DYA Games [https://dyagames.com/] for making this wonderful game
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown link is incorrect, it should be:

Special thanks to [DYA Games](https://dyagames.com/) for making this wonderful game


Source: https://dyagames.itch.io/bot-vice

## Controls

| Button | Action |
|--|--|
|D-pad/L-stick|Movement |
|A|Shoot|
|B|Roll|
|X|Saber|
|R1|Aim|
|L1|Next Gun|
|L2|Previous Gun|
|Select |Space (to reconfigure controls)|
|Select |Pause/Menu|


Binary file added ports/botvice/botvice/botvice.apk
Binary file not shown.
17 changes: 17 additions & 0 deletions ports/botvice/botvice/botvice.gptk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
back = space
start = \"

up = up
down = down
left = left
right = right

left_analog_up = \"
left_analog_down = \"
left_analog_left = \"
left_analog_right = \"

a = \"
b = \"
x = \"
y = \"
Binary file added ports/botvice/botvice/gamedata/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ports/botvice/botvice/gmloader
Binary file not shown.
Binary file added ports/botvice/botvice/libc++_shared.so
Binary file not shown.
Binary file added ports/botvice/botvice/libs/libcrypto.so.1.1
Binary file not shown.
Binary file added ports/botvice/botvice/libs/liblzma.so.5
Binary file not shown.
Binary file added ports/botvice/botvice/libs/libzip.so.5
Binary file not shown.
Binary file added ports/botvice/botvice/patch/audio1.xdelta
Binary file not shown.
Binary file added ports/botvice/botvice/patch/audio2.xdelta
Binary file not shown.
Binary file added ports/botvice/botvice/patch/botvice.xdelta
Binary file not shown.
Binary file added ports/botvice/botvice/patch/xdelta3
Binary file not shown.
25 changes: 25 additions & 0 deletions ports/botvice/port.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 2,
"name": "botvice.zip",
"items": [
"Bot Vice",
"botvice"
],
"items_opt": [],
"attr": {
"title": "Bot Vice",
"porter": [
"Fraxinus88"
],
"desc": "Show off your skills and reflexes in this frantic gallery shooter arcade action title - Filled with bullets, bots, and explosions! You play as Erin Saver, who carries out a personal vendetta against the criminal gang the Wildbots while bringing them to justice",
"inst": "Purchase the game either from https://dyagames.itch.io/bot-vice OR https://store.steampowered.com/app/491040/Bot_Vice/\n\nFor itch: Download Bot Vice (Linux Ubuntu 14.04 LTS) version, copy all files from /assets to /ports/botvice/gamedata\n\nFor steam: Run steam console via Windows+R: Type: steam://open/console, download the linux version by typing: download_depot 491040 491042 in the console, when the download is complete, it will tell you the location of the folder, copy all files from /assets to /ports/botvice/gamedata",
"genres": [
"action"
],
"image": null,
"rtr": false,
"exp": false,
"runtime": null,
"reqs": []
}
}
Binary file added ports/botvice/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading