summarylogtreecommitdiffstats
path: root/umoria-5.7.15-aur.patch
blob: af516b0f186f54c5764773653964e45ff93c5826 (plain)
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
--- umoria/src/config.cpp	2021-06-02 07:04:31.000000000 -0700
+++ umoria/src/config.cpp	2026-06-22 11:45:46.386710007 -0700
@@ -10,18 +10,18 @@
     // Data files used by Umoria
     // NOTE: use relative paths to the executable binary.
     namespace files {
-        const std::string splash_screen = "data/splash.txt";
-        const std::string welcome_screen = "data/welcome.txt";
-        const std::string license = "LICENSE";
-        const std::string versions_history = "data/versions.txt";
-        const std::string help = "data/help.txt";
-        const std::string help_wizard = "data/help_wizard.txt";
-        const std::string help_roguelike = "data/rl_help.txt";
-        const std::string help_roguelike_wizard = "data/rl_help_wizard.txt";
-        const std::string death_tomb = "data/death_tomb.txt";
-        const std::string death_royal = "data/death_royal.txt";
-        const std::string scores = "scores.dat";
-        std::string save_game = "game.sav";
+        const std::string splash_screen = "/usr/share/umoria/data/splash.txt";
+        const std::string welcome_screen = "/usr/share/umoria/data/welcome.txt";
+        const std::string license = "/usr/share/licenses/umoria/LICENSE";
+        const std::string versions_history = "/usr/share/umoria/data/versions.txt";
+        const std::string help = "/usr/share/umoria/data/help.txt";
+        const std::string help_wizard = "/usr/share/umoria/data/help_wizard.txt";
+        const std::string help_roguelike = "/usr/share/umoria/data/rl_help.txt";
+        const std::string help_roguelike_wizard = "/usr/share/umoria/data/rl_help_wizard.txt";
+        const std::string death_tomb = "/usr/share/umoria/data/death_tomb.txt";
+        const std::string death_royal = "/usr/share/umoria/data/death_royal.txt";
+        const std::string scores = "/usr/share/umoria/data/scores.dat";
+        std::string save_game = "moria-save";
     } // namespace files
 
     // Game options as set on startup and with `=` set options command -CJS-
--- umoria/src/game.h	2021-06-02 07:04:31.000000000 -0700
+++ umoria/src/game.h	2026-06-22 11:39:46.934767224 -0700
@@ -32,7 +32,7 @@
     Wrong,
 };
 
-typedef struct {
+typedef struct Game_t {
     uint32_t magic_seed = 0; // Seed for initializing magic items (Potions, Wands, Staves, Scrolls, etc.)
     uint32_t town_seed = 0;  // Seed for town generation

--- umoria/src/game_save.cpp	2021-06-02 07:04:31.000000000 -0700
+++ umoria/src/game_save.cpp	2026-06-22 11:42:42.149452076 -0700
@@ -807,7 +807,7 @@
             count = rdByte();
             char_tmp = rdByte();
             for (int i = count; i > 0; i--) {
-                if (tile >= &dg.floor[MAX_HEIGHT][0]) {
+                if (tile > &dg.floor[MAX_HEIGHT - 1][MAX_WIDTH - 1]) {
                     goto error;
                 }
                 tile->feature_id = (uint8_t)(char_tmp & 0xF);

--- umoria/src/player.h	2021-06-02 07:04:31.000000000 -0700
+++ umoria/src/player.h	2026-06-22 11:40:09.126458371 -0700
@@ -45,7 +45,7 @@
 typedef const char *ClassRankTitle_t;

 // Player_t contains everything to be known about our player character
-typedef struct {
+typedef struct Player_t {
     struct {
         char name[PLAYER_NAME_SIZE];    // Name of character
         bool gender;                    // Gender of character (Female = 0, Male = 1)