1
/***************************************************************************
2
waypoint.h - header for the corresponding cpp file
4
copyright : (C) 2003 - 2007 by Florian Richter
5
***************************************************************************/
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.
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/>.
16
#ifndef __OVERWORLD_WAYPOINT_H__
17
#define __OVERWORLD_WAYPOINT_H__
19
#include "../core/globals.h"
20
#include "../video/video.h"
21
#include "../objects/movingsprite.h"
23
/* *** *** *** *** *** Waypoint types *** *** *** *** *** *** *** *** *** *** *** *** */
28
WAYPOINT_WORLD_LINK = 2 // Enters another World
31
/* *** *** *** *** *** *** cWaypoint *** *** *** *** *** *** *** *** *** *** *** */
33
class cWaypoint : public cSprite
39
cWaypoint( XMLAttributes &attributes );
41
virtual ~cWaypoint( void );
47
virtual cWaypoint *Copy( void );
50
virtual void Create_from_Stream( XMLAttributes &attributes );
52
virtual void Save_to_Stream( ofstream &file );
55
virtual void Update( void );
57
virtual void Draw( cSurfaceRequest *request = NULL );
60
void Set_Access( bool enabled, bool new_start_access = 0 );
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 );
68
virtual void Editor_Activate( void );
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
76
/* backward and forward direction
78
ObjectDirection direction_backward, direction_forward;
83
Waypoint_type waypoint_type;
87
// if this waypoint is accessible
89
// the default access defined in the definition
92
// color for the glim effect
94
// glim effect type switch
99
GL_Surface *arrow_white_l, *arrow_white_r, *arrow_white_u, *arrow_white_d;
101
GL_Surface *arrow_blue_l, *arrow_blue_r, *arrow_blue_u, *arrow_blue_d;
104
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */