mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 09:19:18 +02:00
build 200124. scenario parameters control sliders, material reload support, material opacity driven translucent geometry alpha test, command keyboard mapping tooltip hints, camshaft logic tweak, motor connector logic tweak, ai power use logic tweak, ai pantograph control logic tweak, converter sound pitch fix. additional cab control localization
This commit is contained in:
17
material.h
17
material.h
@@ -38,10 +38,18 @@ struct opengl_material {
|
||||
bool
|
||||
deserialize( cParser &Input, bool const Loadnow );
|
||||
void finalize(bool Loadnow);
|
||||
bool update();
|
||||
float get_or_guess_opacity() const;
|
||||
bool is_translucent() const;
|
||||
// members
|
||||
static struct path_data {
|
||||
std::unordered_map<std::string, int> index_map;
|
||||
std::vector<std::string> data;
|
||||
} paths;
|
||||
bool is_good { false }; // indicates material was compiled without failure
|
||||
int path{ -1 }; // index to material path
|
||||
bool update_on_weather_change{ false };
|
||||
bool update_on_season_change{ false };
|
||||
|
||||
private:
|
||||
// methods
|
||||
@@ -49,9 +57,6 @@ private:
|
||||
bool
|
||||
deserialize_mapping( cParser &Input, int const Priority, bool const Loadnow );
|
||||
void log_error(const std::string &str);
|
||||
// extracts name of the sound file from provided data stream
|
||||
std::string
|
||||
deserialize_filename( cParser &Input );
|
||||
|
||||
// members
|
||||
// priorities for textures, shader, opacity
|
||||
@@ -89,6 +94,12 @@ public:
|
||||
material( material_handle const Material ) const { return m_materials[ Material ]; }
|
||||
opengl_material &
|
||||
material( material_handle const Material ) { return m_materials[ Material ]; }
|
||||
// material updates executed when environment changes
|
||||
// TODO: registerable callbacks in environment manager
|
||||
void
|
||||
on_weather_change();
|
||||
void
|
||||
on_season_change();
|
||||
|
||||
private:
|
||||
// types
|
||||
|
||||
Reference in New Issue
Block a user