From 08813a74da6ac1fd045a105e4e8105f1d7f716f0 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Tue, 17 Nov 2009 13:48:00 +0000 Subject: [PATCH] Merged changes from branches/supertux-milestone2-grumbel/ to trunk/supertux/ SVN-Revision: 6009 --- CMakeLists.txt | 35 +- COPYING | 900 +++++-- Doxyfile | 1383 +++++++++- SConscript | 104 + SConstruct | 5 + TODO | 110 +- data/sounds/grow.ogg | Bin 23611 -> 12963 bytes data/sounds/skid.wav | Bin 44360 -> 46476 bytes {src => external}/binreloc/binreloc.c | 0 {src => external}/binreloc/binreloc.h | 0 {src => external}/obstack/obstack.c | 0 {src => external}/obstack/obstack.h | 0 {src => external}/squirrel/CMakeLists.txt | 5 +- {src => external}/squirrel/COPYRIGHT | 0 {src => external}/squirrel/HISTORY | 0 {src => external}/squirrel/README | 0 {src => external}/squirrel/include/sqstdaux.h | 0 {src => external}/squirrel/include/sqstdblob.h | 0 {src => external}/squirrel/include/sqstdio.h | 0 {src => external}/squirrel/include/sqstdmath.h | 0 {src => external}/squirrel/include/sqstdstring.h | 0 {src => external}/squirrel/include/sqstdsystem.h | 0 {src => external}/squirrel/include/squirrel.h | 0 .../squirrel/sqdbg/serialize_state.inl | 0 {src => external}/squirrel/sqdbg/sqdbgserver.cpp | 0 {src => external}/squirrel/sqdbg/sqdbgserver.h | 0 {src => external}/squirrel/sqdbg/sqrdbg.cpp | 0 {src => external}/squirrel/sqdbg/sqrdbg.h | 0 {src => external}/squirrel/sqstdlib/sqstdaux.cpp | 0 {src => external}/squirrel/sqstdlib/sqstdblob.cpp | 0 .../squirrel/sqstdlib/sqstdblobimpl.h | 0 {src => external}/squirrel/sqstdlib/sqstdio.cpp | 0 {src => external}/squirrel/sqstdlib/sqstdmath.cpp | 0 {src => external}/squirrel/sqstdlib/sqstdrex.cpp | 0 .../squirrel/sqstdlib/sqstdstream.cpp | 0 {src => external}/squirrel/sqstdlib/sqstdstream.h | 0 .../squirrel/sqstdlib/sqstdstring.cpp | 0 .../squirrel/sqstdlib/sqstdsystem.cpp | 0 {src => external}/squirrel/squirrel/sqapi.cpp | 0 {src => external}/squirrel/squirrel/sqarray.h | 0 {src => external}/squirrel/squirrel/sqbaselib.cpp | 0 {src => external}/squirrel/squirrel/sqclass.cpp | 0 {src => external}/squirrel/squirrel/sqclass.h | 0 {src => external}/squirrel/squirrel/sqclosure.h | 0 {src => external}/squirrel/squirrel/sqcompiler.cpp | 0 {src => external}/squirrel/squirrel/sqcompiler.h | 0 {src => external}/squirrel/squirrel/sqdebug.cpp | 0 {src => external}/squirrel/squirrel/sqfuncproto.h | 0 .../squirrel/squirrel/sqfuncstate.cpp | 0 {src => external}/squirrel/squirrel/sqfuncstate.h | 0 {src => external}/squirrel/squirrel/sqlexer.cpp | 0 {src => external}/squirrel/squirrel/sqlexer.h | 0 {src => external}/squirrel/squirrel/sqmem.cpp | 0 {src => external}/squirrel/squirrel/sqobject.cpp | 0 {src => external}/squirrel/squirrel/sqobject.h | 0 {src => external}/squirrel/squirrel/sqopcodes.h | 0 {src => external}/squirrel/squirrel/sqpcheader.h | 0 {src => external}/squirrel/squirrel/sqstate.cpp | 0 {src => external}/squirrel/squirrel/sqstate.h | 0 {src => external}/squirrel/squirrel/sqstring.h | 0 {src => external}/squirrel/squirrel/sqtable.cpp | 0 {src => external}/squirrel/squirrel/sqtable.h | 0 {src => external}/squirrel/squirrel/squserdata.h | 0 {src => external}/squirrel/squirrel/squtils.h | 0 {src => external}/squirrel/squirrel/sqvm.cpp | 0 {src => external}/squirrel/squirrel/sqvm.h | 0 src/addon/addon.cpp | 33 +- src/addon/addon.hpp | 46 +- src/addon/addon_manager.cpp | 89 +- src/addon/addon_manager.hpp | 31 +- src/addon/md5.cpp | 26 +- src/addon/md5.hpp | 79 +- src/audio/dummy_sound_source.cpp | 22 +- src/audio/dummy_sound_source.hpp | 20 +- src/audio/ogg_sound_file.cpp | 160 ++ src/audio/ogg_sound_file.hpp | 54 + src/audio/openal_sound_source.cpp | 24 +- src/audio/openal_sound_source.hpp | 22 +- src/audio/sound_error.cpp | 33 + src/audio/sound_error.hpp | 35 + src/audio/sound_file.cpp | 382 +-- src/audio/sound_file.hpp | 27 +- src/audio/sound_manager.cpp | 61 +- src/audio/sound_manager.hpp | 28 +- src/audio/sound_source.hpp | 20 +- src/audio/stream_sound_source.cpp | 44 +- src/audio/stream_sound_source.hpp | 29 +- src/audio/wav_sound_file.cpp | 169 ++ src/audio/wav_sound_file.hpp | 45 + src/badguy/angrystone.cpp | 70 +- src/badguy/angrystone.hpp | 38 +- src/badguy/badguy.cpp | 102 +- src/badguy/badguy.hpp | 207 +- src/badguy/bomb.cpp | 59 +- src/badguy/bomb.hpp | 32 +- src/badguy/bouncing_snowball.cpp | 39 +- src/badguy/bouncing_snowball.hpp | 26 +- src/badguy/captainsnowball.cpp | 32 +- src/badguy/captainsnowball.hpp | 24 +- src/badguy/crystallo.cpp | 34 +- src/badguy/crystallo.hpp | 25 +- src/badguy/dart.cpp | 56 +- src/badguy/dart.hpp | 34 +- src/badguy/darttrap.cpp | 52 +- src/badguy/darttrap.hpp | 28 +- src/badguy/dispenser.cpp | 90 +- src/badguy/dispenser.hpp | 29 +- src/badguy/fish.cpp | 51 +- src/badguy/fish.hpp | 26 +- src/badguy/flame.cpp | 48 +- src/badguy/flame.hpp | 25 +- src/badguy/flyingsnowball.cpp | 62 +- src/badguy/flyingsnowball.hpp | 26 +- src/badguy/ghosttree.cpp | 61 +- src/badguy/ghosttree.hpp | 28 +- src/badguy/igel.cpp | 55 +- src/badguy/igel.hpp | 27 +- src/badguy/jumpy.cpp | 45 +- src/badguy/jumpy.hpp | 28 +- src/badguy/kamikazesnowball.cpp | 40 +- src/badguy/kamikazesnowball.hpp | 25 +- src/badguy/kugelblitz.cpp | 87 +- src/badguy/kugelblitz.hpp | 30 +- src/badguy/mole.cpp | 59 +- src/badguy/mole.hpp | 35 +- src/badguy/mole_rock.cpp | 51 +- src/badguy/mole_rock.hpp | 32 +- src/badguy/mrbomb.cpp | 51 +- src/badguy/mrbomb.hpp | 30 +- src/badguy/mriceblock.cpp | 109 +- src/badguy/mriceblock.hpp | 35 +- src/badguy/mrrocket.cpp | 51 +- src/badguy/mrrocket.hpp | 29 +- src/badguy/mrtree.cpp | 46 +- src/badguy/mrtree.hpp | 25 +- src/badguy/plant.cpp | 41 +- src/badguy/plant.hpp | 32 +- src/badguy/poisonivy.cpp | 42 +- src/badguy/poisonivy.hpp | 26 +- src/badguy/root.cpp | 32 +- src/badguy/root.hpp | 25 +- src/badguy/skullyhop.cpp | 78 +- src/badguy/skullyhop.hpp | 35 +- src/badguy/smartball.cpp | 25 +- src/badguy/smartball.hpp | 25 +- src/badguy/snail.cpp | 79 +- src/badguy/snail.hpp | 30 +- src/badguy/snowball.cpp | 38 +- src/badguy/snowball.hpp | 26 +- src/badguy/spidermite.cpp | 48 +- src/badguy/spidermite.hpp | 31 +- src/badguy/spiky.cpp | 36 +- src/badguy/spiky.hpp | 26 +- src/badguy/sspiky.cpp | 38 +- src/badguy/sspiky.hpp | 26 +- src/badguy/stalactite.cpp | 50 +- src/badguy/stalactite.hpp | 33 +- src/badguy/stumpy.cpp | 53 +- src/badguy/stumpy.hpp | 34 +- src/badguy/toad.cpp | 90 +- src/badguy/toad.hpp | 33 +- src/badguy/totem.cpp | 56 +- src/badguy/totem.hpp | 38 +- src/badguy/treewillowisp.cpp | 41 +- src/badguy/treewillowisp.hpp | 31 +- src/badguy/walking_badguy.cpp | 73 +- src/badguy/walking_badguy.hpp | 41 +- src/badguy/walkingleaf.cpp | 30 +- src/badguy/walkingleaf.hpp | 25 +- src/badguy/willowisp.cpp | 134 +- src/badguy/willowisp.hpp | 31 +- src/badguy/yeti.cpp | 86 +- src/badguy/yeti.hpp | 31 +- src/badguy/yeti_stalactite.cpp | 33 +- src/badguy/yeti_stalactite.hpp | 27 +- src/badguy/zeekling.cpp | 106 +- src/badguy/zeekling.hpp | 46 +- src/colorscheme.cpp | 60 - src/control/codecontroller.cpp | 19 +- src/control/codecontroller.hpp | 21 +- src/control/controller.cpp | 19 +- src/control/controller.hpp | 19 +- src/control/joystickkeyboardcontroller.cpp | 322 ++- src/control/joystickkeyboardcontroller.hpp | 37 +- src/direction.cpp | 45 - src/file_system.hpp | 50 - src/gettext.hpp | 38 - src/gui/button.cpp | 268 +- src/gui/button.hpp | 56 +- src/gui/button_group.cpp | 183 ++ src/gui/button_group.hpp | 62 + src/gui/menu.cpp | 552 ++-- src/gui/menu.hpp | 40 +- src/gui/mousecursor.cpp | 31 +- src/gui/mousecursor.hpp | 23 +- src/lisp/lexer.cpp | 76 +- src/lisp/lexer.hpp | 29 +- src/lisp/lisp.cpp | 22 +- src/lisp/lisp.hpp | 24 +- src/lisp/list_iterator.cpp | 26 +- src/lisp/list_iterator.hpp | 30 +- src/lisp/parser.cpp | 37 +- src/lisp/parser.hpp | 31 +- src/lisp/writer.cpp | 35 +- src/lisp/writer.hpp | 83 +- src/log.cpp | 37 - src/log.hpp | 82 - src/main.cpp | 650 +---- src/math/aatriangle.hpp | 21 +- src/{ => math}/random_generator.cpp | 314 +-- src/math/random_generator.hpp | 133 + src/math/rect.hpp | 26 +- src/math/vector.cpp | 17 +- src/math/vector.hpp | 73 +- src/object/ambient_sound.cpp | 38 +- src/object/ambient_sound.hpp | 34 +- src/object/anchor_point.cpp | 21 +- src/object/anchor_point.hpp | 22 +- src/object/background.cpp | 52 +- src/object/background.hpp | 35 +- src/object/bicycle_platform.cpp | 61 +- src/object/bicycle_platform.hpp | 26 +- src/object/block.cpp | 168 +- src/object/block.hpp | 34 +- src/object/bouncy_coin.cpp | 78 + src/object/bouncy_coin.hpp | 50 + src/object/broken_brick.cpp | 52 + src/object/broken_brick.hpp | 51 + src/object/bullet.cpp | 40 +- src/object/bullet.hpp | 28 +- src/object/camera.cpp | 70 +- src/object/camera.hpp | 48 +- src/object/candle.cpp | 35 +- src/object/candle.hpp | 31 +- src/object/coin.cpp | 158 +- src/object/coin.hpp | 24 +- src/object/decal.cpp | 47 +- src/object/decal.hpp | 33 +- src/object/display_effect.cpp | 134 +- src/object/display_effect.hpp | 89 +- src/object/electrifier.cpp | 23 +- src/object/electrifier.hpp | 24 +- src/object/endsequence.cpp | 37 +- src/object/endsequence.hpp | 63 +- src/object/endsequence_fireworks.cpp | 28 +- src/object/endsequence_fireworks.hpp | 36 +- src/object/endsequence_walkleft.cpp | 26 +- src/object/endsequence_walkleft.hpp | 38 +- src/object/endsequence_walkright.cpp | 26 +- src/object/endsequence_walkright.hpp | 38 +- src/object/explosion.cpp | 59 +- src/object/explosion.hpp | 22 +- src/object/falling_coin.cpp | 23 +- src/object/falling_coin.hpp | 33 +- src/object/firefly.cpp | 70 +- src/object/firefly.hpp | 26 +- src/object/fireworks.cpp | 66 +- src/object/fireworks.hpp | 23 +- src/object/floating_image.cpp | 46 +- src/object/floating_image.hpp | 24 +- src/object/floating_text.cpp | 73 + src/object/floating_text.hpp | 47 + src/object/flower.cpp | 31 +- src/object/flower.hpp | 29 +- src/object/gameobjs.cpp | 205 -- src/object/gameobjs.hpp | 102 - src/object/gradient.cpp | 62 +- src/object/gradient.hpp | 35 +- src/object/growup.cpp | 31 +- src/object/growup.hpp | 29 +- src/object/hurting_platform.cpp | 29 +- src/object/hurting_platform.hpp | 23 +- src/object/icecrusher.cpp | 53 +- src/object/icecrusher.hpp | 78 +- src/object/infoblock.cpp | 48 +- src/object/infoblock.hpp | 26 +- src/object/invisible_block.cpp | 37 +- src/object/invisible_block.hpp | 21 +- src/object/invisible_wall.cpp | 33 +- src/object/invisible_wall.hpp | 29 +- src/object/ispy.cpp | 56 +- src/object/ispy.hpp | 26 +- src/object/lantern.cpp | 36 +- src/object/lantern.hpp | 28 +- src/object/level_time.cpp | 38 +- src/object/level_time.hpp | 98 +- src/object/light.cpp | 27 +- src/object/light.hpp | 26 +- src/object/magicblock.cpp | 47 +- src/object/magicblock.hpp | 24 +- src/object/moving_sprite.cpp | 61 +- src/object/moving_sprite.hpp | 76 +- src/object/oneup.cpp | 32 +- src/object/oneup.hpp | 29 +- src/object/particles.cpp | 50 +- src/object/particles.hpp | 27 +- src/object/particlesystem.cpp | 67 +- src/object/particlesystem.hpp | 152 +- src/object/particlesystem_interactive.cpp | 270 +- src/object/particlesystem_interactive.hpp | 117 +- src/object/path.cpp | 72 +- src/object/path.hpp | 31 +- src/object/path_walker.cpp | 31 +- src/object/path_walker.hpp | 27 +- src/object/platform.cpp | 65 +- src/object/platform.hpp | 30 +- src/object/player.cpp | 281 +- src/object/player.hpp | 56 +- src/object/pneumatic_platform.cpp | 55 +- src/object/pneumatic_platform.hpp | 26 +- src/object/portable.hpp | 25 +- src/object/powerup.cpp | 35 +- src/object/powerup.hpp | 27 +- src/object/pulsing_light.cpp | 31 +- src/object/pulsing_light.hpp | 25 +- src/object/pushbutton.cpp | 40 +- src/object/pushbutton.hpp | 24 +- src/object/rainsplash.cpp | 21 +- src/object/rainsplash.hpp | 29 +- src/object/rock.cpp | 53 +- src/object/rock.hpp | 34 +- src/object/scripted_object.cpp | 30 +- src/object/scripted_object.hpp | 34 +- src/object/skull_tile.cpp | 33 +- src/object/skull_tile.hpp | 27 +- src/object/smoke_cloud.cpp | 48 + src/object/smoke_cloud.hpp | 50 + src/object/specialriser.cpp | 28 +- src/object/specialriser.hpp | 21 +- src/object/spotlight.cpp | 47 +- src/object/spotlight.hpp | 37 +- src/object/sprite_particle.cpp | 39 +- src/object/sprite_particle.hpp | 33 +- src/object/star.cpp | 27 +- src/object/star.hpp | 27 +- src/object/text_object.cpp | 40 +- src/object/text_object.hpp | 28 +- src/object/thunderstorm.cpp | 46 +- src/object/thunderstorm.hpp | 115 +- src/object/tilemap.cpp | 130 +- src/object/tilemap.hpp | 45 +- src/object/trampoline.cpp | 49 +- src/object/trampoline.hpp | 23 +- src/object/unstable_tile.cpp | 33 +- src/object/unstable_tile.hpp | 32 +- src/object/weak_block.cpp | 31 +- src/object/weak_block.hpp | 27 +- src/object/wind.cpp | 37 +- src/object/wind.hpp | 34 +- src/object_factory.hpp | 81 - src/obstack/obstackpp.hpp | 22 +- src/physfs/physfs_sdl.cpp | 125 +- src/physfs/physfs_sdl.hpp | 19 +- src/physfs/physfs_stream.cpp | 126 +- src/physfs/physfs_stream.hpp | 60 +- src/random_generator.hpp | 127 - src/screen_fade.hpp | 39 - src/scripting/ambient_sound.hpp | 25 +- src/scripting/anchor_points.hpp | 19 +- src/scripting/camera.cpp | 93 +- src/scripting/camera.hpp | 23 +- src/scripting/candle.cpp | 49 +- src/scripting/candle.hpp | 26 +- src/scripting/display_effect.hpp | 58 +- src/scripting/floating_image.cpp | 26 +- src/scripting/floating_image.hpp | 28 +- src/scripting/functions.cpp | 105 +- src/scripting/functions.hpp | 28 +- src/scripting/level.cpp | 91 +- src/scripting/level.hpp | 42 +- src/scripting/level_time.cpp | 65 +- src/scripting/level_time.hpp | 22 +- src/scripting/platform.cpp | 57 +- src/scripting/platform.hpp | 22 +- src/scripting/player.hpp | 26 +- src/scripting/scripted_object.hpp | 22 +- src/scripting/serialize.cpp | 33 +- src/scripting/serialize.hpp | 36 +- src/scripting/squirrel_error.cpp | 21 +- src/scripting/squirrel_error.hpp | 22 +- src/scripting/squirrel_util.cpp | 217 +- src/scripting/squirrel_util.hpp | 143 +- src/scripting/ssector.hpp | 26 +- src/scripting/text.hpp | 22 +- src/scripting/thread_queue.cpp | 25 +- src/scripting/thread_queue.hpp | 25 +- src/scripting/thunderstorm.cpp | 86 +- src/scripting/thunderstorm.hpp | 70 +- src/scripting/tilemap.cpp | 81 +- src/scripting/tilemap.hpp | 22 +- src/scripting/time_scheduler.cpp | 37 +- src/scripting/time_scheduler.hpp | 25 +- src/scripting/willowisp.hpp | 22 +- src/scripting/wind.cpp | 49 +- src/scripting/wind.hpp | 22 +- src/scripting/wrapper.cpp | 2828 ++++++++++---------- src/scripting/wrapper.hpp | 47 +- src/scripting/wrapper.interface.hpp | 38 +- src/serializable.hpp | 33 - src/spawn_point.cpp | 58 - src/spawn_point.hpp | 37 - src/sprite/sprite.cpp | 32 +- src/sprite/sprite.hpp | 32 +- src/sprite/sprite_data.cpp | 33 +- src/sprite/sprite_data.hpp | 21 +- src/sprite/sprite_manager.cpp | 36 +- src/sprite/sprite_manager.hpp | 22 +- src/{ => supertux}/collision.cpp | 57 +- src/{ => supertux}/collision.hpp | 43 +- src/{ => supertux}/collision_hit.hpp | 40 +- src/supertux/colorscheme.cpp | 61 + src/{ => supertux}/console.cpp | 53 +- src/{ => supertux}/console.hpp | 46 +- src/{ => supertux}/constants.hpp | 19 +- src/supertux/direction.cpp | 43 + src/{ => supertux}/direction.hpp | 21 +- src/{ => supertux}/fadeout.cpp | 22 +- src/{ => supertux}/fadeout.hpp | 22 +- src/{ => supertux}/flip_level_transformer.cpp | 32 +- src/{ => supertux}/flip_level_transformer.hpp | 23 +- src/{ => supertux}/game_object.cpp | 32 +- src/{ => supertux}/game_object.hpp | 27 +- src/{ => supertux}/game_session.cpp | 141 +- src/{ => supertux}/game_session.hpp | 45 +- src/{ => supertux}/gameconfig.cpp | 39 +- src/{ => supertux}/gameconfig.hpp | 24 +- src/{ => supertux}/level.cpp | 80 +- src/{ => supertux}/level.hpp | 37 +- src/{ => supertux}/level_transformer.cpp | 22 +- src/{ => supertux}/level_transformer.hpp | 20 +- src/{ => supertux}/levelintro.cpp | 60 +- src/{ => supertux}/levelintro.hpp | 35 +- src/supertux/main.cpp | 636 +++++ src/{ => supertux}/main.hpp | 25 +- src/{ => supertux}/mainloop.cpp | 179 +- src/{ => supertux}/mainloop.hpp | 24 +- src/{ => supertux}/moving_object.cpp | 18 +- src/{ => supertux}/moving_object.hpp | 135 +- src/{ => supertux}/object_factory.cpp | 19 +- src/supertux/object_factory.hpp | 80 + src/{ => supertux}/object_remove_listener.hpp | 20 +- src/{ => supertux}/options_menu.cpp | 216 +- src/{ => supertux}/options_menu.hpp | 20 +- src/{ => supertux}/physic.cpp | 48 +- src/{ => supertux}/physic.hpp | 50 +- src/{ => supertux}/player_status.cpp | 35 +- src/{ => supertux}/player_status.hpp | 30 +- src/{ => supertux}/profile_menu.cpp | 54 +- src/{ => supertux}/profile_menu.hpp | 15 +- src/{ => supertux}/resources.cpp | 23 +- src/{ => supertux}/resources.hpp | 20 +- src/{ => supertux}/screen.hpp | 20 +- src/supertux/screen_fade.hpp | 48 + src/{ => supertux}/script_interface.hpp | 21 +- src/{ => supertux}/sector.cpp | 354 +-- src/{ => supertux}/sector.hpp | 55 +- src/{ => supertux}/shrinkfade.cpp | 20 +- src/{ => supertux}/shrinkfade.hpp | 22 +- src/supertux/spawn_point.cpp | 54 + src/supertux/spawn_point.hpp | 36 + src/{ => supertux}/statistics.cpp | 95 +- src/{ => supertux}/statistics.hpp | 22 +- src/{ => supertux}/textscroller.cpp | 84 +- src/{ => supertux}/textscroller.hpp | 30 +- src/{ => supertux}/tile.cpp | 63 +- src/{ => supertux}/tile.hpp | 41 +- src/{ => supertux}/tile_manager.cpp | 41 +- src/{ => supertux}/tile_manager.hpp | 34 +- src/{ => supertux}/tile_set.cpp | 96 +- src/{ => supertux}/tile_set.hpp | 28 +- src/{ => supertux}/timer.cpp | 20 +- src/{ => supertux}/timer.hpp | 21 +- src/{ => supertux}/title.cpp | 95 +- src/{ => supertux}/title.hpp | 26 +- src/{ => supertux}/world.cpp | 54 +- src/{ => supertux}/world.hpp | 24 +- src/trigger/climbable.cpp | 57 +- src/trigger/climbable.hpp | 39 +- src/trigger/door.cpp | 76 +- src/trigger/door.hpp | 38 +- src/trigger/scripttrigger.cpp | 46 +- src/trigger/scripttrigger.hpp | 31 +- src/trigger/secretarea_trigger.cpp | 55 +- src/trigger/secretarea_trigger.hpp | 35 +- src/trigger/sequence_trigger.cpp | 45 +- src/trigger/sequence_trigger.hpp | 29 +- src/trigger/switch.cpp | 67 +- src/trigger/switch.hpp | 35 +- src/trigger/trigger_base.cpp | 29 +- src/trigger/trigger_base.hpp | 34 +- src/util/currenton.hpp | 59 + src/{ => util}/file_system.cpp | 28 +- src/util/file_system.hpp | 47 + src/util/gettext.hpp | 41 + src/util/log.cpp | 71 + src/util/log.hpp | 56 + src/util/reader.hpp | 27 + src/util/reader_fwd.hpp | 29 + src/{ => util}/ref.hpp | 30 +- src/{ => util}/refcounter.hpp | 20 +- src/util/writer.hpp | 27 + src/util/writer_fwd.hpp | 29 + src/video/color.cpp | 18 +- src/video/color.hpp | 58 +- src/video/drawing_context.cpp | 79 +- src/video/drawing_context.hpp | 44 +- src/video/drawing_request.hpp | 43 +- src/video/font.cpp | 246 +- src/video/font.hpp | 36 +- src/video/gl/gl_lightmap.cpp | 368 +++ src/video/gl/gl_lightmap.hpp | 59 + src/video/{ => gl}/gl_renderer.cpp | 475 ++-- src/video/gl/gl_renderer.hpp | 46 + src/video/gl/gl_surface_data.hpp | 64 + src/video/gl/gl_texture.cpp | 150 ++ src/video/gl/gl_texture.hpp | 85 + src/video/gl_lightmap.cpp | 370 --- src/video/gl_lightmap.hpp | 63 - src/video/gl_renderer.hpp | 55 - src/video/gl_surface_data.hpp | 73 - src/video/gl_texture.cpp | 164 -- src/video/gl_texture.hpp | 98 - src/video/glutil.hpp | 44 +- src/video/lightmap.hpp | 37 +- src/video/renderer.cpp | 15 +- src/video/renderer.hpp | 38 +- src/video/sdl/sdl_lightmap.cpp | 599 +++++ src/video/sdl/sdl_lightmap.hpp | 55 + src/video/sdl/sdl_renderer.cpp | 431 +++ src/video/sdl/sdl_renderer.hpp | 48 + src/video/sdl/sdl_surface_data.hpp | 81 + src/video/sdl/sdl_texture.cpp | 657 +++++ src/video/sdl/sdl_texture.hpp | 137 + src/video/sdl_lightmap.cpp | 620 ----- src/video/sdl_lightmap.hpp | 61 - src/video/sdl_renderer.cpp | 450 ---- src/video/sdl_renderer.hpp | 51 - src/video/sdl_surface_data.hpp | 84 - src/video/sdl_texture.cpp | 661 ----- src/video/sdl_texture.hpp | 141 - src/video/surface.cpp | 137 + src/video/surface.hpp | 134 +- src/video/texture.hpp | 25 +- src/video/texture_manager.cpp | 81 +- src/video/texture_manager.hpp | 38 +- src/video/video_systems.cpp | 98 +- src/video/video_systems.hpp | 33 +- src/worldmap/direction.hpp | 20 +- src/worldmap/level.cpp | 42 +- src/worldmap/level.hpp | 33 +- src/worldmap/spawn_point.cpp | 74 +- src/worldmap/spawn_point.hpp | 36 +- src/worldmap/special_tile.cpp | 24 +- src/worldmap/special_tile.hpp | 28 +- src/worldmap/sprite_change.cpp | 24 +- src/worldmap/sprite_change.hpp | 30 +- src/worldmap/teleporter.cpp | 24 +- src/worldmap/teleporter.hpp | 28 +- src/worldmap/tux.cpp | 83 +- src/worldmap/tux.hpp | 35 +- src/worldmap/worldmap.cpp | 312 +-- src/worldmap/worldmap.hpp | 48 +- test/md5_test.cpp | 41 + tools/miniswig/create_wrapper.cpp | 35 +- 564 files changed, 19019 insertions(+), 18384 deletions(-) create mode 100644 SConscript create mode 100644 SConstruct rename {src => external}/binreloc/binreloc.c (100%) rename {src => external}/binreloc/binreloc.h (100%) rename {src => external}/obstack/obstack.c (100%) rename {src => external}/obstack/obstack.h (100%) rename {src => external}/squirrel/CMakeLists.txt (88%) rename {src => external}/squirrel/COPYRIGHT (100%) rename {src => external}/squirrel/HISTORY (100%) rename {src => external}/squirrel/README (100%) rename {src => external}/squirrel/include/sqstdaux.h (100%) rename {src => external}/squirrel/include/sqstdblob.h (100%) rename {src => external}/squirrel/include/sqstdio.h (100%) rename {src => external}/squirrel/include/sqstdmath.h (100%) rename {src => external}/squirrel/include/sqstdstring.h (100%) rename {src => external}/squirrel/include/sqstdsystem.h (100%) rename {src => external}/squirrel/include/squirrel.h (100%) rename {src => external}/squirrel/sqdbg/serialize_state.inl (100%) rename {src => external}/squirrel/sqdbg/sqdbgserver.cpp (100%) rename {src => external}/squirrel/sqdbg/sqdbgserver.h (100%) rename {src => external}/squirrel/sqdbg/sqrdbg.cpp (100%) rename {src => external}/squirrel/sqdbg/sqrdbg.h (100%) rename {src => external}/squirrel/sqstdlib/sqstdaux.cpp (100%) rename {src => external}/squirrel/sqstdlib/sqstdblob.cpp (100%) rename {src => external}/squirrel/sqstdlib/sqstdblobimpl.h (100%) rename {src => external}/squirrel/sqstdlib/sqstdio.cpp (100%) rename {src => external}/squirrel/sqstdlib/sqstdmath.cpp (100%) rename {src => external}/squirrel/sqstdlib/sqstdrex.cpp (100%) rename {src => external}/squirrel/sqstdlib/sqstdstream.cpp (100%) rename {src => external}/squirrel/sqstdlib/sqstdstream.h (100%) rename {src => external}/squirrel/sqstdlib/sqstdstring.cpp (100%) rename {src => external}/squirrel/sqstdlib/sqstdsystem.cpp (100%) rename {src => external}/squirrel/squirrel/sqapi.cpp (100%) rename {src => external}/squirrel/squirrel/sqarray.h (100%) rename {src => external}/squirrel/squirrel/sqbaselib.cpp (100%) rename {src => external}/squirrel/squirrel/sqclass.cpp (100%) rename {src => external}/squirrel/squirrel/sqclass.h (100%) rename {src => external}/squirrel/squirrel/sqclosure.h (100%) rename {src => external}/squirrel/squirrel/sqcompiler.cpp (100%) rename {src => external}/squirrel/squirrel/sqcompiler.h (100%) rename {src => external}/squirrel/squirrel/sqdebug.cpp (100%) rename {src => external}/squirrel/squirrel/sqfuncproto.h (100%) rename {src => external}/squirrel/squirrel/sqfuncstate.cpp (100%) rename {src => external}/squirrel/squirrel/sqfuncstate.h (100%) rename {src => external}/squirrel/squirrel/sqlexer.cpp (100%) rename {src => external}/squirrel/squirrel/sqlexer.h (100%) rename {src => external}/squirrel/squirrel/sqmem.cpp (100%) rename {src => external}/squirrel/squirrel/sqobject.cpp (100%) rename {src => external}/squirrel/squirrel/sqobject.h (100%) rename {src => external}/squirrel/squirrel/sqopcodes.h (100%) rename {src => external}/squirrel/squirrel/sqpcheader.h (100%) rename {src => external}/squirrel/squirrel/sqstate.cpp (100%) rename {src => external}/squirrel/squirrel/sqstate.h (100%) rename {src => external}/squirrel/squirrel/sqstring.h (100%) rename {src => external}/squirrel/squirrel/sqtable.cpp (100%) rename {src => external}/squirrel/squirrel/sqtable.h (100%) rename {src => external}/squirrel/squirrel/squserdata.h (100%) rename {src => external}/squirrel/squirrel/squtils.h (100%) rename {src => external}/squirrel/squirrel/sqvm.cpp (100%) rename {src => external}/squirrel/squirrel/sqvm.h (100%) create mode 100644 src/audio/ogg_sound_file.cpp create mode 100644 src/audio/ogg_sound_file.hpp create mode 100644 src/audio/sound_error.cpp create mode 100644 src/audio/sound_error.hpp create mode 100644 src/audio/wav_sound_file.cpp create mode 100644 src/audio/wav_sound_file.hpp delete mode 100644 src/colorscheme.cpp delete mode 100644 src/direction.cpp delete mode 100644 src/file_system.hpp delete mode 100644 src/gettext.hpp create mode 100644 src/gui/button_group.cpp create mode 100644 src/gui/button_group.hpp delete mode 100644 src/log.cpp delete mode 100644 src/log.hpp rename src/{ => math}/random_generator.cpp (70%) create mode 100644 src/math/random_generator.hpp create mode 100644 src/object/bouncy_coin.cpp create mode 100644 src/object/bouncy_coin.hpp create mode 100644 src/object/broken_brick.cpp create mode 100644 src/object/broken_brick.hpp create mode 100644 src/object/floating_text.cpp create mode 100644 src/object/floating_text.hpp delete mode 100644 src/object/gameobjs.cpp delete mode 100644 src/object/gameobjs.hpp create mode 100644 src/object/smoke_cloud.cpp create mode 100644 src/object/smoke_cloud.hpp delete mode 100644 src/object_factory.hpp delete mode 100644 src/random_generator.hpp delete mode 100644 src/screen_fade.hpp delete mode 100644 src/serializable.hpp delete mode 100644 src/spawn_point.cpp delete mode 100644 src/spawn_point.hpp rename src/{ => supertux}/collision.cpp (78%) rename src/{ => supertux}/collision.hpp (56%) rename src/{ => supertux}/collision_hit.hpp (64%) create mode 100644 src/supertux/colorscheme.cpp rename src/{ => supertux}/console.cpp (93%) rename src/{ => supertux}/console.hpp (86%) rename src/{ => supertux}/constants.hpp (61%) create mode 100644 src/supertux/direction.cpp rename src/{ => supertux}/direction.hpp (53%) rename src/{ => supertux}/fadeout.cpp (64%) rename src/{ => supertux}/fadeout.hpp (63%) rename src/{ => supertux}/flip_level_transformer.cpp (86%) rename src/{ => supertux}/flip_level_transformer.hpp (66%) rename src/{ => supertux}/game_object.cpp (69%) rename src/{ => supertux}/game_object.hpp (82%) rename src/{ => supertux}/game_session.cpp (81%) rename src/{ => supertux}/game_session.hpp (82%) rename src/{ => supertux}/gameconfig.cpp (84%) rename src/{ => supertux}/gameconfig.hpp (73%) rename src/{ => supertux}/level.cpp (76%) rename src/{ => supertux}/level.hpp (68%) rename src/{ => supertux}/level_transformer.cpp (55%) rename src/{ => supertux}/level_transformer.hpp (63%) rename src/{ => supertux}/levelintro.cpp (75%) rename src/{ => supertux}/levelintro.hpp (69%) create mode 100644 src/supertux/main.cpp rename src/{ => supertux}/main.hpp (63%) rename src/{ => supertux}/mainloop.cpp (65%) rename src/{ => supertux}/mainloop.hpp (78%) rename src/{ => supertux}/moving_object.cpp (51%) rename src/{ => supertux}/moving_object.hpp (51%) rename src/{ => supertux}/object_factory.cpp (70%) create mode 100644 src/supertux/object_factory.hpp rename src/{ => supertux}/object_remove_listener.hpp (53%) rename src/{ => supertux}/options_menu.cpp (56%) rename src/{ => supertux}/options_menu.hpp (52%) rename src/{ => supertux}/physic.cpp (68%) rename src/{ => supertux}/physic.hpp (63%) rename src/{ => supertux}/player_status.cpp (84%) rename src/{ => supertux}/player_status.hpp (69%) rename src/{ => supertux}/profile_menu.cpp (58%) rename src/{ => supertux}/profile_menu.hpp (51%) rename src/{ => supertux}/resources.cpp (75%) rename src/{ => supertux}/resources.hpp (58%) rename src/{ => supertux}/screen.hpp (74%) create mode 100644 src/supertux/screen_fade.hpp rename src/{ => supertux}/script_interface.hpp (60%) rename src/{ => supertux}/sector.cpp (84%) rename src/{ => supertux}/sector.hpp (86%) rename src/{ => supertux}/shrinkfade.cpp (73%) rename src/{ => supertux}/shrinkfade.hpp (63%) create mode 100644 src/supertux/spawn_point.cpp create mode 100644 src/supertux/spawn_point.hpp rename src/{ => supertux}/statistics.cpp (84%) rename src/{ => supertux}/statistics.hpp (84%) rename src/{ => supertux}/textscroller.cpp (83%) rename src/{ => supertux}/textscroller.hpp (77%) rename src/{ => supertux}/tile.cpp (79%) rename src/{ => supertux}/tile.hpp (84%) rename src/{ => supertux}/tile_manager.cpp (67%) rename src/{ => supertux}/tile_manager.hpp (53%) rename src/{ => supertux}/tile_set.cpp (71%) rename src/{ => supertux}/tile_set.hpp (67%) rename src/{ => supertux}/timer.cpp (67%) rename src/{ => supertux}/timer.hpp (74%) rename src/{ => supertux}/title.cpp (84%) rename src/{ => supertux}/title.hpp (75%) rename src/{ => supertux}/world.cpp (84%) rename src/{ => supertux}/world.hpp (72%) create mode 100644 src/util/currenton.hpp rename src/{ => util}/file_system.cpp (81%) create mode 100644 src/util/file_system.hpp create mode 100644 src/util/gettext.hpp create mode 100644 src/util/log.cpp create mode 100644 src/util/log.hpp create mode 100644 src/util/reader.hpp create mode 100644 src/util/reader_fwd.hpp rename src/{ => util}/ref.hpp (71%) rename src/{ => util}/refcounter.hpp (66%) create mode 100644 src/util/writer.hpp create mode 100644 src/util/writer_fwd.hpp create mode 100644 src/video/gl/gl_lightmap.cpp create mode 100644 src/video/gl/gl_lightmap.hpp rename src/video/{ => gl}/gl_renderer.cpp (58%) create mode 100644 src/video/gl/gl_renderer.hpp create mode 100644 src/video/gl/gl_surface_data.hpp create mode 100644 src/video/gl/gl_texture.cpp create mode 100644 src/video/gl/gl_texture.hpp delete mode 100644 src/video/gl_lightmap.cpp delete mode 100644 src/video/gl_lightmap.hpp delete mode 100644 src/video/gl_renderer.hpp delete mode 100644 src/video/gl_surface_data.hpp delete mode 100644 src/video/gl_texture.cpp delete mode 100644 src/video/gl_texture.hpp create mode 100644 src/video/sdl/sdl_lightmap.cpp create mode 100644 src/video/sdl/sdl_lightmap.hpp create mode 100644 src/video/sdl/sdl_renderer.cpp create mode 100644 src/video/sdl/sdl_renderer.hpp create mode 100644 src/video/sdl/sdl_surface_data.hpp create mode 100644 src/video/sdl/sdl_texture.cpp create mode 100644 src/video/sdl/sdl_texture.hpp delete mode 100644 src/video/sdl_lightmap.cpp delete mode 100644 src/video/sdl_lightmap.hpp delete mode 100644 src/video/sdl_renderer.cpp delete mode 100644 src/video/sdl_renderer.hpp delete mode 100644 src/video/sdl_surface_data.hpp delete mode 100644 src/video/sdl_texture.cpp delete mode 100644 src/video/sdl_texture.hpp create mode 100644 src/video/surface.cpp create mode 100644 test/md5_test.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 91782025b..0db533738 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -152,20 +152,27 @@ include_directories (${CMAKE_BINARY_DIR}/) ## Also execute instructions in src/squirrel/CMakeLists.txt -ADD_SUBDIRECTORY(src/squirrel) +ADD_SUBDIRECTORY(external/squirrel) ## Add squirrel lib dir to search path -LINK_DIRECTORIES(src/squirrel) +LINK_DIRECTORIES(external/squirrel) ## Some additional include paths include_directories (${SUPERTUX_SOURCE_DIR}/src/) -include_directories (${SUPERTUX_SOURCE_DIR}/src/squirrel/include/) +include_directories (${SUPERTUX_SOURCE_DIR}/external/squirrel/include/) +include_directories (${SUPERTUX_SOURCE_DIR}/external/) +include_directories (${SUPERTUX_SOURCE_DIR}/external/obstack/) ## Build list of sources for supertux binary -FILE(GLOB SUPERTUX_SOURCES RELATIVE ${SUPERTUX_SOURCE_DIR} src/*.cpp src/*/*.cpp src/obstack/*.c) +FILE(GLOB SUPERTUX_SOURCES RELATIVE ${SUPERTUX_SOURCE_DIR} src/*.cpp src/*/*.cpp src/video/sdl/*.cpp external/obstack/*.c external/tinygettext/*.cpp) + +IF(HAVE_OPENGL) + FILE(GLOB SUPERTUX_OPENGL_SOURCES RELATIVE ${SUPERTUX_SOURCE_DIR} src/video/gl/*.cpp) + SET(SUPERTUX_SOURCES ${SUPERTUX_SOURCES} ${SUPERTUX_OPENGL_SOURCES}) +ENDIF(HAVE_OPENGL) ## Precompile "a few" headers in GCC OPTION(PRECOMPILE_HEADERS "Precompile headers (experimental)" OFF) @@ -226,8 +233,8 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC) OPTION(ENABLE_SQDBG "Build squirrel script interpreter with debugging options" OFF) IF(ENABLE_SQDBG) - include_directories (${SUPERTUX_SOURCE_DIR}/src/squirrel/) - FILE(GLOB SQDBG_SOURCES RELATIVE ${SUPERTUX_SOURCE_DIR} src/squirrel/sqdbg/*.cpp) + include_directories (${SUPERTUX_SOURCE_DIR}/external/squirrel/) + FILE(GLOB SQDBG_SOURCES RELATIVE ${SUPERTUX_SOURCE_DIR} external/squirrel/sqdbg/*.cpp) SET(SUPERTUX_SOURCES ${SQDBG_SOURCES} ${SUPERTUX_SOURCES}) ENDIF(ENABLE_SQDBG) @@ -239,7 +246,7 @@ IF(GENERATE_WRAPPER) ADD_CUSTOM_COMMAND( OUTPUT ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.cpp ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.hpp COMMAND cd ${SUPERTUX_SOURCE_DIR} && ${CMAKE_CXX_COMPILER} - ARGS -x "c++" -E -CC -DSCRIPTING_API src/scripting/wrapper.interface.hpp -o ${SUPERTUX_BINARY_DIR}/miniswig.tmp + ARGS -x "c++" -E -CC -DSCRIPTING_API src/scripting/wrapper.interface.hpp -o ${SUPERTUX_BINARY_DIR}/miniswig.tmp -I${SUPERTUX_SOURCE_DIR}/src COMMAND tools/miniswig/miniswig ARGS --input miniswig.tmp --output-cpp ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.cpp --output-hpp ${SUPERTUX_SOURCE_DIR}/src/scripting/wrapper.hpp --module supertux --select-namespace Scripting DEPENDS tools/miniswig/miniswig @@ -330,7 +337,7 @@ ENDIF(WIN32) ## Add binreloc.c if enabled IF(ENABLE_BINRELOC) - SET(SUPERTUX_SOURCES ${SUPERTUX_SOURCES} ${SUPERTUX_SOURCE_DIR}/src/binreloc/binreloc.c) + SET(SUPERTUX_SOURCES ${SUPERTUX_SOURCES} ${SUPERTUX_SOURCE_DIR}/external/binreloc/binreloc.c) ENDIF(ENABLE_BINRELOC) @@ -357,6 +364,15 @@ IF(HAVE_LIBCURL) TARGET_LINK_LIBRARIES(supertux2 ${CURL_LIBRARY}) ENDIF(HAVE_LIBCURL) +# Warnings to add +OPTION(WARNINGS "Enable long list of warnings for compiler to check" ON) +IF(WARNINGS) + SET_PROPERTY(TARGET supertux2 APPEND PROPERTY COMPILE_FLAGS +# -ansi fails in MinGW +# still left: -Weffc++ -Wold-style-cast -Wpadded -Wconversion -Wundef -Wsign-conversion -Wshadow -Winline -Wunsafe-loop-optimizations -Wfloat-equal -Wswitch-default -Wswitch-enum -Wcast-qual -Wsign-promo -Woverloaded-virtual -Wmissing-format-attribute -Wstrict-overflow=5 -Wformat=2 + "-fdiagnostics-show-option -O3 -pedantic -Wno-long-long -Wabi -Wctor-dtor-privacy -Wstrict-null-sentinel -Wcast-align -Wdisabled-optimization -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wredundant-decls -Wstack-protector") +ENDIF(WARNINGS) + ## Install stuff IF(WIN32 AND NOT UNIX) @@ -406,9 +422,6 @@ INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/INSTALL ${SUPERTUX_SOURCE_DIR}/README ${SUP INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/data/credits.txt DESTINATION ${INSTALL_SUBDIR_SHARE}) -FILE(GLOB INSTALL_DATA_DIRS ${SUPERTUX_SOURCE_DIR}/data/*/) -message(STATUS blah ${INSTALL_DATA_DIRS} blah) - INSTALL(DIRECTORY data/images data/fonts data/levels diff --git a/COPYING b/COPYING index 60549be51..443254047 100644 --- a/COPYING +++ b/COPYING @@ -1,284 +1,626 @@ + GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + Version 3, 29 June 2007 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of this License. - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest @@ -287,15 +629,15 @@ free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least +state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 19yy + Copyright (C) - This program is free software; you can redistribute it and/or modify + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -304,37 +646,31 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. - , 1 April 1989 - Ty Coon, President of Vice + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/Doxyfile b/Doxyfile index 2805a4c2a..9af10b42b 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1,16 +1,91 @@ -# Doxyfile 1.4.6 +# Doxyfile 1.6.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + PROJECT_NAME = SuperTux + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + PROJECT_NUMBER = SVN + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + OUTPUT_DIRECTORY = docs/doxygen + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ @@ -22,213 +97,1431 @@ ABBREVIATE_BRIEF = "The $name class" \ a \ an \ the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + FULL_PATH_NAMES = YES -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + TAB_SIZE = 8 -ALIASES = + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + BUILTIN_STL_SUPPORT = YES + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + INPUT = src/ + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + FILE_PATTERNS = *.cpp \ - *.hpp + *.hpp \ + */*.hpp \ + */*.cpp + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + EXCLUDE = src/squirrel/ + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + FILTER_SOURCE_FILES = NO + #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + INLINE_SOURCES = YES + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + VERBATIM_HEADERS = YES + #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + GENERATE_TREEVIEW = YES + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) +# there is already a search function so this one should typically +# be disabled. + +SEARCHENGINE = NO + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + MAN_LINKS = NO + #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + XML_PROGRAMLISTING = YES + #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + GENERATE_AUTOGEN_DEF = NO + #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + SKIP_FUNCTION_MACROS = YES + #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + PERL_PATH = /usr/bin/perl + #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + HIDE_UNDOC_RELATIONS = NO + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + HAVE_DOT = YES + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + CALL_GRAPH = YES + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + MAX_DOT_GRAPH_DEPTH = 1000 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + DOT_MULTI_TARGETS = YES + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/SConscript b/SConscript new file mode 100644 index 000000000..13b6d4d12 --- /dev/null +++ b/SConscript @@ -0,0 +1,104 @@ +# SuperTux +# Copyright (C) 2009 Ingo Ruhnke +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +class Project: + def __init__(self): + self.build_squirrel() + self.build_tinygettext() + self.build_binreloc() + self.build_supertux() + self.build_tests() + + def build_tinygettext(self): + env = Environment(CPPPATH=["external/tinygettext/", + "external/squirrel/include/", + ".", + "src"]) + env.ParseConfig("sdl-config --libs --cflags") + self.libtinygettext = env.StaticLibrary("tinygettext", Glob("external/tinygettext/*.cpp")) + + def build_binreloc(self): + env = Environment(CPPPATH=["external/binreloc/", "."]) + self.libbinreloc = env.StaticLibrary("binreloc", "external/binreloc/binreloc.c") + + def build_squirrel(self): + env = Environment(CPPPATH=["external/squirrel/include/"]) + self.libsquirrel = env.StaticLibrary("squirrel", + Glob("external/squirrel/squirrel/*.cpp") + + Glob("external/squirrel/sqstdlib/*.cpp") + + Glob("external/squirrel/sqstdlib/*.c")) + + def build_supertux(self): + self.env = Environment(CPPPATH=["external/squirrel/include/", + "external/", + "external/obstack", + "src/", + "/usr/include/AL/", # yuck + "."], + CXXFLAGS=["-O2", "-g3", + "-ansi", + "-pedantic", + "-Wall", + "-Wextra", + "-Wnon-virtual-dtor", + # "-Weffc++", + # "-Wconversion", + "-Werror", + # "-Wshadow", + "-Wcast-qual", + "-Winit-self", # only works with >= -O1 + "-Wno-unused-parameter"]) + + # Add libraries + self.env.ParseConfig("sdl-config --libs --cflags") + self.env.ParseConfig("pkg-config --libs --cflags openal") + self.env.ParseConfig("pkg-config --libs --cflags vorbis vorbisfile ogg") + self.env.Append(LIBS=[self.libsquirrel, self.libbinreloc, self.libtinygettext]) + self.env.Append(LIBS=["SDL_image", "curl", "GL", "physfs"]) + + # Create config.h + self.iconv_const = 0 + config_h = open('config.h', 'w') + config_h.write('#define PACKAGE_NAME "Supertux"\n') + config_h.write('#define PACKAGE_VERSION "Milestone 2"\n') + config_h.write('#define ENABLE_BINRELOC 1\n') + config_h.write('#define APPDATADIR "data"\n') + config_h.write('#define HAVE_LIBCURL 1\n') + config_h.write('#define HAVE_OPENGL 1\n') + config_h.write('#define DEBUG 1\n') + config_h.write('#define ICONV_CONST %s\n' % self.iconv_const) + config_h.close() + + version_h = open('version.h', 'w') + version_h.close() + + # base source + supertux_sources = Glob("src/*.cpp") + Glob("src/*/*.cpp") + + # optional video drivers + supertux_sources += Glob("src/video/gl/*.cpp") + supertux_sources += Glob("src/video/sdl/*.cpp") + + self.libsupertux = self.env.StaticLibrary("supertux", supertux_sources) + self.env.Program("supertux", ["src/main.cpp", self.libsupertux]) + + def build_tests(self): + for filename in Glob("test/*_test.cpp", strings=True): + self.env.Program(filename[:-4], [filename, self.libsupertux]) + +project = Project() + +# EOF # diff --git a/SConstruct b/SConstruct new file mode 100644 index 000000000..f1f802d4c --- /dev/null +++ b/SConstruct @@ -0,0 +1,5 @@ +# -*- mode: python -*- + +SConscript('SConscript', variant_dir='build', duplicate=0) + +# EOF # diff --git a/TODO b/TODO index e9705e649..ff546a032 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,109 @@ - TODO +Note: Controversial list of things currently broken and controversial +solutions for them. -The TODO is now located at http://supertux.lethargik.org/wiki/TODO +Coding Standard +=============== + +* no external libraries in src/, they go to external/ + +* proper separation between engine and game specific code (especially + sound and video handling) + +* normalize #include directives (all refer to top level dir) + +* use SCons instead of CMake + +* make code clean: "-O2", "-g3", + "-ansi", + "-pedantic", + "-Wall", + "-Wextra", + "-Wnon-virtual-dtor", + "-Weffc++", + "-Wconversion", + "-Werror", + "-Wshadow", + "-Wcast-qual", + "-Winit-self", # only works with >= -O1 + "-Wno-unused-parameter", + +* do not use raw pointer, especially not for Sprite and Surface + +* properly separate data members and member functions, don't mix them + in the same section + +* write namespaces like: "namespace NameSpace {", no newline before the { + +* only do one variable initialization per line, not multiple as its + currently often done in initialization list + +* conditional includes should be indended (makes it easier to handle + in include optimization): + +#ifdef FOOBAR +# include "foobar.hpp" +#endif + +* remove overuse of multi-inheritance + +* remove overuse of friend'ship + +* maybe mark interfaces as interfaces (ISerializable or SerializableInterface) + +* split files with multiple classes into multiple files with one class each + + +TODO +==== + +* GameObject::RemoveListenerListEntry: Ughs, somebody trying to + implement a list class within in the GameObject?! + +* replace random generator with mersene twister and/or move to external/ + +* check the code with Valgrind + +* cleanup doxygen comments, use /** */, nothing else + +* static vs anonymous namespace + +* use Vector in Physics for 'a' and 'v' + +* add --datadir DIR (data/) and --userdir DIR (~/.supertux/) + +* make gravity a constant + +* funky side effect of too much global variables: when having a + savegame with large or firetux and then starting that game, Tux in + the menu background will grow and be visible that way for a fraction + of a second + +* write scripts for include sorting and include guard checking that + can be run automatically + +* md5.hpp and random_generator.hpp could go to external/ + +* rename Vector -> Vector2f + +* get rid of global SDL_Screen* screen variable + +* identify all global variables and make them ugly (g_ or globals::) + +* get rid of SCREEN_WIDTH/SCREEN_HEIGHT + +* is version.h actually needed? + +* resolution menu entry moves the wrong way around + +* write scripts to automatically check for: + + - all includes are relative to top level dir + + - include guards are proper + +* move SVN to http://code.google.com (maybe one day) + +* move bugtracker to http://code.google.com (much simpler, less useless) + + +# EOF # diff --git a/data/sounds/grow.ogg b/data/sounds/grow.ogg index da869257db3874579becc3c1cef1f26e414b3bf3..675cf23d478b6b3191490c373d3a0b2471881335 100644 GIT binary patch literal 12963 zcmb`tc|4TS_c(r^*~i#-LSx@WA-f@D$=+la*-0sTr5B=lA*j@q2y$`QF!^J9jw{GYHfa-${KuzU-r>iYi*Jm`O5#F19lkceP4 z`=deRgCPg@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xpnAorezUwbK@`vF>(YuQQq)(97KyTlD_y2nwWk; zGjHw}vd;!$doytd;@?Lg5$ieaa)%=16SFbwAia^@-Y&#S&DX{IO6G$bBBf7Gh1ay5 z+98|x_c>evp^i#oK3v3i8h{666z6;$ao&w~C>iYSB(+{E;^aoK&2PxxHh9HBf0$%y z;GMWVbCR3jm7XD)n)JUtLjRS+NZZ>iN=69;y{>k|6UWAG*g+(gj-sRFGfLQR)~vY?n< z9t~7x=Vb2g?~?!dcj7_p!EZ8!c=DK;UsG=tRZoUYz}4%4ue!Kn4Z%#(+0(t8+O8At zt&h+L(h=t>zILCIKV+xe0=O)*WY57wBw!j5XgTXpAJ#`}8$x}bP0c!%&nK5NXIFgZ z4v{AMC$R%!3O%q)R9`fJnqAPkm1qZ8wam~=%uFTzPEs57;n&nkEvdcYWlel)92TFe zYdQAH)_MDI#}+aNJujQ*Jx)ApD2WTGWwm&20iTLqD2X}oYg-461#jj=_-4nbiB&wm zBx$UF6gbR&zI!HrZag)?&-Bj19=feyqHo~xHdgxahTi5`2lf&RE|BT(Be95UqfF8V zSJ3Mw`)bL;!PcttzNWJ4w3yu39T&!*;1_Qqo~=>ec37B)oM#Sxkh*dj-~AMKF-Ms7 zaBrHE%Q~^w>khd6e0cNq_|6MdubnH%!-e7wfqB%+SLulao^Bb~=yr5jH}L=cKin-< AHUIzs diff --git a/src/binreloc/binreloc.c b/external/binreloc/binreloc.c similarity index 100% rename from src/binreloc/binreloc.c rename to external/binreloc/binreloc.c diff --git a/src/binreloc/binreloc.h b/external/binreloc/binreloc.h similarity index 100% rename from src/binreloc/binreloc.h rename to external/binreloc/binreloc.h diff --git a/src/obstack/obstack.c b/external/obstack/obstack.c similarity index 100% rename from src/obstack/obstack.c rename to external/obstack/obstack.c diff --git a/src/obstack/obstack.h b/external/obstack/obstack.h similarity index 100% rename from src/obstack/obstack.h rename to external/obstack/obstack.h diff --git a/src/squirrel/CMakeLists.txt b/external/squirrel/CMakeLists.txt similarity index 88% rename from src/squirrel/CMakeLists.txt rename to external/squirrel/CMakeLists.txt index 1690c9921..6adfaf984 100644 --- a/src/squirrel/CMakeLists.txt +++ b/external/squirrel/CMakeLists.txt @@ -19,15 +19,12 @@ ## Add include/ to include directories -INCLUDE_DIRECTORIES(${SUPERTUX_SOURCE_DIR}/src/squirrel/include/) +INCLUDE_DIRECTORIES(${SUPERTUX_SOURCE_DIR}/external/squirrel/include/) ## build list of source files FILE(GLOB SQUIRREL_SOURCES squirrel/*.cpp sqstdlib/*.cpp sqstdlib/*.c) -## add additional compiler switches - -ADD_DEFINITIONS(-include ${CMAKE_BINARY_DIR}/config.h) # the squirrel sources are out of our control so don't be too pedantic about # them REMOVE_DEFINITIONS(-Werror -W) diff --git a/src/squirrel/COPYRIGHT b/external/squirrel/COPYRIGHT similarity index 100% rename from src/squirrel/COPYRIGHT rename to external/squirrel/COPYRIGHT diff --git a/src/squirrel/HISTORY b/external/squirrel/HISTORY similarity index 100% rename from src/squirrel/HISTORY rename to external/squirrel/HISTORY diff --git a/src/squirrel/README b/external/squirrel/README similarity index 100% rename from src/squirrel/README rename to external/squirrel/README diff --git a/src/squirrel/include/sqstdaux.h b/external/squirrel/include/sqstdaux.h similarity index 100% rename from src/squirrel/include/sqstdaux.h rename to external/squirrel/include/sqstdaux.h diff --git a/src/squirrel/include/sqstdblob.h b/external/squirrel/include/sqstdblob.h similarity index 100% rename from src/squirrel/include/sqstdblob.h rename to external/squirrel/include/sqstdblob.h diff --git a/src/squirrel/include/sqstdio.h b/external/squirrel/include/sqstdio.h similarity index 100% rename from src/squirrel/include/sqstdio.h rename to external/squirrel/include/sqstdio.h diff --git a/src/squirrel/include/sqstdmath.h b/external/squirrel/include/sqstdmath.h similarity index 100% rename from src/squirrel/include/sqstdmath.h rename to external/squirrel/include/sqstdmath.h diff --git a/src/squirrel/include/sqstdstring.h b/external/squirrel/include/sqstdstring.h similarity index 100% rename from src/squirrel/include/sqstdstring.h rename to external/squirrel/include/sqstdstring.h diff --git a/src/squirrel/include/sqstdsystem.h b/external/squirrel/include/sqstdsystem.h similarity index 100% rename from src/squirrel/include/sqstdsystem.h rename to external/squirrel/include/sqstdsystem.h diff --git a/src/squirrel/include/squirrel.h b/external/squirrel/include/squirrel.h similarity index 100% rename from src/squirrel/include/squirrel.h rename to external/squirrel/include/squirrel.h diff --git a/src/squirrel/sqdbg/serialize_state.inl b/external/squirrel/sqdbg/serialize_state.inl similarity index 100% rename from src/squirrel/sqdbg/serialize_state.inl rename to external/squirrel/sqdbg/serialize_state.inl diff --git a/src/squirrel/sqdbg/sqdbgserver.cpp b/external/squirrel/sqdbg/sqdbgserver.cpp similarity index 100% rename from src/squirrel/sqdbg/sqdbgserver.cpp rename to external/squirrel/sqdbg/sqdbgserver.cpp diff --git a/src/squirrel/sqdbg/sqdbgserver.h b/external/squirrel/sqdbg/sqdbgserver.h similarity index 100% rename from src/squirrel/sqdbg/sqdbgserver.h rename to external/squirrel/sqdbg/sqdbgserver.h diff --git a/src/squirrel/sqdbg/sqrdbg.cpp b/external/squirrel/sqdbg/sqrdbg.cpp similarity index 100% rename from src/squirrel/sqdbg/sqrdbg.cpp rename to external/squirrel/sqdbg/sqrdbg.cpp diff --git a/src/squirrel/sqdbg/sqrdbg.h b/external/squirrel/sqdbg/sqrdbg.h similarity index 100% rename from src/squirrel/sqdbg/sqrdbg.h rename to external/squirrel/sqdbg/sqrdbg.h diff --git a/src/squirrel/sqstdlib/sqstdaux.cpp b/external/squirrel/sqstdlib/sqstdaux.cpp similarity index 100% rename from src/squirrel/sqstdlib/sqstdaux.cpp rename to external/squirrel/sqstdlib/sqstdaux.cpp diff --git a/src/squirrel/sqstdlib/sqstdblob.cpp b/external/squirrel/sqstdlib/sqstdblob.cpp similarity index 100% rename from src/squirrel/sqstdlib/sqstdblob.cpp rename to external/squirrel/sqstdlib/sqstdblob.cpp diff --git a/src/squirrel/sqstdlib/sqstdblobimpl.h b/external/squirrel/sqstdlib/sqstdblobimpl.h similarity index 100% rename from src/squirrel/sqstdlib/sqstdblobimpl.h rename to external/squirrel/sqstdlib/sqstdblobimpl.h diff --git a/src/squirrel/sqstdlib/sqstdio.cpp b/external/squirrel/sqstdlib/sqstdio.cpp similarity index 100% rename from src/squirrel/sqstdlib/sqstdio.cpp rename to external/squirrel/sqstdlib/sqstdio.cpp diff --git a/src/squirrel/sqstdlib/sqstdmath.cpp b/external/squirrel/sqstdlib/sqstdmath.cpp similarity index 100% rename from src/squirrel/sqstdlib/sqstdmath.cpp rename to external/squirrel/sqstdlib/sqstdmath.cpp diff --git a/src/squirrel/sqstdlib/sqstdrex.cpp b/external/squirrel/sqstdlib/sqstdrex.cpp similarity index 100% rename from src/squirrel/sqstdlib/sqstdrex.cpp rename to external/squirrel/sqstdlib/sqstdrex.cpp diff --git a/src/squirrel/sqstdlib/sqstdstream.cpp b/external/squirrel/sqstdlib/sqstdstream.cpp similarity index 100% rename from src/squirrel/sqstdlib/sqstdstream.cpp rename to external/squirrel/sqstdlib/sqstdstream.cpp diff --git a/src/squirrel/sqstdlib/sqstdstream.h b/external/squirrel/sqstdlib/sqstdstream.h similarity index 100% rename from src/squirrel/sqstdlib/sqstdstream.h rename to external/squirrel/sqstdlib/sqstdstream.h diff --git a/src/squirrel/sqstdlib/sqstdstring.cpp b/external/squirrel/sqstdlib/sqstdstring.cpp similarity index 100% rename from src/squirrel/sqstdlib/sqstdstring.cpp rename to external/squirrel/sqstdlib/sqstdstring.cpp diff --git a/src/squirrel/sqstdlib/sqstdsystem.cpp b/external/squirrel/sqstdlib/sqstdsystem.cpp similarity index 100% rename from src/squirrel/sqstdlib/sqstdsystem.cpp rename to external/squirrel/sqstdlib/sqstdsystem.cpp diff --git a/src/squirrel/squirrel/sqapi.cpp b/external/squirrel/squirrel/sqapi.cpp similarity index 100% rename from src/squirrel/squirrel/sqapi.cpp rename to external/squirrel/squirrel/sqapi.cpp diff --git a/src/squirrel/squirrel/sqarray.h b/external/squirrel/squirrel/sqarray.h similarity index 100% rename from src/squirrel/squirrel/sqarray.h rename to external/squirrel/squirrel/sqarray.h diff --git a/src/squirrel/squirrel/sqbaselib.cpp b/external/squirrel/squirrel/sqbaselib.cpp similarity index 100% rename from src/squirrel/squirrel/sqbaselib.cpp rename to external/squirrel/squirrel/sqbaselib.cpp diff --git a/src/squirrel/squirrel/sqclass.cpp b/external/squirrel/squirrel/sqclass.cpp similarity index 100% rename from src/squirrel/squirrel/sqclass.cpp rename to external/squirrel/squirrel/sqclass.cpp diff --git a/src/squirrel/squirrel/sqclass.h b/external/squirrel/squirrel/sqclass.h similarity index 100% rename from src/squirrel/squirrel/sqclass.h rename to external/squirrel/squirrel/sqclass.h diff --git a/src/squirrel/squirrel/sqclosure.h b/external/squirrel/squirrel/sqclosure.h similarity index 100% rename from src/squirrel/squirrel/sqclosure.h rename to external/squirrel/squirrel/sqclosure.h diff --git a/src/squirrel/squirrel/sqcompiler.cpp b/external/squirrel/squirrel/sqcompiler.cpp similarity index 100% rename from src/squirrel/squirrel/sqcompiler.cpp rename to external/squirrel/squirrel/sqcompiler.cpp diff --git a/src/squirrel/squirrel/sqcompiler.h b/external/squirrel/squirrel/sqcompiler.h similarity index 100% rename from src/squirrel/squirrel/sqcompiler.h rename to external/squirrel/squirrel/sqcompiler.h diff --git a/src/squirrel/squirrel/sqdebug.cpp b/external/squirrel/squirrel/sqdebug.cpp similarity index 100% rename from src/squirrel/squirrel/sqdebug.cpp rename to external/squirrel/squirrel/sqdebug.cpp diff --git a/src/squirrel/squirrel/sqfuncproto.h b/external/squirrel/squirrel/sqfuncproto.h similarity index 100% rename from src/squirrel/squirrel/sqfuncproto.h rename to external/squirrel/squirrel/sqfuncproto.h diff --git a/src/squirrel/squirrel/sqfuncstate.cpp b/external/squirrel/squirrel/sqfuncstate.cpp similarity index 100% rename from src/squirrel/squirrel/sqfuncstate.cpp rename to external/squirrel/squirrel/sqfuncstate.cpp diff --git a/src/squirrel/squirrel/sqfuncstate.h b/external/squirrel/squirrel/sqfuncstate.h similarity index 100% rename from src/squirrel/squirrel/sqfuncstate.h rename to external/squirrel/squirrel/sqfuncstate.h diff --git a/src/squirrel/squirrel/sqlexer.cpp b/external/squirrel/squirrel/sqlexer.cpp similarity index 100% rename from src/squirrel/squirrel/sqlexer.cpp rename to external/squirrel/squirrel/sqlexer.cpp diff --git a/src/squirrel/squirrel/sqlexer.h b/external/squirrel/squirrel/sqlexer.h similarity index 100% rename from src/squirrel/squirrel/sqlexer.h rename to external/squirrel/squirrel/sqlexer.h diff --git a/src/squirrel/squirrel/sqmem.cpp b/external/squirrel/squirrel/sqmem.cpp similarity index 100% rename from src/squirrel/squirrel/sqmem.cpp rename to external/squirrel/squirrel/sqmem.cpp diff --git a/src/squirrel/squirrel/sqobject.cpp b/external/squirrel/squirrel/sqobject.cpp similarity index 100% rename from src/squirrel/squirrel/sqobject.cpp rename to external/squirrel/squirrel/sqobject.cpp diff --git a/src/squirrel/squirrel/sqobject.h b/external/squirrel/squirrel/sqobject.h similarity index 100% rename from src/squirrel/squirrel/sqobject.h rename to external/squirrel/squirrel/sqobject.h diff --git a/src/squirrel/squirrel/sqopcodes.h b/external/squirrel/squirrel/sqopcodes.h similarity index 100% rename from src/squirrel/squirrel/sqopcodes.h rename to external/squirrel/squirrel/sqopcodes.h diff --git a/src/squirrel/squirrel/sqpcheader.h b/external/squirrel/squirrel/sqpcheader.h similarity index 100% rename from src/squirrel/squirrel/sqpcheader.h rename to external/squirrel/squirrel/sqpcheader.h diff --git a/src/squirrel/squirrel/sqstate.cpp b/external/squirrel/squirrel/sqstate.cpp similarity index 100% rename from src/squirrel/squirrel/sqstate.cpp rename to external/squirrel/squirrel/sqstate.cpp diff --git a/src/squirrel/squirrel/sqstate.h b/external/squirrel/squirrel/sqstate.h similarity index 100% rename from src/squirrel/squirrel/sqstate.h rename to external/squirrel/squirrel/sqstate.h diff --git a/src/squirrel/squirrel/sqstring.h b/external/squirrel/squirrel/sqstring.h similarity index 100% rename from src/squirrel/squirrel/sqstring.h rename to external/squirrel/squirrel/sqstring.h diff --git a/src/squirrel/squirrel/sqtable.cpp b/external/squirrel/squirrel/sqtable.cpp similarity index 100% rename from src/squirrel/squirrel/sqtable.cpp rename to external/squirrel/squirrel/sqtable.cpp diff --git a/src/squirrel/squirrel/sqtable.h b/external/squirrel/squirrel/sqtable.h similarity index 100% rename from src/squirrel/squirrel/sqtable.h rename to external/squirrel/squirrel/sqtable.h diff --git a/src/squirrel/squirrel/squserdata.h b/external/squirrel/squirrel/squserdata.h similarity index 100% rename from src/squirrel/squirrel/squserdata.h rename to external/squirrel/squirrel/squserdata.h diff --git a/src/squirrel/squirrel/squtils.h b/external/squirrel/squirrel/squtils.h similarity index 100% rename from src/squirrel/squirrel/squtils.h rename to external/squirrel/squirrel/squtils.h diff --git a/src/squirrel/squirrel/sqvm.cpp b/external/squirrel/squirrel/sqvm.cpp similarity index 100% rename from src/squirrel/squirrel/sqvm.cpp rename to external/squirrel/squirrel/sqvm.cpp diff --git a/src/squirrel/squirrel/sqvm.h b/external/squirrel/squirrel/sqvm.h similarity index 100% rename from src/squirrel/squirrel/sqvm.h rename to external/squirrel/squirrel/sqvm.h diff --git a/src/addon/addon.cpp b/src/addon/addon.cpp index 7e7e98ee0..2f166f1fe 100644 --- a/src/addon/addon.cpp +++ b/src/addon/addon.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Add-on // Copyright (C) 2007 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,21 +12,19 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. -// +// along with this program. If not, see . + +#include "addon/addon.hpp" -#include -#include -#include #include +#include +#include + +#include "addon/md5.hpp" #include "lisp/lisp.hpp" -#include "lisp/writer.hpp" #include "lisp/parser.hpp" -#include "addon/addon.hpp" -#include "log.hpp" -#include "addon/md5.hpp" +#include "lisp/writer.hpp" +#include "util/log.hpp" std::string Addon::get_md5() const @@ -64,7 +60,7 @@ Addon::get_md5() const } void -Addon::parse(const lisp::Lisp& lisp) +Addon::parse(const Reader& lisp) { try { lisp.get("kind", kind); @@ -132,3 +128,4 @@ Addon::operator==(Addon addon2) const return true; } +/* EOF */ diff --git a/src/addon/addon.hpp b/src/addon/addon.hpp index 1b5f4f38e..033b14f7b 100644 --- a/src/addon/addon.hpp +++ b/src/addon/addon.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Add-on // Copyright (C) 2007 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,20 +12,15 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. -// -#ifndef ADDON_H -#define ADDON_H +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_ADDON_ADDON_HPP +#define HEADER_SUPERTUX_ADDON_ADDON_HPP #include -#include -namespace lisp { -class Writer; -class Lisp; -} +#include "util/reader_fwd.hpp" +#include "util/writer_fwd.hpp" /** * Represents an (available or installed) Add-on, e.g. a level set @@ -55,7 +48,7 @@ public: /** * Read additional information from given contents of a (supertux-addoninfo ...) block */ - void parse(const lisp::Lisp& lisp); + void parse(const Reader& lisp); /** * Read additional information from given file @@ -83,7 +76,22 @@ protected: mutable std::string calculated_md5; - Addon() {}; + Addon() : + kind(), + title(), + author(), + license(), + http_url(), + suggested_filename(), + installed_physfs_filename(), + installed_absolute_filename(), + stored_md5(), + installed(), + loaded(), + calculated_md5() + {}; }; #endif + +/* EOF */ diff --git a/src/addon/addon_manager.cpp b/src/addon/addon_manager.cpp index 1f1cadc69..245bb4b4f 100644 --- a/src/addon/addon_manager.cpp +++ b/src/addon/addon_manager.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Add-on Manager // Copyright (C) 2007 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,54 +12,50 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. -// - -#include -#include +// along with this program. If not, see . #include "addon/addon_manager.hpp" -#include "addon/addon.hpp" -#include "log.hpp" -#include "lisp/parser.hpp" -#include "lisp/lisp.hpp" -#include "lisp/list_iterator.hpp" -#include "lisp/writer.hpp" +#include +#include -#include #include -#include #include +#include +#include #include #ifdef HAVE_LIBCURL -#include -#include -#include +# include +# include +# include #endif +#include "addon/addon.hpp" +#include "lisp/list_iterator.hpp" +#include "lisp/writer.hpp" +#include "lisp/parser.hpp" +#include "util/log.hpp" + #ifdef HAVE_LIBCURL namespace { - size_t my_curl_string_append(void *ptr, size_t size, size_t nmemb, void *string_ptr) - { - std::string& s = *static_cast(string_ptr); - std::string buf(static_cast(ptr), size * nmemb); - s += buf; - log_debug << "read " << size * nmemb << " bytes of data..." << std::endl; - return size * nmemb; - } +size_t my_curl_string_append(void *ptr, size_t size, size_t nmemb, void *string_ptr) +{ + std::string& s = *static_cast(string_ptr); + std::string buf(static_cast(ptr), size * nmemb); + s += buf; + log_debug << "read " << size * nmemb << " bytes of data..." << std::endl; + return size * nmemb; +} - size_t my_curl_physfs_write(void *ptr, size_t size, size_t nmemb, void *f_p) - { - PHYSFS_file* f = static_cast(f_p); - PHYSFS_sint64 written = PHYSFS_write(f, ptr, size, nmemb); - log_debug << "read " << size * nmemb << " bytes of data..." << std::endl; - return size * written; - } +size_t my_curl_physfs_write(void *ptr, size_t size, size_t nmemb, void *f_p) +{ + PHYSFS_file* f = static_cast(f_p); + PHYSFS_sint64 written = PHYSFS_write(f, ptr, size, nmemb); + log_debug << "read " << size * nmemb << " bytes of data..." << std::endl; + return size * written; +} } #endif @@ -73,7 +67,9 @@ AddonManager::get_instance() return instance; } -AddonManager::AddonManager() +AddonManager::AddonManager() : + addons(), + ignored_addon_filenames() { #ifdef HAVE_LIBCURL curl_global_init(CURL_GLOBAL_ALL); @@ -92,12 +88,12 @@ AddonManager::~AddonManager() std::vector AddonManager::get_addons() { -/* - for (std::vector::iterator it = installed_addons.begin(); it != installed_addons.end(); ++it) { + /* + for (std::vector::iterator it = installed_addons.begin(); it != installed_addons.end(); ++it) { Addon& addon = *it; if (addon.md5 == "") addon.md5 = calculate_md5(addon); - } -*/ + } + */ return addons; } @@ -181,7 +177,6 @@ AddonManager::check_online() #endif } - void AddonManager::install(Addon* addon) { @@ -430,9 +425,8 @@ AddonManager::load_addons() PHYSFS_freeList(rc); } - void -AddonManager::read(const lisp::Lisp& lisp) +AddonManager::read(const Reader& lisp) { lisp.get("disabled-addons", ignored_addon_filenames); } @@ -443,3 +437,4 @@ AddonManager::write(lisp::Writer& writer) writer.write("disabled-addons", ignored_addon_filenames); } +/* EOF */ diff --git a/src/addon/addon_manager.hpp b/src/addon/addon_manager.hpp index 4c6b59459..693acd3de 100644 --- a/src/addon/addon_manager.hpp +++ b/src/addon/addon_manager.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Add-on Manager // Copyright (C) 2007 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,19 +12,16 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. -// -#ifndef ADDON_MANAGER_H -#define ADDON_MANAGER_H +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_ADDON_ADDON_MANAGER_HPP +#define HEADER_SUPERTUX_ADDON_ADDON_MANAGER_HPP #include #include -namespace lisp { -class Lisp; -class Writer; -} + +#include "util/reader_fwd.hpp" +#include "util/writer_fwd.hpp" class Addon; @@ -94,7 +89,7 @@ public: /** * Read AddonManager configuration from Lisp */ - void read(const lisp::Lisp& lisp); + void read(const Reader& lisp); protected: std::vector addons; @@ -105,3 +100,5 @@ protected: }; #endif + +/* EOF */ diff --git a/src/addon/md5.cpp b/src/addon/md5.cpp index 30207216e..deb069445 100644 --- a/src/addon/md5.cpp +++ b/src/addon/md5.cpp @@ -41,14 +41,14 @@ // documentation and/or software. // -#include "md5.hpp" +#include "addon/md5.hpp" #include -#include -#include #include -MD5::MD5() { +MD5::MD5() : + finalized() +{ init(); } @@ -67,7 +67,6 @@ void MD5::update (uint8_t* input, uint32_t input_length) { count[1] += ((uint32_t)input_length >> 29); - buffer_space = 64 - buffer_index; // how much space is left in buffer // Transform as many times as possible. @@ -85,7 +84,6 @@ void MD5::update (uint8_t* input, uint32_t input_length) { } else input_index=0; // so we can buffer the whole input - // and here we do the buffering: memcpy(buffer+buffer_index, input+input_index, input_length-input_index); } @@ -121,20 +119,25 @@ void MD5::update(std::ifstream& stream) { } } - -MD5::MD5(FILE *file) { +MD5::MD5(FILE *file) : + finalized() +{ init(); // must be called be all constructors update(file); finalize (); } -MD5::MD5(std::istream& stream) { +MD5::MD5(std::istream& stream) : + finalized() +{ init(); // must called by all constructors update (stream); finalize(); } -MD5::MD5(std::ifstream& stream) { +MD5::MD5(std::ifstream& stream) : + finalized() +{ init(); // must called by all constructors update (stream); finalize(); @@ -167,7 +170,6 @@ std::ostream& operator<<(std::ostream &stream, MD5 context) { return stream; } - // PRIVATE METHODS: void MD5::init() { @@ -396,3 +398,5 @@ inline void MD5::II(uint32_t& a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, a += I(b, c, d) + x + ac; a = rotate_left (a, s) +b; } + +/* EOF */ diff --git a/src/addon/md5.hpp b/src/addon/md5.hpp index f6aa930d0..229ebd726 100644 --- a/src/addon/md5.hpp +++ b/src/addon/md5.hpp @@ -41,59 +41,58 @@ // documentation and/or software. // -#ifndef SUPERTUX_ADDON_MD5_HPP -#define SUPERTUX_ADDON_MD5_HPP +#ifndef HEADER_SUPERTUX_ADDON_MD5_HPP +#define HEADER_SUPERTUX_ADDON_MD5_HPP -#include #include -#include #include -#include class MD5 { - public: - MD5(); - MD5(uint8_t* string); /**< digest string, finalize */ - MD5(std::istream& stream); /**< digest stream, finalize */ - MD5(FILE *file); /**< digest file, close, finalize */ - MD5(std::ifstream& stream); /**< digest stream, close, finalize */ +public: + MD5(); + MD5(uint8_t* string); /**< digest string, finalize */ + MD5(std::istream& stream); /**< digest stream, finalize */ + MD5(FILE *file); /**< digest file, close, finalize */ + MD5(std::ifstream& stream); /**< digest stream, close, finalize */ - void update(uint8_t* input, unsigned int input_length); /**< MD5 block update operation. Continues an MD5 message-digest operation, processing another message block, and updating the context. */ - void update(std::istream& stream); - void update(FILE *file); - void update(std::ifstream& stream); + void update(uint8_t* input, unsigned int input_length); /**< MD5 block update operation. Continues an MD5 message-digest operation, processing another message block, and updating the context. */ + void update(std::istream& stream); + void update(FILE *file); + void update(std::ifstream& stream); - uint8_t* raw_digest(); /**< digest as a 16-byte binary array */ - std::string hex_digest(); /**< digest as a 33-byte ascii-hex string */ - friend std::ostream& operator<<(std::ostream&, MD5 context); + uint8_t* raw_digest(); /**< digest as a 16-byte binary array */ + std::string hex_digest(); /**< digest as a 33-byte ascii-hex string */ + friend std::ostream& operator<<(std::ostream&, MD5 context); - private: - uint32_t state[4]; - uint32_t count[2]; /**< number of _bits_, mod 2^64 */ - uint8_t buffer[64]; /**< input buffer */ - uint8_t digest[16]; - bool finalized; +private: + uint32_t state[4]; + uint32_t count[2]; /**< number of _bits_, mod 2^64 */ + uint8_t buffer[64]; /**< input buffer */ + uint8_t digest[16]; + bool finalized; - void init(); /**< called by all constructors */ - void finalize(); /**< MD5 finalization. Ends an MD5 message-digest operation, writing the the message digest and zeroizing the context. */ - void transform(uint8_t* buffer); /**< MD5 basic transformation. Transforms state based on block. Does the real update work. Note that length is implied to be 64. */ + void init(); /**< called by all constructors */ + void finalize(); /**< MD5 finalization. Ends an MD5 message-digest operation, writing the the message digest and zeroizing the context. */ + void transform(uint8_t* buffer); /**< MD5 basic transformation. Transforms state based on block. Does the real update work. Note that length is implied to be 64. */ - static void encode(uint8_t* dest, uint32_t* src, uint32_t length); /**< Encodes input (uint32_t) into output (uint8_t). Assumes len is a multiple of 4. */ - static void decode(uint32_t* dest, uint8_t* src, uint32_t length); /**< Decodes input (uint8_t) into output (uint32_t). Assumes len is a multiple of 4. */ - static void memcpy(uint8_t* dest, uint8_t* src, uint32_t length); - static void memset(uint8_t* start, uint8_t val, uint32_t length); + static void encode(uint8_t* dest, uint32_t* src, uint32_t length); /**< Encodes input (uint32_t) into output (uint8_t). Assumes len is a multiple of 4. */ + static void decode(uint32_t* dest, uint8_t* src, uint32_t length); /**< Decodes input (uint8_t) into output (uint32_t). Assumes len is a multiple of 4. */ + static void memcpy(uint8_t* dest, uint8_t* src, uint32_t length); + static void memset(uint8_t* start, uint8_t val, uint32_t length); - static inline uint32_t rotate_left(uint32_t x, uint32_t n); - static inline uint32_t F(uint32_t x, uint32_t y, uint32_t z); //*< F, G, H and I are basic MD5 functions. */ - static inline uint32_t G(uint32_t x, uint32_t y, uint32_t z); - static inline uint32_t H(uint32_t x, uint32_t y, uint32_t z); - static inline uint32_t I(uint32_t x, uint32_t y, uint32_t z); - static inline void FF(uint32_t& a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac); /**< FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. Rotation is separate from addition to prevent recomputation. */ - static inline void GG(uint32_t& a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac); - static inline void HH(uint32_t& a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac); - static inline void II(uint32_t& a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac); + static inline uint32_t rotate_left(uint32_t x, uint32_t n); + static inline uint32_t F(uint32_t x, uint32_t y, uint32_t z); //*< F, G, H and I are basic MD5 functions. */ + static inline uint32_t G(uint32_t x, uint32_t y, uint32_t z); + static inline uint32_t H(uint32_t x, uint32_t y, uint32_t z); + static inline uint32_t I(uint32_t x, uint32_t y, uint32_t z); + static inline void FF(uint32_t& a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac); /**< FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. Rotation is separate from addition to prevent recomputation. */ + static inline void GG(uint32_t& a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac); + static inline void HH(uint32_t& a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac); + static inline void II(uint32_t& a, uint32_t b, uint32_t c, uint32_t d, uint32_t x, uint32_t s, uint32_t ac); }; #endif /*SUPERTUX_ADDON_MD5_HPP*/ + +/* EOF */ diff --git a/src/audio/dummy_sound_source.cpp b/src/audio/dummy_sound_source.cpp index 40ccdfcb0..979b740b1 100644 --- a/src/audio/dummy_sound_source.cpp +++ b/src/audio/dummy_sound_source.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,17 +12,15 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#include +// along with this program. If not, see . -#include "dummy_sound_source.hpp" -#include "sound_source.hpp" +#include "audio/sound_source.hpp" class DummySoundSource : public SoundSource { public: - DummySoundSource() + DummySoundSource() : + is_playing() {} virtual ~DummySoundSource() {} @@ -80,3 +76,5 @@ SoundSource* create_dummy_sound_source() { return new DummySoundSource(); } + +/* EOF */ diff --git a/src/audio/dummy_sound_source.hpp b/src/audio/dummy_sound_source.hpp index 9a17d619f..5162f1db5 100644 --- a/src/audio/dummy_sound_source.hpp +++ b/src/audio/dummy_sound_source.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,13 +12,15 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef __DUMMY_SOUND_SOURCE_HPP__ -#define __DUMMY_SOUND_SOURCE_HPP__ +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_AUDIO_DUMMY_SOUND_SOURCE_HPP +#define HEADER_SUPERTUX_AUDIO_DUMMY_SOUND_SOURCE_HPP class SoundSource; SoundSource* create_dummy_sound_source(); #endif + +/* EOF */ diff --git a/src/audio/ogg_sound_file.cpp b/src/audio/ogg_sound_file.cpp new file mode 100644 index 000000000..3d1cd246e --- /dev/null +++ b/src/audio/ogg_sound_file.cpp @@ -0,0 +1,160 @@ +// SuperTux +// Copyright (C) 2006 Matthias Braun +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include "audio/ogg_sound_file.hpp" + +OggSoundFile::OggSoundFile(PHYSFS_file* file, double loop_begin, double loop_at) : + file(), + vorbis_file(), + loop_begin(), + loop_at(), + normal_buffer_loop() +{ + this->file = file; + + ov_callbacks callbacks = { cb_read, cb_seek, cb_close, cb_tell }; + ov_open_callbacks(file, &vorbis_file, 0, 0, callbacks); + + vorbis_info* vi = ov_info(&vorbis_file, -1); + + channels = vi->channels; + rate = vi->rate; + bits_per_sample = 16; + size = static_cast (ov_pcm_total(&vorbis_file, -1) * 2); + + double samples_begin = loop_begin * rate; + double sample_loop = loop_at * rate; + + this->loop_begin = (ogg_int64_t) samples_begin; + if(loop_begin < 0) { + this->loop_at = (ogg_int64_t) -1; + } else { + this->loop_at = (ogg_int64_t) sample_loop; + } +} + +OggSoundFile::~OggSoundFile() +{ + ov_clear(&vorbis_file); +} + +size_t +OggSoundFile::read(void* _buffer, size_t buffer_size) +{ + char* buffer = reinterpret_cast (_buffer); + int section = 0; + size_t totalBytesRead = 0; + + while(buffer_size>0) { +#ifdef WORDS_BIGENDIAN + int bigendian = 1; +#else + int bigendian = 0; +#endif + + size_t bytes_to_read = buffer_size; + if(loop_at > 0) { + size_t bytes_per_sample = 2; + ogg_int64_t time = ov_pcm_tell(&vorbis_file); + ogg_int64_t samples_left_till_loop = loop_at - time; + ogg_int64_t bytes_left_till_loop + = samples_left_till_loop * bytes_per_sample; + if(bytes_left_till_loop <= 4) + break; + + if(bytes_left_till_loop < (ogg_int64_t) bytes_to_read) { + bytes_to_read = (size_t) bytes_left_till_loop; + } + } + + long bytesRead + = ov_read(&vorbis_file, buffer, bytes_to_read, bigendian, + 2, 1, §ion); + if(bytesRead == 0) { + break; + } + buffer_size -= bytesRead; + buffer += bytesRead; + totalBytesRead += bytesRead; + } + + return totalBytesRead; +} + +void +OggSoundFile::reset() +{ + ov_pcm_seek(&vorbis_file, loop_begin); +} + +size_t +OggSoundFile::cb_read(void* ptr, size_t size, size_t nmemb, void* source) +{ + PHYSFS_file* file = reinterpret_cast (source); + + PHYSFS_sint64 res + = PHYSFS_read(file, ptr, static_cast (size), + static_cast (nmemb)); + if(res <= 0) + return 0; + + return static_cast (res); +} + +int +OggSoundFile::cb_seek(void* source, ogg_int64_t offset, int whence) +{ + PHYSFS_file* file = reinterpret_cast (source); + + switch(whence) { + case SEEK_SET: + if(PHYSFS_seek(file, static_cast (offset)) == 0) + return -1; + break; + case SEEK_CUR: + if(PHYSFS_seek(file, PHYSFS_tell(file) + offset) == 0) + return -1; + break; + case SEEK_END: + if(PHYSFS_seek(file, PHYSFS_fileLength(file) + offset) == 0) + return -1; + break; + default: +#ifdef DEBUG + assert(false); +#else + return -1; +#endif + } + return 0; +} + +int +OggSoundFile::cb_close(void* source) +{ + PHYSFS_file* file = reinterpret_cast (source); + PHYSFS_close(file); + return 0; +} + +long +OggSoundFile::cb_tell(void* source) +{ + PHYSFS_file* file = reinterpret_cast (source); + return static_cast (PHYSFS_tell(file)); +} + +/* EOF */ diff --git a/src/audio/ogg_sound_file.hpp b/src/audio/ogg_sound_file.hpp new file mode 100644 index 000000000..0a9b8b12c --- /dev/null +++ b/src/audio/ogg_sound_file.hpp @@ -0,0 +1,54 @@ +// SuperTux +// Copyright (C) 2006 Matthias Braun +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_AUDIO_OGG_SOUND_FILE_HPP +#define HEADER_SUPERTUX_AUDIO_OGG_SOUND_FILE_HPP + +#include +#include + +#include "audio/sound_file.hpp" + +class OggSoundFile : public SoundFile +{ +public: + OggSoundFile(PHYSFS_file* file, double loop_begin, double loop_at); + ~OggSoundFile(); + + size_t read(void* buffer, size_t buffer_size); + void reset(); + +private: + static size_t cb_read(void* ptr, size_t size, size_t nmemb, void* source); + static int cb_seek(void* source, ogg_int64_t offset, int whence); + static int cb_close(void* source); + static long cb_tell(void* source); + + PHYSFS_file* file; + OggVorbis_File vorbis_file; + ogg_int64_t loop_begin; + ogg_int64_t loop_at; + size_t normal_buffer_loop; + +private: + OggSoundFile(const OggSoundFile&); + OggSoundFile& operator=(const OggSoundFile&); +}; + + +#endif + +/* EOF */ diff --git a/src/audio/openal_sound_source.cpp b/src/audio/openal_sound_source.cpp index eb674efb1..530f905fb 100644 --- a/src/audio/openal_sound_source.cpp +++ b/src/audio/openal_sound_source.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,15 +12,13 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#include +// along with this program. If not, see . -#include "openal_sound_source.hpp" -#include "sound_manager.hpp" -#include "math/vector.hpp" +#include "audio/openal_sound_source.hpp" +#include "audio/sound_manager.hpp" -OpenALSoundSource::OpenALSoundSource() +OpenALSoundSource::OpenALSoundSource() : + source() { alGenSources(1, &source); SoundManager::check_al_error("Couldn't create audio source: "); @@ -104,3 +100,5 @@ OpenALSoundSource::set_rollof_factor(float factor) { alSourcef(source, AL_ROLLOFF_FACTOR, factor); } + +/* EOF */ diff --git a/src/audio/openal_sound_source.hpp b/src/audio/openal_sound_source.hpp index dc7136fdc..66f551924 100644 --- a/src/audio/openal_sound_source.hpp +++ b/src/audio/openal_sound_source.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,14 +12,14 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef __OPENAL_SOUND_SOURCE_H__ -#define __OPENAL_SOUND_SOURCE_H__ +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_AUDIO_OPENAL_SOUND_SOURCE_HPP +#define HEADER_SUPERTUX_AUDIO_OPENAL_SOUND_SOURCE_HPP #include -#include "sound_source.hpp" +#include "audio/sound_source.hpp" class OpenALSoundSource : public SoundSource { @@ -50,3 +48,5 @@ protected: }; #endif + +/* EOF */ diff --git a/src/audio/sound_error.cpp b/src/audio/sound_error.cpp new file mode 100644 index 000000000..61c1ef356 --- /dev/null +++ b/src/audio/sound_error.cpp @@ -0,0 +1,33 @@ +// SuperTux +// Copyright (C) 2006 Matthias Braun +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include "audio/sound_error.hpp" + +SoundError::SoundError(const std::string& message_) throw() : + message(message_) +{ +} + +SoundError::~SoundError() throw() +{} + +const char* +SoundError::what() const throw() +{ + return message.c_str(); +} + +/* EOF */ diff --git a/src/audio/sound_error.hpp b/src/audio/sound_error.hpp new file mode 100644 index 000000000..c739584af --- /dev/null +++ b/src/audio/sound_error.hpp @@ -0,0 +1,35 @@ +// SuperTux +// Copyright (C) 2006 Matthias Braun +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_AUDIO_SOUND_ERROR_HPP +#define HEADER_SUPERTUX_AUDIO_SOUND_ERROR_HPP + +#include + +class SoundError : public std::exception +{ +public: + SoundError(const std::string& message) throw(); + virtual ~SoundError() throw(); + + const char* what() const throw(); +private: + std::string message; +}; + +#endif + +/* EOF */ diff --git a/src/audio/sound_file.cpp b/src/audio/sound_file.cpp index 88feea5ba..5283ff594 100644 --- a/src/audio/sound_file.cpp +++ b/src/audio/sound_file.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,373 +12,25 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . /** Used SDL_mixer and glest source as reference */ -#include -#include "sound_file.hpp" +#include "audio/sound_file.hpp" + +#include -#include #include -#include -#include #include -#include - #include -#include -#include -#include "log.hpp" -#include "lisp/parser.hpp" +#include "audio/sound_error.hpp" +#include "audio/ogg_sound_file.hpp" +#include "audio/wav_sound_file.hpp" #include "lisp/lisp.hpp" -#include "file_system.hpp" - -class SoundError : public std::exception -{ -public: - SoundError(const std::string& message) throw(); - virtual ~SoundError() throw(); - - const char* what() const throw(); -private: - std::string message; -}; - -SoundError::SoundError(const std::string& message) throw() -{ - this->message = message; -} - -SoundError::~SoundError() throw() -{} - -const char* -SoundError::what() const throw() -{ - return message.c_str(); -} - -class WavSoundFile : public SoundFile -{ -public: - WavSoundFile(PHYSFS_file* file); - ~WavSoundFile(); - - size_t read(void* buffer, size_t buffer_size); - void reset(); - -private: - PHYSFS_file* file; - - PHYSFS_sint64 datastart; -}; - -static inline uint32_t read32LE(PHYSFS_file* file) -{ - uint32_t result; - if(PHYSFS_readULE32(file, &result) == 0) - throw SoundError("file too short"); - - return result; -} - -static inline uint16_t read16LE(PHYSFS_file* file) -{ - uint16_t result; - if(PHYSFS_readULE16(file, &result) == 0) - throw SoundError("file too short"); - - return result; -} - -WavSoundFile::WavSoundFile(PHYSFS_file* file) -{ - this->file = file; - - char magic[4]; - if(PHYSFS_read(file, magic, sizeof(magic), 1) != 1) - throw SoundError("Couldn't read file magic (not a wave file)"); - if(strncmp(magic, "RIFF", 4) != 0) { - log_debug << "MAGIC: " << magic << std::endl; - throw SoundError("file is not a RIFF wav file"); - } - - uint32_t wavelen = read32LE(file); - (void) wavelen; - - if(PHYSFS_read(file, magic, sizeof(magic), 1) != 1) - throw SoundError("Couldn't read chunk header (not a wav file?)"); - if(strncmp(magic, "WAVE", 4) != 0) - throw SoundError("file is not a valid RIFF/WAVE file"); - - char chunkmagic[4]; - uint32_t chunklen; - - // search audio data format chunk - do { - if(PHYSFS_read(file, chunkmagic, sizeof(chunkmagic), 1) != 1) - throw SoundError("EOF while searching format chunk"); - chunklen = read32LE(file); - - if(strncmp(chunkmagic, "fmt ", 4) == 0) - break; - - if(strncmp(chunkmagic, "fact", 4) == 0 - || strncmp(chunkmagic, "LIST", 4) == 0) { - // skip chunk - if(PHYSFS_seek(file, PHYSFS_tell(file) + chunklen) == 0) - throw SoundError("EOF while searching fmt chunk"); - } else { - throw SoundError("complex WAVE files not supported"); - } - } while(true); - - if(chunklen < 16) - throw SoundError("Format chunk too short"); - - // parse format - uint16_t encoding = read16LE(file); - if(encoding != 1) - throw SoundError("only PCM encoding supported"); - channels = read16LE(file); - rate = read32LE(file); - uint32_t byterate = read32LE(file); - (void) byterate; - uint16_t blockalign = read16LE(file); - (void) blockalign; - bits_per_sample = read16LE(file); - - if(chunklen > 16) { - if(PHYSFS_seek(file, PHYSFS_tell(file) + (chunklen-16)) == 0) - throw SoundError("EOF while reading rest of format chunk"); - } - - // set file offset to DATA chunk data - do { - if(PHYSFS_read(file, chunkmagic, sizeof(chunkmagic), 1) != 1) - throw SoundError("EOF while searching data chunk"); - chunklen = read32LE(file); - - if(strncmp(chunkmagic, "data", 4) == 0) - break; - - // skip chunk - if(PHYSFS_seek(file, PHYSFS_tell(file) + chunklen) == 0) - throw SoundError("EOF while searching fmt chunk"); - } while(true); - - datastart = PHYSFS_tell(file); - size = static_cast (chunklen); -} - -WavSoundFile::~WavSoundFile() -{ - PHYSFS_close(file); -} - -void -WavSoundFile::reset() -{ - if(PHYSFS_seek(file, datastart) == 0) - throw SoundError("Couldn't seek to data start"); -} - -size_t -WavSoundFile::read(void* buffer, size_t buffer_size) -{ - PHYSFS_sint64 end = datastart + size; - PHYSFS_sint64 cur = PHYSFS_tell(file); - if(cur >= end) - return 0; - - size_t readsize = std::min(static_cast (end - cur), buffer_size); - if(PHYSFS_read(file, buffer, readsize, 1) != 1) - throw SoundError("read error while reading samples"); - -#ifdef WORDS_BIGENDIAN - if (bits_per_sample != 16) - return readsize; - char *tmp = (char*)buffer; - - size_t i; - char c; - for (i = 0; i < readsize / 2; i++) - { - c = tmp[2*i]; - tmp[2*i] = tmp[2*i+1]; - tmp[2*i+1] = c; - } - - buffer = tmp; -#endif - - return readsize; -} - -//--------------------------------------------------------------------------- - -class OggSoundFile : public SoundFile -{ -public: - OggSoundFile(PHYSFS_file* file, double loop_begin, double loop_at); - ~OggSoundFile(); - - size_t read(void* buffer, size_t buffer_size); - void reset(); - -private: - static size_t cb_read(void* ptr, size_t size, size_t nmemb, void* source); - static int cb_seek(void* source, ogg_int64_t offset, int whence); - static int cb_close(void* source); - static long cb_tell(void* source); - - PHYSFS_file* file; - OggVorbis_File vorbis_file; - ogg_int64_t loop_begin; - ogg_int64_t loop_at; - size_t normal_buffer_loop; -}; - -OggSoundFile::OggSoundFile(PHYSFS_file* file, double loop_begin, double loop_at) -{ - this->file = file; - - ov_callbacks callbacks = { cb_read, cb_seek, cb_close, cb_tell }; - ov_open_callbacks(file, &vorbis_file, 0, 0, callbacks); - - vorbis_info* vi = ov_info(&vorbis_file, -1); - - channels = vi->channels; - rate = vi->rate; - bits_per_sample = 16; - size = static_cast (ov_pcm_total(&vorbis_file, -1) * 2); - - double samples_begin = loop_begin * rate; - double sample_loop = loop_at * rate; - - this->loop_begin = (ogg_int64_t) samples_begin; - if(loop_begin < 0) { - this->loop_at = (ogg_int64_t) -1; - } else { - this->loop_at = (ogg_int64_t) sample_loop; - } -} - -OggSoundFile::~OggSoundFile() -{ - ov_clear(&vorbis_file); -} - -size_t -OggSoundFile::read(void* _buffer, size_t buffer_size) -{ - char* buffer = reinterpret_cast (_buffer); - int section = 0; - size_t totalBytesRead = 0; - - while(buffer_size>0) { -#ifdef WORDS_BIGENDIAN - int bigendian = 1; -#else - int bigendian = 0; -#endif - - size_t bytes_to_read = buffer_size; - if(loop_at > 0) { - size_t bytes_per_sample = 2; - ogg_int64_t time = ov_pcm_tell(&vorbis_file); - ogg_int64_t samples_left_till_loop = loop_at - time; - ogg_int64_t bytes_left_till_loop - = samples_left_till_loop * bytes_per_sample; - if(bytes_left_till_loop <= 4) - break; - - if(bytes_left_till_loop < (ogg_int64_t) bytes_to_read) { - bytes_to_read = (size_t) bytes_left_till_loop; - } - } - - long bytesRead - = ov_read(&vorbis_file, buffer, bytes_to_read, bigendian, - 2, 1, §ion); - if(bytesRead == 0) { - break; - } - buffer_size -= bytesRead; - buffer += bytesRead; - totalBytesRead += bytesRead; - } - - return totalBytesRead; -} - -void -OggSoundFile::reset() -{ - ov_pcm_seek(&vorbis_file, loop_begin); -} - -size_t -OggSoundFile::cb_read(void* ptr, size_t size, size_t nmemb, void* source) -{ - PHYSFS_file* file = reinterpret_cast (source); - - PHYSFS_sint64 res - = PHYSFS_read(file, ptr, static_cast (size), - static_cast (nmemb)); - if(res <= 0) - return 0; - - return static_cast (res); -} - -int -OggSoundFile::cb_seek(void* source, ogg_int64_t offset, int whence) -{ - PHYSFS_file* file = reinterpret_cast (source); - - switch(whence) { - case SEEK_SET: - if(PHYSFS_seek(file, static_cast (offset)) == 0) - return -1; - break; - case SEEK_CUR: - if(PHYSFS_seek(file, PHYSFS_tell(file) + offset) == 0) - return -1; - break; - case SEEK_END: - if(PHYSFS_seek(file, PHYSFS_fileLength(file) + offset) == 0) - return -1; - break; - default: -#ifdef DEBUG - assert(false); -#else - return -1; -#endif - } - return 0; -} - -int -OggSoundFile::cb_close(void* source) -{ - PHYSFS_file* file = reinterpret_cast (source); - PHYSFS_close(file); - return 0; -} - -long -OggSoundFile::cb_tell(void* source) -{ - PHYSFS_file* file = reinterpret_cast (source); - return static_cast (PHYSFS_tell(file)); -} - -//--------------------------------------------------------------------------- +#include "lisp/parser.hpp" +#include "util/file_system.hpp" +#include "util/log.hpp" SoundFile* load_music_file(const std::string& filename) { @@ -418,7 +68,7 @@ SoundFile* load_music_file(const std::string& filename) SoundFile* load_sound_file(const std::string& filename) { if(filename.length() > 6 - && filename.compare(filename.length()-6, 6, ".music") == 0) { + && filename.compare(filename.length()-6, 6, ".music") == 0) { return load_music_file(filename); } @@ -446,3 +96,5 @@ SoundFile* load_sound_file(const std::string& filename) throw SoundError(msg.str()); } } + +/* EOF */ diff --git a/src/audio/sound_file.hpp b/src/audio/sound_file.hpp index fd777b22a..2fc1d3466 100644 --- a/src/audio/sound_file.hpp +++ b/src/audio/sound_file.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,18 +12,23 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __SOUND_FILE_H__ -#define __SOUND_FILE_H__ +#ifndef HEADER_SUPERTUX_AUDIO_SOUND_FILE_HPP +#define HEADER_SUPERTUX_AUDIO_SOUND_FILE_HPP -#include #include class SoundFile { public: + SoundFile() : + channels(), + rate(), + bits_per_sample(), + size() + {} + virtual ~SoundFile() { } @@ -42,3 +45,5 @@ public: SoundFile* load_sound_file(const std::string& filename); #endif + +/* EOF */ diff --git a/src/audio/sound_manager.cpp b/src/audio/sound_manager.cpp index 9d9779854..a5a47ae03 100644 --- a/src/audio/sound_manager.cpp +++ b/src/audio/sound_manager.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,31 +12,25 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#include +// along with this program. If not, see . -#include "sound_manager.hpp" +#include "audio/sound_manager.hpp" +#include +#include #include -#include #include #include -#include -#include -#include "sound_file.hpp" -#include "sound_source.hpp" -#include "openal_sound_source.hpp" -#include "stream_sound_source.hpp" -#include "dummy_sound_source.hpp" -#include "log.hpp" -#include "timer.hpp" +#include "audio/dummy_sound_source.hpp" +#include "audio/sound_file.hpp" +#include "audio/stream_sound_source.hpp" +#include "util/log.hpp" #ifndef DEBUG - /** Older openal versions often miss this function and it isn't that vital for - * supertux... - */ +/** Older openal versions often miss this function and it isn't that vital for + * supertux... + */ #ifdef alcGetString #undef alcGetString #endif @@ -47,9 +39,16 @@ SoundManager* sound_manager = 0; -SoundManager::SoundManager() - : device(0), context(0), sound_enabled(false), music_source(0), - music_enabled(false) +SoundManager::SoundManager() : + device(0), + context(0), + sound_enabled(false), + buffers(), + sources(), + update_list(), + music_source(0), + music_enabled(false), + current_music() { try { device = alcOpenDevice(0); @@ -110,8 +109,8 @@ SoundManager::load_file_into_buffer(SoundFile* file) try { file->read(samples, file->size); alBufferData(buffer, format, samples, - static_cast (file->size), - static_cast (file->rate)); + static_cast (file->size), + static_cast (file->rate)); check_al_error("Couldn't fill audio buffer: "); } catch(...) { delete[] samples; @@ -201,7 +200,7 @@ SoundManager::play(const std::string& filename, const Vector& pos) try { std::auto_ptr source - (intern_create_sound_source(filename)); + (intern_create_sound_source(filename)); if(pos == Vector(-1, -1)) { source->set_rollof_factor(0); @@ -278,7 +277,7 @@ SoundManager::stop_music(float fadetime) { if(fadetime > 0) { if(music_source - && music_source->get_fade_state() != StreamSoundSource::FadingOff) + && music_source->get_fade_state() != StreamSoundSource::FadingOff) music_source->set_fading(StreamSoundSource::FadingOff, fadetime); } else { delete music_source; @@ -433,3 +432,5 @@ SoundManager::check_al_error(const char* message) throw std::runtime_error(msg.str()); } } + +/* EOF */ diff --git a/src/audio/sound_manager.hpp b/src/audio/sound_manager.hpp index 9794e6d46..7791df1df 100644 --- a/src/audio/sound_manager.hpp +++ b/src/audio/sound_manager.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,17 +12,17 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef __SOUND_MANAGER_H__ -#define __SOUND_MANAGER_H__ +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_AUDIO_SOUND_MANAGER_HPP +#define HEADER_SUPERTUX_AUDIO_SOUND_MANAGER_HPP +#include #include #include -#include -#include #include +#include #include "math/vector.hpp" @@ -113,8 +111,14 @@ private: bool music_enabled; std::string current_music; + +private: + SoundManager(const SoundManager&); + SoundManager& operator=(const SoundManager&); }; extern SoundManager* sound_manager; #endif + +/* EOF */ diff --git a/src/audio/sound_source.hpp b/src/audio/sound_source.hpp index a7356812f..266f941e0 100644 --- a/src/audio/sound_source.hpp +++ b/src/audio/sound_source.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,10 +12,10 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef __SOUND_SOURCE_H__ -#define __SOUND_SOURCE_H__ +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_AUDIO_SOUND_SOURCE_HPP +#define HEADER_SUPERTUX_AUDIO_SOUND_SOURCE_HPP class Vector; @@ -47,3 +45,5 @@ public: }; #endif + +/* EOF */ diff --git a/src/audio/stream_sound_source.cpp b/src/audio/stream_sound_source.cpp index 6f94706c4..bb178725d 100644 --- a/src/audio/stream_sound_source.cpp +++ b/src/audio/stream_sound_source.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,22 +12,20 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include -#include - -#include - -#include "stream_sound_source.hpp" -#include "sound_manager.hpp" -#include "sound_file.hpp" -#include "timer.hpp" -#include "log.hpp" - -StreamSoundSource::StreamSoundSource() - : file(0), fade_state(NoFading), looping(false) +// along with this program. If not, see . + +#include "audio/sound_file.hpp" +#include "audio/sound_manager.hpp" +#include "audio/stream_sound_source.hpp" +#include "supertux/timer.hpp" +#include "util/log.hpp" + +StreamSoundSource::StreamSoundSource() : + file(0), + fade_state(NoFading), + fade_start_time(), + fade_time(), + looping(false) { alGenBuffers(STREAMFRAGMENTS, buffers); SoundManager::check_al_error("Couldn't allocate audio buffers: "); @@ -119,7 +115,7 @@ StreamSoundSource::fillBufferAndQueue(ALuint buffer) size_t bytesread = 0; do { bytesread += file->read(bufferdata + bytesread, - STREAMFRAGMENTSIZE - bytesread); + STREAMFRAGMENTSIZE - bytesread); // end of sound file if(bytesread < STREAMFRAGMENTSIZE) { if(looping) @@ -142,3 +138,5 @@ StreamSoundSource::fillBufferAndQueue(ALuint buffer) // return false if there aren't more buffers to fill return bytesread >= STREAMFRAGMENTSIZE; } + +/* EOF */ diff --git a/src/audio/stream_sound_source.hpp b/src/audio/stream_sound_source.hpp index aa621b39f..d3b3e948a 100644 --- a/src/audio/stream_sound_source.hpp +++ b/src/audio/stream_sound_source.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,15 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __STREAM_SOUND_SOURCE_H__ -#define __STREAM_SOUND_SOURCE_H__ +#ifndef HEADER_SUPERTUX_AUDIO_STREAM_SOUND_SOURCE_HPP +#define HEADER_SUPERTUX_AUDIO_STREAM_SOUND_SOURCE_HPP -#include -#include -#include "openal_sound_source.hpp" +#include "audio/openal_sound_source.hpp" class SoundFile; @@ -56,7 +51,7 @@ private: static const size_t STREAMBUFFERSIZE = 1024 * 500; static const size_t STREAMFRAGMENTS = 5; static const size_t STREAMFRAGMENTSIZE - = STREAMBUFFERSIZE / STREAMFRAGMENTS; + = STREAMBUFFERSIZE / STREAMFRAGMENTS; bool fillBufferAndQueue(ALuint buffer); SoundFile* file; @@ -66,6 +61,12 @@ private: float fade_start_time; float fade_time; bool looping; + +private: + StreamSoundSource(const StreamSoundSource&); + StreamSoundSource& operator=(const StreamSoundSource&); }; #endif + +/* EOF */ diff --git a/src/audio/wav_sound_file.cpp b/src/audio/wav_sound_file.cpp new file mode 100644 index 000000000..c987516ed --- /dev/null +++ b/src/audio/wav_sound_file.cpp @@ -0,0 +1,169 @@ +// SuperTux +// Copyright (C) 2006 Matthias Braun +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include "audio/wav_sound_file.hpp" + +#include +#include +#include + +#include "audio/sound_error.hpp" +#include "util/log.hpp" + +static inline uint32_t read32LE(PHYSFS_file* file) +{ + uint32_t result; + if(PHYSFS_readULE32(file, &result) == 0) + throw SoundError("file too short"); + + return result; +} + +static inline uint16_t read16LE(PHYSFS_file* file) +{ + uint16_t result; + if(PHYSFS_readULE16(file, &result) == 0) + throw SoundError("file too short"); + + return result; +} + +WavSoundFile::WavSoundFile(PHYSFS_file* file_) : + file(file_), + datastart() +{ + assert(file); + char magic[4]; + if(PHYSFS_read(file, magic, sizeof(magic), 1) != 1) + throw SoundError("Couldn't read file magic (not a wave file)"); + if(strncmp(magic, "RIFF", 4) != 0) { + log_debug << "MAGIC: " << magic << std::endl; + throw SoundError("file is not a RIFF wav file"); + } + + uint32_t wavelen = read32LE(file); + (void) wavelen; + + if(PHYSFS_read(file, magic, sizeof(magic), 1) != 1) + throw SoundError("Couldn't read chunk header (not a wav file?)"); + if(strncmp(magic, "WAVE", 4) != 0) + throw SoundError("file is not a valid RIFF/WAVE file"); + + char chunkmagic[4]; + uint32_t chunklen; + + // search audio data format chunk + do { + if(PHYSFS_read(file, chunkmagic, sizeof(chunkmagic), 1) != 1) + throw SoundError("EOF while searching format chunk"); + chunklen = read32LE(file); + + if(strncmp(chunkmagic, "fmt ", 4) == 0) + break; + + if(strncmp(chunkmagic, "fact", 4) == 0 + || strncmp(chunkmagic, "LIST", 4) == 0) { + // skip chunk + if(PHYSFS_seek(file, PHYSFS_tell(file) + chunklen) == 0) + throw SoundError("EOF while searching fmt chunk"); + } else { + throw SoundError("complex WAVE files not supported"); + } + } while(true); + + if(chunklen < 16) + throw SoundError("Format chunk too short"); + + // parse format + uint16_t encoding = read16LE(file); + if(encoding != 1) + throw SoundError("only PCM encoding supported"); + channels = read16LE(file); + rate = read32LE(file); + uint32_t byterate = read32LE(file); + (void) byterate; + uint16_t blockalign = read16LE(file); + (void) blockalign; + bits_per_sample = read16LE(file); + + if(chunklen > 16) { + if(PHYSFS_seek(file, PHYSFS_tell(file) + (chunklen-16)) == 0) + throw SoundError("EOF while reading rest of format chunk"); + } + + // set file offset to DATA chunk data + do { + if(PHYSFS_read(file, chunkmagic, sizeof(chunkmagic), 1) != 1) + throw SoundError("EOF while searching data chunk"); + chunklen = read32LE(file); + + if(strncmp(chunkmagic, "data", 4) == 0) + break; + + // skip chunk + if(PHYSFS_seek(file, PHYSFS_tell(file) + chunklen) == 0) + throw SoundError("EOF while searching fmt chunk"); + } while(true); + + datastart = PHYSFS_tell(file); + size = static_cast (chunklen); +} + +WavSoundFile::~WavSoundFile() +{ + PHYSFS_close(file); +} + +void +WavSoundFile::reset() +{ + if(PHYSFS_seek(file, datastart) == 0) + throw SoundError("Couldn't seek to data start"); +} + +size_t +WavSoundFile::read(void* buffer, size_t buffer_size) +{ + PHYSFS_sint64 end = datastart + size; + PHYSFS_sint64 cur = PHYSFS_tell(file); + if(cur >= end) + return 0; + + size_t readsize = std::min(static_cast (end - cur), buffer_size); + if(PHYSFS_read(file, buffer, readsize, 1) != 1) + throw SoundError("read error while reading samples"); + +#ifdef WORDS_BIGENDIAN + if (bits_per_sample != 16) + return readsize; + char *tmp = (char*)buffer; + + size_t i; + char c; + for (i = 0; i < readsize / 2; i++) + { + c = tmp[2*i]; + tmp[2*i] = tmp[2*i+1]; + tmp[2*i+1] = c; + } + + buffer = tmp; +#endif + + return readsize; +} + +/* EOF */ diff --git a/src/audio/wav_sound_file.hpp b/src/audio/wav_sound_file.hpp new file mode 100644 index 000000000..0626e2f03 --- /dev/null +++ b/src/audio/wav_sound_file.hpp @@ -0,0 +1,45 @@ +// SuperTux +// Copyright (C) 2006 Matthias Braun +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_AUDIO_WAV_SOUND_FILE_HPP +#define HEADER_SUPERTUX_AUDIO_WAV_SOUND_FILE_HPP + +#include + +#include "audio/sound_file.hpp" + +class WavSoundFile : public SoundFile +{ +public: + WavSoundFile(PHYSFS_file* file); + ~WavSoundFile(); + + size_t read(void* buffer, size_t buffer_size); + void reset(); + +private: + PHYSFS_file* file; + + PHYSFS_sint64 datastart; + +private: + WavSoundFile(const WavSoundFile&); + WavSoundFile& operator=(const WavSoundFile&); +}; + +#endif + +/* EOF */ diff --git a/src/badguy/angrystone.cpp b/src/badguy/angrystone.cpp index cd7433288..4875f76ad 100644 --- a/src/badguy/angrystone.cpp +++ b/src/badguy/angrystone.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // AngryStone - A spiked block that charges towards the player // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,18 +12,13 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "angrystone.hpp" +#include "badguy/angrystone.hpp" -#include "lisp/writer.hpp" #include "object/player.hpp" -#include "object_factory.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" static const float SPEED = 240; @@ -33,8 +26,12 @@ static const float CHARGE_TIME = .5; static const float ATTACK_TIME = 1; static const float RECOVER_TIME = .5; -AngryStone::AngryStone(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/angrystone/angrystone.sprite"), state(IDLE) +AngryStone::AngryStone(const Reader& reader) : + BadGuy(reader, "images/creatures/angrystone/angrystone.sprite"), + attackDirection(), + oldWallDirection(), + timer(), + state(IDLE) { physic.set_velocity_x(0); physic.set_velocity_y(0); @@ -43,17 +40,6 @@ AngryStone::AngryStone(const lisp::Lisp& reader) } void -AngryStone::write(lisp::Writer& writer) -{ - writer.start_list("angrystone"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - - writer.end_list("angrystone"); -} - -void AngryStone::collision_solid(const CollisionHit& hit) { // TODO @@ -122,20 +108,20 @@ AngryStone::active_update(float elapsed_time) { state = CHARGING; } } else - if ((dy > -playerHeight) && (dy < badguyHeight)) { - if (dx > 0) { - attackDirection.x = 1; - attackDirection.y = 0; - } else { - attackDirection.x = -1; - attackDirection.y = 0; + if ((dy > -playerHeight) && (dy < badguyHeight)) { + if (dx > 0) { + attackDirection.x = 1; + attackDirection.y = 0; + } else { + attackDirection.x = -1; + attackDirection.y = 0; + } + if ((attackDirection.x != oldWallDirection.x) || (attackDirection.y != oldWallDirection.y)) { + sprite->set_action("charging"); + timer.start(CHARGE_TIME); + state = CHARGING; + } } - if ((attackDirection.x != oldWallDirection.x) || (attackDirection.y != oldWallDirection.y)) { - sprite->set_action("charging"); - timer.start(CHARGE_TIME); - state = CHARGING; - } - } } } @@ -176,4 +162,6 @@ AngryStone::active_update(float elapsed_time) { } -IMPLEMENT_FACTORY(AngryStone, "angrystone") +IMPLEMENT_FACTORY(AngryStone, "angrystone"); + +/* EOF */ diff --git a/src/badguy/angrystone.hpp b/src/badguy/angrystone.hpp index 1a46e0c72..6dbcef2e6 100644 --- a/src/badguy/angrystone.hpp +++ b/src/badguy/angrystone.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // AngryStone - A spiked block that charges towards the player // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,42 +12,38 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. +// along with this program. If not, see . -#ifndef __ANGRYSTONE_H__ -#define __ANGRYSTONE_H__ +#ifndef HEADER_SUPERTUX_BADGUY_ANGRYSTONE_HPP +#define HEADER_SUPERTUX_BADGUY_ANGRYSTONE_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class AngryStone : public BadGuy { public: - AngryStone(const lisp::Lisp& reader); + AngryStone(const Reader& reader); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); void active_update(float elapsed_time); void kill_fall(); - virtual AngryStone* clone() const { return new AngryStone(*this); } - protected: - Vector attackDirection; /**< 1-normalized vector of current attack direction */ - Vector oldWallDirection; /**< if wall was hit during last attack: 1-normalized vector of last attack direction, (0,0) otherwise */ - - Timer timer; - enum AngryStoneState { IDLE, CHARGING, ATTACKING, RECOVERING }; - AngryStoneState state; +private: + Vector attackDirection; /**< 1-normalized vector of current attack direction */ + Vector oldWallDirection; /**< if wall was hit during last attack: 1-normalized vector of last attack direction, (0,0) otherwise */ + Timer timer; + AngryStoneState state; }; #endif + +/* EOF */ diff --git a/src/badguy/badguy.cpp b/src/badguy/badguy.cpp index 2fbacae12..83ff6f8bc 100644 --- a/src/badguy/badguy.cpp +++ b/src/badguy/badguy.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,27 +12,16 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "badguy.hpp" +#include "badguy/badguy.hpp" #include "audio/sound_manager.hpp" -#include "game_session.hpp" -#include "level.hpp" -#include "log.hpp" -#include "main.hpp" #include "object/bullet.hpp" -#include "object/camera.hpp" -#include "object/particles.hpp" #include "object/player.hpp" -#include "object/tilemap.hpp" -#include "random_generator.hpp" -#include "sector.hpp" -#include "statistics.hpp" -#include "tile.hpp" +#include "supertux/level.hpp" +#include "supertux/sector.hpp" +#include "supertux/tile.hpp" #include @@ -43,10 +30,22 @@ static const float SQUISH_TIME = 2; static const float X_OFFSCREEN_DISTANCE = 1600; static const float Y_OFFSCREEN_DISTANCE = 1200; -BadGuy::BadGuy(const Vector& pos, const std::string& sprite_name, int layer) - : MovingSprite(pos, sprite_name, layer, COLGROUP_DISABLED), countMe(true), is_initialized(false), - dir(LEFT), start_dir(AUTO), frozen(false), ignited(false), - state(STATE_INIT), on_ground_flag(false), colgroup_active(COLGROUP_MOVING) +BadGuy::BadGuy(const Vector& pos, const std::string& sprite_name, int layer) : + MovingSprite(pos, sprite_name, layer, COLGROUP_DISABLED), + countMe(true), + is_initialized(false), + start_position(), + dir(LEFT), + start_dir(AUTO), + frozen(false), + ignited(false), + dead_script(), + state(STATE_INIT), + is_active_flag(), + state_timer(), + on_ground_flag(false), + floor_normal(), + colgroup_active(COLGROUP_MOVING) { start_position = bbox.p1; @@ -56,10 +55,22 @@ BadGuy::BadGuy(const Vector& pos, const std::string& sprite_name, int layer) dir = (start_dir == AUTO) ? LEFT : start_dir; } -BadGuy::BadGuy(const Vector& pos, Direction direction, const std::string& sprite_name, int layer) - : MovingSprite(pos, sprite_name, layer, COLGROUP_DISABLED), countMe(true), is_initialized(false), - dir(direction), start_dir(direction), frozen(false), ignited(false), - state(STATE_INIT), on_ground_flag(false), colgroup_active(COLGROUP_MOVING) +BadGuy::BadGuy(const Vector& pos, Direction direction, const std::string& sprite_name, int layer) : + MovingSprite(pos, sprite_name, layer, COLGROUP_DISABLED), + countMe(true), + is_initialized(false), + start_position(), + dir(direction), + start_dir(direction), + frozen(false), + ignited(false), + dead_script(), + state(STATE_INIT), + is_active_flag(), + state_timer(), + on_ground_flag(false), + floor_normal(), + colgroup_active(COLGROUP_MOVING) { start_position = bbox.p1; @@ -69,8 +80,22 @@ BadGuy::BadGuy(const Vector& pos, Direction direction, const std::string& sprite dir = (start_dir == AUTO) ? LEFT : start_dir; } -BadGuy::BadGuy(const lisp::Lisp& reader, const std::string& sprite_name, int layer) - : MovingSprite(reader, sprite_name, layer, COLGROUP_DISABLED), countMe(true), is_initialized(false), dir(LEFT), start_dir(AUTO), frozen(false), ignited(false), state(STATE_INIT), on_ground_flag(false), colgroup_active(COLGROUP_MOVING) +BadGuy::BadGuy(const Reader& reader, const std::string& sprite_name, int layer) : + MovingSprite(reader, sprite_name, layer, COLGROUP_DISABLED), + countMe(true), + is_initialized(false), + start_position(), + dir(LEFT), + start_dir(AUTO), + frozen(false), + ignited(false), + dead_script(), + state(STATE_INIT), + is_active_flag(), + state_timer(), + on_ground_flag(false), + floor_normal(), + colgroup_active(COLGROUP_MOVING) { start_position = bbox.p1; @@ -90,7 +115,7 @@ BadGuy::BadGuy(const lisp::Lisp& reader, const std::string& sprite_name, int lay void BadGuy::draw(DrawingContext& context) { - if(!sprite) + if(!sprite.get()) return; if(state == STATE_INIT || state == STATE_INACTIVE) return; @@ -176,12 +201,6 @@ BadGuy::deactivate() } void -BadGuy::write(lisp::Writer& ) -{ - log_warning << "tried to write out a generic badguy" << std::endl; -} - -void BadGuy::active_update(float elapsed_time) { movement = physic.get_movement(elapsed_time); @@ -361,11 +380,11 @@ void BadGuy::run_dead_script() { if (countMe) - Sector::current()->get_level()->stats.badguys++; + Sector::current()->get_level()->stats.badguys++; countMe = false; - // start dead-script + // start dead-script if(dead_script != "") { std::istringstream stream(dead_script); Sector::current()->run_script(stream, "dead-script"); @@ -562,3 +581,4 @@ BadGuy::set_colgroup_active(CollisionGroup group) if (state == STATE_ACTIVE) set_group(group); } +/* EOF */ diff --git a/src/badguy/badguy.hpp b/src/badguy/badguy.hpp index db58f2015..7555d837d 100644 --- a/src/badguy/badguy.hpp +++ b/src/badguy/badguy.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,64 +12,53 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __BADGUY_H__ -#define __BADGUY_H__ +#ifndef HEADER_SUPERTUX_BADGUY_BADGUY_HPP +#define HEADER_SUPERTUX_BADGUY_BADGUY_HPP -#include "timer.hpp" #include "object/moving_sprite.hpp" -#include "physic.hpp" -#include "serializable.hpp" -#include "direction.hpp" +#include "supertux/direction.hpp" +#include "supertux/physic.hpp" +#include "supertux/timer.hpp" class Player; class Bullet; -/** - * Base class for moving sprites that can hurt the Player. - */ -class BadGuy : public MovingSprite, protected UsesPhysic, public Serializable +/** Base class for moving sprites that can hurt the Player. */ +class BadGuy : public MovingSprite { public: BadGuy(const Vector& pos, const std::string& sprite_name, int layer = LAYER_OBJECTS); BadGuy(const Vector& pos, Direction direction, const std::string& sprite_name, int layer = LAYER_OBJECTS); - BadGuy(const lisp::Lisp& reader, const std::string& sprite_name, int layer = LAYER_OBJECTS); + BadGuy(const Reader& reader, const std::string& sprite_name, int layer = LAYER_OBJECTS); - /** Called when the badguy is drawn. The default implementation simply draws - * the badguy sprite on screen - */ + /** Called when the badguy is drawn. The default implementation + simply draws the badguy sprite on screen */ virtual void draw(DrawingContext& context); - /** Called each frame. The default implementation checks badguy state and - * calls active_update and inactive_update - */ + + /** Called each frame. The default implementation checks badguy + state and calls active_update and inactive_update */ virtual void update(float elapsed_time); - /** Called when a collision with another object occurred. The default - * implementation calls collision_player, collision_solid, collision_badguy - * and collision_squished - */ + + /** Called when a collision with another object occurred. The + default implementation calls collision_player, collision_solid, + collision_badguy and collision_squished */ virtual HitResponse collision(GameObject& other, const CollisionHit& hit); - /** Called when a collision with tile with special attributes occurred */ + /** Called when a collision with tile with special attributes + occurred */ virtual void collision_tile(uint32_t tile_attributes); - /** Set the badguy to kill/falling state, which makes him falling of the - * screen (his sprite is turned upside-down) - */ + /** Set the badguy to kill/falling state, which makes him falling of + the screen (his sprite is turned upside-down) */ virtual void kill_fall(); /** Call this, if you use custom kill_fall() or kill_squashed(GameObject& object) */ virtual void run_dead_script(); - /** Writes out the badguy into the included lisp::Writer. Useful e.g. when - * converting an old-format level to the new format. - */ - virtual void write(lisp::Writer& writer); - - /** - * True if this badguy can break bricks or open bonusblocks in his current form. - */ + /** True if this badguy can break bricks or open bonusblocks in his + current form. */ virtual bool can_break() { return false; @@ -86,38 +73,26 @@ public: start_position = vec; } - /** Count this badguy to the statistics? This value should not be changed - * during runtime. */ + /** Count this badguy to the statistics? This value should not be + changed during runtime. */ bool countMe; - /** - * Called when hit by a fire bullet, and is_flammable() returns true - */ + /** Called when hit by a fire bullet, and is_flammable() returns true */ virtual void ignite(); - /** - * Called to revert a badguy when is_ignited() returns true - */ + /** Called to revert a badguy when is_ignited() returns true */ virtual void extinguish(); - /** - * Returns whether to call ignite() when a badguy gets hit by a fire bullet - */ + /** Returns whether to call ignite() when a badguy gets hit by a fire bullet */ virtual bool is_flammable() const; - /** - * Returns whether this badguys is currently on fire - */ + /** Returns whether this badguys is currently on fire */ bool is_ignited() const; - /** - * Called when hit by an ice bullet, and is_freezable() returns true. - */ + /** Called when hit by an ice bullet, and is_freezable() returns true. */ virtual void freeze(); - /** - * Called to unfreeze the badguy. - */ + /** Called to unfreeze the badguy. */ virtual void unfreeze(); virtual bool is_freezable() const; @@ -133,16 +108,19 @@ protected: STATE_FALLING }; +protected: /** Called when the badguy collided with a player */ virtual HitResponse collision_player(Player& player, const CollisionHit& hit); + /** Called when the badguy collided with solid ground */ virtual void collision_solid(const CollisionHit& hit); + /** Called when the badguy collided with another badguy */ virtual HitResponse collision_badguy(BadGuy& other, const CollisionHit& hit); - /** Called when the player hit the badguy from above. You should return true - * if the badguy was squished, false if squishing wasn't possible - */ + /** Called when the player hit the badguy from above. You should + return true if the badguy was squished, false if squishing + wasn't possible */ virtual bool collision_squished(GameObject& object); /** Called when the badguy collided with a bullet */ @@ -150,17 +128,21 @@ protected: /** called each frame when the badguy is activated. */ virtual void active_update(float elapsed_time); + /** called each frame when the badguy is not activated. */ virtual void inactive_update(float elapsed_time); - bool is_initialized; /**< true if initialize() has already been called */ + /** true if initialize() has already been called */ + bool is_initialized; + /** called immediately before the first call to initialize */ virtual void initialize(); - /** - * called when the badguy has been activated. (As a side effect the dir - * variable might have been changed so that it faces towards the player. - */ + + /** called when the badguy has been activated. (As a side effect the + dir variable might have been changed so that it faces towards + the player. */ virtual void activate(); + /** called when the badguy has been deactivated */ virtual void deactivate(); @@ -170,54 +152,42 @@ protected: State get_state() const { return state; } - /** - * returns a pointer to the nearest player or 0 if no player is available - */ + /** returns a pointer to the nearest player or 0 if no player is available */ Player* get_nearest_player(); - /** - * initial position of the enemy. Also the position where enemy respawns when - * after being deactivated. - */ + /** initial position of the enemy. Also the position where enemy + respawns when after being deactivated. */ bool is_offscreen(); - /** - * Returns true if we might soon fall at least @c height pixels. Minimum - * value for height is 1 pixel - */ + + /** Returns true if we might soon fall at least @c height + pixels. Minimum value for height is 1 pixel */ bool might_fall(int height = 1); Vector start_position; - /** - * The direction we currently face in - */ + /** The direction we currently face in */ Direction dir; - /** - * The direction we initially faced in - */ + /** The direction we initially faced in */ Direction start_dir; - /** - * Get Direction from String. - */ + /** Get Direction from String. */ Direction str2dir( std::string dir_str ); - /** - * Update on_ground_flag judging by solid collision @c hit. - * This gets called from the base implementation of collision_solid, so call this when overriding collision_solid's default behaviour. - */ + /** Update on_ground_flag judging by solid collision @c hit. This + gets called from the base implementation of collision_solid, so + call this when overriding collision_solid's default + behaviour. */ void update_on_ground_flag(const CollisionHit& hit); - /** - * Returns true if we touched ground in the past frame - * This only works if update_on_ground_flag() gets called in collision_solid. - */ + /** Returns true if we touched ground in the past frame This only + works if update_on_ground_flag() gets called in + collision_solid. */ bool on_ground(); - /** - * Returns floor normal stored the last time when update_on_ground_flag was called and we touched something solid from above. - */ + /** Returns floor normal stored the last time when + update_on_ground_flag was called and we touched something solid + from above. */ Vector get_floor_normal(); bool frozen; @@ -225,23 +195,44 @@ protected: std::string dead_script; /**< script to execute when badguy is killed */ - /** - * Returns true if we were in STATE_ACTIVE at the beginning of the last call to update() - */ + /** Returns true if we were in STATE_ACTIVE at the beginning of the + last call to update() */ bool is_active(); - void set_colgroup_active(CollisionGroup group); /**< changes colgroup_active. Also calls set_group when badguy is in STATE_ACTIVE */ + /** changes colgroup_active. Also calls set_group when badguy is in STATE_ACTIVE */ + void set_colgroup_active(CollisionGroup group); private: void try_activate(); +protected: + Physic physic; + +private: State state; - bool is_active_flag; /**< true if state was STATE_ACTIVE at the beginning of the last call to update() */ + + /** true if state was STATE_ACTIVE at the beginning of the last call + to update() */ + bool is_active_flag; + Timer state_timer; - bool on_ground_flag; /**< true if we touched something solid from above and update_on_ground_flag was called last frame */ - Vector floor_normal; /**< floor normal stored the last time when update_on_ground_flag was called and we touched something solid from above */ - CollisionGroup colgroup_active; /**< CollisionGroup the badguy should be in while active */ + /** true if we touched something solid from above and + update_on_ground_flag was called last frame */ + bool on_ground_flag; + + /** floor normal stored the last time when update_on_ground_flag was + called and we touched something solid from above */ + Vector floor_normal; + + /** CollisionGroup the badguy should be in while active */ + CollisionGroup colgroup_active; + +private: + BadGuy(const BadGuy&); + BadGuy& operator=(const BadGuy&); }; #endif + +/* EOF */ diff --git a/src/badguy/bomb.cpp b/src/badguy/bomb.cpp index 55e630f1c..75dcf4299 100644 --- a/src/badguy/bomb.cpp +++ b/src/badguy/bomb.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,22 +12,21 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "bomb.hpp" -#include "random_generator.hpp" -#include "object/explosion.hpp" #include "audio/sound_manager.hpp" -#include "lisp/writer.hpp" -#include "sprite/sprite.hpp" +#include "badguy/bomb.hpp" +#include "object/explosion.hpp" #include "object/player.hpp" -#include "sector.hpp" - -Bomb::Bomb(const Vector& pos, Direction dir, std::string custom_sprite /*= "images/creatures/mr_bomb/mr_bomb.sprite"*/ ) - : BadGuy( pos, dir, custom_sprite ), grabbed(false), grabber(NULL) +#include "sprite/sprite.hpp" +#include "supertux/sector.hpp" + +Bomb::Bomb(const Vector& pos, Direction dir, std::string custom_sprite /*= "images/creatures/mr_bomb/mr_bomb.sprite"*/ ) : + BadGuy( pos, dir, custom_sprite ), + state(), + grabbed(false), + grabber(NULL), + ticking() { state = STATE_TICKING; set_action(dir == LEFT ? "ticking-left" : "ticking-right", 1); @@ -43,32 +40,13 @@ Bomb::Bomb(const Vector& pos, Direction dir, std::string custom_sprite /*= "imag ticking->play(); } -Bomb::Bomb(const Bomb& other) - : BadGuy(other), Portable(other), state(other.state) -{ - if (state == STATE_TICKING) { - ticking.reset(sound_manager->create_sound_source("sounds/fizz.wav")); - ticking->set_position(get_pos()); - ticking->set_looping(true); - ticking->set_gain(2.0); - ticking->set_reference_distance(32); - ticking->play(); - } -} - -void -Bomb::write(lisp::Writer& ) -{ - // bombs are only temporarily so don't write them out... -} - void Bomb::collision_solid(const CollisionHit& hit) { if(hit.bottom) physic.set_velocity_y(0); - update_on_ground_flag(hit); + update_on_ground_flag(hit); } HitResponse @@ -107,7 +85,7 @@ Bomb::explode() Player* player = dynamic_cast(grabber); if (player) - player->stop_grabbing(); + player->stop_grabbing(); } if(is_valid()) { @@ -150,3 +128,4 @@ Bomb::ungrab(MovingObject& object, Direction dir) grabbed = false; } +/* EOF */ diff --git a/src/badguy/bomb.hpp b/src/badguy/bomb.hpp index 2481e9798..e2f4e7628 100644 --- a/src/badguy/bomb.hpp +++ b/src/badguy/bomb.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,23 +12,21 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __BOMB_H__ -#define __BOMB_H__ +#ifndef HEADER_SUPERTUX_BADGUY_BOMB_HPP +#define HEADER_SUPERTUX_BADGUY_BOMB_HPP -#include "badguy.hpp" -#include "object/portable.hpp" #include "audio/sound_source.hpp" +#include "badguy/badguy.hpp" +#include "object/portable.hpp" -class Bomb : public BadGuy, public Portable +class Bomb : public BadGuy, + public Portable { public: Bomb(const Vector& pos, Direction dir, std::string custom_sprite = "images/creatures/mr_bomb/bomb.sprite" ); - Bomb(const Bomb& bomb); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); HitResponse collision_player(Player& player, const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); @@ -50,6 +46,12 @@ private: MovingObject* grabber; std::auto_ptr ticking; + +private: + Bomb(const Bomb&); + Bomb& operator=(const Bomb&); }; #endif + +/* EOF */ diff --git a/src/badguy/bouncing_snowball.cpp b/src/badguy/bouncing_snowball.cpp index 37aefb426..2328841d4 100644 --- a/src/badguy/bouncing_snowball.cpp +++ b/src/badguy/bouncing_snowball.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,22 +12,18 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "bouncing_snowball.hpp" +#include "badguy/bouncing_snowball.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" static const float JUMPSPEED = -450; static const float WALKSPEED = 80; -BouncingSnowball::BouncingSnowball(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/bouncing_snowball/bouncing_snowball.sprite") +BouncingSnowball::BouncingSnowball(const Reader& reader) + : BadGuy(reader, "images/creatures/bouncing_snowball/bouncing_snowball.sprite") { } @@ -39,17 +33,6 @@ BouncingSnowball::BouncingSnowball(const Vector& pos, Direction d) } void -BouncingSnowball::write(lisp::Writer& writer) -{ - writer.start_list("bouncingsnowball"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - - writer.end_list("bouncingsnowball"); -} - -void BouncingSnowball::initialize() { physic.set_velocity_x(dir == LEFT ? -WALKSPEED : WALKSPEED); @@ -91,4 +74,6 @@ BouncingSnowball::collision_badguy(BadGuy& , const CollisionHit& hit) return CONTINUE; } -IMPLEMENT_FACTORY(BouncingSnowball, "bouncingsnowball") +IMPLEMENT_FACTORY(BouncingSnowball, "bouncingsnowball"); + +/* EOF */ diff --git a/src/badguy/bouncing_snowball.hpp b/src/badguy/bouncing_snowball.hpp index 933eb6508..e019793e6 100644 --- a/src/badguy/bouncing_snowball.hpp +++ b/src/badguy/bouncing_snowball.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,29 +12,27 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __BOUNCING_SNOWBALL_H__ -#define __BOUNCING_SNOWBALL_H__ +#ifndef HEADER_SUPERTUX_BADGUY_BOUNCING_SNOWBALL_HPP +#define HEADER_SUPERTUX_BADGUY_BOUNCING_SNOWBALL_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class BouncingSnowball : public BadGuy { public: - BouncingSnowball(const lisp::Lisp& reader); + BouncingSnowball(const Reader& reader); BouncingSnowball(const Vector& pos, Direction d); void initialize(); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); - virtual BouncingSnowball* clone() const { return new BouncingSnowball(*this); } - protected: bool collision_squished(GameObject& object); }; #endif + +/* EOF */ diff --git a/src/badguy/captainsnowball.cpp b/src/badguy/captainsnowball.cpp index 0c7907594..4eeaa137c 100644 --- a/src/badguy/captainsnowball.cpp +++ b/src/badguy/captainsnowball.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2008 Wolfgang Becker // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,25 +12,21 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "captainsnowball.hpp" +#include "badguy/captainsnowball.hpp" -#include "object_factory.hpp" -#include "sector.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" namespace{ static const float WALK_SPEED = 100; static const float BOARDING_SPEED = 200; } - -CaptainSnowball::CaptainSnowball(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/snowball/cpt-snowball.sprite", "left", "right") +CaptainSnowball::CaptainSnowball(const Reader& reader) + : WalkingBadguy(reader, "images/creatures/snowball/cpt-snowball.sprite", "left", "right") { walk_speed = BOARDING_SPEED; max_drop_height = -1; @@ -40,7 +34,7 @@ CaptainSnowball::CaptainSnowball(const lisp::Lisp& reader) } CaptainSnowball::CaptainSnowball(const Vector& pos, Direction d) - : WalkingBadguy(pos, d, "images/creatures/snowball/cpt-snowball.sprite", "left", "right") + : WalkingBadguy(pos, d, "images/creatures/snowball/cpt-snowball.sprite", "left", "right") { // Created during game eg. by dispencer. Board the enemy! walk_speed = BOARDING_SPEED; @@ -101,4 +95,6 @@ CaptainSnowball::collision_squished(GameObject& object) return true; } -IMPLEMENT_FACTORY(CaptainSnowball, "captainsnowball") +IMPLEMENT_FACTORY(CaptainSnowball, "captainsnowball"); + +/* EOF */ diff --git a/src/badguy/captainsnowball.hpp b/src/badguy/captainsnowball.hpp index 2a14c2771..e63708cb4 100644 --- a/src/badguy/captainsnowball.hpp +++ b/src/badguy/captainsnowball.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2008 Wolfgang Becker // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,21 +12,19 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __CAPTAINSNOWBALL_H__ -#define __CAPTAINSNOWBALL_H__ +#ifndef HEADER_SUPERTUX_BADGUY_CAPTAINSNOWBALL_HPP +#define HEADER_SUPERTUX_BADGUY_CAPTAINSNOWBALL_HPP -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" class CaptainSnowball : public WalkingBadguy { public: - CaptainSnowball(const lisp::Lisp& reader); + CaptainSnowball(const Reader& reader); CaptainSnowball(const Vector& pos, Direction d); - virtual CaptainSnowball* clone() const { return new CaptainSnowball(*this); } virtual void active_update(float elapsed_time); void collision_solid(const CollisionHit& hit); @@ -40,3 +36,5 @@ protected: }; #endif + +/* EOF */ diff --git a/src/badguy/crystallo.cpp b/src/badguy/crystallo.cpp index 4f0e69b52..57ae0334a 100644 --- a/src/badguy/crystallo.cpp +++ b/src/badguy/crystallo.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Crystallo // Copyright (C) 2008 Wolfgang Becker // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,19 +12,16 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "crystallo.hpp" +#include "badguy/crystallo.hpp" -#include "object_factory.hpp" -#include "lisp/lisp.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" -Crystallo::Crystallo(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/crystallo/crystallo.sprite", "left", "right") +Crystallo::Crystallo(const Reader& reader) : + WalkingBadguy(reader, "images/creatures/crystallo/crystallo.sprite", "left", "right"), + radius() { walk_speed = 80; max_drop_height = 16; @@ -34,8 +29,9 @@ Crystallo::Crystallo(const lisp::Lisp& reader) reader.get("radius", radius); } -Crystallo::Crystallo(const Vector& pos, Direction d) - : WalkingBadguy(pos, d, "images/creatures/crystallo/crystallo.sprite", "left", "right") +Crystallo::Crystallo(const Vector& pos, Direction d) : + WalkingBadguy(pos, d, "images/creatures/crystallo/crystallo.sprite", "left", "right"), + radius() { walk_speed = 80; max_drop_height = 16; @@ -66,4 +62,6 @@ Crystallo::collision_squished(GameObject& object) return true; } -IMPLEMENT_FACTORY(Crystallo, "crystallo") +IMPLEMENT_FACTORY(Crystallo, "crystallo"); + +/* EOF */ diff --git a/src/badguy/crystallo.hpp b/src/badguy/crystallo.hpp index ed32e1a05..14c6a0ce5 100644 --- a/src/badguy/crystallo.hpp +++ b/src/badguy/crystallo.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Crystallo // Copyright (C) 2008 Wolfgang Becker // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,13 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __CRYSTALLO_H__ -#define __CRSYTALLO_H__ +#ifndef HEADER_SUPERTUX_BADGUY_CRYSTALLO_HPP +#define HEADER_SUPERTUX_BADGUY_CRYSTALLO_HPP -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" /* * Basic badguy, patrols around a fixed position. @@ -28,11 +25,9 @@ class Crystallo : public WalkingBadguy { public: - Crystallo(const lisp::Lisp& reader); + Crystallo(const Reader& reader); Crystallo(const Vector& pos, Direction d); - virtual Crystallo* clone() const { return new Crystallo(*this); } - void active_update(float elapsed_time); protected: @@ -43,3 +38,5 @@ private: }; #endif + +/* EOF */ diff --git a/src/badguy/dart.cpp b/src/badguy/dart.cpp index 941a13fcd..1bba323ca 100644 --- a/src/badguy/dart.cpp +++ b/src/badguy/dart.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // Dart - Your average poison dart // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,28 +12,25 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "dart.hpp" +#include "badguy/dart.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "audio/sound_manager.hpp" #include "audio/sound_source.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" namespace { - const float SPEED = 200; +const float SPEED = 200; } static const std::string SOUNDFILE = "sounds/flame.wav"; -Dart::Dart(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/dart/dart.sprite"), parent(0) +Dart::Dart(const Reader& reader) : + BadGuy(reader, "images/creatures/dart/dart.sprite"), + parent(0), + sound_source() { physic.enable_gravity(false); countMe = false; @@ -44,8 +39,10 @@ Dart::Dart(const lisp::Lisp& reader) sound_manager->preload("sounds/stomp.wav"); } -Dart::Dart(const Vector& pos, Direction d, const BadGuy* parent = 0) - : BadGuy(pos, d, "images/creatures/dart/dart.sprite"), parent(parent) +Dart::Dart(const Vector& pos, Direction d, const BadGuy* parent = 0) : + BadGuy(pos, d, "images/creatures/dart/dart.sprite"), + parent(parent), + sound_source() { physic.enable_gravity(false); countMe = false; @@ -54,14 +51,6 @@ Dart::Dart(const Vector& pos, Direction d, const BadGuy* parent = 0) sound_manager->preload("sounds/stomp.wav"); } -Dart::Dart(const Dart& other) - : BadGuy(other), parent(other.parent) -{ - sound_manager->preload(SOUNDFILE); - sound_manager->preload("sounds/darthit.wav"); - sound_manager->preload("sounds/stomp.wav"); -} - Dart::~Dart() { } @@ -77,15 +66,6 @@ Dart::updatePointers(const GameObject* from_object, GameObject* to_object) } void -Dart::write(lisp::Writer& writer) -{ - writer.start_list("dart"); - writer.write("x", start_position.x); - writer.write("y", start_position.y); - writer.end_list("dart"); -} - -void Dart::initialize() { physic.set_velocity_x(dir == LEFT ? -::SPEED : ::SPEED); @@ -145,4 +125,6 @@ Dart::collision_player(Player& player, const CollisionHit& hit) return BadGuy::collision_player(player, hit); } -IMPLEMENT_FACTORY(Dart, "dart") +IMPLEMENT_FACTORY(Dart, "dart"); + +/* EOF */ diff --git a/src/badguy/dart.hpp b/src/badguy/dart.hpp index 369f84bff..a76c6675d 100644 --- a/src/badguy/dart.hpp +++ b/src/badguy/dart.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // Dart - Your average poison dart // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,14 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. +// along with this program. If not, see . -#ifndef __DART_H__ -#define __DART_H__ +#ifndef HEADER_SUPERTUX_BADGUY_DART_HPP +#define HEADER_SUPERTUX_BADGUY_DART_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class SoundSource; @@ -31,29 +27,31 @@ class SoundSource; class Dart : public BadGuy { public: - Dart(const lisp::Lisp& reader); + Dart(const Reader& reader); Dart(const Vector& pos, Direction d, const BadGuy* parent); - Dart(const Dart& dart); ~Dart(); void initialize(); void activate(); void deactivate(); - void write(lisp::Writer& writer); - + void active_update(float elapsed_time); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); HitResponse collision_player(Player& player, const CollisionHit& hit); - virtual Dart* clone() const { return new Dart(*this); } - virtual bool updatePointers(const GameObject* from_object, GameObject* to_object); protected: const BadGuy* parent; /**< collisions with this BadGuy will be ignored */ std::auto_ptr sound_source; /**< SoundSource for ambient sound */ + +private: + Dart(const Dart&); + Dart& operator=(const Dart&); }; #endif + +/* EOF */ diff --git a/src/badguy/darttrap.cpp b/src/badguy/darttrap.cpp index 8d78c97dd..3e66642ed 100644 --- a/src/badguy/darttrap.cpp +++ b/src/badguy/darttrap.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // DartTrap - Shoots a Dart at regular intervals // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,27 +12,27 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "darttrap.hpp" -#include "dart.hpp" +#include "badguy/dart.hpp" +#include "badguy/darttrap.hpp" -#include "object_factory.hpp" #include "audio/sound_manager.hpp" -#include "lisp/writer.hpp" -#include "sector.hpp" -#include "lisp/lisp.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" namespace { - const float MUZZLE_Y = 25; /**< [px] muzzle y-offset from top */ +const float MUZZLE_Y = 25; /**< [px] muzzle y-offset from top */ } -DartTrap::DartTrap(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/darttrap/darttrap.sprite", LAYER_TILES-1), initial_delay(0), fire_delay(2), ammo(-1), state(IDLE) +DartTrap::DartTrap(const Reader& reader) : + BadGuy(reader, "images/creatures/darttrap/darttrap.sprite", LAYER_TILES-1), + initial_delay(0), + fire_delay(2), + ammo(-1), + state(IDLE), + fire_timer() { reader.get("initial-delay", initial_delay); reader.get("fire-delay", fire_delay); @@ -48,18 +46,6 @@ DartTrap::DartTrap(const lisp::Lisp& reader) } void -DartTrap::write(lisp::Writer& writer) -{ - writer.start_list("darttrap"); - writer.write("x", start_position.x); - writer.write("y", start_position.y); - writer.write("initial-delay", initial_delay); - writer.write("fire-delay", fire_delay); - writer.write("ammo", ammo); - writer.end_list("darttrap"); -} - -void DartTrap::initialize() { sprite->set_action(dir == LEFT ? "idle-left" : "idle-right"); @@ -115,4 +101,6 @@ DartTrap::fire() sprite->set_action(dir == LEFT ? "idle-left" : "idle-right"); } -IMPLEMENT_FACTORY(DartTrap, "darttrap") +IMPLEMENT_FACTORY(DartTrap, "darttrap"); + +/* EOF */ diff --git a/src/badguy/darttrap.hpp b/src/badguy/darttrap.hpp index da187668b..c8d485f40 100644 --- a/src/badguy/darttrap.hpp +++ b/src/badguy/darttrap.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // DartTrap - Shoots a Dart at regular intervals // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,14 +12,10 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#ifndef __DARTTRAP_H__ -#define __DARTTRAP_H__ +// along with this program. If not, see . -#include "badguy.hpp" -#include "timer.hpp" +#ifndef HEADER_SUPERTUX_BADGUY_DARTTRAP_HPP +#define HEADER_SUPERTUX_BADGUY_DARTTRAP_HPP /** * Badguy "DartTrap" - Shoots a Dart at regular intervals @@ -29,16 +23,13 @@ class DartTrap : public BadGuy { public: - DartTrap(const lisp::Lisp& reader); + DartTrap(const Reader& reader); void initialize(); void activate(); - void write(lisp::Writer& writer); void active_update(float elapsed_time); HitResponse collision_player(Player& player, const CollisionHit& hit); - virtual DartTrap* clone() const { return new DartTrap(*this); } - protected: enum State { IDLE, LOADING @@ -47,6 +38,7 @@ protected: void load(); /**< load a shot */ void fire(); /**< fire a shot */ +private: float initial_delay; /**< time to wait before firing first shot */ float fire_delay; /**< reload time */ int ammo; /**< ammo left (-1 means unlimited) */ @@ -56,3 +48,5 @@ protected: }; #endif + +/* EOF */ diff --git a/src/badguy/dispenser.cpp b/src/badguy/dispenser.cpp index a82136a4b..2c3322b4e 100644 --- a/src/badguy/dispenser.cpp +++ b/src/badguy/dispenser.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,26 +12,28 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "dispenser.hpp" +#include "badguy/dispenser.hpp" -#include "object/bullet.hpp" -#include "random_generator.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "audio/sound_manager.hpp" -#include "sector.hpp" +#include "math/random_generator.hpp" +#include "object/bullet.hpp" #include "object/player.hpp" -#include "log.hpp" - -#include - -Dispenser::Dispenser(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/dispenser/dispenser.sprite") +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" + +Dispenser::Dispenser(const Reader& reader) : + BadGuy(reader, "images/creatures/dispenser/dispenser.sprite"), + cycle(), + badguys(), + next_badguy(), + dispense_timer(), + autotarget(), + swivel(), + broken(), + random(), + type() { set_colgroup_active(COLGROUP_MOVING_STATIC); sound_manager->preload("sounds/squish.wav"); @@ -69,41 +69,26 @@ Dispenser::Dispenser(const lisp::Lisp& reader) } void -Dispenser::write(lisp::Writer& writer) -{ - writer.start_list("dispenser"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - writer.write("cycle", cycle); - writer.write("random", random); - writer.write("type", type); - writer.write("badguy", badguys); - - writer.end_list("dispenser"); -} - -void Dispenser::activate() { - if( broken ){ - return; - } - if( autotarget && !swivel ){ // auto cannon sprite might be wrong - Player* player = this->get_nearest_player(); - if( player ){ - dir = (player->get_pos().x > get_pos().x) ? RIGHT : LEFT; - sprite->set_action(dir == LEFT ? "working-left" : "working-right"); - } - } - dispense_timer.start(cycle, true); - launch_badguy(); + if( broken ){ + return; + } + if( autotarget && !swivel ){ // auto cannon sprite might be wrong + Player* player = this->get_nearest_player(); + if( player ){ + dir = (player->get_pos().x > get_pos().x) ? RIGHT : LEFT; + sprite->set_action(dir == LEFT ? "working-left" : "working-right"); + } + } + dispense_timer.start(cycle, true); + launch_badguy(); } void Dispenser::deactivate() { - dispense_timer.stop(); + dispense_timer.stop(); } //TODO: Add launching velocity to certain badguys @@ -152,7 +137,6 @@ Dispenser::collision(GameObject& other, const CollisionHit& hit) return FORCE_MOVE; } - void Dispenser::active_update(float ) { @@ -255,4 +239,6 @@ Dispenser::is_freezable() const { return true; } -IMPLEMENT_FACTORY(Dispenser, "dispenser") +IMPLEMENT_FACTORY(Dispenser, "dispenser"); + +/* EOF */ diff --git a/src/badguy/dispenser.hpp b/src/badguy/dispenser.hpp index 106607806..a67a1de94 100644 --- a/src/badguy/dispenser.hpp +++ b/src/badguy/dispenser.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,35 +12,32 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __DISPENSER_H__ -#define __DISPENSER_H__ +#ifndef HEADER_SUPERTUX_BADGUY_DISPENSER_HPP +#define HEADER_SUPERTUX_BADGUY_DISPENSER_HPP -#include "badguy.hpp" -#include "timer.hpp" +#include "badguy/badguy.hpp" class Dispenser : public BadGuy { public: - Dispenser(const lisp::Lisp& reader); + Dispenser(const Reader& reader); void activate(); void deactivate(); - void write(lisp::Writer& writer); void active_update(float elapsed_time); void freeze(); void unfreeze(); bool is_freezable() const; - virtual Dispenser* clone() const { return new Dispenser(*this); } - protected: bool collision_squished(GameObject& object); HitResponse collision(GameObject& other, const CollisionHit& hit); void launch_badguy(); + +private: float cycle; std::vector badguys; unsigned int next_badguy; @@ -55,3 +50,5 @@ protected: }; #endif + +/* EOF */ diff --git a/src/badguy/fish.cpp b/src/badguy/fish.cpp index 86821a844..8ff95bbf7 100644 --- a/src/badguy/fish.cpp +++ b/src/badguy/fish.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,47 +12,34 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "fish.hpp" +#include "badguy/fish.hpp" -#include "tile.hpp" -#include "object/tilemap.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "sprite/sprite.hpp" -#include "log.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/tile.hpp" static const float FISH_JUMP_POWER = -600; static const float FISH_WAIT_TIME = 1; -Fish::Fish(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/fish/fish.sprite", LAYER_TILES-1), stop_y(0) +Fish::Fish(const Reader& reader) : + BadGuy(reader, "images/creatures/fish/fish.sprite", LAYER_TILES-1), + waiting(), + stop_y(0) { physic.enable_gravity(true); } -Fish::Fish(const Vector& pos) - : BadGuy(pos, "images/creatures/fish/fish.sprite", LAYER_TILES-1), stop_y(0) +Fish::Fish(const Vector& pos) : + BadGuy(pos, "images/creatures/fish/fish.sprite", LAYER_TILES-1), + waiting(), + stop_y(0) { physic.enable_gravity(true); } void -Fish::write(lisp::Writer& writer) -{ - writer.start_list("fish"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - - writer.end_list("fish"); -} - -void Fish::collision_solid(const CollisionHit& chit) { hit(chit); @@ -169,4 +154,6 @@ Fish::is_freezable() const return true; } -IMPLEMENT_FACTORY(Fish, "fish") +IMPLEMENT_FACTORY(Fish, "fish"); + +/* EOF */ diff --git a/src/badguy/fish.hpp b/src/badguy/fish.hpp index fa36dee97..eb58db426 100644 --- a/src/badguy/fish.hpp +++ b/src/badguy/fish.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,18 +12,17 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __FISH_H__ -#define __FISH_H__ +#ifndef HEADER_SUPERTUX_BADGUY_FISH_HPP +#define HEADER_SUPERTUX_BADGUY_FISH_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class Fish : public BadGuy { public: - Fish(const lisp::Lisp& ); + Fish(const Reader& ); Fish(const Vector& pos); void draw(DrawingContext& context); @@ -34,15 +31,12 @@ public: HitResponse collision_badguy(BadGuy& , const CollisionHit& ); void collision_tile(uint32_t tile_attributes); - void write(lisp::Writer& ); void active_update(float); void freeze(); void unfreeze(); bool is_freezable() const; - virtual Fish* clone() const { return new Fish(*this); } - private: HitResponse hit(const CollisionHit& ); void start_waiting(); @@ -53,3 +47,5 @@ private: }; #endif + +/* EOF */ diff --git a/src/badguy/flame.cpp b/src/badguy/flame.cpp index ae6b7900c..095616003 100644 --- a/src/badguy/flame.cpp +++ b/src/badguy/flame.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,25 +12,24 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "flame.hpp" +#include "badguy/flame.hpp" -#include "log.hpp" -#include "lisp/writer.hpp" -#include "lisp/lisp.hpp" -#include "object_factory.hpp" #include "audio/sound_manager.hpp" +#include "lisp/lisp.hpp" +#include "supertux/object_factory.hpp" #include static const std::string SOUNDFILE = "sounds/flame.wav"; -Flame::Flame(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/flame/flame.sprite", LAYER_FLOATINGOBJECTS), angle(0), radius(100), speed(2) +Flame::Flame(const Reader& reader) : + BadGuy(reader, "images/creatures/flame/flame.sprite", LAYER_FLOATINGOBJECTS), + angle(0), + radius(100), + speed(2), + sound_source() { reader.get("radius", radius); reader.get("speed", speed); @@ -45,19 +42,6 @@ Flame::Flame(const lisp::Lisp& reader) } void -Flame::write(lisp::Writer& writer) -{ - writer.start_list("flame"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - writer.write("radius", radius); - writer.write("speed", speed); - - writer.end_list("flame"); -} - -void Flame::active_update(float elapsed_time) { angle = fmodf(angle + elapsed_time * speed, (float) (2*M_PI)); @@ -90,4 +74,6 @@ Flame::kill_fall() { } -IMPLEMENT_FACTORY(Flame, "flame") +IMPLEMENT_FACTORY(Flame, "flame"); + +/* EOF */ diff --git a/src/badguy/flame.hpp b/src/badguy/flame.hpp index bfb0ed2b2..bc04b7e9c 100644 --- a/src/badguy/flame.hpp +++ b/src/badguy/flame.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,25 +12,24 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef __FLAME_H__ -#define __FLAME_H__ +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_BADGUY_FLAME_HPP +#define HEADER_SUPERTUX_BADGUY_FLAME_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" #include "audio/sound_source.hpp" class Flame : public BadGuy { public: - Flame(const lisp::Lisp& reader); + Flame(const Reader& reader); Flame(const Flame& flame); void activate(); void deactivate(); - void write(lisp::Writer& write); void active_update(float elapsed_time); void kill_fall(); @@ -45,3 +42,5 @@ private: }; #endif + +/* EOF */ diff --git a/src/badguy/flyingsnowball.cpp b/src/badguy/flyingsnowball.cpp index 7f74c3015..381305625 100644 --- a/src/badguy/flyingsnowball.cpp +++ b/src/badguy/flyingsnowball.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,50 +12,38 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include - -#include +// along with this program. If not, see . -#include "flyingsnowball.hpp" +#include "badguy/flyingsnowball.hpp" -#include "random_generator.hpp" +#include "math/random_generator.hpp" #include "object/sprite_particle.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" -#include "sector.hpp" +#include "object/player.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" namespace { - const float PUFF_INTERVAL_MIN = 4.0f; /**< spawn new puff of smoke at most that often */ - const float PUFF_INTERVAL_MAX = 8.0f; /**< spawn new puff of smoke at least that often */ +const float PUFF_INTERVAL_MIN = 4.0f; /**< spawn new puff of smoke at most that often */ +const float PUFF_INTERVAL_MAX = 8.0f; /**< spawn new puff of smoke at least that often */ } -FlyingSnowBall::FlyingSnowBall(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/flying_snowball/flying_snowball.sprite") +FlyingSnowBall::FlyingSnowBall(const Reader& reader) : + BadGuy(reader, "images/creatures/flying_snowball/flying_snowball.sprite"), + normal_propeller_speed(), + puff_timer() { physic.enable_gravity(true); } -FlyingSnowBall::FlyingSnowBall(const Vector& pos) - : BadGuy(pos, "images/creatures/flying_snowball/flying_snowball.sprite") +FlyingSnowBall::FlyingSnowBall(const Vector& pos) : + BadGuy(pos, "images/creatures/flying_snowball/flying_snowball.sprite"), + normal_propeller_speed(), + puff_timer() { physic.enable_gravity(true); } void -FlyingSnowBall::write(lisp::Writer& writer) -{ - writer.start_list("flyingsnowball"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - - writer.end_list("flyingsnowball"); -} - -void FlyingSnowBall::initialize() { sprite->set_action(dir == LEFT ? "left" : "right"); @@ -92,7 +78,7 @@ void FlyingSnowBall::active_update(float elapsed_time) { - const float grav = physic.get_gravity()*100; + const float grav = Sector::current()->get_gravity() * 100.0f; if (get_pos().y > start_position.y + 2*32) { // Flying too low - increased propeller speed @@ -105,7 +91,7 @@ FlyingSnowBall::active_update(float elapsed_time) // Flying too high - decreased propeller speed physic.set_acceleration_y(-grav*0.8); - physic.set_velocity_y(physic.get_velocity_y() * 0.99); + physic.set_velocity_y(physic.get_velocity_y() * 0.99f); } else { @@ -135,4 +121,6 @@ FlyingSnowBall::active_update(float elapsed_time) } } -IMPLEMENT_FACTORY(FlyingSnowBall, "flyingsnowball") +IMPLEMENT_FACTORY(FlyingSnowBall, "flyingsnowball"); + +/* EOF */ diff --git a/src/badguy/flyingsnowball.hpp b/src/badguy/flyingsnowball.hpp index d82740ffd..28ef8dba7 100644 --- a/src/badguy/flyingsnowball.hpp +++ b/src/badguy/flyingsnowball.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,28 +12,24 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __FLYINGSNOWBALL_H__ -#define __FLYINGSNOWBALL_H__ +#ifndef HEADER_SUPERTUX_BADGUY_FLYINGSNOWBALL_HPP +#define HEADER_SUPERTUX_BADGUY_FLYINGSNOWBALL_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class FlyingSnowBall : public BadGuy { public: - FlyingSnowBall(const lisp::Lisp& reader); + FlyingSnowBall(const Reader& reader); FlyingSnowBall(const Vector& pos); void initialize(); void activate(); - void write(lisp::Writer& writer); void active_update(float elapsed_time); void collision_solid(const CollisionHit& hit); - virtual FlyingSnowBall* clone() const { return new FlyingSnowBall(*this); } - protected: bool collision_squished(GameObject& object); private: @@ -44,3 +38,5 @@ private: }; #endif + +/* EOF */ diff --git a/src/badguy/ghosttree.cpp b/src/badguy/ghosttree.cpp index c00538ea9..cc8e492cf 100644 --- a/src/badguy/ghosttree.cpp +++ b/src/badguy/ghosttree.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Boss "GhostTree" // Copyright (C) 2007 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,26 +12,23 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#include +// along with this program. If not, see . -#include "ghosttree.hpp" +#include "badguy/ghosttree.hpp" -#include "treewillowisp.hpp" -#include "sprite/sprite_manager.hpp" -#include "sprite/sprite.hpp" -#include "root.hpp" -#include "random_generator.hpp" -#include "object/lantern.hpp" -#include "object_factory.hpp" #include "audio/sound_manager.hpp" -#include "sector.hpp" +#include "badguy/root.hpp" +#include "badguy/treewillowisp.hpp" +#include "math/random_generator.hpp" +#include "object/lantern.hpp" #include "object/player.hpp" -#include "video/drawing_context.hpp" +#include "sprite/sprite.hpp" +#include "sprite/sprite_manager.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" -#include #include +#include static const size_t WILLOWISP_COUNT = 10; static const float ROOT_TOP_OFFSET = 64; @@ -41,13 +36,24 @@ static const float WILLOWISP_TOP_OFFSET = -64; static const Vector SUCK_TARGET_OFFSET = Vector(-16,-16); static const float SUCK_TARGET_SPREAD = 8; -GhostTree::GhostTree(const lisp::Lisp& lisp) - : BadGuy(lisp, "images/creatures/ghosttree/ghosttree.sprite", - LAYER_OBJECTS - 10), mystate(STATE_IDLE), - willo_spawn_y(0), willo_radius(200), willo_speed(1.8f), willo_color(0), - treecolor(0), suck_lantern(0) +GhostTree::GhostTree(const Reader& lisp) : + BadGuy(lisp, "images/creatures/ghosttree/ghosttree.sprite", LAYER_OBJECTS - 10), + mystate(STATE_IDLE), + willowisp_timer(), + willo_spawn_y(0), + willo_radius(200), + willo_speed(1.8f), + willo_color(0), + glow_sprite(), + colorchange_timer(), + suck_timer(), + root_timer(), + treecolor(0), + suck_lantern_color(), + suck_lantern(0), + willowisps() { - glow_sprite.reset(sprite_manager->create("images/creatures/ghosttree/ghosttree-glow.sprite")); + glow_sprite = sprite_manager->create("images/creatures/ghosttree/ghosttree-glow.sprite"); set_colgroup_active(COLGROUP_TOUCHABLE); sound_manager->preload("sounds/tree_howling.ogg"); sound_manager->preload("sounds/tree_suck.ogg"); @@ -120,7 +126,7 @@ GhostTree::active_update(float elapsed_time) if(willowisps.size() < WILLOWISP_COUNT) { Vector pos = Vector(bbox.get_width() / 2, bbox.get_height() / 2 + willo_spawn_y + WILLOWISP_TOP_OFFSET); TreeWillOWisp *willowisp - = new TreeWillOWisp(this, pos, 200 + willo_radius, willo_speed); + = new TreeWillOWisp(this, pos, 200 + willo_radius, willo_speed); Sector::current()->add_object(willowisp); willowisps.push_back(willowisp); @@ -265,3 +271,4 @@ GhostTree::spawn_lantern() { IMPLEMENT_FACTORY(GhostTree, "ghosttree"); +/* EOF */ diff --git a/src/badguy/ghosttree.hpp b/src/badguy/ghosttree.hpp index 7e57d5c19..a139554e1 100644 --- a/src/badguy/ghosttree.hpp +++ b/src/badguy/ghosttree.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Boss "GhostTree" // Copyright (C) 2007 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,13 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef __GHOSTTREE_H__ -#define __GHOSTTREE_H__ +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_BADGUY_GHOSTTREE_HPP +#define HEADER_SUPERTUX_BADGUY_GHOSTTREE_HPP -#include -#include "badguy.hpp" +#include "badguy/badguy.hpp" class TreeWillOWisp; class Lantern; @@ -28,7 +25,7 @@ class Lantern; class GhostTree : public BadGuy { public: - GhostTree(const lisp::Lisp& lisp); + GhostTree(const Reader& lisp); ~GhostTree(); virtual bool is_flammable() const { return false; } @@ -69,7 +66,12 @@ private: bool is_color_deadly(Color color) const; void spawn_lantern(); + +private: + GhostTree(const GhostTree&); + GhostTree& operator=(const GhostTree&); }; #endif +/* EOF */ diff --git a/src/badguy/igel.cpp b/src/badguy/igel.cpp index cd37105af..382aff4c7 100644 --- a/src/badguy/igel.cpp +++ b/src/badguy/igel.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Badguy "Igel" // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,48 +12,39 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "igel.hpp" -#include "object/block.hpp" -#include "sector.hpp" +#include "badguy/igel.hpp" #include "object/bullet.hpp" +#include "supertux/sector.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" +#include "supertux/object_factory.hpp" namespace { - const float WALKSPEED = 80; /**< speed at which we walk around */ - const float TURN_RECOVER_TIME = 0.5; /**< seconds before we will again turn around when shot at */ - const float RANGE_OF_VISION = 256; /**< range in px at which we can see bullets */ -} -Igel::Igel(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/igel/igel.sprite", "walking-left", "walking-right") +const float WALKSPEED = 80; /**< speed at which we walk around */ +const float TURN_RECOVER_TIME = 0.5; /**< seconds before we will again turn around when shot at */ +const float RANGE_OF_VISION = 256; /**< range in px at which we can see bullets */ + +} // namespace + +Igel::Igel(const Reader& reader) : + WalkingBadguy(reader, "images/creatures/igel/igel.sprite", "walking-left", "walking-right"), + turn_recover_timer() { walk_speed = WALKSPEED; max_drop_height = 16; } -Igel::Igel(const Vector& pos, Direction d) - : WalkingBadguy(pos, d, "images/creatures/igel/igel.sprite", "walking-left", "walking-right") +Igel::Igel(const Vector& pos, Direction d) : + WalkingBadguy(pos, d, "images/creatures/igel/igel.sprite", "walking-left", "walking-right"), + turn_recover_timer() { walk_speed = WALKSPEED; max_drop_height = 16; } void -Igel::write(lisp::Writer& writer) -{ - writer.start_list("igel"); - WalkingBadguy::write(writer); - writer.end_list("igel"); -} - -void Igel::be_normal() { initialize(); @@ -127,4 +116,6 @@ Igel::collision_squished(GameObject& ) return false; } -IMPLEMENT_FACTORY(Igel, "igel") +IMPLEMENT_FACTORY(Igel, "igel"); + +/* EOF */ diff --git a/src/badguy/igel.hpp b/src/badguy/igel.hpp index 4d2b82f79..c63d76675 100644 --- a/src/badguy/igel.hpp +++ b/src/badguy/igel.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Badguy "Igel" // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,14 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __IGEL_H__ -#define __IGEL_H__ +#ifndef HEADER_SUPERTUX_BADGUY_IGEL_HPP +#define HEADER_SUPERTUX_BADGUY_IGEL_HPP -#include "walking_badguy.hpp" -#include "moving_object.hpp" +#include "badguy/walking_badguy.hpp" /** * Badguy "Igel" - a hedgehog that can absorb bullets @@ -29,16 +25,13 @@ class Igel : public WalkingBadguy { public: - Igel(const lisp::Lisp& reader); + Igel(const Reader& reader); Igel(const Vector& pos, Direction d); - void write(lisp::Writer& writer); HitResponse collision_bullet(Bullet& bullet, const CollisionHit& hit); void active_update(float elapsed_time); - virtual Igel* clone() const { return new Igel(*this); } - protected: bool collision_squished(GameObject& object); void be_normal(); /**< switch to state STATE_NORMAL */ @@ -51,3 +44,5 @@ private: }; #endif + +/* EOF */ diff --git a/src/badguy/jumpy.cpp b/src/badguy/jumpy.cpp index 8666ea5c2..ad63c49a2 100644 --- a/src/badguy/jumpy.cpp +++ b/src/badguy/jumpy.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,41 +12,28 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "jumpy.hpp" +#include "badguy/jumpy.hpp" -#include "lisp/writer.hpp" -#include "sprite/sprite.hpp" -#include "object_factory.hpp" #include "object/player.hpp" +#include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" static const float JUMPSPEED=-600; static const float JUMPY_MID_TOLERANCE=4; static const float JUMPY_LOW_TOLERANCE=2; -Jumpy::Jumpy(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/snowjumpy/snowjumpy.sprite"), groundhit_pos_set(false) +Jumpy::Jumpy(const Reader& reader) : + BadGuy(reader, "images/creatures/snowjumpy/snowjumpy.sprite"), + pos_groundhit(), + groundhit_pos_set(false) { // TODO create a nice sound for this... //sound_manager->preload("sounds/skid.wav"); } void -Jumpy::write(lisp::Writer& writer) -{ - writer.start_list("jumpy"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - - writer.end_list("jumpy"); -} - -void Jumpy::collision_solid(const CollisionHit& chit) { hit(chit); @@ -103,7 +88,7 @@ Jumpy::active_update(float elapsed_time) if ( get_pos().y < (pos_groundhit.y - JUMPY_MID_TOLERANCE ) ) sprite->set_action(dir == LEFT ? "left-up" : "right-up"); else if ( get_pos().y >= (pos_groundhit.y - JUMPY_MID_TOLERANCE) && - get_pos().y < (pos_groundhit.y - JUMPY_LOW_TOLERANCE) ) + get_pos().y < (pos_groundhit.y - JUMPY_LOW_TOLERANCE) ) sprite->set_action(dir == LEFT ? "left-middle" : "right-middle"); else sprite->set_action(dir == LEFT ? "left-down" : "right-down"); @@ -123,4 +108,6 @@ Jumpy::is_freezable() const return true; } -IMPLEMENT_FACTORY(Jumpy, "jumpy") +IMPLEMENT_FACTORY(Jumpy, "jumpy"); + +/* EOF */ diff --git a/src/badguy/jumpy.hpp b/src/badguy/jumpy.hpp index b0f9e3ebd..5a74b6650 100644 --- a/src/badguy/jumpy.hpp +++ b/src/badguy/jumpy.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,34 +12,34 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __JUMPY_H__ -#define __JUMPY_H__ +#ifndef HEADER_SUPERTUX_BADGUY_JUMPY_HPP +#define HEADER_SUPERTUX_BADGUY_JUMPY_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class Jumpy : public BadGuy { public: - Jumpy(const lisp::Lisp& reader); + Jumpy(const Reader& reader); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& other, const CollisionHit& hit); - void write(lisp::Writer& writer); void active_update(float); void freeze(); bool is_freezable() const; - virtual Jumpy* clone() const { return new Jumpy(*this); } - private: HitResponse hit(const CollisionHit& hit); + +private: Vector pos_groundhit; bool groundhit_pos_set; }; #endif + +/* EOF */ diff --git a/src/badguy/kamikazesnowball.cpp b/src/badguy/kamikazesnowball.cpp index 643d25290..46ea369e4 100644 --- a/src/badguy/kamikazesnowball.cpp +++ b/src/badguy/kamikazesnowball.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2008 Wolfgang Becker // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,16 +12,13 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "kamikazesnowball.hpp" +#include "badguy/kamikazesnowball.hpp" -#include "object_factory.hpp" #include "audio/sound_manager.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" /* * Kamikaze Snowball will fly in one direction until he hits something. @@ -34,8 +29,8 @@ namespace{ const std::string SPLAT_SOUND = "sounds/splat.wav"; } -KamikazeSnowball::KamikazeSnowball(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/snowball/kamikaze-snowball.sprite") +KamikazeSnowball::KamikazeSnowball(const Reader& reader) : + BadGuy(reader, "images/creatures/snowball/kamikaze-snowball.sprite") { sound_manager->preload(SPLAT_SOUND); } @@ -75,14 +70,14 @@ KamikazeSnowball::collision_solid(const CollisionHit& hit) void KamikazeSnowball::kill_collision() { - sprite->set_action(dir == LEFT ? "collision-left" : "collision-right"); - sound_manager->play(SPLAT_SOUND, get_pos()); - physic.set_velocity_x(0); - physic.set_velocity_y(0); - physic.enable_gravity(true); - set_state(STATE_FALLING); + sprite->set_action(dir == LEFT ? "collision-left" : "collision-right"); + sound_manager->play(SPLAT_SOUND, get_pos()); + physic.set_velocity_x(0); + physic.set_velocity_y(0); + physic.enable_gravity(true); + set_state(STATE_FALLING); - run_dead_script(); + run_dead_script(); } HitResponse @@ -96,5 +91,6 @@ KamikazeSnowball::collision_player(Player& player, const CollisionHit& hit) return response; } +IMPLEMENT_FACTORY(KamikazeSnowball, "kamikazesnowball"); -IMPLEMENT_FACTORY(KamikazeSnowball, "kamikazesnowball") +/* EOF */ diff --git a/src/badguy/kamikazesnowball.hpp b/src/badguy/kamikazesnowball.hpp index 04854b8d4..07e6d4584 100644 --- a/src/badguy/kamikazesnowball.hpp +++ b/src/badguy/kamikazesnowball.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2008 Wolfgang Becker // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,25 +12,22 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __KAMIKAZESNOWBALL_H__ -#define __KAMIKAZESNOWBALL_H__ +#ifndef HEADER_SUPERTUX_BADGUY_KAMIKAZESNOWBALL_HPP +#define HEADER_SUPERTUX_BADGUY_KAMIKAZESNOWBALL_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class KamikazeSnowball : public BadGuy { public: - KamikazeSnowball(const lisp::Lisp& reader); + KamikazeSnowball(const Reader& reader); KamikazeSnowball(const Vector& pos, Direction d); void initialize(); void collision_solid(const CollisionHit& hit); - virtual KamikazeSnowball* clone() const { return new KamikazeSnowball(*this); } - protected: bool collision_squished(GameObject& object); HitResponse collision_player(Player& player, const CollisionHit& hit); @@ -40,3 +35,5 @@ protected: }; #endif + +/* EOF */ diff --git a/src/badguy/kugelblitz.cpp b/src/badguy/kugelblitz.cpp index 8065639b5..5a94bac89 100644 --- a/src/badguy/kugelblitz.cpp +++ b/src/badguy/kugelblitz.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,21 +12,15 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "kugelblitz.hpp" -#include "object/tilemap.hpp" +#include "badguy/kugelblitz.hpp" +#include "math/random_generator.hpp" #include "object/camera.hpp" -#include "tile.hpp" -#include "random_generator.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "object/player.hpp" -#include "sector.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" #define LIFETIME 5 #define MOVETIME 0.75 @@ -38,8 +30,15 @@ static const float X_OFFSCREEN_DISTANCE = 1600; static const float Y_OFFSCREEN_DISTANCE = 1200; -Kugelblitz::Kugelblitz(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/kugelblitz/kugelblitz.sprite"), groundhit_pos_set(false) +Kugelblitz::Kugelblitz(const Reader& reader) : + BadGuy(reader, "images/creatures/kugelblitz/kugelblitz.sprite"), + pos_groundhit(), + groundhit_pos_set(false), + dying(), + movement_timer(), + lifetime(), + direction(), + state() { reader.get("x", start_position.x); sprite->set_action("falling"); @@ -48,16 +47,6 @@ Kugelblitz::Kugelblitz(const lisp::Lisp& reader) } void -Kugelblitz::write(lisp::Writer& writer) -{ - writer.start_list("kugelblitz"); - - writer.write("x", start_position.x); - - writer.end_list("kugelblitz"); -} - -void Kugelblitz::initialize() { physic.set_velocity_y(300); @@ -81,11 +70,11 @@ Kugelblitz::collision_player(Player& player, const CollisionHit& ) } // hit from above? if(player.get_movement().y - get_movement().y > 0 && player.get_bbox().p2.y < - (get_bbox().p1.y + get_bbox().p2.y) / 2) { + (get_bbox().p1.y + get_bbox().p2.y) / 2) { // if it's not is it possible to squish us, then this will hurt if(!collision_squished(player)) player.kill(false); - explode(); + explode(); return FORCE_MOVE; } player.kill(false); @@ -144,16 +133,16 @@ Kugelblitz::active_update(float elapsed_time) } } /* - if (Sector::current()->solids->get_tile_at(get_pos())->getAttributes() == 16) { + if (Sector::current()->solids->get_tile_at(get_pos())->getAttributes() == 16) { //HIT WATER Sector::current()->add_object(new Electrifier(75,1421,1.5)); Sector::current()->add_object(new Electrifier(76,1422,1.5)); explode(); - } - if (Sector::current()->solids->get_tile_at(get_pos())->getAttributes() == 48) { + } + if (Sector::current()->solids->get_tile_at(get_pos())->getAttributes() == 48) { //HIT ELECTRIFIED WATER explode(); - } + } */ } BadGuy::active_update(elapsed_time); @@ -193,30 +182,32 @@ Kugelblitz::try_activate() set_state(STATE_ACTIVE); activate(); } else if (start_position.x > scroll_x && - start_position.x < scroll_x + X_OFFSCREEN_DISTANCE && - start_position.y > scroll_y - Y_OFFSCREEN_DISTANCE && - start_position.y < scroll_y + Y_OFFSCREEN_DISTANCE) { + start_position.x < scroll_x + X_OFFSCREEN_DISTANCE && + start_position.y > scroll_y - Y_OFFSCREEN_DISTANCE && + start_position.y < scroll_y + Y_OFFSCREEN_DISTANCE) { dir = LEFT; set_state(STATE_ACTIVE); activate(); } else if (start_position.x > scroll_x - X_OFFSCREEN_DISTANCE && - start_position.x < scroll_x + X_OFFSCREEN_DISTANCE && - ((start_position.y > scroll_y && - start_position.y < scroll_y + Y_OFFSCREEN_DISTANCE) || - (start_position.y > scroll_y - Y_OFFSCREEN_DISTANCE && - start_position.y < scroll_y))) { + start_position.x < scroll_x + X_OFFSCREEN_DISTANCE && + ((start_position.y > scroll_y && + start_position.y < scroll_y + Y_OFFSCREEN_DISTANCE) || + (start_position.y > scroll_y - Y_OFFSCREEN_DISTANCE && + start_position.y < scroll_y))) { dir = start_position.x < scroll_x ? RIGHT : LEFT; set_state(STATE_ACTIVE); activate(); } else if(state == STATE_INIT - && start_position.x > scroll_x - X_OFFSCREEN_DISTANCE - && start_position.x < scroll_x + X_OFFSCREEN_DISTANCE - && start_position.y > scroll_y - Y_OFFSCREEN_DISTANCE - && start_position.y < scroll_y + Y_OFFSCREEN_DISTANCE) { + && start_position.x > scroll_x - X_OFFSCREEN_DISTANCE + && start_position.x < scroll_x + X_OFFSCREEN_DISTANCE + && start_position.y > scroll_y - Y_OFFSCREEN_DISTANCE + && start_position.y < scroll_y + Y_OFFSCREEN_DISTANCE) { dir = LEFT; set_state(STATE_ACTIVE); activate(); } } -IMPLEMENT_FACTORY(Kugelblitz, "kugelblitz") +IMPLEMENT_FACTORY(Kugelblitz, "kugelblitz"); + +/* EOF */ diff --git a/src/badguy/kugelblitz.hpp b/src/badguy/kugelblitz.hpp index b16999769..32c479df7 100644 --- a/src/badguy/kugelblitz.hpp +++ b/src/badguy/kugelblitz.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,36 +12,32 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __KUGELBLITZ_H__ -#define __KUGELBLITZ_H__ +#ifndef HEADER_SUPERTUX_BADGUY_KUGELBLITZ_HPP +#define HEADER_SUPERTUX_BADGUY_KUGELBLITZ_HPP -#include "badguy.hpp" -#include "timer.hpp" -#include "object/electrifier.hpp" +#include "badguy/badguy.hpp" class Kugelblitz : public BadGuy { public: - Kugelblitz(const lisp::Lisp& reader); + Kugelblitz(const Reader& reader); void initialize(); HitResponse collision_badguy(BadGuy& other, const CollisionHit& hit); void collision_solid(const CollisionHit& hit); HitResponse collision_player(Player& player, const CollisionHit& hit); - void write(lisp::Writer& writer); void active_update(float); void kill_fall(); void explode(); - virtual Kugelblitz* clone() const { return new Kugelblitz(*this); } - private: void try_activate(); HitResponse hit(const CollisionHit& hit); + +private: Vector pos_groundhit; bool groundhit_pos_set; bool dying; @@ -54,3 +48,5 @@ private: }; #endif + +/* EOF */ diff --git a/src/badguy/mole.cpp b/src/badguy/mole.cpp index 6a14b0f68..1391d2a80 100644 --- a/src/badguy/mole.cpp +++ b/src/badguy/mole.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Mole Badguy // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,23 +12,15 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include - -#include "mole.hpp" -#include "mole_rock.hpp" -#include "tile.hpp" -#include "object/tilemap.hpp" -#include "random_generator.hpp" -#include "log.hpp" -#include "level.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" +// along with this program. If not, see . + #include "audio/sound_manager.hpp" -#include "sector.hpp" +#include "badguy/mole.hpp" +#include "badguy/mole_rock.hpp" +#include "math/random_generator.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" #include @@ -39,8 +29,11 @@ static const float THROW_TIME = 4.6f; /**< time to spend throwing */ static const float THROW_INTERVAL = 1; /**< time between two thrown rocks */ static const float THROW_VELOCITY = 400; /**< initial velocity of thrown rocks */ -Mole::Mole(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/mole/mole.sprite", LAYER_TILES-1), state(PRE_THROWING) +Mole::Mole(const Reader& reader) : + BadGuy(reader, "images/creatures/mole/mole.sprite", LAYER_TILES-1), + state(PRE_THROWING), + timer(), + throw_timer() { physic.enable_gravity(false); sound_manager->preload("sounds/fall.wav"); @@ -48,8 +41,11 @@ Mole::Mole(const lisp::Lisp& reader) sound_manager->preload("sounds/dartfire.wav"); } -Mole::Mole(const Vector& pos) - : BadGuy(pos, "images/creatures/mole/mole.sprite", LAYER_TILES-1), state(PRE_THROWING) +Mole::Mole(const Vector& pos) : + BadGuy(pos, "images/creatures/mole/mole.sprite", LAYER_TILES-1), + state(PRE_THROWING), + timer(), + throw_timer() { physic.enable_gravity(false); sound_manager->preload("sounds/fall.wav"); @@ -58,15 +54,6 @@ Mole::Mole(const Vector& pos) } void -Mole::write(lisp::Writer& writer) -{ - writer.start_list("mole"); - writer.write("x", start_position.x); - writer.write("y", start_position.y); - writer.end_list("mole"); -} - -void Mole::activate() { if (state != DEAD) set_state(PRE_THROWING); @@ -178,4 +165,6 @@ Mole::set_state(MoleState new_state) state = new_state; } -IMPLEMENT_FACTORY(Mole, "mole") +IMPLEMENT_FACTORY(Mole, "mole"); + +/* EOF */ diff --git a/src/badguy/mole.hpp b/src/badguy/mole.hpp index 2a1fa0f39..a6e62c4e7 100644 --- a/src/badguy/mole.hpp +++ b/src/badguy/mole.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Mole Badguy // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,18 +12,17 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __MOLE_H__ -#define __MOLE_H__ +#ifndef HEADER_SUPERTUX_BADGUY_MOLE_HPP +#define HEADER_SUPERTUX_BADGUY_MOLE_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class Mole : public BadGuy { public: - Mole(const lisp::Lisp& ); + Mole(const Reader& ); Mole(const Vector& pos); void kill_fall(); @@ -33,11 +30,8 @@ public: bool collision_squished(GameObject& object); void activate(); - void write(lisp::Writer& ); void active_update(float); - virtual Mole* clone() const { return new Mole(*this); } - private: enum MoleState { PRE_THROWING, @@ -47,13 +41,16 @@ private: DEAD }; - MoleState state; - Timer timer; - Timer throw_timer; - +private: void set_state(MoleState new_state); void throw_rock(); +private: + MoleState state; + Timer timer; + Timer throw_timer; }; #endif + +/* EOF */ diff --git a/src/badguy/mole_rock.cpp b/src/badguy/mole_rock.cpp index 1c05ef0d2..efe5e00b3 100644 --- a/src/badguy/mole_rock.cpp +++ b/src/badguy/mole_rock.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // MoleRock - Rock thrown by "Mole" Badguy // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,21 +12,16 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "mole_rock.hpp" +#include "badguy/mole_rock.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "audio/sound_manager.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" -MoleRock::MoleRock(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/mole/mole_rock.sprite", LAYER_TILES - 2), parent(0), initial_velocity(Vector(0, -400)) +MoleRock::MoleRock(const Reader& reader) + : BadGuy(reader, "images/creatures/mole/mole_rock.sprite", LAYER_TILES - 2), parent(0), initial_velocity(Vector(0, -400)) { physic.enable_gravity(true); countMe = false; @@ -36,8 +29,10 @@ MoleRock::MoleRock(const lisp::Lisp& reader) sound_manager->preload("sounds/stomp.wav"); } -MoleRock::MoleRock(const Vector& pos, const Vector& velocity, const BadGuy* parent = 0) - : BadGuy(pos, LEFT, "images/creatures/mole/mole_rock.sprite", LAYER_TILES - 2), parent(parent), initial_velocity(velocity) +MoleRock::MoleRock(const Vector& pos, const Vector& velocity, const BadGuy* parent = 0) : + BadGuy(pos, LEFT, "images/creatures/mole/mole_rock.sprite", LAYER_TILES - 2), + parent(parent), + initial_velocity(velocity) { physic.enable_gravity(true); countMe = false; @@ -45,13 +40,6 @@ MoleRock::MoleRock(const Vector& pos, const Vector& velocity, const BadGuy* pare sound_manager->preload("sounds/stomp.wav"); } -MoleRock::MoleRock(const MoleRock& other) - : BadGuy(other), parent(other.parent), initial_velocity(Vector(0, -400)) -{ - sound_manager->preload("sounds/darthit.wav"); - sound_manager->preload("sounds/stomp.wav"); -} - MoleRock::~MoleRock() { } @@ -67,15 +55,6 @@ MoleRock::updatePointers(const GameObject* from_object, GameObject* to_object) } void -MoleRock::write(lisp::Writer& writer) -{ - writer.start_list("mole_rock"); - writer.write("x", start_position.x); - writer.write("y", start_position.y); - writer.end_list("mole_rock"); -} - -void MoleRock::initialize() { physic.set_velocity(initial_velocity); @@ -122,4 +101,6 @@ MoleRock::collision_player(Player& player, const CollisionHit& hit) return BadGuy::collision_player(player, hit); } -IMPLEMENT_FACTORY(MoleRock, "mole_rock") +IMPLEMENT_FACTORY(MoleRock, "mole_rock"); + +/* EOF */ diff --git a/src/badguy/mole_rock.hpp b/src/badguy/mole_rock.hpp index f5bb95b64..4c6e02bf5 100644 --- a/src/badguy/mole_rock.hpp +++ b/src/badguy/mole_rock.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // MoleRock - Rock thrown by "Mole" Badguy // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,14 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. +// along with this program. If not, see . -#ifndef __MOLE_ROCK_H__ -#define __MOLE_ROCK_H__ +#ifndef HEADER_SUPERTUX_BADGUY_MOLE_ROCK_HPP +#define HEADER_SUPERTUX_BADGUY_MOLE_ROCK_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" /** * Badguy "MoleRock" - Rock thrown by "Mole" Badguy @@ -29,14 +25,12 @@ class MoleRock : public BadGuy { public: - MoleRock(const lisp::Lisp& reader); + MoleRock(const Reader& reader); MoleRock(const Vector& pos, const Vector& velocity, const BadGuy* parent); - MoleRock(const MoleRock& mole_rock); ~MoleRock(); void initialize(); void deactivate(); - void write(lisp::Writer& writer); void active_update(float elapsed_time); @@ -44,13 +38,17 @@ public: HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); HitResponse collision_player(Player& player, const CollisionHit& hit); - virtual MoleRock* clone() const { return new MoleRock(*this); } - virtual bool updatePointers(const GameObject* from_object, GameObject* to_object); protected: const BadGuy* parent; /**< collisions with this BadGuy will be ignored */ const Vector initial_velocity; /**< velocity at time of creation */ + +private: + MoleRock(const MoleRock&); + MoleRock& operator=(const MoleRock&); }; #endif + +/* EOF */ diff --git a/src/badguy/mrbomb.cpp b/src/badguy/mrbomb.cpp index 4b6e5e9b0..2e8a4531e 100644 --- a/src/badguy/mrbomb.cpp +++ b/src/badguy/mrbomb.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,24 +12,20 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "mrbomb.hpp" -#include "bomb.hpp" -#include "object/explosion.hpp" -#include "sprite/sprite_manager.hpp" #include "audio/sound_manager.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" -#include "sector.hpp" -#include "lisp/lisp.hpp" +#include "badguy/bomb.hpp" +#include "badguy/mrbomb.hpp" +#include "object/explosion.hpp" #include "sprite/sprite.hpp" +#include "sprite/sprite_manager.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" -MrBomb::MrBomb(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/mr_bomb/mr_bomb.sprite", "left", "right") +MrBomb::MrBomb(const Reader& reader) : + WalkingBadguy(reader, "images/creatures/mr_bomb/mr_bomb.sprite", "left", "right"), + grabbed() { walk_speed = 80; max_drop_height = 16; @@ -53,8 +47,9 @@ MrBomb::MrBomb(const lisp::Lisp& reader) } /* MrBomb created by a dispenser always gets default sprite atm.*/ -MrBomb::MrBomb(const Vector& pos, Direction d) - : WalkingBadguy(pos, d, "images/creatures/mr_bomb/mr_bomb.sprite", "left", "right") +MrBomb::MrBomb(const Vector& pos, Direction d) : + WalkingBadguy(pos, d, "images/creatures/mr_bomb/mr_bomb.sprite", "left", "right"), + grabbed() { walk_speed = 80; max_drop_height = 16; @@ -62,14 +57,6 @@ MrBomb::MrBomb(const Vector& pos, Direction d) sound_manager->preload("sounds/explosion.wav"); } -void -MrBomb::write(lisp::Writer& writer) -{ - writer.start_list("mrbomb"); - WalkingBadguy::write(writer); - writer.end_list("mrbomb"); -} - HitResponse MrBomb::collision(GameObject& object, const CollisionHit& hit) { @@ -155,4 +142,6 @@ MrBomb::is_portable() const return frozen; } -IMPLEMENT_FACTORY(MrBomb, "mrbomb") +IMPLEMENT_FACTORY(MrBomb, "mrbomb"); + +/* EOF */ diff --git a/src/badguy/mrbomb.hpp b/src/badguy/mrbomb.hpp index 14f326dec..4ad45f337 100644 --- a/src/badguy/mrbomb.hpp +++ b/src/badguy/mrbomb.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,22 +12,20 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __MRBOMB_H__ -#define __MRBOMB_H__ +#ifndef HEADER_SUPERTUX_BADGUY_MRBOMB_HPP +#define HEADER_SUPERTUX_BADGUY_MRBOMB_HPP -#include "walking_badguy.hpp" -#include "object/portable.hpp" +#include "badguy/walking_badguy.hpp" -class MrBomb : public WalkingBadguy, public Portable +class MrBomb : public WalkingBadguy, + public Portable { public: - MrBomb(const lisp::Lisp& reader); + MrBomb(const Reader& reader); MrBomb(const Vector& pos, Direction d); - void write(lisp::Writer& writer); void kill_fall(); HitResponse collision(GameObject& object, const CollisionHit& hit); HitResponse collision_player(Player& player, const CollisionHit& hit); @@ -43,8 +39,6 @@ public: void freeze(); bool is_freezable() const; - virtual MrBomb* clone() const { return new MrBomb(*this); } - protected: bool collision_squished(GameObject& object); @@ -53,3 +47,5 @@ private: }; #endif + +/* EOF */ diff --git a/src/badguy/mriceblock.cpp b/src/badguy/mriceblock.cpp index 72418ef1d..f056d4ae4 100644 --- a/src/badguy/mriceblock.cpp +++ b/src/badguy/mriceblock.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,28 +12,27 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "mriceblock.hpp" +#include "badguy/mriceblock.hpp" -#include "object/block.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "audio/sound_manager.hpp" #include "object/player.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" namespace { - const float KICKSPEED = 500; - const int MAXSQUISHES = 10; - const float NOKICK_TIME = 0.1f; +const float KICKSPEED = 500; +const int MAXSQUISHES = 10; +const float NOKICK_TIME = 0.1f; } -MrIceBlock::MrIceBlock(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/mr_iceblock/mr_iceblock.sprite", "left", "right"), ice_state(ICESTATE_NORMAL), squishcount(0) +MrIceBlock::MrIceBlock(const Reader& reader) : + WalkingBadguy(reader, "images/creatures/mr_iceblock/mr_iceblock.sprite", "left", "right"), + ice_state(ICESTATE_NORMAL), + nokick_timer(), + flat_timer(), + squishcount(0) { walk_speed = 80; max_drop_height = 600; @@ -44,8 +41,12 @@ MrIceBlock::MrIceBlock(const lisp::Lisp& reader) sound_manager->preload("sounds/kick.wav"); } -MrIceBlock::MrIceBlock(const Vector& pos, Direction d) - : WalkingBadguy(pos, d, "images/creatures/mr_iceblock/mr_iceblock.sprite", "left", "right"), ice_state(ICESTATE_NORMAL), squishcount(0) +MrIceBlock::MrIceBlock(const Vector& pos, Direction d) : + WalkingBadguy(pos, d, "images/creatures/mr_iceblock/mr_iceblock.sprite", "left", "right"), + ice_state(ICESTATE_NORMAL), + nokick_timer(), + flat_timer(), + squishcount(0) { walk_speed = 80; max_drop_height = 600; @@ -55,14 +56,6 @@ MrIceBlock::MrIceBlock(const Vector& pos, Direction d) } void -MrIceBlock::write(lisp::Writer& writer) -{ - writer.start_list("mriceblock"); - WalkingBadguy::write(writer); - writer.end_list("mriceblock"); -} - -void MrIceBlock::initialize() { WalkingBadguy::initialize(); @@ -90,7 +83,7 @@ MrIceBlock::active_update(float elapsed_time) bool MrIceBlock::can_break(){ - return ice_state == ICESTATE_KICKED; + return ice_state == ICESTATE_KICKED; } void @@ -189,39 +182,39 @@ MrIceBlock::collision_squished(GameObject& object) { switch(ice_state) { case ICESTATE_KICKED: - { - BadGuy* badguy = dynamic_cast(&object); - if (badguy) { - badguy->kill_fall(); - break; - } + { + BadGuy* badguy = dynamic_cast(&object); + if (badguy) { + badguy->kill_fall(); + break; } + } - // fall through + // fall through case ICESTATE_NORMAL: - { - Player* player = dynamic_cast(&object); - squishcount++; - if ((squishcount >= MAXSQUISHES) || (player && player->does_buttjump)) { - kill_fall(); - return true; - } + { + Player* player = dynamic_cast(&object); + squishcount++; + if ((squishcount >= MAXSQUISHES) || (player && player->does_buttjump)) { + kill_fall(); + return true; } + } - set_state(ICESTATE_FLAT); - nokick_timer.start(NOKICK_TIME); - break; + set_state(ICESTATE_FLAT); + nokick_timer.start(NOKICK_TIME); + break; case ICESTATE_FLAT: - { - MovingObject* movingobject = dynamic_cast(&object); - if (movingobject && (movingobject->get_pos().x < get_pos().x)) { - dir = RIGHT; - } else { - dir = LEFT; - } + { + MovingObject* movingobject = dynamic_cast(&object); + if (movingobject && (movingobject->get_pos().x < get_pos().x)) { + dir = RIGHT; + } else { + dir = LEFT; } - if (nokick_timer.check()) set_state(ICESTATE_KICKED); - break; + } + if (nokick_timer.check()) set_state(ICESTATE_KICKED); + break; case ICESTATE_GRABBED: assert(false); break; @@ -296,4 +289,6 @@ MrIceBlock::is_portable() const return ice_state == ICESTATE_FLAT; } -IMPLEMENT_FACTORY(MrIceBlock, "mriceblock") +IMPLEMENT_FACTORY(MrIceBlock, "mriceblock"); + +/* EOF */ diff --git a/src/badguy/mriceblock.hpp b/src/badguy/mriceblock.hpp index ddf3847aa..1f61c1868 100644 --- a/src/badguy/mriceblock.hpp +++ b/src/badguy/mriceblock.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,23 +12,22 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __MRICEBLOCK_H__ -#define __MRICEBLOCK_H__ +#ifndef HEADER_SUPERTUX_BADGUY_MRICEBLOCK_HPP +#define HEADER_SUPERTUX_BADGUY_MRICEBLOCK_HPP -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" #include "object/portable.hpp" -class MrIceBlock : public WalkingBadguy, public Portable +class MrIceBlock : public WalkingBadguy, + public Portable { public: - MrIceBlock(const lisp::Lisp& reader); + MrIceBlock(const Reader& reader); MrIceBlock(const Vector& pos, Direction d); void initialize(); - void write(lisp::Writer& writer); HitResponse collision(GameObject& object, const CollisionHit& hit); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); @@ -44,12 +41,7 @@ public: bool can_break(); - virtual MrIceBlock* clone() const { return new MrIceBlock(*this); } - protected: - bool collision_squished(GameObject& object); - -private: enum IceState { ICESTATE_NORMAL, ICESTATE_FLAT, @@ -57,8 +49,11 @@ private: ICESTATE_KICKED }; +protected: + bool collision_squished(GameObject& object); void set_state(IceState state); +private: IceState ice_state; Timer nokick_timer; Timer flat_timer; @@ -66,3 +61,5 @@ private: }; #endif + +/* EOF */ diff --git a/src/badguy/mrrocket.cpp b/src/badguy/mrrocket.cpp index 58f4df134..23ac5bc83 100644 --- a/src/badguy/mrrocket.cpp +++ b/src/badguy/mrrocket.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,43 +12,30 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "mrrocket.hpp" +#include "badguy/mrrocket.hpp" #include "object/explosion.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" -#include "sector.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" static const float SPEED = 200; -MrRocket::MrRocket(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/mr_rocket/mr_rocket.sprite") +MrRocket::MrRocket(const Reader& reader) : + BadGuy(reader, "images/creatures/mr_rocket/mr_rocket.sprite"), + collision_timer() { } -MrRocket::MrRocket(const Vector& pos, Direction d) - : BadGuy(pos, d, "images/creatures/mr_rocket/mr_rocket.sprite") +MrRocket::MrRocket(const Vector& pos, Direction d) : + BadGuy(pos, d, "images/creatures/mr_rocket/mr_rocket.sprite"), + collision_timer() { } void -MrRocket::write(lisp::Writer& writer) -{ - writer.start_list("mrrocket"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - - writer.end_list("mrrocket"); -} - -void MrRocket::initialize() { physic.set_velocity_x(dir == LEFT ? -SPEED : SPEED); @@ -66,8 +51,8 @@ MrRocket::active_update(float elapsed_time) remove_me(); } else if (!collision_timer.started()) { - movement=physic.get_movement(elapsed_time); - sprite->set_action(dir == LEFT ? "left" : "right"); + movement=physic.get_movement(elapsed_time); + sprite->set_action(dir == LEFT ? "left" : "right"); } } @@ -92,4 +77,6 @@ MrRocket::collision_solid(const CollisionHit& hit) } } -IMPLEMENT_FACTORY(MrRocket, "mrrocket") +IMPLEMENT_FACTORY(MrRocket, "mrrocket"); + +/* EOF */ diff --git a/src/badguy/mrrocket.hpp b/src/badguy/mrrocket.hpp index 4ff120945..19c6b59ad 100644 --- a/src/badguy/mrrocket.hpp +++ b/src/badguy/mrrocket.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,31 +12,30 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __MRROCKET_H__ -#define __MRROCKET_H__ +#ifndef HEADER_SUPERTUX_BADGUY_MRROCKET_HPP +#define HEADER_SUPERTUX_BADGUY_MRROCKET_HPP -#include "badguy.hpp" -#include "timer.hpp" +#include "badguy/badguy.hpp" class MrRocket : public BadGuy { public: - MrRocket(const lisp::Lisp& reader); + MrRocket(const Reader& reader); MrRocket(const Vector& pos, Direction d); void initialize(); void active_update(float elapsed_time); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); - virtual MrRocket* clone() const { return new MrRocket(*this); } - protected: bool collision_squished(GameObject& object); + +private: Timer collision_timer; }; #endif + +/* EOF */ diff --git a/src/badguy/mrtree.cpp b/src/badguy/mrtree.cpp index a79350bd9..eb91e5bab 100644 --- a/src/badguy/mrtree.cpp +++ b/src/badguy/mrtree.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,21 +12,18 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "mrtree.hpp" +#include "badguy/mrtree.hpp" -#include "stumpy.hpp" -#include "poisonivy.hpp" -#include "random_generator.hpp" -#include "object/sprite_particle.hpp" -#include "sector.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "audio/sound_manager.hpp" +#include "badguy/poisonivy.hpp" +#include "badguy/stumpy.hpp" +#include "math/random_generator.hpp" +#include "object/player.hpp" +#include "object/sprite_particle.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" #include @@ -38,8 +33,7 @@ static const float POISONIVY_WIDTH = 32; static const float POISONIVY_HEIGHT = 32; static const float POISONIVY_Y_OFFSET = 24; - -MrTree::MrTree(const lisp::Lisp& reader) +MrTree::MrTree(const Reader& reader) : WalkingBadguy(reader, "images/creatures/mr_tree/mr_tree.sprite","left","right") { walk_speed = WALKSPEED; @@ -47,14 +41,6 @@ MrTree::MrTree(const lisp::Lisp& reader) sound_manager->preload("sounds/mr_tree.ogg"); } -void -MrTree::write(lisp::Writer& writer) -{ - writer.start_list("mrtree"); - WalkingBadguy::write(writer); - writer.end_list("mrtree"); -} - bool MrTree::collision_squished(GameObject& object) { @@ -107,4 +93,6 @@ MrTree::collision_squished(GameObject& object) return true; } -IMPLEMENT_FACTORY(MrTree, "mrtree") +IMPLEMENT_FACTORY(MrTree, "mrtree"); + +/* EOF */ diff --git a/src/badguy/mrtree.hpp b/src/badguy/mrtree.hpp index 0b884a1ce..8b78ab9f2 100644 --- a/src/badguy/mrtree.hpp +++ b/src/badguy/mrtree.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,20 +12,17 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __MRTREE_H__ -#define __MRTREE_H__ +#ifndef HEADER_SUPERTUX_BADGUY_MRTREE_HPP +#define HEADER_SUPERTUX_BADGUY_MRTREE_HPP -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" class MrTree : public WalkingBadguy { public: - MrTree(const lisp::Lisp& reader); - void write(lisp::Writer& writer); - virtual MrTree* clone() const { return new MrTree(*this); } + MrTree(const Reader& reader); protected: bool collision_squished(GameObject& object); @@ -35,3 +30,5 @@ protected: }; #endif + +/* EOF */ diff --git a/src/badguy/plant.cpp b/src/badguy/plant.cpp index fd25e985b..2bf14ffb7 100644 --- a/src/badguy/plant.cpp +++ b/src/badguy/plant.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,39 +12,26 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "plant.hpp" +#include "badguy/plant.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "object/player.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" static const float WALKSPEED = 80; static const float WAKE_TIME = .5; -Plant::Plant(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/plant/plant.sprite") +Plant::Plant(const Reader& reader) : + BadGuy(reader, "images/creatures/plant/plant.sprite"), + timer(), + state() { state = PLANT_SLEEPING; } void -Plant::write(lisp::Writer& writer) -{ - writer.start_list("plant"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - - writer.end_list("plant"); -} - -void Plant::initialize() { //FIXME: turns sspiky around for debugging @@ -119,4 +104,6 @@ Plant::active_update(float elapsed_time) { } -IMPLEMENT_FACTORY(Plant, "plant") +IMPLEMENT_FACTORY(Plant, "plant"); + +/* EOF */ diff --git a/src/badguy/plant.hpp b/src/badguy/plant.hpp index 97aea8b67..84d857361 100644 --- a/src/badguy/plant.hpp +++ b/src/badguy/plant.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,37 +12,35 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __PLANT_H__ -#define __PLANT_H__ +#ifndef HEADER_SUPERTUX_BADGUY_PLANT_HPP +#define HEADER_SUPERTUX_BADGUY_PLANT_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class Plant : public BadGuy { public: - Plant(const lisp::Lisp& reader); + Plant(const Reader& reader); void initialize(); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); void active_update(float elapsed_time); - virtual Plant* clone() const { return new Plant(*this); } - protected: - Timer timer; - enum PlantState { PLANT_SLEEPING, PLANT_WAKING, PLANT_WALKING }; - PlantState state; +private: + Timer timer; + PlantState state; }; #endif + +/* EOF */ diff --git a/src/badguy/poisonivy.cpp b/src/badguy/poisonivy.cpp index 2a6aeb791..742ec4a7b 100644 --- a/src/badguy/poisonivy.cpp +++ b/src/badguy/poisonivy.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,40 +12,28 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "poisonivy.hpp" -#include "random_generator.hpp" +#include "badguy/poisonivy.hpp" +#include "math/random_generator.hpp" #include "object/sprite_particle.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" -#include "sector.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" #include -PoisonIvy::PoisonIvy(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/poison_ivy/poison_ivy.sprite", "left", "right") +PoisonIvy::PoisonIvy(const Reader& reader) + : WalkingBadguy(reader, "images/creatures/poison_ivy/poison_ivy.sprite", "left", "right") { walk_speed = 80; } PoisonIvy::PoisonIvy(const Vector& pos, Direction d) - : WalkingBadguy(pos, d, "images/creatures/poison_ivy/poison_ivy.sprite", "left", "right") + : WalkingBadguy(pos, d, "images/creatures/poison_ivy/poison_ivy.sprite", "left", "right") { walk_speed = 80; } -void -PoisonIvy::write(lisp::Writer& writer) -{ - writer.start_list("poisonivy"); - WalkingBadguy::write(writer); - writer.end_list("poisonivy"); -} - bool PoisonIvy::collision_squished(GameObject& object) { @@ -68,4 +54,6 @@ PoisonIvy::collision_squished(GameObject& object) return true; } -IMPLEMENT_FACTORY(PoisonIvy, "poisonivy") +IMPLEMENT_FACTORY(PoisonIvy, "poisonivy"); + +/* EOF */ diff --git a/src/badguy/poisonivy.hpp b/src/badguy/poisonivy.hpp index 783f23254..3e93c4f58 100644 --- a/src/badguy/poisonivy.hpp +++ b/src/badguy/poisonivy.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,26 +12,24 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __POISONIVY_H__ -#define __POISONIVY_H__ +#ifndef HEADER_SUPERTUX_BADGUY_POISONIVY_HPP +#define HEADER_SUPERTUX_BADGUY_POISONIVY_HPP -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" class PoisonIvy : public WalkingBadguy { public: - PoisonIvy(const lisp::Lisp& reader); + PoisonIvy(const Reader& reader); PoisonIvy(const Vector& pos, Direction d); - void write(lisp::Writer& writer); - virtual PoisonIvy* clone() const { return new PoisonIvy(*this); } - protected: bool collision_squished(GameObject& object); }; #endif + +/* EOF */ diff --git a/src/badguy/root.cpp b/src/badguy/root.cpp index 0eb29c742..e1fd55f3e 100644 --- a/src/badguy/root.cpp +++ b/src/badguy/root.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - "Will-O-Wisp" Badguy // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,25 +12,24 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. -#include +// along with this program. If not, see . -#include "root.hpp" -#include "sprite/sprite_manager.hpp" -#include "timer.hpp" +#include "badguy/root.hpp" #include "sprite/sprite.hpp" +#include "sprite/sprite_manager.hpp" static const float SPEED_GROW = 256; static const float SPEED_SHRINK = 128; static const float HATCH_TIME = 0.75; -Root::Root(const Vector& pos) - : BadGuy(pos, "images/creatures/ghosttree/root.sprite", LAYER_TILES-1), - mystate(STATE_APPEARING), offset_y(0) +Root::Root(const Vector& pos) : + BadGuy(pos, "images/creatures/ghosttree/root.sprite", LAYER_TILES-1), + mystate(STATE_APPEARING), + base_sprite(), + offset_y(0), + hatch_timer() { - base_sprite.reset(sprite_manager->create("images/creatures/ghosttree/root-base.sprite")); + base_sprite = sprite_manager->create("images/creatures/ghosttree/root-base.sprite"); base_sprite->set_action("appearing", 1); base_sprite->set_animation_loops(1); // TODO: necessary because set_action ignores loops for default action physic.enable_gravity(false); @@ -93,3 +90,4 @@ Root::draw(DrawingContext& context) if ((mystate != STATE_APPEARING) && (mystate != STATE_VANISHING)) BadGuy::draw(context); } +/* EOF */ diff --git a/src/badguy/root.hpp b/src/badguy/root.hpp index b3a302c0d..2c05bbb3d 100644 --- a/src/badguy/root.hpp +++ b/src/badguy/root.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Boss "GhostTree" // Copyright (C) 2007 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,13 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#ifndef __ROOT_H__ -#define __ROOT_H__ +// along with this program. If not, see . + +#ifndef HEADER_SUPERTUX_BADGUY_ROOT_HPP +#define HEADER_SUPERTUX_BADGUY_ROOT_HPP -#include -#include "badguy.hpp" +#include "badguy/badguy.hpp" class Timer; @@ -41,6 +38,8 @@ protected: enum MyState { STATE_APPEARING, STATE_HATCHING, STATE_GROWING, STATE_SHRINKING, STATE_VANISHING }; + +private: MyState mystate; std::auto_ptr base_sprite; float offset_y; @@ -48,3 +47,5 @@ protected: }; #endif + +/* EOF */ diff --git a/src/badguy/skullyhop.cpp b/src/badguy/skullyhop.cpp index 258adec21..647ac53b2 100644 --- a/src/badguy/skullyhop.cpp +++ b/src/badguy/skullyhop.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SkullyHop - A Hopping Skull // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,48 +12,40 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. -#include - -#include "skullyhop.hpp" -#include "random_generator.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" +// along with this program. If not, see . + +#include "badguy/skullyhop.hpp" + #include "audio/sound_manager.hpp" +#include "math/random_generator.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" namespace { - const float VERTICAL_SPEED = -450; /**< y-speed when jumping */ - const float HORIZONTAL_SPEED = 220; /**< x-speed when jumping */ - const float MIN_RECOVER_TIME = 0.1f; /**< minimum time to stand still before starting a (new) jump */ - const float MAX_RECOVER_TIME = 1.0f; /**< maximum time to stand still before starting a (new) jump */ - static const std::string HOP_SOUND = "sounds/hop.ogg"; +const float VERTICAL_SPEED = -450; /**< y-speed when jumping */ +const float HORIZONTAL_SPEED = 220; /**< x-speed when jumping */ +const float MIN_RECOVER_TIME = 0.1f; /**< minimum time to stand still before starting a (new) jump */ +const float MAX_RECOVER_TIME = 1.0f; /**< maximum time to stand still before starting a (new) jump */ +static const std::string HOP_SOUND = "sounds/hop.ogg"; } -SkullyHop::SkullyHop(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/skullyhop/skullyhop.sprite") +SkullyHop::SkullyHop(const Reader& reader) : + BadGuy(reader, "images/creatures/skullyhop/skullyhop.sprite"), + recover_timer(), + state() { sound_manager->preload( HOP_SOUND ); } -SkullyHop::SkullyHop(const Vector& pos, Direction d) - : BadGuy(pos, d, "images/creatures/skullyhop/skullyhop.sprite") +SkullyHop::SkullyHop(const Vector& pos, Direction d) : + BadGuy(pos, d, "images/creatures/skullyhop/skullyhop.sprite"), + recover_timer(), + state() { sound_manager->preload( HOP_SOUND ); } void -SkullyHop::write(lisp::Writer& writer) -{ - writer.start_list("skullyhop"); - writer.write("x", start_position.x); - writer.write("y", start_position.y); - writer.end_list("skullyhop"); -} - -void SkullyHop::initialize() { // initial state is JUMPING, because we might start airborne @@ -74,15 +64,15 @@ SkullyHop::set_state(SkullyHopState newState) float recover_time = systemRandom.randf(MIN_RECOVER_TIME,MAX_RECOVER_TIME); recover_timer.start(recover_time); } else - if (newState == CHARGING) { - sprite->set_action(dir == LEFT ? "charging-left" : "charging-right", 1); - } else - if (newState == JUMPING) { - sprite->set_action(dir == LEFT ? "jumping-left" : "jumping-right"); - physic.set_velocity_x(dir == LEFT ? -HORIZONTAL_SPEED : HORIZONTAL_SPEED); - physic.set_velocity_y(VERTICAL_SPEED); - sound_manager->play( HOP_SOUND, get_pos()); - } + if (newState == CHARGING) { + sprite->set_action(dir == LEFT ? "charging-left" : "charging-right", 1); + } else + if (newState == JUMPING) { + sprite->set_action(dir == LEFT ? "jumping-left" : "jumping-right"); + physic.set_velocity_x(dir == LEFT ? -HORIZONTAL_SPEED : HORIZONTAL_SPEED); + physic.set_velocity_y(VERTICAL_SPEED); + sound_manager->play( HOP_SOUND, get_pos()); + } state = newState; } @@ -151,4 +141,6 @@ SkullyHop::active_update(float elapsed_time) } } -IMPLEMENT_FACTORY(SkullyHop, "skullyhop") +IMPLEMENT_FACTORY(SkullyHop, "skullyhop"); + +/* EOF */ diff --git a/src/badguy/skullyhop.hpp b/src/badguy/skullyhop.hpp index 970ed93b8..5698fe625 100644 --- a/src/badguy/skullyhop.hpp +++ b/src/badguy/skullyhop.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SkullyHop - A Hopping Skull // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,14 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. +// along with this program. If not, see . -#ifndef __SKULLYHOP_H__ -#define __SKULLYHOP_H__ +#ifndef HEADER_SUPERTUX_BADGUY_SKULLYHOP_HPP +#define HEADER_SUPERTUX_BADGUY_SKULLYHOP_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" /** * Badguy "SkullyHop" - A Hopping Skull @@ -29,29 +25,30 @@ class SkullyHop : public BadGuy { public: - SkullyHop(const lisp::Lisp& reader); + SkullyHop(const Reader& reader); SkullyHop(const Vector& pos, Direction d); void initialize(); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); bool collision_squished(GameObject& object); void active_update(float elapsed_time); - virtual SkullyHop* clone() const { return new SkullyHop(*this); } - -protected: +private: enum SkullyHopState { STANDING, CHARGING, JUMPING }; +private: + void set_state(SkullyHopState newState); + +private: Timer recover_timer; SkullyHopState state; - - void set_state(SkullyHopState newState); }; #endif + +/* EOF */ diff --git a/src/badguy/smartball.cpp b/src/badguy/smartball.cpp index ed5589fa6..43bde1781 100644 --- a/src/badguy/smartball.cpp +++ b/src/badguy/smartball.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Smart Snowball // Copyright (C) 2008 Wolfgang Becker // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,17 +12,14 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "smartball.hpp" +#include "badguy/smartball.hpp" -#include "object_factory.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" -SmartBall::SmartBall(const lisp::Lisp& reader) +SmartBall::SmartBall(const Reader& reader) : WalkingBadguy(reader, "images/creatures/snowball/smart-snowball.sprite", "left", "right") { walk_speed = 80; @@ -46,4 +41,6 @@ SmartBall::collision_squished(GameObject& object) return true; } -IMPLEMENT_FACTORY(SmartBall, "smartball") +IMPLEMENT_FACTORY(SmartBall, "smartball"); + +/* EOF */ diff --git a/src/badguy/smartball.hpp b/src/badguy/smartball.hpp index 3631f39bf..9ea8a5517 100644 --- a/src/badguy/smartball.hpp +++ b/src/badguy/smartball.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Smart Snowball // Copyright (C) 2008 Wolfgang Becker // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,13 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __SMARTBALL_H__ -#define __SMARTBALL_H__ +#ifndef HEADER_SUPERTUX_BADGUY_SMARTBALL_HPP +#define HEADER_SUPERTUX_BADGUY_SMARTBALL_HPP -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" /* * Easy to kill badguy that does not jump down from it's ledge. @@ -28,14 +25,14 @@ class SmartBall : public WalkingBadguy { public: - SmartBall(const lisp::Lisp& reader); + SmartBall(const Reader& reader); SmartBall(const Vector& pos, Direction d); - virtual SmartBall* clone() const { return new SmartBall(*this); } - protected: bool collision_squished(GameObject& object); }; #endif + +/* EOF */ diff --git a/src/badguy/snail.cpp b/src/badguy/snail.cpp index c3216b7ab..797e06ecd 100644 --- a/src/badguy/snail.cpp +++ b/src/badguy/snail.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Badguy "Snail" // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,30 +12,29 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "snail.hpp" +#include "badguy/snail.hpp" -#include "object/block.hpp" -#include "lisp/writer.hpp" -#include "sprite/sprite.hpp" -#include "object_factory.hpp" #include "audio/sound_manager.hpp" #include "object/player.hpp" +#include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" #include namespace { - const float KICKSPEED = 500; - const int MAXSQUISHES = 10; - const float KICKSPEED_Y = -500; /**< y-velocity gained when kicked */ +const float KICKSPEED = 500; +const int MAXSQUISHES = 10; +const float KICKSPEED_Y = -500; /**< y-velocity gained when kicked */ } -Snail::Snail(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/snail/snail.sprite", "left", "right"), state(STATE_NORMAL), squishcount(0) +Snail::Snail(const Reader& reader) : + WalkingBadguy(reader, "images/creatures/snail/snail.sprite", "left", "right"), + state(STATE_NORMAL), + flat_timer(), + kicked_delay_timer(), + squishcount(0) { walk_speed = 80; max_drop_height = 600; @@ -46,8 +43,12 @@ Snail::Snail(const lisp::Lisp& reader) sound_manager->preload("sounds/kick.wav"); } -Snail::Snail(const Vector& pos, Direction d) - : WalkingBadguy(pos, d, "images/creatures/snail/snail.sprite", "left", "right"), state(STATE_NORMAL), squishcount(0) +Snail::Snail(const Vector& pos, Direction d) : + WalkingBadguy(pos, d, "images/creatures/snail/snail.sprite", "left", "right"), + state(STATE_NORMAL), + flat_timer(), + kicked_delay_timer(), + squishcount(0) { walk_speed = 80; max_drop_height = 600; @@ -57,14 +58,6 @@ Snail::Snail(const Vector& pos, Direction d) } void -Snail::write(lisp::Writer& writer) -{ - writer.start_list("snail"); - WalkingBadguy::write(writer); - writer.end_list("snail"); -} - -void Snail::initialize() { WalkingBadguy::initialize(); @@ -109,7 +102,7 @@ Snail::be_kicked() bool Snail::can_break(){ - return state == STATE_KICKED; + return state == STATE_KICKED; } void @@ -220,18 +213,18 @@ Snail::collision_squished(GameObject& object) case STATE_KICKED: case STATE_NORMAL: - { - Player* player = dynamic_cast(&object); - squishcount++; - if ((squishcount >= MAXSQUISHES) || (player && player->does_buttjump)) { - kill_fall(); - return true; - } + { + Player* player = dynamic_cast(&object); + squishcount++; + if ((squishcount >= MAXSQUISHES) || (player && player->does_buttjump)) { + kill_fall(); + return true; } + } - sound_manager->play("sounds/stomp.wav", get_pos()); - be_flat(); - break; + sound_manager->play("sounds/stomp.wav", get_pos()); + be_flat(); + break; case STATE_FLAT: sound_manager->play("sounds/kick.wav", get_pos()); @@ -256,4 +249,6 @@ Snail::collision_squished(GameObject& object) return true; } -IMPLEMENT_FACTORY(Snail, "snail") +IMPLEMENT_FACTORY(Snail, "snail"); + +/* EOF */ diff --git a/src/badguy/snail.hpp b/src/badguy/snail.hpp index 0d31ca8c4..6e5471ac1 100644 --- a/src/badguy/snail.hpp +++ b/src/badguy/snail.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Badguy "Snail" // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,13 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __SNAIL_H__ -#define __SNAIL_H__ +#ifndef HEADER_SUPERTUX_BADGUY_SNAIL_HPP +#define HEADER_SUPERTUX_BADGUY_SNAIL_HPP -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" /** * Badguy "Snail" - a snail-like creature that can be flipped and tossed around at an angle @@ -28,19 +25,16 @@ class Snail : public WalkingBadguy { public: - Snail(const lisp::Lisp& reader); + Snail(const Reader& reader); Snail(const Vector& pos, Direction d); void initialize(); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); bool can_break(); void active_update(float elapsed_time); - virtual Snail* clone() const { return new Snail(*this); } - protected: bool collision_squished(GameObject& object); void be_normal(); /**< switch to state STATE_NORMAL */ @@ -54,10 +48,14 @@ private: STATE_KICKED_DELAY, /**< short delay before being launched */ STATE_KICKED /**< launched */ }; + +private: State state; Timer flat_timer; /**< wait time until flipping right-side-up again */ Timer kicked_delay_timer; /**< wait time until switching from STATE_KICKED_DELAY to STATE_KICKED */ - int squishcount; + int squishcount; }; #endif + +/* EOF */ diff --git a/src/badguy/snowball.cpp b/src/badguy/snowball.cpp index b2b31e924..92769c788 100644 --- a/src/badguy/snowball.cpp +++ b/src/badguy/snowball.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,37 +12,25 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "snowball.hpp" +#include "badguy/snowball.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" -SnowBall::SnowBall(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/snowball/snowball.sprite", "left", "right") +SnowBall::SnowBall(const Reader& reader) + : WalkingBadguy(reader, "images/creatures/snowball/snowball.sprite", "left", "right") { walk_speed = 80; } SnowBall::SnowBall(const Vector& pos, Direction d) - : WalkingBadguy(pos, d, "images/creatures/snowball/snowball.sprite", "left", "right") + : WalkingBadguy(pos, d, "images/creatures/snowball/snowball.sprite", "left", "right") { walk_speed = 80; } -void -SnowBall::write(lisp::Writer& writer) -{ - writer.start_list("snowball"); - WalkingBadguy::write(writer); - writer.end_list("snowball"); -} - bool SnowBall::collision_squished(GameObject& object) { @@ -53,4 +39,6 @@ SnowBall::collision_squished(GameObject& object) return true; } -IMPLEMENT_FACTORY(SnowBall, "snowball") +IMPLEMENT_FACTORY(SnowBall, "snowball"); + +/* EOF */ diff --git a/src/badguy/snowball.hpp b/src/badguy/snowball.hpp index ef32818c3..ab881c6b0 100644 --- a/src/badguy/snowball.hpp +++ b/src/badguy/snowball.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,26 +12,24 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __SNOWBALL_H__ -#define __SNOWBALL_H__ +#ifndef HEADER_SUPERTUX_BADGUY_SNOWBALL_HPP +#define HEADER_SUPERTUX_BADGUY_SNOWBALL_HPP -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" class SnowBall : public WalkingBadguy { public: - SnowBall(const lisp::Lisp& reader); + SnowBall(const Reader& reader); SnowBall(const Vector& pos, Direction d); - void write(lisp::Writer& writer); - virtual SnowBall* clone() const { return new SnowBall(*this); } - protected: bool collision_squished(GameObject& object); }; #endif + +/* EOF */ diff --git a/src/badguy/spidermite.cpp b/src/badguy/spidermite.cpp index 62998e1c6..a608033ee 100644 --- a/src/badguy/spidermite.cpp +++ b/src/badguy/spidermite.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,46 +12,34 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include -#include +// along with this program. If not, see . -#include "spidermite.hpp" +#include "badguy/spidermite.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "object/player.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" static const float FLYTIME = 1.2f; static const float FLYSPEED = -100.0f; -SpiderMite::SpiderMite(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/spidermite/spidermite.sprite") +SpiderMite::SpiderMite(const Reader& reader) : + BadGuy(reader, "images/creatures/spidermite/spidermite.sprite"), + mode(), + timer() { physic.enable_gravity(false); } -SpiderMite::SpiderMite(const Vector& pos) - : BadGuy(pos, "images/creatures/spidermite/spidermite.sprite") +SpiderMite::SpiderMite(const Vector& pos) : + BadGuy(pos, "images/creatures/spidermite/spidermite.sprite"), + mode(), + timer() { physic.enable_gravity(false); } void -SpiderMite::write(lisp::Writer& writer) -{ - writer.start_list("spidermite"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - - writer.end_list("spidermite"); -} - -void SpiderMite::initialize() { sprite->set_action(dir == LEFT ? "left" : "right"); @@ -100,4 +86,6 @@ SpiderMite::active_update(float elapsed_time) } } -IMPLEMENT_FACTORY(SpiderMite, "spidermite") +IMPLEMENT_FACTORY(SpiderMite, "spidermite"); + +/* EOF */ diff --git a/src/badguy/spidermite.hpp b/src/badguy/spidermite.hpp index 1e17f0961..c2e7675a8 100644 --- a/src/badguy/spidermite.hpp +++ b/src/badguy/spidermite.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,36 +12,37 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __SPIDERMITE_H__ -#define __SPIDERMITE_H__ +#ifndef HEADER_SUPERTUX_BADGUY_SPIDERMITE_HPP +#define HEADER_SUPERTUX_BADGUY_SPIDERMITE_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class SpiderMite : public BadGuy { public: - SpiderMite(const lisp::Lisp& reader); + SpiderMite(const Reader& reader); SpiderMite(const Vector& pos); void initialize(); - void write(lisp::Writer& writer); void active_update(float elapsed_time); void collision_solid(const CollisionHit& hit); - virtual SpiderMite* clone() const { return new SpiderMite(*this); } - protected: enum SpiderMiteMode { FLY_UP, FLY_DOWN }; - SpiderMiteMode mode; + +protected: bool collision_squished(GameObject& object); + private: + SpiderMiteMode mode; Timer timer; }; #endif + +/* EOF */ diff --git a/src/badguy/spiky.cpp b/src/badguy/spiky.cpp index 718cb776d..e0e060b46 100644 --- a/src/badguy/spiky.cpp +++ b/src/badguy/spiky.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,33 +12,21 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "spiky.hpp" +#include "badguy/spiky.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" -Spiky::Spiky(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/spiky/spiky.sprite", "left", "right") +Spiky::Spiky(const Reader& reader) + : WalkingBadguy(reader, "images/creatures/spiky/spiky.sprite", "left", "right") { walk_speed = 80; max_drop_height = 600; } void -Spiky::write(lisp::Writer& writer) -{ - writer.start_list("spiky"); - WalkingBadguy::write(writer); - writer.end_list("spiky"); -} - -void Spiky::freeze() { WalkingBadguy::freeze(); @@ -53,4 +39,6 @@ Spiky::is_freezable() const return true; } -IMPLEMENT_FACTORY(Spiky, "spiky") +IMPLEMENT_FACTORY(Spiky, "spiky"); + +/* EOF */ diff --git a/src/badguy/spiky.hpp b/src/badguy/spiky.hpp index b90a0ecca..122d72098 100644 --- a/src/badguy/spiky.hpp +++ b/src/badguy/spiky.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,21 +12,17 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __SPIKY_H__ -#define __SPIKY_H__ +#ifndef HEADER_SUPERTUX_BADGUY_SPIKY_HPP +#define HEADER_SUPERTUX_BADGUY_SPIKY_HPP -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" class Spiky : public WalkingBadguy { public: - Spiky(const lisp::Lisp& reader); - - void write(lisp::Writer& writer); - virtual Spiky* clone() const { return new Spiky(*this); } + Spiky(const Reader& reader); void freeze(); bool is_freezable() const; @@ -37,3 +31,5 @@ private: }; #endif + +/* EOF */ diff --git a/src/badguy/sspiky.cpp b/src/badguy/sspiky.cpp index 4fad8fb8c..63a311c65 100644 --- a/src/badguy/sspiky.cpp +++ b/src/badguy/sspiky.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,36 +12,24 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "sspiky.hpp" +#include "badguy/sspiky.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" -#include "sprite/sprite.hpp" #include "object/player.hpp" +#include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" static const float WALKSPEED = 80; -SSpiky::SSpiky(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/spiky/sleepingspiky.sprite", "left", "right"), state(SSPIKY_SLEEPING) +SSpiky::SSpiky(const Reader& reader) + : WalkingBadguy(reader, "images/creatures/spiky/sleepingspiky.sprite", "left", "right"), state(SSPIKY_SLEEPING) { walk_speed = WALKSPEED; max_drop_height = -1; } void -SSpiky::write(lisp::Writer& writer) -{ - writer.start_list("sspiky"); - WalkingBadguy::write(writer); - writer.end_list("sspiky"); -} - -void SSpiky::initialize() { state = SSPIKY_SLEEPING; @@ -125,4 +111,6 @@ SSpiky::is_freezable() const return true; } -IMPLEMENT_FACTORY(SSpiky, "sspiky") +IMPLEMENT_FACTORY(SSpiky, "sspiky"); + +/* EOF */ diff --git a/src/badguy/sspiky.hpp b/src/badguy/sspiky.hpp index b6a35ed84..49a48e248 100644 --- a/src/badguy/sspiky.hpp +++ b/src/badguy/sspiky.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,21 +12,19 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __SSPIKY_H__ -#define __SSPIKY_H__ +#ifndef HEADER_SUPERTUX_BADGUY_SSPIKY_HPP +#define HEADER_SUPERTUX_BADGUY_SSPIKY_HPP -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" class SSpiky : public WalkingBadguy { public: - SSpiky(const lisp::Lisp& reader); + SSpiky(const Reader& reader); void initialize(); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); void active_update(float elapsed_time); @@ -36,8 +32,6 @@ public: void freeze(); bool is_freezable() const; - virtual SSpiky* clone() const { return new SSpiky(*this); } - protected: enum SSpikyState { SSPIKY_SLEEPING, @@ -48,3 +42,5 @@ protected: }; #endif + +/* EOF */ diff --git a/src/badguy/stalactite.cpp b/src/badguy/stalactite.cpp index f810d7c0d..36220033e 100644 --- a/src/badguy/stalactite.cpp +++ b/src/badguy/stalactite.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,50 +12,39 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "stalactite.hpp" +#include "badguy/stalactite.hpp" -#include "random_generator.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" +#include "math/random_generator.hpp" #include "object/player.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" static const int SHAKE_RANGE_X = 40; static const float SHAKE_TIME = .8f; static const float SQUISH_TIME = 2; static const float SHAKE_RANGE_Y = 400; -Stalactite::Stalactite(const lisp::Lisp& lisp) - : BadGuy(lisp, "images/creatures/stalactite/stalactite.sprite", LAYER_TILES - 1), state(STALACTITE_HANGING) +Stalactite::Stalactite(const Reader& lisp) : + BadGuy(lisp, "images/creatures/stalactite/stalactite.sprite", LAYER_TILES - 1), + timer(), + state(STALACTITE_HANGING) { countMe = false; set_colgroup_active(COLGROUP_TOUCHABLE); } void -Stalactite::write(lisp::Writer& writer) -{ - writer.start_list("stalactite"); - writer.write("x", start_position.x); - writer.write("y", start_position.y); - writer.end_list("stalactite"); -} - -void Stalactite::active_update(float elapsed_time) { if(state == STALACTITE_HANGING) { Player* player = this->get_nearest_player(); if (player) { if(player->get_bbox().p2.x > bbox.p1.x - SHAKE_RANGE_X - && player->get_bbox().p1.x < bbox.p2.x + SHAKE_RANGE_X - && player->get_bbox().p2.y > bbox.p1.y - && player->get_bbox().p1.y < bbox.p2.y + SHAKE_RANGE_Y) { + && player->get_bbox().p1.x < bbox.p2.x + SHAKE_RANGE_X + && player->get_bbox().p2.y > bbox.p1.y + && player->get_bbox().p1.y < bbox.p2.y + SHAKE_RANGE_Y) { timer.start(SHAKE_TIME); state = STALACTITE_SHAKING; } @@ -97,7 +84,7 @@ Stalactite::collision_solid(const CollisionHit& hit) } HitResponse -Stalactite::collision_player(Player& player) +Stalactite::collision_player(Player& player, const CollisionHit& ) { if(state != STALACTITE_SQUISHED) { player.kill(false); @@ -138,7 +125,6 @@ Stalactite::draw(DrawingContext& context) if(get_state() != STATE_ACTIVE) return; - if(state == STALACTITE_SQUISHED) { sprite->draw(context, get_pos(), LAYER_OBJECTS); return; @@ -158,4 +144,6 @@ Stalactite::deactivate() remove_me(); } -IMPLEMENT_FACTORY(Stalactite, "stalactite") +IMPLEMENT_FACTORY(Stalactite, "stalactite"); + +/* EOF */ diff --git a/src/badguy/stalactite.hpp b/src/badguy/stalactite.hpp index bf9484bfd..b396fbc6c 100644 --- a/src/badguy/stalactite.hpp +++ b/src/badguy/stalactite.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,43 +12,42 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __STALACTITE_H__ -#define __STALACTITE_H__ +#ifndef HEADER_SUPERTUX_BADGUY_STALACTITE_HPP +#define HEADER_SUPERTUX_BADGUY_STALACTITE_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class Stalactite : public BadGuy { public: - Stalactite(const lisp::Lisp& reader); + Stalactite(const Reader& reader); void active_update(float elapsed_time); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); - HitResponse collision_player(Player& player); + HitResponse collision_player(Player& player, const CollisionHit& hit); HitResponse collision_badguy(BadGuy& other, const CollisionHit& hit); void kill_fall(); void draw(DrawingContext& context); void deactivate(); - virtual Stalactite* clone() const { return new Stalactite(*this); } - void squish(); protected: - Timer timer; - enum StalactiteState { STALACTITE_HANGING, STALACTITE_SHAKING, STALACTITE_FALLING, STALACTITE_SQUISHED }; + +protected: + Timer timer; StalactiteState state; }; #endif + +/* EOF */ diff --git a/src/badguy/stumpy.cpp b/src/badguy/stumpy.cpp index eed38db53..cdf2878ac 100644 --- a/src/badguy/stumpy.cpp +++ b/src/badguy/stumpy.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,36 +12,36 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "stumpy.hpp" +#include "badguy/stumpy.hpp" -#include "poisonivy.hpp" -#include "random_generator.hpp" -#include "object/sprite_particle.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "audio/sound_manager.hpp" -#include "sector.hpp" +#include "math/random_generator.hpp" +#include "object/player.hpp" +#include "object/sprite_particle.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" #include static const float WALKSPEED = 120; static const float INVINCIBLE_TIME = 1; -Stumpy::Stumpy(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/mr_tree/stumpy.sprite","left","right"), mystate(STATE_NORMAL) +Stumpy::Stumpy(const Reader& reader) : + WalkingBadguy(reader, "images/creatures/mr_tree/stumpy.sprite","left","right"), + mystate(STATE_NORMAL), + invincible_timer() { walk_speed = WALKSPEED; max_drop_height = 16; sound_manager->preload("sounds/mr_treehit.ogg"); } -Stumpy::Stumpy(const Vector& pos, Direction d) - : WalkingBadguy(pos, d, "images/creatures/mr_tree/stumpy.sprite","left","right"), mystate(STATE_INVINCIBLE) +Stumpy::Stumpy(const Vector& pos, Direction d) : + WalkingBadguy(pos, d, "images/creatures/mr_tree/stumpy.sprite","left","right"), + mystate(STATE_INVINCIBLE), + invincible_timer() { walk_speed = WALKSPEED; max_drop_height = 16; @@ -51,15 +49,6 @@ Stumpy::Stumpy(const Vector& pos, Direction d) invincible_timer.start(INVINCIBLE_TIME); } - -void -Stumpy::write(lisp::Writer& writer) -{ - writer.start_list("stumpy"); - WalkingBadguy::write(writer); - writer.end_list("stumpy"); -} - void Stumpy::initialize() { @@ -170,4 +159,6 @@ Stumpy::collision_badguy(BadGuy& badguy, const CollisionHit& hit) return CONTINUE; } -IMPLEMENT_FACTORY(Stumpy, "stumpy") +IMPLEMENT_FACTORY(Stumpy, "stumpy"); + +/* EOF */ diff --git a/src/badguy/stumpy.hpp b/src/badguy/stumpy.hpp index 1559bfe7c..d85036d38 100644 --- a/src/badguy/stumpy.hpp +++ b/src/badguy/stumpy.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,37 +12,37 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __STUMPY_H__ -#define __STUMPY_H__ +#ifndef HEADER_SUPERTUX_BADGUY_STUMPY_HPP +#define HEADER_SUPERTUX_BADGUY_STUMPY_HPP -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" class Stumpy : public WalkingBadguy { public: - Stumpy(const lisp::Lisp& reader); + Stumpy(const Reader& reader); Stumpy(const Vector& pos, Direction d); void initialize(); void active_update(float elapsed_time); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); - virtual Stumpy* clone() const { return new Stumpy(*this); } - protected: enum MyState { STATE_INVINCIBLE, STATE_NORMAL }; - MyState mystate; - - Timer invincible_timer; +protected: bool collision_squished(GameObject& object); + +private: + MyState mystate; + Timer invincible_timer; }; #endif + +/* EOF */ diff --git a/src/badguy/toad.cpp b/src/badguy/toad.cpp index 6a168e30a..429e71f7a 100644 --- a/src/badguy/toad.cpp +++ b/src/badguy/toad.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // Toad - A jumping toad // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,49 +12,39 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. -#include +// along with this program. If not, see . -#include "toad.hpp" +#include "badguy/toad.hpp" -#include "random_generator.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" -#include "object/player.hpp" #include "audio/sound_manager.hpp" +#include "object/player.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" namespace { - const float VERTICAL_SPEED = -450; /**< y-speed when jumping */ - const float HORIZONTAL_SPEED = 320; /**< x-speed when jumping */ - const float RECOVER_TIME = 0.5; /**< time to stand still before starting a (new) jump */ - static const std::string HOP_SOUND = "sounds/hop.ogg"; +const float VERTICAL_SPEED = -450; /**< y-speed when jumping */ +const float HORIZONTAL_SPEED = 320; /**< x-speed when jumping */ +const float RECOVER_TIME = 0.5; /**< time to stand still before starting a (new) jump */ +static const std::string HOP_SOUND = "sounds/hop.ogg"; } -Toad::Toad(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/toad/toad.sprite") +Toad::Toad(const Reader& reader) : + BadGuy(reader, "images/creatures/toad/toad.sprite"), + recover_timer(), + state() { sound_manager->preload(HOP_SOUND); } -Toad::Toad(const Vector& pos, Direction d) - : BadGuy(pos, d, "images/creatures/toad/toad.sprite") +Toad::Toad(const Vector& pos, Direction d) : + BadGuy(pos, d, "images/creatures/toad/toad.sprite"), + recover_timer(), + state() { sound_manager->preload(HOP_SOUND); } void -Toad::write(lisp::Writer& writer) -{ - writer.start_list("toad"); - writer.write("x", start_position.x); - writer.write("y", start_position.y); - writer.end_list("toad"); -} - -void Toad::initialize() { // initial state is JUMPING, because we might start airborne @@ -74,19 +62,19 @@ Toad::set_state(ToadState newState) recover_timer.start(RECOVER_TIME); } else - if (newState == JUMPING) { - sprite->set_action(dir == LEFT ? "jumping-left" : "jumping-right"); - physic.set_velocity_x(dir == LEFT ? -HORIZONTAL_SPEED : HORIZONTAL_SPEED); - physic.set_velocity_y(VERTICAL_SPEED); - sound_manager->play( HOP_SOUND, get_pos()); - } else - if (newState == FALLING) { - Player* player = get_nearest_player(); - // face player - if (player && (player->get_bbox().p2.x < get_bbox().p1.x) && (dir == RIGHT)) dir = LEFT; - if (player && (player->get_bbox().p1.x > get_bbox().p2.x) && (dir == LEFT)) dir = RIGHT; - sprite->set_action(dir == LEFT ? "idle-left" : "idle-right"); - } + if (newState == JUMPING) { + sprite->set_action(dir == LEFT ? "jumping-left" : "jumping-right"); + physic.set_velocity_x(dir == LEFT ? -HORIZONTAL_SPEED : HORIZONTAL_SPEED); + physic.set_velocity_y(VERTICAL_SPEED); + sound_manager->play( HOP_SOUND, get_pos()); + } else + if (newState == FALLING) { + Player* player = get_nearest_player(); + // face player + if (player && (player->get_bbox().p2.x < get_bbox().p1.x) && (dir == RIGHT)) dir = LEFT; + if (player && (player->get_bbox().p1.x > get_bbox().p2.x) && (dir == LEFT)) dir = RIGHT; + sprite->set_action(dir == LEFT ? "idle-left" : "idle-right"); + } state = newState; } @@ -116,12 +104,12 @@ Toad::collision_solid(const CollisionHit& hit) // check if we hit left or right while moving in either direction if(((physic.get_velocity_x() < 0) && hit.left) || ((physic.get_velocity_x() > 0) && hit.right)) { /* - dir = dir == LEFT ? RIGHT : LEFT; - if (state == JUMPING) { + dir = dir == LEFT ? RIGHT : LEFT; + if (state == JUMPING) { sprite->set_action(dir == LEFT ? "jumping-left" : "jumping-right"); - } else { + } else { sprite->set_action(dir == LEFT ? "idle-left" : "idle-right"); - } + } */ physic.set_velocity_x(-0.25*physic.get_velocity_x()); } @@ -167,4 +155,6 @@ Toad::active_update(float elapsed_time) } -IMPLEMENT_FACTORY(Toad, "toad") +IMPLEMENT_FACTORY(Toad, "toad"); + +/* EOF */ diff --git a/src/badguy/toad.hpp b/src/badguy/toad.hpp index bbdc35f5e..39a53f359 100644 --- a/src/badguy/toad.hpp +++ b/src/badguy/toad.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // Toad - A jumping toad // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,14 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. +// along with this program. If not, see . -#ifndef __TOAD_H__ -#define __TOAD_H__ +#ifndef HEADER_SUPERTUX_BADGUY_TOAD_HPP +#define HEADER_SUPERTUX_BADGUY_TOAD_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" /** * Badguy "Toad" - A jumping toad @@ -29,18 +25,15 @@ class Toad : public BadGuy { public: - Toad(const lisp::Lisp& reader); + Toad(const Reader& reader); Toad(const Vector& pos, Direction d); void initialize(); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); bool collision_squished(GameObject& object); void active_update(float elapsed_time); - virtual Toad* clone() const { return new Toad(*this); } - protected: enum ToadState { IDLE, @@ -48,10 +41,14 @@ protected: FALLING }; +private: + void set_state(ToadState newState); + +private: Timer recover_timer; ToadState state; - - void set_state(ToadState newState); }; #endif + +/* EOF */ diff --git a/src/badguy/totem.cpp b/src/badguy/totem.cpp index 27b6d85af..15e56b596 100644 --- a/src/badguy/totem.cpp +++ b/src/badguy/totem.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - "Totem" Badguy // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,21 +12,15 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "totem.hpp" +#include "badguy/totem.hpp" -#include "log.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" -#include "object/player.hpp" #include "audio/sound_manager.hpp" -#include "sector.hpp" +#include "object/player.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" #include @@ -37,16 +29,10 @@ static const float JUMP_ON_SPEED_Y = -400; static const float JUMP_OFF_SPEED_Y = -500; static const std::string LAND_ON_TOTEM_SOUND = "sounds/totem.ogg"; -Totem::Totem(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/totem/totem.sprite") -{ - carrying = 0; - carried_by = 0; - sound_manager->preload( LAND_ON_TOTEM_SOUND ); -} - -Totem::Totem(const Totem& other) - : BadGuy(other), carrying(other.carrying), carried_by(other.carried_by) +Totem::Totem(const Reader& reader) : + BadGuy(reader, "images/creatures/totem/totem.sprite"), + carrying(0), + carried_by(0) { sound_manager->preload( LAND_ON_TOTEM_SOUND ); } @@ -72,17 +58,6 @@ Totem::updatePointers(const GameObject* from_object, GameObject* to_object) } void -Totem::write(lisp::Writer& writer) -{ - writer.start_list("totem"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - - writer.end_list("totem"); -} - -void Totem::initialize() { if (!carried_by) { @@ -249,7 +224,6 @@ Totem::jump_on(Totem* target) sound_manager->play( LAND_ON_TOTEM_SOUND , get_pos()); - this->synchronize_with(target); } @@ -267,7 +241,6 @@ Totem::jump_off() { this->initialize(); bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height()); - physic.set_velocity_y(JUMP_OFF_SPEED_Y); } @@ -288,5 +261,6 @@ Totem::synchronize_with(Totem* base) physic.set_velocity_y(base->physic.get_velocity_y()); } +IMPLEMENT_FACTORY(Totem, "totem"); -IMPLEMENT_FACTORY(Totem, "totem") +/* EOF */ diff --git a/src/badguy/totem.hpp b/src/badguy/totem.hpp index 74022c50e..b2dec4cbe 100644 --- a/src/badguy/totem.hpp +++ b/src/badguy/totem.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - "Totem" Badguy // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,14 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. +// along with this program. If not, see . -#ifndef __TOTEM_H__ -#define __TOTEM_H__ +#ifndef HEADER_SUPERTUX_BADGUY_TOTEM_HPP +#define HEADER_SUPERTUX_BADGUY_TOTEM_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" /** * "Totem" Badguy - A variable-height stack of wooden blocks @@ -29,23 +25,17 @@ class Totem : public BadGuy { public: - Totem(const lisp::Lisp& reader); - Totem(const Totem& totem); + Totem(const Reader& reader); ~Totem(); void initialize(); void active_update(float elapsed_time); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); - virtual Totem* clone() const { return new Totem(*this); } virtual bool updatePointers(const GameObject* from_object, GameObject* to_object); protected: - Totem* carrying; /**< Totem we are currently carrying (or 0) */ - Totem* carried_by; /**< Totem by which we are currently carried (or 0) */ - bool collision_squished(GameObject& object); void kill_fall(); @@ -53,6 +43,16 @@ protected: void jump_off(); /**< jump off current base */ void synchronize_with(Totem* baseTotem); /**< synchronize position and movement with baseTotem */ + +private: + Totem* carrying; /**< Totem we are currently carrying (or 0) */ + Totem* carried_by; /**< Totem by which we are currently carried (or 0) */ + +private: + Totem(const Totem&); + Totem& operator=(const Totem&); }; #endif + +/* EOF */ diff --git a/src/badguy/treewillowisp.cpp b/src/badguy/treewillowisp.cpp index f25ea5323..ff8410886 100644 --- a/src/badguy/treewillowisp.cpp +++ b/src/badguy/treewillowisp.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - "Will-O-Wisp" Badguy // Copyright (C) 2007 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,20 +12,15 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. -#include +// along with this program. If not, see . -#include "treewillowisp.hpp" +#include "badguy/treewillowisp.hpp" -#include "ghosttree.hpp" -#include "object/lantern.hpp" +#include "audio/sound_manager.hpp" #include "audio/sound_source.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" +#include "badguy/ghosttree.hpp" +#include "object/lantern.hpp" #include "object/player.hpp" -#include "audio/sound_manager.hpp" #include "sprite/sprite.hpp" #include @@ -36,9 +29,18 @@ static const std::string SOUNDFILE = "sounds/willowisp.wav"; static const float SUCKSPEED = 25; TreeWillOWisp::TreeWillOWisp(GhostTree* tree, const Vector& pos, - float radius, float speed) - : BadGuy(tree->get_pos() + pos, "images/creatures/willowisp/willowisp.sprite", - LAYER_OBJECTS - 20), was_sucked(false), mystate(STATE_DEFAULT), tree(tree) + float radius, float speed) : + BadGuy(tree->get_pos() + pos, "images/creatures/willowisp/willowisp.sprite", + LAYER_OBJECTS - 20), + was_sucked(false), + mystate(STATE_DEFAULT), + color(), + angle(), + radius(), + speed(), + sound_source(), + tree(tree), + suck_target() { sound_manager->preload(SOUNDFILE); @@ -162,3 +164,4 @@ TreeWillOWisp::get_color() const return color; } +/* EOF */ diff --git a/src/badguy/treewillowisp.hpp b/src/badguy/treewillowisp.hpp index facd07a50..05b287608 100644 --- a/src/badguy/treewillowisp.hpp +++ b/src/badguy/treewillowisp.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - "Will-O-Wisp" Badguy // Copyright (C) 2007 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,14 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. +// along with this program. If not, see . -#ifndef __TREEWILLOWISP_H__ -#define __TREEWILLOWISP_H__ +#ifndef HEADER_SUPERTUX_BADGUY_TREEWILLOWISP_HPP +#define HEADER_SUPERTUX_BADGUY_TREEWILLOWISP_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class GhostTree; class SoundSource; @@ -39,7 +35,6 @@ public: */ void vanish(); void start_sucking(Vector suck_target); - bool was_sucked; void active_update(float elapsed_time); void set_color(const Color& color); @@ -59,6 +54,11 @@ private: enum MyState { STATE_DEFAULT, STATE_VANISHING, STATE_SUCKED }; + +public: + bool was_sucked; + +private: MyState mystate; Color color; @@ -70,7 +70,12 @@ private: GhostTree* tree; Vector suck_target; + +private: + TreeWillOWisp(const TreeWillOWisp&); + TreeWillOWisp& operator=(const TreeWillOWisp&); }; #endif +/* EOF */ diff --git a/src/badguy/walking_badguy.cpp b/src/badguy/walking_badguy.cpp index e68b1d17c..90ba94d3e 100644 --- a/src/badguy/walking_badguy.cpp +++ b/src/badguy/walking_badguy.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - WalkingBadguy // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,38 +12,56 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" -#include "log.hpp" -#include "timer.hpp" -#include "lisp/writer.hpp" #include "sprite/sprite.hpp" -WalkingBadguy::WalkingBadguy(const Vector& pos, const std::string& sprite_name, const std::string& walk_left_action, const std::string& walk_right_action, int layer) - : BadGuy(pos, sprite_name, layer), walk_left_action(walk_left_action), walk_right_action(walk_right_action), walk_speed(80), max_drop_height(-1) -{ -} - -WalkingBadguy::WalkingBadguy(const Vector& pos, Direction direction, const std::string& sprite_name, const std::string& walk_left_action, const std::string& walk_right_action, int layer) - : BadGuy(pos, direction, sprite_name, layer), walk_left_action(walk_left_action), walk_right_action(walk_right_action), walk_speed(80), max_drop_height(-1) +WalkingBadguy::WalkingBadguy(const Vector& pos, + const std::string& sprite_name, + const std::string& walk_left_action, + const std::string& walk_right_action, + int layer) : + BadGuy(pos, sprite_name, layer), + walk_left_action(walk_left_action), + walk_right_action(walk_right_action), + walk_speed(80), + max_drop_height(-1), + turn_around_timer(), + turn_around_counter() { } -WalkingBadguy::WalkingBadguy(const lisp::Lisp& reader, const std::string& sprite_name, const std::string& walk_left_action, const std::string& walk_right_action, int layer) - : BadGuy(reader, sprite_name, layer), walk_left_action(walk_left_action), walk_right_action(walk_right_action), walk_speed(80), max_drop_height(-1) +WalkingBadguy::WalkingBadguy(const Vector& pos, + Direction direction, + const std::string& sprite_name, + const std::string& walk_left_action, + const std::string& walk_right_action, + int layer) : + BadGuy(pos, direction, sprite_name, layer), + walk_left_action(walk_left_action), + walk_right_action(walk_right_action), + walk_speed(80), + max_drop_height(-1), + turn_around_timer(), + turn_around_counter() { } -void -WalkingBadguy::write(lisp::Writer& writer) +WalkingBadguy::WalkingBadguy(const Reader& reader, + const std::string& sprite_name, + const std::string& walk_left_action, + const std::string& walk_right_action, + int layer) : + BadGuy(reader, sprite_name, layer), + walk_left_action(walk_left_action), + walk_right_action(walk_right_action), + walk_speed(80), + max_drop_height(-1), + turn_around_timer(), + turn_around_counter() { - writer.write("x", start_position.x); - writer.write("y", start_position.y); } void @@ -135,7 +151,6 @@ WalkingBadguy::unfreeze() WalkingBadguy::initialize(); } - float WalkingBadguy::get_velocity_y() const { @@ -147,3 +162,5 @@ WalkingBadguy::set_velocity_y(float vy) { physic.set_velocity_y(vy); } + +/* EOF */ diff --git a/src/badguy/walking_badguy.hpp b/src/badguy/walking_badguy.hpp index f5a7eb627..f31607833 100644 --- a/src/badguy/walking_badguy.hpp +++ b/src/badguy/walking_badguy.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - WalkingBadguy // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,13 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __WALKING_BADGUY_H__ -#define __WALKING_BADGUY_H__ +#ifndef HEADER_SUPERTUX_BADGUY_WALKING_BADGUY_HPP +#define HEADER_SUPERTUX_BADGUY_WALKING_BADGUY_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class Timer; @@ -30,12 +27,23 @@ class Timer; class WalkingBadguy : public BadGuy { public: - WalkingBadguy(const Vector& pos, const std::string& sprite_name, const std::string& walk_left_action, const std::string& walk_right_action, int layer = LAYER_OBJECTS); - WalkingBadguy(const Vector& pos, Direction direction, const std::string& sprite_name, const std::string& walk_left_action, const std::string& walk_right_action, int layer = LAYER_OBJECTS); - WalkingBadguy(const lisp::Lisp& reader, const std::string& sprite_name, const std::string& walk_left_action, const std::string& walk_right_action, int layer = LAYER_OBJECTS); + WalkingBadguy(const Vector& pos, + const std::string& sprite_name, + const std::string& walk_left_action, + const std::string& walk_right_action, + int layer = LAYER_OBJECTS); + WalkingBadguy(const Vector& pos, Direction direction, + const std::string& sprite_name, + const std::string& walk_left_action, + const std::string& walk_right_action, + int layer = LAYER_OBJECTS); + WalkingBadguy(const Reader& reader, + const std::string& sprite_name, + const std::string& walk_left_action, + const std::string& walk_right_action, + int layer = LAYER_OBJECTS); void initialize(); - void write(lisp::Writer& writer); void active_update(float elapsed_time); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); @@ -48,6 +56,7 @@ public: protected: void turn_around(); +protected: std::string walk_left_action; std::string walk_right_action; float walk_speed; @@ -57,3 +66,5 @@ protected: }; #endif + +/* EOF */ diff --git a/src/badguy/walkingleaf.cpp b/src/badguy/walkingleaf.cpp index e505ecdd0..3df2c2aca 100644 --- a/src/badguy/walkingleaf.cpp +++ b/src/badguy/walkingleaf.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Walking Leaf // Copyright (C) 2006 Wolfgang Becker // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,26 +12,22 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "walkingleaf.hpp" +#include "badguy/walkingleaf.hpp" -#include "random_generator.hpp" #include "object/sprite_particle.hpp" -#include "object_factory.hpp" +#include "supertux/object_factory.hpp" -WalkingLeaf::WalkingLeaf(const lisp::Lisp& reader) - : WalkingBadguy(reader, "images/creatures/walkingleaf/walkingleaf.sprite", "left", "right") +WalkingLeaf::WalkingLeaf(const Reader& reader) : + WalkingBadguy(reader, "images/creatures/walkingleaf/walkingleaf.sprite", "left", "right") { walk_speed = 60; max_drop_height = 16; } WalkingLeaf::WalkingLeaf(const Vector& pos, Direction d) - : WalkingBadguy(pos, d, "images/creatures/walkingleaf/walkingleaf.sprite", "left", "right") + : WalkingBadguy(pos, d, "images/creatures/walkingleaf/walkingleaf.sprite", "left", "right") { walk_speed = 60; max_drop_height = 16; @@ -47,4 +41,6 @@ WalkingLeaf::collision_squished(GameObject& object) return true; } -IMPLEMENT_FACTORY(WalkingLeaf, "walkingleaf") +IMPLEMENT_FACTORY(WalkingLeaf, "walkingleaf"); + +/* EOF */ diff --git a/src/badguy/walkingleaf.hpp b/src/badguy/walkingleaf.hpp index e2b84b1e8..88d1d7120 100644 --- a/src/badguy/walkingleaf.hpp +++ b/src/badguy/walkingleaf.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Walking Leaf // Copyright (C) 2006 Wolfgang Becker // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,13 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __WALKINGLEAF_H__ -#define __WALKINGLEAF_H__ +#ifndef HEADER_SUPERTUX_BADGUY_WALKINGLEAF_HPP +#define HEADER_SUPERTUX_BADGUY_WALKINGLEAF_HPP -#include "walking_badguy.hpp" +#include "badguy/walking_badguy.hpp" /* * Easy to kill badguy that does not jump down from it's ledge. @@ -28,14 +25,14 @@ class WalkingLeaf : public WalkingBadguy { public: - WalkingLeaf(const lisp::Lisp& reader); + WalkingLeaf(const Reader& reader); WalkingLeaf(const Vector& pos, Direction d); - virtual WalkingLeaf* clone() const { return new WalkingLeaf(*this); } - protected: bool collision_squished(GameObject& object); }; #endif + +/* EOF */ diff --git a/src/badguy/willowisp.cpp b/src/badguy/willowisp.cpp index db467e7f9..bb48cb43c 100644 --- a/src/badguy/willowisp.cpp +++ b/src/badguy/willowisp.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - "Will-O-Wisp" Badguy // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,34 +12,38 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. -#include +// along with this program. If not, see . -#include "willowisp.hpp" +#include "badguy/willowisp.hpp" -#include "log.hpp" -#include "game_session.hpp" +#include "audio/sound_manager.hpp" +#include "audio/sound_source.hpp" #include "object/lantern.hpp" +#include "object/path_walker.hpp" #include "object/player.hpp" #include "scripting/squirrel_util.hpp" -#include "object/path.hpp" -#include "object/path_walker.hpp" -#include "audio/sound_source.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" -#include "audio/sound_manager.hpp" -#include "sector.hpp" #include "sprite/sprite.hpp" +#include "supertux/game_session.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" static const float FLYSPEED = 64; /**< speed in px per second */ static const float TRACK_RANGE = 384; /**< at what distance to start tracking the player */ static const float VANISH_RANGE = 512; /**< at what distance to stop tracking and vanish */ static const std::string SOUNDFILE = "sounds/willowisp.wav"; -WillOWisp::WillOWisp(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/willowisp/willowisp.sprite", LAYER_FLOATINGOBJECTS), mystate(STATE_IDLE), target_sector("main"), target_spawnpoint("main") +WillOWisp::WillOWisp(const Reader& reader) : + BadGuy(reader, "images/creatures/willowisp/willowisp.sprite", LAYER_FLOATINGOBJECTS), + mystate(STATE_IDLE), + target_sector("main"), + target_spawnpoint("main"), + hit_script(), + sound_source(), + path(), + walker(), + flyspeed(), + track_range(), + vanish_range() { bool running = false; flyspeed = FLYSPEED; @@ -96,54 +98,54 @@ WillOWisp::active_update(float elapsed_time) Vector dist = (p2 - p1); switch(mystate) { - case STATE_STOPPED: - break; + case STATE_STOPPED: + break; - case STATE_IDLE: - if (dist.norm() <= track_range) { - mystate = STATE_TRACKING; - } - break; + case STATE_IDLE: + if (dist.norm() <= track_range) { + mystate = STATE_TRACKING; + } + break; - case STATE_TRACKING: - if (dist.norm() > vanish_range) { - vanish(); - } else if (dist.norm() >= 1) { - Vector dir = dist.unit(); - movement = dir * elapsed_time * flyspeed; - } else { - /* We somehow landed right on top of the player without colliding. - * Sit tight and avoid a division by zero. */ - } - sound_source->set_position(get_pos()); - break; + case STATE_TRACKING: + if (dist.norm() > vanish_range) { + vanish(); + } else if (dist.norm() >= 1) { + Vector dir = dist.unit(); + movement = dir * elapsed_time * flyspeed; + } else { + /* We somehow landed right on top of the player without colliding. + * Sit tight and avoid a division by zero. */ + } + sound_source->set_position(get_pos()); + break; - case STATE_WARPING: - if(sprite->animation_done()) { - remove_me(); - } + case STATE_WARPING: + if(sprite->animation_done()) { + remove_me(); + } - case STATE_VANISHING: { - Vector dir = dist.unit(); - movement = dir * elapsed_time * flyspeed; - if(sprite->animation_done()) { - remove_me(); + case STATE_VANISHING: { + Vector dir = dist.unit(); + movement = dir * elapsed_time * flyspeed; + if(sprite->animation_done()) { + remove_me(); + } + break; } - break; - } - case STATE_PATHMOVING: - case STATE_PATHMOVING_TRACK: - if(walker.get() == NULL) - return; - movement = walker->advance(elapsed_time) - get_pos(); - if(mystate == STATE_PATHMOVING_TRACK && dist.norm() <= track_range) { - mystate = STATE_TRACKING; - } - break; + case STATE_PATHMOVING: + case STATE_PATHMOVING_TRACK: + if(walker.get() == NULL) + return; + movement = walker->advance(elapsed_time) - get_pos(); + if(mystate == STATE_PATHMOVING_TRACK && dist.norm() <= track_range) { + mystate = STATE_TRACKING; + } + break; - default: - assert(false); + default: + assert(false); } } @@ -263,7 +265,7 @@ WillOWisp::set_state(const std::string& new_state) } else { std::ostringstream msg; msg << "Can't set unknown willowisp state '" << new_state << "', should " - "be stopped, move_path, move_path_track or normal"; + "be stopped, move_path, move_path_track or normal"; throw new std::runtime_error(msg.str()); } } @@ -289,4 +291,6 @@ WillOWisp::unexpose(HSQUIRRELVM vm, SQInteger table_idx) Scripting::unexpose_object(vm, table_idx, name); } -IMPLEMENT_FACTORY(WillOWisp, "willowisp") +IMPLEMENT_FACTORY(WillOWisp, "willowisp"); + +/* EOF */ diff --git a/src/badguy/willowisp.hpp b/src/badguy/willowisp.hpp index a5ca159b8..9076e6a8f 100644 --- a/src/badguy/willowisp.hpp +++ b/src/badguy/willowisp.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - "Will-O-Wisp" Badguy // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,27 +12,26 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. +// along with this program. If not, see . -#ifndef __WILLOWISP_H__ -#define __WILLOWISP_H__ +#ifndef HEADER_SUPERTUX_BADGUY_WILLOWISP_HPP +#define HEADER_SUPERTUX_BADGUY_WILLOWISP_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class Path; class PathWalker; class SoundSource; -#include "script_interface.hpp" #include "scripting/willowisp.hpp" +#include "supertux/script_interface.hpp" -class WillOWisp : public BadGuy, public Scripting::WillOWisp, +class WillOWisp : public BadGuy, + public Scripting::WillOWisp, public ScriptInterface { public: - WillOWisp(const lisp::Lisp& reader); + WillOWisp(const Reader& reader); void activate(); void deactivate(); @@ -68,6 +65,8 @@ private: STATE_STOPPED, STATE_IDLE, STATE_TRACKING, STATE_VANISHING, STATE_WARPING, STATE_PATHMOVING, STATE_PATHMOVING_TRACK }; + +private: MyState mystate; std::string target_sector; @@ -85,3 +84,5 @@ private: }; #endif + +/* EOF */ diff --git a/src/badguy/yeti.cpp b/src/badguy/yeti.cpp index f6cc57adc..08631e55d 100644 --- a/src/badguy/yeti.cpp +++ b/src/badguy/yeti.cpp @@ -1,13 +1,11 @@ -// $Id$ -// // SuperTux - Boss "Yeti" // Copyright (C) 2005 Matthias Braun // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,53 +13,52 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "yeti.hpp" +#include "badguy/yeti.hpp" -#include "object/camera.hpp" -#include "yeti_stalactite.hpp" -#include "bouncing_snowball.hpp" -#include "game_session.hpp" -#include "level.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" #include "audio/sound_manager.hpp" -#include "sector.hpp" +#include "badguy/bouncing_snowball.hpp" +#include "badguy/yeti_stalactite.hpp" +#include "object/camera.hpp" #include "object/player.hpp" #include "sprite/sprite.hpp" +#include "supertux/object_factory.hpp" +#include "supertux/sector.hpp" -#include #include +#include namespace { - const float JUMP_DOWN_VX = 250; /**< horizontal speed while jumping off the dais */ - const float JUMP_DOWN_VY = -250; /**< vertical speed while jumping off the dais */ +const float JUMP_DOWN_VX = 250; /**< horizontal speed while jumping off the dais */ +const float JUMP_DOWN_VY = -250; /**< vertical speed while jumping off the dais */ - const float RUN_VX = 350; /**< horizontal speed while running */ +const float RUN_VX = 350; /**< horizontal speed while running */ - const float JUMP_UP_VX = 350; /**< horizontal speed while jumping on the dais */ - const float JUMP_UP_VY = -800; /**< vertical speed while jumping on the dais */ +const float JUMP_UP_VX = 350; /**< horizontal speed while jumping on the dais */ +const float JUMP_UP_VY = -800; /**< vertical speed while jumping on the dais */ - const float STOMP_VY = -250; /** vertical speed while stomping on the dais */ +const float STOMP_VY = -250; /** vertical speed while stomping on the dais */ - const float LEFT_STAND_X = 16; /**< x-coordinate of left dais' end position */ - const float RIGHT_STAND_X = 800-60-16; /**< x-coordinate of right dais' end position */ - const float LEFT_JUMP_X = LEFT_STAND_X+224; /**< x-coordinate of from where to jump on the left dais */ - const float RIGHT_JUMP_X = RIGHT_STAND_X-224; /**< x-coordinate of from where to jump on the right dais */ - const float STOMP_WAIT = .5; /**< time we stay on the dais before jumping again */ - const float SAFE_TIME = .5; /**< the time we are safe when tux just hit us */ - const int INITIAL_HITPOINTS = 3; /**< number of hits we can take */ +const float LEFT_STAND_X = 16; /**< x-coordinate of left dais' end position */ +const float RIGHT_STAND_X = 800-60-16; /**< x-coordinate of right dais' end position */ +const float LEFT_JUMP_X = LEFT_STAND_X+224; /**< x-coordinate of from where to jump on the left dais */ +const float RIGHT_JUMP_X = RIGHT_STAND_X-224; /**< x-coordinate of from where to jump on the right dais */ +const float STOMP_WAIT = .5; /**< time we stay on the dais before jumping again */ +const float SAFE_TIME = .5; /**< the time we are safe when tux just hit us */ +const int INITIAL_HITPOINTS = 3; /**< number of hits we can take */ - const float SQUISH_TIME = 5; +const float SQUISH_TIME = 5; } -Yeti::Yeti(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/yeti/yeti.sprite") +Yeti::Yeti(const Reader& reader) : + BadGuy(reader, "images/creatures/yeti/yeti.sprite"), + state(), + state_timer(), + safe_timer(), + stomp_count(), + hit_points(), + hud_head() { hit_points = INITIAL_HITPOINTS; countMe = false; @@ -245,17 +242,6 @@ Yeti::kill_fall() } void -Yeti::write(lisp::Writer& writer) -{ - writer.start_list("yeti"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - - writer.end_list("yeti"); -} - -void Yeti::drop_stalactite() { // make a stalactite falling down and shake camera a bit @@ -324,4 +310,6 @@ Yeti::collision_solid(const CollisionHit& hit) } } -IMPLEMENT_FACTORY(Yeti, "yeti") +IMPLEMENT_FACTORY(Yeti, "yeti"); + +/* EOF */ diff --git a/src/badguy/yeti.hpp b/src/badguy/yeti.hpp index 3d55f4e43..ac2603b53 100644 --- a/src/badguy/yeti.hpp +++ b/src/badguy/yeti.hpp @@ -1,13 +1,11 @@ -// $Id$ -// // SuperTux - Boss "Yeti" // Copyright (C) 2005 Matthias Braun // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,24 +13,22 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#ifndef __YETI_H__ -#define __YETI_H__ +// along with this program. If not, see . -#include "badguy.hpp" +#ifndef HEADER_SUPERTUX_BADGUY_YETI_HPP +#define HEADER_SUPERTUX_BADGUY_YETI_HPP #include +#include "badguy/badguy.hpp" + class Yeti : public BadGuy { public: - Yeti(const lisp::Lisp& lisp); + Yeti(const Reader& lisp); ~Yeti(); void draw(DrawingContext& context); - void write(lisp::Writer& writer); void initialize(); void active_update(float elapsed_time); void collision_solid(const CollisionHit& hit); @@ -40,8 +36,6 @@ public: void kill_squished(GameObject& object); void kill_fall(); - virtual Yeti* clone() const { return new Yeti((Yeti&)*this); } - private: void run(); void jump_up(); @@ -54,6 +48,7 @@ private: void take_hit(Player& player); +private: enum YetiState { JUMP_DOWN, RUN, @@ -61,6 +56,8 @@ private: BE_ANGRY, SQUISHED }; + +private: YetiState state; Timer state_timer; Timer safe_timer; @@ -70,3 +67,5 @@ private: }; #endif + +/* EOF */ diff --git a/src/badguy/yeti_stalactite.cpp b/src/badguy/yeti_stalactite.cpp index 7bf96f7fa..6673a272e 100644 --- a/src/badguy/yeti_stalactite.cpp +++ b/src/badguy/yeti_stalactite.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,17 +12,15 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#include "yeti_stalactite.hpp" +#include "badguy/yeti_stalactite.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" +#include "supertux/object_factory.hpp" static const float SHAKE_TIME = .8f; -YetiStalactite::YetiStalactite(const lisp::Lisp& lisp) +YetiStalactite::YetiStalactite(const Reader& lisp) : Stalactite(lisp) { } @@ -34,15 +30,6 @@ YetiStalactite::~YetiStalactite() } void -YetiStalactite::write(lisp::Writer& writer) -{ - writer.start_list("yeti_stalactite"); - writer.write("x", start_position.x); - writer.write("y", start_position.y); - writer.end_list("yeti_stalactite"); -} - -void YetiStalactite::start_shaking() { timer.start(SHAKE_TIME); @@ -64,4 +51,6 @@ YetiStalactite::active_update(float elapsed_time) Stalactite::active_update(elapsed_time); } -IMPLEMENT_FACTORY(YetiStalactite, "yeti_stalactite") +IMPLEMENT_FACTORY(YetiStalactite, "yeti_stalactite"); + +/* EOF */ diff --git a/src/badguy/yeti_stalactite.hpp b/src/badguy/yeti_stalactite.hpp index 04897c0e8..ab620f530 100644 --- a/src/badguy/yeti_stalactite.hpp +++ b/src/badguy/yeti_stalactite.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,27 +12,24 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - +// along with this program. If not, see . -#ifndef __YETI_STALACTITE_H__ -#define __YETI_STALACTITE_H__ +#ifndef HEADER_SUPERTUX_BADGUY_YETI_STALACTITE_HPP +#define HEADER_SUPERTUX_BADGUY_YETI_STALACTITE_HPP -#include "stalactite.hpp" +#include "badguy/stalactite.hpp" class YetiStalactite : public Stalactite { public: - YetiStalactite(const lisp::Lisp& lisp); + YetiStalactite(const Reader& lisp); virtual ~YetiStalactite(); - void write(lisp::Writer& ); void active_update(float elapsed_time); void start_shaking(); bool is_hanging(); - - virtual YetiStalactite* clone() const { return new YetiStalactite(*this); } }; #endif + +/* EOF */ diff --git a/src/badguy/zeekling.cpp b/src/badguy/zeekling.cpp index cc13f88c3..69cba10f3 100644 --- a/src/badguy/zeekling.cpp +++ b/src/badguy/zeekling.cpp @@ -1,13 +1,11 @@ -// $Id$ -// // Zeekling - flyer that swoops down when she spots the player // Copyright (C) 2005 Matthias Braun // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,32 +13,39 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "zeekling.hpp" +#include "badguy/zeekling.hpp" #include -#include "random_generator.hpp" -#include "lisp/writer.hpp" -#include "object_factory.hpp" +#include "math/random_generator.hpp" #include "object/player.hpp" #include "sprite/sprite.hpp" - -Zeekling::Zeekling(const lisp::Lisp& reader) - : BadGuy(reader, "images/creatures/zeekling/zeekling.sprite"), last_player(0) +#include "supertux/object_factory.hpp" + +Zeekling::Zeekling(const Reader& reader) : + BadGuy(reader, "images/creatures/zeekling/zeekling.sprite"), + speed(), + diveRecoverTimer(), + state(), + last_player(0), + last_player_pos(), + last_self_pos() { state = FLYING; speed = systemRandom.rand(130, 171); physic.enable_gravity(false); } -Zeekling::Zeekling(const Vector& pos, Direction d) - : BadGuy(pos, d, "images/creatures/zeekling/zeekling.sprite"), last_player(0) +Zeekling::Zeekling(const Vector& pos, Direction d) : + BadGuy(pos, d, "images/creatures/zeekling/zeekling.sprite"), + speed(), + diveRecoverTimer(), + state(), + last_player(0), + last_player_pos(), + last_self_pos() { state = FLYING; speed = systemRandom.rand(130, 171); @@ -48,17 +53,6 @@ Zeekling::Zeekling(const Vector& pos, Direction d) } void -Zeekling::write(lisp::Writer& writer) -{ - writer.start_list("zeekling"); - - writer.write("x", start_position.x); - writer.write("y", start_position.y); - - writer.end_list("zeekling"); -} - -void Zeekling::initialize() { physic.set_velocity_x(dir == LEFT ? -speed : speed); @@ -81,20 +75,20 @@ Zeekling::onBumpHorizontal() { sprite->set_action(dir == LEFT ? "left" : "right"); physic.set_velocity_x(dir == LEFT ? -speed : speed); } else - if (state == DIVING) { - dir = (dir == LEFT ? RIGHT : LEFT); - state = FLYING; - sprite->set_action(dir == LEFT ? "left" : "right"); - physic.set_velocity_x(dir == LEFT ? -speed : speed); - physic.set_velocity_y(0); - } else - if (state == CLIMBING) { - dir = (dir == LEFT ? RIGHT : LEFT); - sprite->set_action(dir == LEFT ? "left" : "right"); - physic.set_velocity_x(dir == LEFT ? -speed : speed); - } else { - assert(false); - } + if (state == DIVING) { + dir = (dir == LEFT ? RIGHT : LEFT); + state = FLYING; + sprite->set_action(dir == LEFT ? "left" : "right"); + physic.set_velocity_x(dir == LEFT ? -speed : speed); + physic.set_velocity_y(0); + } else + if (state == CLIMBING) { + dir = (dir == LEFT ? RIGHT : LEFT); + sprite->set_action(dir == LEFT ? "left" : "right"); + physic.set_velocity_x(dir == LEFT ? -speed : speed); + } else { + assert(false); + } } void @@ -102,15 +96,15 @@ Zeekling::onBumpVertical() { if (state == FLYING) { physic.set_velocity_y(0); } else - if (state == DIVING) { - state = CLIMBING; - physic.set_velocity_y(-speed); - sprite->set_action(dir == LEFT ? "left" : "right"); - } else - if (state == CLIMBING) { - state = FLYING; - physic.set_velocity_y(0); - } + if (state == DIVING) { + state = CLIMBING; + physic.set_velocity_y(-speed); + sprite->set_action(dir == LEFT ? "left" : "right"); + } else + if (state == CLIMBING) { + state = FLYING; + physic.set_velocity_y(0); + } } void @@ -201,4 +195,6 @@ Zeekling::active_update(float elapsed_time) { } } -IMPLEMENT_FACTORY(Zeekling, "zeekling") +IMPLEMENT_FACTORY(Zeekling, "zeekling"); + +/* EOF */ diff --git a/src/badguy/zeekling.hpp b/src/badguy/zeekling.hpp index 3979dd19e..0f68f8a86 100644 --- a/src/badguy/zeekling.hpp +++ b/src/badguy/zeekling.hpp @@ -1,13 +1,11 @@ -// $Id$ -// // Zeekling - flyer that swoops down when she spots the player // Copyright (C) 2005 Matthias Braun // Copyright (C) 2006 Christoph Sommer // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,49 +13,49 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. +// along with this program. If not, see . -#ifndef __ZEEKLING_H__ -#define __ZEEKLING_H__ +#ifndef HEADER_SUPERTUX_BADGUY_ZEEKLING_HPP +#define HEADER_SUPERTUX_BADGUY_ZEEKLING_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" class Zeekling : public BadGuy { public: - Zeekling(const lisp::Lisp& reader); + Zeekling(const Reader& reader); Zeekling(const Vector& pos, Direction d); void initialize(); - void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); void active_update(float elapsed_time); - virtual Zeekling* clone() const { return new Zeekling(*this); } - -protected: +private: bool collision_squished(GameObject& object); - float speed; - - Timer diveRecoverTimer; + bool should_we_dive(); + void onBumpHorizontal(); + void onBumpVertical(); +private: enum ZeeklingState { FLYING, DIVING, CLIMBING }; - ZeeklingState state; private: + float speed; + Timer diveRecoverTimer; + ZeeklingState state; const MovingObject* last_player; /**< last player we tracked */ Vector last_player_pos; /**< position we last spotted the player at */ Vector last_self_pos; /**< position we last were at */ - bool should_we_dive(); - void onBumpHorizontal(); - void onBumpVertical(); +private: + Zeekling(const Zeekling&); + Zeekling& operator=(const Zeekling&); }; #endif + +/* EOF */ diff --git a/src/colorscheme.cpp b/src/colorscheme.cpp deleted file mode 100644 index 228470476..000000000 --- a/src/colorscheme.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "video/color.hpp" - -namespace LevelIntro { - Color header_color(1.0,1.0,0.6); - Color author_color(1.0,1.0,1.0); - Color stat_hdr_color(0.2,0.5,1.0); - Color stat_color(1.0,1.0,1.0); -} - -namespace Statistics { - Color header_color(1.0,1.0,1.0); - Color text_color(1.0,1.0,0.6); -} - -namespace Menu { - Color default_color(1.0,1.0,1.0); - Color active_color(0.2,0.5,1.0); - Color inactive_color(0.5,0.5,0.5); - Color label_color(0.0,1.0,1.0); - Color field_color(1.0,1.0,0.6); -} - -namespace PlayerStatus { - Color text_color(1.0,1.0,0.6); -} - -namespace TextObject { - Color default_color(1.0,1.0,1.0); -} - -namespace FloatingText { - Color text_color(1.0,1.0,0.6); -} - -namespace LevelTime { - Color text_color(1.0,1.0,0.6); -} - -namespace SecretAreaTrigger { - Color text_color(1.0,1.0,0.6); -} - -namespace Climbable { - Color text_color(1.0,1.0,0.6); -} - -namespace WorldMapNS { - namespace WorldMap { - Color level_title_color(1.0,1.0,1.0); - Color message_color(1.0,1.0,0.6); - Color teleporter_message_color(1.0,1.0,1.0); -}} - -namespace TextScroller { - Color small_color(1.0,1.0,1.0); - Color heading_color(1.0,1.0,0.6); - Color reference_color(0.2,0.6,1.0); - Color normal_color(1.0,1.0,1.0); -} - diff --git a/src/control/codecontroller.cpp b/src/control/codecontroller.cpp index 81bbfeb83..52b07a731 100644 --- a/src/control/codecontroller.cpp +++ b/src/control/codecontroller.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,12 +12,9 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "codecontroller.hpp" +#include "control/codecontroller.hpp" CodeController::CodeController() {} @@ -41,3 +36,5 @@ CodeController::update() for(int i = 0; i < CONTROLCOUNT; ++i) controls[i] = false; } + +/* EOF */ diff --git a/src/control/codecontroller.hpp b/src/control/codecontroller.hpp index 5c34b1727..26e3d8d49 100644 --- a/src/control/codecontroller.hpp +++ b/src/control/codecontroller.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,13 +12,12 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __CODECONTROLLER_H__ -#define __CODECONTROLLER_H__ +#ifndef HEADER_SUPERTUX_CONTROL_CODECONTROLLER_HPP +#define HEADER_SUPERTUX_CONTROL_CODECONTROLLER_HPP -#include "controller.hpp" +#include "control/controller.hpp" /** * This is a dummy controller that doesn't react to any user input but should @@ -37,3 +34,5 @@ public: }; #endif + +/* EOF */ diff --git a/src/control/controller.cpp b/src/control/controller.cpp index 11cfd6557..b936ee81f 100644 --- a/src/control/controller.cpp +++ b/src/control/controller.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,12 +12,9 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "controller.hpp" +#include "control/controller.hpp" const char* Controller::controlNames[] = { "left", @@ -79,3 +74,5 @@ Controller::update() for(int i = 0; i < CONTROLCOUNT; ++i) oldControls[i] = controls[i]; } + +/* EOF */ diff --git a/src/control/controller.hpp b/src/control/controller.hpp index ac0030bd3..2a8d5928b 100644 --- a/src/control/controller.hpp +++ b/src/control/controller.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,11 +12,10 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __CONTROLLER_H__ -#define __CONTROLLER_H__ +#ifndef HEADER_SUPERTUX_CONTROL_CONTROLLER_HPP +#define HEADER_SUPERTUX_CONTROL_CONTROLLER_HPP class Controller { @@ -68,3 +65,5 @@ protected: }; #endif + +/* EOF */ diff --git a/src/control/joystickkeyboardcontroller.cpp b/src/control/joystickkeyboardcontroller.cpp index 3cc65d16a..a8b995029 100644 --- a/src/control/joystickkeyboardcontroller.cpp +++ b/src/control/joystickkeyboardcontroller.cpp @@ -1,13 +1,11 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun , // 2007 Ingo Ruhnke // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,24 +13,18 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "joystickkeyboardcontroller.hpp" +#include "control/joystickkeyboardcontroller.hpp" -#include +#include -#include "log.hpp" #include "gui/menu.hpp" -#include "gettext.hpp" -#include "lisp/writer.hpp" -#include "lisp/lisp.hpp" +#include "util/writer.hpp" #include "lisp/list_iterator.hpp" -#include "game_session.hpp" -#include "console.hpp" -#include "gameconfig.hpp" +#include "supertux/gameconfig.hpp" +#include "supertux/console.hpp" +#include "util/gettext.hpp" namespace{ const int SCAN_JOYSTICKS = Controller::CONTROLCOUNT + 1; @@ -198,7 +190,7 @@ JoystickKeyboardController::updateAvailableJoysticks() } void -JoystickKeyboardController::read(const lisp::Lisp& lisp) +JoystickKeyboardController::read(const Reader& lisp) { const lisp::Lisp* keymap_lisp = lisp.get_lisp("keymap"); if(keymap_lisp) { @@ -288,7 +280,7 @@ JoystickKeyboardController::read(const lisp::Lisp& lisp) } void -JoystickKeyboardController::write(lisp::Writer& writer) +JoystickKeyboardController::write(Writer& writer) { writer.start_list("keymap"); writer.write("jump-with-up", jump_with_up_kbd); @@ -375,72 +367,72 @@ void JoystickKeyboardController::process_button_event(const SDL_JoyButtonEvent& jbutton) { if(wait_for_joystick >= 0) + { + if(jbutton.state == SDL_PRESSED) { - if(jbutton.state == SDL_PRESSED) - { - bind_joybutton(jbutton.button, (Control)wait_for_joystick); - joystick_options_menu->update(); - reset(); - wait_for_joystick = -1; - } - } + bind_joybutton(jbutton.button, (Control)wait_for_joystick); + joystick_options_menu->update(); + reset(); + wait_for_joystick = -1; + } + } else - { - ButtonMap::iterator i = joy_button_map.find(jbutton.button); - if(i == joy_button_map.end()) { - log_debug << "Unmapped joybutton " << (int)jbutton.button << " pressed" << std::endl; - } else { - set_joy_controls(i->second, (jbutton.state == SDL_PRESSED)); - } + { + ButtonMap::iterator i = joy_button_map.find(jbutton.button); + if(i == joy_button_map.end()) { + log_debug << "Unmapped joybutton " << (int)jbutton.button << " pressed" << std::endl; + } else { + set_joy_controls(i->second, (jbutton.state == SDL_PRESSED)); } + } } void JoystickKeyboardController::process_axis_event(const SDL_JoyAxisEvent& jaxis) { if (wait_for_joystick >= 0) - { - if (abs(jaxis.value) > dead_zone) { - if (jaxis.value < 0) - bind_joyaxis(-(jaxis.axis + 1), Control(wait_for_joystick)); - else - bind_joyaxis(jaxis.axis + 1, Control(wait_for_joystick)); - - joystick_options_menu->update(); - wait_for_joystick = -1; - } + { + if (abs(jaxis.value) > dead_zone) { + if (jaxis.value < 0) + bind_joyaxis(-(jaxis.axis + 1), Control(wait_for_joystick)); + else + bind_joyaxis(jaxis.axis + 1, Control(wait_for_joystick)); + + joystick_options_menu->update(); + wait_for_joystick = -1; } + } else - { - // Split the axis into left and right, so that both can be - // mapped separately (needed for jump/down vs up/down) - int axis = jaxis.axis + 1; - - AxisMap::iterator left = joy_axis_map.find(-axis); - AxisMap::iterator right = joy_axis_map.find(axis); - - if(left == joy_axis_map.end()) { - std::cout << "Unmapped joyaxis " << (int)jaxis.axis << " moved" << std::endl; - } else { - if (jaxis.value < -dead_zone) - set_joy_controls(left->second, true); - else if (jaxis.value > dead_zone) - set_joy_controls(left->second, false); - else - set_joy_controls(left->second, false); - } + { + // Split the axis into left and right, so that both can be + // mapped separately (needed for jump/down vs up/down) + int axis = jaxis.axis + 1; - if(right == joy_axis_map.end()) { - std::cout << "Unmapped joyaxis " << (int)jaxis.axis << " moved" << std::endl; - } else { - if (jaxis.value < -dead_zone) - set_joy_controls(right->second, false); - else if (jaxis.value > dead_zone) - set_joy_controls(right->second, true); - else - set_joy_controls(right->second, false); - } + AxisMap::iterator left = joy_axis_map.find(-axis); + AxisMap::iterator right = joy_axis_map.find(axis); + + if(left == joy_axis_map.end()) { + std::cout << "Unmapped joyaxis " << (int)jaxis.axis << " moved" << std::endl; + } else { + if (jaxis.value < -dead_zone) + set_joy_controls(left->second, true); + else if (jaxis.value > dead_zone) + set_joy_controls(left->second, false); + else + set_joy_controls(left->second, false); + } + + if(right == joy_axis_map.end()) { + std::cout << "Unmapped joyaxis " << (int)jaxis.axis << " moved" << std::endl; + } else { + if (jaxis.value < -dead_zone) + set_joy_controls(right->second, false); + else if (jaxis.value > dead_zone) + set_joy_controls(right->second, true); + else + set_joy_controls(right->second, false); } + } } void @@ -449,52 +441,52 @@ JoystickKeyboardController::process_hat_event(const SDL_JoyHatEvent& jhat) Uint8 changed = hat_state ^ jhat.value; if (wait_for_joystick >= 0) - { - if (changed & SDL_HAT_UP && jhat.value & SDL_HAT_UP) - bind_joyhat(SDL_HAT_UP, (Control)wait_for_joystick); + { + if (changed & SDL_HAT_UP && jhat.value & SDL_HAT_UP) + bind_joyhat(SDL_HAT_UP, (Control)wait_for_joystick); - if (changed & SDL_HAT_DOWN && jhat.value & SDL_HAT_DOWN) - bind_joyhat(SDL_HAT_DOWN, (Control)wait_for_joystick); + if (changed & SDL_HAT_DOWN && jhat.value & SDL_HAT_DOWN) + bind_joyhat(SDL_HAT_DOWN, (Control)wait_for_joystick); - if (changed & SDL_HAT_LEFT && jhat.value & SDL_HAT_LEFT) - bind_joyhat(SDL_HAT_LEFT, (Control)wait_for_joystick); + if (changed & SDL_HAT_LEFT && jhat.value & SDL_HAT_LEFT) + bind_joyhat(SDL_HAT_LEFT, (Control)wait_for_joystick); - if (changed & SDL_HAT_RIGHT && jhat.value & SDL_HAT_RIGHT) - bind_joyhat(SDL_HAT_RIGHT, (Control)wait_for_joystick); + if (changed & SDL_HAT_RIGHT && jhat.value & SDL_HAT_RIGHT) + bind_joyhat(SDL_HAT_RIGHT, (Control)wait_for_joystick); - joystick_options_menu->update(); - wait_for_joystick = -1; - } + joystick_options_menu->update(); + wait_for_joystick = -1; + } else + { + if (changed & SDL_HAT_UP) { - if (changed & SDL_HAT_UP) - { - HatMap::iterator it = joy_hat_map.find(SDL_HAT_UP); - if (it != joy_hat_map.end()) - set_joy_controls(it->second, jhat.value & SDL_HAT_UP); - } + HatMap::iterator it = joy_hat_map.find(SDL_HAT_UP); + if (it != joy_hat_map.end()) + set_joy_controls(it->second, jhat.value & SDL_HAT_UP); + } - if (changed & SDL_HAT_DOWN) - { - HatMap::iterator it = joy_hat_map.find(SDL_HAT_DOWN); - if (it != joy_hat_map.end()) - set_joy_controls(it->second, jhat.value & SDL_HAT_DOWN); - } + if (changed & SDL_HAT_DOWN) + { + HatMap::iterator it = joy_hat_map.find(SDL_HAT_DOWN); + if (it != joy_hat_map.end()) + set_joy_controls(it->second, jhat.value & SDL_HAT_DOWN); + } - if (changed & SDL_HAT_LEFT) - { - HatMap::iterator it = joy_hat_map.find(SDL_HAT_LEFT); - if (it != joy_hat_map.end()) - set_joy_controls(it->second, jhat.value & SDL_HAT_LEFT); - } + if (changed & SDL_HAT_LEFT) + { + HatMap::iterator it = joy_hat_map.find(SDL_HAT_LEFT); + if (it != joy_hat_map.end()) + set_joy_controls(it->second, jhat.value & SDL_HAT_LEFT); + } - if (changed & SDL_HAT_RIGHT) - { - HatMap::iterator it = joy_hat_map.find(SDL_HAT_RIGHT); - if (it != joy_hat_map.end()) - set_joy_controls(it->second, jhat.value & SDL_HAT_RIGHT); - } + if (changed & SDL_HAT_RIGHT) + { + HatMap::iterator it = joy_hat_map.find(SDL_HAT_RIGHT); + if (it != joy_hat_map.end()) + set_joy_controls(it->second, jhat.value & SDL_HAT_RIGHT); } + } hat_state = jhat.value; } @@ -585,7 +577,7 @@ JoystickKeyboardController::process_menu_key_event(const SDL_Event& event) return; if(event.key.keysym.sym != SDLK_ESCAPE - && event.key.keysym.sym != SDLK_PAUSE) { + && event.key.keysym.sym != SDLK_PAUSE) { bind_key(event.key.keysym.sym, (Control) wait_for_key); } reset(); @@ -803,28 +795,28 @@ JoystickKeyboardController::get_joystick_options_menu() //---------------------------------------------------------------------------- JoystickKeyboardController::KeyboardMenu::KeyboardMenu( - JoystickKeyboardController* _controller) + JoystickKeyboardController* _controller) : controller(_controller) { - add_label(_("Setup Keyboard")); - add_hl(); - add_controlfield(Controller::UP, _("Up")); - add_controlfield(Controller::DOWN, _("Down")); - add_controlfield(Controller::LEFT, _("Left")); - add_controlfield(Controller::RIGHT, _("Right")); - add_controlfield(Controller::JUMP, _("Jump")); - add_controlfield(Controller::ACTION, _("Action")); - add_controlfield(Controller::PEEK_LEFT, _("Peek Left")); - add_controlfield(Controller::PEEK_RIGHT, _("Peek Right")); - add_controlfield(Controller::PEEK_UP, _("Peek Up")); - add_controlfield(Controller::PEEK_DOWN, _("Peek Down")); - if (config->console_enabled) { - add_controlfield(Controller::CONSOLE, _("Console")); - } - add_toggle(Controller::CONTROLCOUNT, _("Jump with Up"), controller->jump_with_up_kbd); - add_hl(); - add_back(_("Back")); - update(); + add_label(_("Setup Keyboard")); + add_hl(); + add_controlfield(Controller::UP, _("Up")); + add_controlfield(Controller::DOWN, _("Down")); + add_controlfield(Controller::LEFT, _("Left")); + add_controlfield(Controller::RIGHT, _("Right")); + add_controlfield(Controller::JUMP, _("Jump")); + add_controlfield(Controller::ACTION, _("Action")); + add_controlfield(Controller::PEEK_LEFT, _("Peek Left")); + add_controlfield(Controller::PEEK_RIGHT, _("Peek Right")); + add_controlfield(Controller::PEEK_UP, _("Peek Up")); + add_controlfield(Controller::PEEK_DOWN, _("Peek Down")); + if (g_config->console_enabled) { + add_controlfield(Controller::CONSOLE, _("Console")); + } + add_toggle(Controller::CONTROLCOUNT, _("Jump with Up"), controller->jump_with_up_kbd); + add_hl(); + add_back(_("Back")); + update(); } JoystickKeyboardController::KeyboardMenu::~KeyboardMenu() @@ -881,28 +873,28 @@ JoystickKeyboardController::KeyboardMenu::update() { // update menu get_item_by_id((int) Controller::UP).change_input(get_key_name( - controller->reversemap_key(Controller::UP))); + controller->reversemap_key(Controller::UP))); get_item_by_id((int) Controller::DOWN).change_input(get_key_name( - controller->reversemap_key(Controller::DOWN))); + controller->reversemap_key(Controller::DOWN))); get_item_by_id((int) Controller::LEFT).change_input(get_key_name( - controller->reversemap_key(Controller::LEFT))); + controller->reversemap_key(Controller::LEFT))); get_item_by_id((int) Controller::RIGHT).change_input(get_key_name( - controller->reversemap_key(Controller::RIGHT))); + controller->reversemap_key(Controller::RIGHT))); get_item_by_id((int) Controller::JUMP).change_input(get_key_name( - controller->reversemap_key(Controller::JUMP))); + controller->reversemap_key(Controller::JUMP))); get_item_by_id((int) Controller::ACTION).change_input(get_key_name( - controller->reversemap_key(Controller::ACTION))); + controller->reversemap_key(Controller::ACTION))); get_item_by_id((int) Controller::PEEK_LEFT).change_input(get_key_name( - controller->reversemap_key(Controller::PEEK_LEFT))); + controller->reversemap_key(Controller::PEEK_LEFT))); get_item_by_id((int) Controller::PEEK_RIGHT).change_input(get_key_name( - controller->reversemap_key(Controller::PEEK_RIGHT))); + controller->reversemap_key(Controller::PEEK_RIGHT))); get_item_by_id((int) Controller::PEEK_UP).change_input(get_key_name( - controller->reversemap_key(Controller::PEEK_UP))); + controller->reversemap_key(Controller::PEEK_UP))); get_item_by_id((int) Controller::PEEK_DOWN).change_input(get_key_name( - controller->reversemap_key(Controller::PEEK_DOWN))); - if (config->console_enabled) { + controller->reversemap_key(Controller::PEEK_DOWN))); + if (g_config->console_enabled) { get_item_by_id((int) Controller::CONSOLE).change_input(get_key_name( - controller->reversemap_key(Controller::CONSOLE))); + controller->reversemap_key(Controller::CONSOLE))); } get_item_by_id(Controller::CONTROLCOUNT).toggled = controller->jump_with_up_kbd; } @@ -1017,27 +1009,27 @@ JoystickKeyboardController::JoystickMenu::update_menu_item(Control id) std::string name; switch (hat_dir) - { - case SDL_HAT_UP: - name = "Hat Up"; - break; - - case SDL_HAT_DOWN: - name = "Hat Down"; - break; - - case SDL_HAT_LEFT: - name = "Hat Left"; - break; - - case SDL_HAT_RIGHT: - name = "Hat Right"; - break; - - default: - name = "Unknown hat_dir"; - break; - } + { + case SDL_HAT_UP: + name = "Hat Up"; + break; + + case SDL_HAT_DOWN: + name = "Hat Down"; + break; + + case SDL_HAT_LEFT: + name = "Hat Left"; + break; + + case SDL_HAT_RIGHT: + name = "Hat Right"; + break; + + default: + name = "Unknown hat_dir"; + break; + } get_item_by_id((int)id).change_input(name); } else { @@ -1066,3 +1058,5 @@ JoystickKeyboardController::JoystickMenu::update() get_item_by_id(Controller::CONTROLCOUNT).toggled = controller->jump_with_up_joy; } + +/* EOF */ diff --git a/src/control/joystickkeyboardcontroller.hpp b/src/control/joystickkeyboardcontroller.hpp index f989ea6f6..49da0a2fb 100644 --- a/src/control/joystickkeyboardcontroller.hpp +++ b/src/control/joystickkeyboardcontroller.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,25 +12,22 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#ifndef __JOYSTICKKEYBOARDCONTROLLER_H__ -#define __JOYSTICKKEYBOARDCONTROLLER_H__ +// along with this program. If not, see . -#include "controller.hpp" +#ifndef HEADER_SUPERTUX_CONTROL_JOYSTICKKEYBOARDCONTROLLER_HPP +#define HEADER_SUPERTUX_CONTROL_JOYSTICKKEYBOARDCONTROLLER_HPP -namespace lisp { -class Writer; -class Lisp; -} +#include "control/controller.hpp" #include -#include #include +#include #include +#include "util/reader_fwd.hpp" +#include "util/writer_fwd.hpp" + class Menu; class JoystickKeyboardController : public Controller @@ -46,7 +41,7 @@ public: void process_event(const SDL_Event& event); void write(lisp::Writer& writer); - void read(const lisp::Lisp& lisp); + void read(const Reader& lisp); void reset(); Menu* get_key_options_menu(); @@ -118,6 +113,12 @@ private: JoystickMenu* joystick_options_menu; friend class KeyboardMenu; friend class JoystickMenu; + +private: + JoystickKeyboardController(const JoystickKeyboardController&); + JoystickKeyboardController& operator=(const JoystickKeyboardController&); }; #endif + +/* EOF */ diff --git a/src/direction.cpp b/src/direction.cpp deleted file mode 100644 index 4ab1ccb67..000000000 --- a/src/direction.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// $Id: direction.hpp 5006 2007-05-23 15:27:56Z tuxdev $ -// -// SuperTux -// Copyright (C) 2008 Ryan Flegel -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. - -#include "direction.hpp" - -std::ostream& operator<<(std::ostream& o, const Direction& dir) -{ - switch (dir) - { - case AUTO: - o << "auto"; - break; - case LEFT: - o << "left"; - break; - case RIGHT: - o << "right"; - break; - case UP: - o << "up"; - break; - case DOWN: - o << "down"; - break; - } - - return o; -} diff --git a/src/file_system.hpp b/src/file_system.hpp deleted file mode 100644 index b92c4e11c..000000000 --- a/src/file_system.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// $Id$ -// -// SuperTux -// Copyright (C) 2006 Matthias Braun -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#ifndef __FILESYSTEM_H__ -#define __FILESYSTEM_H__ - -#include -#include - -namespace FileSystem -{ - /** - * returns the path of the directory the file is in - */ - std::string dirname(const std::string& filename); - - /** - * returns the name of the file - */ - std::string basename(const std::string& filename); - - /** - * remove everything starting from and including the last dot - */ - std::string strip_extension(const std::string& filename); - - /** - * normalize filename so that "blup/bla/blo/../../bar" will become - * "blup/bar" - */ - std::string normalize(const std::string& filename); -} - -#endif diff --git a/src/gettext.hpp b/src/gettext.hpp deleted file mode 100644 index a2bd00349..000000000 --- a/src/gettext.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ -#ifndef _LIBGETTEXT_H -#define _LIBGETTEXT_H - -#include "tinygettext/tinygettext.hpp" - -extern TinyGetText::DictionaryManager dictionary_manager; - -static inline const char* _(const char* message) -{ - return dictionary_manager.get_dictionary().translate(message); -} - -static inline std::string _(const std::string& message) -{ - return dictionary_manager.get_dictionary().translate(message); -} - -static inline const char* N_(const char* id, const char* id2, int num) -{ - return dictionary_manager.get_dictionary().translate(id, id2, num).c_str(); -} - -#endif /* _LIBGETTEXT_H */ diff --git a/src/gui/button.cpp b/src/gui/button.cpp index 6288665f3..a4f5fa099 100644 --- a/src/gui/button.cpp +++ b/src/gui/button.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,29 +12,23 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include +// along with this program. If not, see . -#include "button.hpp" +#include "gui/button.hpp" -#include -#include - -#include "main.hpp" -#include "mousecursor.hpp" -#include "video/font.hpp" -#include "video/surface.hpp" +#include "supertux/main.hpp" #include "video/drawing_context.hpp" Font* Button::info_font = 0; -extern SDL_Surface* screen; - -/* Buttons */ -Button::Button(Surface* image_, std::string info_, SDLKey binding_) - : binding(binding_) +Button::Button(Surface* image_, std::string info_, SDLKey binding_) : + pos(), + size(), + image(), + binding(binding_), + id(), + state(), + info() { image = image_; size = Vector(image->get_width(), image->get_height()); @@ -50,210 +42,60 @@ Button::~Button() void Button::draw(DrawingContext &context, bool selected) { -if(selected) - context.draw_filled_rect(pos, size, Color (200,240,220), LAYER_GUI); -else - context.draw_filled_rect(pos, size, Color (200,200,220), LAYER_GUI); - -Vector tanslation = -context.get_translation(); -if(state == BT_SHOW_INFO) - { - Vector offset; - if(pos.x + tanslation.x < 100 && pos.y + tanslation.y > SCREEN_HEIGHT - 20) - offset = Vector(size.x, - 10); - else if(pos.x + tanslation.x < 100) - offset = Vector(size.x, 0); + if(selected) + context.draw_filled_rect(pos, size, Color (200,240,220), LAYER_GUI); else - offset = Vector(-30, -size.y/2); - context.draw_text(info_font, info, pos + offset, ALIGN_LEFT, LAYER_GUI+2); - if(binding != 0) - context.draw_text(info_font, "(" + std::string(SDL_GetKeyName(binding)) + - ")", pos + offset + Vector(0,12), - ALIGN_LEFT, LAYER_GUI+2); - } - -context.draw_surface_part(image, Vector(0,0), size, pos, LAYER_GUI+1); -} + context.draw_filled_rect(pos, size, Color (200,200,220), LAYER_GUI); -int Button::event(SDL_Event &event, int x_offset, int y_offset) -{ -state = BT_NONE; -switch(event.type) + Vector tanslation = -context.get_translation(); + if(state == BT_SHOW_INFO) { - case SDL_MOUSEBUTTONDOWN: - if(event.button.x > pos.x + x_offset && event.button.x < pos.x + x_offset + size.x && - event.button.y > pos.y + y_offset && event.button.y < pos.y + y_offset + size.y) - { - if(event.button.button == SDL_BUTTON_RIGHT) - state = BT_SHOW_INFO; - } - break; - case SDL_MOUSEBUTTONUP: - if(event.button.x > pos.x + x_offset && event.button.x < pos.x + x_offset + size.x && - event.button.y > pos.y + y_offset && event.button.y < pos.y + y_offset + size.y) - { - if(event.button.button == SDL_BUTTON_LEFT) - state = BT_SELECTED; - } - break; - case SDL_KEYDOWN: // key pressed - if(event.key.keysym.sym == binding) - state = BT_SELECTED; - break; - default: - break; + Vector offset; + if(pos.x + tanslation.x < 100 && pos.y + tanslation.y > SCREEN_HEIGHT - 20) + offset = Vector(size.x, - 10); + else if(pos.x + tanslation.x < 100) + offset = Vector(size.x, 0); + else + offset = Vector(-30, -size.y/2); + context.draw_text(info_font, info, pos + offset, ALIGN_LEFT, LAYER_GUI+2); + if(binding != 0) + context.draw_text(info_font, "(" + std::string(SDL_GetKeyName(binding)) + + ")", pos + offset + Vector(0,12), + ALIGN_LEFT, LAYER_GUI+2); } -return state; -} - -/* Group of buttons */ - -ButtonGroup::ButtonGroup(Vector pos_, Vector buttons_size_, Vector buttons_box_) - : pos(pos_), buttons_size(buttons_size_), buttons_box(buttons_box_) -{ -buttons.clear(); -row = 0; -button_selected = -1; -mouse_hover = false; -mouse_left_button = false; -buttons_pair_nb = 0; -} - -ButtonGroup::~ButtonGroup() -{ -} - -void ButtonGroup::add_button(Button button, int id, bool select) -{ -button.pos.x = ((buttons.size()-buttons_pair_nb) % (int)buttons_box.x) * buttons_size.x; -button.pos.y = ((int)((buttons.size()-buttons_pair_nb) / buttons_box.x)) * buttons_size.y; -button.size = buttons_size; -button.id = id; -if(select) - button_selected = id; - -buttons.push_back(button); -} - -void ButtonGroup::add_pair_of_buttons(Button button1, int id1, Button button2, int id2) -{ -button1.pos.x = button2.pos.x = ((buttons.size()-buttons_pair_nb) % (int)buttons_box.x) * buttons_size.x; -button1.pos.y = button2.pos.y = ((int)((buttons.size()-buttons_pair_nb) / buttons_box.x)) * buttons_size.y; -button1.size.x = button2.size.x = buttons_size.x; -button1.size.y = button2.size.y = buttons_size.y / 2; -button2.pos.y += buttons_size.y / 2; -button1.id = id1; -button2.id = id2; - -buttons_pair_nb++; -buttons.push_back(button1); -buttons.push_back(button2); -} - -void ButtonGroup::draw(DrawingContext &context) -{ -context.draw_filled_rect(pos - Vector(12,4), - Vector(buttons_size.x*buttons_box.x + 16, buttons_size.y*buttons_box.y + 8), - Color (0,0,0, 128), LAYER_GUI-1); - -context.push_transform(); -context.set_translation(Vector(-pos.x, -pos.y + buttons_size.y*row)); -for(Buttons::iterator i = buttons.begin(); i != buttons.end(); ++i) - { - if(i->pos.y < row*buttons_size.y || - i->pos.y + i->size.y > (row + buttons_box.y) * buttons_size.y) - continue; - i->draw(context, i->id == button_selected); - } -context.pop_transform(); + context.draw_surface_part(image, Vector(0,0), size, pos, LAYER_GUI+1); } -bool ButtonGroup::event(SDL_Event &event) +int Button::event(SDL_Event &event, int x_offset, int y_offset) { -bool caught_event = false; - -switch(event.type) + state = BT_NONE; + switch(event.type) { - case SDL_MOUSEMOTION: - mouse_hover = false; - - if(mouse_left_button) + case SDL_MOUSEBUTTONDOWN: + if(event.button.x > pos.x + x_offset && event.button.x < pos.x + x_offset + size.x && + event.button.y > pos.y + y_offset && event.button.y < pos.y + y_offset + size.y) { - pos.x += int(event.motion.xrel * float(SCREEN_WIDTH)/screen->w); - pos.y += int(event.motion.yrel * float(SCREEN_HEIGHT)/screen->h); - caught_event = true; + if(event.button.button == SDL_BUTTON_RIGHT) + state = BT_SHOW_INFO; } - if(event.button.x > pos.x-12 && event.button.x < pos.x+16 + buttons_box.x*buttons_size.x && - event.button.y > pos.y-4 && event.button.y < pos.y+8 + buttons_box.y*buttons_size.y) - mouse_hover = true; - break; - case SDL_MOUSEBUTTONDOWN: - if(event.button.x < pos.x-12 || event.button.x > pos.x+16 + - buttons_box.x*buttons_size.x || event.button.y < pos.y-4 || - event.button.y > pos.y+8 + buttons_box.y*buttons_size.y) break; - - caught_event = true; - - if(event.button.button == SDL_BUTTON_WHEELUP) - { - row--; - if(row < 0) - row = 0; - } - else if(event.button.button == SDL_BUTTON_WHEELDOWN) + case SDL_MOUSEBUTTONUP: + if(event.button.x > pos.x + x_offset && event.button.x < pos.x + x_offset + size.x && + event.button.y > pos.y + y_offset && event.button.y < pos.y + y_offset + size.y) { - row++; - if(row > (int)((buttons.size()-buttons_pair_nb)/buttons_box.x) - (int)buttons_box.y + - ((int)(buttons.size()-buttons_pair_nb)%(int)buttons_box.x != 0 ? 1 : 0)) - row = (int)((buttons.size()-buttons_pair_nb)/buttons_box.x) - (int)buttons_box.y + - ((int)(buttons.size()-buttons_pair_nb)%(int)buttons_box.x != 0 ? 1 : 0); + if(event.button.button == SDL_BUTTON_LEFT) + state = BT_SELECTED; } - else if(event.button.button == SDL_BUTTON_LEFT) - mouse_left_button = true; - else - caught_event = false; - break; - case SDL_MOUSEBUTTONUP: - mouse_left_button = false; - break; - default: - break; - } - -if(caught_event) - return true; - -for(Buttons::iterator i = buttons.begin(); i != buttons.end(); ++i) - { - if(i->pos.y < row*buttons_size.y || - i->pos.y + i->size.y > (row + buttons_box.y) * buttons_size.y) - continue; - - if(i->event(event, (int)pos.x, - (int)pos.y - row*(int)buttons_size.y) == BT_SELECTED) - { - button_selected = i->id; - caught_event = true; - break; - } + break; + case SDL_KEYDOWN: // key pressed + if(event.key.keysym.sym == binding) + state = BT_SELECTED; + break; + default: + break; } - -return caught_event; + return state; } -int ButtonGroup::selected_id() -{ -return button_selected; -} - -void ButtonGroup::set_unselected() -{ -button_selected = -1; -} - -bool ButtonGroup::is_hover() -{ -return mouse_hover; -} +/* EOF */ diff --git a/src/gui/button.hpp b/src/gui/button.hpp index 649187378..405b25b4f 100644 --- a/src/gui/button.hpp +++ b/src/gui/button.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // Copyright (C) 2006 Matthias Braun // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,16 +12,14 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef SUPERTUX_BUTTON_H -#define SUPERTUX_BUTTON_H +#ifndef HEADER_SUPERTUX_GUI_BUTTON_HPP +#define HEADER_SUPERTUX_GUI_BUTTON_HPP -#include +#include #include - -#include "SDL.h" +#include #include "math/vector.hpp" @@ -37,7 +33,7 @@ enum { BT_HOVER, BT_SELECTED, BT_SHOW_INFO - }; +}; class Button { @@ -53,7 +49,8 @@ public: private: friend class ButtonGroup; - Vector pos, size; + Vector pos; + Vector size; Surface* image; SDLKey binding; @@ -63,31 +60,6 @@ private: std::string info; }; -class ButtonGroup -{ -public: - ButtonGroup(Vector pos_, Vector size_, Vector button_box_); - ~ButtonGroup(); - - void draw(DrawingContext& context); - bool event(SDL_Event& event); - - void add_button(Button button, int id, bool select = false); - void add_pair_of_buttons(Button button1, int id1, Button button2, int id2); - - int selected_id(); - void set_unselected(); - bool is_hover(); - -private: - Vector pos, buttons_size, buttons_box; - typedef std::vector