enigma-cvs
[Top][All Lists]
Advanced

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

[Enigma-cvs] enigma/src floors.cc, 1.2, 1.3 items.cc, 1.89, 1.90 stones_


From: Ralf Westram <address@hidden>
Subject: [Enigma-cvs] enigma/src floors.cc, 1.2, 1.3 items.cc, 1.89, 1.90 stones_simple.cc, 1.56, 1.57 world.cc, 1.74, 1.75
Date: Mon, 20 Oct 2003 17:03:19 +0000

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

Modified Files:
        floors.cc items.cc stones_simple.cc world.cc 
Log Message:
- warning fixes



Index: world.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/world.cc,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** world.cc    20 Oct 2003 08:05:46 -0000      1.74
--- world.cc    20 Oct 2003 17:03:17 -0000      1.75
***************
*** 50,54 ****
  
  
! Object *SimpleSignal::get_target() 
  {
      return GetObject(destloc);
--- 50,54 ----
  
  
! Object *SimpleSignal::get_target()
  {
      return GetObject(destloc);
***************
*** 56,60 ****
  
  
! void SimpleSignal::emit_from (Object *src, int value) 
  {
      if (source == src) {
--- 56,60 ----
  
  
! void SimpleSignal::emit_from (Object *src, int value)
  {
      if (source == src) {
***************
*** 72,76 ****
      else {
          fprintf(stderr,
!                 "emit_from source object does not match\n" 
                  "signal '%s' dropped (expected=%p=%s found=%p=%s)\n",
                  message.c_str(), source, source->get_kind(), src, 
src->get_kind());
--- 72,76 ----
      else {
          fprintf(stderr,
!                 "emit_from source object does not match\n"
                  "signal '%s' dropped (expected=%p=%s found=%p=%s)\n",
                  message.c_str(), source, source->get_kind(), src, 
src->get_kind());
***************
*** 79,83 ****
  }
  
! void SignalList::emit_from (Object *source, int value) 
  {
      // signals may have side effects. To minimize them
--- 79,83 ----
  }
  
! void SignalList::emit_from (Object *source, int value)
  {
      // signals may have side effects. To minimize them
***************
*** 99,103 ****
  }
  
! Object *SignalList::find_single_destination(Object *src) 
  {
      Object *found = 0;
--- 99,103 ----
  }
  
! Object *SignalList::find_single_destination(Object *src)
  {
      Object *found = 0;
***************
*** 323,327 ****
  void WorldImpl::add_scramble(GridPos p, Direction dir)
  {
!     // fprintf(stderr, "scrambles.size()=%i ; add_scramble(%i, %i, %s)\n", 
      //         scrambles.size(), p.x, p.y, to_suffix(dir).c_str());
      scrambles.push_back(Scramble(p, dir, scrambleIntensity));
--- 323,327 ----
  void WorldImpl::add_scramble(GridPos p, Direction dir)
  {
!     // fprintf(stderr, "scrambles.size()=%i ; add_scramble(%i, %i, %s)\n",
      //         scrambles.size(), p.x, p.y, to_suffix(dir).c_str());
      scrambles.push_back(Scramble(p, dir, scrambleIntensity));
***************
*** 622,626 ****
  */
  static void
! handle_stone_contact (StoneContact &sc, double total_dtime)
  {
      Actor     *a           = sc.actor;
--- 622,626 ----
  */
  static void
! handle_stone_contact (StoneContact &sc, double /*total_dtime*/)
  {
      Actor     *a           = sc.actor;
***************
*** 681,685 ****
  
          V2     p2      = a2.pos;
!         double overlap = a1.radius + a2.radius - length(p1-p2); 
          if (overlap > 0)
          {
--- 681,685 ----
  
          V2     p2      = a2.pos;
!         double overlap = a1.radius + a2.radius - length(p1-p2);
          if (overlap > 0)
          {
***************
*** 689,693 ****
  
              bool collisionp = (a1.vel-a2.vel)*n < 0;
!             if (collisionp) 
              {
                  a1.pos = a1.oldpos;           // Reset actor position
--- 689,693 ----
  
              bool collisionp = (a1.vel-a2.vel)*n < 0;
!             if (collisionp)
              {
                  a1.pos = a1.oldpos;           // Reset actor position
***************
*** 696,700 ****
                actor2->on_hit(actor1);
  
!                 bool reboundp = (actor1->is_movable() && actor2->is_movable() 
&& 
                                   (actor1->is_on_floor() == 
actor2->is_on_floor()));
  
--- 696,700 ----
                actor2->on_hit(actor1);
  
!                 bool reboundp = (actor1->is_movable() && actor2->is_movable() 
&&
                                   (actor1->is_on_floor() == 
actor2->is_on_floor()));
  
***************
*** 707,711 ****
                    a1.vel += -v1 + (v2*(2*m2) + v1*(m1-m2)) / M;
                    a2.vel += -v2 + (v1*(2*m1) + v2*(m2-m1)) / M;
!                   
                    a1.vel *= restitution;
                    a2.vel *= restitution;
--- 707,711 ----
                    a1.vel += -v1 + (v2*(2*m2) + v1*(m1-m2)) / M;
                    a2.vel += -v2 + (v1*(2*m1) + v2*(m2-m1)) / M;
! 
                    a1.vel *= restitution;
                    a2.vel *= restitution;
***************
*** 810,819 ****
  }
  
! void world::SetMouseForce(V2 f) 
  {
      level->mouseforce.add_force(f);
  }
  
! void world::NameObject(Object *obj, const std::string &name) 
  {
      string old_name;
--- 810,819 ----
  }
  
! void world::SetMouseForce(V2 f)
  {
      level->mouseforce.add_force(f);
  }
  
! void world::NameObject(Object *obj, const std::string &name)
  {
      string old_name;
***************
*** 826,835 ****
  }
  
! void world::UnnameObject(Object *obj) 
  {
      level->unname(obj);
  }
  
! void world::TransferObjectName (Object *source, Object *target) 
  {
      string name;
--- 826,835 ----
  }
  
! void world::UnnameObject(Object *obj)
  {
      level->unname(obj);
  }
  
! void world::TransferObjectName (Object *source, Object *target)
  {
      string name;
***************
*** 846,855 ****
  }
  
! Object * world::GetNamedObject (const std::string &name) 
  {
      return level->get_named (name);
  }
  
! bool world::IsLevelBorder(GridPos p) 
  {
      return level->is_border(p);
--- 846,855 ----
  }
  
! Object * world::GetNamedObject (const std::string &name)
  {
      return level->get_named (name);
  }
  
! bool world::IsLevelBorder(GridPos p)
  {
      return level->is_border(p);
***************
*** 1014,1018 ****
  /* This function is used by all triggers, switches etc. that perform
     some particular action when activated (like opening doors or
!    switching lasers on and off). 
  */
  void world::PerformAction (Object *o, bool onoff) {
--- 1014,1018 ----
  /* This function is used by all triggers, switches etc. that perform
     some particular action when activated (like opening doors or
!    switching lasers on and off).
  */
  void world::PerformAction (Object *o, bool onoff) {
***************
*** 1037,1041 ****
      }
      else if (action != "idle") {
!         fprintf (stderr, "Unknown target '%s' for action '%s'\n", 
                   target.c_str(), action.c_str());
      }
--- 1037,1041 ----
      }
      else if (action != "idle") {
!         fprintf (stderr, "Unknown target '%s' for action '%s'\n",
                   target.c_str(), action.c_str());
      }
***************
*** 1257,1261 ****
  
  void
! world::BroadcastMessage (const std::string& msg, const Value& value, 
GridLayerBits grids) 
  {
      int  width     = level->w;
--- 1257,1261 ----
  
  void
! world::BroadcastMessage (const std::string& msg, const Value& value, 
GridLayerBits grids)
  {
      int  width     = level->w;
***************
*** 1406,1410 ****
  }
  
! void world::WarpActor(Actor *a, double newx, double newy, bool fast)
  {
      V2 newpos = V2(newx, newy);
--- 1406,1410 ----
  }
  
! void world::WarpActor(Actor *a, double newx, double newy, bool /*fast*/)
  {
      V2 newpos = V2(newx, newy);
***************
*** 1456,1460 ****
  {
      // Handle delayed impulses
!     for (ImpulseList::iterator i = delayed_impulses.begin(); i != 
delayed_impulses.end(); ) 
      {
          // shall the impulse take effect now ?
--- 1456,1460 ----
  {
      // Handle delayed impulses
!     for (ImpulseList::iterator i = delayed_impulses.begin(); i != 
delayed_impulses.end(); )
      {
          // shall the impulse take effect now ?

Index: stones_simple.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/stones_simple.cc,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** stones_simple.cc    20 Oct 2003 16:21:41 -0000      1.56
--- stones_simple.cc    20 Oct 2003 17:03:16 -0000      1.57
***************
*** 366,370 ****
  
  SwapStone *
! SwapStone::clone() 
  {
      SwapStone *other        = new SwapStone(*this);
--- 366,370 ----
  
  SwapStone *
! SwapStone::clone()
  {
      SwapStone *other        = new SwapStone(*this);
***************
*** 373,377 ****
  }
  
! void SwapStone::dispose() 
  {
      if (state == COME && in_exchange_with != 0) {
--- 373,377 ----
  }
  
! void SwapStone::dispose()
  {
      if (state == COME && in_exchange_with != 0) {
***************
*** 382,386 ****
  }
  
! void SwapStone::on_removal() 
  {
      if (state == COME) {
--- 382,386 ----
  }
  
! void SwapStone::on_removal()
  {
      if (state == COME) {
***************
*** 390,394 ****
  
  /* Animation finished; put the "swapped" stone to its new position. */
! void SwapStone::alarm() 
  {
      GridPos oldPos = move(get_pos(), reverse(move_dir));
--- 390,394 ----
  
  /* Animation finished; put the "swapped" stone to its new position. */
! void SwapStone::alarm()
  {
      GridPos oldPos = move(get_pos(), reverse(move_dir));
***************
*** 404,409 ****
  }
  
! void 
! SwapStone::on_impulse(const Impulse& impulse) 
  {
      if (state == IDLE) {
--- 404,409 ----
  }
  
! void
! SwapStone::on_impulse(const Impulse& impulse)
  {
      if (state == IDLE) {
***************
*** 434,439 ****
  }
  
! void 
! SwapStone::actor_hit(const StoneContact &sc) 
  {
      Direction dir = get_push_direction (sc);
--- 434,439 ----
  }
  
! void
! SwapStone::actor_hit(const StoneContact &sc)
  {
      Direction dir = get_push_direction (sc);
***************
*** 443,450 ****
  }
  
! void SwapStone::init_model() 
  {
!     static char *models_come[] = { "st-swap-w", "st-swap-s", "st-swap-e", 
"st-swap-n" };
!     static char *models_go[] =   { "st-swap-e", "st-swap-n", "st-swap-w", 
"st-swap-s" };
  
      const char *model = 0;
--- 443,450 ----
  }
  
! void SwapStone::init_model()
  {
!     static const char *models_come[] = { "st-swap-w", "st-swap-s", 
"st-swap-e", "st-swap-n" };
!     static const char *models_go[] =   { "st-swap-e", "st-swap-n", 
"st-swap-w", "st-swap-s" };
  
      const char *model = 0;
***************
*** 528,532 ****
                    SendMessage(a, "shatter");
                }
!                 
                if (impulse > 25) {
                      play_sound("shatter");
--- 528,532 ----
                    SendMessage(a, "shatter");
                }
! 
                if (impulse > 25) {
                      play_sound("shatter");
***************
*** 1507,1511 ****
  }
  
! void FloppyStone::init_model() 
  {
      set_model(is_on() ? "st-floppy1" : "st-floppy0");
--- 1507,1511 ----
  }
  
! void FloppyStone::init_model()
  {
      set_model(is_on() ? "st-floppy1" : "st-floppy0");
***************
*** 1622,1626 ****
          Actor *m_affected_actor;
      public:
!       ThiefStone() : Stone("st-thief"), state(IDLE) { 
            m_affected_actor = 0;
        }
--- 1622,1626 ----
          Actor *m_affected_actor;
      public:
!       ThiefStone() : Stone("st-thief"), state(IDLE) {
            m_affected_actor = 0;
        }
***************
*** 1660,1664 ****
                    int i = IntegerRand (0, inv->size()-1);
                    delete inv->yield_item(i);
!                       
                    play_sound("thief");
                }
--- 1660,1664 ----
                    int i = IntegerRand (0, inv->size()-1);
                    delete inv->yield_item(i);
! 
                    play_sound("thief");
                }
***************
*** 2197,2202 ****
                  else
                      darken();
!             } 
!             else if (msg == "lighten") 
                  lighten();
              else if (msg == "darken")
--- 2197,2202 ----
                  else
                      darken();
!             }
!             else if (msg == "lighten")
                  lighten();
              else if (msg == "darken")

Index: items.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/items.cc,v
retrieving revision 1.89
retrieving revision 1.90
diff -C2 -d -r1.89 -r1.90
*** items.cc    20 Oct 2003 08:05:45 -0000      1.89
--- items.cc    20 Oct 2003 17:03:16 -0000      1.90
***************
*** 370,374 ****
  
  
! void HillHollow::message(const string &m, const Value &v)
  {
      if (m=="trigger" || m=="signal") {
--- 370,374 ----
  
  
! void HillHollow::message(const string &m, const Value &/*v*/)
  {
      if (m=="trigger" || m=="signal") {
***************
*** 494,498 ****
          if (!h->whiteball || SDL_GetTicks() - h->enter_time < MINTIME)
              continue;
!         else 
              ++cnt;
      }
--- 494,498 ----
          if (!h->whiteball || SDL_GetTicks() - h->enter_time < MINTIME)
              continue;
!         else
              ++cnt;
      }
***************
*** 656,660 ****
            if (fl->is_destroyable())
                SetItem(get_pos(), MakeItem("it-debris"));
!       
          break;
      }
--- 656,660 ----
            if (fl->is_destroyable())
                SetItem(get_pos(), MakeItem("it-debris"));
! 
          break;
      }
***************
*** 901,905 ****
          void actor_enter(Actor *) { m_actorcount += 1; update_state(); }
          void actor_leave(Actor *) { m_actorcount -= 1; update_state(); }
!         void stone_change(Stone *st) { update_state(); }
      };
  }
--- 901,905 ----
          void actor_enter(Actor *) { m_actorcount += 1; update_state(); }
          void actor_leave(Actor *) { m_actorcount -= 1; update_state(); }
!         void stone_change(Stone *) { update_state(); }
      };
  }
***************
*** 912,916 ****
  }
  
! void Trigger::init_model() 
  {
      if (int_attrib("invisible"))
--- 912,916 ----
  }
  
! void Trigger::init_model()
  {
      if (int_attrib("invisible"))
***************
*** 1289,1293 ****
      public:
          Vortex(bool opened)
!         : Item("it-vortex"), state(opened ? OPEN : CLOSED), 
            close_after_warp(!opened)
          {
--- 1289,1293 ----
      public:
          Vortex(bool opened)
!         : Item("it-vortex"), state(opened ? OPEN : CLOSED),
            close_after_warp(!opened)
          {
***************
*** 1886,1891 ****
  }
  
! ItemAction 
! Extinguisher::activate(Actor *a, GridPos p) 
  {
      if (get_load() > 0) {
--- 1886,1891 ----
  }
  
! ItemAction
! Extinguisher::activate(Actor *a, GridPos p)
  {
      if (get_load() > 0) {
***************
*** 2031,2036 ****
  };
  
! void 
! Blocker::message(const string &msg, const Value &val) 
  {
      if (msg == "trigger" || msg == "openclose") {
--- 2031,2036 ----
  };
  
! void
! Blocker::message(const string &msg, const Value &val)
  {
      if (msg == "trigger" || msg == "openclose") {
***************
*** 2093,2097 ****
  }
  
! void Blocker::stone_change(Stone *st) 
  {
      if (st) {
--- 2093,2097 ----
  }
  
! void Blocker::stone_change(Stone *st)
  {
      if (st) {

Index: floors.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/floors.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** floors.cc   20 Oct 2003 16:21:42 -0000      1.2
--- floors.cc   20 Oct 2003 17:03:16 -0000      1.3
***************
*** 45,49 ****
  }
  
! void Floor::message(const string& msg, const Value &/*val*/)
  {
  }
--- 45,49 ----
  }
  
! void Floor::message(const string& /*msg*/, const Value &/*val*/)
  {
  }
***************
*** 70,74 ****
  //         void actor_enter(Actor* a) {SendMessage(a, "fall");}
          void actor_contact (Actor* a) {SendMessage(a, "fall");}
!       bool is_destroyable() const {return false;} 
      };
  
--- 70,74 ----
  //         void actor_enter(Actor* a) {SendMessage(a, "fall");}
          void actor_contact (Actor* a) {SendMessage(a, "fall");}
!       bool is_destroyable() const {return false;}
      };
  
***************
*** 83,87 ****
          void actor_contact(Actor *a) {SendMessage(a, "drown");}
  
!       bool is_destroyable() const {return false;} 
      };
  
--- 83,87 ----
          void actor_contact(Actor *a) {SendMessage(a, "drown");}
  
!       bool is_destroyable() const {return false;}
      };
  
***************
*** 101,105 ****
              }
          }
!       bool is_destroyable() const {return false;} 
      };
  
--- 101,105 ----
              }
          }
!       bool is_destroyable() const {return false;}
      };
  
***************
*** 410,414 ****
          BlackTile() : Floor ("fl-acblack", 5.0, 2.0) {}
  
!         px::V2 process_mouseforce (Actor *a, px::V2 force)
          {
              if (player::CurrentPlayer() == 0) // && 
player::IsCurrentPlayer(a))
--- 410,414 ----
          BlackTile() : Floor ("fl-acblack", 5.0, 2.0) {}
  
!         px::V2 process_mouseforce (Actor */*a*/, px::V2 force)
          {
              if (player::CurrentPlayer() == 0) // && 
player::IsCurrentPlayer(a))
***************
*** 423,427 ****
          WhiteTile() : Floor ("fl-acwhite", 5.0, 2.0) {}
  
!         px::V2 process_mouseforce (Actor *a, px::V2 force)
          {
              if (player::CurrentPlayer() == 1) // && 
player::IsCurrentPlayer(a))
--- 423,427 ----
          WhiteTile() : Floor ("fl-acwhite", 5.0, 2.0) {}
  
!         px::V2 process_mouseforce (Actor */*a*/, px::V2 force)
          {
              if (player::CurrentPlayer() == 1) // && 
player::IsCurrentPlayer(a))





reply via email to

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