Merge branch 'linux'
This commit is contained in:
commit
9c0ecf03ad
78 changed files with 222 additions and 221 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1 +1,3 @@
|
|||
obj
|
||||
bin
|
||||
.vscode
|
||||
|
|
|
|||
185
Makefile
185
Makefile
|
|
@ -1,107 +1,88 @@
|
|||
CXXFLAGS = \
|
||||
-O2 \
|
||||
-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
|
||||
LIBS = -lGL -lGLEW -lGLU -lglut -ltinyxml -lSDL -lSDL_mixer -lSDL_image
|
||||
INCLUDES=-I /usr/include
|
||||
|
||||
LDFLAGS = \
|
||||
-framework Cocoa \
|
||||
-framework GLUT \
|
||||
-framework OpenGL \
|
||||
-framework SDL \
|
||||
-framework SDL_image \
|
||||
-framework SDL_mixer \
|
||||
-framework TinyXML
|
||||
SRC = ./src/portal.cpp \
|
||||
./src/fan.cpp \
|
||||
./src/physics/constraint.cpp \
|
||||
./src/physics/shape.cpp \
|
||||
./src/physics/vector.cpp \
|
||||
./src/physics/transform.cpp \
|
||||
./src/physics/force.cpp \
|
||||
./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 = \
|
||||
resources/Polly.icns \
|
||||
resources/*.frag \
|
||||
resources/*.jpg \
|
||||
resources/*.ogg \
|
||||
resources/*.png \
|
||||
resources/*.vert \
|
||||
resources/world.xml
|
||||
OBJ = ./bin/portal.o \
|
||||
./bin/fan.o \
|
||||
./bin/constraint.o \
|
||||
./bin/shape.o \
|
||||
./bin/vector.o \
|
||||
./bin/transform.o \
|
||||
./bin/force.o \
|
||||
./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 : \
|
||||
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
|
||||
FLAGS=-std=c++11
|
||||
|
||||
obj/physics/particle_test.out : \
|
||||
obj/physics/force.o \
|
||||
obj/physics/particle.o \
|
||||
obj/physics/vector.o \
|
||||
obj/simulation.o
|
||||
|
||||
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
|
||||
all:
|
||||
g++ -c -g $(SRC) $(INCLUDES) $(WARNINGS) $(FLAGS)
|
||||
ls bin>/dev/null||mkdir bin
|
||||
mv *.o ./bin
|
||||
g++ -g $(OBJ) $(LIBS) $(INCLUDES) -o bin/main $(WARNINGS) $(FLAGS)
|
||||
|
|
|
|||
50
README.md
50
README.md
|
|
@ -1,14 +1,8 @@
|
|||
# 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
|
||||
|
||||
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, you’ll need to build from source and make modifications as necessary.
|
||||
[You can find more information about this project on its Stanford official page.](http://cs.stanford.edu/people/mbostock/polly)
|
||||
|
||||
## 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/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
|
||||
|
||||
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
|
||||
|
||||
|
|
@ -30,3 +32,33 @@ Polly-B-Gone uses the [Simple DirectMedia Layer](http://www.libsdl.org/) Library
|
|||
## 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."
|
||||
|
||||
## 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
|
||||
```
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "ball.h"
|
||||
#include "material.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_BALL_H
|
||||
#define MBOSTOCK_BALL_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "block.h"
|
||||
#include "material.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_BLOCK_H
|
||||
#define MBOSTOCK_BLOCK_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "escalator.h"
|
||||
#include "material.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_ESCALATOR_H
|
||||
#define MBOSTOCK_ESCALATOR_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_FAN_H
|
||||
#define MBOSTOCK_FAN_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#ifndef MBOSTOCK_LIGHTING_H
|
||||
#define MBOSTOCK_LIGHTING_H
|
||||
|
||||
#include <OpenGL/gl.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
namespace mbostock {
|
||||
|
||||
|
|
|
|||
15
src/main.cpp
15
src/main.cpp
|
|
@ -1,11 +1,10 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glu.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <GL/glut.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <TinyXML/tinyxml.h>
|
||||
#include <tinyxml.h>
|
||||
|
||||
#include "room.h"
|
||||
#include "shader.h"
|
||||
|
|
@ -98,8 +97,10 @@ static void handleDisplay() {
|
|||
}
|
||||
|
||||
static void toggleShader() {
|
||||
shaderi = (shaderi + 1) % shadern;
|
||||
static int increment = 1;
|
||||
shaderi = shaderi + increment;
|
||||
shader()->initialize();
|
||||
increment *= -1;
|
||||
}
|
||||
|
||||
static void toggleFullScreen() {
|
||||
|
|
@ -194,6 +195,8 @@ static void eventLoop() {
|
|||
int main(int argc, char** argv) {
|
||||
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
|
||||
|
||||
glutInit(&argc, argv);
|
||||
|
||||
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#include <OpenGL/gl.h>
|
||||
#include <GL/gl.h>
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_MATERIAL_H
|
||||
#define MBOSTOCK_MATERIAL_H
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#include <GLUT/glut.h>
|
||||
#include <OpenGL/glu.h>
|
||||
#include <GL/glut.h>
|
||||
#include <GL/glu.h>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#ifndef MBOSTOCK_MODEL_H
|
||||
#define MBOSTOCK_MODEL_H
|
||||
|
||||
#include <OpenGL/glu.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "physics/shape.h"
|
||||
#include "physics/vector.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_CONSTRAINT_H
|
||||
#define MBOSTOCK_CONSTRAINT_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_FORCE_H
|
||||
#define MBOSTOCK_FORCE_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_PARTICLE_H
|
||||
#define MBOSTOCK_PARTICLE_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_ROTATION_H
|
||||
#define MBOSTOCK_ROTATION_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#include <math.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_SHAPE_H
|
||||
#define MBOSTOCK_SHAPE_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "transform.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_TRANSFORM_H
|
||||
#define MBOSTOCK_TRANSFORM_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "particle.h"
|
||||
#include "translation.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_TRANSLATION_H
|
||||
#define MBOSTOCK_TRANSLATION_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_VECTOR_H
|
||||
#define MBOSTOCK_VECTOR_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#include <GLUT/glut.h>
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glu.h>
|
||||
#include <GL/glut.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_PLAYER_H
|
||||
#define MBOSTOCK_PLAYER_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "physics/vector.h"
|
||||
#include "portal.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_PORTAL_H
|
||||
#define MBOSTOCK_PORTAL_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "material.h"
|
||||
#include "model.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_RAMP_H
|
||||
#define MBOSTOCK_RAMP_H
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#include <fstream>
|
||||
#include <ios>
|
||||
#include <iostream>
|
||||
|
|
@ -9,7 +7,7 @@
|
|||
using namespace mbostock;
|
||||
|
||||
const char* Resources::path() {
|
||||
return "Contents/Resources/";
|
||||
return "resources/";
|
||||
}
|
||||
|
||||
const char* Resources::readFile(const char* p) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_RESOURCE_H
|
||||
#define MBOSTOCK_RESOURCE_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_ROOM_H
|
||||
#define MBOSTOCK_ROOM_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "room_force.h"
|
||||
#include "physics/particle.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_ROOM_FORCE_H
|
||||
#define MBOSTOCK_ROOM_FORCE_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "physics/vector.h"
|
||||
#include "room_object.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_ROOM_OBJECT_H
|
||||
#define MBOSTOCK_ROOM_OBJECT_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_ROTATING_H
|
||||
#define MBOSTOCK_ROTATING_H
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#include <OpenGL/gl.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
#include "material.h"
|
||||
#include "physics/constraint.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_SEESAW_H
|
||||
#define MBOSTOCK_SEESAW_H
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <GL/glew.h>
|
||||
#include <GL/gl.h>
|
||||
#include "model.h"
|
||||
#include "resource.h"
|
||||
#include "shader.h"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef _SHADER_H
|
||||
#define _SHADER_H
|
||||
|
||||
#include <OpenGL/gl.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
namespace mbostock {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#include <SDL/sdl.h>
|
||||
#include <SDL/SDL.h>
|
||||
|
||||
#include "simulation.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_SIMULATION_H
|
||||
#define MBOSTOCK_SIMULATION_H
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include <SDL/SDL_error.h>
|
||||
#include <SDL_mixer/SDL_mixer.h>
|
||||
#include <SDL/SDL_mixer.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_SOUND_H
|
||||
#define MBOSTOCK_SOUND_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "material.h"
|
||||
#include "physics/transform.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_SWITCH_H
|
||||
#define MBOSTOCK_SWITCH_H
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glu.h>
|
||||
#include <SDL/sdl.h>
|
||||
#include <SDL_image/SDL_image.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL/SDL_image.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_TEXTURE_H
|
||||
#define MBOSTOCK_TEXTURE_H
|
||||
|
||||
#include <OpenGL/gl.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
namespace mbostock {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "trail.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_TRAIL_H
|
||||
#define MBOSTOCK_TRAIL_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "transforming.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_TRANSFORMING_H
|
||||
#define MBOSTOCK_TRANSFORMING_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "physics/particle.h"
|
||||
#include "physics/vector.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_TRANSLATING_H
|
||||
#define MBOSTOCK_TRANSLATING_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "material.h"
|
||||
#include "model.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_TUBE_H
|
||||
#define MBOSTOCK_TUBE_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#include "material.h"
|
||||
#include "model.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_WALL_H
|
||||
#define MBOSTOCK_WALL_H
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#include <OpenGL/gl.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
#include "material.h"
|
||||
#include "portal.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_WORLD_H
|
||||
#define MBOSTOCK_WORLD_H
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include <TinyXML/tinyxml.h>
|
||||
#include <tinyxml.h>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
|
@ -144,7 +144,7 @@ World* XmlWorldBuilder::parseWorld(const char* path) {
|
|||
std::string fullPath(Resources::path());
|
||||
fullPath.append(path);
|
||||
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";
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
|
||||
#ifndef MBOSTOCK_WORLDS_H
|
||||
#define MBOSTOCK_WORLDS_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue