Browse Source

Cleanup of comments and whitespace

rdb 10 years ago
parent
commit
090e912ce6
100 changed files with 1023 additions and 1326 deletions
  1. 162 258
      contrib/src/ai/aiBehaviors.cxx
  2. 12 28
      contrib/src/ai/aiBehaviors.h
  3. 10 12
      contrib/src/ai/aiCharacter.cxx
  4. 11 13
      contrib/src/ai/aiCharacter.h
  5. 2 4
      contrib/src/ai/aiGlobals.h
  6. 59 94
      contrib/src/ai/aiPathFinder.cxx
  7. 10 13
      contrib/src/ai/aiPathFinder.h
  8. 46 73
      contrib/src/ai/aiWorld.cxx
  9. 17 35
      contrib/src/ai/aiWorld.h
  10. 17 24
      contrib/src/ai/arrival.cxx
  11. 3 4
      contrib/src/ai/arrival.h
  12. 17 24
      contrib/src/ai/evade.cxx
  13. 3 5
      contrib/src/ai/evade.h
  14. 17 24
      contrib/src/ai/flee.cxx
  15. 3 5
      contrib/src/ai/flee.h
  16. 7 11
      contrib/src/ai/flock.cxx
  17. 7 11
      contrib/src/ai/flock.h
  18. 5 8
      contrib/src/ai/meshNode.cxx
  19. 11 10
      contrib/src/ai/meshNode.h
  20. 40 43
      contrib/src/ai/obstacleAvoidance.cxx
  21. 6 7
      contrib/src/ai/obstacleAvoidance.h
  22. 58 93
      contrib/src/ai/pathFind.cxx
  23. 12 14
      contrib/src/ai/pathFind.h
  24. 19 31
      contrib/src/ai/pathFollow.cxx
  25. 18 19
      contrib/src/ai/pursue.cxx
  26. 3 4
      contrib/src/ai/pursue.h
  27. 9 13
      contrib/src/ai/seek.cxx
  28. 3 4
      contrib/src/ai/seek.h
  29. 16 25
      contrib/src/ai/wander.cxx
  30. 3 4
      contrib/src/ai/wander.h
  31. 53 53
      direct/src/dcparser/dcClass.cxx
  32. 12 12
      direct/src/dcparser/dcDeclaration.cxx
  33. 8 8
      direct/src/dcparser/dcField.I
  34. 6 6
      direct/src/dcparser/dcKeyword.cxx
  35. 18 18
      direct/src/dcparser/dcSwitch.cxx
  36. 2 2
      direct/src/dcparser/dcSwitchParameter.h
  37. 5 5
      direct/src/dcparser/dcTypedef.cxx
  38. 2 2
      direct/src/directbase/ppython.cxx
  39. 45 42
      direct/src/directd/directd.h
  40. 4 2
      direct/src/directdServer/directdClient.h
  41. 11 8
      direct/src/directdServer/directdServer.h
  42. 52 52
      direct/src/motiontrail/cMotionTrail.cxx
  43. 1 1
      direct/src/motiontrail/config_motiontrail.h
  44. 10 10
      direct/src/plugin/find_root_dir_assist.mm
  45. 12 12
      direct/src/plugin/p3dAuthSession.cxx
  46. 1 1
      direct/src/plugin/p3dAuthSession.h
  47. 1 1
      direct/src/plugin/p3dCert_strings.cxx
  48. 1 1
      direct/src/plugin/p3dCert_wx.cxx
  49. 1 1
      direct/src/plugin/p3dCert_wx.h
  50. 45 45
      direct/src/plugin_activex/P3DActiveX.cpp
  51. 4 4
      direct/src/plugin_activex/P3DActiveX.h
  52. 21 21
      direct/src/plugin_activex/P3DActiveXCtrl.cpp
  53. 2 2
      direct/src/plugin_activex/P3DActiveXPropPage.cpp
  54. 3 3
      dtool/metalibs/dtool/dtool.cxx
  55. 1 1
      dtool/src/cppparser/cppArrayType.h
  56. 1 1
      dtool/src/cppparser/cppBison.yxx
  57. 1 1
      dtool/src/cppparser/cppClassTemplateParameter.h
  58. 1 1
      dtool/src/cppparser/cppCommentBlock.h
  59. 1 1
      dtool/src/cppparser/cppConstType.h
  60. 1 1
      dtool/src/cppparser/cppDeclaration.h
  61. 1 1
      dtool/src/cppparser/cppEnumType.h
  62. 1 1
      dtool/src/cppparser/cppExpression.h
  63. 1 1
      dtool/src/cppparser/cppExpressionParser.h
  64. 1 1
      dtool/src/cppparser/cppExtensionType.h
  65. 1 1
      dtool/src/cppparser/cppFile.h
  66. 1 1
      dtool/src/cppparser/cppFunctionGroup.h
  67. 1 1
      dtool/src/cppparser/cppFunctionType.h
  68. 1 1
      dtool/src/cppparser/cppIdentifier.h
  69. 1 1
      dtool/src/cppparser/cppInstance.h
  70. 1 1
      dtool/src/cppparser/cppInstanceIdentifier.h
  71. 1 1
      dtool/src/cppparser/cppMakeProperty.h
  72. 1 1
      dtool/src/cppparser/cppMakeSeq.h
  73. 1 1
      dtool/src/cppparser/cppManifest.h
  74. 1 1
      dtool/src/cppparser/cppNamespace.h
  75. 1 1
      dtool/src/cppparser/cppParameterList.h
  76. 1 1
      dtool/src/cppparser/cppParser.h
  77. 1 1
      dtool/src/cppparser/cppPointerType.h
  78. 1 1
      dtool/src/cppparser/cppPreprocessor.h
  79. 1 1
      dtool/src/cppparser/cppReferenceType.h
  80. 1 1
      dtool/src/cppparser/cppScope.h
  81. 1 1
      dtool/src/cppparser/cppSimpleType.h
  82. 1 1
      dtool/src/cppparser/cppStructType.h
  83. 1 1
      dtool/src/cppparser/cppTBDType.h
  84. 1 1
      dtool/src/cppparser/cppTemplateParameterList.h
  85. 1 1
      dtool/src/cppparser/cppTemplateScope.h
  86. 1 1
      dtool/src/cppparser/cppToken.h
  87. 1 1
      dtool/src/cppparser/cppType.h
  88. 1 1
      dtool/src/cppparser/cppTypeDeclaration.h
  89. 1 1
      dtool/src/cppparser/cppTypeParser.h
  90. 1 1
      dtool/src/cppparser/cppTypeProxy.h
  91. 1 1
      dtool/src/cppparser/cppTypedefType.h
  92. 1 1
      dtool/src/cppparser/cppUsing.h
  93. 1 1
      dtool/src/dtoolbase/addHash.I
  94. 15 15
      dtool/src/dtoolbase/memoryHook.cxx
  95. 2 2
      dtool/src/dtoolbase/typeRegistry.cxx
  96. 0 1
      dtool/src/dtoolbase/typeRegistry.h
  97. 1 1
      dtool/src/dtoolutil/dSearchPath.h
  98. 38 38
      dtool/src/dtoolutil/filename.cxx
  99. 2 2
      dtool/src/dtoolutil/test_touch.cxx
  100. 0 3
      dtool/src/interrogate/functionRemap.cxx

+ 162 - 258
contrib/src/ai/aiBehaviors.cxx

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : aiBehaviors.cxx
-// Created by  : Deepak, John, Navin
-// Date        :  8 Sep 09
+// Filename: aiBehaviors.cxx
+// Created by: Deepak, John, Navin (08Sep09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -48,15 +47,12 @@ AIBehaviors::~AIBehaviors() {
 
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : is_conflict
-// Description : Checks for conflict between steering forces.
-//                If there is a conflict it returns 'true' and sets _conflict to 'true'.
-//                If there is no conflict it returns 'false' and sets _conflict to 'false'.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: is_conflict
+//  Description: Checks for conflict between steering forces.
+//               If there is a conflict it returns 'true' and sets _conflict to 'true'.
+//               If there is no conflict it returns 'false' and sets _conflict to 'false'.
+////////////////////////////////////////////////////////////////////
 bool AIBehaviors::is_conflict() {
   int value = int(is_on(_seek)) + int(is_on(_flee)) + int(is_on(_pursue)) + int(is_on(_evade)) + int(is_on(_wander)) + int(is_on(_flock))+ int(is_on(_obstacle_avoidance));
 
@@ -102,14 +98,12 @@ bool AIBehaviors::is_conflict() {
   return false;
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : accumulate_force
-// Description : This function updates the individual steering forces for each of the ai characters.
-//                These accumulated forces are eventually what comprise the resultant
-//                steering force of the character.
-
-/////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+//     Function: accumulate_force
+//  Description: This function updates the individual steering forces for each of the ai characters.
+//               These accumulated forces are eventually what comprise the resultant
+//               steering force of the character.
+////////////////////////////////////////////////////////////////////
 
 void AIBehaviors::accumulate_force(string force_type, LVecBase3 force) {
 
@@ -159,15 +153,13 @@ void AIBehaviors::accumulate_force(string force_type, LVecBase3 force) {
 
 }
 
-//////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : calculate_prioritized
-// Description : This function updates the main steering force for the ai character using
-//                the accumulate function and checks for max force and arrival force.
-//                It finally returns this steering force which is accessed by the update
-//                function in the AICharacter class.
-
-//////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+//     Function: calculate_prioritized
+//  Description: This function updates the main steering force for the ai character using
+//               the accumulate function and checks for max force and arrival force.
+//               It finally returns this steering force which is accessed by the update
+//               function in the AICharacter class.
+////////////////////////////////////////////////////////////////////
 
 LVecBase3 AIBehaviors::calculate_prioritized() {
   LVecBase3 force;
@@ -313,14 +305,10 @@ LVecBase3 AIBehaviors::calculate_prioritized() {
   return _steering_force;
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : remove_ai
-// Description : This function removes individual or all the AIs.
-
-/////////////////////////////////////////////////////////////////////////////////
-
-//add for path follow
+////////////////////////////////////////////////////////////////////
+//     Function: remove_ai
+//  Description: This function removes individual or all the AIs.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::remove_ai(string ai_type) {
   switch(char_to_int(ai_type)) {
     case 0: {
@@ -434,14 +422,10 @@ void AIBehaviors::remove_ai(string ai_type) {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : pause_ai
-// Description : This function pauses individual or all the AIs.
-
-/////////////////////////////////////////////////////////////////////////////////
-
-//add for path follow
+////////////////////////////////////////////////////////////////////
+//     Function: pause_ai
+//  Description: This function pauses individual or all the AIs.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::pause_ai(string ai_type) {
   switch(char_to_int(ai_type)) {
     case 0: {
@@ -537,13 +521,10 @@ void AIBehaviors::pause_ai(string ai_type) {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : resume_ai
-// Description : This function resumes individual or all the AIs
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: resume_ai
+//  Description: This function resumes individual or all the AIs
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::resume_ai(string ai_type) {
   switch(char_to_int(ai_type)) {
     case 0: {
@@ -634,15 +615,12 @@ void AIBehaviors::resume_ai(string ai_type) {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : seek
-// Description : This function activates seek and makes an object of the Seek class.
-//                This is the function we want the user to call for seek to be done.
-//                This function is overloaded to accept a NodePath or an LVecBase3.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: seek
+//  Description: This function activates seek and makes an object of the Seek class.
+//               This is the function we want the user to call for seek to be done.
+//               This function is overloaded to accept a NodePath or an LVecBase3.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::seek(NodePath target_object, float seek_wt) {
   _seek_obj = new Seek(_ai_char, target_object, seek_wt);
   turn_on("seek");
@@ -653,14 +631,11 @@ void AIBehaviors::seek(LVecBase3 pos, float seek_wt) {
   turn_on("seek");
 }
 
-//////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : flee
-// Description : This function activates flee_activate and creates an object of the Flee class.
-//                This function is overloaded to accept a NodePath or an LVecBase3.
-
-//////////////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: flee
+//  Description: This function activates flee_activate and creates an object of the Flee class.
+//               This function is overloaded to accept a NodePath or an LVecBase3.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::flee(NodePath target_object, double panic_distance, double relax_distance, float flee_wt) {
   _flee_obj = new Flee(_ai_char, target_object, panic_distance, relax_distance, flee_wt);
   _flee_list.insert(_flee_list.end(), *_flee_obj);
@@ -675,27 +650,21 @@ void AIBehaviors::flee(LVecBase3 pos, double panic_distance, double relax_distan
   turn_on("flee_activate");
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : pursue
-// Description : This function activates pursue.
-//                This is the function we want the user to call for pursue to be done.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: pursue
+//  Description: This function activates pursue.
+//               This is the function we want the user to call for pursue to be done.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::pursue(NodePath target_object, float pursue_wt) {
   _pursue_obj = new Pursue(_ai_char, target_object, pursue_wt);
 
   turn_on("pursue");
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : evade
-// Description : This function activates evade_activate.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: evade
+//  Description: This function activates evade_activate.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::evade(NodePath target_object, double panic_distance, double relax_distance, float evade_wt) {
   _evade_obj = new Evade(_ai_char, target_object, panic_distance, relax_distance, evade_wt);
   _evade_list.insert(_evade_list.end(), *_evade_obj);
@@ -703,14 +672,11 @@ void AIBehaviors::evade(NodePath target_object, double panic_distance, double re
   turn_on("evade_activate");
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : arrival
-// Description : This function activates arrival.
-//                This is the function we want the user to call for arrival to be done.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: arrival
+//  Description: This function activates arrival.
+//               This is the function we want the user to call for arrival to be done.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::arrival(double distance) {
   if(_pursue_obj) {
     _arrival_obj = new Arrival(_ai_char, distance);
@@ -727,14 +693,11 @@ void AIBehaviors::arrival(double distance) {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : flock
-// Description : This function activates flock.
-//                This is the function we want the user to call for flock to be done.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: flock
+//  Description: This function activates flock.
+//               This is the function we want the user to call for flock to be done.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::flock(float flock_wt) {
   _flock_weight = flock_wt;
 
@@ -742,14 +705,11 @@ void AIBehaviors::flock(float flock_wt) {
   turn_on("flock_activate");
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : flock_activate
-// Description : This function checks whether any other behavior exists to work with flock.
-//                When this is true, it calls the do_flock function.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: flock_activate
+//  Description: This function checks whether any other behavior exists to work with flock.
+//               When this is true, it calls the do_flock function.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::flock_activate() {
   if(is_on(_seek) || is_on(_flee) || is_on(_pursue) || is_on(_evade) || is_on(_wander)) {
       turn_off("flock_activate");
@@ -757,18 +717,15 @@ void AIBehaviors::flock_activate() {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : do_flock
-// Description : This function contains the logic for flocking behavior. This is
-//                an emergent behavior and is obtained by combining three other
-//                behaviors which are separation, cohesion and alignment based on
-//                Craig Reynold's algorithm. Also, this behavior does not work by
-//                itself. It works only when combined with other steering behaviors
-//                such as wander, pursue, evade, seek and flee.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: do_flock
+//  Description: This function contains the logic for flocking behavior. This is
+//               an emergent behavior and is obtained by combining three other
+//               behaviors which are separation, cohesion and alignment based on
+//               Craig Reynold's algorithm. Also, this behavior does not work by
+//               itself. It works only when combined with other steering behaviors
+//               such as wander, pursue, evade, seek and flee.
+////////////////////////////////////////////////////////////////////
 LVecBase3 AIBehaviors::do_flock() {
 
   //! Initialize variables required to compute the flocking force on the ai char.
@@ -839,141 +796,109 @@ LVecBase3 AIBehaviors::do_flock() {
     + cohesion_force * _flock_group->_cohesion_wt);
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : wander
-// Description : This function activates wander.
+////////////////////////////////////////////////////////////////////
+//     Function: wander
+//  Description: This function activates wander.
 //               This is the function we want the user to call for flock to be done.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::wander(double wander_radius, int flag, double aoe, float wander_weight) {
   _wander_obj = new Wander(_ai_char, wander_radius, flag, aoe, wander_weight);
   turn_on("wander");
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : obstacle avoidance
-// Description : This function activates obstacle avoidance for a given character.
+////////////////////////////////////////////////////////////////////
+//     Function: obstacle avoidance
+//  Description: This function activates obstacle avoidance for a given character.
 //               This is the function we want the user to call for
 //               obstacle avoidance to be performed.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::obstacle_avoidance(float obstacle_avoidance_weight) {
   _obstacle_avoidance_obj = new ObstacleAvoidance(_ai_char, obstacle_avoidance_weight);
   turn_on("obstacle_avoidance_activate");
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : path_follow
-// Description : This function activates path following.
-//                This is the function we want the user to call for path following.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: path_follow
+//  Description: This function activates path following.
+//               This is the function we want the user to call for path following.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::path_follow(float follow_wt) {
   _path_follow_obj = new PathFollow(_ai_char, follow_wt);
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : add_to_path
-// Description : This function adds positions to the path to follow.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: add_to_path
+//  Description: This function adds positions to the path to follow.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::add_to_path(LVecBase3 pos) {
   _path_follow_obj->add_to_path(pos);
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : start_follow
-// Description : This function starts the path follower.
-
-/////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+//     Function: start_follow
+//  Description: This function starts the path follower.
+////////////////////////////////////////////////////////////////////
 
 void AIBehaviors::start_follow(string type) {
   _path_follow_obj->start(type);
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : init_path_find
-// Description : This function activates path finding in the character.
-//                This function accepts the meshdata in .csv format.
+////////////////////////////////////////////////////////////////////
+//     Function: init_path_find
+//  Description: This function activates path finding in the character.
+//               This function accepts the meshdata in .csv format.
 //
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::init_path_find(const char* navmesh_filename) {
   _path_find_obj = new PathFind(_ai_char);
   _path_find_obj->set_path_find(navmesh_filename);
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : path_find_to (for pathfinding towards a  static position)
-// Description : This function checks for the source and target in the navigation mesh
-//                for its availability and then finds the best path via the A* algorithm
-//                Then it calls the path follower to make the object follow the path.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: path_find_to (for pathfinding towards a  static position)
+//  Description: This function checks for the source and target in the navigation mesh
+//               for its availability and then finds the best path via the A* algorithm
+//               Then it calls the path follower to make the object follow the path.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::path_find_to(LVecBase3 pos, string type) {
   _path_find_obj->path_find(pos, type);
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : path_find_to (for pathfinding towards a moving target (a NodePath))
-// Description : This function checks for the source and target in the navigation mesh
-//                for its availability and then finds the best path via the A* algorithm
-//                Then it calls the path follower to make the object follow the path.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: path_find_to (for pathfinding towards a moving target (a NodePath))
+//  Description: This function checks for the source and target in the navigation mesh
+//               for its availability and then finds the best path via the A* algorithm
+//               Then it calls the path follower to make the object follow the path.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::path_find_to(NodePath target, string type) {
   _path_find_obj->path_find(target, type);
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : add_static_obstacle
-// Description : This function allows the user to dynamically add obstacles to the
-//                game environment. The function will update the nodes within the
-//                bounding volume of the obstacle as non-traversable. Hence will not be
-//                considered by the pathfinding algorithm.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: add_static_obstacle
+//  Description: This function allows the user to dynamically add obstacles to the
+//               game environment. The function will update the nodes within the
+//               bounding volume of the obstacle as non-traversable. Hence will not be
+//               considered by the pathfinding algorithm.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::add_static_obstacle(NodePath obstacle) {
   _path_find_obj->add_obstacle_to_mesh(obstacle);
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : add_dynamic_obstacle
-// Description : This function starts the pathfinding obstacle navigation for the
-//                passed in obstacle.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: add_dynamic_obstacle
+//  Description: This function starts the pathfinding obstacle navigation for the
+//               passed in obstacle.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::add_dynamic_obstacle(NodePath obstacle) {
   _path_find_obj->dynamic_avoid(obstacle);
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : behavior_status
-// Description : This function returns the status of an AI Type whether it is active,
-//                paused or disabled. It returns -1 if an invalid string is passed.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: behavior_status
+//  Description: This function returns the status of an AI Type whether it is active,
+//               paused or disabled. It returns -1 if an invalid string is passed.
+////////////////////////////////////////////////////////////////////
 string AIBehaviors::behavior_status(string ai_type) {
   switch(char_to_int(ai_type)) {
     case 1:
@@ -1188,14 +1113,11 @@ string AIBehaviors::behavior_status(string ai_type) {
     }
   }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : char_to_int
-// Description : This function is used to derive int values from the ai types strings.
-//                Returns -1 if an invalid string is passed.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: char_to_int
+//  Description: This function is used to derive int values from the ai types strings.
+//               Returns -1 if an invalid string is passed.
+////////////////////////////////////////////////////////////////////
 int AIBehaviors::char_to_int(string ai_type) {
   if(ai_type == "all") {
     return 0;
@@ -1252,13 +1174,10 @@ int AIBehaviors::char_to_int(string ai_type) {
   return -1;
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : turn_on
-// Description : This function turns on any aiBehavior which is passed as a string.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: turn_on
+//  Description: This function turns on any aiBehavior which is passed as a string.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::turn_on(string ai_type) {
   switch(char_to_int(ai_type)) {
     case 1:  {
@@ -1318,13 +1237,10 @@ void AIBehaviors::turn_on(string ai_type) {
   }
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : turn_off
-// Description : This function turns off any aiBehavior which is passed as a string.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: turn_off
+//  Description: This function turns off any aiBehavior which is passed as a string.
+////////////////////////////////////////////////////////////////////
 void AIBehaviors::turn_off(string ai_type) {
 switch(char_to_int(ai_type)) {
     case 1:  {
@@ -1426,24 +1342,18 @@ switch(char_to_int(ai_type)) {
   }
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : is_on
-// Description : This function returns true if an aiBehavior is on
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: is_on
+//  Description: This function returns true if an aiBehavior is on
+////////////////////////////////////////////////////////////////////
 bool AIBehaviors::is_on(_behavior_type bt)  {
   return (_behaviors_flags & bt) == bt;
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : is_on
-// Description : This function returns true if pathfollow or pathfinding is on
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: is_on
+//  Description: This function returns true if pathfollow or pathfinding is on
+////////////////////////////////////////////////////////////////////
 bool AIBehaviors::is_on(string ai_type) {
   if(ai_type == "pathfollow") {
     if(_path_follow_obj) {
@@ -1466,24 +1376,18 @@ bool AIBehaviors::is_on(string ai_type) {
   return false;
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : is_off
-// Description : This function returns true if an aiBehavior is off
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: is_off
+//  Description: This function returns true if an aiBehavior is off
+////////////////////////////////////////////////////////////////////
 bool AIBehaviors::is_off(_behavior_type bt)  {
   return ((_behaviors_flags | bt) == bt);
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : is_off
-// Description : This function returns true if pathfollow or pathfinding is off
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: is_off
+//  Description: This function returns true if pathfollow or pathfinding is off
+////////////////////////////////////////////////////////////////////
 bool AIBehaviors::is_off(string ai_type) {
   if(ai_type == "pathfollow") {
     if(_path_follow_obj && _path_follow_obj->_start) {

+ 12 - 28
contrib/src/ai/aiBehaviors.h

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : aiBehaviors.cxx
-// Created by  : Deepak, John, Navin
-// Date        :  8 Sep 09
+// Filename: aiBehaviors.h
+// Created by: Deepak, John, Navin (08Sep09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -22,18 +21,6 @@
 
 #include "aiGlobals.h"
 
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Class : AIBehaviors
-// Description : This class implements all the steering behaviors of the AI framework, such as
-//                seek, flee, pursue, evade, wander and flock. Each steering behavior has a weight which is used when more than
-//                one type of steering behavior is acting on the same ai character. The weight decides the contribution of each
-//                type of steering behavior. The AICharacter class has a handle to an object of this class and this allows to
-//                invoke the steering behaviors via the AICharacter. This class also provides functionality such as pausing, resuming
-//                and removing the AI behaviors of an AI character at anytime.
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
 class AICharacter;
 class Seek;
 class Flee;
@@ -49,8 +36,16 @@ class ObstacleAvoidance;
 typedef list<Flee, allocator<Flee> > ListFlee;
 typedef list<Evade, allocator<Evade> > ListEvade;
 
+////////////////////////////////////////////////////////////////////
+//       Class : AIBehaviors
+// Description : This class implements all the steering behaviors of the AI framework, such as
+//               seek, flee, pursue, evade, wander and flock. Each steering behavior has a weight which is used when more than
+//               one type of steering behavior is acting on the same ai character. The weight decides the contribution of each
+//               type of steering behavior. The AICharacter class has a handle to an object of this class and this allows to
+//               invoke the steering behaviors via the AICharacter. This class also provides functionality such as pausing, resuming
+//               and removing the AI behaviors of an AI character at anytime.
+////////////////////////////////////////////////////////////////////
 class EXPCL_PANDAAI AIBehaviors {
-
 public:
   enum _behavior_type {
       _none = 0x00000,
@@ -174,14 +169,3 @@ PUBLISHED:
 };
 
 #endif
-
-
-
-
-
-
-
-
-
-
-

+ 10 - 12
contrib/src/ai/aiCharacter.cxx

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    :  aiCharacter.cxx
-// Created by  :  Deepak, John, Navin
-// Date        :  8 Sep 09
+// Filename: aiCharacter.cxx
+// Created by: Deepak, John, Navin (08Sep09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -35,14 +34,13 @@ AICharacter::AICharacter(string model_name, NodePath model_np, double mass, doub
 AICharacter::~AICharacter() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : update
-// Description : Each character's update will update its ai and physics
-//                based on his resultant steering force.
-//                This also makes the character  look at the direction of the force.
-
-/////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+//     Function: update
+//  Description: Each character's update will update its AI and
+//               physics based on his resultant steering force.
+//               This also makes the character look in the direction
+//               of the force.
+////////////////////////////////////////////////////////////////////
 void AICharacter::
 update() {
   if (!_steering->is_off(_steering->_none)) {

+ 11 - 13
contrib/src/ai/aiCharacter.h

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : aiCharacter.h
-// Created by  : Deepak, John, Navin
-// Date        :  8 Sep 09
+// Filename: aiCharacter.h
+// Created by: Deepak, John, Navin (08Sep09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -23,15 +22,14 @@
 
 #include "aiBehaviors.h"
 
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Class : AICharacter
-//  Description : This class is used for creating the ai characters. It assigns both physics and ai
-//                attributes to the character. It also has an update function which updates the physics and ai
-//                of the character. This update function is called by the AIWorld update.
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//       Class : AICharacter
+// Description : This class is used for creating the AI characters.
+//               It assigns both physics and AI attributes to the
+//               character.  It also has an update function which
+//               updates the physics and AI of the character.
+//               This update function is called by the AIWorld update.
+////////////////////////////////////////////////////////////////////
 class AIBehaviors;
 class AIWorld;
 

+ 2 - 4
contrib/src/ai/aiGlobals.h

@@ -1,7 +1,5 @@
-////////////////////////////////////////////////////////////////////////
-// Filename :    aiGlobals.h
-// Created by :  Deepak, John, Navin
-// Date:          8 Sep 09
+// Filename: aiGlobals.h
+// Created by: Deepak, John, Navin (08Sep09)
 //
 ////////////////////////////////////////////////////////////////////
 //

+ 59 - 94
contrib/src/ai/aiPathFinder.cxx

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    :  aiPathFinder.cxx
-// Created by  :  Deepak, John, Navin
-// Date        :  10 Nov 09
+// Filename: aiPathFinder.cxx
+// Created by: Deepak, John, Navin (10Nov09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -22,14 +21,11 @@ PathFinder::PathFinder(NavMesh nav_mesh) {
 PathFinder::~PathFinder() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : find_path
-// Description : This function initializes the pathfinding process by accepting the
+////////////////////////////////////////////////////////////////////
+//     Function: find_path
+//  Description: This function initializes the pathfinding process by accepting the
 //               source and destination nodes. It then calls the generate_path().
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 void PathFinder::find_path(Node *src_node, Node *dest_node) {
   _src_node = src_node;
   _dest_node = dest_node;
@@ -48,14 +44,11 @@ void PathFinder::find_path(Node *src_node, Node *dest_node) {
   generate_path();
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : generate_path
-// Description : This function performs the pathfinding process using the A* algorithm.
+////////////////////////////////////////////////////////////////////
+//     Function: generate_path
+//  Description: This function performs the pathfinding process using the A* algorithm.
 //               It updates the openlist and closelist.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 void PathFinder::generate_path() {
   // All the A* algorithm is implemented here.
   // The check is > 1 due to the existence of the dummy node.
@@ -87,14 +80,11 @@ void PathFinder::generate_path() {
   _closed_list.clear();
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : identify_neighbors
-// Description : This function traverses through the 8 neigbors of the parent node and
+////////////////////////////////////////////////////////////////////
+//     Function: identify_neighbors
+//  Description: This function traverses through the 8 neigbors of the parent node and
 //               then adds the neighbors to the _open_list based on A* criteria.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 void PathFinder::identify_neighbors(Node *parent_node) {
   // Remove the parent node from the open_list so that it is not considered
   // while adding new nodes to the open list heap.
@@ -114,30 +104,25 @@ void PathFinder::identify_neighbors(Node *parent_node) {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : calc_node_score
-// Description : This function calculates the score of each node.
+////////////////////////////////////////////////////////////////////
+//     Function: calc_node_score
+//  Description: This function calculates the score of each node.
 //               Score = Cost + Heuristics.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 void PathFinder::calc_node_score(Node *nd) {
   nd->_cost = calc_cost_frm_src(nd);
   nd->_heuristic = calc_heuristic(nd);
   nd->_score = nd->_cost + nd->_heuristic;
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : calc_cost_frm_src
-// Description : This function calculates the cost of each node by finding out
-// the number of node traversals required to reach the source node.
-// Diagonal traversals have cost = 14.
-// Horizontal / Vertical traversals have cost = 10.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: calc_cost_frm_src
+//  Description: This function calculates the cost of each node by
+//               finding out the number of node traversals required
+//               to reach the source node.  Diagonal traversals have
+//               cost = 14.  Horizontal and vertical traversals have
+//               cost = 10.
+////////////////////////////////////////////////////////////////////
 int PathFinder::calc_cost_frm_src(Node *nd) {
   int cost = 0;
   Node *start_node = nd;
@@ -160,15 +145,14 @@ int PathFinder::calc_cost_frm_src(Node *nd) {
   return cost;
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : calc_heuristic
-// Description : This function calculates the heuristic of the nodes using Manhattan method.
-// All it does is predict the number of node traversals required to reach the target node.
-// No diagonal traversals are allowed in this technique.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: calc_heuristic
+//  Description: This function calculates the heuristic of the nodes
+//               using Manhattan method.  All it does is predict the
+//               number of node traversals required to reach the
+//               target node.  No diagonal traversals are allowed in
+//               this technique.
+////////////////////////////////////////////////////////////////////
 int PathFinder::calc_heuristic(Node *nd) {
   int row_diff = abs(_dest_node->_grid_x - nd->_grid_x);
   int col_diff = abs(_dest_node->_grid_y - nd->_grid_y);
@@ -177,13 +161,10 @@ int PathFinder::calc_heuristic(Node *nd) {
   return heuristic;
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : is_diagonal_node
-// Description : This function checks if the traversal from a node is diagonal.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: is_diagonal_node
+//  Description: This function checks if the traversal from a node is diagonal.
+////////////////////////////////////////////////////////////////////
 bool PathFinder::is_diagonal_node(Node *nd) {
   // Calculate the row and column differences between child and parent nodes.
   float row_diff = nd->_grid_x - nd->_prv_node->_grid_x;
@@ -198,15 +179,11 @@ bool PathFinder::is_diagonal_node(Node *nd) {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : add_to_olist
-// Description : This function adds a node to the open list heap.
+////////////////////////////////////////////////////////////////////
+//     Function: add_to_olist
+//  Description: This function adds a node to the open list heap.
 //               A binay heap is maintained to improve the search.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-
+////////////////////////////////////////////////////////////////////
 void PathFinder::add_to_olist(Node *nd) {
   // Variables required to search the binary heap.
   Node *child_node, *parent_node;
@@ -245,14 +222,11 @@ void PathFinder::add_to_olist(Node *nd) {
   // At this point the Node with the smallest score will be at the top of the heap.
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : remove_from_olist
-// Description : This function removes a node from the open list.
+////////////////////////////////////////////////////////////////////
+//     Function: remove_from_olist
+//  Description: This function removes a node from the open list.
 //               During the removal the binary heap is maintained.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 void PathFinder::remove_from_olist() {
   // Variables for maintaining the binary heap.
   Node *child_node, *child_node_1, *child_node_2;
@@ -340,13 +314,10 @@ void PathFinder::remove_from_olist() {
   // At this point the Node was succesfully removed and the binary heap re-arranged.
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : add_to_clist
-// Description : This function adds a node to the closed list.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: add_to_clist
+//  Description: This function adds a node to the closed list.
+////////////////////////////////////////////////////////////////////
 void PathFinder::add_to_clist(Node *nd) {
   // Set the status as closed.
   nd->_status = nd->close;
@@ -354,13 +325,10 @@ void PathFinder::add_to_clist(Node *nd) {
   _closed_list.push_back(nd);
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : remove_from_clist
-// Description : This function removes a node from the closed list.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: remove_from_clist
+//  Description: This function removes a node from the closed list.
+////////////////////////////////////////////////////////////////////
 void PathFinder::remove_from_clist(int r, int c) {
   for(unsigned int i = 0; i < _closed_list.size(); ++i) {
     if(_closed_list[i]->_grid_x == r && _closed_list[i]->_grid_y == c) {
@@ -370,15 +338,12 @@ void PathFinder::remove_from_clist(int r, int c) {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : find_in_mesh
-// Description : This function allows the user to pass a position and it returns the
+////////////////////////////////////////////////////////////////////
+//     Function: find_in_mesh
+//  Description: This function allows the user to pass a position and it returns the
 //               corresponding node on the navigation mesh. A very useful function as
 //               it allows for dynamic updation of the mesh based on position.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 Node* find_in_mesh(NavMesh nav_mesh, LVecBase3 pos, int grid_size) {
   int size = grid_size;
   float x = pos[0];

+ 10 - 13
contrib/src/ai/aiPathFinder.h

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : aiPathFinder.h
-// Created by  : Deepak, John, Navin
-// Date        :  10 Nov 09
+// Filename: aiPathFinder.h
+// Created by: Deepak, John, Navin (10Nov09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -25,14 +24,13 @@ typedef vector<NodeArray> NavMesh;
 
 Node* find_in_mesh(NavMesh nav_mesh, LVecBase3 pos, int grid_size);
 
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Class : PathFinder
-//  Description : This class implements pathfinding using A* algorithm. It also uses a Binary Heap search to
-//               search the open list. The heuristics are calculated using the manhattan method.
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//       Class : PathFinder
+// Description : This class implements pathfinding using A* algorithm.
+//               It also uses a Binary Heap search to search the
+//               open list.  The heuristics are calculated using
+//               the manhattan method.
+////////////////////////////////////////////////////////////////////
 class EXPCL_PANDAAI PathFinder {
 public:
   Node *_src_node;
@@ -61,4 +59,3 @@ public:
 };
 
 #endif
-

+ 46 - 73
contrib/src/ai/aiWorld.cxx

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : aiWorld.cxx
-// Created by  : Deepak, John, Navin
-// Date        :  8 Sep 09
+// Filename: aiWorld.cxx
+// Created by: Deepak, John, Navin (08Sep09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -56,13 +55,11 @@ void AIWorld::print_list() {
   _ai_char_pool->print_list();
 }
 
-////////////////////////////////////////////////////////////////////////
-// Function : update
-// Description : The AIWorld update function calls the update function of all the
-//                AI characters which have been added to the AIWorld.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: update
+//  Description: The AIWorld update function calls the update function of all the
+//               AI characters which have been added to the AIWorld.
+////////////////////////////////////////////////////////////////////
 void AIWorld::update() {
   AICharPool::node *ai_pool;
   ai_pool = _ai_char_pool->_head;
@@ -73,15 +70,12 @@ void AIWorld::update() {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : add_flock
-// Description : This function adds all the AI characters in the Flock object to
-//                the AICharPool. This function allows adding the AI characetrs as
-//                part of a flock.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: add_flock
+//  Description: This function adds all the AI characters in the Flock object to
+//               the AICharPool. This function allows adding the AI characetrs as
+//               part of a flock.
+////////////////////////////////////////////////////////////////////
 void AIWorld::add_flock(Flock *flock) {
   // Add all the ai_characters in the flock to the AIWorld.
   for(unsigned int i = 0; i < flock->_ai_char_list.size(); ++i) {
@@ -91,13 +85,10 @@ void AIWorld::add_flock(Flock *flock) {
   _flock_pool.push_back(flock);
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : get_flock
-// Description : This function returns a handle to the Flock whose id is passed.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: get_flock
+//  Description: This function returns a handle to the Flock whose id is passed.
+////////////////////////////////////////////////////////////////////
 Flock AIWorld::get_flock(unsigned int flock_id) {
   for(unsigned int i=0; i < _flock_pool.size(); ++i) {
     if(_flock_pool[i]->get_id() == flock_id) {
@@ -108,13 +99,10 @@ Flock AIWorld::get_flock(unsigned int flock_id) {
   return *null_flock;
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : remove_flock
-// Description : This function removes the flock behavior completely.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: remove_flock
+//  Description: This function removes the flock behavior completely.
+////////////////////////////////////////////////////////////////////
 void AIWorld::remove_flock(unsigned int flock_id) {
   for(unsigned int i = 0; i < _flock_pool.size(); ++i) {
     if(_flock_pool[i]->get_id() == flock_id) {
@@ -129,14 +117,11 @@ void AIWorld::remove_flock(unsigned int flock_id) {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : flock_off
-// Description : This function turns off the flock behavior temporarily. Similar to
-//                pausing the behavior.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: flock_off
+//  Description: This function turns off the flock behavior temporarily. Similar to
+//               pausing the behavior.
+////////////////////////////////////////////////////////////////////
 void AIWorld::flock_off(unsigned int flock_id) {
   for(unsigned int i = 0; i < _flock_pool.size(); ++i) {
     if(_flock_pool[i]->get_id() == flock_id) {
@@ -149,13 +134,10 @@ void AIWorld::flock_off(unsigned int flock_id) {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : flock_on
-// Description : This function turns on the flock behavior.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: flock_on
+//  Description: This function turns on the flock behavior.
+////////////////////////////////////////////////////////////////////
 void AIWorld::flock_on(unsigned int flock_id) {
   for(unsigned int i = 0; i < _flock_pool.size(); ++i) {
     if(_flock_pool[i]->get_id() == flock_id) {
@@ -234,14 +216,11 @@ void AICharPool::del(string name) {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : print_list
-// Description : This function prints the ai characters in the AICharPool. Used for
-//                debugging purposes.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: print_list
+//  Description: This function prints the ai characters in the AICharPool. Used for
+//               debugging purposes.
+////////////////////////////////////////////////////////////////////
 void AICharPool::print_list() {
   node* q;
   q = _head;
@@ -251,26 +230,20 @@ void AICharPool::print_list() {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : add_obstacle
-// Description : This function adds the nodepath as an obstacle that is needed
-//                by the obstacle avoidance behavior.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: add_obstacle
+//  Description: This function adds the nodepath as an obstacle that is needed
+//               by the obstacle avoidance behavior.
+////////////////////////////////////////////////////////////////////
 void AIWorld::add_obstacle(NodePath obstacle) {
   _obstacles.push_back(obstacle);
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : remove_obstacle
-// Description : This function removes the nodepath from the obstacles list that is needed
-//                by the obstacle avoidance behavior.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: remove_obstacle
+//  Description: This function removes the nodepath from the obstacles list that is needed
+//               by the obstacle avoidance behavior.
+////////////////////////////////////////////////////////////////////
 void AIWorld::remove_obstacle(NodePath obstacle) {
   for(unsigned int i = 0; i <= _obstacles.size(); ++i) {
     if(_obstacles[i] == obstacle) {

+ 17 - 35
contrib/src/ai/aiWorld.h

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : aiWorld.h
-// Created by  : Deepak, John, Navin
-// Date        :  8 Sep 09
+// Filename: aiWorld.h
+// Created by: Deepak, John, Navin (08Sep09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -28,16 +27,12 @@
 class AICharacter;
 class Flock;
 
-///////////////////////////////////////////////////////////////////////
-//
-// Class : AICharPool
-//  Description : This class implements a linked list of AI Characters allowing
-//              the user to add and delete characters from the linked list.
-//              This will be used in the AIWorld class.
-
-////////////////////////////////////////////////////////////////////////
-
-
+////////////////////////////////////////////////////////////////////
+//       Class : AICharPool
+// Description : This class implements a linked list of AI Characters allowing
+//               the user to add and delete characters from the linked list.
+//               This will be used in the AIWorld class.
+////////////////////////////////////////////////////////////////////
 class EXPCL_PANDAAI AICharPool {
     public:
     struct node {
@@ -54,18 +49,14 @@ class EXPCL_PANDAAI AICharPool {
 };
 
 
-///////////////////////////////////////////////////////////////////////
-//
-// Class : AIWorld
-//  Description : A class that implements the virtual AI world which keeps track
-//              of the AI characters active at any given time. It contains a linked
-//              list of AI characters, obstactle data and unique name for each
-//              character. It also updates each characters state. The AI characters
-//              can also be added to the world as flocks.
-
-////////////////////////////////////////////////////////////////////////
-
-
+////////////////////////////////////////////////////////////////////
+//       Class : AIWorld
+// Description : A class that implements the virtual AI world which keeps track
+//               of the AI characters active at any given time. It contains a linked
+//               list of AI characters, obstactle data and unique name for each
+//               character. It also updates each characters state. The AI characters
+//               can also be added to the world as flocks.
+////////////////////////////////////////////////////////////////////
 class EXPCL_PANDAAI AIWorld {
   private:
     AICharPool * _ai_char_pool;
@@ -97,12 +88,3 @@ PUBLISHED:
 };
 
 #endif
-
-
-
-
-
-
-
-
-

+ 17 - 24
contrib/src/ai/arrival.cxx

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : arrival.cxx
-// Created by  : Deepak, John, Navin
-// Date        :  24 Oct 09
+// Filename: arrival.cxx
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -25,17 +24,14 @@ Arrival::Arrival(AICharacter *ai_ch, double distance) {
 Arrival::~Arrival() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : do_arrival
-// Description : This function performs the arrival and returns an arrival force which is used
-//                in the calculate_prioritized function.
-//                In case the steering force = 0, it resets to arrival_activate.
-//                The arrival behavior works only when seek or pursue is active.
-//                This function is not to be used by the user.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: do_arrival
+//  Description: This function performs the arrival and returns an arrival force which is used
+//               in the calculate_prioritized function.
+//               In case the steering force = 0, it resets to arrival_activate.
+//               The arrival behavior works only when seek or pursue is active.
+//               This function is not to be used by the user.
+////////////////////////////////////////////////////////////////////
 LVecBase3 Arrival::do_arrival() {
   LVecBase3 direction_to_target;
   double distance;
@@ -88,15 +84,12 @@ LVecBase3 Arrival::do_arrival() {
   return(LVecBase3(0.0, 0.0, 0.0));
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : arrival_activate
-// Description : This function checks for whether the target is within the arrival distance.
-//                When this is true, it calls the do_arrival function and sets the arrival direction.
-//                This function is not to be used by the user.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: arrival_activate
+//  Description: This function checks for whether the target is within the arrival distance.
+//               When this is true, it calls the do_arrival function and sets the arrival direction.
+//               This function is not to be used by the user.
+////////////////////////////////////////////////////////////////////
 void Arrival::arrival_activate() {
   LVecBase3 dirn;
   if(_arrival_type) {

+ 3 - 4
contrib/src/ai/arrival.h

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : arrival.h
-// Created by  : Deepak, John, Navin
-// Date        :  24 Oct 09
+// Filename: arrival.h
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE

+ 17 - 24
contrib/src/ai/evade.cxx

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : evade.cxx
-// Created by  : Deepak, John, Navin
-// Date        :  24 Oct 09
+// Filename: evade.cxx
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -31,17 +30,14 @@ Evade::Evade(AICharacter *ai_ch, NodePath target_object, double panic_distance,
 Evade::~Evade() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : do_evade
-// Description : This function performs the evade and returns an evade force which is used
-//                in the calculate_prioritized function.
-//                In case the AICharacter is past the (panic + relax) distance,
-//                it resets to evade_activate.
-//                This function is not to be used by the user.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: do_evade
+//  Description: This function performs the evade and returns an evade force which is used
+//               in the calculate_prioritized function.
+//               In case the AICharacter is past the (panic + relax) distance,
+//               it resets to evade_activate.
+//               This function is not to be used by the user.
+////////////////////////////////////////////////////////////////////
 LVecBase3 Evade::do_evade() {
   assert(_evade_target && "evade target not assigned");
 
@@ -66,15 +62,12 @@ LVecBase3 Evade::do_evade() {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : evade_activate
-// Description : This function checks for whether the target is within the panic distance.
-//                When this is true, it calls the do_evade function and sets the evade direction.
-//                This function is not to be used by the user.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: evade_activate
+//  Description: This function checks for whether the target is within the panic distance.
+//               When this is true, it calls the do_evade function and sets the evade direction.
+//               This function is not to be used by the user.
+////////////////////////////////////////////////////////////////////
 void Evade::evade_activate() {
     _evade_direction = (_ai_char->_ai_char_np.get_pos(_ai_char->_window_render) - _evade_target.get_pos(_ai_char->_window_render));
   double distance = _evade_direction.length();

+ 3 - 5
contrib/src/ai/evade.h

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : evade.h
-// Created by  : Deepak, John, Navin
-// Date        :  24 Oct 09
+// Filename: evade.h
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -22,7 +21,6 @@
 class AICharacter;
 
 class EXPCL_PANDAAI Evade {
-
 public:
   AICharacter *_ai_char;
 

+ 17 - 24
contrib/src/ai/flee.cxx

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : flee.cxx
-// Created by  : Deepak, John, Navin
-// Date        :  24 Oct 09
+// Filename: flee.cxx
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -46,17 +45,14 @@ Flee::Flee(AICharacter *ai_ch, LVecBase3 pos, double panic_distance,
 Flee::~Flee() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : do_flee
-// Description : This function performs the flee and returns a flee force which is used
-//                in the calculate_prioritized function.
-//                In case the AICharacter is past the (panic + relax) distance,
-//                it resets to flee_activate.
-//                This function is not to be used by the user.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: do_flee
+//  Description: This function performs the flee and returns a flee force which is used
+//               in the calculate_prioritized function.
+//               In case the AICharacter is past the (panic + relax) distance,
+//               it resets to flee_activate.
+//               This function is not to be used by the user.
+////////////////////////////////////////////////////////////////////
 LVecBase3 Flee::do_flee() {
   LVecBase3 dirn;
   double distance;
@@ -80,15 +76,12 @@ LVecBase3 Flee::do_flee() {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : flee_activate
-// Description : This function checks for whether the target is within the panic distance.
-//                When this is true, it calls the do_flee function and sets the flee direction.
-//                This function is not to be used by the user.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: flee_activate
+//  Description: This function checks for whether the target is within the panic distance.
+//               When this is true, it calls the do_flee function and sets the flee direction.
+//               This function is not to be used by the user.
+////////////////////////////////////////////////////////////////////
 void Flee::flee_activate() {
   LVecBase3 dirn;
   double distance;

+ 3 - 5
contrib/src/ai/flee.h

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : flee.h
-// Created by  : Deepak, John, Navin
-// Date        :  24 Oct 09
+// Filename: flee.h
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -22,7 +21,6 @@
 class AICharacter;
 
 class EXPCL_PANDAAI Flee {
-
 public:
   AICharacter *_ai_char;
 

+ 7 - 11
contrib/src/ai/flock.cxx

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : flock.cxx
-// Created by  : Deepak, John, Navin
-// Date        :  12 Oct 09
+// Filename: flock.cxx
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -28,13 +27,10 @@ Flock::Flock(unsigned int flock_id, double vcone_angle, double vcone_radius, uns
 Flock::~Flock() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : add_ai_char
-// Description : This function adds AI characters to the flock.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: add_ai_char
+//  Description: This function adds AI characters to the flock.
+////////////////////////////////////////////////////////////////////
 void Flock::add_ai_char(AICharacter *ai_char) {
   ai_char->_ai_char_flock_id = _flock_id;
   ai_char->_steering->_flock_group = this;

+ 7 - 11
contrib/src/ai/flock.h

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : flock.h
-// Created by  : Deepak, John, Navin
-// Date        :  12 Oct 09
+// Filename: flock.h
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -21,14 +20,11 @@
 
 class AICharacter;
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Class : Flock
+////////////////////////////////////////////////////////////////////
+//       Class : Flock
 // Description : This class is used to define the flock attributes and the AI characters
-//                which are part of the flock.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+//               which are part of the flock.
+////////////////////////////////////////////////////////////////////
 class EXPCL_PANDAAI Flock {
 private:
   unsigned int _flock_id;

+ 5 - 8
contrib/src/ai/meshNode.cxx

@@ -24,14 +24,11 @@ Node::Node(int grid_x, int grid_y, LVecBase3 pos, float w, float l, float h) {
 Node::~Node() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : contains
-// Description : This is a handy function which returns true if the passed position is
+////////////////////////////////////////////////////////////////////
+//     Function: contains
+//  Description: This is a handy function which returns true if the passed position is
 //               within the node's dimensions.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 bool Node::contains(float x, float y) {
   if(_position.get_x() - _width / 2 <= x && _position.get_x() + _width / 2 >= x &&
     _position.get_y() - _length / 2 <= y && _position.get_y() + _length / 2 >= y) {
@@ -40,4 +37,4 @@ bool Node::contains(float x, float y) {
   else {
     return false;
   }
-}
+}

+ 11 - 10
contrib/src/ai/meshNode.h

@@ -4,17 +4,18 @@
 
 #include "aiGlobals.h"
 
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+//       Class : Node
+// Description : This class is used to assign the nodes on the mesh.
+//               It holds all the data necessary to compute A*
+//               algorithm.  It also maintains a lot of vital
+//               information such as the neighbor nodes of each node
+//               and also its position on the mesh.
 //
-// Class : Node
-//  Description : This class is used to assign the nodes on the mesh. It holds all the data necessary to
-//               compute A* algorithm. It also maintains a lot of vital information such as the neighbor
-//               nodes of each node and also its position on the mesh.
-// Note: The Mesh Generator which is a stand alone tool makes use of this class to generate the nodes on the
-//       mesh.
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
+//               Note: The Mesh Generator which is a stand alone tool
+//               makes use of this class to generate the nodes on the
+//               mesh.
+////////////////////////////////////////////////////////////////////
 class EXPCL_PANDAAI Node {
 public:
     // This variable specifies whether the node is an obtacle or not.

+ 40 - 43
contrib/src/ai/obstacleAvoidance.cxx

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : obstacleAvoidance.cxx
-// Created by  : Deepak, John, Navin
-// Date        :  10 Nov 09
+// Filename: obstacleAvoidance.cxx
+// Created by: Deepak, John, Navin (10Nov09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -15,23 +14,23 @@
 
 #include "obstacleAvoidance.h"
 
-ObstacleAvoidance::ObstacleAvoidance(AICharacter *ai_char, float feeler_length) {
+ObstacleAvoidance::
+ObstacleAvoidance(AICharacter *ai_char, float feeler_length) {
   _ai_char = ai_char;
   _feeler = feeler_length;
 }
 
-ObstacleAvoidance::~ObstacleAvoidance() {
+ObstacleAvoidance::
+~ObstacleAvoidance() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : obstacle_detection
-// Description : This function checks if an obstacle is near to the AICharacter and
+////////////////////////////////////////////////////////////////////
+//     Function: obstacle_detection
+//  Description: This function checks if an obstacle is near to the AICharacter and
 //               if an obstacle is detected returns true
-
-/////////////////////////////////////////////////////////////////////////////////
-
-bool ObstacleAvoidance::obstacle_detection() {
+////////////////////////////////////////////////////////////////////
+bool ObstacleAvoidance::
+obstacle_detection() {
   // Calculate the volume of the AICharacter with respect to render
   PT(BoundingVolume) np_bounds = _ai_char->get_node_path().get_bounds();
   CPT(BoundingSphere) np_sphere = np_bounds->as_bounding_sphere();
@@ -51,46 +50,44 @@ bool ObstacleAvoidance::obstacle_detection() {
       expanded_radius = bsphere->get_radius() + np_sphere->get_radius();
     }
   }
-     LVecBase3 feeler = _feeler * _ai_char->get_char_render().get_relative_vector(_ai_char->get_node_path(), LVector3::forward());
-     feeler.normalize();
-     feeler *= (expanded_radius + np_sphere->get_radius()) ;
-     to_obstacle = _nearest_obstacle.get_pos() - _ai_char->get_node_path().get_pos();
-     LVector3 line_vector = _ai_char->get_char_render().get_relative_vector(_ai_char->get_node_path(), LVector3::forward());
-     LVecBase3 project = (to_obstacle.dot(line_vector) * line_vector) / line_vector.length_squared();
-     LVecBase3 perp = project - to_obstacle;
-     // If the nearest obstacle will collide with our AICharacter then send obstacle detection as true
-     if((_nearest_obstacle) && (perp.length() < expanded_radius - np_sphere->get_radius()) && (project.length() < feeler.length())) {
-       return true;
-     }
-     return false;
-}
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : obstacle_avoidance_activate
-// Description : This function activates obstacle_avoidance if a obstacle
-//               is detected
+  LVecBase3 feeler = _feeler * _ai_char->get_char_render().get_relative_vector(_ai_char->get_node_path(), LVector3::forward());
+  feeler.normalize();
+  feeler *= (expanded_radius + np_sphere->get_radius()) ;
+  to_obstacle = _nearest_obstacle.get_pos() - _ai_char->get_node_path().get_pos();
+  LVector3 line_vector = _ai_char->get_char_render().get_relative_vector(_ai_char->get_node_path(), LVector3::forward());
+  LVecBase3 project = (to_obstacle.dot(line_vector) * line_vector) / line_vector.length_squared();
+  LVecBase3 perp = project - to_obstacle;
 
-/////////////////////////////////////////////////////////////////////////////////
+  // If the nearest obstacle will collide with our AICharacter then send obstacle detection as true
+  if (_nearest_obstacle && (perp.length() < expanded_radius - np_sphere->get_radius()) && (project.length() < feeler.length())) {
+    return true;
+  }
+  return false;
+}
 
-void ObstacleAvoidance::obstacle_avoidance_activate() {
-  if(obstacle_detection()) {
+////////////////////////////////////////////////////////////////////
+//     Function: obstacle_avoidance_activate
+//  Description: This function activates obstacle_avoidance if a obstacle
+//               is detected
+////////////////////////////////////////////////////////////////////
+void ObstacleAvoidance::
+obstacle_avoidance_activate() {
+  if (obstacle_detection()) {
     _ai_char->_steering->turn_off("obstacle_avoidance_activate");
     _ai_char->_steering->turn_on("obstacle_avoidance");
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : do_obstacle_avoidance
-// Description : This function returns the force necessary by the AICharacter to
+////////////////////////////////////////////////////////////////////
+//     Function: do_obstacle_avoidance
+//  Description: This function returns the force necessary by the AICharacter to
 //               avoid the nearest obstacle detected by obstacle_detection
 //               function
 // NOTE : This assumes the obstacles are spherical
-
-/////////////////////////////////////////////////////////////////////////////////
-
-LVecBase3 ObstacleAvoidance::do_obstacle_avoidance() {
+////////////////////////////////////////////////////////////////////
+LVecBase3 ObstacleAvoidance::
+do_obstacle_avoidance() {
   LVecBase3 offset = _ai_char->get_node_path().get_pos() - _nearest_obstacle.get_pos();
   PT(BoundingVolume) bounds =_nearest_obstacle.get_bounds();
   CPT(BoundingSphere) bsphere = bounds->as_bounding_sphere();

+ 6 - 7
contrib/src/ai/obstacleAvoidance.h

@@ -1,10 +1,6 @@
-#ifndef OBSTACLE_AVOIDANCE_H
-#define OBSTACLE_AVOIDANCE_H
-
-////////////////////////////////////////////////////////////////////////
-// Filename    : obstacleAvoidance.h
-// Created by  : Deepak, John, Navin
-// Date        :  10 Nov 2009
+// Filename: obstacleAvoidance.h
+// Created by: Deepak, John, Navin (10Nov09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -16,6 +12,9 @@
 //
 ////////////////////////////////////////////////////////////////////
 
+#ifndef OBSTACLE_AVOIDANCE_H
+#define OBSTACLE_AVOIDANCE_H
+
 #include "aiCharacter.h"
 #include "boundingSphere.h"
 

+ 58 - 93
contrib/src/ai/pathFind.cxx

@@ -18,13 +18,10 @@ PathFind::PathFind(AICharacter *ai_ch) {
 PathFind::~PathFind() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : create_nav_mesh
-// Description : This function recreates the navigation mesh from the .csv file
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: create_nav_mesh
+//  Description: This function recreates the navigation mesh from the .csv file
+////////////////////////////////////////////////////////////////////
 void PathFind::create_nav_mesh(const char* navmesh_filename) {
   // Stage variables.
   int grid_x, grid_y;
@@ -96,14 +93,11 @@ void PathFind::create_nav_mesh(const char* navmesh_filename) {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : assign_neighbor_nodes
-// Description : This function assigns the neighbor nodes for each main node present in
-//                _nav_mesh.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: assign_neighbor_nodes
+//  Description: This function assigns the neighbor nodes for each
+//               main node present in _nav_mesh.
+////////////////////////////////////////////////////////////////////
 void PathFind::assign_neighbor_nodes(const char* navmesh_filename){
   ifstream nav_mesh_file (navmesh_filename);
 
@@ -161,15 +155,11 @@ void PathFind::assign_neighbor_nodes(const char* navmesh_filename){
   }
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : set_path_find
-// Description : This function starts the path finding process after reading the given
-//                navigation mesh.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
-
+////////////////////////////////////////////////////////////////////
+//     Function: set_path_find
+//  Description: This function starts the path finding process after reading the given
+//               navigation mesh.
+////////////////////////////////////////////////////////////////////
 void PathFind::set_path_find(const char* navmesh_filename) {
   create_nav_mesh(navmesh_filename);
 
@@ -187,16 +177,12 @@ void PathFind::set_path_find(const char* navmesh_filename) {
   _path_finder_obj = new PathFinder(_nav_mesh);
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : path_find (for pathfinding towards a  static position)
-// Description : This function checks for the source and target in the navigation mesh
-//                for its availability and then finds the best path via the A* algorithm
-//                Then it calls the path follower to make the object follow the path.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
-
+////////////////////////////////////////////////////////////////////
+//     Function: path_find (for pathfinding towards a  static position)
+//  Description: This function checks for the source and target in the navigation mesh
+//               for its availability and then finds the best path via the A* algorithm
+//               Then it calls the path follower to make the object follow the path.
+////////////////////////////////////////////////////////////////////
 void PathFind::path_find(LVecBase3 pos, string type) {
   if(type == "addPath") {
     if(_ai_char->_steering->_path_follow_obj) {
@@ -230,15 +216,12 @@ void PathFind::path_find(LVecBase3 pos, string type) {
   }
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : path_find (for pathfinding towards a moving target (a NodePath))
-// Description : This function checks for the source and target in the navigation mesh
-//                for its availability and then finds the best path via the A* algorithm
-//                Then it calls the path follower to make the object follow the path.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: path_find (for pathfinding towards a moving target (a NodePath))
+//  Description: This function checks for the source and target in the navigation mesh
+//               for its availability and then finds the best path via the A* algorithm
+//               Then it calls the path follower to make the object follow the path.
+////////////////////////////////////////////////////////////////////
 void PathFind::path_find(NodePath target, string type) {
   if(type == "addPath") {
     if(_ai_char->_steering->_path_follow_obj) {
@@ -277,13 +260,10 @@ void PathFind::path_find(NodePath target, string type) {
   }
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : clear_path
-// Description : Helper function to restore the path and mesh to its initial state
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: clear_path
+//  Description: Helper function to restore the path and mesh to its initial state
+////////////////////////////////////////////////////////////////////
 void PathFind::clear_path() {
   // Initialize to zero
   for(int i = 0; i < _grid_size; ++i) {
@@ -304,15 +284,12 @@ void PathFind::clear_path() {
   }
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : trace_path
-// Description : This function is the function which sends the path information one by
-//                one to the path follower so that it can store the path needed to be
-//                traversed by the pathfinding object
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: trace_path
+//  Description: This function is the function which sends the path information one by
+//               one to the path follower so that it can store the path needed to be
+//               traversed by the pathfinding object
+////////////////////////////////////////////////////////////////////
 void PathFind::trace_path(Node* src) {
     if(_ai_char->_pf_guide) {
       _parent->remove_all_children();
@@ -336,16 +313,13 @@ void PathFind::trace_path(Node* src) {
     }
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : add_obstacle_to_mesh
-// Description : This function allows the user to dynamically add obstacles to the
-//                game environment. The function will update the nodes within the
-//                bounding volume of the obstacle as non-traversable. Hence will not be
-//                considered by the pathfinding algorithm.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: add_obstacle_to_mesh
+//  Description: This function allows the user to dynamically add obstacles to the
+//               game environment. The function will update the nodes within the
+//               bounding volume of the obstacle as non-traversable. Hence will not be
+//               considered by the pathfinding algorithm.
+////////////////////////////////////////////////////////////////////
 void PathFind::add_obstacle_to_mesh(NodePath obstacle) {
   PT(BoundingVolume) np_bounds = obstacle.get_bounds();
   CPT(BoundingSphere) np_sphere = np_bounds->as_bounding_sphere();
@@ -373,14 +347,11 @@ void PathFind::add_obstacle_to_mesh(NodePath obstacle) {
   }
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : do_dynamic_avoid()
-// Description : This function does the updation of the collisions to the mesh based
-//                on the new positions of the obstacles.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: do_dynamic_avoid()
+//  Description: This function does the updation of the collisions to the mesh based
+//               on the new positions of the obstacles.
+////////////////////////////////////////////////////////////////////
 void PathFind::do_dynamic_avoid() {
   clear_previous_obstacles();
   _previous_obstacles.clear();
@@ -389,28 +360,22 @@ void PathFind::do_dynamic_avoid() {
   }
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : clear_previous_obstacles()
-// Description : Helper function to reset the collisions if the obstacle is not on the
-//                node anymore
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: clear_previous_obstacles()
+//  Description: Helper function to reset the collisions if the obstacle is not on the
+//               node anymore
+////////////////////////////////////////////////////////////////////
 void PathFind::clear_previous_obstacles(){
   for(unsigned int i = 0; i < _previous_obstacles.size(); i = i + 2) {
       _nav_mesh[_previous_obstacles[i]][_previous_obstacles[i + 1]]->_type = true;
   }
 }
 
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : dynamic_avoid
-// Description : This function starts the pathfinding obstacle navigation for the
-//                passed in obstacle.
-
-///////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: dynamic_avoid
+//  Description: This function starts the pathfinding obstacle navigation for the
+//               passed in obstacle.
+////////////////////////////////////////////////////////////////////
 void PathFind::dynamic_avoid(NodePath obstacle) {
   _dynamic_avoid = true;
   _dynamic_obstacle.insert(_dynamic_obstacle.end(), obstacle);

+ 12 - 14
contrib/src/ai/pathFind.h

@@ -1,8 +1,6 @@
-
-////////////////////////////////////////////////////////////////////////
-// Filename    : pathFind.h
-// Created by  : Deepak, John, Navin
-// Date        :  12 Oct 09
+// Filename: pathFind.h
+// Created by: Deepak, John, Navin (12Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -24,15 +22,15 @@
 
 class AICharacter;
 
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-// Class : PathFind
-//  Description : This class contains all the members and functions that are required to form an interface between
-//                the AIBehaviors class and the PathFinder class. An object (pointer) of this class is provided in the
-//                AIBehaviors class. It is only via this object that the user can activate pathfinding.
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//       Class : PathFind
+// Description : This class contains all the members and functions
+//               that are required to form an interface between
+//               the AIBehaviors class and the PathFinder class.
+//               An object (pointer) of this class is provided in
+//               the AIBehaviors class.  It is only via this object
+//               that the user can activate pathfinding.
+////////////////////////////////////////////////////////////////////
 class EXPCL_PANDAAI PathFind {
 public:
   AICharacter *_ai_char;

+ 19 - 31
contrib/src/ai/pathFollow.cxx

@@ -12,25 +12,19 @@ PathFollow::PathFollow(AICharacter *ai_ch, float follow_wt) {
 PathFollow::~PathFollow() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : add_to_path
-// Description : This function adds the positions generated from a pathfind or a simple
+////////////////////////////////////////////////////////////////////
+//     Function: add_to_path
+//  Description: This function adds the positions generated from a pathfind or a simple
 //               path follow behavior to the _path list.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 void PathFollow::add_to_path(LVecBase3 pos) {
     _path.push_back(pos);
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : start
-// Description : This function initiates the path follow behavior.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: start
+//  Description: This function initiates the path follow behavior.
+////////////////////////////////////////////////////////////////////
 void PathFollow::start(string type) {
     _type = type;
   _start = true;
@@ -43,19 +37,16 @@ void PathFollow::start(string type) {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : do_follow
-// Description : This function allows continuous path finding by ai chars. There are 2
+////////////////////////////////////////////////////////////////////
+//     Function: do_follow
+//  Description: This function allows continuous path finding by ai chars. There are 2
 //               ways in which this is implemented.
 //               1. The character re-calculates the optimal path everytime the target
-//                  changes its position. Less computationally expensive.
+//               changes its position. Less computationally expensive.
 //               2. The character continuosly re-calculates its optimal path to the
-//                  target. This is used in a scenario where the ai chars have to avoid
-//                  other ai chars. More computationally expensive.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+//               target. This is used in a scenario where the ai chars have to avoid
+//               other ai chars. More computationally expensive.
+////////////////////////////////////////////////////////////////////
 void PathFollow::do_follow() {
   if((_myClock->get_real_time() - _time) > 0.5) {
       if(_type=="pathfind") {
@@ -109,14 +100,11 @@ void PathFollow::do_follow() {
   }
 }
 
-/////////////////////////////////////////////////////////////////////////////////////////
-//
-// Function : check_if_possible
-// Description : This function checks if the current positions of the ai char and the
+////////////////////////////////////////////////////////////////////
+//     Function: check_if_possible
+//  Description: This function checks if the current positions of the ai char and the
 //               target char can be used to generate an optimal path.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 bool PathFollow::check_if_possible() {
   Node* src = find_in_mesh(_ai_char->_steering->_path_find_obj->_nav_mesh, _ai_char->_ai_char_np.get_pos(_ai_char->_window_render), _ai_char->_steering->_path_find_obj->_grid_size);
   LVecBase3 _prev_position = _ai_char->_steering->_path_find_obj->_path_find_target.get_pos(_ai_char->_window_render);

+ 18 - 19
contrib/src/ai/pursue.cxx

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : pursue.cxx
-// Created by  : Deepak, John, Navin
-// Date        :  24 Oct 09
+// Filename: pursue.cxx
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -15,7 +14,8 @@
 
 #include "pursue.h"
 
-Pursue::Pursue(AICharacter *ai_ch, NodePath target_object, float pursue_wt) {
+Pursue::
+Pursue(AICharacter *ai_ch, NodePath target_object, float pursue_wt) {
   _ai_char = ai_ch;
 
   _pursue_target = target_object;
@@ -24,20 +24,19 @@ Pursue::Pursue(AICharacter *ai_ch, NodePath target_object, float pursue_wt) {
   _pursue_done = false;
 }
 
-Pursue::~Pursue() {
+Pursue::
+~Pursue() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : do_pursue
-// Description : This function performs the pursue and returns a pursue force which is used
-//                in the calculate_prioritized function.
-//                In case the target has been reached it resets the forces to 0 so that the character stops.
-//                This function is not to be used by the user.
-
-/////////////////////////////////////////////////////////////////////////////////
-
-LVecBase3 Pursue::do_pursue() {
+////////////////////////////////////////////////////////////////////
+//     Function: do_pursue
+//  Description: This function performs the pursue and returns a pursue force which is used
+//               in the calculate_prioritized function.
+//               In case the target has been reached it resets the forces to 0 so that the character stops.
+//               This function is not to be used by the user.
+////////////////////////////////////////////////////////////////////
+LVecBase3 Pursue::
+do_pursue() {
   assert(_pursue_target && "pursue target not assigned");
 
   LVecBase3 present_pos = _ai_char->_ai_char_np.get_pos(_ai_char->_window_render);
@@ -47,7 +46,7 @@ LVecBase3 Pursue::do_pursue() {
     _pursue_done = true;
     _ai_char->_steering->_steering_force = LVecBase3(0.0, 0.0, 0.0);
     _ai_char->_steering->_pursue_force = LVecBase3(0.0, 0.0, 0.0);
-    return(LVecBase3(0.0, 0.0, 0.0));
+    return LVecBase3(0.0, 0.0, 0.0);
   }
   else {
     _pursue_done = false;
@@ -57,5 +56,5 @@ LVecBase3 Pursue::do_pursue() {
   _pursue_direction.normalize();
 
   LVecBase3 desired_force = _pursue_direction * _ai_char->_movt_force;
-  return(desired_force);
+  return desired_force;
 }

+ 3 - 4
contrib/src/ai/pursue.h

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : pursue.h
-// Created by  : Deepak, John, Navin
-// Date        :  24 Oct 09
+// Filename: pursue.h
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE

+ 9 - 13
contrib/src/ai/seek.cxx

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : seek.cxx
-// Created by  : Deepak, John, Navin
-// Date        :  24 Oct 09
+// Filename: seek.cxx
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -42,15 +41,12 @@ Seek::Seek(AICharacter *ai_ch, LVecBase3 pos, float seek_wt) {
 Seek::~Seek() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : do_seek
-// Description : This function performs the seek and returns a seek force which is used
-//                in the calculate_prioritized function.
-//                This function is not to be used by the user.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: do_seek
+//  Description: This function performs the seek and returns a seek force which is used
+//               in the calculate_prioritized function.
+//               This function is not to be used by the user.
+////////////////////////////////////////////////////////////////////
 LVecBase3 Seek::do_seek() {
   double target_distance = (_seek_position - _ai_char->_ai_char_np.get_pos(_ai_char->_window_render)).length();
 

+ 3 - 4
contrib/src/ai/seek.h

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : seek.h
-// Created by  : Deepak, John, Navin
-// Date        :  24 Oct 09
+// Filename: seek.h
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE

+ 16 - 25
contrib/src/ai/wander.cxx

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : wander.cxx
-// Created by  : Deepak, John, Navin
-// Date        :  24 Oct 09
+// Filename: wander.cxx
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE
@@ -15,26 +14,20 @@
 
 #include "wander.h"
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : rand_float
-// Description : This function creates a random float point number
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
+//     Function: rand_float
+//  Description: This function creates a random float point number
+////////////////////////////////////////////////////////////////////
 double rand_float() {
   const static double rand_max = 0x7fff;
   return ((rand()) / (rand_max + 1.0));
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : random_clamped
-// Description : This function returns a random floating point number in the range
+////////////////////////////////////////////////////////////////////
+//     Function: random_clamped
+//  Description: This function returns a random floating point number in the range
 //               -1 to 1.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 double random_clamped() {
   return  (rand_float() - rand_float());
 }
@@ -82,15 +75,12 @@ Wander::Wander(AICharacter *ai_ch, double wander_radius,int flag, double aoe, fl
 Wander::~Wander() {
 }
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Function : do_wander
-// Description : This function performs the wander and returns the wander force which is used
+////////////////////////////////////////////////////////////////////
+//     Function: do_wander
+//  Description: This function performs the wander and returns the wander force which is used
 //               in the calculate_prioritized function.
 //               This function is not to be used by the user.
-
-/////////////////////////////////////////////////////////////////////////////////
-
+////////////////////////////////////////////////////////////////////
 LVecBase3 Wander::do_wander() {
   LVecBase3 present_pos = _ai_char->get_node_path().get_pos(_ai_char->get_char_render());
   // Create the random slices to enable random movement of wander for x,y,z respectively
@@ -123,6 +113,7 @@ LVecBase3 Wander::do_wander() {
   _wander_target *= _wander_radius;
   LVecBase3 target = _ai_char->get_char_render().get_relative_vector(_ai_char->get_node_path(), LVector3::forward());
   target.normalize();
+
   // Project wander target onto global space
   target = _wander_target + target;
   LVecBase3 desired_target = present_pos + target;

+ 3 - 4
contrib/src/ai/wander.h

@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////
-// Filename    : wander.h
-// Created by  : Deepak, John, Navin
-// Date        :  24 Oct 09
+// Filename: wander.h
+// Created by: Deepak, John, Navin (24Oct09)
+//
 ////////////////////////////////////////////////////////////////////
 //
 // PANDA 3D SOFTWARE

+ 53 - 53
direct/src/dcparser/dcClass.cxx

@@ -72,7 +72,7 @@ public:
 //  Description:
 ////////////////////////////////////////////////////////////////////
 DCClass::
-DCClass(DCFile *dc_file, const string &name, bool is_struct, bool bogus_class) : 
+DCClass(DCFile *dc_file, const string &name, bool is_struct, bool bogus_class) :
 #ifdef WITHIN_PANDA
   _class_update_pcollector(_update_pcollector, name),
   _class_generate_pcollector(_generate_pcollector, name),
@@ -116,7 +116,7 @@ DCClass::
 ////////////////////////////////////////////////////////////////////
 //     Function: DCClass::as_class
 //       Access: Published, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 DCClass *DCClass::
 as_class() {
@@ -126,7 +126,7 @@ as_class() {
 ////////////////////////////////////////////////////////////////////
 //     Function: DCClass::as_class
 //       Access: Published, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 const DCClass *DCClass::
 as_class() const {
@@ -155,7 +155,7 @@ get_parent(int n) const {
   nassertr(n >= 0 && n < (int)_parents.size(), NULL);
   return _parents[n];
 }
-  
+
 ////////////////////////////////////////////////////////////////////
 //     Function: DCClass::has_constructor
 //       Access: Published
@@ -166,7 +166,7 @@ bool DCClass::
 has_constructor() const {
   return (_constructor != (DCField *)NULL);
 }
-  
+
 ////////////////////////////////////////////////////////////////////
 //     Function: DCClass::get_constructor
 //       Access: Published
@@ -284,7 +284,7 @@ get_field_by_index(int index_number) const {
 ////////////////////////////////////////////////////////////////////
 int DCClass::
 get_num_inherited_fields() const {
-  if (dc_multiple_inheritance && dc_virtual_inheritance && 
+  if (dc_multiple_inheritance && dc_virtual_inheritance &&
       _dc_file != (DCFile *)NULL) {
     _dc_file->check_inherited_fields();
     if (_inherited_fields.empty()) {
@@ -303,7 +303,7 @@ get_num_inherited_fields() const {
     for (pi = _parents.begin(); pi != _parents.end(); ++pi) {
       num_fields += (*pi)->get_num_inherited_fields();
     }
-    
+
     return num_fields;
   }
 }
@@ -312,7 +312,7 @@ get_num_inherited_fields() const {
 //     Function: DCClass::get_inherited_field
 //       Access: Published
 //  Description: Returns the nth field field in the class and all of
-//               its ancestors.  
+//               its ancestors.
 //
 //               This *used* to be the same thing as
 //               get_field_by_index(), back when the fields were
@@ -322,7 +322,7 @@ get_num_inherited_fields() const {
 ////////////////////////////////////////////////////////////////////
 DCField *DCClass::
 get_inherited_field(int n) const {
-  if (dc_multiple_inheritance && dc_virtual_inheritance && 
+  if (dc_multiple_inheritance && dc_virtual_inheritance &&
       _dc_file != (DCFile *)NULL) {
     _dc_file->check_inherited_fields();
     if (_inherited_fields.empty()) {
@@ -338,18 +338,18 @@ get_inherited_field(int n) const {
       if (n < psize) {
         return (*pi)->get_inherited_field(n);
       }
-      
+
       n -= psize;
     }
-    
+
     return get_field(n);
   }
 }
 
 ////////////////////////////////////////////////////////////////////
-//     Function : DCClass::inherits_from_bogus_class
-//       Access : Published
-//  Description : Returns true if this class, or any class in the
+//     Function: DCClass::inherits_from_bogus_class
+//       Access: Published
+//  Description: Returns true if this class, or any class in the
 //                inheritance heirarchy for this class, is a "bogus"
 //                class--a forward reference to an as-yet-undefined
 //                class.
@@ -371,10 +371,10 @@ inherits_from_bogus_class() const {
 }
 
 ////////////////////////////////////////////////////////////////////
-//     Function : DCClass::output
-//       Access : Published, Virtual
-//  Description : Write a string representation of this instance to
-//                <out>.
+//     Function: DCClass::output
+//       Access: Published, Virtual
+//  Description: Write a string representation of this instance to
+//               <out>.
 ////////////////////////////////////////////////////////////////////
 void DCClass::
 output(ostream &out) const {
@@ -667,7 +667,7 @@ receive_update_other(PyObject *distobj, DatagramIterator &di) const {
 //               value blob.
 ////////////////////////////////////////////////////////////////////
 void DCClass::
-direct_update(PyObject *distobj, const string &field_name, 
+direct_update(PyObject *distobj, const string &field_name,
               const string &value_blob) {
   DCField *field = get_field_by_name(field_name);
   nassertv_always(field != NULL);
@@ -688,7 +688,7 @@ direct_update(PyObject *distobj, const string &field_name,
 //               datagram.
 ////////////////////////////////////////////////////////////////////
 void DCClass::
-direct_update(PyObject *distobj, const string &field_name, 
+direct_update(PyObject *distobj, const string &field_name,
               const Datagram &datagram) {
   direct_update(distobj, field_name, datagram.get_message());
 }
@@ -708,7 +708,7 @@ direct_update(PyObject *distobj, const string &field_name,
 //               Returns true on success, false on failure.
 ////////////////////////////////////////////////////////////////////
 bool DCClass::
-pack_required_field(Datagram &datagram, PyObject *distobj, 
+pack_required_field(Datagram &datagram, PyObject *distobj,
                     const DCField *field) const {
   DCPacker packer;
   packer.begin_pack(field);
@@ -738,7 +738,7 @@ pack_required_field(Datagram &datagram, PyObject *distobj,
 //               Returns true on success, false on failure.
 ////////////////////////////////////////////////////////////////////
 bool DCClass::
-pack_required_field(DCPacker &packer, PyObject *distobj, 
+pack_required_field(DCPacker &packer, PyObject *distobj,
                     const DCField *field) const {
   const DCParameter *parameter = field->as_parameter();
   if (parameter != (DCParameter *)NULL) {
@@ -762,14 +762,14 @@ pack_required_field(DCPacker &packer, PyObject *distobj,
       nassert_raise(strm.str());
       return false;
     }
-    PyObject *result = 
+    PyObject *result =
       PyObject_GetAttrString(distobj, (char *)field_name.c_str());
     nassertr(result != (PyObject *)NULL, false);
 
     // Now pack the value into the datagram.
     bool pack_ok = parameter->pack_args(packer, result);
     Py_DECREF(result);
-    
+
     return pack_ok;
   }
 
@@ -805,7 +805,7 @@ pack_required_field(DCPacker &packer, PyObject *distobj,
     nassert_raise(strm.str());
     return false;
   }
-  
+
   string getter_name = setter_name;
   if (setter_name.substr(0, 3) == "set") {
     // If the original method started with "set", we mangle this
@@ -818,7 +818,7 @@ pack_required_field(DCPacker &packer, PyObject *distobj,
     getter_name = "get" + setter_name;
     getter_name[3] = toupper(getter_name[3]);
   }
-  
+
   // Now we have to look up the getter on the distributed object
   // and call it.
   if (!PyObject_HasAttrString(distobj, (char *)getter_name.c_str())) {
@@ -837,10 +837,10 @@ pack_required_field(DCPacker &packer, PyObject *distobj,
     nassert_raise(strm.str());
     return false;
   }
-  PyObject *func = 
+  PyObject *func =
     PyObject_GetAttrString(distobj, (char *)getter_name.c_str());
   nassertr(func != (PyObject *)NULL, false);
-  
+
   PyObject *empty_args = PyTuple_New(0);
   PyObject *result = PyObject_CallObject(func, empty_args);
   Py_DECREF(empty_args);
@@ -851,7 +851,7 @@ pack_required_field(DCPacker &packer, PyObject *distobj,
     cerr << "Error when calling " << getter_name << "\n";
     return false;
   }
-  
+
   if (atom->get_num_elements() == 1) {
     // In this case, we expect the getter to return one object,
     // which we wrap up in a tuple.
@@ -865,13 +865,13 @@ pack_required_field(DCPacker &packer, PyObject *distobj,
     if (!PySequence_Check(result)) {
       ostringstream strm;
       strm << "Since dclass " << get_name() << " method " << setter_name
-           << " is declared to have multiple parameters, Python function " 
+           << " is declared to have multiple parameters, Python function "
            << getter_name << " must return a list or tuple.\n";
       nassert_raise(strm.str());
       return false;
     }
   }
-  
+
   // Now pack the arguments into the datagram.
   bool pack_ok = atom->pack_args(packer, result);
   Py_DECREF(result);
@@ -889,7 +889,7 @@ pack_required_field(DCPacker &packer, PyObject *distobj,
 //               object from the client.
 ////////////////////////////////////////////////////////////////////
 Datagram DCClass::
-client_format_update(const string &field_name, DOID_TYPE do_id, 
+client_format_update(const string &field_name, DOID_TYPE do_id,
                      PyObject *args) const {
   DCField *field = get_field_by_name(field_name);
   if (field == (DCField *)NULL) {
@@ -913,7 +913,7 @@ client_format_update(const string &field_name, DOID_TYPE do_id,
 //               object from the AI.
 ////////////////////////////////////////////////////////////////////
 Datagram DCClass::
-ai_format_update(const string &field_name, DOID_TYPE do_id, 
+ai_format_update(const string &field_name, DOID_TYPE do_id,
                  CHANNEL_TYPE to_id, CHANNEL_TYPE from_id, PyObject *args) const {
   DCField *field = get_field_by_name(field_name);
   if (field == (DCField *)NULL) {
@@ -938,7 +938,7 @@ ai_format_update(const string &field_name, DOID_TYPE do_id,
 //               object from the AI.
 ////////////////////////////////////////////////////////////////////
 Datagram DCClass::
-ai_format_update_msg_type(const string &field_name, DOID_TYPE do_id, 
+ai_format_update_msg_type(const string &field_name, DOID_TYPE do_id,
                  CHANNEL_TYPE to_id, CHANNEL_TYPE from_id, int msg_type, PyObject *args) const {
   DCField *field = get_field_by_name(field_name);
   if (field == (DCField *)NULL) {
@@ -968,7 +968,7 @@ ai_format_update_msg_type(const string &field_name, DOID_TYPE do_id,
 //               This method is only called by the CMU implementation.
 ////////////////////////////////////////////////////////////////////
 Datagram DCClass::
-client_format_generate_CMU(PyObject *distobj, DOID_TYPE do_id, 
+client_format_generate_CMU(PyObject *distobj, DOID_TYPE do_id,
                            ZONEID_TYPE zone_id,
                            PyObject *optional_fields) const {
   DCPacker packer;
@@ -1041,7 +1041,7 @@ client_format_generate_CMU(PyObject *distobj, DOID_TYPE do_id,
 //               in addition to the normal required fields.
 ////////////////////////////////////////////////////////////////////
 Datagram DCClass::
-ai_format_generate(PyObject *distobj, DOID_TYPE do_id, 
+ai_format_generate(PyObject *distobj, DOID_TYPE do_id,
                    DOID_TYPE parent_id, ZONEID_TYPE zone_id,
                    CHANNEL_TYPE district_channel_id, CHANNEL_TYPE from_channel_id,
                    PyObject *optional_fields) const {
@@ -1059,7 +1059,7 @@ ai_format_generate(PyObject *distobj, DOID_TYPE do_id,
   } else {
     packer.raw_pack_uint16(STATESERVER_OBJECT_GENERATE_WITH_REQUIRED);
   }
-  
+
   // Parent is a bit overloaded; this parent is not about inheritance,
   // this one is about the visibility container parent, i.e. the zone
   // parent:
@@ -1126,14 +1126,14 @@ ai_format_generate(PyObject *distobj, DOID_TYPE do_id,
 //  Description: Generates a datagram containing the message necessary
 //               to create a new database distributed object from the AI.
 //
-//               First Pass is to only incldue required values
-//               (with Defaults).                   
+//               First Pass is to only include required values
+//               (with Defaults).
 ////////////////////////////////////////////////////////////////////
 Datagram DCClass::
 ai_database_generate_context(
     unsigned int context_id, DOID_TYPE parent_id, ZONEID_TYPE zone_id,
     CHANNEL_TYPE owner_channel,
-    CHANNEL_TYPE database_server_id, CHANNEL_TYPE from_channel_id) const 
+    CHANNEL_TYPE database_server_id, CHANNEL_TYPE from_channel_id) const
 {
   DCPacker packer;
   packer.raw_pack_uint8(1);
@@ -1141,7 +1141,7 @@ ai_database_generate_context(
   packer.RAW_PACK_CHANNEL(from_channel_id);
   //packer.raw_pack_uint8('A');
   packer.raw_pack_uint16(STATESERVER_OBJECT_CREATE_WITH_REQUIRED_CONTEXT);
-  packer.raw_pack_uint32(parent_id);  
+  packer.raw_pack_uint32(parent_id);
   packer.raw_pack_uint32(zone_id);
   packer.RAW_PACK_CHANNEL(owner_channel);
   packer.raw_pack_uint16(_number); // DCD class ID
@@ -1170,13 +1170,13 @@ ai_database_generate_context(
 //  Description: Generates a datagram containing the message necessary
 //               to create a new database distributed object from the AI.
 //
-//               First Pass is to only incldue required values
-//               (with Defaults).                   
+//               First Pass is to only include required values
+//               (with Defaults).
 ////////////////////////////////////////////////////////////////////
 Datagram DCClass::
 ai_database_generate_context_old(
     unsigned int context_id, DOID_TYPE parent_id, ZONEID_TYPE zone_id,
-    CHANNEL_TYPE database_server_id, CHANNEL_TYPE from_channel_id) const 
+    CHANNEL_TYPE database_server_id, CHANNEL_TYPE from_channel_id) const
 {
   DCPacker packer;
   packer.raw_pack_uint8(1);
@@ -1184,7 +1184,7 @@ ai_database_generate_context_old(
   packer.RAW_PACK_CHANNEL(from_channel_id);
   //packer.raw_pack_uint8('A');
   packer.raw_pack_uint16(STATESERVER_OBJECT_CREATE_WITH_REQUIRED_CONTEXT);
-  packer.raw_pack_uint32(parent_id);  
+  packer.raw_pack_uint32(parent_id);
   packer.raw_pack_uint32(zone_id);
   packer.raw_pack_uint16(_number); // DCD class ID
   packer.raw_pack_uint32(context_id);
@@ -1205,10 +1205,10 @@ ai_database_generate_context_old(
 #endif  // HAVE_PYTHON
 
 ////////////////////////////////////////////////////////////////////
-//     Function : DCClass::output
-//       Access : Public, Virtual
-//  Description : Write a string representation of this instance to
-//                <out>.
+//     Function: DCClass::output
+//       Access: Public, Virtual
+//  Description: Write a string representation of this instance to
+//               <out>.
 ////////////////////////////////////////////////////////////////////
 void DCClass::
 output(ostream &out, bool brief) const {
@@ -1284,7 +1284,7 @@ write(ostream &out, bool brief, int indent_level) const {
 //               the indicated output stream.
 ////////////////////////////////////////////////////////////////////
 void DCClass::
-output_instance(ostream &out, bool brief, const string &prename, 
+output_instance(ostream &out, bool brief, const string &prename,
                 const string &name, const string &postname) const {
   if (_is_struct) {
     out << "struct";
@@ -1380,7 +1380,7 @@ rebuild_inherited_fields() {
   Names names;
 
   _inherited_fields.clear();
-  
+
   // First, all of the inherited fields from our parent are at the top
   // of the list.
   Parents::const_iterator pi;
@@ -1413,7 +1413,7 @@ rebuild_inherited_fields() {
   for (fi = _fields.begin(); fi != _fields.end(); ++fi) {
     DCField *field = (*fi);
     if (field->get_name().empty()) {
-      // Unnamed fields are always added. 
+      // Unnamed fields are always added.
      _inherited_fields.push_back(field);
 
     } else {
@@ -1500,7 +1500,7 @@ add_field(DCField *field) {
     }
   }
 
-  if (_dc_file != (DCFile *)NULL && 
+  if (_dc_file != (DCFile *)NULL &&
       ((dc_virtual_inheritance && dc_sort_inheritance_by_file) || !is_struct())) {
     if (dc_multiple_inheritance) {
       _dc_file->set_new_index_number(field);

+ 12 - 12
direct/src/dcparser/dcDeclaration.cxx

@@ -27,7 +27,7 @@ DCDeclaration::
 ////////////////////////////////////////////////////////////////////
 //     Function: DCDeclaration::as_class
 //       Access: Published, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 DCClass *DCDeclaration::
 as_class() {
@@ -37,7 +37,7 @@ as_class() {
 ////////////////////////////////////////////////////////////////////
 //     Function: DCDeclaration::as_class
 //       Access: Published, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 const DCClass *DCDeclaration::
 as_class() const {
@@ -47,7 +47,7 @@ as_class() const {
 ////////////////////////////////////////////////////////////////////
 //     Function: DCDeclaration::as_switch
 //       Access: Published, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 DCSwitch *DCDeclaration::
 as_switch() {
@@ -57,7 +57,7 @@ as_switch() {
 ////////////////////////////////////////////////////////////////////
 //     Function: DCDeclaration::as_switch
 //       Access: Published, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 const DCSwitch *DCDeclaration::
 as_switch() const {
@@ -65,10 +65,10 @@ as_switch() const {
 }
 
 ////////////////////////////////////////////////////////////////////
-//     Function : DCDeclaration::output
-//       Access : Published, Virtual
-//  Description : Write a string representation of this instance to
-//                <out>.
+//     Function: DCDeclaration::output
+//       Access: Published, Virtual
+//  Description: Write a string representation of this instance to
+//               <out>.
 ////////////////////////////////////////////////////////////////////
 void DCDeclaration::
 output(ostream &out) const {
@@ -76,10 +76,10 @@ output(ostream &out) const {
 }
 
 ////////////////////////////////////////////////////////////////////
-//     Function : DCDeclaration::
-//       Access : Published
-//  Description : Write a string representation of this instance to
-//                <out>.
+//     Function: DCDeclaration::
+//       Access: Published
+//  Description: Write a string representation of this instance to
+//               <out>.
 ////////////////////////////////////////////////////////////////////
 void DCDeclaration::
 write(ostream &out, int indent_level) const {

+ 8 - 8
direct/src/dcparser/dcField.I

@@ -178,10 +178,10 @@ is_airecv() const {
 }
 
 ////////////////////////////////////////////////////////////////////
-//     Function : DCField::output
-//       Access : Published
-//  Description : Write a string representation of this instance to
-//                <out>.
+//     Function: DCField::output
+//       Access: Published
+//  Description: Write a string representation of this instance to
+//               <out>.
 ////////////////////////////////////////////////////////////////////
 INLINE void DCField::
 output(ostream &out) const {
@@ -189,10 +189,10 @@ output(ostream &out) const {
 }
 
 ////////////////////////////////////////////////////////////////////
-//     Function : DCField::
-//       Access : Published
-//  Description : Write a string representation of this instance to
-//                <out>.
+//     Function: DCField::
+//       Access: Published
+//  Description: Write a string representation of this instance to
+//               <out>.
 ////////////////////////////////////////////////////////////////////
 INLINE void DCField::
 write(ostream &out, int indent_level) const {

+ 6 - 6
direct/src/dcparser/dcKeyword.cxx

@@ -19,7 +19,7 @@
 ////////////////////////////////////////////////////////////////////
 //     Function: DCKeyword::Constructor
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 DCKeyword::
 DCKeyword(const string &name, int historical_flag) :
@@ -74,10 +74,10 @@ clear_historical_flag() {
 }
 
 ////////////////////////////////////////////////////////////////////
-//     Function : DCKeyword::output
-//       Access : Public, Virtual
-//  Description : Write a string representation of this instance to
-//                <out>.
+//     Function: DCKeyword::output
+//       Access: Public, Virtual
+//  Description: Write a string representation of this instance to
+//               <out>.
 ////////////////////////////////////////////////////////////////////
 void DCKeyword::
 output(ostream &out, bool brief) const {
@@ -87,7 +87,7 @@ output(ostream &out, bool brief) const {
 ////////////////////////////////////////////////////////////////////
 //     Function: DCKeyword::write
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 void DCKeyword::
 write(ostream &out, bool, int indent_level) const {

+ 18 - 18
direct/src/dcparser/dcSwitch.cxx

@@ -67,7 +67,7 @@ DCSwitch::
 ////////////////////////////////////////////////////////////////////
 //     Function: DCSwitch::as_switch
 //       Access: Published, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 DCSwitch *DCSwitch::
 as_switch() {
@@ -77,7 +77,7 @@ as_switch() {
 ////////////////////////////////////////////////////////////////////
 //     Function: DCSwitch::as_switch
 //       Access: Published, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 const DCSwitch *DCSwitch::
 as_switch() const {
@@ -351,10 +351,10 @@ apply_switch(const char *value_data, size_t length) const {
 }
 
 ////////////////////////////////////////////////////////////////////
-//     Function : DCSwitch::output
-//       Access : Public, Virtual
-//  Description : Write a string representation of this instance to
-//                <out>.
+//     Function: DCSwitch::output
+//       Access: Public, Virtual
+//  Description: Write a string representation of this instance to
+//               <out>.
 ////////////////////////////////////////////////////////////////////
 void DCSwitch::
 output(ostream &out, bool brief) const {
@@ -379,7 +379,7 @@ write(ostream &out, bool brief, int indent_level) const {
 //               the indicated output stream.
 ////////////////////////////////////////////////////////////////////
 void DCSwitch::
-output_instance(ostream &out, bool brief, const string &prename, 
+output_instance(ostream &out, bool brief, const string &prename,
                 const string &name, const string &postname) const {
   out << "switch";
   if (!_name.empty()) {
@@ -426,7 +426,7 @@ output_instance(ostream &out, bool brief, const string &prename,
 ////////////////////////////////////////////////////////////////////
 void DCSwitch::
 write_instance(ostream &out, bool brief, int indent_level,
-               const string &prename, const string &name, 
+               const string &prename, const string &name,
                const string &postname) const {
   indent(out, indent_level)
     << "switch";
@@ -532,7 +532,7 @@ pack_default_value(DCPackData &pack_data, bool &pack_error) const {
     // default.
     packer.pack_default_value();
     fields = _default_case;
-  }    
+  }
 
   if (!packer.end_pack()) {
     pack_error = true;
@@ -634,7 +634,7 @@ start_new_case() {
 ////////////////////////////////////////////////////////////////////
 //     Function: DCSwitch::SwitchFields::Constructor
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 DCSwitch::SwitchFields::
 SwitchFields(const string &name) :
@@ -654,7 +654,7 @@ SwitchFields(const string &name) :
 ////////////////////////////////////////////////////////////////////
 //     Function: DCSwitch::SwitchFields::Destructor
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 DCSwitch::SwitchFields::
 ~SwitchFields() {
@@ -690,7 +690,7 @@ add_field(DCField *field) {
   if (!field->get_name().empty()) {
     bool inserted = _fields_by_name.insert
       (FieldsByName::value_type(field->get_name(), field)).second;
-    
+
     if (!inserted) {
       return false;
     }
@@ -738,11 +738,11 @@ do_check_match_switch_case(const DCSwitch::SwitchFields *other) const {
 
   return true;
 }
-    
+
 ////////////////////////////////////////////////////////////////////
 //     Function: DCSwitch::SwitchFields::output
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 void DCSwitch::SwitchFields::
 output(ostream &out, bool brief) const {
@@ -758,11 +758,11 @@ output(ostream &out, bool brief) const {
   }
   out << "break; ";
 }
-    
+
 ////////////////////////////////////////////////////////////////////
 //     Function: DCSwitch::SwitchFields::write
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 void DCSwitch::SwitchFields::
 write(ostream &out, bool brief, int indent_level) const {
@@ -797,7 +797,7 @@ do_check_match(const DCPackerInterface *) const {
 ////////////////////////////////////////////////////////////////////
 //     Function: DCSwitch::SwitchCase::Constructor
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 DCSwitch::SwitchCase::
 SwitchCase(const string &value, DCSwitch::SwitchFields *fields) :
@@ -809,7 +809,7 @@ SwitchCase(const string &value, DCSwitch::SwitchFields *fields) :
 ////////////////////////////////////////////////////////////////////
 //     Function: DCSwitch::SwitchCase::Destructor
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 DCSwitch::SwitchCase::
 ~SwitchCase() {

+ 2 - 2
direct/src/dcparser/dcSwitchParameter.h

@@ -1,4 +1,4 @@
-// Filename: dcClassParameter.h
+// Filename: dcSwitchParameter.h
 // Created by:  drose (29Jun04)
 //
 ////////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ public:
 
   const DCPackerInterface *apply_switch(const char *value_data, size_t length) const;
 
-  virtual void output_instance(ostream &out, bool brief, const string &prename, 
+  virtual void output_instance(ostream &out, bool brief, const string &prename,
                                const string &name, const string &postname) const;
   virtual void write_instance(ostream &out, bool brief, int indent_level,
                               const string &prename, const string &name,

+ 5 - 5
direct/src/dcparser/dcTypedef.cxx

@@ -146,10 +146,10 @@ set_number(int number) {
 }
 
 ////////////////////////////////////////////////////////////////////
-//     Function : DCTypedef::output
-//       Access : Public, Virtual
-//  Description : Write a string representation of this instance to
-//                <out>.
+//     Function: DCTypedef::output
+//       Access: Public, Virtual
+//  Description: Write a string representation of this instance to
+//               <out>.
 ////////////////////////////////////////////////////////////////////
 void DCTypedef::
 output(ostream &out, bool brief) const {
@@ -160,7 +160,7 @@ output(ostream &out, bool brief) const {
 ////////////////////////////////////////////////////////////////////
 //     Function: DCTypedef::write
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 void DCTypedef::
 write(ostream &out, bool brief, int indent_level) const {

+ 2 - 2
direct/src/directbase/ppython.cxx

@@ -1,11 +1,11 @@
-///////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //
 // This is a little wrapper to make it easy to run a python
 // program from the command line. Basically, it just interfaces
 // to the Python API and imports the module that was specified
 // by the IMPORT_MODULE preprocessor definition when it was compiled.
 //
-///////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 
 #include "dtoolbase.h"
 

+ 45 - 42
direct/src/directd/directd.h

@@ -29,45 +29,48 @@ typedef int HANDLE;
 #endif //]
 
 
-// Description: DirectD is a client/server app for starting panda/direct.
-//              
-//              Usage:
-//              Start a directd server on each of the machines you
-//              which to start panda on.
-//              
-//              Start a directd client on the controlling machine or 
-//              import ShowBaseGlobal with the xxxxx flag in your
-//              Configrc.  The client will connect each of the servers 
-//              in the xxxxx list in your Configrc.
-//              
-//              There are two API groups in this class, they are:
-//              
-//                listen_to()
-//                client_ready() or tell_server()
-//                wait_for_servers()
-//                server_ready()
-//              
-//              and:
-//              
-//                connect_to()
-//                send_command()
-//                disconnect_from()
-//              
-//              The second group was from a more general implementation
-//              of DirectD.  The first group summarizes the main intents
-//              of DirectD.
-//              Both groups are presented in order chronologically by their
-//              intended usage.
-//              The first group will probably provide everthing needed for
-//              DirectD.
+////////////////////////////////////////////////////////////////////
+//       Class : DirectD
+// Description : DirectD is a client/server app for starting panda/direct.
+//
+//               Usage:
+//               Start a directd server on each of the machines you
+//               which to start panda on.
+//
+//               Start a directd client on the controlling machine or
+//               import ShowBaseGlobal with the xxxxx flag in your
+//               Configrc.  The client will connect each of the servers
+//               in the xxxxx list in your Configrc.
+//
+//               There are two API groups in this class, they are:
+//
+//                 listen_to()
+//                 client_ready() or tell_server()
+//                 wait_for_servers()
+//                 server_ready()
+//
+//               and:
+//
+//                 connect_to()
+//                 send_command()
+//                 disconnect_from()
+//
+//               The second group was from a more general implementation
+//               of DirectD.  The first group summarizes the main intents
+//               of DirectD.
+//               Both groups are presented in order chronologically by their
+//               intended usage.
+//               The first group will probably provide everthing needed for
+//               DirectD.
+////////////////////////////////////////////////////////////////////
 class EXPCL_DIRECT DirectD {
 PUBLISHED:
   DirectD();
   ~DirectD();
-  
+
   // Description: Call listen_to in the server.
   //              port is a rendezvous port.
-  //              
+  //
   //              backlog refers to how many connections can queue up
   //              before you handle them.  Consider setting backlog to
   //              the count you send to wait_for_servers(); or higher.
@@ -84,7 +87,7 @@ PUBLISHED:
 
   // Description: Tell the server to do the command cmd.
   //              cmd is one of the following:
-  //                "k[<n>]"    Kill the most recent application 
+  //                "k[<n>]"    Kill the most recent application
   //                            started with client_ready() or "!".
   //                            Or kill the nth most recent or 'a' for All.
   //                            E.g. "k", "k0", "k2", "ka".
@@ -99,31 +102,31 @@ PUBLISHED:
 
   // Description: Call this function from the client after
   //              calling <count> client_ready() calls.
-  //              
+  //
   //              Call listen_to(port) prior to calling
   //              wait_for_servers() (or better yet, prior
   //              to calling client_ready()).
-  //              
+  //
   //              timeout_ms defaults to two minutes.
   bool wait_for_servers(int count, int timeout_ms=2*60*1000);
 
   // Description: Call this function from the server when
   //              import ShowbaseGlobal is nearly finished.
   int server_ready(const string& client_host, int port);
-  
+
   // Description: Call connect_to from client for each server.
   //              returns the port number of the connection (which
   //              is different from the rendezvous port used in the
   //              second argument).  The return value can be used
   //              for the port arguemnt in disconnect_from().
   int connect_to(const string& server_host, int port);
-  
+
   // Description: This is the counterpart to connect_to().  Pass
   //              the same server_host as for connect_to(), but pass
   //              the return value from connect_to() for the port,
   //              not the port passed to connect_to().
   void disconnect_from(const string& server_host, int port);
-  
+
   // Description: Send the same command string to all current
   //              connections.
   void send_command(const string& cmd);
@@ -134,7 +137,7 @@ protected:
   void kill_all();
   virtual void handle_command(const string& cmd);
   void handle_datagram(NetDatagram& datagram);
-  void send_one_message(const string& host_name, 
+  void send_one_message(const string& host_name,
       int port, const string& message);
 
   QueuedConnectionManager _cm;
@@ -143,7 +146,7 @@ protected:
   QueuedConnectionListener _listener;
 
   // Start of old stuff:
-  // This is used to switch to the original method of 
+  // This is used to switch to the original method of
   // starting applications.  It can be used on old systems
   // that don't support job objects.  Eventually this stuff
   // should be removed.
@@ -156,7 +159,7 @@ protected:
   ConnectionSet _connections;
   HANDLE _jobObject;
   bool _shutdown;
-  
+
   void check_for_new_clients();
   void check_for_datagrams();
   void check_for_lost_connection();

+ 4 - 2
direct/src/directdServer/directdClient.h

@@ -14,7 +14,10 @@
 
 #include "directd.h"
 
-// Description: DirectDClient is a test app for DriectDServer.
+////////////////////////////////////////////////////////////////////
+//       Class : DirectDClient
+// Description : DirectDClient is a test app for DirectDServer.
+////////////////////////////////////////////////////////////////////
 class DirectDClient: public DirectD {
 public:
   DirectDClient();
@@ -25,4 +28,3 @@ public:
 protected:
   void cli_command(const string& cmd);
 };
-

+ 11 - 8
direct/src/directdServer/directdServer.h

@@ -15,18 +15,21 @@
 #include "queuedConnectionReader.h"
 #include "directd.h"
 
-// Description: Start a directdServer on each of the machines you
-//              which to start panda on.
-//              
-//              Start a directdClient on the controlling machine
-//              or import ShowBaseGlobal with the xxxxx flag in
-//              your Configrc.  The client will connact each of
-//              the servers in the xxxxx list in your Configrc.
+////////////////////////////////////////////////////////////////////
+//       Class : DirectDServer
+// Description : Start a directdServer on each of the machines you
+//               which to start panda on.
+//
+//               Start a directdClient on the controlling machine
+//               or import ShowBaseGlobal with the xxxxx flag in
+//               your Configrc.  The client will connact each of
+//               the servers in the xxxxx list in your Configrc.
+////////////////////////////////////////////////////////////////////
 class DirectDServer: public DirectD {
 public:
   DirectDServer();
   ~DirectDServer();
-  
+
   void run_server(int port);
 
 protected:

+ 52 - 52
direct/src/motiontrail/cMotionTrail.cxx

@@ -1,4 +1,4 @@
-// Filename: cMotionTrail.h
+// Filename: cMotionTrail.cxx
 // Created by:  aignacio (29Jan07)
 //
 ////////////////////////////////////////////////////////////////////
@@ -30,7 +30,7 @@ CMotionTrail ( ) {
 
   _active = true;
   _enable = true;
-  
+
   _pause = false;
   _pause_time = 0.0f;
 
@@ -63,7 +63,7 @@ CMotionTrail ( ) {
   // real-time data
   _vertex_index = 0;
   _vertex_data = 0;
-  _triangles = 0;  
+  _triangles = 0;
 
   _vertex_array = 0;
 }
@@ -132,7 +132,7 @@ add_vertex (LVector4 *vertex, LVector4 *start_color, LVector4 *end_color, PN_std
   motion_trail_vertex._start_color = *start_color;
   motion_trail_vertex._end_color = *end_color;
   motion_trail_vertex._v = v;
-  
+
   motion_trail_vertex._nurbs_curve_evaluator = new NurbsCurveEvaluator ( );
 
   _vertex_list.push_back (motion_trail_vertex);
@@ -143,23 +143,23 @@ add_vertex (LVector4 *vertex, LVector4 *start_color, LVector4 *end_color, PN_std
 //       Access: Published
 //  Description: Set motion trail parameters.
 //
-//               sampling_time = Can be used to specify a lower 
-//               sampling rate than the frame rate. Use 0.0 with 
-//               nurbs. 
+//               sampling_time = Can be used to specify a lower
+//               sampling rate than the frame rate. Use 0.0 with
+//               nurbs.
 //
-//               time_window = a component for the "length" of the 
-//               motion trail.  The motion trail length = 
+//               time_window = a component for the "length" of the
+//               motion trail.  The motion trail length =
 //               time_window * velocity of the object.
 //
 //               use_texture = texture option on/off.
 //
-//               calculate_relative_matrix = calculate relative 
+//               calculate_relative_matrix = calculate relative
 //               matrix on/off.
 //
 //               use_nurbs = nurbs option on/off
 //
-//               resolution_distance = the distance used to 
-//               determine the number of geometry samples. 
+//               resolution_distance = the distance used to
+//               determine the number of geometry samples.
 //               samples = motion trail length / resolution_distance.
 //               Applicable only if nurbs is on.
 ////////////////////////////////////////////////////////////////////
@@ -183,7 +183,7 @@ int CMotionTrail::
 check_for_update (PN_stdfloat current_time) {
 
   int state;
-  
+
   state = false;
   if ((current_time - _last_update_time) >= _sampling_time) {
       state = true;
@@ -208,14 +208,14 @@ PN_stdfloat one_minus_x (PN_stdfloat x) {
 ////////////////////////////////////////////////////////////////////
 //     Function: CMotionTrail::begin_geometry
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 void CMotionTrail::
 begin_geometry ( ) {
 
   const GeomVertexFormat *format;
 
-  _vertex_index = 0;  
+  _vertex_index = 0;
   if (_use_texture) {
     format = GeomVertexFormat::get_v3c4t2 ( );
   }
@@ -236,7 +236,7 @@ begin_geometry ( ) {
   if (_use_texture) {
     _texture_writer = GeomVertexWriter (_vertex_data, "texcoord");
   }
-  
+
   _triangles = new GeomTriangles (Geom::UH_static);
 }
 
@@ -325,16 +325,16 @@ add_geometry_quad (LVector4 &v0, LVector4 &v1, LVector4 &v2, LVector4 &v3, LVect
 ////////////////////////////////////////////////////////////////////
 //     Function: CMotionTrail::end_geometry
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
-void CMotionTrail::end_geometry ( ) {    
+void CMotionTrail::end_geometry ( ) {
   static CPT(RenderState) state;
   if (state == (RenderState *)NULL) {
     state = RenderState::make(ColorAttrib::make_vertex());
   }
 
   PT(Geom) geometry;
-  
+
   geometry = new Geom (_vertex_data);
   geometry -> add_primitive (_triangles);
 
@@ -354,14 +354,14 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
 
   int debug;
   int total_frames;
-  
+
   debug = false;
 
   total_frames = _frame_list.size ( );
   if (total_frames >= 1) {
     FrameList::iterator frame_iterator;
     CMotionTrailFrame motion_trail_frame;
- 
+
     frame_iterator = _frame_list.begin ( );
     motion_trail_frame = *frame_iterator;
     if (*transform == motion_trail_frame._transform) {
@@ -380,7 +380,7 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
   color_scale = _color_scale;
   if (_fade) {
     PN_stdfloat elapsed_time;
-    
+
     elapsed_time = current_time - _fade_start_time;
     if (elapsed_time < 0.0) {
       elapsed_time = 0.0;
@@ -398,20 +398,20 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
 
   // remove expired frames
   PN_stdfloat minimum_time;
-  
+
   minimum_time = current_time - _time_window;
-  
+
   CMotionTrailFrame motion_trail_frame;
-  
+
   while (!_frame_list.empty()) {
     motion_trail_frame = _frame_list.back();
     if (motion_trail_frame._time >= minimum_time) {
       break;
     }
-    
+
     _frame_list.pop_back ( );
   }
-  
+
   // add new frame to beginning of list
   {
     CMotionTrailFrame motion_trail_frame;
@@ -435,21 +435,21 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
     PN_stdfloat delta_time;
     CMotionTrailFrame last_motion_trail_frame;
 
-    VertexList::iterator vertex_iterator;    
+    VertexList::iterator vertex_iterator;
 
     // convert vertex list to vertex array
     int index = 0;
     _vertex_array = new CMotionTrailVertex [total_vertices];
-    for (vertex_iterator = _vertex_list.begin ( ); vertex_iterator != _vertex_list.end ( ); vertex_iterator++) {   
-      _vertex_array [index] = *vertex_iterator;        
+    for (vertex_iterator = _vertex_list.begin ( ); vertex_iterator != _vertex_list.end ( ); vertex_iterator++) {
+      _vertex_array [index] = *vertex_iterator;
       index++;
     }
-    
+
     // begin geometry
     this -> begin_geometry ( );
 
     total_segments = total_frames - 1;
-      
+
     last_motion_trail_frame = _frame_list.back();
     minimum_time = last_motion_trail_frame._time;
     delta_time = current_time - minimum_time;
@@ -460,10 +460,10 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
     }
 
     if (_use_nurbs && (total_frames >= 5)) {
-    
+
       // nurbs version
       int total_vertex_segments;
-      PN_stdfloat total_distance;  
+      PN_stdfloat total_distance;
       LVector3 vector;
       LVector4 v;
       LVector4 v0;
@@ -479,19 +479,19 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
         CMotionTrailVertex *motion_trail_vertex;
         PT(NurbsCurveEvaluator) nurbs_curve_evaluator;
 
-        for (index = 0; index < total_vertices; index++) {   
+        for (index = 0; index < total_vertices; index++) {
           motion_trail_vertex = &_vertex_array [index];
           nurbs_curve_evaluator = motion_trail_vertex -> _nurbs_curve_evaluator;
           nurbs_curve_evaluator -> set_order (4);
           nurbs_curve_evaluator -> reset (total_segments);
         }
       }
-      
+
       // add vertices to each NurbsCurveEvaluator
       int segment_index;
       CMotionTrailFrame motion_trail_frame_start;
       CMotionTrailFrame motion_trail_frame_end;
-      
+
       segment_index = 0;
 
       FrameList::iterator frame_iterator;
@@ -549,13 +549,13 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
 
         segment_index += 1;
       }
-      
+
       // evaluate NurbsCurveEvaluator for each vertex
       PT(NurbsCurveResult) *nurbs_curve_result_array;
-      
+
       nurbs_curve_result_array = new PT(NurbsCurveResult) [total_vertices];
       for (index = 0; index < total_vertices; index++) {
-      
+
         CMotionTrailVertex *motion_trail_vertex;
         PT(NurbsCurveEvaluator) nurbs_curve_evaluator;
         PT(NurbsCurveResult) nurbs_curve_result;
@@ -576,10 +576,10 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
           printf ("nurbs_start_t %f, nurbs_end_t %f \n", nurbs_start_t, nurbs_end_t);
         }
       }
-      
-      // create quads from NurbsCurveResult                    
+
+      // create quads from NurbsCurveResult
       PN_stdfloat total_curve_segments;
-      
+
       total_curve_segments = (total_distance / _resolution_distance);
       if (total_curve_segments < total_segments) {
         total_curve_segments = total_segments;
@@ -607,8 +607,8 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
         PN_stdfloat curve_segment_index;
 
         curve_segment_index = 0.0;
-        while (curve_segment_index < total_curve_segments) {   
-        
+        while (curve_segment_index < total_curve_segments) {
+
           PN_stdfloat st;
           PN_stdfloat et;
           PN_stdfloat start_t;
@@ -708,7 +708,7 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
       for (index = 0; index < total_vertices; index++) {
         nurbs_curve_result_array [index] = 0;
       }
-      
+
       delete[] nurbs_curve_result_array;
     }
     else {
@@ -717,7 +717,7 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
       int segment_index;
       int vertex_segment_index;
       int total_vertex_segments;
-      
+
       PN_stdfloat st;
       PN_stdfloat et;
       PN_stdfloat start_t;
@@ -745,12 +745,12 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
 
       CMotionTrailFrame motion_trail_frame_start;
       CMotionTrailFrame motion_trail_frame_end;
-                    
+
       segment_index = 0;
       FrameList::iterator frame_iterator;
       frame_iterator = _frame_list.begin ( );
       while (segment_index < total_segments) {
-      
+
         CMotionTrailVertex *motion_trail_vertex_start;
         CMotionTrailVertex *motion_trail_vertex_end;
 
@@ -796,7 +796,7 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
         t2.set (et, motion_trail_vertex_start -> _v);
 
         while (vertex_segment_index < total_vertex_segments) {
-        
+
           motion_trail_vertex_start = &_vertex_array [vertex_segment_index];
           motion_trail_vertex_end = &_vertex_array [vertex_segment_index + 1];
 
@@ -829,11 +829,11 @@ update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform) {
         }
 
         segment_index += 1;
-      }  
+      }
     }
 
     // end geometry
-    this -> end_geometry ( );   
+    this -> end_geometry ( );
 
     delete[] _vertex_array;
     _vertex_array = 0;

+ 1 - 1
direct/src/motiontrail/config_motiontrail.h

@@ -1,4 +1,4 @@
-// Filename: config_interval.h
+// Filename: config_motiontrail.h
 // Created by:  drose (27Aug02)
 //
 ////////////////////////////////////////////////////////////////////

+ 10 - 10
direct/src/plugin/find_root_dir_assist.mm

@@ -1,4 +1,4 @@
-// Filename: filename_assist.mm
+// Filename: find_root_dir_assist.mm
 // Created by:  drose (13Apr09)
 //
 ////////////////////////////////////////////////////////////////////
@@ -23,7 +23,7 @@
 //     Function: NSString_to_cpp_string
 //  Description: Copy the Objective-C string to a C++ string.
 ////////////////////////////////////////////////////////////////////
-static string 
+static string
 NSString_to_cpp_string(NSString *str) {
   size_t length = [str length];
   string result;
@@ -36,44 +36,44 @@ NSString_to_cpp_string(NSString *str) {
 
 ////////////////////////////////////////////////////////////////////
 //     Function: call_NSSearchPathForDirectories
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
-static string 
+static string
 call_NSSearchPathForDirectories(NSSearchPathDirectory dirkey, NSSearchPathDomainMask domain) {
   // Ensure that Carbon has been initialized, and that we have an
   // auto-release pool.
   NSApplicationLoad();
-  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 
+  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
   NSArray *paths = NSSearchPathForDirectoriesInDomains(dirkey, domain, YES);
   string result;
   if ([paths count] != 0) {
     result = NSString_to_cpp_string([paths objectAtIndex:0]);
   }
-  [pool release]; 
+  [pool release];
 
   return result;
 }
 
 ////////////////////////////////////////////////////////////////////
 //     Function: get_osx_home_directory
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 static string
 get_osx_home_directory() {
   NSApplicationLoad();
-  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 
+  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
   NSString *dir = NSHomeDirectory();
   string result = NSString_to_cpp_string(dir);
-  [pool release]; 
+  [pool release];
 
   return result;
 }
 
 ////////////////////////////////////////////////////////////////////
 //     Function: find_osx_root_dir
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 string
 find_osx_root_dir() {

+ 12 - 12
direct/src/plugin/p3dAuthSession.cxx

@@ -1,4 +1,4 @@
-// Filename: P3DAuthSession.cxx
+// Filename: p3dAuthSession.cxx
 // Created by:  drose (17Sep09)
 //
 ////////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@
 ////////////////////////////////////////////////////////////////////
 //     Function: P3DAuthSession::Constructor
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 P3DAuthSession::
 P3DAuthSession(P3DInstance *inst) :
@@ -62,7 +62,7 @@ P3DAuthSession(P3DInstance *inst) :
   }
 
   if (inst->_mf_reader.get_num_signatures() > 0) {
-    const P3DMultifileReader::CertChain &cert_chain = 
+    const P3DMultifileReader::CertChain &cert_chain =
       inst->_mf_reader.get_signature(0);
 
     if (cert_chain.size() > 0) {
@@ -87,7 +87,7 @@ P3DAuthSession(P3DInstance *inst) :
 ////////////////////////////////////////////////////////////////////
 //     Function: P3DAuthSession::Destructor
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 P3DAuthSession::
 ~P3DAuthSession() {
@@ -130,7 +130,7 @@ shutdown(bool send_message) {
     int status;
     waitpid(_p3dcert_pid, &status, WNOHANG);
 #endif  // _WIN32
-    
+
     _p3dcert_running = false;
   }
   _p3dcert_started = false;
@@ -264,7 +264,7 @@ start_p3dcert() {
 
   _p3dcert_started = true;
   _p3dcert_running = true;
-  
+
   spawn_wait_thread();
 }
 
@@ -343,13 +343,13 @@ wt_thread_run() {
   }
   _p3dcert_pid = -1;
   _p3dcert_running = false;
-      
+
   nout << "p3dcert process has successfully stopped.\n";
   if (WIFEXITED(status)) {
     nout << "  exited normally, status = "
          << WEXITSTATUS(status) << "\n";
   } else if (WIFSIGNALED(status)) {
-    nout << "  signalled by " << WTERMSIG(status) << ", core = " 
+    nout << "  signalled by " << WTERMSIG(status) << ", core = "
          << WCOREDUMP(status) << "\n";
   } else if (WIFSTOPPED(status)) {
     nout << "  stopped by " << WSTOPSIG(status) << "\n";
@@ -383,7 +383,7 @@ win_create_process() {
 
   STARTUPINFO startup_info;
   ZeroMemory(&startup_info, sizeof(startup_info));
-  startup_info.cb = sizeof(startup_info); 
+  startup_info.cb = sizeof(startup_info);
 
   // Make sure the initial window is *shown* for this graphical app.
   startup_info.wShowWindow = SW_SHOW;
@@ -394,7 +394,7 @@ win_create_process() {
   // Construct the command-line string, containing the quoted
   // command-line arguments.
   ostringstream stream;
-  stream << "\"" << _p3dcert_exe << "\" \"" 
+  stream << "\"" << _p3dcert_exe << "\" \""
          << _cert_filename->get_filename() << "\" \"" << _cert_dir << "\"";
 
   // I'm not sure why CreateProcess wants a non-const char pointer for
@@ -410,10 +410,10 @@ win_create_process() {
   // from CreateProcessW().  Something about the way wx parses the
   // command-line parameters?  Well, whatever, we don't really need
   // the Unicode form anyway.
-  PROCESS_INFORMATION process_info; 
+  PROCESS_INFORMATION process_info;
   BOOL result = CreateProcess
     (_p3dcert_exe.c_str(), command_line, NULL, NULL, TRUE,
-     0, (void *)_env.c_str(), 
+     0, (void *)_env.c_str(),
      start_dir_cstr, &startup_info, &process_info);
   bool started_program = (result != 0);
 

+ 1 - 1
direct/src/plugin/p3dAuthSession.h

@@ -1,4 +1,4 @@
-// Filename: P3DAuthSession.h
+// Filename: p3dAuthSession.h
 // Created by:  drose (17Sep09)
 //
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
direct/src/plugin/p3dCert_strings.cxx

@@ -1,4 +1,4 @@
-// Filename: p3dCert_strings.h
+// Filename: p3dCert_strings.cxx
 // Created by:  rdb (25Mar15)
 //
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
direct/src/plugin/p3dCert_wx.cxx

@@ -1,4 +1,4 @@
-// Filename: p3dCert.cxx
+// Filename: p3dCert_wx.cxx
 // Created by:  drose (11Sep09)
 //
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
direct/src/plugin/p3dCert_wx.h

@@ -1,4 +1,4 @@
-// Filename: p3dCert.h
+// Filename: p3dCert_wx.h
 // Created by:  drose (11Sep09)
 //
 ////////////////////////////////////////////////////////////////////

+ 45 - 45
direct/src/plugin_activex/P3DActiveX.cpp

@@ -1,5 +1,3 @@
-// P3DActiveX.cpp : Implementation of CP3DActiveXApp and DLL registration.
-
 // Filename: P3DActiveX.cpp
 // Created by:  atrestman (14Sept09)
 //
@@ -14,6 +12,8 @@
 //
 ////////////////////////////////////////////////////////////////////
 
+// P3DActiveX.cpp : Implementation of CP3DActiveXApp and DLL registration.
+
 #include "stdafx.h"
 #include "P3DActiveX.h"
 
@@ -38,23 +38,23 @@ const WORD _wVerMinor = 0;
 
 // Id taken from IMPLEMENT_OLECREATE_EX function in xxxCtrl.cpp
 
- 
+
 const CATID CLSID_SafeItem =
 { 0x924b4927, 0xd3ba, 0x41ea, 0x9f, 0x7e, 0x8a, 0x89, 0x19, 0x4a, 0xb3, 0xac };
- 
+
 // HRESULT CreateComponentCategory - Used to register ActiveX control as safe
 
- 
+
 HRESULT CreateComponentCategory(CATID catid, WCHAR *catDescription)
 {
     ICatRegister *pcr = NULL ;
     HRESULT hr = S_OK ;
- 
-    hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr, 
+
+    hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr,
             NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (void**)&pcr);
     if (FAILED(hr))
         return hr;
- 
+
     // Make sure the HKCR\Component Categories\{..catid...}
 
     // key is registered.
@@ -83,13 +83,13 @@ HRESULT CreateComponentCategory(CATID catid, WCHAR *catDescription)
           {
             len = 127;
           }
-        }   
+        }
     else
         {
           // TODO: Write an error handler;
 
         }
-    // The second parameter of StringCchCopy is 128 because you need 
+    // The second parameter of StringCchCopy is 128 because you need
 
     // room for a NULL-terminator.
 
@@ -97,25 +97,25 @@ HRESULT CreateComponentCategory(CATID catid, WCHAR *catDescription)
     // Make sure the description is null terminated.
 
     catinfo.szDescription[len + 1] = '\0';
- 
+
     hr = pcr->RegisterCategories(1, &catinfo);
     pcr->Release();
- 
+
     return hr;
 }
- 
+
 // HRESULT RegisterCLSIDInCategory -
 
 //      Register your component categories information
 
- 
+
 HRESULT RegisterCLSIDInCategory(REFCLSID clsid, CATID catid)
 {
 // Register your component categories information.
 
     ICatRegister *pcr = NULL ;
     HRESULT hr = S_OK ;
-    hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr, 
+    hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr,
                 NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (void**)&pcr);
     if (SUCCEEDED(hr))
     {
@@ -125,22 +125,22 @@ HRESULT RegisterCLSIDInCategory(REFCLSID clsid, CATID catid)
        rgcatid[0] = catid;
        hr = pcr->RegisterClassImplCategories(clsid, 1, rgcatid);
     }
- 
+
     if (pcr != NULL)
         pcr->Release();
-            
+
     return hr;
 }
- 
+
 // HRESULT UnRegisterCLSIDInCategory - Remove entries from the registry
 
- 
+
 HRESULT UnRegisterCLSIDInCategory(REFCLSID clsid, CATID catid)
 {
     ICatRegister *pcr = NULL ;
     HRESULT hr = S_OK ;
- 
-    hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr, 
+
+    hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr,
             NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (void**)&pcr);
     if (SUCCEEDED(hr))
     {
@@ -150,10 +150,10 @@ HRESULT UnRegisterCLSIDInCategory(REFCLSID clsid, CATID catid)
        rgcatid[0] = catid;
        hr = pcr->UnRegisterClassImplCategories(clsid, 1, rgcatid);
     }
- 
+
     if (pcr != NULL)
         pcr->Release();
- 
+
     return hr;
 }
 
@@ -195,41 +195,41 @@ STDAPI DllRegisterServer(void)
 {
     HRESULT hr;    // HResult used by Safety Functions
 
- 
+
     AFX_MANAGE_STATE(_afxModuleAddrThis);
- 
+
     if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
       return ResultFromScode(SELFREG_E_TYPELIB);
- 
+
     if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
       return ResultFromScode(SELFREG_E_CLASS);
- 
+
     // Mark the control as safe for initializing.
 
-                                             
-    hr = CreateComponentCategory(CATID_SafeForInitializing, 
+
+    hr = CreateComponentCategory(CATID_SafeForInitializing,
          L"Controls safely initializable from persistent data!");
     if (FAILED(hr))
       return hr;
- 
-    hr = RegisterCLSIDInCategory(CLSID_SafeItem, 
+
+    hr = RegisterCLSIDInCategory(CLSID_SafeItem,
          CATID_SafeForInitializing);
     if (FAILED(hr))
         return hr;
- 
+
     // Mark the control as safe for scripting.
 
- 
-    hr = CreateComponentCategory(CATID_SafeForScripting, 
+
+    hr = CreateComponentCategory(CATID_SafeForScripting,
                                  L"Controls safely  scriptable!");
     if (FAILED(hr))
         return hr;
- 
-    hr = RegisterCLSIDInCategory(CLSID_SafeItem, 
+
+    hr = RegisterCLSIDInCategory(CLSID_SafeItem,
                         CATID_SafeForScripting);
     if (FAILED(hr))
         return hr;
- 
+
     return NOERROR;
 }
 
@@ -241,26 +241,26 @@ STDAPI DllUnregisterServer(void)
 {
     HRESULT hr;    // HResult used by Safety Functions
 
- 
+
     AFX_MANAGE_STATE(_afxModuleAddrThis);
- 
+
     // Remove entries from the registry.
 
-    hr = UnRegisterCLSIDInCategory(CLSID_SafeItem, 
+    hr = UnRegisterCLSIDInCategory(CLSID_SafeItem,
                      CATID_SafeForInitializing);
     if (FAILED(hr))
       return hr;
- 
-    hr = UnRegisterCLSIDInCategory(CLSID_SafeItem, 
+
+    hr = UnRegisterCLSIDInCategory(CLSID_SafeItem,
                         CATID_SafeForScripting);
     if (FAILED(hr))
       return hr;
- 
+
     if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
       return ResultFromScode(SELFREG_E_TYPELIB);
- 
+
     if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
       return ResultFromScode(SELFREG_E_CLASS);
- 
+
     return NOERROR;
 }

+ 4 - 4
direct/src/plugin_activex/P3DActiveX.h

@@ -1,7 +1,3 @@
-#pragma once
-
-// P3DActiveX.h : main header file for P3DActiveX.DLL
-
 // Filename: P3DActiveX.h
 // Created by:  atrestman (14Sept09)
 //
@@ -16,6 +12,10 @@
 //
 ////////////////////////////////////////////////////////////////////
 
+#pragma once
+
+// P3DActiveX.h : main header file for P3DActiveX.DLL
+
 #if !defined( __AFXCTL_H__ )
 #error include 'afxctl.h' before including this file
 #endif

+ 21 - 21
direct/src/plugin_activex/P3DActiveXCtrl.cpp

@@ -1,5 +1,3 @@
-// P3DActiveXCtrl.cpp : Implementation of the CP3DActiveXCtrl ActiveX Control class.
-
 // Filename: P3DActiveXCtrl.cpp
 // Created by:  atrestman (14Sept09)
 //
@@ -14,6 +12,8 @@
 //
 ////////////////////////////////////////////////////////////////////
 
+// P3DActiveXCtrl.cpp : Implementation of the CP3DActiveXCtrl ActiveX Control class.
+
 #include "stdafx.h"
 #include "P3DActiveX.h"
 #include "P3DActiveXCtrl.h"
@@ -159,7 +159,7 @@ BOOL CP3DActiveXCtrl::CP3DActiveXCtrlFactory::UpdateRegistry(BOOL bRegister)
 
 // CP3DActiveXCtrl::CP3DActiveXCtrl - Constructor
 
-CP3DActiveXCtrl::CP3DActiveXCtrl() : m_instance( *this ), m_pPandaObject( NULL ) 
+CP3DActiveXCtrl::CP3DActiveXCtrl() : m_instance( *this ), m_pPandaObject( NULL )
 {
     InitializeIIDs(&IID_DP3DActiveX, &IID_DP3DActiveXEvents);
     // TODO: Initialize your control's instance data here.
@@ -194,7 +194,7 @@ void CP3DActiveXCtrl::OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInv
       {
         _state = S_loading;
         // The first time we get the Draw message, we know we're
-        // sufficiently set up to start downloading the instance.  
+        // sufficiently set up to start downloading the instance.
         m_instance.read_tokens();
         get_twirl_bitmaps();
 
@@ -261,20 +261,20 @@ void CP3DActiveXCtrl::OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInv
       // using to paint
       CDC dcMemory;
       dcMemory.CreateCompatibleDC(pdc);
-      
+
       // Select the bitmap into the in-memory DC
       dcMemory.SelectObject(&_twirl_bitmaps[step]);
-      
+
       // Find a centerpoint for the bitmap in the client area
       CRect rect;
       GetClientRect(&rect);
       int nX = rect.left + (rect.Width() - twirl_width) / 2;
       int nY = rect.top + (rect.Height() - twirl_height) / 2;
-      
+
       // Copy the bits from the in-memory DC into the on-screen DC to
       // actually do the painting. Use the centerpoint we computed for
       // the target offset.
-      pdc->BitBlt(nX, nY, twirl_width, twirl_height, &dcMemory, 
+      pdc->BitBlt(nX, nY, twirl_width, twirl_height, &dcMemory,
                   0, 0, SRCCOPY);
     }
 }
@@ -286,10 +286,10 @@ void CP3DActiveXCtrl::OnClose( DWORD dwSaveOption )
     // Make sure the init thread has finished.
     if (_state == S_loading) {
       nout << "Waiting for thread stop\n" << flush;
-      ::WaitForSingleObject( _init_not_running.m_hObject, INFINITE ); 
+      ::WaitForSingleObject( _init_not_running.m_hObject, INFINITE );
       nout << "Done waiting for thread stop\n" << flush;
     }
-    
+
 	COleControl::OnClose( dwSaveOption );
 }
 
@@ -302,7 +302,7 @@ void CP3DActiveXCtrl::DoPropExchange(CPropExchange* pPX)
     COleControl::DoPropExchange(pPX);
 
     // TODO: Call PX_ functions for each persistent custom property.
-    
+
     ExchangeProperties( pPX );
 }
 
@@ -384,21 +384,21 @@ int CP3DActiveXCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
     {
         return ( error = -1 );
     }
-    CComPtr<IOleContainer> pOleContainer; 
-    HRESULT hr = m_spClientSite->GetContainer( &pOleContainer ); 
+    CComPtr<IOleContainer> pOleContainer;
+    HRESULT hr = m_spClientSite->GetContainer( &pOleContainer );
     if ( FAILED( hr ) || !pOleContainer )
     {
         return ( error = -1 );
     }
-    CComPtr<IHTMLDocument2> pHtml2Doc; 
-    hr = pOleContainer->QueryInterface( IID_IHTMLDocument, ( void** )&pHtml2Doc ); 
-    if ( FAILED( hr ) || !pHtml2Doc ) 
+    CComPtr<IHTMLDocument2> pHtml2Doc;
+    hr = pOleContainer->QueryInterface( IID_IHTMLDocument, ( void** )&pHtml2Doc );
+    if ( FAILED( hr ) || !pHtml2Doc )
     {
         return ( error = -1 );
     }
     BSTR url;
     hr = pHtml2Doc->get_URL( &url );
-    if ( FAILED( hr ) ||  !url ) 
+    if ( FAILED( hr ) ||  !url )
     {
         return ( error = -1 );
     }
@@ -422,10 +422,10 @@ int CP3DActiveXCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
     if ( collectionLength < 1 )
     {
         // javascript engine was not specified on the page.
-        // hence we need to initialize it by infusing javascript 
+        // hence we need to initialize it by infusing javascript
         // element tags
 
-        CComPtr<IHTMLElement> spHtmlElement; 
+        CComPtr<IHTMLElement> spHtmlElement;
         hr = pHtml2Doc->createElement( CComBSTR( "script" ), &spHtmlElement );
         if ( SUCCEEDED( hr ) && spHtmlElement )
         {
@@ -443,7 +443,7 @@ int CP3DActiveXCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
                         CComPtr<IHTMLDOMNode> newNode;
                         hr = spHtmlDomNode->appendChild( spElementDomNode, &newNode );
                     }
-                }                    
+                }
             }
         }
     }
@@ -594,7 +594,7 @@ get_twirl_bitmaps() {
 
   for (int step = 0; step < twirl_num_steps + 1; ++step) {
     get_twirl_data(twirl_data, twirl_size, step,
-                   m_instance._fgcolor_r, m_instance._fgcolor_g, m_instance._fgcolor_b, 
+                   m_instance._fgcolor_r, m_instance._fgcolor_g, m_instance._fgcolor_b,
                    m_instance._bgcolor_r, m_instance._bgcolor_g, m_instance._bgcolor_b);
 
     // Expand out the RGB channels into RGBA.

+ 2 - 2
direct/src/plugin_activex/P3DActiveXPropPage.cpp

@@ -1,5 +1,3 @@
-// P3DActiveXPropPage.cpp : Implementation of the CP3DActiveXPropPage property page class.
-
 // Filename: P3DActiveXPropPage.cpp
 // Created by:  atrestman (14Sept09)
 //
@@ -14,6 +12,8 @@
 //
 ////////////////////////////////////////////////////////////////////
 
+// P3DActiveXPropPage.cpp : Implementation of the CP3DActiveXPropPage property page class.
+
 #include "stdafx.h"
 #include "P3DActiveX.h"
 #include "P3DActiveXPropPage.h"

+ 3 - 3
dtool/metalibs/dtool/dtool.cxx

@@ -1,7 +1,7 @@
-// Filename: dtool.C
+// Filename: dtool.cxx
 // Created by:  drose (15May00)
-// 
-/////////////////////////////////////////////////////////////////////
+//
+////////////////////////////////////////////////////////////////////
 
 // This is a dummy file whose sole purpose is to give the compiler
 // something to compile when making libdtool.so in NO_DEFER mode,

+ 1 - 1
dtool/src/cppparser/cppArrayType.h

@@ -21,7 +21,7 @@
 
 class CPPExpression;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPArrayType
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppBison.yxx

@@ -1,4 +1,4 @@
-// Filename: cppBison.y
+// Filename: cppBison.yxx
 // Created by:  drose (16Jan99)
 //
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppClassTemplateParameter.h

@@ -21,7 +21,7 @@
 
 class CPPIdentifier;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPClassTemplateParameter
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppCommentBlock.h

@@ -21,7 +21,7 @@
 
 #include <list>
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPCommentBlock
 // Description : This represents a comment appearing in the source
 //               code.  The CPPPreprocessor collects these, and saves

+ 1 - 1
dtool/src/cppparser/cppConstType.h

@@ -19,7 +19,7 @@
 
 #include "cppType.h"
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPConstType
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppDeclaration.h

@@ -55,7 +55,7 @@ class CPPScope;
 class CPPTemplateScope;
 class CPPPreprocessor;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPDeclaration
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppEnumType.h

@@ -26,7 +26,7 @@ class CPPInstance;
 class CPPScope;
 
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPEnumType
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppExpression.h

@@ -24,7 +24,7 @@ class CPPType;
 class CPPPreprocessor;
 class CPPFunctionGroup;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPExpression
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppExpressionParser.h

@@ -22,7 +22,7 @@
 class CPPExpression;
 class CPPScope;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPExpressionParser
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppExtensionType.h

@@ -23,7 +23,7 @@
 class CPPScope;
 class CPPIdentifier;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPExtensionType
 // Description : Base class of enum, class, struct, and union types.
 //               An instance of the base class (instead of one of

+ 1 - 1
dtool/src/cppparser/cppFile.h

@@ -18,7 +18,7 @@
 #include "dtoolbase.h"
 #include "filename.h"
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPFile
 // Description : This defines a source file (typically a C++ header
 //               file) that is parsed by the CPPParser.  Each

+ 1 - 1
dtool/src/cppparser/cppFunctionGroup.h

@@ -21,7 +21,7 @@
 
 class CPPInstance;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPFunctionGroup
 // Description : This class is simply a container for one or more
 //               CPPInstances for functions of the same name.  It's

+ 1 - 1
dtool/src/cppparser/cppFunctionType.h

@@ -22,7 +22,7 @@
 class CPPParameterList;
 class CPPIdentifier;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPFunctionType
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppIdentifier.h

@@ -30,7 +30,7 @@ class CPPType;
 class CPPPreprocessor;
 class CPPTemplateParameterList;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPIdentifier
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppInstance.h

@@ -27,7 +27,7 @@ class CPPParameterList;
 class CPPScope;
 class CPPExpression;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPInstance
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppInstanceIdentifier.h

@@ -42,7 +42,7 @@ enum CPPInstanceIdentifierType {
   IIT_initializer,
 };
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPInstanceIdentifier
 // Description : This class is used in parser.y to build up a variable
 //               instance definition.  An instance is something like

+ 1 - 1
dtool/src/cppparser/cppMakeProperty.h

@@ -20,7 +20,7 @@
 #include "cppDeclaration.h"
 #include "cppIdentifier.h"
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPMakeProperty
 // Description : This is a MAKE_PROPERTY() declaration appearing
 //               within a class body.  It means to generate a property

+ 1 - 1
dtool/src/cppparser/cppMakeSeq.h

@@ -21,7 +21,7 @@
 #include "cppIdentifier.h"
 #include "cppFunctionGroup.h"
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPMakeSeq
 // Description : This is a MAKE_SEQ() declaration appearing within a
 //               class body.  It means to generate a sequence method

+ 1 - 1
dtool/src/cppparser/cppManifest.h

@@ -26,7 +26,7 @@
 class CPPExpression;
 class CPPType;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPManifest
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppNamespace.h

@@ -22,7 +22,7 @@
 class CPPIdentifier;
 class CPPScope;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPNamespace
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppParameterList.h

@@ -24,7 +24,7 @@
 class CPPInstance;
 class CPPScope;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPParameterList
 // Description : A list of formal parameters for a function
 //               declaration.

+ 1 - 1
dtool/src/cppparser/cppParser.h

@@ -23,7 +23,7 @@
 
 #include <set>
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPParser
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppPointerType.h

@@ -19,7 +19,7 @@
 
 #include "cppType.h"
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPPointerType
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppPreprocessor.h

@@ -35,7 +35,7 @@ class CPPExpression;
 
 //#define CPP_VERBOSE_LEX
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPPreprocessor
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppReferenceType.h

@@ -19,7 +19,7 @@
 
 #include "cppType.h"
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPReferenceType
 // Description : Either an lvalue- or rvalue-reference.
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppScope.h

@@ -43,7 +43,7 @@ class CPPPreprocessor;
 class CPPNameComponent;
 struct cppyyltype;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPScope
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppSimpleType.h

@@ -19,7 +19,7 @@
 
 #include "cppType.h"
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPSimpleType
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppStructType.h

@@ -28,7 +28,7 @@
 class CPPScope;
 class CPPTypeProxy;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPStructType
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppTBDType.h

@@ -21,7 +21,7 @@
 
 class CPPIdentifier;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPTBDType
 // Description : This represents a type whose exact meaning is still
 //               to-be-determined.  It happens when a typename is

+ 1 - 1
dtool/src/cppparser/cppTemplateParameterList.h

@@ -24,7 +24,7 @@
 
 class CPPScope;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPTemplateParameterList
 // Description : This class serves to store the parameter list for a
 //               template function or class, both for the formal

+ 1 - 1
dtool/src/cppparser/cppTemplateScope.h

@@ -20,7 +20,7 @@
 #include "cppScope.h"
 #include "cppTemplateParameterList.h"
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPTemplateScope
 // Description : This is an implicit scope that is created following
 //               the appearance of a "template<class x, class y>" or

+ 1 - 1
dtool/src/cppparser/cppToken.h

@@ -19,7 +19,7 @@
 
 #include "cppBisonDefs.h"
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPToken
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppType.h

@@ -33,7 +33,7 @@ public:
   bool operator () (CPPType *a, CPPType *b) const;
 };
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPType
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppTypeDeclaration.h

@@ -19,7 +19,7 @@
 
 #include "cppInstance.h"
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPTypeDeclaration
 // Description : A CPPTypeDeclaration is a special declaration that
 //               represents the top-level declaration of a type in a

+ 1 - 1
dtool/src/cppparser/cppTypeParser.h

@@ -22,7 +22,7 @@
 class CPPType;
 class CPPScope;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPTypeParser
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppTypeProxy.h

@@ -19,7 +19,7 @@
 
 #include "cppType.h"
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPTypeProxy
 // Description : This is a special kind of type that is a placeholder
 //               for some type, currently unknown, that will be filled

+ 1 - 1
dtool/src/cppparser/cppTypedefType.h

@@ -21,7 +21,7 @@
 class CPPIdentifier;
 class CPPInstanceIdentifier;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPTypedefType
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/cppparser/cppUsing.h

@@ -22,7 +22,7 @@
 class CPPIdentifier;
 class CPPScope;
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : CPPUsing
 // Description :
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/dtoolbase/addHash.I

@@ -1,4 +1,4 @@
-// Filename: add_hash.I
+// Filename: addHash.I
 // Created by:  drose (01Sep06)
 //
 ////////////////////////////////////////////////////////////////////

+ 15 - 15
dtool/src/dtoolbase/memoryHook.cxx

@@ -40,14 +40,14 @@
 
 #if defined(USE_MEMORY_DLMALLOC)
 
-/////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //
 // Memory manager: DLMALLOC
 //
 // This is Doug Lea's memory manager.  It is very fast, but it is not
 // thread-safe.  However, we provide thread locking within MemoryHook.
 //
-/////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 
 #define USE_DL_PREFIX 1
 #define NO_MALLINFO 1
@@ -71,7 +71,7 @@
 // the system library.  It also doesn't appear to be thread-safe on
 // OSX.
 
-/////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //
 // Memory manager: PTMALLOC2
 //
@@ -81,7 +81,7 @@
 // thread-safety constructs take a certain amount of CPU time), but
 // it's still much faster than the windows allocator.
 //
-/////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 
 #define USE_DL_PREFIX 1
 #define NO_MALLINFO 1
@@ -97,14 +97,14 @@
 
 #else
 
-/////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //
 // Memory manager: MALLOC
 //
 // This option uses the built-in system allocator.  This is a good
 // choice on linux, but it's a terrible choice on windows.
 //
-/////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 
 #define call_malloc malloc
 #define call_realloc realloc
@@ -116,7 +116,7 @@
 ////////////////////////////////////////////////////////////////////
 //     Function: MemoryHook::Constructor
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 MemoryHook::
 MemoryHook() {
@@ -147,7 +147,7 @@ MemoryHook() {
 ////////////////////////////////////////////////////////////////////
 //     Function: MemoryHook::Copy Constructor
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 MemoryHook::
 MemoryHook(const MemoryHook &copy) :
@@ -169,7 +169,7 @@ MemoryHook(const MemoryHook &copy) :
 ////////////////////////////////////////////////////////////////////
 //     Function: MemoryHook::Destructor
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 MemoryHook::
 ~MemoryHook() {
@@ -215,7 +215,7 @@ heap_alloc_single(size_t size) {
   // In the DO_MEMORY_USAGE case, we want to track the total size of
   // allocated bytes on the heap.
   AtomicAdjust::add(_total_heap_single_size, (AtomicAdjust::Integer)size);
-  if ((size_t)AtomicAdjust::get(_total_heap_single_size) + 
+  if ((size_t)AtomicAdjust::get(_total_heap_single_size) +
       (size_t)AtomicAdjust::get(_total_heap_array_size) >
       _max_heap_size) {
     overflow_heap_size();
@@ -291,7 +291,7 @@ heap_alloc_array(size_t size) {
   // In the DO_MEMORY_USAGE case, we want to track the total size of
   // allocated bytes on the heap.
   AtomicAdjust::add(_total_heap_array_size, (AtomicAdjust::Integer)size);
-  if ((size_t)AtomicAdjust::get(_total_heap_single_size) + 
+  if ((size_t)AtomicAdjust::get(_total_heap_single_size) +
       (size_t)AtomicAdjust::get(_total_heap_array_size) >
       _max_heap_size) {
     overflow_heap_size();
@@ -332,7 +332,7 @@ heap_realloc_array(void *ptr, size_t size) {
 
   while (alloc1 == (void *)NULL) {
     alloc_fail(inflated_size);
-    
+
     // Recover the original pointer.
     alloc1 = alloc;
 
@@ -457,7 +457,7 @@ mmap_alloc(size_t size, bool allow_exec) {
     cerr << "Couldn't allocate memory page of size " << size << ": ";
 
     PVOID buffer;
-    DWORD length = 
+    DWORD length =
       FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
                     NULL, err, 0, (LPTSTR)&buffer, 0, NULL);
     if (length != 0) {
@@ -506,7 +506,7 @@ mmap_free(void *ptr, size_t size) {
 
 #ifdef WIN32
   VirtualFree(ptr, 0, MEM_RELEASE);
-#else  
+#else
   munmap(ptr, size);
 #endif
 }
@@ -547,7 +547,7 @@ get_deleted_chain(size_t buffer_size) {
     chain = new DeletedBufferChain(buffer_size);
     _deleted_chains.insert(DeletedChains::value_type(buffer_size, chain));
   }
-  
+
   _lock.release();
   return chain;
 }

+ 2 - 2
dtool/src/dtoolbase/typeRegistry.cxx

@@ -247,7 +247,7 @@ find_type(const string &name) const {
 //               id number (as returned by TypeHandle::get_index()).
 //               Returns its TypeHandle if it exists, or
 //               TypeHandle::none() if there is no such type.
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 TypeHandle TypeRegistry::
 find_type_by_id(int id) const {
   if (id < 0 ||id >= (int)_handle_registry.size()) {
@@ -774,7 +774,7 @@ look_up_invalid(TypeHandle handle, TypedObject *object) const {
 ////////////////////////////////////////////////////////////////////
 //     Function: get_best_parent_from_Set
 //       Access: Private
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 extern "C" int
 get_best_parent_from_Set(int id, const std::set<int> &this_set) {
   // most common case..

+ 0 - 1
dtool/src/dtoolbase/typeRegistry.h

@@ -117,7 +117,6 @@ private:
   friend class TypeHandle;
 };
 
-///////////////////////////////////////////
 // Helper function to allow for "C" interaction into the type system
 extern "C" EXPCL_DTOOL  int get_best_parent_from_Set(int id, const std::set<int> &this_set);
 

+ 1 - 1
dtool/src/dtoolutil/dSearchPath.h

@@ -20,7 +20,7 @@
 #include "filename.h"
 #include "pvector.h"
 
-///////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
 //       Class : DSearchPath
 // Description : This class stores a list of directories that can be
 //               searched, in order, to locate a particular file.  It

+ 38 - 38
dtool/src/dtoolutil/filename.cxx

@@ -94,8 +94,8 @@ extern "C" void cygwin_conv_to_posix_path(const char *path, char *posix);
 // thing is, like everything else, to graft the reference to the
 // remote hostname into the one global filesystem, with something like
 // /hosts/hostname/path/to/file.  We observe the Unix convention for
-// internal names used in Panda; this makes operations like
-// Filename::get_dirname() simpler and more internally consistent.
+// internal names used in Panda; this makes operations
+// like Filename::get_dirname() simpler and more internally consistent.
 
 // This string hard-defines the prefix that we use internally to
 // indicate that the next directory component name should be treated
@@ -105,8 +105,8 @@ extern "C" void cygwin_conv_to_posix_path(const char *path, char *posix);
 // created in order to read the first config file).  Windows purists
 // might be tempted to define this to a double slash so that internal
 // Panda filenames more closely resemble their Windows counterparts.
-// That might actually work, but it will cause problems with
-// Filename::standardize().
+// That might actually work, but it will cause problems
+// with Filename::standardize().
 
 // We use const char * instead of string to avoid static-init ordering
 // issues.
@@ -212,7 +212,7 @@ convert_pathname(const string &unix_style_pathname) {
              unix_style_pathname.substr(0, hosts_prefix_length) == hosts_prefix) {
     // A filename like /hosts/fooby gets turned into \\fooby.
     windows_pathname = "\\\\" + front_to_back_slash(unix_style_pathname.substr(hosts_prefix_length));
-    
+
   } else {
     // It starts with a slash, but the first part is not a single
     // letter.
@@ -335,7 +335,7 @@ from_os_specific(const string &os_specific, Filename::Type type) {
   const string &panda_root = get_panda_root();
 
   // If the initial prefix is the same as panda_root, remove it.
-  if (!panda_root.empty() && panda_root != string("\\") && 
+  if (!panda_root.empty() && panda_root != string("\\") &&
       panda_root.length() < result.length()) {
     bool matches = true;
     size_t p;
@@ -1080,7 +1080,7 @@ make_canonical() {
     // The root directory is a special case.
     return true;
   }
-  
+
 #ifndef WIN32
   // Use realpath in order to resolve symlinks properly
   char newpath [PATH_MAX + 1];
@@ -1130,7 +1130,7 @@ make_true_case() {
   // First, we have to convert it to its short name, then back to its
   // long name--that seems to be the trick to force Windows to throw
   // away the case we give it and get the actual file case.
-  
+
   wchar_t short_name[MAX_PATH + 1];
   DWORD l = GetShortPathNameW(os_specific.c_str(), short_name, MAX_PATH + 1);
   if (l == 0) {
@@ -1142,7 +1142,7 @@ make_true_case() {
   // the specified length if the short_name length wasn't enough--but also
   // according to the Windows docs, MAX_PATH will always be enough.
   assert(l < MAX_PATH + 1);
-  
+
   wchar_t long_name[MAX_PATH + 1];
   l = GetLongPathNameW(short_name, long_name, MAX_PATH + 1);
   if (l == 0) {
@@ -1202,14 +1202,14 @@ to_os_specific() const {
   Filename standard(*this);
   standard.standardize();
 
-#ifdef IS_OSX 
+#ifdef IS_OSX
   if (get_type() == T_dso) {
     std::string workname = standard.get_fullpath();
     size_t dot = workname.rfind('.');
     if (dot != string::npos) {
       if (workname.substr(dot) == ".so") {
         string dyLibBase = workname.substr(0, dot)+".dylib";
-        return dyLibBase; 
+        return dyLibBase;
       }
     }
   }
@@ -1287,7 +1287,7 @@ to_os_short_name() const {
 
 #ifdef WIN32
   wstring os_specific = to_os_specific_w();
-  
+
   wchar_t short_name[MAX_PATH + 1];
   DWORD l = GetShortPathNameW(os_specific.c_str(), short_name, MAX_PATH + 1);
   if (l == 0) {
@@ -1324,7 +1324,7 @@ to_os_long_name() const {
 
 #ifdef WIN32
   wstring os_specific = to_os_specific_w();
-  
+
   wchar_t long_name[MAX_PATH + 1];
   DWORD l = GetLongPathNameW(os_specific.c_str(), long_name, MAX_PATH + 1);
   if (l == 0) {
@@ -1582,7 +1582,7 @@ compare_timestamps(const Filename &other,
   }
   // !other_exists
   assert(!other_exists);
-  
+
   // This file exists, the other one doesn't.
   return other_missing_is_old ? 1 : -1;
 }
@@ -2473,7 +2473,7 @@ touch() const {
     CloseHandle(fhandle);
     return false;
   }
-  
+
   if (!SetFileTime(fhandle, NULL, NULL, &ftnow)) {
     CloseHandle(fhandle);
     return false;
@@ -2689,10 +2689,10 @@ copy_to(const Filename &other) const {
   if (!other_filename.open_write(out)) {
     return false;
   }
-        
+
   static const size_t buffer_size = 4096;
   char buffer[buffer_size];
-  
+
   in.read(buffer, buffer_size);
   size_t count = in.gcount();
   while (count != 0) {
@@ -2903,12 +2903,12 @@ get_hash() const {
 //               atomic_read_contents().
 ////////////////////////////////////////////////////////////////////
 bool Filename::
-atomic_compare_and_exchange_contents(string &orig_contents, 
-                                     const string &old_contents, 
+atomic_compare_and_exchange_contents(string &orig_contents,
+                                     const string &old_contents,
                                      const string &new_contents) const {
 #ifdef WIN32_VC
   wstring os_specific = to_os_specific_w();
-  HANDLE hfile = CreateFileW(os_specific.c_str(), GENERIC_READ | GENERIC_WRITE, 
+  HANDLE hfile = CreateFileW(os_specific.c_str(), GENERIC_READ | GENERIC_WRITE,
                              0, NULL, OPEN_ALWAYS,
                              FILE_ATTRIBUTE_NORMAL, NULL);
   while (hfile == INVALID_HANDLE_VALUE) {
@@ -2916,18 +2916,18 @@ atomic_compare_and_exchange_contents(string &orig_contents,
     if (error == ERROR_SHARING_VIOLATION) {
       // If the file is locked by another process, yield and try again.
       Sleep(0);
-      hfile = CreateFileW(os_specific.c_str(), GENERIC_READ | GENERIC_WRITE, 
+      hfile = CreateFileW(os_specific.c_str(), GENERIC_READ | GENERIC_WRITE,
                           0, NULL, OPEN_ALWAYS,
                           FILE_ATTRIBUTE_NORMAL, NULL);
     } else {
-      cerr << "Couldn't open file: " << os_specific 
+      cerr << "Couldn't open file: " << os_specific
            << ", error " << error << "\n";
       return false;
     }
   }
 
   if (hfile == INVALID_HANDLE_VALUE) {
-    cerr << "Couldn't open file: " << os_specific 
+    cerr << "Couldn't open file: " << os_specific
          << ", error " << GetLastError() << "\n";
     return false;
   }
@@ -2939,7 +2939,7 @@ atomic_compare_and_exchange_contents(string &orig_contents,
 
   DWORD bytes_read;
   if (!ReadFile(hfile, buf, buf_size, &bytes_read, NULL)) {
-    cerr << "Error reading file: " << os_specific 
+    cerr << "Error reading file: " << os_specific
          << ", error " << GetLastError() << "\n";
     CloseHandle(hfile);
     return false;
@@ -2948,7 +2948,7 @@ atomic_compare_and_exchange_contents(string &orig_contents,
     orig_contents += string(buf, bytes_read);
 
     if (!ReadFile(hfile, buf, buf_size, &bytes_read, NULL)) {
-      cerr << "Error reading file: " << os_specific 
+      cerr << "Error reading file: " << os_specific
            << ", error " << GetLastError() << "\n";
       CloseHandle(hfile);
       return false;
@@ -2962,7 +2962,7 @@ atomic_compare_and_exchange_contents(string &orig_contents,
     DWORD bytes_written;
     if (!WriteFile(hfile, new_contents.data(), new_contents.size(),
                    &bytes_written, NULL)) {
-      cerr << "Error writing file: " << os_specific 
+      cerr << "Error writing file: " << os_specific
            << ", error " << GetLastError() << "\n";
       CloseHandle(hfile);
       return false;
@@ -2994,7 +2994,7 @@ atomic_compare_and_exchange_contents(string &orig_contents,
     close(fd);
     return false;
   }
-    
+
   ssize_t bytes_read = read(fd, buf, buf_size);
   while (bytes_read > 0) {
     orig_contents += string(buf, bytes_read);
@@ -3023,7 +3023,7 @@ atomic_compare_and_exchange_contents(string &orig_contents,
     perror(os_specific.c_str());
     return false;
   }
-  
+
   return match;
 #endif  // WIN32_VC
 }
@@ -3049,7 +3049,7 @@ bool Filename::
 atomic_read_contents(string &contents) const {
 #ifdef WIN32_VC
   wstring os_specific = to_os_specific_w();
-  HANDLE hfile = CreateFileW(os_specific.c_str(), GENERIC_READ, 
+  HANDLE hfile = CreateFileW(os_specific.c_str(), GENERIC_READ,
                              FILE_SHARE_READ, NULL, OPEN_ALWAYS,
                              FILE_ATTRIBUTE_NORMAL, NULL);
   while (hfile == INVALID_HANDLE_VALUE) {
@@ -3057,11 +3057,11 @@ atomic_read_contents(string &contents) const {
     if (error == ERROR_SHARING_VIOLATION) {
       // If the file is locked by another process, yield and try again.
       Sleep(0);
-      hfile = CreateFileW(os_specific.c_str(), GENERIC_READ, 
+      hfile = CreateFileW(os_specific.c_str(), GENERIC_READ,
                           FILE_SHARE_READ, NULL, OPEN_ALWAYS,
-                          FILE_ATTRIBUTE_NORMAL, NULL);      
+                          FILE_ATTRIBUTE_NORMAL, NULL);
     } else {
-      cerr << "Couldn't open file: " << os_specific 
+      cerr << "Couldn't open file: " << os_specific
            << ", error " << error << "\n";
       return false;
     }
@@ -3074,7 +3074,7 @@ atomic_read_contents(string &contents) const {
 
   DWORD bytes_read;
   if (!ReadFile(hfile, buf, buf_size, &bytes_read, NULL)) {
-    cerr << "Error reading file: " << os_specific 
+    cerr << "Error reading file: " << os_specific
          << ", error " << GetLastError() << "\n";
     CloseHandle(hfile);
     return false;
@@ -3083,7 +3083,7 @@ atomic_read_contents(string &contents) const {
     contents += string(buf, bytes_read);
 
     if (!ReadFile(hfile, buf, buf_size, &bytes_read, NULL)) {
-      cerr << "Error reading file: " << os_specific 
+      cerr << "Error reading file: " << os_specific
            << ", error " << GetLastError() << "\n";
       CloseHandle(hfile);
       return false;
@@ -3115,7 +3115,7 @@ atomic_read_contents(string &contents) const {
     close(fd);
     return false;
   }
-    
+
   ssize_t bytes_read = read(fd, buf, buf_size);
   while (bytes_read > 0) {
     contents += string(buf, bytes_read);
@@ -3247,7 +3247,7 @@ locate_hash() {
     if (_hash_end == string::npos) {
       _hash_end = string::npos;
       _hash_start = string::npos;
-      
+
     } else {
       _hash_start = _hash_end;
       ++_hash_end;
@@ -3367,13 +3367,13 @@ r_make_canonical(const Filename &cwd) {
   // the directory above.
 
   Filename dir(get_dirname());
-  
+
   if (dir.empty()) {
     // No dirname means the file is in this directory.
     set_dirname(cwd);
     return true;
   }
-  
+
   if (!dir.r_make_canonical(cwd)) {
     return false;
   }

+ 2 - 2
dtool/src/dtoolutil/test_touch.cxx

@@ -1,4 +1,4 @@
-// Filename: test_pfstream.cxx
+// Filename: test_touch.cxx
 // Created by:  drose (04Nov02)
 //
 ////////////////////////////////////////////////////////////////////
@@ -15,7 +15,7 @@
 #include "dtoolbase.h"
 #include "filename.h"
 
-int 
+int
 main(int argc, char *argv[]) {
   if (argc < 2) {
     cout << "test_touch filename [filename ... ]\n";

+ 0 - 3
dtool/src/interrogate/functionRemap.cxx

@@ -975,9 +975,6 @@ setup_properties(const InterrogateFunction &ifunc, InterfaceMaker *interface_mak
   return true;
 }
 
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
 std::string make_safe_name(const std::string &name) {
   return InterrogateBuilder::clean_identifier(name);
   /*

Some files were not shown because too many files changed in this diff