traits->red = traits->green = traits->blue = cbits;
traits->depth = zbits;
if (alpha)
- traits->alpha = 8;
+ traits->alpha = 8;
if (stencil)
- traits->stencil = 8;
+ traits->stencil = 8;
traits->doubleBuffer = true;
traits->mipMapGeneration = true;
traits->windowName = "FlightGear";
unsigned width = 0;
unsigned height = 0;
wsi->getScreenResolution(*traits, width, height);
- traits->windowDecoration = false;
+ traits->windowDecoration = false;
traits->width = width;
traits->height = height;
traits->supportsResize = false;
} else {
- traits->windowDecoration = true;
+ traits->windowDecoration = true;
traits->width = w;
traits->height = h;
-#if defined(WIN32) || defined(__APPLE__)
+ unsigned screenwidth = 0;
+ unsigned screenheight = 0;
+ wsi->getScreenResolution(*traits, screenwidth, screenheight);
// Ugly Hack, why does CW_USEDEFAULT works like phase of the moon?
// Mac also needs this to show window frame, menubar and Docks
- traits->x = 100;
- traits->y = 100;
-#endif
+ traits->x = (w>screenwidth) ? 0 : (screenwidth-w)/3;
+ traits->y = (h>screenheight) ? 0 : (screenheight-h)/3;
traits->supportsResize = true;
}
return traits;
while ( t_str.size() > 47 ) {
- unsigned int m = t_str.rfind(' ', 47);
+ string::size_type m = t_str.rfind(' ', 47);
msg += t_str.substr(0, m) + '\n';
msg.append( 32, ' ');
abs_viewer_position = loop_view->getViewPosition();
// update audio listener values
- // set the viewer posotion in Cartesian coordinates in meters
+ // set the viewer position in Cartesian coordinates in meters
smgr->set_position( abs_viewer_position, loop_view->getPosition() );
smgr->set_orientation( current_view_orientation );
// the earth centered frame
SGVec3f angularAccel;
- // The set of properties recieved for this timeslot
+ // The set of properties received for this timeslot
std::vector<FGPropertyData*> properties;
~FGExternalMotionData()
last_volume = volume;
}
- // process mesage queue
+ // process message queue
const string msgid = "Sequential Audio Message";
bool now_playing = false;
if ( exists( msgid ) ) {
else
hor_rotation = fmod(hor_rotation, SGD_2PI);
- // revert to unmodified values before usign them.
+ // revert to unmodified values before using them.
//
SGVec4f color = thesky->get_scene_color();
float s_green = color[1]*color[1]*color[1];
float s_blue = color[2]*color[2];
- // interpolate beween the sunrise/sunset color and the color
+ // interpolate between the sunrise/sunset color and the color
// at the opposite direction of this effect. Take in account
// the current visibility.
//