first attempt to build on the octane, nosound for now
[summerhack] / src / sumhack.cpp
index 9491e64..5702001 100644 (file)
@@ -7,7 +7,9 @@
 #include "common/err_msg.h"
 #include "parts/parts.hpp"
 #include "events.hpp"
+#ifndef NO_MUSIC
 #include "sdlvf/sdlvf.h"
+#endif
 
 using namespace std;
 
@@ -140,9 +142,11 @@ bool init() {
                dsys::render_demo(render_fps, render_path);
        }
 
+#ifndef NO_MUSIC
        if(music) {
                sdlvf_init("data/music/red_herring.ogg");
        }
+#endif
        
        timer_reset(&timer);
        timer_start(&timer);
@@ -153,9 +157,11 @@ bool init() {
 void clean_up() {
        unsigned long time = timer_getmsec(&timer);
 
+#ifndef NO_MUSIC
        if(music) {
                sdlvf_done();
        }
+#endif
 
        fxwt::show_cursor(true);
 
@@ -181,6 +187,7 @@ void clean_up() {
 void update_gfx() {
        unsigned long frame_start = timer_getmsec(&timer);
        
+#ifndef NO_MUSIC
        if(music) {
                int sdlvf_err;
                if((sdlvf_err = sdlvf_check()) != SDLVF_PLAYING) {
@@ -188,6 +195,7 @@ void update_gfx() {
                        exit(0);
                }
        }
+#endif
        
        if(dsys::update_graphics() == -1) {
                exit(0);