Commits

Bryan Kadzban  committed 854f5d1

Fix signed / unsigned overload / override problem causing trees and grass to not be rendered. First broken in commits eb9dde5c8c665fefb32689d53ee6ff2ec79664f5 and 2cb9a26d7353d08cedfcfe42b4c9646fb11c5e53.

...And now I see the giant purple tree problem. Time to pull in the fix for that from other trees I think.

  • Participants
  • Parent commits 67c40a4

Comments (0)

Files changed (4)

File Terrain/CForest.cpp

 
 }
 
-void CForest::Set (int x, int y, unsigned int distance)
+void CForest::Set (int x, int y, int distance)
 {
 
   if (_grid_position.x == x && _grid_position.y == y && _current_distance == distance)

File Terrain/CForest.h

 class CForest : public GridData
 {
   LOD                   _lod;
-  unsigned              _current_distance;
+  int                   _current_distance;
   bool                  _swap;
   GLcoord               _origin;
   int                   _stage;
 public:
   CForest ();
   //GLcoord           GridPosition () const { return _grid_position; };
-  void              Set (int x, int y, unsigned int distance);
+  void              Set (int x, int y, int distance);
   void              Render ();
   void              Update (int32_t stop);
   bool              Ready () { return _stage == FOREST_STAGE_DONE; };

File Terrain/CGrass.cpp

 
 }
 
-void CGrass::Set (int x, int y, unsigned int density)
+void CGrass::Set (int x, int y, int density)
 {
 
   //density = max (density, 1); //detail 0 and 1 are the same level. (Maximum density.)

File Terrain/CGrass.h

   GLcoord                _grid_position;
   GLcoord                _origin;
   GLcoord                _walk;
-  unsigned               _current_distance;
+  int                    _current_distance;
   std::vector<GLrgba>    _color;
   std::vector<GLvector>  _vertex;
   std::vector<GLvector>  _normal;
 
 public:
   CGrass ();
-  void              Set (int origin_x, int origin_y, unsigned int distance);
+  void              Set (int origin_x, int origin_y, int distance);
   void              Render ();
   void              Update (int32_t stop);
   bool              Ready ()  { return _stage == GRASS_STAGE_DONE; };