# HG changeset patch # User John Tsiombikas # Date 1337652120 -10800 # Node ID 55a43e27339a8a9b2f780965fe04bd5f0c3793f2 # Parent 86b53f76899f9a991a2a7bfa97ac426ee7bb28f0 foo diff -r 86b53f76899f -r 55a43e27339a Makefile --- a/Makefile Mon May 21 19:07:40 2012 +0300 +++ b/Makefile Tue May 22 05:02:00 2012 +0300 @@ -14,13 +14,17 @@ LDFLAGS = $(libdir) $(slibs) $(libgl) -limtk ifeq ($(shell uname -s), Darwin) + CC = clang + CXX = clang++ + incdir += -I/opt/local/include + libdir += -L/opt/local/lib libgl = -framework OpenGL -framework GLUT -lGLEW else libgl = -lGL -lGLU -lglut -lGLEW endif $(bin): $(obj) $(slibs) - $(CC) -o $@ $(obj) $(LDFLAGS) + $(CXX) -o $@ $(obj) $(LDFLAGS) -include $(dep) diff -r 86b53f76899f -r 55a43e27339a level/Makefile --- a/level/Makefile Mon May 21 19:07:40 2012 +0300 +++ b/level/Makefile Tue May 22 05:02:00 2012 +0300 @@ -5,6 +5,11 @@ CXXFLAGS = -std=c++0x -pedantic -Wall -g +ifeq ($(shell uname -s), Darwin) + CC = clang + CXX = clang++ +endif + $(lib_a): $(obj) $(AR) rcs $@ $(obj) diff -r 86b53f76899f -r 55a43e27339a level/src/level.cc --- a/level/src/level.cc Mon May 21 19:07:40 2012 +0300 +++ b/level/src/level.cc Tue May 22 05:02:00 2012 +0300 @@ -12,13 +12,14 @@ bool Level::load(const char *fname) { - if(!xml.loadFile(fname)) { + if(!xml.LoadFile(fname)) { fprintf(stderr, "failed to load level: %s\n", fname); return false; } - if(strcmp(xml.RootElement().Name(), "level") != 0) { + if(strcmp(xml.RootElement()->Name(), "level") != 0) { fprintf(stderr, "invalid level file: %s\n", fname); return false; } + return true; } diff -r 86b53f76899f -r 55a43e27339a src/main.cc --- a/src/main.cc Mon May 21 19:07:40 2012 +0300 +++ b/src/main.cc Tue May 22 05:02:00 2012 +0300 @@ -22,7 +22,7 @@ int main(int argc, char **argv) { glutInit(&argc, argv); - glutInitWindowSize(1280, 800); + glutInitWindowSize(800, 450); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE | GLUT_STENCIL); glutCreateWindow("Foo");