mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
Merge branch 'tmj-dev' into milek-dev
This commit is contained in:
11
material.cpp
11
material.cpp
@@ -13,6 +13,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "renderer.h"
|
||||
#include "Globals.h"
|
||||
#include "utilities.h"
|
||||
#include "sn_utils.h"
|
||||
|
||||
bool
|
||||
opengl_material::deserialize( cParser &Input, bool const Loadnow ) {
|
||||
@@ -43,12 +44,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
|
||||
}
|
||||
@@ -69,6 +74,12 @@ opengl_material::deserialize_mapping( cParser &Input, int const Priority, bool c
|
||||
priority2 = 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