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

render code relocation, mouse wheel zoom control

This commit is contained in:
tmj-fstate
2017-03-10 17:40:52 +01:00
parent b5ae395c42
commit 3708a01d26
20 changed files with 579 additions and 308 deletions

10
World.h
View File

@@ -18,7 +18,7 @@ http://mozilla.org/MPL/2.0/.
#include "stars.h"
#include "skydome.h"
#include "mczapkie/mover.h"
#include "glfw/glfw3.h"
#include "renderer.h"
// wrapper for environment elements -- sky, sun, stars, clouds etc
class world_environment {
@@ -27,6 +27,7 @@ public:
void init();
void update();
void render();
void time( int const Hour = -1, int const Minute = -1, int const Second = -1 );
private:
CSkyDome m_skydome;
@@ -37,6 +38,9 @@ private:
class TWorld
{
// NOTE: direct access is a shortcut, but world etc needs some restructuring regardless
friend opengl_renderer;
void InOutKey( bool const Near = true );
void FollowView(bool wycisz = true);
void DistantView( bool const Near = false );
@@ -53,6 +57,8 @@ class TWorld
void OnCommandGet(DaneRozkaz *pRozkaz);
bool Update();
void TrainDelete(TDynamicObject *d = NULL);
// switches between static and dynamic daylight calculation
void ToggleDaylight();
TWorld();
~TWorld();
// double Aspect;
@@ -63,7 +69,7 @@ class TWorld
std::string OutText4;
void Update_Environment();
void Update_Camera( const double Deltatime );
bool Render();
void ResourceSweep();
void Render_Cab();
void Render_UI();
TCamera Camera;