]> git.pld-linux.org Git - packages/abrick.git/blob - abrick-paths.patch
- no need to R: group(games). It is defined in default groups file.
[packages/abrick.git] / abrick-paths.patch
1 --- abrick-1.12-src/hiscore.cpp~        2009-09-29 15:34:13.000000000 +0200
2 +++ abrick-1.12-src/hiscore.cpp 2009-09-29 15:37:02.000000000 +0200
3 @@ -29,7 +29,7 @@
4  HiScores::HiScores()
5  {
6         // on Linux use /usr/share/abandoned/hiscore.dat  ?
7 -       FILE *fp = fopen("hiscore.dat", "r");
8 +       FILE *fp = fopen("/var/games/abrick/hiscore.dat", "r");
9         if (!fp)
10         {
11                 std::string defaultNames[] = {          // create default hiscore
12 @@ -86,7 +86,7 @@
13  {
14         // save to file
15         // format: NAME#POINTS#SWAPS#
16 -       FILE *fp = fopen("hiscore.dat", "w+");
17 +       FILE *fp = fopen("/var/games/abrick/hiscore.dat", "w+");
18         if (fp)
19         {
20                 for (iterator it = begin(); it != end(); ++it)
21 diff -u abrick-1.12-src.orig/allmenus.cpp abrick-1.12-src/allmenus.cpp
22 --- abrick-1.12-src.orig/allmenus.cpp   2004-12-12 17:39:52.000000000 +0100
23 +++ abrick-1.12-src/allmenus.cpp        2009-09-29 16:09:42.000000000 +0200
24 @@ -11,9 +11,9 @@
25  //-----------------------------------------------------------------------------
26  MainMenu::MainMenu(NjamFont *font_ptr, int x, int y):
27         Menu(font_ptr, x, y),
28 -       whiteFontM("data/font-white.bmp", 8, 14),
29 -       musicM("data/menu.xm"),
30 -       gameMusicM("data/main.xm")
31 +       whiteFontM("/usr/share/abrick/font-white.bmp", 8, 14),
32 +       musicM("/usr/share/abrick/menu.xm"),
33 +       gameMusicM("/usr/share/abrick/main.xm")
34  {
35         options.push_back("SINGLE PLAYER GAME");
36         options.push_back("DUEL GAME");
37 Wspólne podkatalogi: abrick-1.12-src.orig/data i abrick-1.12-src/data
38 diff -u abrick-1.12-src.orig/game.cpp abrick-1.12-src/game.cpp
39 --- abrick-1.12-src.orig/game.cpp       2004-12-12 17:39:52.000000000 +0100
40 +++ abrick-1.12-src/game.cpp    2009-09-29 16:09:42.000000000 +0200
41 @@ -8,13 +8,13 @@
42  extern SDL_Surface *Screen;            // global object
43  //-----------------------------------------------------------------------------
44  Game::Game(int players):
45 -       fontM("data/font-white.bmp", 8, 14),
46 -       sfxDropM("data/drop.wav"),
47 -       sfxLineM("data/line.wav")
48 +       fontM("/usr/share/abrick/font-white.bmp", 8, 14),
49 +       sfxDropM("/usr/share/abrick/drop.wav"),
50 +       sfxLineM("/usr/share/abrick/line.wav")
51  {
52         playerCountM = players;
53         wallpaperM = 0;
54 -       if (!LoadImage(&wallpaperM, "data/back.bmp"))
55 +       if (!LoadImage(&wallpaperM, "/usr/share/abrick/back.bmp"))
56                 throw Exiter("Cannot load wallpaper image.");
57  
58         SetupGame();
59 Wspólne podkatalogi: abrick-1.12-src.orig/html i abrick-1.12-src/html
60 diff -u abrick-1.12-src.orig/main.cpp abrick-1.12-src/main.cpp
61 --- abrick-1.12-src.orig/main.cpp       2009-09-29 16:01:02.000000000 +0200
62 +++ abrick-1.12-src/main.cpp    2009-09-29 16:09:42.000000000 +0200
63 @@ -61,7 +61,7 @@
64                 SDL_WM_SetCaption("Abandoned bricks " AB_VERSION "     http://abrick.sourceforge.net", NULL);
65  
66                 printf("done.\nLoading icon...");
67 -               icon = SDL_LoadBMP("data/abicon.bmp");
68 +               icon = SDL_LoadBMP("/usr/share/abrick/abicon.bmp");
69                 if (!icon)
70                         throw Exiter(SDL_GetError());
71                 printf("OK.\n");
72 @@ -102,13 +102,13 @@
73  
74                 // render some background picture for menu
75                 SDL_Surface *pattern;
76 -               if (!LoadImage(&pattern, "data/back.bmp"))
77 +               if (!LoadImage(&pattern, "/usr/share/abrick/back.bmp"))
78                         throw Exiter("Cannot load wallpaper image.");
79                 PatternFill(pattern, Screen);
80                 SDL_Flip(Screen);
81                 SDL_FreeSurface(pattern);
82  
83 -               NjamFont font("data/font-yellow.bmp", 11, 22);
84 +               NjamFont font("/usr/share/abrick/font-yellow.bmp", 11, 22);
85                 MainMenu m(&font, 40, 150);
86                 m.start();
87         }
88 --- abrick-1.12-src.orig/config.cpp     2004-12-12 17:39:52.000000000 +0100
89 +++ abrick-1.12-src/config.cpp  2009-09-29 16:39:31.000000000 +0200
90 @@ -1,4 +1,5 @@
91  //------------------------------------------------------------------------------
92 +#include <cstdlib>
93  #include <string>
94  #include <fstream>
95  #include <sstream>
96 @@ -122,7 +123,7 @@
97  //-----------------------------------------------------------------------------
98  bool Config::save()
99  {
100 -       std::ofstream file("ab.conf");
101 +       std::ofstream file((string(getenv("HOME")) + "/.abrick.conf").c_str());
102         if (!file)
103                 return false;
104  
105 @@ -138,7 +139,7 @@
106  // this gets called from main() so we're sure config.ini is in the right place
107  bool Config::load()
108  {
109 -       std::ifstream file("ab.conf");
110 +       std::ifstream file((string(getenv("HOME")) + "/.abrick.conf").c_str());
111         if (!file)
112                 return false;
113  
This page took 0.087376 seconds and 3 git commands to generate.