X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fphysic.hpp;h=abfdba53060d40209db037a885b82247e382157e;hb=4a486d92343d1824b311c234e9321e08f280fe68;hp=da44f9b7f5119499901469697c48be81e850fb19;hpb=02288dc76442bd6616a200a2d22c0954d2fc8180;p=supertux.git diff --git a/src/physic.hpp b/src/physic.hpp index da44f9b7f..abfdba530 100644 --- a/src/physic.hpp +++ b/src/physic.hpp @@ -1,7 +1,8 @@ // $Id$ -// +// // SuperTux // Copyright (C) 2004 Tobias Glaesser +// 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 @@ -12,7 +13,7 @@ // 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 @@ -67,6 +68,12 @@ public: void enable_gravity(bool gravity_enabled); bool gravity_enabled() const; + /// Set gravity to apply to object when enabled + void set_gravity(float gravity); + + /// Get gravity to apply to object when enabled + float get_gravity() const; + Vector get_movement(float elapsed_time); private: @@ -76,6 +83,8 @@ private: float vx, vy; /// should we respect gravity in out calculations? bool gravity_enabled_flag; + /// current gravity to apply to object, if enabled + float gravity; }; #endif