mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 18:27:36 +00:00
Ports: Add port for DungeonRush
This commit is contained in:
parent
8393e737b7
commit
8ba0533138
5 changed files with 51 additions and 1 deletions
21
Ports/dungeonrush/package.sh
Executable file
21
Ports/dungeonrush/package.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=DungeonRush
|
||||
version=1.1-beta
|
||||
useconfigure=true
|
||||
files="https://github.com/Rapiz1/DungeonRush/archive/refs/tags/v${version}.tar.gz v${version}.tar.gz 295b83cb023bf5d21318992daee125399892bdf16a87c835dfc90b841c929eda"
|
||||
auth_type=sha256
|
||||
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_SOURCE_DIR/Toolchain/CMake/CMakeToolchain.txt"
|
||||
depends="SDL2 SDL2_image SDL2_mixer SDL2_ttf SDL2_net"
|
||||
launcher_name="DungeonRush"
|
||||
launcher_category=Games
|
||||
launcher_command=/opt/DungeonRush/dungeon_rush
|
||||
icon_file=dungeonrush.png
|
||||
|
||||
configure() {
|
||||
run cmake $configopts
|
||||
}
|
||||
|
||||
install() {
|
||||
run mkdir -p "${SERENITY_INSTALL_ROOT}/opt/DungeonRush"
|
||||
run cp -r bin/dungeon_rush res "${SERENITY_INSTALL_ROOT}/opt/DungeonRush"
|
||||
}
|
12
Ports/dungeonrush/patches/cwd.patch
Normal file
12
Ports/dungeonrush/patches/cwd.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -Naur DungeonRush-1.1-beta/src/main.c DungeonRush-1.1-beta.serenity/src/main.c
|
||||
--- DungeonRush-1.1-beta/src/main.c 2020-11-21 14:22:39.000000000 +0100
|
||||
+++ DungeonRush-1.1-beta.serenity/src/main.c 2021-06-16 11:02:22.409585466 +0200
|
||||
@@ -12,6 +12,8 @@
|
||||
#endif
|
||||
|
||||
int main(int argc, char** args) {
|
||||
+ // The game tries to open its resource files using relative paths
|
||||
+ chdir("/opt/DungeonRush");
|
||||
prngSrand(time(NULL));
|
||||
// Start up SDL and create window
|
||||
if (!init()) {
|
12
Ports/dungeonrush/patches/sw-renderer.patch
Normal file
12
Ports/dungeonrush/patches/sw-renderer.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -Naur DungeonRush-1.1-beta/src/res.c DungeonRush-1.1-beta.serenity/src/res.c
|
||||
--- DungeonRush-1.1-beta/src/res.c 2020-11-21 14:22:39.000000000 +0100
|
||||
+++ DungeonRush-1.1-beta.serenity/src/res.c 2021-06-16 11:00:12.654195338 +0200
|
||||
@@ -89,6 +89,8 @@
|
||||
int soundsCount;
|
||||
Mix_Chunk *sounds[AUDIO_SOUND_SIZE];
|
||||
|
||||
+#define SOFTWARE_ACC
|
||||
+
|
||||
bool init() {
|
||||
// Initialization flag
|
||||
bool success = true;
|
Loading…
Add table
Add a link
Reference in a new issue