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

Diff of /enigma/src/world.cc

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

revision 1.39 by reallysoft, Thu Jun 5 10:35:46 2003 UTC revision 1.40 by ant_39, Sat Jun 7 11:17:12 2003 UTC
# Line 117  namespace world Line 117  namespace world
117          Actor *get_actor() const { return actor; }          Actor *get_actor() const { return actor; }
118          Actor *get_actor2() const { return actor2; }          Actor *get_actor2() const { return actor2; }
119          Stone *get_stone() const { return stone; }          Stone *get_stone() const { return stone; }
120    
121            double get_strength() const { return strength; }
122            double get_length() const { return length; }
123      private:      private:
124          V2 get_p1() const;          V2 get_p1() const;
125          V2 get_p2() const;          V2 get_p2() const;
# Line 940  world::KillRubberBands (Stone *st) Line 943  world::KillRubberBands (Stone *st)
943          ++i;          ++i;
944      }      }
945  }  }
946    
947    void
948    world::GiveRubberBands (Stone *st, vector<Rubber_Band_Info> &rubs)
949    {
950       for (unsigned i=0; i<level->rubbers.size(); ) {
951            RubberBand &r = *level->rubbers[i];
952            if (r.get_stone() == st) {
953                Rubber_Band_Info rbi;
954                rbi.act = r.get_actor();
955                rbi.strength = r.get_strength();
956                rbi.length = r.get_length();
957                rubs.push_back(rbi);
958            }
959            ++i;
960        }
961    }
962    
963  bool world::HasRubberBand (Actor *a, Stone *st)  bool world::HasRubberBand (Actor *a, Stone *st)
964  {  {

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

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