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

Diff of /enigma/src/objects.cc

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

revision 1.93 by dheck, Mon Jun 16 12:28:57 2003 UTC revision 1.94 by dheck, Wed Jun 18 00:58:26 2003 UTC
# Line 267  Floor::message(const string& /*msg*/, co Line 267  Floor::message(const string& /*msg*/, co
267  {  {
268  }  }
269    
270    px::V2 Floor::process_mouseforce (Actor *a, px::V2 force)
271    {
272        int iplayer = 0;
273        if (a->int_attrib("player", &iplayer) && iplayer==player::CurrentPlayer())
274            return mousefactor() * force;
275        else
276            return V2();
277    }
278    
279    
280  //----------------------------------------  //----------------------------------------
281  // Abyss  // Abyss
282  //----------------------------------------  //----------------------------------------
# Line 541  void Bridge::animcb() Line 551  void Bridge::animcb()
551          change_state(CLOSED);          change_state(CLOSED);
552  }  }
553    
 #if 0  
554    
555  class WhiteTile : public Floor {  //----------------------------------------
556  public:  // Black and white tiles
557      V2 get_force(Actor *a, V2 mouseforce) {  //----------------------------------------
558          if (a->get_attrib("blackball"))  namespace
559              return Floor::get_force(a, 0);  {
         else  
             return Floor::get_force(a, mouseforce);  
     }  
 };  
560    
561  class BlackTile : public Floor {      class BlackTile : public Floor {
562  public:      public:
563      V2 get_force(Actor *a, V2 mouseforce) {          BlackTile() : Floor ("fl-black", 5.0, 2.0) {}
564          if (a->get_attrib("whiteball"))  
565              return Floor::get_force(a, 0);          px::V2 process_mouseforce (Actor *a, px::V2 force)
566          else          {
567              return Floor::get_force(a, mouseforce);              if (a->get_attrib("player") && player::CurrentPlayer() == 0)
568      }                  return mousefactor() * force;
569  };              else
570                    return V2();
571            }
572        };
573    
574  #endif      class WhiteTile : public Floor {
575        public:
576            WhiteTile() : Floor ("fl-white", 5.0, 2.0) {}
577    
578            px::V2 process_mouseforce (Actor *a, px::V2 force)
579            {
580                if (a->get_attrib("player") && player::CurrentPlayer() == 1)
581                    return mousefactor() * force;
582                else
583                    return V2();
584            }
585        };
586    }
587    
588  //======================================================================  //======================================================================
589  // STONES  // STONES
# Line 728  ObjectRepos::ObjectRepos() Line 747  ObjectRepos::ObjectRepos()
747      add_templ(new Bridge);      add_templ(new Bridge);
748      add_templ("fl-bridge-open", new Bridge(true));      add_templ("fl-bridge-open", new Bridge(true));
749      add_templ("fl-bridge-closed", new Bridge(false));      add_templ("fl-bridge-closed", new Bridge(false));
750        add_templ(new WhiteTile);
751        add_templ(new BlackTile);
752    
753      add_templ(new Gradient);      add_templ(new Gradient);
754      add_templ("fl-gradient1", new Gradient(1));      add_templ("fl-gradient1", new Gradient(1));

Legend:
Removed from v.1.93  
changed lines
  Added in v.1.94

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