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

Diff of /enigma/src/items.cc

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

revision 1.48 by reallysoft, Fri Jun 20 08:47:09 2003 UTC revision 1.49 by reallysoft, Fri Jun 20 15:47:15 2003 UTC
# Line 605  namespace Line 605  namespace
605              return ITEM_KILL;          // remove from inventory              return ITEM_KILL;          // remove from inventory
606          }          }
607          void message(const string &msg, const Value &/*val*/) {          void message(const string &msg, const Value &/*val*/) {
608              if (msg == "ignite" || msg == "expl")              bool explode = false;
609    
610                if (msg == "ignite") {
611                    // dynamite does not blow Documents in Oxyd1
612                    explode = enigma::GameCompatibility != GAMET_OXYD1;
613                }
614                else if (msg == "expl" || msg == "bombstone")
615                  SetItem(get_pos(), MakeItem("it-explosion1"));                  SetItem(get_pos(), MakeItem("it-explosion1"));
616          }          }
617          bool on_laserhit(Direction) {          bool on_laserhit(Direction) {
# Line 685  namespace { Line 691  namespace {
691          bool m_burning;          bool m_burning;
692    
693          // Private methods          // Private methods
694          void explode() {          virtual void explode() = 0;
             GridPos p = get_pos();  
             SendExplosionEffect(p, BOMB);  
             play_sound("explosion1");  
             SetItem(p, MakeItem("it-explosion3"));  
         }  
695    
696          void burn() {          void burn() {
697              if (!m_burning) {              if (!m_burning) {
# Line 753  namespace Line 754  namespace
754          BlackBomb() : Bomb("it-blackbomb") {}          BlackBomb() : Bomb("it-blackbomb") {}
755      private:      private:
756          const char *burn_anim() const { return "it-blackbomb-burning"; }          const char *burn_anim() const { return "it-blackbomb-burning"; }
757            void explode() {
758                GridPos p = get_pos();
759                SendExplosionEffect(p, BLACKBOMB);
760                play_sound("explosion1");
761                SetItem(p, MakeItem("it-explosion3"));
762            }
763      };      };
764  }  }
765    
# Line 777  namespace Line 784  namespace
784    
785      private:      private:
786          const char *burn_anim() const { return "it-whitebomb-burning"; }          const char *burn_anim() const { return "it-whitebomb-burning"; }
787            void explode() {
788                GridPos p = get_pos();
789                SendExplosionEffect(p, WHITEBOMB);
790                play_sound("explosion1");
791                SetItem(p, MakeItem("it-explosion3"));
792            }
793      };      };
794  }  }
795    

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49

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