// $Id: mapsprite.h,v 1.4 2006/08/05 09:08:59 matthew Exp $ // Fish Supper // Copyright (C) 2006 Matthew Clarke // // 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. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. #ifndef _MAPSPRITE_H_ #define _MAPSPRITE_H_ #include "sprite.h" #include "enums.h" #include "constants.h" #include "playdisplay.h" namespace FS { class MapSprite : public Sprite { protected: int map_x; int row_length_pixels; int row; bool adjust_rect(SDL_Rect * rect); void calc_x(int current_start_pixel); void calc_sprite_rect(); public: MapSprite() {} virtual ~MapSprite() {} int get_row() const { return row; } // Pure virtual function makes MapSprite an abstract class. // Subclasses must provide a definition. virtual void update(const int * current_start_pixels, const int * pixels_to_move, const int * old_pixels_to_move, const Direction * directions, bool is_first_pass, PlayDisplay * pd) = 0; }; // class MapSprite }; // namespace FS #endif