MSVC changes ...
This commit is contained in:
+7
-5
@@ -193,8 +193,10 @@ void SGSky::postDraw( float alt ) {
|
|||||||
|
|
||||||
int in_cloud = -1; // cloud we are in
|
int in_cloud = -1; // cloud we are in
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
// check where we are relative to the cloud layers
|
// check where we are relative to the cloud layers
|
||||||
for ( int i = 0; i < (int)cloud_layers.size(); ++i ) {
|
for ( i = 0; i < (int)cloud_layers.size(); ++i ) {
|
||||||
float asl = cloud_layers[i]->get_asl();
|
float asl = cloud_layers[i]->get_asl();
|
||||||
float thickness = cloud_layers[i]->get_thickness();
|
float thickness = cloud_layers[i]->get_thickness();
|
||||||
|
|
||||||
@@ -220,14 +222,14 @@ void SGSky::postDraw( float alt ) {
|
|||||||
|
|
||||||
if ( pos == 0 ) {
|
if ( pos == 0 ) {
|
||||||
// we are below all the cloud layers, draw top to bottom
|
// we are below all the cloud layers, draw top to bottom
|
||||||
for ( int i = cloud_layers.size() - 1; i >= 0; --i ) {
|
for ( i = cloud_layers.size() - 1; i >= 0; --i ) {
|
||||||
if ( i != in_cloud ) {
|
if ( i != in_cloud ) {
|
||||||
cloud_layers[i]->draw();
|
cloud_layers[i]->draw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ( pos >= (int)cloud_layers.size() ) {
|
} else if ( pos >= (int)cloud_layers.size() ) {
|
||||||
// we are above all the cloud layers, draw bottom to top
|
// we are above all the cloud layers, draw bottom to top
|
||||||
for ( int i = 0; i < (int)cloud_layers.size(); ++i ) {
|
for ( i = 0; i < (int)cloud_layers.size(); ++i ) {
|
||||||
if ( i != in_cloud ) {
|
if ( i != in_cloud ) {
|
||||||
cloud_layers[i]->draw();
|
cloud_layers[i]->draw();
|
||||||
}
|
}
|
||||||
@@ -235,12 +237,12 @@ void SGSky::postDraw( float alt ) {
|
|||||||
} else {
|
} else {
|
||||||
// we are between cloud layers, draw lower layers bottom to
|
// we are between cloud layers, draw lower layers bottom to
|
||||||
// top and upper layers top to bottom
|
// top and upper layers top to bottom
|
||||||
for ( int i = 0; i < pos; ++i ) {
|
for ( i = 0; i < pos; ++i ) {
|
||||||
if ( i != in_cloud ) {
|
if ( i != in_cloud ) {
|
||||||
cloud_layers[i]->draw();
|
cloud_layers[i]->draw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for ( int i = cloud_layers.size() - 1; i >= pos; --i ) {
|
for ( i = cloud_layers.size() - 1; i >= pos; --i ) {
|
||||||
if ( i != in_cloud ) {
|
if ( i != in_cloud ) {
|
||||||
cloud_layers[i]->draw();
|
cloud_layers[i]->draw();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,11 +114,11 @@ ssgBranch *ssgMakeSphere( ssgSimpleState *state, ssgColourArray *cl,
|
|||||||
new ssgVtxTable ( GL_TRIANGLE_STRIP, vl, nl, tl, cl );
|
new ssgVtxTable ( GL_TRIANGLE_STRIP, vl, nl, tl, cl );
|
||||||
|
|
||||||
if ( vl->getNum() != nl->getNum() ) {
|
if ( vl->getNum() != nl->getNum() ) {
|
||||||
cout << "bad sphere1\n";
|
std::cout << "bad sphere1\n";
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
if ( vl->getNum() != tl->getNum() ) {
|
if ( vl->getNum() != tl->getNum() ) {
|
||||||
cout << "bad sphere2\n";
|
std::cout << "bad sphere2\n";
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
slice->setState( state );
|
slice->setState( state );
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
#include <plib/sg.h>
|
#include <plib/sg.h>
|
||||||
#include <plib/ssg.h>
|
#include <plib/ssg.h>
|
||||||
|
|
||||||
|
#include <compiler.h>
|
||||||
|
|
||||||
#include "stars.hxx"
|
#include "stars.hxx"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|||||||
Reference in New Issue
Block a user