enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/src stones_simple.cc, 1.57, 1.58 stones_complex.cc,


From: Ralf Westram <address@hidden>
Subject: [Enigma-cvs] enigma/src stones_simple.cc, 1.57, 1.58 stones_complex.cc, 1.48, 1.49 object_mixins.hh, 1.13, 1.14 laser.cc, 1.20, 1.21
Date: Tue, 21 Oct 2003 19:47:59 +0000

Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv25389

Modified Files:
        stones_simple.cc stones_complex.cc object_mixins.hh laser.cc 
Log Message:
- const correctness for predicates


Index: laser.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/laser.cc,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** laser.cc    18 Oct 2003 13:49:07 -0000      1.20
--- laser.cc    21 Oct 2003 19:47:56 -0000      1.21
***************
*** 427,431 ****
  
          bool is_transparent() const { return int_attrib("transparent"); }
!         bool is_movable() { return int_attrib("movable"); }
  
          void set_orientation(int o) { set_attrib("orientation", o); }
--- 427,431 ----
  
          bool is_transparent() const { return int_attrib("transparent"); }
!         bool is_movable() const { return int_attrib("movable"); }
  
          void set_orientation(int o) { set_attrib("orientation", o); }

Index: stones_simple.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/stones_simple.cc,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** stones_simple.cc    20 Oct 2003 17:03:16 -0000      1.57
--- stones_simple.cc    21 Oct 2003 19:47:55 -0000      1.58
***************
*** 344,348 ****
          // Stone interface
          void on_impulse (const Impulse &impulse);
!         bool is_removable() { return state == IDLE; }
          void actor_hit (const StoneContact &sc);
          void actor_inside(Actor *a) { SendMessage(a, "shatter"); }
--- 344,348 ----
          // Stone interface
          void on_impulse (const Impulse &impulse);
!         bool is_removable() const { return state == IDLE; }
          void actor_hit (const StoneContact &sc);
          void actor_inside(Actor *a) { SendMessage(a, "shatter"); }
***************
*** 686,690 ****
          }
  
!         bool is_movable() { return true; }
          void actor_inside (Actor *a) { SendMessage(a, "shatter"); }
  
--- 686,690 ----
          }
  
!         bool is_movable() const { return true; }
          void actor_inside (Actor *a) { SendMessage(a, "shatter"); }
  

Index: stones_complex.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/stones_complex.cc,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** stones_complex.cc   20 Oct 2003 17:06:15 -0000      1.48
--- stones_complex.cc   21 Oct 2003 19:47:56 -0000      1.49
***************
*** 170,174 ****
          }
          void on_impulse(const Impulse& impulse);
!         bool is_removable() {
              return state == IDLE;
          }
--- 170,174 ----
          }
          void on_impulse(const Impulse& impulse);
!         bool is_removable() const {
              return state == IDLE;
          }
***************
*** 292,296 ****
      // search for affected actors
      vector<Actor*> found_actors;
!     const double   range_one_field = 1.415; // approx. 1 field
      GetActorsInRange(newPos.center(), range_one_field, found_actors);
      if (!found_actors.empty()) {
--- 292,296 ----
      // search for affected actors
      vector<Actor*> found_actors;
!     const double   range_one_field = 1.415; // approx. 1 field [ > sqrt(1+1) ]
      GetActorsInRange(newPos.center(), range_one_field, found_actors);
      if (!found_actors.empty()) {
***************
*** 640,644 ****
          }
  
!         bool is_movable() { return state != FALLING; }
  
          void actor_hit(const StoneContact &sc)
--- 640,644 ----
          }
  
!         bool is_movable() const { return state != FALLING; }
  
          void actor_hit(const StoneContact &sc)
***************
*** 1314,1319 ****
  }
  
! void PuzzleStone::trigger_explosion_at (GridPos p, double delay, 
!                                         int wanted_oxyd_attrib) 
  {
      PuzzleStone *puzz = dynamic_cast<PuzzleStone*>(GetStone(p));
--- 1314,1319 ----
  }
  
! void PuzzleStone::trigger_explosion_at (GridPos p, double delay,
!                                         int wanted_oxyd_attrib)
  {
      PuzzleStone *puzz = dynamic_cast<PuzzleStone*>(GetStone(p));
***************
*** 2207,2211 ****
          }
  
!         bool is_movable() {
              return true;
          }
--- 2207,2211 ----
          }
  
!         bool is_movable() const {
              return true;
          }
***************
*** 3021,3025 ****
  }
  
! MailStone::MailStone (const char *kind, Direction dir) 
  : Stone(kind), m_dir(dir)
  {}
--- 3021,3025 ----
  }
  
! MailStone::MailStone (const char *kind, Direction dir)
  : Stone(kind), m_dir(dir)
  {}

Index: object_mixins.hh
===================================================================
RCS file: /cvsroot/enigma/enigma/src/object_mixins.hh,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** object_mixins.hh    12 Jul 2003 10:04:47 -0000      1.13
--- object_mixins.hh    21 Oct 2003 19:47:56 -0000      1.14
***************
*** 58,62 ****
          MovableStone(const char *name) : Stone(name) {}
  
!         bool is_movable() { return true; }
          void actor_inside (Actor *a) {
              SendMessage(a, "shatter");
--- 58,62 ----
          MovableStone(const char *name) : Stone(name) {}
  
!         bool is_movable() const { return true; }
          void actor_inside (Actor *a) {
              SendMessage(a, "shatter");





reply via email to

[Prev in Thread] Current Thread [Next in Thread]