/[enigma]/enigma/src/objects.cc
ViewVC logotype

Diff of /enigma/src/objects.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.76 by reallysoft, Wed May 14 08:12:39 2003 UTC revision 1.77 by reallysoft, Wed May 14 10:46:46 2003 UTC
# Line 172  Object::double_attrib(const string &name Line 172  Object::double_attrib(const string &name
172      return false;      return false;
173  }  }
174    
175  // Send an impulse to position 'dest' into direction dir.  /* Send an impulse to position 'dest' into direction dir.
176  // If 'dest' contains a stone, on_impulse() is called for that stone   * If 'dest' contains a stone, on_impulse() is called for that stone
177     */
178    
179  void  void
180  Object::send_impulse(const GridPos& dest, Direction dir)  Object::send_impulse(const GridPos& dest, Direction dir)
# Line 184  Object::send_impulse(const GridPos& dest Line 185  Object::send_impulse(const GridPos& dest
185      }      }
186  }  }
187    
188    /* Like variant above, but the _result_ of the impulse is delayed.
189     */
190    
191    void
192    Object::send_impulse(const GridPos& dest, Direction dir, double delay)
193    {
194        if (Stone *st = GetStone(dest)) {
195            addDelayedImpulse(Impulse(this, dest, dir), delay, st);
196        }
197    }
198    
199  namespace  {  namespace  {
200      const char *vstrf(const char *format, va_list argPtr) {      const char *vstrf(const char *format, va_list argPtr) {
201          static size_t  buf_size = 256;          static size_t  buf_size = 256;
# Line 664  Stone::get_push_direction (const StoneCo Line 676  Stone::get_push_direction (const StoneCo
676      return NODIR;      return NODIR;
677  }  }
678    
679    /* Move a stone (by sending an impulse)
680       Called when actor hits a stone
681     */
682  bool  bool
683  Stone::maybe_push_stone (const StoneContact &sc)  Stone::maybe_push_stone (const StoneContact &sc)
684  {  {

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.77

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26