forked from fgsfdsfgs/perfect_dark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fgs-port' into port-x64
# Conflicts: # .github/workflows/c-cpp.yml
- Loading branch information
Showing
20 changed files
with
351 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
*.exe | ||
pd.*.z64 | ||
build | ||
.flatpak-builder | ||
extracted | ||
src/assets/*/*.bin | ||
src/assets/*/*.ctl | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Desktop Entry] | ||
Name=Perfect Dark | ||
Comment=Modern source port of Perfect Dark | ||
Exec=pd | ||
Icon=io.github.fgsfdsfgs.perfect_dark | ||
Terminal=false | ||
Type=Application | ||
Categories=Game;ActionGame; | ||
StartupNotify=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<component type="desktop-application"> | ||
<id>io.github.fgsfdsfgs.perfect_dark</id> | ||
<name>Perfect Dark</name> | ||
<developer id="io.github.fgsfdsfgs.perfect_dark"> | ||
<name>Perfect Dark Contributors</name> | ||
<url>https://github.com/fgsfdsfgs/perfect_dark/graphs/contributors</url> | ||
</developer> | ||
<launchable type="desktop-id">io.github.fgsfdsfgs.perfect_dark.desktop</launchable> | ||
<summary>Modern cross-platform port of Perfect Dark</summary> | ||
<metadata_license>CC0-1.0</metadata_license> | ||
<project_license>MIT</project_license> | ||
<url type="homepage">https://github.com/fgsfdsfgs/perfect_dark/</url> | ||
<description> | ||
<p>This is a port of Ryan Dywer's decompilation of classic N64 shooter Perfect Dark to modern systems.</p> | ||
</description> | ||
<!-- | ||
<screenshots> | ||
<screenshot type="default"> | ||
<image type="source">https://gitlab.com/fpiesche/dxx-rebirth-assets/-/raw/c6e7e79eebe92905f84f07a635ffab5122a94bd1/d1x/screenshots/retromode.png</image> | ||
<caption>"Retro mode": the default graphics setup, like the original game but in high resolution</caption> | ||
<screenshots> | ||
--> | ||
<categories> | ||
<category>Game</category> | ||
<category>ActionGame</category> | ||
<category>Shooter</category> | ||
</categories> | ||
<keywords> | ||
<keyword>n64</keyword> | ||
<keyword>scifi</keyword> | ||
<keyword>cyberpunk</keyword> | ||
<keyword>retro</keyword> | ||
<keyword>sourceport</keyword> | ||
<keyword>port</keyword> | ||
</keywords> | ||
<releases> | ||
<release version="latest" date="2024-05-14"/> | ||
</releases> | ||
<content_rating type="oars-1.1"> | ||
<content_attribute id="violence-realistic">moderate</content_attribute> | ||
<content_attribute id="violence-bloodshed">mild</content_attribute> | ||
</content_rating> | ||
<update_contact>https://github.com/fgsfdsfgs/perfect_dark/</update_contact> | ||
</component> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
|
||
# Create user data directories if necessary | ||
userdirs=( roms saves mods ) | ||
for path in "${userdirs[@]}"; do | ||
if [ ! -d "${XDG_DATA_HOME}/${path}" ]; then | ||
mkdir -p "${XDG_DATA_HOME}/${path}" | ||
fi | ||
done | ||
|
||
# Default to pd as executable but switch to jpn/pal if the NTSC rom | ||
# is missing but JPN/PAL are present. | ||
executable="pd" | ||
if [ -f ${XDG_DATA_HOME}/roms/pd.ntsc-final.z64 ] | \ | ||
[ -f ${XDG_DATA_HOME}/roms/pd.ntsc-1.0.z64 ]; then | ||
executable="pd" | ||
elif [ -f ${XDG_DATA_HOME}/roms/pd.jpn-final.z64 ]; then | ||
executable="pd.jpn" | ||
elif [ -f ${XDG_DATA_HOME}/roms/pd.pal-final.z64 ]; then | ||
executable="pd.pal" | ||
fi | ||
|
||
# If first parameter passed to this script is one of the pd executables, | ||
# run that regardless of ROM auto-detection above and pass the remaining | ||
# parameters to it; otherwise pass all arguments to the executable selected | ||
# above | ||
case $1 in | ||
"pd."*) | ||
executable=$1 | ||
params="${@:2}" | ||
;; | ||
*) | ||
params="$@" | ||
;; | ||
esac | ||
|
||
# Run game | ||
$executable --basedir ${XDG_DATA_HOME}/roms --savedir ${XDG_DATA_HOME}/saves $params |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
app-id: io.github.fgsfdsfgs.perfect_dark | ||
runtime: org.freedesktop.Platform | ||
runtime-version: &runtime-version '23.08' | ||
sdk: org.freedesktop.Sdk | ||
command: io.github.fgsfdsfgs.perfect_dark.sh | ||
|
||
finish-args: | ||
# multiarch is required for 32bit binaries | ||
- --allow=multiarch | ||
# hardware 3D and controller access | ||
- --device=all | ||
# X11 + XShm access | ||
- --share=ipc | ||
- --socket=x11 | ||
# Audio | ||
- --socket=pulseaudio | ||
# Enable network for multiplayer | ||
- --share=network | ||
|
||
# Parameters for 32-bit extensions | ||
x-gl-version: &gl-version '1.4' | ||
x-gl-versions: &gl-versions 23.08;1.4 | ||
x-gl-merge-dirs: &gl-merge-dirs vulkan/icd.d;glvnd/egl_vendor.d;egl/egl_external_platform.d;OpenCL/vendors;lib/dri;lib/d3d;lib/gbm;vulkan/explicit_layer.d;vulkan/implicit_layer.d | ||
|
||
add-extensions: | ||
org.freedesktop.Platform.Compat.i386: | ||
directory: lib/i386-linux-gnu | ||
version: '23.08' | ||
|
||
org.freedesktop.Platform.GL32: | ||
directory: lib/i386-linux-gnu/GL | ||
version: *gl-version | ||
versions: *gl-versions | ||
subdirectories: true | ||
no-autodownload: true | ||
autodelete: false | ||
add-ld-path: lib | ||
merge-dirs: *gl-merge-dirs | ||
download-if: active-gl-driver | ||
enable-if: active-gl-driver | ||
autoprune-unless: active-gl-driver | ||
|
||
org.freedesktop.Platform.GL32.Debug: | ||
directory: lib/debug/lib/i386-linux-gnu/GL | ||
version: *gl-version | ||
versions: *gl-versions | ||
subdirectories: true | ||
no-autodownload: true | ||
merge-dirs: *gl-merge-dirs | ||
enable-if: active-gl-driver | ||
autoprune-unless: active-gl-driver | ||
|
||
org.freedesktop.Platform.VAAPI.Intel.i386: | ||
directory: lib/i386-linux-gnu/dri/intel-vaapi-driver | ||
version: *runtime-version | ||
versions: *runtime-version | ||
autodelete: false | ||
no-autodownload: true | ||
add-ld-path: lib | ||
download-if: have-intel-gpu | ||
autoprune-unless: have-intel-gpu | ||
|
||
modules: | ||
- name: perfect_dark | ||
buildsystem: simple | ||
sources: | ||
- type: file | ||
path: bin/pd | ||
- type: file | ||
path: bin/pd.jpn | ||
- type: file | ||
path: bin/pd.pal | ||
- type: file | ||
path: io.github.fgsfdsfgs.perfect_dark.sh | ||
- type: file | ||
path: io.github.fgsfdsfgs.perfect_dark.png | ||
- type: file | ||
path: io.github.fgsfdsfgs.perfect_dark.metainfo.xml | ||
- type: file | ||
path: io.github.fgsfdsfgs.perfect_dark.desktop | ||
build-commands: [] | ||
post-install: | ||
# create extension mountpoints | ||
- mkdir -p /app/lib/i386-linux-gnu | ||
- mkdir -p /app/lib/i386-linux-gnu/GL | ||
- mkdir -p /app/lib/debug/lib/i386-linux-gnu/GL | ||
- mkdir -p /app/lib/i386-linux-gnu/dri/intel-vaapi-driver | ||
# port | ||
- install -Dm 755 -t /app/bin/ pd* | ||
- install -Dm 755 ${FLATPAK_ID}.sh /app/bin/${FLATPAK_ID}.sh | ||
- install -Dm 644 ${FLATPAK_ID}.desktop /app/share/applications/${FLATPAK_ID}.desktop | ||
- install -Dm 644 ${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml | ||
- install -Dm 644 ${FLATPAK_ID}.png /app/share/icons/hicolor/256x256/apps/${FLATPAK_ID}.png |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
id ICON icon.ico |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.