This repository has been archived by the owner on Nov 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
actionmax.sh
94 lines (76 loc) · 2.57 KB
/
actionmax.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env bash
# This file is part of The RetroPie Project
#
# The RetroPie Project is the legal property of its developers, whose names are
# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
#
# See the LICENSE.md file at the top-level directory of this distribution and
# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
#
rp_module_id="actionmax"
rp_module_desc="ActionMax Emulator"
rp_module_help="ROM Extension: .daphne\n\nCopy your Daphne roms to $romdir/daphne"
rp_module_licence="GPL3 https://raw.githubusercontent.com/DirtBagXon/actionmax-pi/master/LICENSE"
rp_module_repo="git https://github.com/DirtBagXon/actionmax-pi.git main"
rp_module_section="exp"
rp_module_flags="sdl1"
function depends_actionmax() {
getDepends libsdl1.2-dev libvorbis-dev libogg-dev libglew-dev zlib1g-dev libsdl-image1.2-dev libsdl-ttf2.0-dev
}
function sources_actionmax() {
gitPullOrClone
}
function build_actionmax() {
cd src/vldp2
./configure --disable-accel-detect
rpSwap on 1024
make -f Makefile.linux
cd ../game/singe
make -f Makefile.linux
cd ../..
make
cd ..
rpSwap off
md_ret_require="actionmax.bin"
}
function install_actionmax() {
md_ret_files=(
'sound'
'pics'
'actionmax.bin'
'singeinput.default'
'LICENSE'
)
}
function configure_actionmax() {
mkRomDir "daphne"
mkRomDir "daphne/roms"
addEmulator 0 "$md_id" "daphne" "$md_inst/actionmax.sh %ROM%"
addSystem "daphne"
local allemu="/opt/retropie/configs/all/emulators.cfg"
[[ "$md_mode" == "remove" ]] && return
mkUserDir "$md_conf_root/daphne"
ln -snf "$romdir/daphne/roms" "$md_inst/singe"
copyDefaultConfig "$md_inst/singeinput.default" "$md_conf_root/daphne/singeinput.ini"
ln -sf "$md_conf_root/daphne/singeinput.ini" "$md_inst/singeinput.ini"
local rom
for rom in 38ambushalley bluethunder hydrosub2021 popsghostly sonicfury; do
if ! grep -q "daphne_$rom" "$allemu"; then
addLineToFile "daphne_$rom = \"$md_id\"" $allemu
fi
done
local common_args="-framefile \"\$dir/\$name.txt\" -homedir \"$md_inst\" -fullscreen_window \$params"
cat >"$md_inst/actionmax.sh" <<_EOF_
#!/bin/bash
dir="\$1"
name="\${dir##*/}"
name="\${name%.*}"
if [[ -f "\$dir/\$name.commands" ]]; then
params=\$(<"\$dir/\$name.commands")
fi
"$md_inst/actionmax.bin" "\$dir/\$name.singe" $common_args
_EOF_
chown -R $user:$user "$md_inst"
chmod +x "$md_inst/actionmax.sh"
chown -R $user:$user "$md_conf_root/daphne/singeinput.ini"
}