Merge branch 'tmj-dev' into milek-dev

This commit is contained in:
milek7
2018-10-01 21:00:27 +02:00
47 changed files with 1674 additions and 972 deletions

View File

@@ -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 == "{" ) {