16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 01:19:19 +02:00

Merge branch 'tmj-dev' into milek-dev

This commit is contained in:
milek7
2018-07-17 16:20:11 +02:00
77 changed files with 2959 additions and 2171 deletions

49
World.h
View File

@@ -20,52 +20,6 @@ http://mozilla.org/MPL/2.0/.
#include "stars.h"
#include "skydome.h"
#include "messaging.h"
#include "station.h"
// wrapper for simulation time
class simulation_time {
public:
simulation_time() { m_time.wHour = 10; m_time.wMinute = 30; }
void
init();
void
update( double const Deltatime );
SYSTEMTIME &
data() { return m_time; }
SYSTEMTIME const &
data() const { return m_time; }
double
second() const { return ( m_time.wMilliseconds * 0.001 + m_time.wSecond ); }
int
year_day() const { return m_yearday; }
// helper, calculates day of year from given date
int
year_day( int Day, int const Month, int const Year ) const;
int
julian_day() const;
double
zone_bias() const { return m_timezonebias; }
private:
// calculates day and month from given day of year
void
daymonth( WORD &Day, WORD &Month, WORD const Year, WORD const Yearday );
SYSTEMTIME m_time;
double m_milliseconds{ 0.0 };
int m_yearday;
char m_monthdaycounts[ 2 ][ 13 ];
double m_timezonebias{ 0.0 };
};
namespace simulation {
extern simulation_time Time;
extern basic_station Station; // temporary object, for station functionality tests
}
class opengl_renderer;
@@ -128,7 +82,6 @@ TWorld();
private:
void Update_Environment();
void Update_Camera( const double Deltatime );
void ResourceSweep();
// handles vehicle change flag
void ChangeDynamic();
void InOutKey( bool const Near = true );
@@ -156,5 +109,7 @@ private:
GLFWwindow *window;
};
extern TWorld World;
//---------------------------------------------------------------------------