1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 13:07:16 +00:00
This commit is contained in:
Zeno Rogue 2017-08-18 03:01:14 +02:00
commit e1b9c41c1e
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ hyperrogue_SOURCES = hyper.cpp savepng.c
# Some definitions used in graph.cpp
hyperrogue_CPPFLAGS = -DFONTDESTDIR=\"$(pkgdatadir)/DejaVuSans-Bold.ttf\" -DMUSICDESTDIR=\"$(pkgdatadir)/hyperrogue-music.txt\" -DSOUNDDESTDIR=\"$(pkgdatadir)/sounds/\"
hyperrogue_CPPFLAGS += -std=c++11
# Musicdir
musicdir=$(datadir)/hyperrogue/music

View File

@ -121,7 +121,7 @@ bool loadMusicInfo(string dir) {
for(int i=0; i<size(dir); i++) if(dir[i] == '/' || dir[i] == '\\')
dir2 = dir.substr(0, i+1);
char buf[1000];
while(fgets(buf, 800, f) > 0) {
while(fgets(buf, 800, f) != NULL) {
for(int i=0; buf[i]; i++) if(buf[i] == 10 || buf[i] == 13) buf[i] = 0;
if(buf[0] == '[' && buf[3] == ']') {
int id = (buf[1] - '0') * 10 + buf[2] - '0';