@@ -509,7 +509,7 @@ def __init__(self, contents):
509
509
if self .large_preview_type == 2 :
510
510
self .large_preview_path = data .read_cstring ()
511
511
512
- if self .version >= 0x20 :
512
+ if self .version >= 0x1f :
513
513
self .unknown3 = data .read_cstring ()
514
514
self .unknown4 = data .read_uint32 ()
515
515
@@ -542,7 +542,9 @@ def __init__(self, contents):
542
542
#: (Optional) Load screen image path; relative to root of map archive
543
543
self .load_screen_path = data .read_cstring ()
544
544
545
- self .unknown6 = data .read_uint16 ()
545
+ #: Unknown string, usually empty
546
+ self .unknown6 = data .read_bytes (data .read_uint16 ()).decode ('utf8' )
547
+
546
548
#: Load screen image scaling strategy: 0 = normal, 1 = aspect scaling, 2 = stretch the image.
547
549
self .load_screen_scaling = data .read_uint32 ()
548
550
@@ -585,8 +587,14 @@ def __init__(self, contents):
585
587
586
588
self .unknown7 = data .read_uint32 ()
587
589
590
+ if self .version >= 0x19 :
591
+ self .unknown8 = data .read_bytes (8 )
592
+
593
+ if self .version >= 0x1f :
594
+ self .unknown9 = data .read_bytes (9 )
595
+
588
596
if self .version >= 0x20 :
589
- self .unknown9 = data .read_bytes (21 )
597
+ self .unknown10 = data .read_bytes (4 )
590
598
591
599
#: The number of players enabled via the data editor
592
600
self .player_count = data .read_uint32 ()
@@ -665,7 +673,7 @@ def __init__(self, contents):
665
673
# }
666
674
# }
667
675
#: A bit array of flags mapping out the player enemies.
668
- self .enemy_flags = data .read_uint (int (math .ceil (self .alliance_flags_length / 8.0 )))
676
+ self .enemy_flags = data .read_uint (int (math .ceil (self .enemy_flags_length / 8.0 )))
669
677
670
678
if data .length != data .tell ():
671
679
self .logger .warn ("Not all of the MapInfo file was read!" )
0 commit comments