~ubuntu-branches/ubuntu/trusty/plee-the-bear/trusty-proposed

« back to all changes in this revision

Viewing changes to bear-engine/core/src/engine/transition_effect/strip_effect.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Julien Jorge, Julien Jorge
  • Date: 2010-11-17 20:13:34 UTC
  • mfrom: (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101117201334-o4dp7uq437to7oxb
Tags: 0.5.1-1
[ Julien Jorge ]
* New upstream release (Closes: #565062, #546514).
* Add armhf architecture (Closes: #604689).
* Remove patches integrated upstream: rpath-editors.diff, rpath-game.diff,
  editors-menu-section.diff.
* Bump the Standard-Version, no changes.
* Update my email address.
* Set build dependency of libclaw to 1.6.0.
* Add the missing ${misc:Depends} in debian/control.
* List gettext translations in bear-factory.install and plee-the-bear.install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Bear Engine
 
3
 
 
4
  Copyright (C) 2005-2010 Julien Jorge, Sebastien Angibaud
 
5
 
 
6
  This program is free software; you can redistribute it and/or modify it
 
7
  under the terms of the GNU General Public License as published by the
 
8
  Free Software Foundation; either version 2 of the License, or (at your
 
9
  option) any later version.
 
10
 
 
11
  This program is distributed in the hope that it will be useful, but WITHOUT
 
12
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
13
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 
14
  more details.
 
15
 
 
16
  You should have received a copy of the GNU General Public License along
 
17
  with this program; if not, write to the Free Software Foundation, Inc.,
 
18
  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 
 
20
  contact: plee-the-bear@gamned.org
 
21
 
 
22
  Please add the tag [Bear] in the subject of your mails.
 
23
*/
 
24
/**
 
25
 * \file strip_effect.hpp
 
26
 * \brief Add a strip at the top and the bottom of the screen.
 
27
 * \author Julien Jorge
 
28
 */
 
29
#ifndef __BEAR_ENGINE_STRIP_EFFECT_HPP__
 
30
#define __BEAR_ENGINE_STRIP_EFFECT_HPP__
 
31
 
 
32
#include "engine/transition_effect/transition_effect.hpp"
 
33
 
 
34
namespace bear
 
35
{
 
36
  namespace engine
 
37
  {
 
38
    /**
 
39
     * \brief Add a strip at the top and the bottom of the screen.
 
40
     * \author Julien Jorge
 
41
     */
 
42
    class ENGINE_EXPORT strip_effect:
 
43
      public transition_effect
 
44
    {
 
45
    public:
 
46
      /** \brief The type of a list of scene elements retrieved from the
 
47
          layer. */
 
48
      typedef std::list<visual::scene_element> scene_element_list;
 
49
 
 
50
    public:
 
51
      strip_effect();
 
52
 
 
53
      bool is_finished() const;
 
54
 
 
55
      universe::time_type progress( bear::universe::time_type elapsed_time );
 
56
      void render( scene_element_list& e ) const;
 
57
 
 
58
      void set_duration
 
59
      ( universe::time_type in, universe::time_type full,
 
60
        universe::time_type out );
 
61
      void set_color( double r, double g, double b );
 
62
      void set_opacity( double o );
 
63
      void set_strip_height( visual::coordinate_type h );
 
64
 
 
65
    private:
 
66
      /** \brief How long does it take to the strips to appear. */
 
67
      universe::time_type m_strip_in_duration;
 
68
 
 
69
      /** \brief How long the strips are fully visible. */
 
70
      universe::time_type m_full_duration;
 
71
 
 
72
      /** \brief How long does it take to the strips to disapear. */
 
73
      universe::time_type m_strip_out_duration;
 
74
 
 
75
      /** \brief Elapsed time since the effect was created. */
 
76
      universe::time_type m_elapsed_time;
 
77
 
 
78
      /** \brief The color displayed. */
 
79
      visual::color_type m_color;
 
80
 
 
81
      /** \brief The opacity of at the maximum intensity. */
 
82
      double m_opacity;
 
83
 
 
84
      /** \brief The height of the strips. */
 
85
      visual::coordinate_type m_height;
 
86
 
 
87
    }; // class strip_effect
 
88
  } // namepspace engine
 
89
} // namespace bear
 
90
 
 
91
#endif // __BEAR_ENGINE_STRIP_EFFECT_HPP__