1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-03-25 22:19:43 +00:00

Support installation, troubles with music btw

This commit is contained in:
Alexandre Moine
2015-08-09 22:36:13 +02:00
parent eb0a9a8fe2
commit 91eb928c29
7 changed files with 178 additions and 5919 deletions

View File

@@ -214,8 +214,14 @@ void loadfont(int siz) {
if(!font[siz]) {
font[siz] = TTF_OpenFont("DejaVuSans-Bold.ttf", siz);
if (font[siz] == NULL) {
printf("error: Font file not found\n");
exit(1);
// Destination set by ./configure
#ifdef FONTDESTDIR
font[siz] = TTF_OpenFont(FONTDESTDIR, siz);
#endif
if (font[siz] == NULL) {
printf("error: Font file not found\n");
exit(1);
}
}
}
}
@@ -3611,6 +3617,10 @@ void initgraph() {
loadMusicInfo(musicfile)
|| loadMusicInfo("./hyperrogue-music.txt")
|| loadMusicInfo("music/hyperrogue-music.txt")
// Destination set by ./configure
#ifdef MUSICDESTDIR
|| loadMusicInfo(MUSICDESTDIR)
#endif
#ifdef FHS
|| loadMusicInfo("/usr/share/hyperrogue/hyperrogue-music.txt")
|| loadMusicInfo(s0 + getenv("HOME") + "/.hyperrogue-music.txt")