Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 263965 | Differences between
and this patch

Collapse All | Expand All

(-)polly-src/lighting.h (-2 / +4 lines)
Lines 2-10 Link Here
2
2
3
#ifndef MBOSTOCK_LIGHTING_H
3
#ifndef MBOSTOCK_LIGHTING_H
4
#define MBOSTOCK_LIGHTING_H
4
#define MBOSTOCK_LIGHTING_H
5
5
#ifdef __APPLE__
6
#include <OpenGL/gl.h>
6
#include <OpenGL/gl.h>
7
7
#else
8
    #include <GL/gl.h>
9
#endif
8
namespace mbostock {
10
namespace mbostock {
9
11
10
  class Light {
12
  class Light {
(-)polly-src/main.cpp (+17 lines)
Lines 1-11 Link Here
1
// -*- C++ -*-
1
// -*- C++ -*-
2
2
3
#ifdef __APPLE__
3
#include <OpenGL/gl.h>
4
#include <OpenGL/gl.h>
4
#include <OpenGL/glu.h>
5
#include <OpenGL/glu.h>
6
#else
7
    #include <GL/gl.h>
8
    #include <GL/glu.h>
9
    #include <GL/glut.h>
10
#endif
11
5
#include <SDL/SDL.h>
12
#include <SDL/SDL.h>
6
#include <stdio.h>
13
#include <stdio.h>
7
#include <stdlib.h>
14
#include <stdlib.h>
15
16
#ifdef __APPLE__
8
#include <TinyXML/tinyxml.h>
17
#include <TinyXML/tinyxml.h>
18
#else
19
    #include <tinyxml.h>
20
#endif
9
21
10
#include "room.h"
22
#include "room.h"
11
#include "shader.h"
23
#include "shader.h"
Lines 192-197 Link Here
192
}
204
}
193
205
194
int main(int argc, char** argv) {
206
int main(int argc, char** argv) {
207
208
#ifndef __APPLE__
209
  glutInit(&argc, argv);
210
#endif
211
195
  SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
212
  SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
196
213
197
  SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
214
  SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
(-)polly-src/Makefile (+75 lines)
Lines 1-3 Link Here
1
MACHINE= $(shell uname -s)
2
3
ifeq ($(MACHINE),Darwin)
1
CXXFLAGS = \
4
CXXFLAGS = \
2
	-O2 \
5
	-O2 \
3
	-I/System/Library/Frameworks/GLUT.framework/Headers \
6
	-I/System/Library/Frameworks/GLUT.framework/Headers \
Lines 25-31 Link Here
25
	resources/*.vert \
28
	resources/*.vert \
26
	resources/world.xml
29
	resources/world.xml
27
30
31
else
32
CXXFLAGS = \
33
	-O2 \
34
	`sdl-config --cflags` \
35
	-I/usr/include \
36
37
LDFLAGS = \
38
	-lGLU \
39
	-lGL \
40
	-lGLEW \
41
	-lSDL \
42
	-lSDL_image \
43
	-lSDL_mixer \
44
	-ltinyxml
45
46
endif
47
48
ifeq ($(MACHINE),Darwin)
28
all : obj/Polly-B-Gone.app
49
all : obj/Polly-B-Gone.app
50
else
51
all : obj/polly-b-gone
52
endif
53
54
ifeq ($(MACHINE),Darwin)
29
55
30
obj/main.out : \
56
obj/main.out : \
31
	obj/ball.o \
57
	obj/ball.o \
Lines 66-71 Link Here
66
	obj/worlds.o \
92
	obj/worlds.o \
67
	SDLMain.m
93
	SDLMain.m
68
94
95
else
96
97
obj/main.out : \
98
	obj/ball.o \
99
	obj/block.o \
100
	obj/escalator.o \
101
	obj/fan.o \
102
	obj/lighting.o \
103
	obj/material.o \
104
	obj/model.o \
105
	obj/physics/constraint.o \
106
	obj/physics/force.o \
107
	obj/physics/particle.o \
108
	obj/physics/rotation.o \
109
	obj/physics/shape.o \
110
	obj/physics/transform.o \
111
	obj/physics/translation.o \
112
	obj/physics/vector.o \
113
	obj/player.o \
114
	obj/portal.o \
115
	obj/ramp.o \
116
	obj/resource.o \
117
	obj/room.o \
118
	obj/room_force.o \
119
	obj/room_object.o \
120
	obj/rotating.o \
121
	obj/seesaw.o \
122
	obj/shader.o \
123
	obj/simulation.o \
124
	obj/sound.o \
125
	obj/switch.o \
126
	obj/texture.o \
127
	obj/trail.o \
128
	obj/transforming.o \
129
	obj/translating.o \
130
	obj/tube.o \
131
	obj/wall.o \
132
	obj/world.o \
133
	obj/worlds.o 
134
135
endif
136
69
obj/physics/particle_test.out : \
137
obj/physics/particle_test.out : \
70
	obj/physics/force.o \
138
	obj/physics/force.o \
71
	obj/physics/particle.o \
139
	obj/physics/particle.o \
Lines 79-84 Link Here
79
obj/physics/vector_test.out : \
147
obj/physics/vector_test.out : \
80
	obj/physics/vector.o
148
	obj/physics/vector.o
81
149
150
ifeq ($(MACHINE),Darwin)
151
82
obj/Polly-B-Gone.app : obj/main.out $(RESOURCES) resources/Info.plist Makefile
152
obj/Polly-B-Gone.app : obj/main.out $(RESOURCES) resources/Info.plist Makefile
83
	rm -rf $@
153
	rm -rf $@
84
	mkdir -p $@/Contents/MacOS
154
	mkdir -p $@/Contents/MacOS
Lines 94-99 Link Here
94
	find $@/Contents/Frameworks -name Headers | xargs rm -r
164
	find $@/Contents/Frameworks -name Headers | xargs rm -r
95
#	ln -sf ../../../../resources/world.xml $@/Contents/Resources/world.xml
165
#	ln -sf ../../../../resources/world.xml $@/Contents/Resources/world.xml
96
166
167
else
168
obj/polly-b-gone : obj/main.out
169
	mv obj/main.out polly-b-gone
170
endif
171
97
physics/%.run : obj/physics/%.out
172
physics/%.run : obj/physics/%.out
98
	./$<
173
	./$<
99
174
(-)polly-src/material.cpp (-1 / +4 lines)
Lines 1-6 Link Here
1
// -*- C++ -*-
1
// -*- C++ -*-
2
2
#ifdef __APPLE__
3
#include <OpenGL/gl.h>
3
#include <OpenGL/gl.h>
4
#else
5
    #include <GL/gl.h>
6
#endif
4
#include <iostream>
7
#include <iostream>
5
#include <math.h>
8
#include <math.h>
6
#include <stdlib.h>
9
#include <stdlib.h>
(-)polly-src/model.cpp (-1 / +5 lines)
Lines 1-7 Link Here
1
// -*- C++ -*-
1
// -*- C++ -*-
2
2
#ifdef __APPLE__
3
#include <GLUT/glut.h>
3
#include <GLUT/glut.h>
4
#include <OpenGL/glu.h>
4
#include <OpenGL/glu.h>
5
#else
6
    #include <GL/glut.h>
7
    #include <GL/glu.h>
8
#endif
5
#include <algorithm>
9
#include <algorithm>
6
#include <iostream>
10
#include <iostream>
7
#include <math.h>
11
#include <math.h>
(-)polly-src/model.h (-2 / +4 lines)
Lines 2-10 Link Here
2
2
3
#ifndef MBOSTOCK_MODEL_H
3
#ifndef MBOSTOCK_MODEL_H
4
#define MBOSTOCK_MODEL_H
4
#define MBOSTOCK_MODEL_H
5
5
#ifdef __APPLE__
6
#include <OpenGL/glu.h>
6
#include <OpenGL/glu.h>
7
7
#else
8
    #include <GL/glu.h>
9
#endif
8
#include "physics/shape.h"
10
#include "physics/shape.h"
9
#include "physics/vector.h"
11
#include "physics/vector.h"
10
12
(-)polly-src/player.cpp (-1 / +6 lines)
Lines 1-8 Link Here
1
// -*- C++ -*-
1
// -*- C++ -*-
2
2
#ifdef __APPLE__
3
#include <GLUT/glut.h>
3
#include <GLUT/glut.h>
4
#include <OpenGL/gl.h>
4
#include <OpenGL/gl.h>
5
#include <OpenGL/glu.h>
5
#include <OpenGL/glu.h>
6
#else
7
    #include <GL/glut.h>
8
    #include <GL/gl.h>
9
    #include <GL/glu.h>
10
#endif
6
#include <iostream>
11
#include <iostream>
7
#include <math.h>
12
#include <math.h>
8
#include <stdio.h>
13
#include <stdio.h>
(-)polly-src/resource.cpp (+4 lines)
Lines 9-15 Link Here
9
using namespace mbostock;
9
using namespace mbostock;
10
10
11
const char* Resources::path() {
11
const char* Resources::path() {
12
#ifdef __APPLE__
12
  return "Contents/Resources/";
13
  return "Contents/Resources/";
14
#else
15
  return "resources/";
16
#endif
13
}
17
}
14
18
15
const char* Resources::readFile(const char* p) {
19
const char* Resources::readFile(const char* p) {
(-)polly-src/seesaw.cpp (-2 / +4 lines)
Lines 1-7 Link Here
1
// -*- C++ -*-
1
// -*- C++ -*-
2
2
#ifdef __APPLE__
3
#include <OpenGL/gl.h>
3
#include <OpenGL/gl.h>
4
4
#else
5
    #include <GL/gl.h>
6
#endif
5
#include "material.h"
7
#include "material.h"
6
#include "physics/constraint.h"
8
#include "physics/constraint.h"
7
#include "physics/force.h"
9
#include "physics/force.h"
(-)polly-src/shader.cpp (+4 lines)
Lines 2-7 Link Here
2
2
3
#include <stdlib.h>
3
#include <stdlib.h>
4
4
5
#ifndef __APPLE__
6
#include <GL/glew.h>
7
#endif
8
5
#include "model.h"
9
#include "model.h"
6
#include "resource.h"
10
#include "resource.h"
7
#include "shader.h"
11
#include "shader.h"
(-)polly-src/shader.h (+4 lines)
Lines 3-9 Link Here
3
#ifndef _SHADER_H
3
#ifndef _SHADER_H
4
#define _SHADER_H
4
#define _SHADER_H
5
5
6
#ifdef __APPLE__
6
#include <OpenGL/gl.h>
7
#include <OpenGL/gl.h>
8
#else
9
    #include <GL/gl.h>
10
#endif
7
11
8
namespace mbostock {
12
namespace mbostock {
9
13
(-)polly-src/simulation.cpp (+4 lines)
Lines 1-6 Link Here
1
// -*- C++ -*-
1
// -*- C++ -*-
2
2
3
#ifdef __APPLE_
3
#include <SDL/sdl.h>
4
#include <SDL/sdl.h>
5
#else
6
    #include <SDL/SDL.h>
7
#endif
4
8
5
#include "simulation.h"
9
#include "simulation.h"
6
10
(-)polly-src/sound.cpp (+6 lines)
Lines 1-7 Link Here
1
// -*- C++ -*-
1
// -*- C++ -*-
2
2
3
#ifdef __APPLE__
3
#include <SDL/SDL_error.h>
4
#include <SDL/SDL_error.h>
4
#include <SDL_mixer/SDL_mixer.h>
5
#include <SDL_mixer/SDL_mixer.h>
6
#else
7
#include <SDL/SDL_error.h>
8
#include <SDL/SDL_mixer.h>
9
#endif
10
5
#include <iostream>
11
#include <iostream>
6
#include <string>
12
#include <string>
7
#include <vector>
13
#include <vector>
(-)polly-src/texture.cpp (+8 lines)
Lines 1-9 Link Here
1
// -*- C++ -*-
1
// -*- C++ -*-
2
2
3
#ifdef __APPLE__
3
#include <OpenGL/gl.h>
4
#include <OpenGL/gl.h>
4
#include <OpenGL/glu.h>
5
#include <OpenGL/glu.h>
5
#include <SDL/sdl.h>
6
#include <SDL/sdl.h>
6
#include <SDL_image/SDL_image.h>
7
#include <SDL_image/SDL_image.h>
8
#else
9
#include <GL/gl.h>
10
#include <GL/glu.h>
11
#include <SDL/SDL.h>
12
#include <SDL/SDL_image.h>
13
#endif
14
7
#include <iostream>
15
#include <iostream>
8
#include <string>
16
#include <string>
9
#include <vector>
17
#include <vector>
(-)polly-src/texture.h (-2 / +4 lines)
Lines 2-10 Link Here
2
2
3
#ifndef MBOSTOCK_TEXTURE_H
3
#ifndef MBOSTOCK_TEXTURE_H
4
#define MBOSTOCK_TEXTURE_H
4
#define MBOSTOCK_TEXTURE_H
5
5
#ifdef __APPLE__
6
#include <OpenGL/gl.h>
6
#include <OpenGL/gl.h>
7
7
#else
8
    #include <GL/gl.h>
9
#endif
8
namespace mbostock {
10
namespace mbostock {
9
11
10
  class Texture {
12
  class Texture {
(-)polly-src/world.cpp (+4 lines)
Lines 1-6 Link Here
1
// -*- C++ -*-
1
// -*- C++ -*-
2
2
3
#ifdef __APPLE__
3
#include <OpenGL/gl.h>
4
#include <OpenGL/gl.h>
5
#else
6
    #include <GL/gl.h>
7
#endif
4
8
5
#include "material.h"
9
#include "material.h"
6
#include "portal.h"
10
#include "portal.h"
(-)polly-src/worlds.cpp (+8 lines)
Lines 1-4 Link Here
1
#ifdef __APPLE__
1
#include <TinyXML/tinyxml.h>
2
#include <TinyXML/tinyxml.h>
3
#else
4
#ifndef TIXML_USE_STL
5
#define TIXML_USE_STL
6
#endif
7
#include <tinyxml.h>
8
#endif
9
2
#include <iostream>
10
#include <iostream>
3
#include <list>
11
#include <list>
4
#include <map>
12
#include <map>

Return to bug 263965