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

  1. /***************************************************************************
  2.  * eato.h  -  headers for the corresponding cpp file
  3.  *
  4.  * Copyright (C) 2006 - 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_EATO_H
  17. #define SMC_EATO_H
  18.  
  19. #include "../enemies/enemy.h"
  20.  
  21. /* *** *** *** *** *** cEato *** *** *** *** *** *** *** *** *** *** *** *** */
  22.  
  23. /*
  24.  * Eats your Butt !
  25. */
  26. class cEato : public cEnemy
  27. {
  28. public:
  29.     // constructor
  30.     cEato( float x, float y );
  31.     // create from stream
  32.     cEato( CEGUI::XMLAttributes &attributes );
  33.     // destructor
  34.     virtual ~cEato( void );
  35.  
  36.     // init defaults
  37.     void Init( void );
  38.     // copy
  39.     virtual cEato *Copy( void );
  40.  
  41.     // create from stream
  42.     virtual void Create_from_Stream( CEGUI::XMLAttributes &attributes );
  43.     // save to stream
  44.     virtual void Save_to_Stream( ofstream &file );
  45.  
  46.     // Set the image directory
  47.     void Set_Image_Dir( string filename );
  48.     // Set direction
  49.     void Set_Direction( ObjectDirection dir );
  50.  
  51.     /* downgrade state ( if already weakest state : dies )
  52.      * force : usually dies or a complete downgrade
  53.     */
  54.     virtual void DownGrade( bool force = 0 );
  55.     virtual void DieStep( void );
  56.  
  57.     // update
  58.     virtual void Update( void );
  59.  
  60.     // if update is valid for the current state
  61.     virtual bool Is_Update_Valid( void );
  62.  
  63.     // ignore onground check
  64.     virtual void Check_on_Ground( void ) {};
  65.     /* Validate the given collision object
  66.      * returns 1 if an internal collision with this object is valid
  67.      * returns 2 if the given object collides with this object (blocking)
  68.     */
  69.     virtual unsigned int Validate_Collision( cSprite *obj );
  70.     // collision from player
  71.     virtual void Handle_Collision_Player( cObjectCollision *collision );
  72.  
  73.     // editor activation
  74.     virtual void Editor_Activate( void );
  75.     // editor image dir key up event
  76.     bool Editor_Image_Dir_Key( const CEGUI::EventArgs &event );
  77.  
  78.     // image directory
  79.     string img_dir;
  80.  
  81. private:
  82.     // Create the Name from the current settings
  83.     void Create_Name( void );
  84. };
  85.  
  86. /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
  87.  
  88. #endif
  89.