Package: gearhead2 / 0.701-1

unixpaths Patch series | download
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
95
96
Index: gearhead2-0.701/arenascript.pp
===================================================================
--- gearhead2-0.701.orig/arenascript.pp	2017-12-03 18:44:27.497451223 +0200
+++ gearhead2-0.701/arenascript.pp	2017-12-03 18:47:18.775764750 +0200
@@ -36,7 +36,7 @@
 
 interface
 
-uses gears,locale,
+uses dos,gears,locale,
 {$IFDEF ASCII}
 	vidmenus,vidgfx;
 {$ELSE}
@@ -2391,7 +2391,7 @@
 		PC := PC^.Next;
 	end;
 
-	SaveStringList( Config_Directory + FName + '.txt' , VList );
+	SaveStringList( GetEnv( 'HOME' ) + '/.gearhead2/' + FName + '.txt' , VList );
     {$IFDEF ASCII}
 	MoreText( VList , 1 );
     {$ELSE}
Index: gearhead2-0.701/gears.pp
===================================================================
--- gearhead2-0.701.orig/gears.pp	2017-12-03 18:44:27.497451223 +0200
+++ gearhead2-0.701/gears.pp	2017-12-03 18:44:27.493451355 +0200
@@ -241,7 +241,7 @@
 	Default_File_Ending = '.txt';
 	Default_Search_Pattern = '*.txt';
 
-	Design_DirName = 'design';
+	Design_DirName = '/usr/share/games/gearhead2/design';
 	Design_Directory = Design_DirName + OS_Dir_Separator;
 	PC_Equipment_Pattern = 'PC_*.txt';
 	Series_DirName = 'series';
@@ -254,7 +254,7 @@
 
 	Monsters_File_Pattern = 'WMON_*.txt';
 
-	Data_DirName = 'gamedata';
+	Data_DirName = '/usr/share/games/gearhead2/gamedata';
 	Data_Directory = Data_DirName + OS_Dir_Separator;
 	MetaTerrain_File_Base = Data_Directory + 'meta';
 	Trait_Chatter_Base = Data_Directory + 'TC_';
@@ -274,13 +274,13 @@
 	RandMaps_Param_File = Data_Directory + 'randmaps.txt';
 	NPC_Chatter_File = Data_Directory + 'taunts.txt';
 
-	Doc_DirName = 'doc';
+	Doc_DirName = '/usr/share/games/gearhead2/doc';
 	Doc_Directory = Doc_DirName + OS_Dir_Separator;
 	Mecha_Help_File = Doc_Directory + 'man_umek.txt';
 	FieldHQ_Help_File = Doc_Directory + 'man_mecha.txt';
 	Chara_Help_File = Doc_Directory + 'man_chara.txt';
 
-	Graphics_DirName = 'image';
+	Graphics_DirName = '/usr/share/games/gearhead2/image';
 	Graphics_Directory = Graphics_Dirname + OS_Dir_Separator;
 
 
@@ -1517,18 +1517,19 @@
 
 initialization
 	{ Make sure we have the required data directories. }
+    ChDir( '/usr/share/games/gearhead2' );
     if paramcount() > 0 then begin
         Config_Directory := IncludeTrailingPathDelimiter( paramstr(1) );
     end else begin
     {$IFDEF WINDOWS}
         Config_Directory := GetUserDir() + OS_Dir_Separator + 'gearhead2' + OS_Dir_Separator;
     {$ELSE}
-        Config_Directory := GetAppConfigDir(False);
+        Config_Directory := GetEnv( 'HOME' ) + '/.gearhead2/';
     {$ENDIF}
     end;
-	Config_File := Config_Directory + 'gearhead2.cfg';
+	Config_File := Config_Directory + 'gearhead2.conf';
 
-	Save_Game_DirName := 'savegame';
+	Save_Game_DirName := 'savegame2';
 	Save_Game_Directory := Config_Directory + Save_Game_Dirname + OS_Dir_Separator;
 
 	Save_Character_Base := Save_Game_Directory + 'CHA';
Index: gearhead2-0.701/ui4gh.pp
===================================================================
--- gearhead2-0.701.orig/ui4gh.pp	2017-12-03 18:44:27.497451223 +0200
+++ gearhead2-0.701/ui4gh.pp	2017-12-03 18:44:27.493451355 +0200
@@ -440,7 +440,7 @@
 	T: Integer;
 begin
 	{See whether or not there's a configuration file.}
-	S := FSearch(Config_File,'.');
+	S := FSearch(Config_File, GetEnv('HOME')+'/.gearhead2/;/etc');
 	if S <> '' then begin
 		{ If we've found a configuration file, }
 		{ open it up and start reading. }