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
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");
11 std::string defaultNames[] = { // create default hiscore
15 // format: NAME#POINTS#SWAPS#
16 - FILE *fp = fopen("hiscore.dat", "w+");
17 + FILE *fp = fopen("/var/games/abrick/hiscore.dat", "w+");
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
25 //-----------------------------------------------------------------------------
26 MainMenu::MainMenu(NjamFont *font_ptr, int x, int 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")
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
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")
52 playerCountM = players;
54 - if (!LoadImage(&wallpaperM, "data/back.bmp"))
55 + if (!LoadImage(&wallpaperM, "/usr/share/abrick/back.bmp"))
56 throw Exiter("Cannot load wallpaper image.");
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
64 SDL_WM_SetCaption("Abandoned bricks " AB_VERSION " http://abrick.sourceforge.net", NULL);
66 printf("done.\nLoading icon...");
67 - icon = SDL_LoadBMP("data/abicon.bmp");
68 + icon = SDL_LoadBMP("/usr/share/abrick/abicon.bmp");
70 throw Exiter(SDL_GetError());
74 // render some background picture for menu
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);
81 SDL_FreeSurface(pattern);
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);
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
91 //------------------------------------------------------------------------------
97 //-----------------------------------------------------------------------------
100 - std::ofstream file("ab.conf");
101 + std::ofstream file((string(getenv("HOME")) + "/.abrick.conf").c_str());
106 // this gets called from main() so we're sure config.ini is in the right place
109 - std::ifstream file("ab.conf");
110 + std::ifstream file((string(getenv("HOME")) + "/.abrick.conf").c_str());