Making the source build on linux
This commit is contained in:
parent
25d7c4f2c9
commit
3c4f0b7b1d
77 changed files with 181 additions and 212 deletions
|
|
@ -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