~ubuntu-branches/ubuntu/natty/smc/natty

« back to all changes in this revision

Viewing changes to src/overworld/waypoint.h

  • Committer: Bazaar Package Importer
  • Author(s): Muammar El Khatib
  • Date: 2008-10-20 00:31:35 UTC
  • mfrom: (1.1.4 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081020003135-5ac8cpecomfohvv5
Tags: 1.6-1
* New upstream release. (Closes:#479415)
* Bumped standards version to 3.8.0.
* debian/control: dpatch build dependency has been removed temporarily.
* debian/control: smc-data does not depend on smc anymore. This change will
  avoid a circular dependency. (Closes: #478712)
* smc does not segfault. (Closes: #500039, #491590) 
* Icon is not missed in Gnome Menu. Thanks to Saïvann for providing a 
  solution. (Closes: #491885)
* debian/control: smc-data's and smc-music's descriptions have been improved.
  (Closes: #493630)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
                waypoint.h  -  header for the corresponding cpp file
3
 
                             -------------------
4
 
    copyright            : (C) 2003 - 2007 by Florian Richter
5
 
 ***************************************************************************/
6
 
/*
7
 
   This program is free software; you can redistribute it and/or modify
8
 
   it under the terms of the GNU General Public License as published by
9
 
   the Free Software Foundation; either version 3 of the License, or
10
 
   (at your option) any later version.
11
 
   
12
 
   You should have received a copy of the GNU General Public License
13
 
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
14
 
*/
15
 
 
16
 
#ifndef __OVERWORLD_WAYPOINT_H__
17
 
#define __OVERWORLD_WAYPOINT_H__
18
 
 
19
 
#include "../core/globals.h"
20
 
#include "../video/video.h"
21
 
#include "../objects/movingsprite.h"
22
 
 
23
 
/* *** *** *** *** *** Waypoint types *** *** *** *** *** *** *** *** *** *** *** *** */
24
 
 
25
 
enum Waypoint_type
26
 
{
27
 
        WAYPOINT_NORMAL = 1,
28
 
        WAYPOINT_WORLD_LINK = 2 // Enters another World
29
 
};
30
 
 
31
 
/* *** *** *** *** *** *** cWaypoint *** *** *** *** *** *** *** *** *** *** *** */
32
 
 
33
 
class cWaypoint : public cSprite
34
 
{
35
 
public:
36
 
        // constructor
37
 
        cWaypoint( void );
38
 
        // create from stream
39
 
        cWaypoint( XMLAttributes &attributes );
40
 
        // destructor
41
 
        virtual ~cWaypoint( void );
42
 
        
43
 
        // Init defaults
44
 
        void Init( void );
45
 
 
46
 
        // copy this object
47
 
        virtual cWaypoint *Copy( void );
48
 
 
49
 
        // create from stream
50
 
        virtual void Create_from_Stream( XMLAttributes &attributes );
51
 
        // save to stream
52
 
        virtual void Save_to_Stream( ofstream &file );
53
 
 
54
 
        // Update
55
 
        virtual void Update( void );
56
 
        // Draw
57
 
        virtual void Draw( cSurfaceRequest *request = NULL );
58
 
 
59
 
        // Set Access
60
 
        void Set_Access( bool enabled, bool new_start_access = 0 );
61
 
 
62
 
        // Set the Destination
63
 
        void Set_Destination( string str );
64
 
        // Returns the Destination
65
 
        string Get_Destination( bool with_dir = 0, bool with_end = 0 );
66
 
 
67
 
        // editor activation
68
 
        virtual void Editor_Activate( void );
69
 
        // editor events
70
 
        bool Editor_Type_Select( const EventArgs &event ); // editor type option selected
71
 
        bool Editor_Destination_Key( const EventArgs &event );  // editor destination key up
72
 
        bool Editor_Access_Select( const EventArgs &event ); // editor access option selected
73
 
        bool Editor_Backward_Direction_Select( const EventArgs &event ); // editor direction backward option selected
74
 
        bool Editor_Forward_Direction_Select( const EventArgs &event ); // editor direction forward option selected
75
 
 
76
 
        /* backward and forward direction
77
 
         */
78
 
        ObjectDirection direction_backward, direction_forward;
79
 
 
80
 
        /* The Waypoint type
81
 
         * see the definitions
82
 
        */
83
 
        Waypoint_type waypoint_type;
84
 
        // destination
85
 
        string destination;
86
 
 
87
 
        // if this waypoint is accessible
88
 
        bool access;
89
 
        // the default access defined in the definition
90
 
        bool access_default;
91
 
 
92
 
        // color for the glim effect
93
 
        float gcolor;
94
 
        // glim effect type switch
95
 
        bool glim;
96
 
 
97
 
 
98
 
        // white arrow
99
 
        GL_Surface *arrow_white_l, *arrow_white_r, *arrow_white_u, *arrow_white_d;
100
 
        // blue arrow
101
 
        GL_Surface *arrow_blue_l, *arrow_blue_r, *arrow_blue_u, *arrow_blue_d;
102
 
};
103
 
 
104
 
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
105
 
 
106
 
#endif