mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 04:19:19 +02:00
Merge branch 'milek-dev' into gfx-work
This commit is contained in:
11
material.cpp
11
material.cpp
@@ -14,6 +14,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "Globals.h"
|
||||
#include "utilities.h"
|
||||
#include "Logs.h"
|
||||
#include "sn_utils.h"
|
||||
|
||||
opengl_material::opengl_material()
|
||||
{
|
||||
@@ -171,12 +172,16 @@ opengl_material::deserialize_mapping( cParser &Input, int const Priority, bool c
|
||||
if( key == Global.Weather ) {
|
||||
// weather textures override generic (pri 0) and seasonal (pri 1) textures
|
||||
// seasonal weather textures (pri 1+2=3) override generic weather (pri 2) textures
|
||||
// skip the opening bracket
|
||||
auto const value { Input.getToken<std::string>( true, "\n\r\t ;" ) };
|
||||
while( true == deserialize_mapping( Input, Priority + 2, Loadnow ) ) {
|
||||
; // all work is done in the header
|
||||
}
|
||||
}
|
||||
else if( key == Global.Season ) {
|
||||
// seasonal textures override generic textures
|
||||
// skip the opening bracket
|
||||
auto const value { Input.getToken<std::string>( true, "\n\r\t ;" ) };
|
||||
while( true == deserialize_mapping( Input, 1, Loadnow ) ) {
|
||||
; // all work is done in the header
|
||||
}
|
||||
@@ -244,6 +249,12 @@ opengl_material::deserialize_mapping( cParser &Input, int const Priority, bool c
|
||||
selfillum = std::stof(value); //m7t: handle exception
|
||||
m_selfillum_priority = Priority;
|
||||
}
|
||||
else if( key == "size:" ) {
|
||||
Input.getTokens( 2 );
|
||||
Input
|
||||
>> size.x
|
||||
>> size.y;
|
||||
}
|
||||
else {
|
||||
auto const value = Input.getToken<std::string>( true, "\n\r\t ;" );
|
||||
if( value == "{" ) {
|
||||
|
||||
Reference in New Issue
Block a user