Przeglądaj źródła

*** empty log message ***

David Rose 25 lat temu
rodzic
commit
7082cc10e3
100 zmienionych plików z 395 dodań i 182 usunięć
  1. 1 1
      panda/src/chan/animBundle.cxx
  2. 1 1
      panda/src/chan/animBundle.h
  3. 3 3
      panda/src/chan/animBundleNode.cxx
  4. 2 2
      panda/src/chan/animBundleNode.h
  5. 1 1
      panda/src/chan/animChannelMatrixXfmTable.cxx
  6. 1 1
      panda/src/chan/animChannelMatrixXfmTable.h
  7. 1 1
      panda/src/chan/animChannelScalarTable.cxx
  8. 1 1
      panda/src/chan/animChannelScalarTable.h
  9. 2 0
      panda/src/chan/animControl.cxx
  10. 0 1
      panda/src/chan/animControl.h
  11. 5 5
      panda/src/chan/animGroup.cxx
  12. 6 6
      panda/src/chan/animGroup.h
  13. 1 1
      panda/src/chan/movingPartMatrix.cxx
  14. 1 1
      panda/src/chan/movingPartMatrix.h
  15. 1 1
      panda/src/chan/movingPartScalar.cxx
  16. 1 1
      panda/src/chan/movingPartScalar.h
  17. 1 1
      panda/src/chan/partBundle.cxx
  18. 1 1
      panda/src/chan/partBundle.h
  19. 2 2
      panda/src/chan/partBundleNode.cxx
  20. 1 1
      panda/src/chan/partBundleNode.h
  21. 4 4
      panda/src/chan/partGroup.cxx
  22. 6 6
      panda/src/chan/partGroup.h
  23. 3 3
      panda/src/char/character.cxx
  24. 2 2
      panda/src/char/character.h
  25. 5 5
      panda/src/char/characterJoint.cxx
  26. 2 2
      panda/src/char/characterJoint.h
  27. 1 1
      panda/src/char/characterJointBundle.cxx
  28. 1 1
      panda/src/char/characterJointBundle.h
  29. 1 1
      panda/src/char/characterSlider.cxx
  30. 1 1
      panda/src/char/characterSlider.h
  31. 1 1
      panda/src/char/computedVertices.cxx
  32. 5 5
      panda/src/char/computedVertices.h
  33. 2 2
      panda/src/char/computedVerticesMorph.h
  34. 4 4
      panda/src/char/dynamicVertices.h
  35. 3 3
      panda/src/collide/collisionNode.cxx
  36. 2 2
      panda/src/collide/collisionNode.h
  37. 1 1
      panda/src/collide/collisionPlane.cxx
  38. 1 1
      panda/src/collide/collisionPlane.h
  39. 1 1
      panda/src/collide/collisionPolygon.cxx
  40. 1 1
      panda/src/collide/collisionPolygon.h
  41. 4 4
      panda/src/collide/collisionSolid.h
  42. 1 1
      panda/src/collide/collisionSphere.cxx
  43. 1 1
      panda/src/collide/collisionSphere.h
  44. 1 1
      panda/src/cull/geomBinTransition.cxx
  45. 1 1
      panda/src/cull/geomBinTransition.h
  46. 2 0
      panda/src/display/graphicsWindow.cxx
  47. 2 2
      panda/src/downloader/downloader.cxx
  48. 3 3
      panda/src/effects/lensFlareNode.cxx
  49. 2 2
      panda/src/effects/lensFlareNode.h
  50. 21 0
      panda/src/express/config_express.cxx
  51. 1 0
      panda/src/express/config_express.h
  52. 23 0
      panda/src/express/memoryUsage.I
  53. 82 10
      panda/src/express/memoryUsage.cxx
  54. 4 0
      panda/src/express/memoryUsage.h
  55. 13 5
      panda/src/express/memoryUsagePointers.I
  56. 9 2
      panda/src/express/memoryUsagePointers.cxx
  57. 6 3
      panda/src/express/memoryUsagePointers.h
  58. 7 2
      panda/src/express/referenceCount.I
  59. 1 1
      panda/src/express/reversedNumericData.cxx
  60. 23 0
      panda/src/express/typeHandle.cxx
  61. 1 0
      panda/src/express/typeHandle.h
  62. 2 2
      panda/src/express/typedReferenceCount.I
  63. 2 0
      panda/src/glgsg/glGraphicsStateGuardian.cxx
  64. 7 5
      panda/src/gobj/drawable.h
  65. 2 2
      panda/src/gobj/geom.cxx
  66. 2 2
      panda/src/gobj/geom.h
  67. 1 1
      panda/src/gobj/geomLine.cxx
  68. 1 1
      panda/src/gobj/geomLine.h
  69. 1 1
      panda/src/gobj/geomLinestrip.cxx
  70. 1 1
      panda/src/gobj/geomLinestrip.h
  71. 1 1
      panda/src/gobj/geomPoint.cxx
  72. 1 1
      panda/src/gobj/geomPoint.h
  73. 1 1
      panda/src/gobj/geomPolygon.cxx
  74. 1 1
      panda/src/gobj/geomPolygon.h
  75. 1 1
      panda/src/gobj/geomQuad.cxx
  76. 1 1
      panda/src/gobj/geomQuad.h
  77. 1 1
      panda/src/gobj/geomSphere.cxx
  78. 1 1
      panda/src/gobj/geomSphere.h
  79. 2 2
      panda/src/gobj/geomSprite.cxx
  80. 2 2
      panda/src/gobj/geomSprite.h
  81. 1 1
      panda/src/gobj/geomTri.cxx
  82. 1 1
      panda/src/gobj/geomTri.h
  83. 1 1
      panda/src/gobj/geomTrifan.cxx
  84. 1 1
      panda/src/gobj/geomTrifan.h
  85. 1 1
      panda/src/gobj/geomTristrip.cxx
  86. 1 1
      panda/src/gobj/geomTristrip.h
  87. 1 1
      panda/src/gobj/imageBuffer.h
  88. 1 1
      panda/src/gobj/material.cxx
  89. 5 5
      panda/src/gobj/material.h
  90. 2 2
      panda/src/gobj/texture.cxx
  91. 1 1
      panda/src/gobj/texture.h
  92. 3 0
      panda/src/graph/arcChain.I
  93. 3 0
      panda/src/graph/arcChain.cxx
  94. 26 0
      panda/src/graph/arcChain.h
  95. 5 1
      panda/src/graph/config_graph.cxx
  96. 1 1
      panda/src/graph/namedNode.cxx
  97. 1 1
      panda/src/graph/namedNode.h
  98. 7 5
      panda/src/graph/node.cxx
  99. 7 7
      panda/src/graph/node.h
  100. 7 7
      panda/src/graph/nodeRelation.I

+ 1 - 1
panda/src/chan/animBundle.cxx

@@ -59,7 +59,7 @@ fillin(DatagramIterator& scan, BamReader* manager)
 //       Access: Protected
 //  Description: Factory method to generate a AnimBundle object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* AnimBundle::
+TypedWritable* AnimBundle::
 make_AnimBundle(const FactoryParams &params)
 {
   AnimBundle *me = new AnimBundle;

+ 1 - 1
panda/src/chan/animBundle.h

@@ -37,7 +37,7 @@ public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  static TypedWriteable *make_AnimBundle(const FactoryParams &params);
+  static TypedWritable *make_AnimBundle(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 3 - 3
panda/src/chan/animBundleNode.cxx

@@ -56,12 +56,12 @@ fillin(DatagramIterator& scan, BamReader* manager)
 ////////////////////////////////////////////////////////////////////
 //     Function: AnimBundleNode::complete_pointers
 //       Access: Public
-//  Description: Takes in a vector of pointes to TypedWriteable
+//  Description: Takes in a vector of pointes to TypedWritable
 //               objects that correspond to all the requests for 
 //               pointers that this object made to BamReader.
 ////////////////////////////////////////////////////////////////////
 int AnimBundleNode::
-complete_pointers(vector_typedWriteable &plist, BamReader* manager)
+complete_pointers(vector_typedWritable &plist, BamReader* manager)
 {
   int start = NamedNode::complete_pointers(plist, manager);
   _bundle = DCAST(AnimBundle, plist[start]);
@@ -73,7 +73,7 @@ complete_pointers(vector_typedWriteable &plist, BamReader* manager)
 //       Access: Protected
 //  Description: Factory method to generate a AnimBundleNode object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* AnimBundleNode::
+TypedWritable* AnimBundleNode::
 make_AnimBundleNode(const FactoryParams &params)
 {
   AnimBundleNode *me = new AnimBundleNode;

+ 2 - 2
panda/src/chan/animBundleNode.h

@@ -35,10 +35,10 @@ private:
 public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
-  virtual int complete_pointers(vector_typedWriteable &plist, 
+  virtual int complete_pointers(vector_typedWritable &plist, 
 				BamReader *manager);
 
-  static TypedWriteable *make_AnimBundleNode(const FactoryParams &params);
+  static TypedWritable *make_AnimBundleNode(const FactoryParams &params);
 
 protected:
   INLINE AnimBundleNode(void);

+ 1 - 1
panda/src/chan/animChannelMatrixXfmTable.cxx

@@ -359,7 +359,7 @@ fillin(DatagramIterator& scan, BamReader* manager)
 //       Access: Protected
 //  Description: Factory method to generate a AnimChannelMatrixXfmTable object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* AnimChannelMatrixXfmTable::
+TypedWritable* AnimChannelMatrixXfmTable::
 make_AnimChannelMatrixXfmTable(const FactoryParams &params)
 {
   AnimChannelMatrixXfmTable *me = new AnimChannelMatrixXfmTable;

+ 1 - 1
panda/src/chan/animChannelMatrixXfmTable.h

@@ -58,7 +58,7 @@ public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  static TypedWriteable *make_AnimChannelMatrixXfmTable(const FactoryParams &params);
+  static TypedWritable *make_AnimChannelMatrixXfmTable(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 1 - 1
panda/src/chan/animChannelScalarTable.cxx

@@ -303,7 +303,7 @@ fillin(DatagramIterator& scan, BamReader* manager)
 //       Access: Protected
 //  Description: Factory method to generate a AnimChannelScalarTable object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* AnimChannelScalarTable::
+TypedWritable* AnimChannelScalarTable::
 make_AnimChannelScalarTable(const FactoryParams &params)
 {
   AnimChannelScalarTable *me = new AnimChannelScalarTable;

+ 1 - 1
panda/src/chan/animChannelScalarTable.h

@@ -40,7 +40,7 @@ public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  static TypedWriteable *make_AnimChannelScalarTable(const FactoryParams &params);
+  static TypedWritable *make_AnimChannelScalarTable(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 2 - 0
panda/src/chan/animControl.cxx

@@ -21,6 +21,8 @@ TypeHandle AnimControl::_type_handle;
 ////////////////////////////////////////////////////////////////////
 AnimControl::
 AnimControl(PartBundle *part, AnimBundle *anim, int channel_index) {
+  MemoryUsage::update_type(this, get_class_type());
+
   _part = part;
   _anim = anim;
   _channel_index = channel_index;

+ 0 - 1
panda/src/chan/animControl.h

@@ -135,7 +135,6 @@ private:
   int _marked_frame;
 
 public:
-
   static TypeHandle get_class_type() {
     return _type_handle;
   }

+ 5 - 5
panda/src/chan/animGroup.cxx

@@ -201,18 +201,18 @@ fillin(DatagramIterator& scan, BamReader* manager)
 ////////////////////////////////////////////////////////////////////
 //     Function: AnimGroup::complete_pointers
 //       Access: Public
-//  Description: Takes in a vector of pointes to TypedWriteable
+//  Description: Takes in a vector of pointes to TypedWritable
 //               objects that correspond to all the requests for 
 //               pointers that this object made to BamReader.
 ////////////////////////////////////////////////////////////////////
 int AnimGroup::
-complete_pointers(vector_typedWriteable &plist, BamReader*)
+complete_pointers(vector_typedWritable &plist, BamReader*)
 {
-  nassertr(plist[0] != TypedWriteable::Null, 0);
+  nassertr(plist[0] != TypedWritable::Null, 0);
   _root = DCAST(AnimBundle, plist[0]);
   for(int i = 1; i < _num_children+1; i++)
   {
-    if (plist[i] == TypedWriteable::Null)
+    if (plist[i] == TypedWritable::Null)
     {
       chan_cat->warning() << get_type().get_name() 
 			  << " Ignoring null child" << endl;
@@ -230,7 +230,7 @@ complete_pointers(vector_typedWriteable &plist, BamReader*)
 //       Access: Protected
 //  Description: Factory method to generate a AnimGroup object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* AnimGroup::
+TypedWritable* AnimGroup::
 make_AnimGroup(const FactoryParams &params)
 {
   AnimGroup *me = new AnimGroup;

+ 6 - 6
panda/src/chan/animGroup.h

@@ -8,7 +8,7 @@
 
 #include <pandabase.h>
 
-#include <typedWriteableReferenceCount.h>
+#include <typedWritableReferenceCount.h>
 #include <pointerTo.h>
 #include <namable.h>
 
@@ -22,7 +22,7 @@ class BamReader;
 //               AnimChannels.  The root of the hierarchy must be an
 //               AnimBundle.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDA AnimGroup : public TypedWriteableReferenceCount, public Namable {
+class EXPCL_PANDA AnimGroup : public TypedWritableReferenceCount, public Namable {
 protected:
   // The default constructor is protected: don't try to create an
   // AnimGroup without a parent.  To create an AnimChannel hierarchy,
@@ -56,10 +56,10 @@ protected:
 public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
-  virtual int complete_pointers(vector_typedWriteable &plist, 
+  virtual int complete_pointers(vector_typedWritable &plist, 
 				BamReader *manager);
 
-  static TypedWriteable *make_AnimGroup(const FactoryParams &params);
+  static TypedWritable *make_AnimGroup(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);
@@ -77,9 +77,9 @@ public:
     return _type_handle;
   }
   static void init_type() {
-    TypedWriteableReferenceCount::init_type();
+    TypedWritableReferenceCount::init_type();
     register_type(_type_handle, "AnimGroup",
-		  TypedWriteableReferenceCount::get_class_type());
+		  TypedWritableReferenceCount::get_class_type());
   }
 
 private:

+ 1 - 1
panda/src/chan/movingPartMatrix.cxx

@@ -122,7 +122,7 @@ get_blend_value(const PartBundle *root) {
 //       Access: Protected
 //  Description: Factory method to generate a MovingPartMatrix object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* MovingPartMatrix::
+TypedWritable* MovingPartMatrix::
 make_MovingPartMatrix(const FactoryParams &params)
 {
   MovingPartMatrix *me = new MovingPartMatrix;

+ 1 - 1
panda/src/chan/movingPartMatrix.h

@@ -36,7 +36,7 @@ protected:
 public:
   static void register_with_read_factory(void);
 
-  static TypedWriteable *make_MovingPartMatrix(const FactoryParams &params);
+  static TypedWritable *make_MovingPartMatrix(const FactoryParams &params);
 
 public:
   virtual TypeHandle get_type() const {

+ 1 - 1
panda/src/chan/movingPartScalar.cxx

@@ -75,7 +75,7 @@ get_blend_value(const PartBundle *root) {
 //       Access: Protected
 //  Description: Factory method to generate a MovingPartScalar object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* MovingPartScalar::
+TypedWritable* MovingPartScalar::
 make_MovingPartScalar(const FactoryParams &params)
 {
   MovingPartScalar *me = new MovingPartScalar;

+ 1 - 1
panda/src/chan/movingPartScalar.h

@@ -35,7 +35,7 @@ protected:
 public:
   static void register_with_read_factory(void);
 
-  static TypedWriteable *make_MovingPartScalar(const FactoryParams &params);
+  static TypedWritable *make_MovingPartScalar(const FactoryParams &params);
 
 public:
   virtual TypeHandle get_type() const {

+ 1 - 1
panda/src/chan/partBundle.cxx

@@ -400,7 +400,7 @@ finalize(void)
 //       Access: Protected
 //  Description: Factory method to generate a PartBundle object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* PartBundle::
+TypedWritable* PartBundle::
 make_PartBundle(const FactoryParams &params)
 {
   PartBundle *me = new PartBundle;

+ 1 - 1
panda/src/chan/partBundle.h

@@ -130,7 +130,7 @@ public:
   static void register_with_read_factory(void);
   virtual void finalize();
 
-  static TypedWriteable *make_PartBundle(const FactoryParams &params);
+  static TypedWritable *make_PartBundle(const FactoryParams &params);
 
 public:
 

+ 2 - 2
panda/src/chan/partBundleNode.cxx

@@ -57,12 +57,12 @@ fillin(DatagramIterator& scan, BamReader* manager)
 ////////////////////////////////////////////////////////////////////
 //     Function: PartBundleNode::complete_pointers
 //       Access: Public
-//  Description: Takes in a vector of pointes to TypedWriteable
+//  Description: Takes in a vector of pointes to TypedWritable
 //               objects that correspond to all the requests for 
 //               pointers that this object made to BamReader.
 ////////////////////////////////////////////////////////////////////
 int PartBundleNode::
-complete_pointers(vector_typedWriteable &plist, BamReader* manager)
+complete_pointers(vector_typedWritable &plist, BamReader* manager)
 {
   int start = NamedNode::complete_pointers(plist, manager);
   _bundle = DCAST(PartBundle, plist[start]);

+ 1 - 1
panda/src/chan/partBundleNode.h

@@ -37,7 +37,7 @@ private:
 
 public:
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
-  virtual int complete_pointers(vector_typedWriteable &plist, 
+  virtual int complete_pointers(vector_typedWritable &plist, 
 				BamReader *manager);
 
 protected:

+ 4 - 4
panda/src/chan/partGroup.cxx

@@ -477,17 +477,17 @@ fillin(DatagramIterator& scan, BamReader* manager)
 ////////////////////////////////////////////////////////////////////
 //     Function: PartGroup::complete_pointers
 //       Access: Public
-//  Description: Takes in a vector of pointes to TypedWriteable
+//  Description: Takes in a vector of pointes to TypedWritable
 //               objects that correspond to all the requests for 
 //               pointers that this object made to BamReader.
 ////////////////////////////////////////////////////////////////////
 int PartGroup::
-complete_pointers(vector_typedWriteable &plist, BamReader*)
+complete_pointers(vector_typedWritable &plist, BamReader*)
 {
   int i;
   for(i = 0; i < _num_children; i++)
   {
-    if (plist[i] == TypedWriteable::Null)
+    if (plist[i] == TypedWritable::Null)
     {
       chan_cat->warning() << get_type().get_name()
 			  << " Ignoring null PartGroup" << endl;
@@ -506,7 +506,7 @@ complete_pointers(vector_typedWriteable &plist, BamReader*)
 //       Access: Protected
 //  Description: Factory method to generate a PartGroup object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* PartGroup::
+TypedWritable* PartGroup::
 make_PartGroup(const FactoryParams &params)
 {
   PartGroup *me = new PartGroup;

+ 6 - 6
panda/src/chan/partGroup.h

@@ -8,7 +8,7 @@
 
 #include <pandabase.h>
 
-#include <typedWriteableReferenceCount.h>
+#include <typedWritableReferenceCount.h>
 #include <pointerTo.h>
 #include <namable.h>
 #include <typedef.h>
@@ -25,7 +25,7 @@ class BamReader;
 // Description : This is the base class for PartRoot and
 //               MovingPart.  It defines a hierarchy of MovingParts.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDA PartGroup : public TypedWriteableReferenceCount, public Namable {
+class EXPCL_PANDA PartGroup : public TypedWritableReferenceCount, public Namable {
 public:
   // This enum defines bits which may be passed into check_hierarchy()
   // and PartBundle::bind_anim() to allow an inexact match of channel
@@ -85,10 +85,10 @@ protected:
 public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
-  virtual int complete_pointers(vector_typedWriteable &plist, 
+  virtual int complete_pointers(vector_typedWritable &plist, 
 				BamReader *manager);
 
-  static TypedWriteable *make_PartGroup(const FactoryParams &params);
+  static TypedWritable *make_PartGroup(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);
@@ -108,9 +108,9 @@ public:
 
 public:
   static void init_type() {
-    TypedWriteableReferenceCount::init_type();
+    TypedWritableReferenceCount::init_type();
     register_type(_type_handle, "PartGroup",
-		  TypedWriteableReferenceCount::get_class_type());
+		  TypedWritableReferenceCount::get_class_type());
   }
 
 private:

+ 3 - 3
panda/src/char/character.cxx

@@ -434,12 +434,12 @@ fillin(DatagramIterator& scan, BamReader* manager)
 ////////////////////////////////////////////////////////////////////
 //     Function: Character::complete_pointers
 //       Access: Public
-//  Description: Takes in a vector of pointers to TypedWriteable
+//  Description: Takes in a vector of pointers to TypedWritable
 //               objects that correspond to all the requests for 
 //               pointers that this object made to BamReader.
 ////////////////////////////////////////////////////////////////////
 int Character::
-complete_pointers(vector_typedWriteable &plist, BamReader* manager)
+complete_pointers(vector_typedWritable &plist, BamReader* manager)
 {
   int start = PartBundleNode::complete_pointers(plist, manager);
   _computed_vertices = DCAST(ComputedVertices, plist[start]);
@@ -459,7 +459,7 @@ complete_pointers(vector_typedWriteable &plist, BamReader* manager)
 //       Access: Protected
 //  Description: Factory method to generate a Character object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* Character::
+TypedWritable* Character::
 make_Character(const FactoryParams &params)
 {
   Character *me = new Character;

+ 2 - 2
panda/src/char/character.h

@@ -86,10 +86,10 @@ private:
 public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
-  virtual int complete_pointers(vector_typedWriteable &plist, 
+  virtual int complete_pointers(vector_typedWritable &plist, 
 				BamReader *manager);
 
-  static TypedWriteable *make_Character(const FactoryParams &params);
+  static TypedWritable *make_Character(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 5 - 5
panda/src/char/characterJoint.cxx

@@ -277,12 +277,12 @@ fillin(DatagramIterator& scan, BamReader* manager)
 ////////////////////////////////////////////////////////////////////
 //     Function: CharacterJoint::complete_pointers
 //       Access: Public
-//  Description: Takes in a vector of pointes to TypedWriteable
+//  Description: Takes in a vector of pointes to TypedWritable
 //               objects that correspond to all the requests for 
 //               pointers that this object made to BamReader.
 ////////////////////////////////////////////////////////////////////
 int CharacterJoint::
-complete_pointers(vector_typedWriteable &plist, BamReader* manager)
+complete_pointers(vector_typedWritable &plist, BamReader* manager)
 {
   int i;
   int start = MovingPartMatrix::complete_pointers(plist, manager);
@@ -291,7 +291,7 @@ complete_pointers(vector_typedWriteable &plist, BamReader* manager)
   
   for(i = start; i < mid; i++)
   {
-    if (plist[i] == TypedWriteable::Null)
+    if (plist[i] == TypedWritable::Null)
     {
       char_cat->warning() << get_name() 
 			  << " Ignoring null Net NodeRelation" << endl;
@@ -304,7 +304,7 @@ complete_pointers(vector_typedWriteable &plist, BamReader* manager)
 
   for(i = mid; i < end; i++)
   {
-    if (plist[i] == TypedWriteable::Null)
+    if (plist[i] == TypedWritable::Null)
     {
       char_cat->warning() << get_name() 
 			  << " Ignoring null Local NodeRelation" << endl;
@@ -323,7 +323,7 @@ complete_pointers(vector_typedWriteable &plist, BamReader* manager)
 //       Access: Protected
 //  Description: Factory method to generate a CharacterJoint object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* CharacterJoint::
+TypedWritable* CharacterJoint::
 make_CharacterJoint(const FactoryParams &params)
 {
   CharacterJoint *me = new CharacterJoint;

+ 2 - 2
panda/src/char/characterJoint.h

@@ -52,10 +52,10 @@ private:
 public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
-  virtual int complete_pointers(vector_typedWriteable &plist, 
+  virtual int complete_pointers(vector_typedWritable &plist, 
 				BamReader *manager);
 
-  static TypedWriteable *make_CharacterJoint(const FactoryParams &params);
+  static TypedWritable *make_CharacterJoint(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 1 - 1
panda/src/char/characterJointBundle.cxx

@@ -37,7 +37,7 @@ make_copy() const {
 //       Access: Protected
 //  Description: Factory method to generate a CharacterJointBundle object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* CharacterJointBundle::
+TypedWritable* CharacterJointBundle::
 make_CharacterJointBundle(const FactoryParams &params)
 {
   CharacterJointBundle *me = new CharacterJointBundle;

+ 1 - 1
panda/src/char/characterJointBundle.h

@@ -34,7 +34,7 @@ public:
 
   static void register_with_read_factory(void);
 
-  static TypedWriteable *make_CharacterJointBundle(const FactoryParams &params);
+  static TypedWritable *make_CharacterJointBundle(const FactoryParams &params);
 
 public:
   virtual TypeHandle get_type() const {

+ 1 - 1
panda/src/char/characterSlider.cxx

@@ -57,7 +57,7 @@ make_copy() const {
 //       Access: Protected
 //  Description: Factory method to generate a CharacterSlider object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* CharacterSlider::
+TypedWritable* CharacterSlider::
 make_CharacterSlider(const FactoryParams &params)
 {
   CharacterSlider *me = new CharacterSlider;

+ 1 - 1
panda/src/char/characterSlider.h

@@ -29,7 +29,7 @@ public:
 
   static void register_with_read_factory(void);
 
-  static TypedWriteable *make_CharacterSlider(const FactoryParams &params);
+  static TypedWritable *make_CharacterSlider(const FactoryParams &params);
 
 public:
   virtual TypeHandle get_type() const {

+ 1 - 1
panda/src/char/computedVertices.cxx

@@ -403,7 +403,7 @@ fillin(DatagramIterator& scan, BamReader* manager)
 //       Access: Protected
 //  Description: Factory method to generate a ComputedVertices object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* ComputedVertices::
+TypedWritable* ComputedVertices::
 make_ComputedVertices(const FactoryParams &params)
 {
   ComputedVertices *me = new ComputedVertices;

+ 5 - 5
panda/src/char/computedVertices.h

@@ -12,7 +12,7 @@
 #include "computedVerticesMorph.h"
 
 #include <vector_ushort.h>
-#include <typedWriteableReferenceCount.h>
+#include <typedWritableReferenceCount.h>
 
 class Character;
 class CharacterJoint;
@@ -24,7 +24,7 @@ class CharacterJoint;
 //               vertices animated into one or more joints, as well as
 //               morph vertices.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDA ComputedVertices : public TypedWriteableReferenceCount {
+class EXPCL_PANDA ComputedVertices : public TypedWritableReferenceCount {
 public:
   INLINE ComputedVertices();
 
@@ -73,7 +73,7 @@ public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  static TypedWriteable *make_ComputedVertices(const FactoryParams &params);
+  static TypedWritable *make_ComputedVertices(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);
@@ -87,9 +87,9 @@ public:
     return _type_handle;
   }
   static void init_type() {
-    TypedWriteableReferenceCount::init_type();
+    TypedWritableReferenceCount::init_type();
     register_type(_type_handle, "ComputedVertices",
-		  TypedWriteableReferenceCount::get_class_type());
+		  TypedWritableReferenceCount::get_class_type());
   }
 
 private:

+ 2 - 2
panda/src/char/computedVerticesMorph.h

@@ -7,7 +7,7 @@
 #define COMPUTEDVERTICESMORPH_H
 
 #include <pandabase.h>
-#include <vector_typedWriteable.h>
+#include <vector_typedWritable.h>
 
 #include <luse.h>
 
@@ -16,7 +16,7 @@ class BamReader;
 class BamWriter;
 class Datagram;
 class DatagramIterator;
-class TypedWriteable;
+class TypedWritable;
 
 ////////////////////////////////////////////////////////////////////
 //       Class : ComputedVerticesMorphValue2

+ 4 - 4
panda/src/char/dynamicVertices.h

@@ -15,7 +15,7 @@
 #include <pta_Normalf.h>
 #include <pta_Colorf.h>
 #include <pta_TexCoordf.h>
-#include <typedWriteable.h>
+#include <typedWritable.h>
 
 class BamReader;
 
@@ -23,7 +23,7 @@ class BamReader;
 //       Class : DynamicVertices
 // Description :
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDA DynamicVertices : public TypedWriteable {
+class EXPCL_PANDA DynamicVertices : public TypedWritable {
 public:
   DynamicVertices();
   DynamicVertices(const DynamicVertices &copy);
@@ -47,9 +47,9 @@ public:
     return _type_handle;
   }
   static void init_type() {
-    TypedWriteable::init_type();
+    TypedWritable::init_type();
     register_type(_type_handle, "DynamicVertices",
-		  TypedWriteable::get_class_type());
+		  TypedWritable::get_class_type());
   }
 
 private:

+ 3 - 3
panda/src/collide/collisionNode.cxx

@@ -230,12 +230,12 @@ fillin(DatagramIterator& scan, BamReader* manager)
 ////////////////////////////////////////////////////////////////////
 //     Function: CollisionNode::complete_pointers
 //       Access: Public
-//  Description: Takes in a vector of pointes to TypedWriteable
+//  Description: Takes in a vector of pointes to TypedWritable
 //               objects that correspond to all the requests for 
 //               pointers that this object made to BamReader.
 ////////////////////////////////////////////////////////////////////
 int CollisionNode::
-complete_pointers(vector_typedWriteable &plist, BamReader* manager) {
+complete_pointers(vector_typedWritable &plist, BamReader* manager) {
   int num_solids = _solids.size();
   int start = NamedNode::complete_pointers(plist, manager);
 
@@ -251,7 +251,7 @@ complete_pointers(vector_typedWriteable &plist, BamReader* manager) {
 //       Access: Protected
 //  Description: Factory method to generate a CollisionNode object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* CollisionNode::
+TypedWritable* CollisionNode::
 make_CollisionNode(const FactoryParams &params)
 {
   CollisionNode *me = new CollisionNode;

+ 2 - 2
panda/src/collide/collisionNode.h

@@ -65,10 +65,10 @@ private:
 public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
-  virtual int complete_pointers(vector_typedWriteable &plist, 
+  virtual int complete_pointers(vector_typedWritable &plist, 
 				BamReader *manager);
 
-  static TypedWriteable *make_CollisionNode(const FactoryParams &params);
+  static TypedWritable *make_CollisionNode(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 1 - 1
panda/src/collide/collisionPlane.cxx

@@ -281,7 +281,7 @@ fillin(DatagramIterator& scan, BamReader* manager)
 //       Access: Protected
 //  Description: Factory method to generate a CollisionPlane object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* CollisionPlane::
+TypedWritable* CollisionPlane::
 make_CollisionPlane(const FactoryParams &params)
 {
   CollisionPlane *me = new CollisionPlane;

+ 1 - 1
panda/src/collide/collisionPlane.h

@@ -65,7 +65,7 @@ public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  static TypedWriteable *make_CollisionPlane(const FactoryParams &params);
+  static TypedWritable *make_CollisionPlane(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 1 - 1
panda/src/collide/collisionPolygon.cxx

@@ -769,7 +769,7 @@ fillin(DatagramIterator& scan, BamReader* manager)
 //       Access: Protected
 //  Description: Factory method to generate a CollisionPolygon object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* CollisionPolygon::
+TypedWritable* CollisionPolygon::
 make_CollisionPolygon(const FactoryParams &params)
 {
   CollisionPolygon *me = new CollisionPolygon;

+ 1 - 1
panda/src/collide/collisionPolygon.h

@@ -86,7 +86,7 @@ public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  static TypedWriteable *make_CollisionPolygon(const FactoryParams &params);
+  static TypedWritable *make_CollisionPolygon(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 4 - 4
panda/src/collide/collisionSolid.h

@@ -8,7 +8,7 @@
 
 #include <pandabase.h>
 
-#include <typedWriteableReferenceCount.h>
+#include <typedWritableReferenceCount.h>
 #include <boundedObject.h>
 #include <luse.h>
 #include <nodeRelation.h>
@@ -37,7 +37,7 @@ class CollisionNode;
 //               intersection tests that we care about.
 ////////////////////////////////////////////////////////////////////
 class EXPCL_PANDA CollisionSolid : 
-  public TypedWriteableReferenceCount, public BoundedObject {
+  public TypedWritableReferenceCount, public BoundedObject {
 public:
   CollisionSolid();
   CollisionSolid(const CollisionSolid &copy);
@@ -105,10 +105,10 @@ public:
     return _type_handle;
   }
   static void init_type() {
-    TypedWriteableReferenceCount::init_type();
+    TypedWritableReferenceCount::init_type();
     BoundedObject::init_type();
     register_type(_type_handle, "CollisionSolid",
-		  TypedWriteableReferenceCount::get_class_type(),
+		  TypedWritableReferenceCount::get_class_type(),
 		  BoundedObject::get_class_type());
   }
   virtual TypeHandle get_type() const {

+ 1 - 1
panda/src/collide/collisionSphere.cxx

@@ -367,7 +367,7 @@ write_datagram(BamWriter *manager, Datagram &me) {
 //       Access: Protected
 //  Description: Factory method to generate a CollisionSphere object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable *CollisionSphere::
+TypedWritable *CollisionSphere::
 make_CollisionSphere(const FactoryParams &params) {
   CollisionSphere *me = new CollisionSphere;
   DatagramIterator scan;

+ 1 - 1
panda/src/collide/collisionSphere.h

@@ -70,7 +70,7 @@ public:
   virtual void write_datagram(BamWriter *manager, Datagram &me);  
 
 protected:
-  static TypedWriteable *make_CollisionSphere(const FactoryParams &params);
+  static TypedWritable *make_CollisionSphere(const FactoryParams &params);
   void fillin(DatagramIterator &scan, BamReader *manager);
 
 public:

+ 1 - 1
panda/src/cull/geomBinTransition.cxx

@@ -112,7 +112,7 @@ write_datagram(BamWriter *manager, Datagram &me) {
 //       Access: Public
 //  Description: Factory method to generate a GeomBinTransition object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable *GeomBinTransition::
+TypedWritable *GeomBinTransition::
 make_GeomBinTransition(const FactoryParams &params) {
   GeomBinTransition *me = new GeomBinTransition;
   DatagramIterator scan;

+ 1 - 1
panda/src/cull/geomBinTransition.h

@@ -42,7 +42,7 @@ public:
   static void register_with_read_factory();
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  static TypedWriteable *make_GeomBinTransition(const FactoryParams &params);
+  static TypedWritable *make_GeomBinTransition(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 2 - 0
panda/src/display/graphicsWindow.cxx

@@ -125,6 +125,7 @@ TypeHandle GraphicsWindow::WindowPipe::force_init_type(void) {
 ////////////////////////////////////////////////////////////////////
 GraphicsWindow::
 GraphicsWindow(GraphicsPipe *pipe) : Configurable() {
+  MemoryUsage::update_type(this, this);
   _pipe = pipe;
 
   _draw_callback = NULL;
@@ -141,6 +142,7 @@ GraphicsWindow(GraphicsPipe *pipe) : Configurable() {
 GraphicsWindow::
 GraphicsWindow(GraphicsPipe *pipe,
 	       const GraphicsWindow::Properties& props) : Configurable() {
+  MemoryUsage::update_type(this, this);
   _pipe = pipe;
   _props = props;
 

+ 2 - 2
panda/src/downloader/downloader.cxx

@@ -501,7 +501,7 @@ run(void) {
   // Attempt to receive the bytes from the socket
   int fret;
   // Handle the case of a fast connection
-  if (_receive_size > MAX_RECEIVE_BYTES) {
+  if (_receive_size > (ulong)MAX_RECEIVE_BYTES) {
     int repeat = (int)(_receive_size / MAX_RECEIVE_BYTES);
     int remain = (int)fmod((double)_receive_size, (double)MAX_RECEIVE_BYTES);
     if (downloader_cat.is_debug())
@@ -621,7 +621,7 @@ run_to_ram(void) {
   // Attempt to receive the bytes from the socket
   int fret;
   // Handle the case of a fast connection
-  if (_receive_size > MAX_RECEIVE_BYTES) {
+  if (_receive_size > (ulong)MAX_RECEIVE_BYTES) {
     int repeat = (int)(_receive_size / MAX_RECEIVE_BYTES);
     int remain = (int)fmod((double)_receive_size, (double)MAX_RECEIVE_BYTES);
     if (downloader_cat.is_debug())

+ 3 - 3
panda/src/effects/lensFlareNode.cxx

@@ -492,12 +492,12 @@ fillin(DatagramIterator &scan, BamReader *manager)
 ////////////////////////////////////////////////////////////////////
 //     Function: LensFlareNode::complete_pointers
 //       Access: Public
-//  Description: Takes in a vector of pointes to TypedWriteable
+//  Description: Takes in a vector of pointes to TypedWritable
 //               objects that correspond to all the requests for 
 //               pointers that this object made to BamReader.
 ////////////////////////////////////////////////////////////////////
 int LensFlareNode::
-complete_pointers(vector_typedWriteable &plist, BamReader *manager)
+complete_pointers(vector_typedWritable &plist, BamReader *manager)
 {
   int i;
   int start = Node::complete_pointers(plist, manager);
@@ -529,7 +529,7 @@ complete_pointers(vector_typedWriteable &plist, BamReader *manager)
 //               the Bam file.  It should create the LensFlareNode and
 //               extract its information from the file.
 ////////////////////////////////////////////////////////////////////
-TypedWriteable *LensFlareNode::
+TypedWritable *LensFlareNode::
 make_LensFlareNode(const FactoryParams &params) {
   LensFlareNode *me = new LensFlareNode;
   DatagramIterator scan;

+ 2 - 2
panda/src/effects/lensFlareNode.h

@@ -92,10 +92,10 @@ private:
 public:
   static void register_with_read_factory();
   virtual void write_datagram(BamWriter *manager, Datagram &me);  
-  virtual int complete_pointers(vector_typedWriteable &plist, 
+  virtual int complete_pointers(vector_typedWritable &plist, 
 				BamReader *manager);
 
-  static TypedWriteable *make_LensFlareNode(const FactoryParams &params);
+  static TypedWritable *make_LensFlareNode(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator &scan, BamReader *manager);

+ 21 - 0
panda/src/express/config_express.cxx

@@ -47,6 +47,27 @@ get_leak_memory() {
   return leak_memory;
 }
 
+// never-destruct is similar to leak-memory, above, except that not
+// only will memory not be freed, but the destructor will not even be
+// called (on ReferenceCount objects, at least).  This will leak gobs
+// of memory, but ensures that every pointer to a ReferenceCount
+// object will always be valid, and may be useful for tracking down
+// certain kinds of errors.
+
+// never-destruct is only respected if leak-memory, above, is true.
+bool
+get_never_destruct() {
+  static bool got_never_destruct = false;
+  static bool never_destruct;
+
+  if (!got_never_destruct) {
+    never_destruct = config_express.GetBool("never-destruct", false);
+    got_never_destruct = true;
+  }
+  
+  return never_destruct;
+}
+
 //const bool track_memory_usage = config_express.GetBool("track-memory-usage", false);
 
 // Set this to false to avoid using the high-precision clock, even if

+ 1 - 0
panda/src/express/config_express.h

@@ -21,6 +21,7 @@ NotifyCategoryDecl(express, EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS);
 //extern EXPCL_PANDAEXPRESS const bool track_memory_usage;
 
 bool EXPCL_PANDAEXPRESS get_leak_memory();
+bool EXPCL_PANDAEXPRESS get_never_destruct();
 bool EXPCL_PANDAEXPRESS get_use_high_res_clock();
 
 extern const int patchfile_window_size;

+ 23 - 0
panda/src/express/memoryUsage.I

@@ -20,6 +20,10 @@ INLINE void MemoryUsage::
 update_type(ReferenceCount *, TypeHandle) {
 }
 
+INLINE void MemoryUsage::
+update_type(ReferenceCount *, TypedObject *) {
+}
+
 INLINE void MemoryUsage::
 remove_pointer(ReferenceCount *) {
 }
@@ -60,12 +64,31 @@ record_pointer(ReferenceCount *ptr) {
 //     Function: MemoryUsage::update_type
 //       Access: Public, Static
 //  Description: Associates the indicated type with the given pointer.
+//               This should be called by functions (e.g. the
+//               constructor) that know more specifically what type of
+//               thing we've got; otherwise, the MemoryUsage database
+//               will know only that it's a "ReferenceCount".
 ////////////////////////////////////////////////////////////////////
 INLINE void MemoryUsage::
 update_type(ReferenceCount *ptr, TypeHandle type) {
   get_global_ptr()->ns_update_type(ptr, type);
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: MemoryUsage::update_type
+//       Access: Public, Static
+//  Description: Associates the indicated type with the given pointer.
+//               This flavor of update_type() also passes in the
+//               pointer as a TypedObject, and useful for objects that
+//               are, in fact, TypedObjects.  Once the MemoryUsage
+//               database has the pointer as a TypedObject it doesn't
+//               need any more help.
+////////////////////////////////////////////////////////////////////
+INLINE void MemoryUsage::
+update_type(ReferenceCount *ptr, TypedObject *typed_ptr) {
+  get_global_ptr()->ns_update_type(ptr, typed_ptr);
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: MemoryUsage::remove_pointer
 //       Access: Public, Static

+ 82 - 10
panda/src/express/memoryUsage.cxx

@@ -68,13 +68,23 @@ void MemoryUsage::MemoryInfo::
 determine_dynamic_type() {
   if (_reconsider_dynamic_type && _static_type != TypeHandle::none()) {
     // See if we know enough now to infer the dynamic type from the
-    // pointer.  We can do this only if our static type is known to
-    // inherit from TypedReferenceCount--see the comments about this
-    // sort of thing in MemoryUsagePointers::get_typed_pointer().
+    // pointer.
+
+    if (_typed_ptr == (TypedObject *)NULL) {
+      // If our static type is known to inherit from
+      // TypedReferenceCount, then we can directly downcast to get the
+      // TypedObject pointer.
+      if (_static_type.is_derived_from(TypedReferenceCount::get_class_type())) {
+	_typed_ptr = (TypedReferenceCount *)_ptr;
+      }
+    }
 
-    if (_static_type.is_derived_from(TypedReferenceCount::get_class_type())) {
-      TypedReferenceCount *typed_ref = (TypedReferenceCount *)_ptr;
-      TypeHandle got_type = typed_ref->get_type();
+    if (_typed_ptr != (TypedObject *)NULL) {
+      // If we have a TypedObject pointer, we can determine the type.
+      // This might still not return the exact type, particularly if
+      // we are being called within the destructor or constructor of
+      // this object.
+      TypeHandle got_type = _typed_ptr->get_type();
       
       if (got_type == TypeHandle::none()) {
 	express_cat.warning()
@@ -270,12 +280,31 @@ record_pointer(ReferenceCount *ptr) {
 //     Function: MemoryUsage::update_type
 //       Access: Public, Static
 //  Description: Associates the indicated type with the given pointer.
+//               This should be called by functions (e.g. the
+//               constructor) that know more specifically what type of
+//               thing we've got; otherwise, the MemoryUsage database
+//               will know only that it's a "ReferenceCount".
 ////////////////////////////////////////////////////////////////////
 void MemoryUsage::
 update_type(ReferenceCount *ptr, TypeHandle type) {
   get_global_ptr()->ns_update_type(ptr, type);
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: MemoryUsage::update_type
+//       Access: Public, Static
+//  Description: Associates the indicated type with the given pointer.
+//               This flavor of update_type() also passes in the
+//               pointer as a TypedObject, and useful for objects that
+//               are, in fact, TypedObjects.  Once the MemoryUsage
+//               database has the pointer as a TypedObject it doesn't
+//               need any more help.
+////////////////////////////////////////////////////////////////////
+void MemoryUsage::
+update_type(ReferenceCount *ptr, TypedObject *typed_ptr) {
+  get_global_ptr()->ns_update_type(ptr, typed_ptr);
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: MemoryUsage::remove_pointer
 //       Access: Public, Static
@@ -332,6 +361,7 @@ ns_record_pointer(ReferenceCount *ptr) {
   if (_track_memory_usage) {
     MemoryInfo info;
     info._ptr = ptr;
+    info._typed_ptr = (TypedObject *)NULL;
     info._static_type = ReferenceCount::get_class_type();
     info._dynamic_type = ReferenceCount::get_class_type();
     info._time = TrueClock::get_ptr()->get_real_time();
@@ -354,6 +384,10 @@ ns_record_pointer(ReferenceCount *ptr) {
 //     Function: MemoryUsage::ns_update_type
 //       Access: Private
 //  Description: Associates the indicated type with the given pointer.
+//               This should be called by functions (e.g. the
+//               constructor) that know more specifically what type of
+//               thing we've got; otherwise, the MemoryUsage database
+//               will know only that it's a "ReferenceCount".
 ////////////////////////////////////////////////////////////////////
 void MemoryUsage::
 ns_update_type(ReferenceCount *ptr, TypeHandle type) {
@@ -373,6 +407,35 @@ ns_update_type(ReferenceCount *ptr, TypeHandle type) {
   }
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: MemoryUsage::ns_update_type
+//       Access: Private
+//  Description: Associates the indicated type with the given pointer.
+//               This flavor of update_type() also passes in the
+//               pointer as a TypedObject, and useful for objects that
+//               are, in fact, TypedObjects.  Once the MemoryUsage
+//               database has the pointer as a TypedObject it doesn't
+//               need any more help.
+////////////////////////////////////////////////////////////////////
+void MemoryUsage::
+ns_update_type(ReferenceCount *ptr, TypedObject *typed_ptr) {
+  if (_track_memory_usage) {
+    Table::iterator ti;
+    ti = _table.find(ptr);
+    if (ti == _table.end()) {
+      express_cat.error() 
+	<< "Attempt to update type to " << typed_ptr->get_type()
+	<< " for unrecorded pointer "
+	<< (void *)ptr << "!\n";
+      return;
+    }
+
+    MemoryInfo &info = (*ti).second;
+    info._typed_ptr = typed_ptr;
+    info.determine_dynamic_type();
+  }
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: MemoryUsage::ns_remove_pointer
 //       Access: Private
@@ -394,6 +457,12 @@ ns_remove_pointer(ReferenceCount *ptr) {
     }
 
     MemoryInfo &info = (*ti).second;
+
+    // Since the pointer has been destructed, we can't safely call its
+    // TypedObject virtual methods any more.  Better clear out the
+    // typed_ptr for good measure.
+    info._typed_ptr = (TypedObject *)NULL;
+
     if (info._freeze_index == _freeze_index) {
       double now = TrueClock::get_ptr()->get_real_time();
       _count--;
@@ -432,7 +501,8 @@ ns_get_pointers(MemoryUsagePointers &result) {
   for (ti = _table.begin(); ti != _table.end(); ++ti) {
     MemoryInfo &info = (*ti).second;
     if (info._freeze_index == _freeze_index) {
-      result.add_entry((*ti).first, info.get_type(), now - info._time);
+      result.add_entry(info._ptr, info._typed_ptr, info.get_type(), 
+		       now - info._time);
     }
   }
 }
@@ -457,7 +527,8 @@ ns_get_pointers_of_type(MemoryUsagePointers &result, TypeHandle type) {
       TypeHandle info_type = info.get_type();
       if (info_type != TypeHandle::none() &&
 	  info_type.is_derived_from(type)) {
-	result.add_entry((*ti).first, info_type, now - info._time);
+	result.add_entry(info._ptr, info._typed_ptr, info_type,
+			 now - info._time);
       }
     }
   }
@@ -484,7 +555,7 @@ ns_get_pointers_of_age(MemoryUsagePointers &result,
       double age = now - info._time;
       if ((age >= from && age <= to) || 
 	  (age >= to && age <= from)) {
-	result.add_entry((*ti).first, info.get_type(), age);
+	result.add_entry(info._ptr, info._typed_ptr, info.get_type(), age);
       }
     }
   }
@@ -525,7 +596,8 @@ ns_get_pointers_with_zero_count(MemoryUsagePointers &result) {
     if (info._freeze_index == _freeze_index) {
       if ((*ti).first->get_ref_count() == 0) {
 	(*ti).first->ref();
-	result.add_entry((*ti).first, info.get_type(), now - info._time);
+	result.add_entry(info._ptr, info._typed_ptr, info.get_type(),
+			 now - info._time);
       }
     }
   }

+ 4 - 0
panda/src/express/memoryUsage.h

@@ -40,10 +40,12 @@ PUBLISHED:
   // mode, these functions do nothing anyway).
   static void record_pointer(ReferenceCount *ptr);
   static void update_type(ReferenceCount *ptr, TypeHandle type);
+  static void update_type(ReferenceCount *ptr, TypedObject *typed_ptr);
   static void remove_pointer(ReferenceCount *ptr);
 #else // __GNUC__ && !NDEBUG
   INLINE static void record_pointer(ReferenceCount *ptr);
   INLINE static void update_type(ReferenceCount *ptr, TypeHandle type);
+  INLINE static void update_type(ReferenceCount *ptr, TypedObject *typed_ptr);
   INLINE static void remove_pointer(ReferenceCount *ptr);
 #endif // __GNUC__ && !NDEBUG
 
@@ -69,6 +71,7 @@ private:
   
   void ns_record_pointer(ReferenceCount *ptr);
   void ns_update_type(ReferenceCount *ptr, TypeHandle type);
+  void ns_update_type(ReferenceCount *ptr, TypedObject *typed_ptr);
   void ns_remove_pointer(ReferenceCount *ptr);
 
   int ns_get_num_pointers();
@@ -94,6 +97,7 @@ private:
     void update_type_handle(TypeHandle &destination, TypeHandle refined);
 
     ReferenceCount *_ptr;
+    TypedObject *_typed_ptr;
     TypeHandle _static_type;
     TypeHandle _dynamic_type;
     

+ 13 - 5
panda/src/express/memoryUsagePointers.I

@@ -8,9 +8,11 @@
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-MemoryUsagePointers::Entry::
-Entry(ReferenceCount *ptr, TypeHandle type, double age) :
+INLINE MemoryUsagePointers::Entry::
+Entry(ReferenceCount *ptr, TypedObject *typed_ptr,
+      TypeHandle type, double age) :
   _ptr(ptr),
+  _typed_ptr(typed_ptr),
   _type(type),
   _age(age)
 {
@@ -22,9 +24,10 @@ Entry(ReferenceCount *ptr, TypeHandle type, double age) :
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-MemoryUsagePointers::Entry::
+INLINE MemoryUsagePointers::Entry::
 Entry(const Entry &copy) :
   _ptr(copy._ptr),
+  _typed_ptr(copy._typed_ptr),
   _type(copy._type),
   _age(copy._age)
 {
@@ -36,13 +39,16 @@ Entry(const Entry &copy) :
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-void MemoryUsagePointers::Entry::
+INLINE void MemoryUsagePointers::Entry::
 operator = (const Entry &copy) {
   if (_ptr != copy._ptr) {
     _ptr->unref();
     _ptr = copy._ptr;
+    // We can't call unref_delete(), because we don't know what kind
+    // of pointer it is precisely.  Potential leak.
     _ptr->ref();
   }
+  _typed_ptr = copy._typed_ptr;
   _type = copy._type;
   _age = copy._age;
 }
@@ -52,8 +58,10 @@ operator = (const Entry &copy) {
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-MemoryUsagePointers::Entry::
+INLINE MemoryUsagePointers::Entry::
 ~Entry() {
+  // We can't call unref_delete(), because we don't know what kind
+  // of pointer it is precisely.  Potential leak.
   _ptr->unref();
 }
 

+ 9 - 2
panda/src/express/memoryUsagePointers.cxx

@@ -63,6 +63,12 @@ get_pointer(int n) const {
 TypedObject *MemoryUsagePointers::
 get_typed_pointer(int n) const {
   nassertr(n >= 0 && n < get_num_pointers(), NULL);
+  TypedObject *typed_ptr = _entries[n]._typed_ptr;
+
+  if (typed_ptr != (TypedObject *)NULL) {
+    return typed_ptr;
+  }
+
   ReferenceCount *ptr = _entries[n]._ptr;
 
   TypeHandle type = _entries[n]._type;
@@ -141,12 +147,13 @@ clear() {
 //               only by MemoryUsage.
 ////////////////////////////////////////////////////////////////////
 void MemoryUsagePointers::
-add_entry(ReferenceCount *ptr, TypeHandle type, double age) {
+add_entry(ReferenceCount *ptr, TypedObject *typed_ptr, 
+	  TypeHandle type, double age) {
   // We can't safly add pointers with a zero reference count.  They
   // might be statically-allocated or something, and if we try to add
   // them they'll try to destruct when the PointerTo later goes away.
   if (ptr->get_ref_count() != 0) {
-    _entries.push_back(Entry(ptr, type, age));
+    _entries.push_back(Entry(ptr, typed_ptr, type, age));
   }
 }
 

+ 6 - 3
panda/src/express/memoryUsagePointers.h

@@ -19,7 +19,7 @@
 // 	 Class : MemoryUsagePointers
 // Description : This is a list of pointers returned by a MemoryUsage
 //               object in response to some query.  
-
+//
 //               Warning: once pointers are stored in a
 //               MemoryUsagePointers object, they are
 //               reference-counted, and will not be freed until the
@@ -51,11 +51,13 @@ PUBLISHED:
   void clear();
 
 private:
-  void add_entry(ReferenceCount *ptr, TypeHandle type, double age);
+  void add_entry(ReferenceCount *ptr, TypedObject *typed_ptr,
+		 TypeHandle type, double age);
 
   class Entry {
   public:
-    INLINE Entry(ReferenceCount *ptr, TypeHandle type, double age);
+    INLINE Entry(ReferenceCount *ptr, TypedObject *typed_ptr,
+		 TypeHandle type, double age);
     INLINE Entry(const Entry &copy);
     INLINE void operator = (const Entry &copy);
     INLINE ~Entry();
@@ -66,6 +68,7 @@ private:
     // delete it, we can't make a PointerTo it, since PointerTo wants
     // to be able to delete things.
     ReferenceCount *_ptr;
+    TypedObject *_typed_ptr;
     TypeHandle _type;
     double _age;
   };

+ 7 - 2
panda/src/express/referenceCount.I

@@ -295,7 +295,12 @@ unref_delete(RefCountType *ptr) {
       // although we do call the destructor explicitly.  This has
       // exactly the same effect as deleting it, without actually
       // freeing up the memory it uses.
-      ptr->~RefCountType();
+
+      if (!get_never_destruct()) {
+	// Furthermore, if we have never-destruct set, we don't even
+	// call the destructor.
+	ptr->~RefCountType();
+      }
       return;
     }
 #endif
@@ -390,7 +395,7 @@ RefCountObj(const Base &copy) : Base(copy) {
 template<class Base>
 void RefCountObj<Base>::
 init_type() {
-#ifdef RTTI
+#ifdef HAVE_RTTI
   // If we have RTTI, we can determine the name of the base type.
   string base_name = typeid(Base).name();
 #else

+ 1 - 1
panda/src/express/reversedNumericData.cxx

@@ -14,7 +14,7 @@
 ////////////////////////////////////////////////////////////////////
 void ReversedNumericData::
 reverse_assign(const char *source, size_t length) {
-  nassertv(length <= max_numeric_size);
+  nassertv((int)length <= max_numeric_size);
   for (size_t i = 0; i < length; i++) {
     _data[i] = source[length - 1 - i];
   }

+ 23 - 0
panda/src/express/typeHandle.cxx

@@ -225,6 +225,29 @@ record_derivation(TypeHandle child, TypeHandle parent) {
   }
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: TypeRegistry::record_alternate_name
+//       Access: Public
+//  Description: Indicates an alternate name for the same type.  This
+//               is particularly useful when a type has changed names,
+//               since the type is stored in a Bam file by name;
+//               setting the original name as the alternate will allow
+//               the type to be correctly read from old Bam files.
+////////////////////////////////////////////////////////////////////
+void TypeRegistry::
+record_alternate_name(TypeHandle type, const string &name) {
+  RegistryNode *rnode = look_up(type, (TypedObject *)NULL);
+  if (rnode != (RegistryNode *)NULL) {
+    NameRegistry::iterator ri = 
+      _name_registry.insert(NameRegistry::value_type(name, rnode)).first;
+    if ((*ri).second != rnode) {
+      express_cat.warning()
+	<< "Name " << name << " already assigned to TypeHandle "
+	<< rnode->_name << "; cannot reassign to " << type << "\n";
+    }
+  }
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: TypeRegistry::find_type
 //       Access: Public

+ 1 - 0
panda/src/express/typeHandle.h

@@ -153,6 +153,7 @@ public:
   TypeHandle register_dynamic_type(const string &name);
 
   void record_derivation(TypeHandle child, TypeHandle parent);
+  void record_alternate_name(TypeHandle type, const string &name);
 
 PUBLISHED:
   TypeHandle find_type(const string &name) const;

+ 2 - 2
panda/src/express/typedReferenceCount.I

@@ -11,7 +11,7 @@
 ////////////////////////////////////////////////////////////////////
 INLINE TypedReferenceCount::
 TypedReferenceCount() { 
-  MemoryUsage::update_type(this, TypedReferenceCount::get_class_type());
+  MemoryUsage::update_type(this, this);
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -24,7 +24,7 @@ TypedReferenceCount(const TypedReferenceCount &copy) :
   TypedObject(copy), 
   ReferenceCount(copy) 
 {
-  MemoryUsage::update_type(this, TypedReferenceCount::get_class_type());
+  MemoryUsage::update_type(this, this);
 }
 
 ////////////////////////////////////////////////////////////////////

+ 2 - 0
panda/src/glgsg/glGraphicsStateGuardian.cxx

@@ -3861,9 +3861,11 @@ get_fog_mode_type(Fog::Mode m) const {
     case Fog::M_linear: return GL_LINEAR;
     case Fog::M_exponential: return GL_EXP;
     case Fog::M_exponential_squared: return GL_EXP2;
+      /*
 #ifdef GL_FOG_FUNC_SGIS
     case Fog::M_spline: return GL_FOG_FUNC_SGIS;
 #endif
+      */
 
   default:
     glgsg_cat.error() << "Invalid Fog::Mode value" << endl;

+ 7 - 5
panda/src/gobj/drawable.h

@@ -10,7 +10,7 @@
 ////////////////////////////////////////////////////////////////////
 #include <pandabase.h>
 
-#include <writeableConfigurable.h>
+#include <writableConfigurable.h>
 #include <referenceCount.h>
 #include <boundedObject.h>
 
@@ -32,11 +32,13 @@ class BamWriter;
 //		 the stupid bastards who wrote X didn't add a prefix
 //		 to their variable names
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDA dDrawable : public ReferenceCount, public WriteableConfigurable,
+class EXPCL_PANDA dDrawable : public ReferenceCount, public WritableConfigurable,
 		  public BoundedObject {
 public:
 
-  dDrawable() : WriteableConfigurable() { }
+  dDrawable() : WritableConfigurable() { 
+    MemoryUsage::update_type(this, this);
+  }
   virtual ~dDrawable() { }
 
   virtual void draw(GraphicsStateGuardianBase *) { if (is_dirty()) config(); }
@@ -58,11 +60,11 @@ PUBLISHED:
 public:
   static void init_type() {
     ReferenceCount::init_type();
-    WriteableConfigurable::init_type();
+    WritableConfigurable::init_type();
     BoundedObject::init_type();
     register_type(_type_handle, "dDrawable",
 		  ReferenceCount::get_class_type(),
-		  WriteableConfigurable::get_class_type(),
+		  WritableConfigurable::get_class_type(),
 		  BoundedObject::get_class_type());
   }
   virtual TypeHandle get_type() const {

+ 2 - 2
panda/src/gobj/geom.cxx

@@ -350,7 +350,7 @@ get_tris() const {
 ////////////////////////////////////////////////////////////////////
 void Geom::
 config(void) {
-  WriteableConfigurable::config();
+  WritableConfigurable::config();
 
   // Only per vertex binding makes any sense
   if (_coords != (Vertexf*)0L && _bind[G_COORD] != G_OFF) {
@@ -441,7 +441,7 @@ init(void) {
   _get_texcoord = get_texcoord_noop;
   _get_color = get_color_noop;
   
-  WriteableConfigurable::config();
+  WritableConfigurable::config();
 }
 
 ////////////////////////////////////////////////////////////////////

+ 2 - 2
panda/src/gobj/geom.h

@@ -12,7 +12,7 @@
 
 #include "drawable.h"
 
-#include <vector_typedWriteable.h>
+#include <vector_typedWritable.h>
 #include <pointerTo.h>
 #include <pointerToArray.h>
 #include <typedef.h>
@@ -236,7 +236,7 @@ public:
   //static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  //static TypedWriteable *make_Generic(const FactoryParams &params);
+  //static TypedWritable *make_Generic(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 1 - 1
panda/src/gobj/geomLine.cxx

@@ -57,7 +57,7 @@ write_datagram(BamWriter *manager, Datagram &me)
 //       Access: Protected
 //  Description: Factory method to generate a GeomLine object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* GeomLine::
+TypedWritable* GeomLine::
 make_GeomLine(const FactoryParams &params) {
   GeomLine *me = new GeomLine;
   DatagramIterator scan;

+ 1 - 1
panda/src/gobj/geomLine.h

@@ -48,7 +48,7 @@ public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  static TypedWriteable *make_GeomLine(const FactoryParams &params);
+  static TypedWritable *make_GeomLine(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 1 - 1
panda/src/gobj/geomLinestrip.cxx

@@ -69,7 +69,7 @@ write_datagram(BamWriter *manager, Datagram &me) {
 //       Access: Protected
 //  Description: Factory method to generate a GeomLinestrip object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* GeomLinestrip::
+TypedWritable* GeomLinestrip::
 make_GeomLinestrip(const FactoryParams &params) {
   GeomLinestrip *me = new GeomLinestrip;
   DatagramIterator scan;

+ 1 - 1
panda/src/gobj/geomLinestrip.h

@@ -47,7 +47,7 @@ public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  static TypedWriteable *make_GeomLinestrip(const FactoryParams &params);
+  static TypedWritable *make_GeomLinestrip(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 1 - 1
panda/src/gobj/geomPoint.cxx

@@ -65,7 +65,7 @@ write_datagram(BamWriter *manager, Datagram &me) {
 //       Access: Protected
 //  Description: Factory method to generate a GeomPoint object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* GeomPoint::
+TypedWritable* GeomPoint::
 make_GeomPoint(const FactoryParams &params) {
   GeomPoint *me = new GeomPoint;
   DatagramIterator scan;

+ 1 - 1
panda/src/gobj/geomPoint.h

@@ -48,7 +48,7 @@ public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  static TypedWriteable *make_GeomPoint(const FactoryParams &params);
+  static TypedWritable *make_GeomPoint(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 1 - 1
panda/src/gobj/geomPolygon.cxx

@@ -53,7 +53,7 @@ draw_immediate(GraphicsStateGuardianBase *gsg) const {
 //       Access: Protected
 //  Description: Factory method to generate a GeomPolygon object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* GeomPolygon::
+TypedWritable* GeomPolygon::
 make_GeomPolygon(const FactoryParams &params) {
   GeomPolygon *me = new GeomPolygon;
   DatagramIterator scan;

+ 1 - 1
panda/src/gobj/geomPolygon.h

@@ -39,7 +39,7 @@ public:
 
 public:
   static void register_with_read_factory(void);
-  static TypedWriteable *make_GeomPolygon(const FactoryParams &params);
+  static TypedWritable *make_GeomPolygon(const FactoryParams &params);
 
 PUBLISHED:
   static TypeHandle get_class_type() {

+ 1 - 1
panda/src/gobj/geomQuad.cxx

@@ -104,7 +104,7 @@ get_tris() const {
 //       Access: Protected
 //  Description: Factory method to generate a GeomQuad object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* GeomQuad::
+TypedWritable* GeomQuad::
 make_GeomQuad(const FactoryParams &params) {
   GeomQuad *me = new GeomQuad;
   DatagramIterator scan;

+ 1 - 1
panda/src/gobj/geomQuad.h

@@ -37,7 +37,7 @@ public:
 
 public:
   static void register_with_read_factory(void);
-  static TypedWriteable *make_GeomQuad(const FactoryParams &params);
+  static TypedWritable *make_GeomQuad(const FactoryParams &params);
 
 PUBLISHED:
   static TypeHandle get_class_type() {

+ 1 - 1
panda/src/gobj/geomSphere.cxx

@@ -36,7 +36,7 @@ draw_immediate(GraphicsStateGuardianBase *gsg) const {
 //       Access: Protected
 //  Description: Factory method to generate a GeomSphere object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* GeomSphere::
+TypedWritable* GeomSphere::
 make_GeomSphere(const FactoryParams &params)
 {
   GeomSphere *me = new GeomSphere;

+ 1 - 1
panda/src/gobj/geomSphere.h

@@ -52,7 +52,7 @@ public:
 public:
   static void register_with_read_factory(void);
 
-  static TypedWriteable *make_GeomSphere(const FactoryParams &params);
+  static TypedWritable *make_GeomSphere(const FactoryParams &params);
 
 PUBLISHED:
   static TypeHandle get_class_type() {

+ 2 - 2
panda/src/gobj/geomSprite.cxx

@@ -88,7 +88,7 @@ write_datagram(BamWriter *manager, Datagram &me) {
 //       Access: Protected
 //  Description: Factory method to generate a GeomSprite object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* GeomSprite::
+TypedWritable* GeomSprite::
 make_GeomSprite(const FactoryParams &params) {
   GeomSprite *me = new GeomSprite;
   DatagramIterator scan;
@@ -136,7 +136,7 @@ register_with_read_factory(void) {
 //  Description: 
 ////////////////////////////////////////////////////////////////////
 int GeomSprite::
-complete_pointers(vector_typedWriteable &plist, BamReader *manager) {
+complete_pointers(vector_typedWritable &plist, BamReader *manager) {
   int index = Geom::complete_pointers(plist, manager);
   _texture = DCAST(Texture, plist[index]);
 

+ 2 - 2
panda/src/gobj/geomSprite.h

@@ -67,8 +67,8 @@ public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter *manager, Datagram &me);
 
-  int complete_pointers(vector_typedWriteable &plist, BamReader *manager);
-  static TypedWriteable *make_GeomSprite(const FactoryParams &params);
+  int complete_pointers(vector_typedWritable &plist, BamReader *manager);
+  static TypedWritable *make_GeomSprite(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator &scan, BamReader *manager);

+ 1 - 1
panda/src/gobj/geomTri.cxx

@@ -218,7 +218,7 @@ get_tris() const {
 //       Access: Protected
 //  Description: Factory method to generate a GeomTri object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* GeomTri::
+TypedWritable* GeomTri::
 make_GeomTri(const FactoryParams &params) {
   GeomTri *me = new GeomTri;
   DatagramIterator scan;

+ 1 - 1
panda/src/gobj/geomTri.h

@@ -37,7 +37,7 @@ public:
 
 public:
   static void register_with_read_factory(void);
-  static TypedWriteable *make_GeomTri(const FactoryParams &params);
+  static TypedWritable *make_GeomTri(const FactoryParams &params);
 
 PUBLISHED:
   static TypeHandle get_class_type() {

+ 1 - 1
panda/src/gobj/geomTrifan.cxx

@@ -382,7 +382,7 @@ get_tris() const {
 //       Access: Protected
 //  Description: Factory method to generate a GeomTrifan object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* GeomTrifan::
+TypedWritable* GeomTrifan::
 make_GeomTrifan(const FactoryParams &params) {
   GeomTrifan *me = new GeomTrifan;
   DatagramIterator scan;

+ 1 - 1
panda/src/gobj/geomTrifan.h

@@ -40,7 +40,7 @@ public:
 
 public:
   static void register_with_read_factory(void);
-  static TypedWriteable *make_GeomTrifan(const FactoryParams &params);
+  static TypedWritable *make_GeomTrifan(const FactoryParams &params);
 
 PUBLISHED:
   static TypeHandle get_class_type() {

+ 1 - 1
panda/src/gobj/geomTristrip.cxx

@@ -493,7 +493,7 @@ get_tris() const {
 //       Access: Protected
 //  Description: Factory method to generate a GeomTristrip object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* GeomTristrip::
+TypedWritable* GeomTristrip::
 make_GeomTristrip(const FactoryParams &params) {
   GeomTristrip *me = new GeomTristrip;
   DatagramIterator scan;

+ 1 - 1
panda/src/gobj/geomTristrip.h

@@ -39,7 +39,7 @@ public:
 
 public:
   static void register_with_read_factory(void);
-  static TypedWriteable *make_GeomTristrip(const FactoryParams &params);
+  static TypedWritable *make_GeomTristrip(const FactoryParams &params);
 
 PUBLISHED:
   static TypeHandle get_class_type() {

+ 1 - 1
panda/src/gobj/imageBuffer.h

@@ -37,7 +37,7 @@ PUBLISHED:
   virtual bool write( const string& name = "" ) const = 0;
   
 public:
-  virtual void config( void ) { WriteableConfigurable::config(); }
+  virtual void config( void ) { WritableConfigurable::config(); }
   
   virtual void copy(GraphicsStateGuardianBase *, const DisplayRegion *)=0;
   virtual void copy(GraphicsStateGuardianBase *, const DisplayRegion *,

+ 1 - 1
panda/src/gobj/material.cxx

@@ -154,7 +154,7 @@ write_datagram(BamWriter *manager, Datagram &me) {
 //       Access: Protected
 //  Description: Factory method to generate a Material object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable *Material::
+TypedWritable *Material::
 make_Material(const FactoryParams &params) {
   Material *me = new Material;
   DatagramIterator scan;

+ 5 - 5
panda/src/gobj/material.h

@@ -11,7 +11,7 @@
 ////////////////////////////////////////////////////////////////////
 #include <pandabase.h>
 
-#include <typedWriteableReferenceCount.h>
+#include <typedWritableReferenceCount.h>
 #include <luse.h>
 
 ////////////////////////////////////////////////////////////////////
@@ -20,7 +20,7 @@
 //               lighting.  A material is only necessary if lighting
 //               is to be enabled; otherwise, the material isn't used.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDA Material : public TypedWriteableReferenceCount {
+class EXPCL_PANDA Material : public TypedWritableReferenceCount {
 PUBLISHED:
   INLINE Material();
   INLINE Material(const Material &copy);
@@ -86,7 +86,7 @@ public:
   virtual void write_datagram(BamWriter *manager, Datagram &me);  
 
 protected:
-  static TypedWriteable *make_Material(const FactoryParams &params);
+  static TypedWritable *make_Material(const FactoryParams &params);
   void fillin(DatagramIterator &scan, BamReader *manager);
 
 public:
@@ -94,9 +94,9 @@ public:
     return _type_handle;
   }
   static void init_type() {
-    TypedWriteableReferenceCount::init_type();
+    TypedWritableReferenceCount::init_type();
     register_type(_type_handle, "Material",
-		  TypedWriteableReferenceCount::get_class_type());
+		  TypedWritableReferenceCount::get_class_type());
   }
   virtual TypeHandle get_type() const {
     return get_class_type();

+ 2 - 2
panda/src/gobj/texture.cxx

@@ -491,11 +491,11 @@ fillin(DatagramIterator &scan, BamReader *manager) {
 //       Access: Protected
 //  Description: Factory method to generate a Texture object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* Texture::
+TypedWritable* Texture::
 make_Texture(const FactoryParams &params)
 {
   //The process of making a texture is slightly
-  //different than making other Writeable objects.
+  //different than making other Writable objects.
   //That is because all creation of Textures should
   //be done through calls to TexturePool, which ensures
   //that any loads of the same Texture, refer to the

+ 1 - 1
panda/src/gobj/texture.h

@@ -106,7 +106,7 @@ public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  static TypedWriteable *make_Texture(const FactoryParams &params);
+  static TypedWritable *make_Texture(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 3 - 0
panda/src/graph/arcChain.I

@@ -14,6 +14,7 @@ INLINE_GRAPH ArcChain::ArcComponent::
 ArcComponent(Node *node) :
   _next(NULL)
 {
+  MemoryUsage::update_type(this, get_class_type());
   nassertv(node != (Node *)NULL);
   _p._node = node;
   _p._node->ref();
@@ -31,6 +32,7 @@ INLINE_GRAPH ArcChain::ArcComponent::
 ArcComponent(NodeRelation *arc, ArcComponent *next) :
   _next(next)
 {
+  MemoryUsage::update_type(this, get_class_type());
   nassertv(_next != (ArcComponent *)NULL);
   nassertv(arc != (NodeRelation *)NULL);
   _p._arc = arc;
@@ -47,6 +49,7 @@ INLINE_GRAPH ArcChain::ArcComponent::
 ArcComponent(const ArcComponent &copy) :
   _next(copy._next)
 {
+  MemoryUsage::update_type(this, get_class_type());
   if (has_arc()) {
     _p._arc = copy._p._arc;
     _p._arc->ref();

+ 3 - 0
panda/src/graph/arcChain.cxx

@@ -7,6 +7,9 @@
 #include "node.h"
 #include "namedNode.h"
 
+TypeHandle ArcChain::_type_handle;
+TypeHandle ArcChain::ArcComponent::_type_handle;
+
 ////////////////////////////////////////////////////////////////////
 //     Function: ArcChain::ArcComponent::Copy Assignment Operator
 //       Access: Public

+ 26 - 0
panda/src/graph/arcChain.h

@@ -14,6 +14,7 @@
 #include <pointerTo.h>
 #include <referenceCount.h>
 #include <notify.h>
+#include <typeHandle.h>
 
 ////////////////////////////////////////////////////////////////////
 //       Class : ArcChain
@@ -87,6 +88,19 @@ protected:
       Node *_node;
     } _p;
     PT(ArcComponent) _next;
+
+  public:
+    static TypeHandle get_class_type() {
+      return _type_handle;
+    }
+    static void init_type() {
+      ReferenceCount::init_type();
+      register_type(_type_handle, "ArcChain::ArcComponent",
+		    ReferenceCount::get_class_type());
+    }
+    
+  private:
+    static TypeHandle _type_handle;
   };
 
   PT(ArcComponent) _head;
@@ -135,6 +149,18 @@ public:
 private:
   void r_output(ostream &out, ArcComponent *comp) const;
   static int r_compare_to(const ArcComponent *a, const ArcComponent *v);
+
+public:
+  static TypeHandle get_class_type() {
+    return _type_handle;
+  }
+  static void init_type() {
+    ArcComponent::init_type();
+    register_type(_type_handle, "ArcChain");
+  }
+  
+private:
+  static TypeHandle _type_handle;
 };
 
 INLINE_GRAPH ostream &operator << (ostream &out, const ArcChain &arc_chain);

+ 5 - 1
panda/src/graph/config_graph.cxx

@@ -4,10 +4,12 @@
 ////////////////////////////////////////////////////////////////////
 
 #include "config_graph.h"
+#include "arcChain.h"
 #include "namedNode.h"
 #include "node.h"
 #include "nodeRelation.h"
 #include "nodeTransition.h"
+#include "nodeTransitionCache.h"
 #include "nodeAttribute.h"
 #include "onOffTransition.h"
 #include "onOffAttribute.h"
@@ -73,11 +75,13 @@ init_libgraph() {
   void init_last_graph_update();
   init_last_graph_update();
 
+  ArcChain::init_type();
   BoundedObject::init_type();
   NamedNode::init_type();
   Node::init_type();
   NodeRelation::init_type();
   NodeTransition::init_type();
+  NodeTransitionCache::init_type();
   NodeAttribute::init_type();
   OnOffTransition::init_type();
   OnOffAttribute::init_type();
@@ -92,5 +96,5 @@ init_libgraph() {
   //functions with BamReader's factory
   Node::register_with_read_factory();
   NamedNode::register_with_read_factory();
-  NodeRelation::register_with_read_factory();
+  NodeRelation::register_with_read_factory();  
 }

+ 1 - 1
panda/src/graph/namedNode.cxx

@@ -57,7 +57,7 @@ write_datagram(BamWriter *manager, Datagram &me)
 //       Access: Protected
 //  Description: Factory method to generate a node object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* NamedNode::
+TypedWritable* NamedNode::
 make_NamedNode(const FactoryParams &params)
 {
   NamedNode *me = new NamedNode;

+ 1 - 1
panda/src/graph/namedNode.h

@@ -29,7 +29,7 @@ public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
 
-  static TypedWriteable *make_NamedNode(const FactoryParams &params);
+  static TypedWritable *make_NamedNode(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);

+ 7 - 5
panda/src/graph/node.cxx

@@ -23,6 +23,7 @@ Node* const Node::Null = (Node*)0L;
 ////////////////////////////////////////////////////////////////////
 Node::
 Node() {
+  MemoryUsage::update_type(this, this);
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -36,10 +37,11 @@ Node() {
 ////////////////////////////////////////////////////////////////////
 Node::
 Node(const Node &copy) :
-  TypedWriteable(copy),
+  TypedWritable(copy),
   BoundedObject(copy),
   ReferenceCount(copy)
 {
+  MemoryUsage::update_type(this, this);
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -49,7 +51,7 @@ Node(const Node &copy) :
 ////////////////////////////////////////////////////////////////////
 void Node::
 operator = (const Node &copy) {
-  TypedWriteable::operator = (copy);
+  TypedWritable::operator = (copy);
   BoundedObject::operator = (copy);
   ReferenceCount::operator = (copy);
 }
@@ -453,12 +455,12 @@ write_datagram(BamWriter *manager, Datagram &me) {
 ////////////////////////////////////////////////////////////////////
 //     Function: Node::complete_pointers
 //       Access: Public
-//  Description: Takes in a vector of pointers to TypedWriteable
+//  Description: Takes in a vector of pointers to TypedWritable
 //               objects that correspond to all the requests for 
 //               pointers that this object made to BamReader.
 ////////////////////////////////////////////////////////////////////
 int Node::
-complete_pointers(vector_typedWriteable &plist, BamReader *manager) {
+complete_pointers(vector_typedWritable &plist, BamReader *manager) {
   if (manager->get_file_minor_ver() < 3) {
     // In bam versions before 3.3, this function does nothing (since
     // the arcs are completely responsible for adding themselves to
@@ -502,7 +504,7 @@ complete_pointers(vector_typedWriteable &plist, BamReader *manager) {
 //       Access: Protected
 //  Description: Factory method to generate a node object
 ////////////////////////////////////////////////////////////////////
-TypedWriteable* Node::
+TypedWritable* Node::
 make_Node(const FactoryParams &params) {
   Node *me = new Node;
   DatagramIterator scan;

+ 7 - 7
panda/src/graph/node.h

@@ -11,7 +11,7 @@
 #include "boundedObject.h"
 #include "nodeConnection.h"
 
-#include <typedWriteable.h>
+#include <typedWritable.h>
 #include <referenceCount.h>
 #include <luse.h>
 
@@ -34,9 +34,9 @@ static const int max_node_graphs = 2;
 //               be joined to any number of other nodes, as a parent
 //               or as a child, with any kind of relation arcs.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDA Node : public TypedWriteable, public BoundedObject,
+class EXPCL_PANDA Node : public TypedWritable, public BoundedObject,
 	     virtual public ReferenceCount {
-  // We can't simply inherit from TypedWriteableReferenceCount, because we need
+  // We can't simply inherit from TypedWritableReferenceCount, because we need
   // to inherit virtually from ReferenceCount.
 public:
   static Node* const Null;
@@ -110,10 +110,10 @@ protected:
 public:
   static void register_with_read_factory(void);
   virtual void write_datagram(BamWriter* manager, Datagram &me);  
-  virtual int complete_pointers(vector_typedWriteable &plist, 
+  virtual int complete_pointers(vector_typedWritable &plist, 
 				BamReader *manager);
 
-  static TypedWriteable *make_Node(const FactoryParams &params);
+  static TypedWritable *make_Node(const FactoryParams &params);
 
 protected:
   void fillin(DatagramIterator& scan, BamReader* manager);
@@ -123,11 +123,11 @@ public:
     return _type_handle;
   }
   static void init_type() {
-    TypedWriteable::init_type();
+    TypedWritable::init_type();
     BoundedObject::init_type();
     ReferenceCount::init_type();
     register_type(_type_handle, "Node",
-		  TypedWriteable::get_class_type(),
+		  TypedWritable::get_class_type(),
 		  BoundedObject::get_class_type(),
 		  ReferenceCount::get_class_type());
   }

+ 7 - 7
panda/src/graph/nodeRelation.I

@@ -11,7 +11,7 @@
 ////////////////////////////////////////////////////////////////////
 EXPCL_PANDA INLINE_GRAPH void
 remove_arc(NodeRelation *arc) {
-  PT(TypedWriteableReferenceCount) hold_ptr = arc->detach();
+  PT(TypedWritableReferenceCount) hold_ptr = arc->detach();
   arc->_parent = NULL;
   arc->_child = NULL;
 }
@@ -88,7 +88,7 @@ get_graph_type() const {
 ////////////////////////////////////////////////////////////////////
 INLINE_GRAPH void NodeRelation::
 change_parent(Node *parent) {
-  PT(TypedWriteableReferenceCount) hold_ptr = detach();
+  PT(TypedWritableReferenceCount) hold_ptr = detach();
   _parent = parent;
   attach();
 }
@@ -101,7 +101,7 @@ change_parent(Node *parent) {
 ////////////////////////////////////////////////////////////////////
 INLINE_GRAPH void NodeRelation::
 change_parent(Node *parent, int sort) {
-  PT(TypedWriteableReferenceCount) hold_ptr = detach();
+  PT(TypedWritableReferenceCount) hold_ptr = detach();
   _parent = parent;
   _sort = sort;
   attach();
@@ -114,7 +114,7 @@ change_parent(Node *parent, int sort) {
 ////////////////////////////////////////////////////////////////////
 INLINE_GRAPH void NodeRelation::
 change_child(Node *child) {
-  PT(TypedWriteableReferenceCount) hold_ptr = detach();
+  PT(TypedWritableReferenceCount) hold_ptr = detach();
   _child = child;
   attach();
 }
@@ -127,7 +127,7 @@ change_child(Node *child) {
 ////////////////////////////////////////////////////////////////////
 INLINE_GRAPH void NodeRelation::
 change_parent_and_child(Node *parent, Node *child) {
-  PT(TypedWriteableReferenceCount) hold_ptr = detach();
+  PT(TypedWritableReferenceCount) hold_ptr = detach();
   _parent = parent;
   _child = child;
   attach();
@@ -141,7 +141,7 @@ change_parent_and_child(Node *parent, Node *child) {
 ////////////////////////////////////////////////////////////////////
 INLINE_GRAPH void NodeRelation::
 set_sort(int sort) {
-  PT(TypedWriteableReferenceCount) hold_ptr = detach();
+  PT(TypedWritableReferenceCount) hold_ptr = detach();
   _sort = sort;
   attach();
 }
@@ -155,7 +155,7 @@ set_sort(int sort) {
 ////////////////////////////////////////////////////////////////////
 INLINE_GRAPH void NodeRelation::
 set_graph_type(TypeHandle graph_type) {
-  PT(TypedWriteableReferenceCount) hold_ptr = detach();
+  PT(TypedWritableReferenceCount) hold_ptr = detach();
   _graph_type = graph_type;
   attach();
 }

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików