Source: easyimagesprite.h


Annotated List
Files
Globals
Hierarchy
Index
/***************************************************************************
                          easyimagesprite.h  -  description
                             -------------------
    begin                : Sat Oct 5 2002
    copyright            : (C) 2002 by Vladimir Grichina
    email                : vgrichina@mail.ru
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef EASYIMAGESPRITE_H
#define EASYIMAGESPRITE_H

#include "easysprite.h"

/**Sprite which contains image
  *@author Vladimir Grichina
  */

class EasyImageSprite : public EasySprite  {
public: // Public attributes
  ~EasyImageSprite();
  /** Create a sprite from SDL surface surface
	*/
  EasyImageSprite(SDL_Surface *surface = NULL);
  /** Create a sprite from image file img_fn
	*/
  EasyImageSprite(char *img_fn);
  /** Draws sprite's surface on engine's surface
	*/
  void draw(SDL_Surface *surface);
  /** Sets surface property
	*/
  virtual void setSurface(SDL_Surface *surface);
  /** Gets surface property
  */
  virtual SDL_Surface * getSurface();
  /** Updates sprite's rect and collision_rect due to changes of 
it's position and(or) surface
	*/
  void updateRect();
  /** Moves the sprite
@param time Time of moving in milliseconds
   */
  void doMove(int time);
  /** Loads sprite surface from image file
@param img_fn Image filename
 */
  int loadFromFile(char *img_fn);
protected:
	/**  Sprite surface
	*/
  SDL_Surface *surface;
};

#endif

Generated by: vg on localhost.localdomain on Fri Jan 17 13:05:24 2003, using kdoc 2.0a53.