Final version of Beta 1
- made the world a little smaller such that there is only little space off screenmain
parent
263a80a1fd
commit
1a30c7583c
|
@ -57,7 +57,7 @@ int Model::OnInit (int argc, char* argv[]) {
|
|||
|
||||
// Reset the newest highscore entry index which may be used for highlighting
|
||||
// the newest entry.
|
||||
mNewestHighscoreEntryIndex = 99999;
|
||||
mNewestHighscoreEntryIndex = std::numeric_limits<unsigned int>::max();
|
||||
|
||||
// initialize event handlers and register them
|
||||
Engine::RegisterListener (this, EventGameOver);
|
||||
|
|
|
@ -49,9 +49,9 @@ int View::OnInit (int argc, char* argv[]) {
|
|||
int i;
|
||||
for (i = 0; i < 200; i++) {
|
||||
BackgroundStar star;
|
||||
star.position[0] = rand() / float(RAND_MAX);
|
||||
star.position[1] = rand() / float(RAND_MAX);
|
||||
star.position[2] = rand() / float(RAND_MAX);
|
||||
star.position[0] = rand() / float(RAND_MAX) * 1.2;
|
||||
star.position[1] = rand() / float(RAND_MAX) * 1.2;
|
||||
star.position[2] = rand() / float(RAND_MAX) * 1.2;
|
||||
|
||||
mBackgroundStars.push_back (star);
|
||||
}
|
||||
|
@ -211,10 +211,12 @@ void View::DrawStars() {
|
|||
|
||||
mBackgroundStars.at(i).position -= vector3d(Engine::GetFrameDuration() * 0.7 * mBackgroundStars.at(i).position[1] / world_width, 0., 0.);
|
||||
|
||||
if (mBackgroundStars.at(i).position[0] < 0.)
|
||||
mBackgroundStars.at(i).position[0] += 1.;
|
||||
if (mBackgroundStars.at(i).position[0] >= 1.)
|
||||
mBackgroundStars.at(i).position[0] -= 1.;
|
||||
// we move the stars a little more such that they are not blende out too early
|
||||
// \todo compute proper bounds from Physics world size!
|
||||
if (mBackgroundStars.at(i).position[0] < -0.1)
|
||||
mBackgroundStars.at(i).position[0] += 1.2;
|
||||
if (mBackgroundStars.at(i).position[0] >= 1.1)
|
||||
mBackgroundStars.at(i).position[0] -= 1.2;
|
||||
}
|
||||
|
||||
glEnd();
|
||||
|
|
|
@ -51,7 +51,7 @@ int main (int argc, char* argv[]) {
|
|||
SDL_WM_SetCaption("Asteroids -BETA1-","Asteroids -BETA 1-");
|
||||
|
||||
engine.GetView()->SetGridSize (8,8);
|
||||
dynamic_cast<asteroids::Physics*>(engine.GetPhysics())->SetWorldSize (28, 20);
|
||||
dynamic_cast<asteroids::Physics*>(engine.GetPhysics())->SetWorldSize (26, 20);
|
||||
|
||||
// run the default commands and load the configuration
|
||||
Engine::RunCommand ("exec asteroids.rc");
|
||||
|
|
Loading…
Reference in New Issue