stratgame

changeset 1:55a43e27339a

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 22 May 2012 05:02:00 +0300
parents 86b53f76899f
children 369b51c9e4a8
files Makefile level/Makefile level/src/level.cc src/main.cc
diffstat 4 files changed, 14 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/Makefile	Mon May 21 19:07:40 2012 +0300
     1.2 +++ b/Makefile	Tue May 22 05:02:00 2012 +0300
     1.3 @@ -14,13 +14,17 @@
     1.4  LDFLAGS = $(libdir) $(slibs) $(libgl) -limtk
     1.5  
     1.6  ifeq ($(shell uname -s), Darwin)
     1.7 +	CC = clang
     1.8 +	CXX = clang++
     1.9 +	incdir += -I/opt/local/include
    1.10 +	libdir += -L/opt/local/lib
    1.11  	libgl = -framework OpenGL -framework GLUT -lGLEW
    1.12  else
    1.13  	libgl = -lGL -lGLU -lglut -lGLEW
    1.14  endif
    1.15  
    1.16  $(bin): $(obj) $(slibs)
    1.17 -	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.18 +	$(CXX) -o $@ $(obj) $(LDFLAGS)
    1.19  
    1.20  -include $(dep)
    1.21  
     2.1 --- a/level/Makefile	Mon May 21 19:07:40 2012 +0300
     2.2 +++ b/level/Makefile	Tue May 22 05:02:00 2012 +0300
     2.3 @@ -5,6 +5,11 @@
     2.4  
     2.5  CXXFLAGS = -std=c++0x -pedantic -Wall -g
     2.6  
     2.7 +ifeq ($(shell uname -s), Darwin)
     2.8 +	CC = clang
     2.9 +	CXX = clang++
    2.10 +endif
    2.11 +
    2.12  $(lib_a): $(obj)
    2.13  	$(AR) rcs $@ $(obj)
    2.14  
     3.1 --- a/level/src/level.cc	Mon May 21 19:07:40 2012 +0300
     3.2 +++ b/level/src/level.cc	Tue May 22 05:02:00 2012 +0300
     3.3 @@ -12,13 +12,14 @@
     3.4  
     3.5  bool Level::load(const char *fname)
     3.6  {
     3.7 -	if(!xml.loadFile(fname)) {
     3.8 +	if(!xml.LoadFile(fname)) {
     3.9  		fprintf(stderr, "failed to load level: %s\n", fname);
    3.10  		return false;
    3.11  	}
    3.12  
    3.13 -	if(strcmp(xml.RootElement().Name(), "level") != 0) {
    3.14 +	if(strcmp(xml.RootElement()->Name(), "level") != 0) {
    3.15  		fprintf(stderr, "invalid level file: %s\n", fname);
    3.16  		return false;
    3.17  	}
    3.18 +	return true;
    3.19  }
     4.1 --- a/src/main.cc	Mon May 21 19:07:40 2012 +0300
     4.2 +++ b/src/main.cc	Tue May 22 05:02:00 2012 +0300
     4.3 @@ -22,7 +22,7 @@
     4.4  int main(int argc, char **argv)
     4.5  {
     4.6  	glutInit(&argc, argv);
     4.7 -	glutInitWindowSize(1280, 800);
     4.8 +	glutInitWindowSize(800, 450);
     4.9  	glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE | GLUT_STENCIL);
    4.10  	glutCreateWindow("Foo");
    4.11