projects
/
summerhack
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
first attempt to build on the octane, nosound for now
[summerhack]
/
src
/
sumhack.cpp
diff --git
a/src/sumhack.cpp
b/src/sumhack.cpp
index
9e2a224
..
5702001
100644
(file)
--- a/
src/sumhack.cpp
+++ b/
src/sumhack.cpp
@@
-7,7
+7,9
@@
#include "common/err_msg.h"
#include "parts/parts.hpp"
#include "events.hpp"
#include "common/err_msg.h"
#include "parts/parts.hpp"
#include "events.hpp"
+#ifndef NO_MUSIC
#include "sdlvf/sdlvf.h"
#include "sdlvf/sdlvf.h"
+#endif
using namespace std;
using namespace std;
@@
-88,7
+90,7
@@
bool init() {
}
if(gip->fullscreen) {
}
if(gip->fullscreen) {
- SDL_ShowCursor(0);
+ fxwt::show_cursor(false);
}
fxwt::set_window_title("The Lab Demos :: Summer Hack (rebuild)");
}
fxwt::set_window_title("The Lab Demos :: Summer Hack (rebuild)");
@@
-102,6
+104,7
@@
bool init() {
//dsys::init();
// show loading screen
//dsys::init();
// show loading screen
+ glClear(GL_COLOR_BUFFER_BIT);
dsys::overlay(get_texture("data/img/loading.jpg"), Vector2(0, 0), Vector2(1, 1), 1.0);
flip();
dsys::overlay(get_texture("data/img/loading.jpg"), Vector2(0, 0), Vector2(1, 1), 1.0);
flip();
@@
-139,24
+142,28
@@
bool init() {
dsys::render_demo(render_fps, render_path);
}
dsys::render_demo(render_fps, render_path);
}
+#ifndef NO_MUSIC
if(music) {
sdlvf_init("data/music/red_herring.ogg");
}
if(music) {
sdlvf_init("data/music/red_herring.ogg");
}
+#endif
timer_reset(&timer);
timer_start(&timer);
timer_reset(&timer);
timer_start(&timer);
-
+
return true;
}
void clean_up() {
unsigned long time = timer_getmsec(&timer);
return true;
}
void clean_up() {
unsigned long time = timer_getmsec(&timer);
-
+
+#ifndef NO_MUSIC
if(music) {
sdlvf_done();
}
if(music) {
sdlvf_done();
}
+#endif
- SDL_ShowCursor(1);
+ fxwt::show_cursor(true);
for(size_t i=0; i<parts.size(); i++) {
delete parts[i];
for(size_t i=0; i<parts.size(); i++) {
delete parts[i];
@@
-180,6
+187,7
@@
void clean_up() {
void update_gfx() {
unsigned long frame_start = timer_getmsec(&timer);
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) {
if(music) {
int sdlvf_err;
if((sdlvf_err = sdlvf_check()) != SDLVF_PLAYING) {
@@
-187,6
+195,7
@@
void update_gfx() {
exit(0);
}
}
exit(0);
}
}
+#endif
if(dsys::update_graphics() == -1) {
exit(0);
if(dsys::update_graphics() == -1) {
exit(0);