Feature Requests

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Boogle
Posts: 162
Joined: Fri Nov 21, 2003 3:16 pm
Location: Toronto, Canada

Feature Requests

Post by Boogle »

Hey where should I post feature requests (if anywhere)? Should I use the feature request location in the bug tracker, or is that ignored? I'd like to request that the core::list::Iterator object have an operator+ and operator- set up so I can move through the iterator at intervals other than 1. The code should be simple, just a for loop, however I'd like to avoid modifying the engine myself as then I will have to continue to redo my changes each time the engine is updated.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Re: Feature Requests

Post by niko »

The best place to do a feature request is here. Just like you did. :)
Boogle wrote:The code should be simple, just a for loop, however I'd like to avoid modifying the engine myself as then I will have to continue to redo my changes each time the engine is updated.
And a very easy way to avoid this is to implement it yourself and sent the code to me. If the code is useful and clean (as I think it will be, for the additional operator in the iterator), I'll add it in the next version of the engine, AND if you like, you'll get on the contributors list, if it was a lot of code, or it was complicated, or whatever :)
Boogle
Posts: 162
Joined: Fri Nov 21, 2003 3:16 pm
Location: Toronto, Canada

Post by Boogle »

Cool.. here is the code. Mostly it was just copied from the STL implementation and modified to work with the Irrlicht iterator.

Code: Select all

Iterator operator+(s32 num) const
{
   Iterator tmp = *this;

   if (num >= 0)
      while (num-- && tmp.current != 0) ++tmp;
   else
      while (num++ && tmp.current != 0) --tmp;

   return tmp;
}

Iterator& operator+=(s32 num)
{
   if (num >= 0)
      while (num-- && this->current != 0) ++(*this);
   else
      while (num++ && this->current != 0) --(*this);

   return *this;
}

Iterator operator-(s32 num) const  { return (*this)+(-num);          }
Iterator operator-=(s32 num) const { (*this)+=(-num);  return *this; }
Post Reply