mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
general tweaks
This commit is contained in:
@@ -50,8 +50,6 @@ bool TAnimContainer::Init(TSubModel *pNewSubModel)
|
|||||||
|
|
||||||
void TAnimContainer::SetRotateAnim( Math3D::vector3 vNewRotateAngles, double fNewRotateSpeed)
|
void TAnimContainer::SetRotateAnim( Math3D::vector3 vNewRotateAngles, double fNewRotateSpeed)
|
||||||
{
|
{
|
||||||
if (!this)
|
|
||||||
return; // wywoływane z eventu, gdy brak modelu
|
|
||||||
vDesiredAngles = vNewRotateAngles;
|
vDesiredAngles = vNewRotateAngles;
|
||||||
fRotateSpeed = fNewRotateSpeed;
|
fRotateSpeed = fNewRotateSpeed;
|
||||||
iAnim |= 1;
|
iAnim |= 1;
|
||||||
@@ -72,8 +70,6 @@ void TAnimContainer::SetRotateAnim( Math3D::vector3 vNewRotateAngles, double fNe
|
|||||||
|
|
||||||
void TAnimContainer::SetTranslateAnim( Math3D::vector3 vNewTranslate, double fNewSpeed)
|
void TAnimContainer::SetTranslateAnim( Math3D::vector3 vNewTranslate, double fNewSpeed)
|
||||||
{
|
{
|
||||||
if (!this)
|
|
||||||
return; // wywoływane z eventu, gdy brak modelu
|
|
||||||
vTranslateTo = vNewTranslate;
|
vTranslateTo = vNewTranslate;
|
||||||
fTranslateSpeed = fNewSpeed;
|
fTranslateSpeed = fNewSpeed;
|
||||||
iAnim |= 2;
|
iAnim |= 2;
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ global_settings::ConfigParse(cParser &Parser) {
|
|||||||
std::string token;
|
std::string token;
|
||||||
Parser >> token;
|
Parser >> token;
|
||||||
std::istringstream stream(token);
|
std::istringstream stream(token);
|
||||||
if (token.find(':')) {
|
if (token.find(':') != -1) {
|
||||||
float a, b;
|
float a, b;
|
||||||
char s;
|
char s;
|
||||||
stream >> a >> s >> b;
|
stream >> a >> s >> b;
|
||||||
|
|||||||
@@ -296,8 +296,7 @@ opengl_texture::make_request() {
|
|||||||
|
|
||||||
auto const components { Split( name, '?' ) };
|
auto const components { Split( name, '?' ) };
|
||||||
|
|
||||||
auto *dictionary { new dictionary_source( components.back() ) };
|
auto *dictionary { new dictionary_source( components.back() ) };
|
||||||
if( dictionary == nullptr ) { return; }
|
|
||||||
|
|
||||||
auto rt = std::make_shared<python_rt>();
|
auto rt = std::make_shared<python_rt>();
|
||||||
rt->shared_tex = id;
|
rt->shared_tex = id;
|
||||||
|
|||||||
10
Train.cpp
10
Train.cpp
@@ -466,8 +466,7 @@ dictionary_source *TTrain::GetTrainState() {
|
|||||||
auto const *mover = DynamicObject->MoverParameters;
|
auto const *mover = DynamicObject->MoverParameters;
|
||||||
if( mover == nullptr ) { return nullptr; }
|
if( mover == nullptr ) { return nullptr; }
|
||||||
|
|
||||||
auto *dict { new dictionary_source };
|
auto *dict { new dictionary_source };
|
||||||
if( dict == nullptr ) { return nullptr; }
|
|
||||||
|
|
||||||
dict->insert( "name", DynamicObject->asName );
|
dict->insert( "name", DynamicObject->asName );
|
||||||
dict->insert( "cab", mover->ActiveCab );
|
dict->insert( "cab", mover->ActiveCab );
|
||||||
@@ -7418,11 +7417,6 @@ bool TTrain::InitializeCab(int NewCabNo, std::string const &asFileName)
|
|||||||
tex->make_stub();
|
tex->make_stub();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tex) {
|
|
||||||
WriteLog( "Python Screen: missing texture in screen " + submodelname + " - Ignoring screen" );
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
tex->create();
|
tex->create();
|
||||||
|
|
||||||
const std::string rendererpath {
|
const std::string rendererpath {
|
||||||
@@ -8271,7 +8265,7 @@ void TTrain::set_cab_controls( int const Cab ) {
|
|||||||
if( ggMotorBlowersAllOffButton.type() != TGaugeType::push ) {
|
if( ggMotorBlowersAllOffButton.type() != TGaugeType::push ) {
|
||||||
ggMotorBlowersAllOffButton.PutValue(
|
ggMotorBlowersAllOffButton.PutValue(
|
||||||
( mvControlled->MotorBlowers[end::front].is_disabled
|
( mvControlled->MotorBlowers[end::front].is_disabled
|
||||||
|| mvControlled->MotorBlowers[ end::front ].is_disabled ) ?
|
|| mvControlled->MotorBlowers[end::rear].is_disabled ) ?
|
||||||
1.f :
|
1.f :
|
||||||
0.f );
|
0.f );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ http://mozilla.org/MPL/2.0/.
|
|||||||
#include "Float3d.h"
|
#include "Float3d.h"
|
||||||
#include "dumb3d.h"
|
#include "dumb3d.h"
|
||||||
|
|
||||||
std::vector<glm::vec4> const ndcfrustumshapepoints //
|
inline std::vector<glm::vec4> const ndcfrustumshapepoints //
|
||||||
{
|
{
|
||||||
{-1, -1, -1, 1}, //
|
{-1, -1, -1, 1}, //
|
||||||
{ 1, -1, -1, 1}, //
|
{ 1, -1, -1, 1}, //
|
||||||
@@ -25,7 +25,7 @@ std::vector<glm::vec4> const ndcfrustumshapepoints //
|
|||||||
{-1, 1, 1, 1}, // z-far
|
{-1, 1, 1, 1}, // z-far
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<std::size_t> const frustumshapepoinstorder { 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 };
|
inline std::vector<std::size_t> const frustumshapepoinstorder { 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 };
|
||||||
|
|
||||||
// generic frustum class. used to determine if objects are inside current view area
|
// generic frustum class. used to determine if objects are inside current view area
|
||||||
|
|
||||||
|
|||||||
@@ -290,11 +290,11 @@ void opengl_vbogeometrybank::setup_buffer()
|
|||||||
{
|
{
|
||||||
m_vao.emplace();
|
m_vao.emplace();
|
||||||
|
|
||||||
m_vao->setup_attrib(*m_buffer, 0, 3, GL_FLOAT, sizeof(basic_vertex), 0 * sizeof(GL_FLOAT));
|
m_vao->setup_attrib(*m_buffer, 0, 3, GL_FLOAT, sizeof(basic_vertex), 0 * sizeof(float));
|
||||||
// NOTE: normal and color streams share the data
|
// NOTE: normal and color streams share the data
|
||||||
m_vao->setup_attrib(*m_buffer, 1, 3, GL_FLOAT, sizeof(basic_vertex), 3 * sizeof(GL_FLOAT));
|
m_vao->setup_attrib(*m_buffer, 1, 3, GL_FLOAT, sizeof(basic_vertex), 3 * sizeof(float));
|
||||||
m_vao->setup_attrib(*m_buffer, 2, 2, GL_FLOAT, sizeof(basic_vertex), 6 * sizeof(GL_FLOAT));
|
m_vao->setup_attrib(*m_buffer, 2, 2, GL_FLOAT, sizeof(basic_vertex), 6 * sizeof(float));
|
||||||
m_vao->setup_attrib(*m_buffer, 3, 4, GL_FLOAT, sizeof(basic_vertex), 8 * sizeof(GL_FLOAT));
|
m_vao->setup_attrib(*m_buffer, 3, 4, GL_FLOAT, sizeof(basic_vertex), 8 * sizeof(float));
|
||||||
|
|
||||||
m_buffer->unbind(gl::buffer::ARRAY_BUFFER);
|
m_buffer->unbind(gl::buffer::ARRAY_BUFFER);
|
||||||
m_vao->unbind();
|
m_vao->unbind();
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class ui_panel {
|
|||||||
public:
|
public:
|
||||||
// constructor
|
// constructor
|
||||||
ui_panel( std::string const &Identifier, bool const Isopen );
|
ui_panel( std::string const &Identifier, bool const Isopen );
|
||||||
|
virtual ~ui_panel() = default;
|
||||||
// methods
|
// methods
|
||||||
virtual void update() {};
|
virtual void update() {};
|
||||||
virtual void render();
|
virtual void render();
|
||||||
|
|||||||
Reference in New Issue
Block a user