bin = sumhack-thelab
include src/parts/Makefile-part
-include src/sdlvf/Makefile-part
+#include src/sdlvf/Makefile-part
obj = $(src:.cpp=.o) $(csrc:.c=.o)
-opt = -O1
-opt = -g
+opt = -O3
+dbg = -g
+def = -DNO_MUSIC
incdir = -Isrc/3dengfx/src -Ilibs -Ilibs/png -Ilibs/jpeglib -Ilibs/ogg -Ilibs/vorbis
-CXXFLAGS = -ansi -pedantic -Wall $(opt) $(incdir) -MMD `sdl-config --cflags`
-CFLAGS = -std=c89 -pedantic -Wall $(opt) $(incdir) -MMD `sdl-config --cflags`
-libs = $(libdir) $(libsys) src/3dengfx/lib3dengfx.a `sdl-config --libs` $(libgl) \
+CXXFLAGS = -ansi -pedantic -Wall $(opt) $(dbg) $(incdir) -MMD $(def)
+CFLAGS = -std=c89 -pedantic -Wall $(opt) $(dbg) $(incdir) -MMD $(def)
+libs = $(libdir) $(libsys) src/3dengfx/lib3dengfx.a $(libgl) \
-lvorbis -logg -ljpeg -lpng -lz -l3ds $(libc)
sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/')
obj = $(src:.cpp=.w32.o) $(csrc:.c=.w32.o)
bin = sumhack-thelab.exe
libdir = -Llibs/w32
- libgl = -lopengl32
+ libgl = -lopengl32 -lglut32
libsys = -lmingw32 -lgdi32 -mconsole
libc = -lm
else
libdir = -Llibs
- libgl = -lGL
+ libgl = -lGL -lglut
libc = -lm
endif
/* these are filled in by configure */
#define INCLUDE_INTTYPES_H 1
-#define INCLUDE_STDINT_H 1
+/*#define INCLUDE_STDINT_H 1*/
#define INCLUDE_SYS_TYPES_H 1
#if INCLUDE_INTTYPES_H
PREFIX = /usr/local
dbg = -g
-opt = -O1 -ffast-math -fomit-frame-pointer
+opt = -O3 -ffast-math
inc_flags = -Isrc -I../../libs -I../../libs/zlib -I../../libs/libpng -I../../libs/jpeglib
warn_flags = -Wall -Wno-sign-compare -Wno-strict-aliasing -Wno-char-subscripts
#include "common/err_msg.h"
#include "dsys/fx.hpp"
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
using std::string;
Scene::Scene() {
#define NATIVE_X11 10
#define NATIVE_WIN32 11
-#define GFX_LIBRARY SDL
+#define GFX_LIBRARY GLUT
#define SINGLE_PRECISION_MATH
#define HAVE_STDINT_H
#endif /* explicitly set stdint.h availability for some platform */
-#if (__STDC_VERSION__ >= 199900) || defined(__GLIBC__) || defined(HAVE_STDINT_H)
+#if (__STDC_VERSION__ >= 199900) || defined(__GLIBC__) || defined(HAVE_STDINT_H) && !defined(__sgi__)
#include <stdint.h>
#elif defined(unix) || defined(__unix__)
#include <sys/types.h>
#include "common/err_msg.h"
#include "parts/parts.hpp"
#include "events.hpp"
+#ifndef NO_MUSIC
#include "sdlvf/sdlvf.h"
+#endif
using namespace std;
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);
void clean_up() {
unsigned long time = timer_getmsec(&timer);
+#ifndef NO_MUSIC
if(music) {
sdlvf_done();
}
+#endif
fxwt::show_cursor(true);
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) {
exit(0);
}
}
+#endif
if(dsys::update_graphics() == -1) {
exit(0);