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

Diff of /enigma/src/stones_complex.cc

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

revision 1.38 by reallysoft, Mon Jul 21 08:22:28 2003 UTC revision 1.39 by reallysoft, Sat Aug 16 23:58:10 2003 UTC
# Line 351  namespace Line 351  namespace
351              set_orientation(dir);              set_orientation(dir);
352          }          }
353    
354          Direction get_orientation() const {          Direction get_orientation() const {
355              return Direction(int_attrib("orientation"));              return Direction(int_attrib("orientation"));
356          }          }
357          void set_orientation(Direction dir) {          void set_orientation(Direction dir) {
358              set_attrib("orientation", Value(dir));              set_attrib("orientation", Value(dir));
359          }          }
# Line 365  namespace Line 365  namespace
365              string mname = get_kind();              string mname = get_kind();
366              mname += to_suffix(get_orientation());              mname += to_suffix(get_orientation());
367              set_model (mname);              set_model (mname);
368          }          }
369    
370          virtual bool actor_may_pass (Actor *a) = 0;          virtual bool actor_may_pass (Actor *a) = 0;
371    
372            void message(const string& msg, const Value &val) {
373                if (msg == "direction" && val.get_type() == Value::DOUBLE) {
374                    Direction dir = static_cast<Direction>((int)val.get_double());
375                    set_orientation(dir);
376                    init_model();
377                }
378            }
379      };      };
380  }  }
381    
# Line 545  namespace Line 553  namespace
553              ACTIVE,             // may send trigger into direction              ACTIVE,             // may send trigger into direction
554              IDLE,               // already sent trigger w/o success              IDLE,               // already sent trigger w/o success
555              MOVING,             // inside move              MOVING,             // inside move
556              FALLING             // falling into abyss/water              FALLING             // falling into abyss
557          } state;          } state;
558    
559          void set_alarm() {          void set_alarm() {

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

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