Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 29128 Details for
Bug 47591
[New game ebuild] abe-1.0
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
1.0-gentoo-paths.patch
1.0-gentoo-paths.patch (text/plain), 3.42 KB, created by
Alexandru Toma
on 2004-04-12 03:49:04 UTC
(
hide
)
Description:
1.0-gentoo-paths.patch
Filename:
MIME Type:
Creator:
Alexandru Toma
Created:
2004-04-12 03:49:04 UTC
Size:
3.42 KB
patch
obsolete
>Only in ./: 1.0-gentoo-paths.patch >diff -ud ../../abe-1.0/src/Game.c ./Game.c >--- ../../abe-1.0/src/Game.c 2003-04-12 22:42:03.000000000 +0300 >+++ ./Game.c 2004-04-12 13:07:59.000000000 +0300 >@@ -6,14 +6,14 @@ > void deleteSavedGame() { > char path[300]; > // version 2 >- sprintf(path, "%s%ssave%d.dat", SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION); >+ sprintf(path, "%s%s%s%ssave%d.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION); > remove(path); >- sprintf(path, "%s%ssavedmap%d.dat", SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION); >+ sprintf(path, "%s%s%s%ssavedmap%d.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION); > remove(path); > // version 1 >- sprintf(path, "%s%ssave.dat", SAVEGAME_DIR, PATH_SEP); >+ sprintf(path, "%s%s%s%ssave.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP); > remove(path); >- sprintf(path, "%s%ssavedmap.dat", SAVEGAME_DIR, PATH_SEP); >+ sprintf(path, "%s%s%s%ssavedmap.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP); > remove(path); > } > >@@ -23,7 +23,7 @@ > char *err; > SDL_RWops *rwop; > >- sprintf(path, "%s%ssave%d.dat", SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION); >+ sprintf(path, "%s%s%s%ssave%d.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION); > > if(!(fp = fopen(path, "wb"))) { > err = strerror(errno); >@@ -51,7 +51,7 @@ > SDL_RWclose(rwop); > > // save the map in savegame/savedmap.dat >- sprintf(path, "%s%ssavedmap%d.dat", SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION); >+ sprintf(path, "%s%s%s%ssavedmap%d.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION); > saveMapPath(path); > } > >@@ -66,7 +66,7 @@ > version = (int)GAME_VERSION; > > // load the map from savegame/savedmap.dat >- sprintf(path, "%s%ssavedmap%d.dat", SAVEGAME_DIR, PATH_SEP, version); >+ sprintf(path, "%s%s%s%ssavedmap%d.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP, version); > if(!loadMapPath(path, 0)) { > // if can't find saved map load static map > fprintf(stderr, "Can't find current saved map. Will try to use static map.\n"); >@@ -82,9 +82,9 @@ > // try to find a saved game of any version > while(version > 0) { > if(version > 1) { >- sprintf(path, "%s%ssave%d.dat", SAVEGAME_DIR, PATH_SEP, version); >+ sprintf(path, "%s%s%s%ssave%d.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP, version); > } else { >- sprintf(path, "%s%ssave.dat", SAVEGAME_DIR, PATH_SEP); >+ sprintf(path, "%s%s%s%ssave.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP); > } > fprintf(stderr, "Trying to load saved game: %s\n", path); > fflush(stderr); >diff -ud ../../abe-1.0/src/Game.h ./Game.h >--- ../../abe-1.0/src/Game.h 2003-04-12 23:55:37.000000000 +0300 >+++ ./Game.h 2004-04-12 13:08:03.000000000 +0300 >@@ -19,7 +19,7 @@ > > #define SPRING_JUMP 30 > >-#define SAVEGAME_DIR "savegame" >+#define SAVEGAME_DIR ".abe" > > #define MAX_HEALTH 100 > >diff -ud ../../abe-1.0/src/Image.c ./Image.c >--- ../../abe-1.0/src/Image.c 2003-04-12 21:16:13.000000000 +0300 >+++ ./Image.c 2004-04-12 13:31:33.000000000 +0300 >@@ -305,7 +305,9 @@ > int block = 0; > > image_count = 0; >- sprintf(tmp_path, "%s%s%s", IMAGES_DIR, PATH_SEP, "tmp.bmp"); >+ sprintf(tmp_path, "%s%s%s", getenv("HOME"), PATH_SEP, ".abe"); >+ mkdir(tmp_path, 0755); >+ sprintf(tmp_path, "%s%s%s%s%s", getenv("HOME"), PATH_SEP, ".abe", PATH_SEP, "tmp.bmp"); > > sprintf(path, "%s%s%s", IMAGES_DIR, PATH_SEP, "images.tar"); > fprintf(stderr, "Opening %s for reading.\n", path);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 47591
:
29127
| 29128 |
29129