Merge branch 'linux'

This commit is contained in:
Raydelto Hernandez 2020-06-06 17:41:24 -03:00
commit 9c0ecf03ad
78 changed files with 222 additions and 221 deletions

2
.gitignore vendored
View file

@ -1 +1,3 @@
obj obj
bin
.vscode

185
Makefile
View file

@ -1,107 +1,88 @@
CXXFLAGS = \ LIBS = -lGL -lGLEW -lGLU -lglut -ltinyxml -lSDL -lSDL_mixer -lSDL_image
-O2 \ INCLUDES=-I /usr/include
-I/System/Library/Frameworks/GLUT.framework/Headers \
-I/System/Library/Frameworks/OpenGL.framework/Headers \
-I/System/Library/Frameworks/SDL.framework/Headers \
-I/System/Library/Frameworks/SDL_image.framework/Headers \
-I/System/Library/Frameworks/SDL_mixer.framework/Headers \
-I/System/Library/Frameworks/TinyXML.framework/Headers
LDFLAGS = \ SRC = ./src/portal.cpp \
-framework Cocoa \ ./src/fan.cpp \
-framework GLUT \ ./src/physics/constraint.cpp \
-framework OpenGL \ ./src/physics/shape.cpp \
-framework SDL \ ./src/physics/vector.cpp \
-framework SDL_image \ ./src/physics/transform.cpp \
-framework SDL_mixer \ ./src/physics/force.cpp \
-framework TinyXML ./src/physics/particle.cpp \
./src/physics/translation.cpp \
./src/physics/rotation.cpp \
./src/switch.cpp \
./src/main.cpp \
./src/room_force.cpp \
./src/model.cpp \
./src/resource.cpp \
./src/wall.cpp \
./src/world.cpp \
./src/lighting.cpp \
./src/ball.cpp \
./src/worlds.cpp \
./src/translating.cpp \
./src/material.cpp \
./src/transforming.cpp \
./src/sound.cpp \
./src/trail.cpp \
./src/rotating.cpp \
./src/player.cpp \
./src/simulation.cpp \
./src/tube.cpp \
./src/shader.cpp \
./src/ramp.cpp \
./src/seesaw.cpp \
./src/escalator.cpp \
./src/room.cpp \
./src/block.cpp \
./src/texture.cpp \
./src/room_object.cpp
RESOURCES = \ OBJ = ./bin/portal.o \
resources/Polly.icns \ ./bin/fan.o \
resources/*.frag \ ./bin/constraint.o \
resources/*.jpg \ ./bin/shape.o \
resources/*.ogg \ ./bin/vector.o \
resources/*.png \ ./bin/transform.o \
resources/*.vert \ ./bin/force.o \
resources/world.xml ./bin/particle.o \
./bin/translation.o \
./bin/rotation.o \
./bin/switch.o \
./bin/main.o \
./bin/room_force.o \
./bin/model.o \
./bin/resource.o \
./bin/wall.o \
./bin/world.o \
./bin/lighting.o \
./bin/ball.o \
./bin/worlds.o \
./bin/translating.o \
./bin/material.o \
./bin/transforming.o \
./bin/sound.o \
./bin/trail.o \
./bin/rotating.o \
./bin/player.o \
./bin/simulation.o \
./bin/tube.o \
./bin/shader.o \
./bin/ramp.o \
./bin/seesaw.o \
./bin/escalator.o \
./bin/room.o \
./bin/block.o \
./bin/texture.o \
./bin/room_object.o
all : obj/Polly-B-Gone.app WARNINGS=-w
obj/main.out : \ FLAGS=-std=c++11
obj/ball.o \
obj/block.o \
obj/escalator.o \
obj/fan.o \
obj/lighting.o \
obj/material.o \
obj/model.o \
obj/physics/constraint.o \
obj/physics/force.o \
obj/physics/particle.o \
obj/physics/rotation.o \
obj/physics/shape.o \
obj/physics/transform.o \
obj/physics/translation.o \
obj/physics/vector.o \
obj/player.o \
obj/portal.o \
obj/ramp.o \
obj/resource.o \
obj/room.o \
obj/room_force.o \
obj/room_object.o \
obj/rotating.o \
obj/seesaw.o \
obj/shader.o \
obj/simulation.o \
obj/sound.o \
obj/switch.o \
obj/texture.o \
obj/trail.o \
obj/transforming.o \
obj/translating.o \
obj/tube.o \
obj/wall.o \
obj/world.o \
obj/worlds.o \
src/SDLMain.m
obj/physics/particle_test.out : \ all:
obj/physics/force.o \ g++ -c -g $(SRC) $(INCLUDES) $(WARNINGS) $(FLAGS)
obj/physics/particle.o \ ls bin>/dev/null||mkdir bin
obj/physics/vector.o \ mv *.o ./bin
obj/simulation.o g++ -g $(OBJ) $(LIBS) $(INCLUDES) -o bin/main $(WARNINGS) $(FLAGS)
obj/physics/shape_test.out : \
obj/physics/shape.o \
obj/physics/vector.o
obj/physics/vector_test.out : \
obj/physics/vector.o
obj/Polly-B-Gone.app : obj/main.out $(RESOURCES) resources/Info.plist Makefile
rm -rf $@
mkdir -p $@/Contents/MacOS
cp $< $@/Contents/MacOS/Polly-B-Gone
mkdir -p $@/Contents/Resources
cp resources/Info.plist $@/Contents
cp $(RESOURCES) $@/Contents/Resources
mkdir -p $@/Contents/Frameworks
cp -R /System/Library/Frameworks/SDL.framework $@/Contents/Frameworks
cp -R /System/Library/Frameworks/SDL_image.framework $@/Contents/Frameworks
cp -R /System/Library/Frameworks/SDL_mixer.framework $@/Contents/Frameworks
cp -R /System/Library/Frameworks/TinyXML.framework $@/Contents/Frameworks
find $@/Contents/Frameworks -name Headers | xargs rm -r
# ln -sf ../../../../resources/world.xml $@/Contents/Resources/world.xml
obj/%.out : obj/%.o
$(CXX) $(LDFLAGS) -o $@ $^
obj/%.o : src/%.cpp
mkdir -p $(@D)
$(CXX) -c $(CXXFLAGS) -o $@ $<
.PRECIOUS : obj/%.o obj/physics/%.o
clean:
rm -rf obj

View file

@ -1,14 +1,8 @@
# Polly-B-Gone # Polly-B-Gone
**Polly-B-Gone** is a 3D physics platform game that tells the story of a plucky wheeled robot named Polly, who has been imprisoned by the nefarious Dr. Nurbs in his laboratory. Polly must overcome a series of increasingly-elaborate obstacles to escape and regain her freedom. Polly was my entry in the 2008 [CS 248](http://graphics.stanford.edu/courses/cs248-08/) video game competition, and she won the grand prize! **Polly-B-Gone** is a 3D physics platform game that tells the story of a plucky wheeled robot named Polly, who has been imprisoned by the nefarious Dr. Nurbs in his laboratory. Polly must overcome a series of increasingly-elaborate obstacles to escape and regain her freedom. Polly was Mike Bostock's entry in the 2008 [CS 248](http://graphics.stanford.edu/courses/cs248-08/) video game competition, and it won the grand prize!
## Download [You can find more information about this project on its Stanford official page.](http://cs.stanford.edu/people/mbostock/polly)
Polly-B-Gone is currently available as a binary only for Mac OS X:
* [polly-1.0.dmg.zip](http://cs.stanford.edu/people/mbostock/polly/polly-1.0.dmg.zip)
It has only been tested on 10.5 (Leopard), but it probably works on other versions. For other platforms, youll need to build from source and make modifications as necessary.
## Screenshots ## Screenshots
@ -19,9 +13,17 @@ It has only been tested on 10.5 (Leopard), but it probably works on other versio
<img src="http://cs.stanford.edu/people/mbostock/polly/airborne.jpg" width="640" height="400" border="2"> <img src="http://cs.stanford.edu/people/mbostock/polly/airborne.jpg" width="640" height="400" border="2">
<img src="http://cs.stanford.edu/people/mbostock/polly/a-balancing-act.jpg" width="640" height="400" border="2"> <img src="http://cs.stanford.edu/people/mbostock/polly/a-balancing-act.jpg" width="640" height="400" border="2">
## Controls
* You can move Polly, using the W,A,S,D keys.
* SPACE pauses the game
* F9 Toggles on/off worls textres
* F10 Render helper vectors
* F11 toggles the Full Screen mode.
## Documentation ## Documentation
The entire game world for Polly-B-Gone is specified as an XML file. You can edit world.xml to create new levels, new puzzles, and even change the music, textures and lighting! See the [wiki](/mbostock/polly-b-gone/wiki) for details. The entire game world for Polly-B-Gone is specified as an XML file. You can edit world.xml to create new levels, new puzzles, and even change the music, textures and lighting! See the [wiki](http://cs.stanford.edu/people/mbostock/polly) for details.
## Third-Party Libraries ## Third-Party Libraries
@ -30,3 +32,33 @@ Polly-B-Gone uses the [Simple DirectMedia Layer](http://www.libsdl.org/) Library
## Third-Party Content ## Third-Party Content
[Texturama](http://texturama.com/) provided the textures for the ceramic, concrete, and drain materials. These images are copyright XY3D, Texturama, and Eric Brian Smith and may not be redistributed for any other purpose without the permission of the copyright holders. The clover and ivy textures are from the [Blender for Architecture](http://blender-archi.tuxfamily.org/) website and are distributed via the Creative Commons Attribution License version 2.5. The MIDI files for the background music come from the "Very Best of GUS MIDI" collection, which is available from the SDL_mixer website (see above). According to the compilation author, "all of these MIDI files are freely distributable, but most of them are copyrighted." [Texturama](http://texturama.com/) provided the textures for the ceramic, concrete, and drain materials. These images are copyright XY3D, Texturama, and Eric Brian Smith and may not be redistributed for any other purpose without the permission of the copyright holders. The clover and ivy textures are from the [Blender for Architecture](http://blender-archi.tuxfamily.org/) website and are distributed via the Creative Commons Attribution License version 2.5. The MIDI files for the background music come from the "Very Best of GUS MIDI" collection, which is available from the SDL_mixer website (see above). According to the compilation author, "all of these MIDI files are freely distributable, but most of them are copyrighted."
## Building on GNU/Linux
The GNU/Linux Makefile was created by Raydelto Hernandez (raydelto [at] gmail.com). It was tested un Ubuntu 20.04 on June 2020.
If you want to build this code on GNU/Linux you first need to install the following libraries:
* OpenGL
* GLEW
* GLU
* GLUT
* TinyXML
* SDL
* SDL Mixer
* SDL Image
If you are using Ubuntu you can install these libraries by typing the following command:
```
sudo apt-get install build-essential libgl1-mesa-dev libglu1-mesa-dev libglew-dev freeglut3-dev libsdl1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libtinyxml-dev
```
Then , finally , build the code by running the following command
```
make
```
Finally, you can run the freshly built game running:
```
./bin/main
```

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "ball.h" #include "ball.h"
#include "material.h" #include "material.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_BALL_H #ifndef MBOSTOCK_BALL_H
#define MBOSTOCK_BALL_H #define MBOSTOCK_BALL_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "block.h" #include "block.h"
#include "material.h" #include "material.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_BLOCK_H #ifndef MBOSTOCK_BLOCK_H
#define MBOSTOCK_BLOCK_H #define MBOSTOCK_BLOCK_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "escalator.h" #include "escalator.h"
#include "material.h" #include "material.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_ESCALATOR_H #ifndef MBOSTOCK_ESCALATOR_H
#define MBOSTOCK_ESCALATOR_H #define MBOSTOCK_ESCALATOR_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include <iostream> #include <iostream>
#include <stdlib.h> #include <stdlib.h>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_FAN_H #ifndef MBOSTOCK_FAN_H
#define MBOSTOCK_FAN_H #define MBOSTOCK_FAN_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include <stdlib.h> #include <stdlib.h>

View file

@ -1,9 +1,7 @@
// -*- C++ -*-
#ifndef MBOSTOCK_LIGHTING_H #ifndef MBOSTOCK_LIGHTING_H
#define MBOSTOCK_LIGHTING_H #define MBOSTOCK_LIGHTING_H
#include <OpenGL/gl.h> #include <GL/gl.h>
namespace mbostock { namespace mbostock {

View file

@ -1,11 +1,10 @@
// -*- C++ -*- #include <GL/gl.h>
#include <GL/glu.h>
#include <OpenGL/gl.h> #include <GL/glut.h>
#include <OpenGL/glu.h>
#include <SDL/SDL.h> #include <SDL/SDL.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <TinyXML/tinyxml.h> #include <tinyxml.h>
#include "room.h" #include "room.h"
#include "shader.h" #include "shader.h"
@ -98,8 +97,10 @@ static void handleDisplay() {
} }
static void toggleShader() { static void toggleShader() {
shaderi = (shaderi + 1) % shadern; static int increment = 1;
shaderi = shaderi + increment;
shader()->initialize(); shader()->initialize();
increment *= -1;
} }
static void toggleFullScreen() { static void toggleFullScreen() {
@ -194,6 +195,8 @@ static void eventLoop() {
int main(int argc, char** argv) { int main(int argc, char** argv) {
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO); SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
glutInit(&argc, argv);
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1); SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);

View file

@ -1,6 +1,4 @@
// -*- C++ -*- #include <GL/gl.h>
#include <OpenGL/gl.h>
#include <iostream> #include <iostream>
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_MATERIAL_H #ifndef MBOSTOCK_MATERIAL_H
#define MBOSTOCK_MATERIAL_H #define MBOSTOCK_MATERIAL_H

View file

@ -1,7 +1,5 @@
// -*- C++ -*- #include <GL/glut.h>
#include <GL/glu.h>
#include <GLUT/glut.h>
#include <OpenGL/glu.h>
#include <algorithm> #include <algorithm>
#include <iostream> #include <iostream>
#include <math.h> #include <math.h>

View file

@ -1,9 +1,7 @@
// -*- C++ -*-
#ifndef MBOSTOCK_MODEL_H #ifndef MBOSTOCK_MODEL_H
#define MBOSTOCK_MODEL_H #define MBOSTOCK_MODEL_H
#include <OpenGL/glu.h> #include <GL/glu.h>
#include "physics/shape.h" #include "physics/shape.h"
#include "physics/vector.h" #include "physics/vector.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include <stdio.h> #include <stdio.h>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_CONSTRAINT_H #ifndef MBOSTOCK_CONSTRAINT_H
#define MBOSTOCK_CONSTRAINT_H #define MBOSTOCK_CONSTRAINT_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_FORCE_H #ifndef MBOSTOCK_FORCE_H
#define MBOSTOCK_FORCE_H #define MBOSTOCK_FORCE_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_PARTICLE_H #ifndef MBOSTOCK_PARTICLE_H
#define MBOSTOCK_PARTICLE_H #define MBOSTOCK_PARTICLE_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include <math.h> #include <math.h>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_ROTATION_H #ifndef MBOSTOCK_ROTATION_H
#define MBOSTOCK_ROTATION_H #define MBOSTOCK_ROTATION_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include <algorithm> #include <algorithm>
#include <math.h> #include <math.h>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_SHAPE_H #ifndef MBOSTOCK_SHAPE_H
#define MBOSTOCK_SHAPE_H #define MBOSTOCK_SHAPE_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include <iostream> #include <iostream>
#include <math.h> #include <math.h>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "transform.h" #include "transform.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_TRANSFORM_H #ifndef MBOSTOCK_TRANSFORM_H
#define MBOSTOCK_TRANSFORM_H #define MBOSTOCK_TRANSFORM_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "particle.h" #include "particle.h"
#include "translation.h" #include "translation.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_TRANSLATION_H #ifndef MBOSTOCK_TRANSLATION_H
#define MBOSTOCK_TRANSLATION_H #define MBOSTOCK_TRANSLATION_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include <algorithm> #include <algorithm>
#include <stdlib.h> #include <stdlib.h>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_VECTOR_H #ifndef MBOSTOCK_VECTOR_H
#define MBOSTOCK_VECTOR_H #define MBOSTOCK_VECTOR_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>

View file

@ -1,8 +1,6 @@
// -*- C++ -*- #include <GL/glut.h>
#include <GL/gl.h>
#include <GLUT/glut.h> #include <GL/glu.h>
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <iostream> #include <iostream>
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_PLAYER_H #ifndef MBOSTOCK_PLAYER_H
#define MBOSTOCK_PLAYER_H #define MBOSTOCK_PLAYER_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "physics/vector.h" #include "physics/vector.h"
#include "portal.h" #include "portal.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_PORTAL_H #ifndef MBOSTOCK_PORTAL_H
#define MBOSTOCK_PORTAL_H #define MBOSTOCK_PORTAL_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "material.h" #include "material.h"
#include "model.h" #include "model.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_RAMP_H #ifndef MBOSTOCK_RAMP_H
#define MBOSTOCK_RAMP_H #define MBOSTOCK_RAMP_H

View file

@ -1,5 +1,3 @@
// -*- C++ -*-
#include <fstream> #include <fstream>
#include <ios> #include <ios>
#include <iostream> #include <iostream>
@ -9,7 +7,7 @@
using namespace mbostock; using namespace mbostock;
const char* Resources::path() { const char* Resources::path() {
return "Contents/Resources/"; return "resources/";
} }
const char* Resources::readFile(const char* p) { const char* Resources::readFile(const char* p) {

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_RESOURCE_H #ifndef MBOSTOCK_RESOURCE_H
#define MBOSTOCK_RESOURCE_H #define MBOSTOCK_RESOURCE_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include <algorithm> #include <algorithm>
#include <iostream> #include <iostream>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_ROOM_H #ifndef MBOSTOCK_ROOM_H
#define MBOSTOCK_ROOM_H #define MBOSTOCK_ROOM_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "room_force.h" #include "room_force.h"
#include "physics/particle.h" #include "physics/particle.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_ROOM_FORCE_H #ifndef MBOSTOCK_ROOM_FORCE_H
#define MBOSTOCK_ROOM_FORCE_H #define MBOSTOCK_ROOM_FORCE_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "physics/vector.h" #include "physics/vector.h"
#include "room_object.h" #include "room_object.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_ROOM_OBJECT_H #ifndef MBOSTOCK_ROOM_OBJECT_H
#define MBOSTOCK_ROOM_OBJECT_H #define MBOSTOCK_ROOM_OBJECT_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include <math.h> #include <math.h>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_ROTATING_H #ifndef MBOSTOCK_ROTATING_H
#define MBOSTOCK_ROTATING_H #define MBOSTOCK_ROTATING_H

View file

@ -1,6 +1,4 @@
// -*- C++ -*- #include <GL/gl.h>
#include <OpenGL/gl.h>
#include "material.h" #include "material.h"
#include "physics/constraint.h" #include "physics/constraint.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_SEESAW_H #ifndef MBOSTOCK_SEESAW_H
#define MBOSTOCK_SEESAW_H #define MBOSTOCK_SEESAW_H

View file

@ -1,7 +1,6 @@
// -*- C++ -*-
#include <stdlib.h> #include <stdlib.h>
#include <GL/glew.h>
#include <GL/gl.h>
#include "model.h" #include "model.h"
#include "resource.h" #include "resource.h"
#include "shader.h" #include "shader.h"

View file

@ -1,9 +1,9 @@
// -*- C++ -*-
#ifndef _SHADER_H #ifndef _SHADER_H
#define _SHADER_H #define _SHADER_H
#include <OpenGL/gl.h> #include <GL/gl.h>
namespace mbostock { namespace mbostock {

View file

@ -1,6 +1,4 @@
// -*- C++ -*- #include <SDL/SDL.h>
#include <SDL/sdl.h>
#include "simulation.h" #include "simulation.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_SIMULATION_H #ifndef MBOSTOCK_SIMULATION_H
#define MBOSTOCK_SIMULATION_H #define MBOSTOCK_SIMULATION_H

View file

@ -1,7 +1,7 @@
// -*- C++ -*-
#include <SDL/SDL_error.h> #include <SDL/SDL_error.h>
#include <SDL_mixer/SDL_mixer.h> #include <SDL/SDL_mixer.h>
#include <iostream> #include <iostream>
#include <string> #include <string>
#include <vector> #include <vector>

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_SOUND_H #ifndef MBOSTOCK_SOUND_H
#define MBOSTOCK_SOUND_H #define MBOSTOCK_SOUND_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "material.h" #include "material.h"
#include "physics/transform.h" #include "physics/transform.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_SWITCH_H #ifndef MBOSTOCK_SWITCH_H
#define MBOSTOCK_SWITCH_H #define MBOSTOCK_SWITCH_H

View file

@ -1,9 +1,9 @@
// -*- C++ -*-
#include <OpenGL/gl.h>
#include <OpenGL/glu.h> #include <GL/gl.h>
#include <SDL/sdl.h> #include <GL/glu.h>
#include <SDL_image/SDL_image.h> #include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <iostream> #include <iostream>
#include <string> #include <string>
#include <vector> #include <vector>

View file

@ -1,9 +1,9 @@
// -*- C++ -*-
#ifndef MBOSTOCK_TEXTURE_H #ifndef MBOSTOCK_TEXTURE_H
#define MBOSTOCK_TEXTURE_H #define MBOSTOCK_TEXTURE_H
#include <OpenGL/gl.h> #include <GL/gl.h>
namespace mbostock { namespace mbostock {

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "trail.h" #include "trail.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_TRAIL_H #ifndef MBOSTOCK_TRAIL_H
#define MBOSTOCK_TRAIL_H #define MBOSTOCK_TRAIL_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "transforming.h" #include "transforming.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_TRANSFORMING_H #ifndef MBOSTOCK_TRANSFORMING_H
#define MBOSTOCK_TRANSFORMING_H #define MBOSTOCK_TRANSFORMING_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "physics/particle.h" #include "physics/particle.h"
#include "physics/vector.h" #include "physics/vector.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_TRANSLATING_H #ifndef MBOSTOCK_TRANSLATING_H
#define MBOSTOCK_TRANSLATING_H #define MBOSTOCK_TRANSLATING_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "material.h" #include "material.h"
#include "model.h" #include "model.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_TUBE_H #ifndef MBOSTOCK_TUBE_H
#define MBOSTOCK_TUBE_H #define MBOSTOCK_TUBE_H

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#include "material.h" #include "material.h"
#include "model.h" #include "model.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_WALL_H #ifndef MBOSTOCK_WALL_H
#define MBOSTOCK_WALL_H #define MBOSTOCK_WALL_H

View file

@ -1,6 +1,6 @@
// -*- C++ -*-
#include <OpenGL/gl.h>
#include <GL/gl.h>
#include "material.h" #include "material.h"
#include "portal.h" #include "portal.h"

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_WORLD_H #ifndef MBOSTOCK_WORLD_H
#define MBOSTOCK_WORLD_H #define MBOSTOCK_WORLD_H

View file

@ -1,4 +1,4 @@
#include <TinyXML/tinyxml.h> #include <tinyxml.h>
#include <iostream> #include <iostream>
#include <list> #include <list>
#include <map> #include <map>
@ -144,7 +144,7 @@ World* XmlWorldBuilder::parseWorld(const char* path) {
std::string fullPath(Resources::path()); std::string fullPath(Resources::path());
fullPath.append(path); fullPath.append(path);
if (!document_.LoadFile(fullPath.c_str())) { if (!document_.LoadFile(fullPath.c_str())) {
std::cerr << "Error loading world \"" << path << "\": "; std::cerr << "Error loading world \"" << fullPath.c_str() << "\": ";
std::cerr << document_.ErrorDesc() << "\n"; std::cerr << document_.ErrorDesc() << "\n";
return NULL; return NULL;
} }

View file

@ -1,4 +1,4 @@
// -*- C++ -*-
#ifndef MBOSTOCK_WORLDS_H #ifndef MBOSTOCK_WORLDS_H
#define MBOSTOCK_WORLDS_H #define MBOSTOCK_WORLDS_H