From 810053f3d4fbacb77f22bb4c2c60f5615ad5ec36 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 4 Apr 2005 16:01:00 +0000 Subject: [PATCH] moved over some changes from cvs SVN-Revision: 2332 --- Jamfile | 23 ++++------------------- Jamrules | 20 ++++++++++++++++++++ LEVELDESIGN => docs/levelformat.txt | 2 ++ TRANSLATORS => docs/translation.txt | 2 ++ WORLDMAPDESIGN => docs/worldmapformat.txt | 0 mk/jam/install.jam | 20 ++++++++++++++++++++ src/badguy/bomb.cpp | 17 ++++++++++++----- src/badguy/bomb.h | 1 + src/badguy/mrbomb.cpp | 9 +++++++++ src/badguy/mrbomb.h | 1 + supertux.desktop | 12 ++++++++++++ 11 files changed, 83 insertions(+), 24 deletions(-) rename LEVELDESIGN => docs/levelformat.txt (98%) rename TRANSLATORS => docs/translation.txt (96%) rename WORLDMAPDESIGN => docs/worldmapformat.txt (100%) create mode 100644 supertux.desktop diff --git a/Jamfile b/Jamfile index 4227a37a8..3c3fab3f6 100644 --- a/Jamfile +++ b/Jamfile @@ -1,24 +1,5 @@ SubDir TOP ; -if $(XGETTEXT) != "" -{ - actions XGetText - { - $(XGETTEXT) $(XGETTEXT_FLAGS) --keyword='_:1' -o $(<) $(>) - } - rule MakePot - { - if $(>) { - XGetText $(<) : $(>) ; - Depends $(<) : $(>) ; - Depends all : $(<) ; - } - } -} else { - rule MakePot - { } -} - # Decend into subdirs SubInclude TOP lib ; SubInclude TOP src ; @@ -31,3 +12,7 @@ Package INSTALL NEWS README COPYING AUTHORS ChangeLog ; MakePot data/locale/messages.pot : $(TRANSLATABLE_SOURCES) ; XGETTEXT_FLAGS on data/locale/messages.pot += --language=C++ ; + +InstallPixmap data/images/supertux.png data/images/supertux.xpm ; +InstallDesktop supertux.desktop ; +InstallDoc NEWS README COPYING AUTHORS ChangeLog ; diff --git a/Jamrules b/Jamrules index abdd715b7..b07ecd4b9 100644 --- a/Jamrules +++ b/Jamrules @@ -38,3 +38,23 @@ include $(TOP)/mk/jam/build.jam ; # Include Dirs IncludeDir $(top_builddir) ; # for config.h IncludeDir lib src ; + +if $(XGETTEXT) != "" +{ + actions XGetText + { + $(XGETTEXT) $(XGETTEXT_FLAGS) --keyword='_:1' -o $(<) $(>) + } + rule MakePot + { + if $(>) { + XGetText $(<) : $(>) ; + Depends $(<) : $(>) ; + Depends all : $(<) ; + } + } +} else { + rule MakePot + { } +} + diff --git a/LEVELDESIGN b/docs/levelformat.txt similarity index 98% rename from LEVELDESIGN rename to docs/levelformat.txt index 030d1909d..34646cdc0 100644 --- a/LEVELDESIGN +++ b/docs/levelformat.txt @@ -1,3 +1,5 @@ +Note: the "official" editor for supertux is now flexlay +(http://flexlay.berlios.de) - Level editing for SuperTux - http://super-tux.sf.net/ diff --git a/TRANSLATORS b/docs/translation.txt similarity index 96% rename from TRANSLATORS rename to docs/translation.txt index 20ffb7c92..328b20ef6 100644 --- a/TRANSLATORS +++ b/docs/translation.txt @@ -17,6 +17,8 @@ * Edit the .po files with your favourite Editor or with 1 of the GUI tools below. * Send the translated .po files to the supertux-devel mailing list. +* You should also edit the supertux.desktop file and add a comment entry for + your language 1. Notes for Translators ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/WORLDMAPDESIGN b/docs/worldmapformat.txt similarity index 100% rename from WORLDMAPDESIGN rename to docs/worldmapformat.txt diff --git a/mk/jam/install.jam b/mk/jam/install.jam index ad85e41c2..6d7e7c4c0 100644 --- a/mk/jam/install.jam +++ b/mk/jam/install.jam @@ -14,6 +14,8 @@ appdatadir ?= [ ConcatDirs $(datadir) $(PACKAGE_NAME) ] ; appdocdir ?= [ ConcatDirs $(datadir) doc $(PACKAGE_NAME)-$(PACKAGE_VERSION) ] ; appconfdir ?= [ ConcatDirs $(sysconfdir) $(PACKAGE_NAME) ] ; plugindir ?= [ ConcatDirs $(libdir) $(PACKAGE_NAME) ] ; +applicationsdir ?= [ ConcatDirs $(datadir) applications ] ; +pixmapsdir ?= [ ConcatDirs $(datadir) pixmaps ] ; ## InstallHeader headername [ : subdir ] ## DoInstall a headerfile into the includedir directory. A subdirectory @@ -85,6 +87,24 @@ rule InstallMan } } +## InstallPixmap files [ : subdir ] +## Install a pixmap +rule InstallPixmap +{ + LOCATE on $(<:G=installpixmap) = $(SUBDIR) ; + Depends install_data + : [ DoInstall $(<:G=installpixmap) : $(pixmapsdir) $(2) ] ; +} + +## InstallDesktop files [ : subdir ] +## Install a .desktop file (menu entries for kde/gnome and others) +rule InstallDesktop +{ + LOCATE on $(<:G=installdesktop) = $(SUBDIR) ; + Depends install_bin + : [ DoInstall $(<:G=installdesktop) : $(applicationsdir) $(2) ] ; +} + ## DoInstall sourcename : directories [ : installapp ] [ : options ] ## Creates a new installtarget for the given sources. The target(s) are ## returned as function result. diff --git a/src/badguy/bomb.cpp b/src/badguy/bomb.cpp index 9495abc92..e6dd34d3a 100644 --- a/src/badguy/bomb.cpp +++ b/src/badguy/bomb.cpp @@ -55,11 +55,7 @@ Bomb::active_action(float ) switch(state) { case 0: if(timer.check()) { - state = 1; - sprite->set_action("explosion"); - SoundManager::get()->play_sound(IDToSound(SND_EXPLODE), get_pos(), - Sector::current()->player->get_pos()); - timer.start(EXPLOSIONTIME); + explode(); } break; case 1: @@ -71,7 +67,18 @@ Bomb::active_action(float ) } void +Bomb::explode() +{ + state = 1; + sprite->set_action("explosion"); + SoundManager::get()->play_sound(IDToSound(SND_EXPLODE), get_pos(), + Sector::current()->player->get_pos()); + timer.start(EXPLOSIONTIME); +} + +void Bomb::kill_fall() { + explode(); } diff --git a/src/badguy/bomb.h b/src/badguy/bomb.h index 3813776ed..d18207883 100644 --- a/src/badguy/bomb.h +++ b/src/badguy/bomb.h @@ -14,6 +14,7 @@ public: HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); void active_action(float elapsed_time); void kill_fall(); + void explode(); private: int state; diff --git a/src/badguy/mrbomb.cpp b/src/badguy/mrbomb.cpp index 5b6395599..88db3d293 100644 --- a/src/badguy/mrbomb.cpp +++ b/src/badguy/mrbomb.cpp @@ -78,4 +78,13 @@ MrBomb::collision_badguy(BadGuy& , const CollisionHit& hit) return CONTINUE; } +void +MrBomb::kill_fall() +{ + remove_me(); + Bomb* bomb = new Bomb(get_pos(), dir); + Sector::current()->add_object(bomb); + bomb->explode(); +} + IMPLEMENT_FACTORY(MrBomb, "mrbomb") diff --git a/src/badguy/mrbomb.h b/src/badguy/mrbomb.h index 4e7943cd7..217040ac4 100644 --- a/src/badguy/mrbomb.h +++ b/src/badguy/mrbomb.h @@ -13,6 +13,7 @@ public: void write(lisp::Writer& writer); HitResponse collision_solid(GameObject& other, const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); + void kill_fall(); protected: bool collision_squished(Player& player); diff --git a/supertux.desktop b/supertux.desktop new file mode 100644 index 000000000..3423b7adb --- /dev/null +++ b/supertux.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Encoding=UTF-8 +Name=Supertux +Comment=Classic 2D jump'n run sidescroller +Comment[de]=Klassisches 2D Jump'n Run Spiel +Exec=supertux +Icon=supertux +Terminal=false +Type=Application +StartupNotify=false +Categories=Application;Game;ArcadeGame; -- 2.11.0