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

Diff of /enigma/src/laser.cc

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

revision 1.17 by reallysoft, Sun Jun 22 11:47:23 2003 UTC revision 1.18 by reallysoft, Fri Jun 27 08:02:52 2003 UTC
# Line 420  void LaserStone::init_model() Line 420  void LaserStone::init_model()
420  namespace  namespace
421  {  {
422      class MirrorStone      class MirrorStone
423          : public MovableStone, public LaserEmitter, public PhotoCell          : public Stone, public LaserEmitter, public PhotoCell
424      {      {
425      protected:      protected:
426          MirrorStone(const char *name, bool movable=false, bool transparent=false);          MirrorStone(const char *name, bool movable=false, bool transparent=false);
427          virtual ~MirrorStone() {}          virtual ~MirrorStone() {}
428    
429          bool is_transparent() const { return int_attrib("transparent"); }          bool is_transparent() const { return int_attrib("transparent"); }
430          bool is_movable() const { return int_attrib("movable"); }          bool is_movable() { return int_attrib("movable"); }
431    
432          void set_orientation(int o) { set_attrib("orientation", o); }          void set_orientation(int o) { set_attrib("orientation", o); }
433          int get_orientation() { return int_attrib("orientation"); }          int get_orientation() { return int_attrib("orientation"); }
# Line 468  namespace Line 468  namespace
468  }  }
469    
470  MirrorStone::MirrorStone(const char *name, bool movable, bool transparent)  MirrorStone::MirrorStone(const char *name, bool movable, bool transparent)
471  : MovableStone(name)  : Stone(name)
472  , outdirs(NODIRBIT)  , outdirs(NODIRBIT)
473  {  {
474      set_attrib("transparent", transparent);      set_attrib("transparent", transparent);
# Line 529  MirrorStone::message(const string &m, co Line 529  MirrorStone::message(const string &m, co
529  void MirrorStone::actor_hit(const StoneContact &sc)  void MirrorStone::actor_hit(const StoneContact &sc)
530  {  {
531      if (is_movable())      if (is_movable())
532          MovableStone::actor_hit(sc);          maybe_push_stone(sc);
533      rotate_right();      rotate_right();
534  }  }
535    
# Line 748  world::laser::Init() Line 748  world::laser::Init()
748      Register ("st-mirror-3<t", new TriangleMirror('<', false, true));      Register ("st-mirror-3<t", new TriangleMirror('<', false, true));
749      Register ("st-mirror-3^t", new TriangleMirror('^', false, true));      Register ("st-mirror-3^t", new TriangleMirror('^', false, true));
750      Register ("st-mirror-3>t", new TriangleMirror('>', false, true));      Register ("st-mirror-3>t", new TriangleMirror('>', false, true));
751        Register ("st-mirror-3vtm", new TriangleMirror('v', true, true));
752        Register ("st-mirror-3<tm", new TriangleMirror('<', true, true));
753        Register ("st-mirror-3^tm", new TriangleMirror('^', true, true));
754        Register ("st-mirror-3>tm", new TriangleMirror('>', true, true));
755    
756      Register (new PlaneMirror);      Register (new PlaneMirror);
757      Register ("st-mirror-p|", new PlaneMirror('|'));      Register ("st-mirror-p|", new PlaneMirror('|'));
# Line 762  world::laser::Init() Line 766  world::laser::Init()
766      Register ("st-mirror-p/t", new PlaneMirror('/', false, true));      Register ("st-mirror-p/t", new PlaneMirror('/', false, true));
767      Register ("st-mirror-p-t", new PlaneMirror('-', false, true));      Register ("st-mirror-p-t", new PlaneMirror('-', false, true));
768      Register ("st-mirror-p\\t", new PlaneMirror('\\', false, true));      Register ("st-mirror-p\\t", new PlaneMirror('\\', false, true));
769        Register ("st-mirror-p|tm", new PlaneMirror('|', true, true));
770        Register ("st-mirror-p/tm", new PlaneMirror('/', true, true));
771        Register ("st-mirror-p-tm", new PlaneMirror('-', true, true));
772        Register ("st-mirror-p\\tm", new PlaneMirror('\\', true, true));
773  }  }
774    
775    

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

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