home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2009 February / maximum-cd-2009-02.iso / DiscContents / SMC_1.6_win32.exe / src / overworld / world_waypoint.h < prev   
Encoding:
C/C++ Source or Header  |  2008-07-01  |  3.2 KB  |  107 lines

  1. /***************************************************************************
  2.  * waypoint.h  -  header for the corresponding cpp file
  3.  *
  4.  * Copyright (C) 2003 - 2008 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 SMC_WORLD_WAYPOINT_H
  17. #define SMC_WORLD_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( CEGUI::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( CEGUI::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 CEGUI::EventArgs &event ); // editor type option selected
  71.     bool Editor_Destination_Key( const CEGUI::EventArgs &event );  // editor destination key up
  72.     bool Editor_Access_Select( const CEGUI::EventArgs &event ); // editor access option selected
  73.     bool Editor_Backward_Direction_Select( const CEGUI::EventArgs &event ); // editor direction backward option selected
  74.     bool Editor_Forward_Direction_Select( const CEGUI::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
  107.