13 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
14 glColor4d((color&0xFF)/255.0, (color&0xFF00)/255.0, (color&0xFF0000)/255.0, (color&0xFF000000)/255.0);
17 glTranslated(-movePos.
x, -movePos.
y, 0);
19 glVertex2d( wPos.
x + pos.
x, wPos.
y + pos.
y );
20 glVertex2d( wPos.
x - pos.
x, wPos.
y + pos.
y );
21 glVertex2d( wPos.
x + pos.
x, wPos.
y - pos.
y );
22 glVertex2d( wPos.
x - pos.
x, wPos.
y - pos.
y );
23 glVertex2d( wPos.
x + pos.
y, wPos.
y + pos.
x );
24 glVertex2d( wPos.
x - pos.
y, wPos.
y + pos.
x );
25 glVertex2d( wPos.
x + pos.
y, wPos.
y - pos.
x );
26 glVertex2d( wPos.
x - pos.
y, wPos.
y - pos.
x );
34 glBlendFunc(GL_ONE, GL_ONE);
35 glColor3f(1.0f, 1.0f, 1.0f);
36 glColor4d((
color&0xFF)/255.0, (
color&0xFF00)/255.0, (
color&0xFF0000)/255.0, (
color&0xFF000000)/255.0);
38 glTranslated(-movePos.
x, -movePos.
y, 0);
39 glBegin(GL_LINE_LOOP);
43 glVertex2d(startPos.
x,startPos.
y);
45 glVertex2d(startPos.
x,startPos.
y);
47 glVertex2d(startPos.
x,startPos.
y);
49 glVertex2d(startPos.
x,startPos.
y);
67 midpt += 2 * (x-y) + 1;
75 int size = names.size();
76 for(
unsigned int i=0; i < c.size(); i++) {
98 double r2Left = -rec->
width/2 + rec->
mPos.
x + cPos.
x;
99 double r2Right = rec->
width/2 + rec->
mPos.
x + cPos.
x;
103 bool outsideX = r1Right < r2Left || r1Left > r2Right;
104 bool outsideY = r1Bottom < r2Top || r1Top > r2Bottom;
105 return !(outsideY || outsideX) ? make_pair<WorldObject*, CollisionObject*>(wo, (
CollisionObject*)c) : make_pair<WorldObject*, CollisionObject*>(NULL, NULL);
116 return make_pair<WorldObject*, CollisionObject*>(NULL,NULL);
131 return make_pair<WorldObject*, CollisionObject*>(wo, (
CollisionObject*)c);
133 return make_pair<WorldObject*, CollisionObject*>(NULL, NULL);
142 return make_pair<WorldObject*, CollisionObject*>(NULL, NULL);
149 Point2D bl = rectCent + Point2D(-c->
width/2, c->
height/2);
150 Point2D tr = rectCent + Point2D( c->
width/2,-c->
height/2);
151 Point2D br = rectCent + Point2D( c->
width/2, c->
height/2);
157 return make_pair<WorldObject*, CollisionObject*>(wo, (
CollisionObject*)c);
164 return make_pair<WorldObject*, CollisionObject*>(wo, (
CollisionObject*)c);
166 return make_pair<WorldObject*, CollisionObject*>(NULL, NULL);
181 Point2D bl = rectCent + Point2D(-c->
width/2, c->
height/2);
182 Point2D tr = rectCent + Point2D( c->
width/2,-c->
height/2);
183 Point2D br = rectCent + Point2D( c->
width/2, c->
height/2);
189 return make_pair<WorldObject*, CollisionObject*>(NULL, NULL);
195 return make_pair<WorldObject*, CollisionObject*>(NULL, NULL);
218 return make_pair<WorldObject*, CollisionObject*>(NULL, NULL);