mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 13:17:35 +00:00
Ports: Update dungeonrush's patches to use git patches
This commit is contained in:
parent
a4c404ea9c
commit
25dc066af6
5 changed files with 62 additions and 29 deletions
|
@ -0,0 +1,27 @@
|
||||||
|
From 9aeccfdc1257204b18e0c8efa1f18f9a24cdab75 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gunnar Beutner <gbeutner@serenityos.org>
|
||||||
|
Date: Wed, 16 Jun 2021 11:23:34 +0200
|
||||||
|
Subject: [PATCH 1/2] chdir() to the resource install path at program startup
|
||||||
|
|
||||||
|
The game tries to open its resource files using relative paths, and we
|
||||||
|
install them into /opt, so chdr() there.
|
||||||
|
---
|
||||||
|
src/main.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/main.c b/src/main.c
|
||||||
|
index 8fa842f..e16c35e 100644
|
||||||
|
--- a/src/main.c
|
||||||
|
+++ b/src/main.c
|
||||||
|
@@ -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()) {
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
From 2837d8fc8be4d4bd3d03866cfd139152506f4e31 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gunnar Beutner <gbeutner@serenityos.org>
|
||||||
|
Date: Wed, 16 Jun 2021 11:23:34 +0200
|
||||||
|
Subject: [PATCH 2/2] Make it use software rendering
|
||||||
|
|
||||||
|
---
|
||||||
|
src/res.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/res.c b/src/res.c
|
||||||
|
index ef4945a..6c46184 100644
|
||||||
|
--- a/src/res.c
|
||||||
|
+++ b/src/res.c
|
||||||
|
@@ -89,6 +89,8 @@ Mix_Music *bgms[AUDIO_BGM_SIZE];
|
||||||
|
int soundsCount;
|
||||||
|
Mix_Chunk *sounds[AUDIO_SOUND_SIZE];
|
||||||
|
|
||||||
|
+#define SOFTWARE_ACC
|
||||||
|
+
|
||||||
|
bool init() {
|
||||||
|
// Initialization flag
|
||||||
|
bool success = true;
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
# Patches for dungeonrush
|
# Patches for dungeonrush on SerenityOS
|
||||||
|
|
||||||
## `sw-renderer.patch`
|
## `0001-chdir-to-the-resource-install-path-at-program-startu.patch`
|
||||||
|
|
||||||
Disable SDL hardware acceleration.
|
chdir() to the resource install path at program startup
|
||||||
|
|
||||||
|
The game tries to open its resource files using relative paths, and we
|
||||||
|
install them into /opt, so chdr() there.
|
||||||
|
|
||||||
|
## `0002-Make-it-use-software-rendering.patch`
|
||||||
|
|
||||||
|
Make it use software rendering
|
||||||
|
|
||||||
## `cwd.patch`
|
|
||||||
|
|
||||||
`chdir()` to the installed directory as the game tries to load resources with relative paths.
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
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()) {
|
|
|
@ -1,12 +0,0 @@
|
||||||
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