16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 04:39:18 +02:00
This commit is contained in:
VB
2017-02-26 19:10:16 +01:00
32 changed files with 2301 additions and 911 deletions

23
World.h
View File

@@ -14,8 +14,26 @@ http://mozilla.org/MPL/2.0/.
#include "Camera.h"
#include "Ground.h"
#include "sky.h"
#include "sun.h"
#include "stars.h"
#include "skydome.h"
#include "mczapkie/mover.h"
// wrapper for environment elements -- sky, sun, stars, clouds etc
class world_environment {
public:
void init();
void update();
void render();
private:
CSkyDome m_skydome;
cStars m_stars;
cSun m_sun;
TSky m_clouds;
};
class TWorld
{
void InOutKey();
@@ -41,19 +59,19 @@ class TWorld
std::string OutText2;
std::string OutText3;
std::string OutText4;
void Update_Lights();
void Update_Environment();
void Update_Camera( const double Deltatime );
bool Render();
void Render_Cab();
void Render_UI();
TCamera Camera;
TGround Ground;
world_environment Environment;
TTrain *Train;
TDynamicObject *pDynamicNearest;
bool Paused;
GLuint base; // numer DL dla znaków w napisach
texture_manager::size_type light; // numer tekstury dla smugi
TSky Clouds;
TEvent *KeyEvents[10]; // eventy wyzwalane z klawiaury
TMoverParameters *mvControlled; // wskaźnik na człon silnikowy, do wyświetlania jego parametrów
int iCheckFPS; // kiedy znów sprawdzić FPS, żeby wyłączać optymalizacji od razu do zera
@@ -69,5 +87,6 @@ class TWorld
void CreateE3D(std::string const &dir = "", bool dyn = false);
void CabChange(TDynamicObject *old, TDynamicObject *now);
};
//---------------------------------------------------------------------------