From: Christian Spilker Date: Wed, 23 Oct 2013 20:46:03 +0000 (+0200) Subject: Merge branch 'master' of gitlab:wintermute/hackover2013-badge-firmware X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/commitdiff_plain/5337261a68ea89b88624ca6fd7319cadd662e057?hp=5c42c95f4d84a47a1e9d24cd61413d10a50f2007 Merge branch 'master' of gitlab:wintermute/hackover2013-badge-firmware --- diff --git a/badge/jumpnrun/levels/levels.txt b/badge/jumpnrun/levels/levels.txt deleted file mode 100644 index e1558ca..0000000 --- a/badge/jumpnrun/levels/levels.txt +++ /dev/null @@ -1,17 +0,0 @@ -loclhost -router -23xentry -23xhq -smb -skynet -wrongtrn -lubiXOXO -lubilove -gnobbel -sleazy -slsky -slsnake -sltwice -slentry -sljowy -slpipe diff --git a/mock/Makefile b/mock/Makefile index 638e8e8..a62a8e3 100644 --- a/mock/Makefile +++ b/mock/Makefile @@ -7,6 +7,7 @@ LDLIBS = $$(pkg-config --libs gtkmm-3.0) BADGE = badge CONVERTER = level-converter +LEVELLIST = levels.txt GLADEFILES = lcd-display.glade @@ -86,5 +87,7 @@ $(CONVERTER): $(CONVERTER_OBJS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LDLIBS) play: all + echo > $(LEVELLIST) + ls ../badge/jumpnrun/levels/*.lv | xargs -n1 basename | cut -d . -f 1 > $(LEVELLIST) ./$(CONVERTER) ./$(BADGE) diff --git a/mock/badge_main_loop.c b/mock/badge_main_loop.c index 70da0ff..f2a366e 100644 --- a/mock/badge_main_loop.c +++ b/mock/badge_main_loop.c @@ -17,7 +17,7 @@ void badge_main_loop(void) { char menu_buf[MAX_LEVELS][32]; - FILE *fd = fopen(PATH_PREFIX "levels.txt", "r"); + FILE *fd = fopen("levels.txt", "r"); int i; diff --git a/mock/tools/level-converter.cc b/mock/tools/level-converter.cc index b900cdb..eb8b1c6 100644 --- a/mock/tools/level-converter.cc +++ b/mock/tools/level-converter.cc @@ -70,10 +70,10 @@ namespace jnrcpp { struct level_name_map { level_name_map() { - std::ifstream in(PATH_PREFIX "levels.txt"); + std::ifstream in("levels.txt"); if(!in) { - throw std::logic_error(PATH_PREFIX "levels.txt konnte nicht geöffnet werden."); + throw std::logic_error("levels.txt konnte nicht geöffnet werden."); } std::string name;