Browse Source

final part for the new margin override on palettes

Zachary Pavlov 16 years ago
parent
commit
13ac178d22

+ 4 - 2
pandatool/src/palettizer/paletteGroup.cxx

@@ -774,6 +774,8 @@ fillin(DatagramIterator &scan, BamReader *manager) {
   _num_pages = scan.get_uint32();
   _num_pages = scan.get_uint32();
   manager->read_pointers(scan, _num_pages);
   manager->read_pointers(scan, _num_pages);
 
 
-  _has_margin_override = scan.get_bool();
-  _margin_override = scan.get_int16();
+  if(Palettizer::_read_pi_version >= 19) {    
+    _has_margin_override = scan.get_bool();
+    _margin_override = scan.get_int16();
+  } 
 }
 }

+ 3 - 1
pandatool/src/palettizer/palettizer.cxx

@@ -37,7 +37,7 @@ Palettizer *pal = (Palettizer *)NULL;
 // allows us to easily update egg-palettize to write out additional
 // allows us to easily update egg-palettize to write out additional
 // information to its pi file, without having it increment the bam
 // information to its pi file, without having it increment the bam
 // version number for all bam and boo files anywhere in the world.
 // version number for all bam and boo files anywhere in the world.
-int Palettizer::_pi_version = 18;
+int Palettizer::_pi_version = 19;
 // Updated to version 8 on 3/20/03 to remove extensions from texture key names.
 // Updated to version 8 on 3/20/03 to remove extensions from texture key names.
 // Updated to version 9 on 4/13/03 to add a few properties in various places.
 // Updated to version 9 on 4/13/03 to add a few properties in various places.
 // Updated to version 10 on 4/15/03 to add _alpha_file_channel.
 // Updated to version 10 on 4/15/03 to add _alpha_file_channel.
@@ -49,6 +49,8 @@ int Palettizer::_pi_version = 18;
 // Updated to version 16 on 4/03/06 to add Palettizer::_cutout_mode et al.
 // Updated to version 16 on 4/03/06 to add Palettizer::_cutout_mode et al.
 // Updated to version 17 on 3/02/07 to add TextureImage::_txa_wrap_u etc.
 // Updated to version 17 on 3/02/07 to add TextureImage::_txa_wrap_u etc.
 // Updated to version 18 on 5/13/08 to add TextureProperties::_quality_level.
 // Updated to version 18 on 5/13/08 to add TextureProperties::_quality_level.
+// Updated to version 19 on 7/16/09 to add PaletteGroup::_override_margin
+
 
 
 int Palettizer::_min_pi_version = 8;
 int Palettizer::_min_pi_version = 8;
 // Dropped support for versions 7 and below on 7/14/03.
 // Dropped support for versions 7 and below on 7/14/03.