// $Id: log.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 _LOG_H_ #define _LOG_H_ #include "mapsprite.h" #include "enums.h" #include "playdisplay.h" namespace FS { class Log : public MapSprite { private: LogColor original_color; LogColor current_color; SDL_Rect fill_rect; bool fill_visible; SDL_Rect sprite_size_rect; // FIXME: this is a HACK! SDL_Rect end_rect_src; SDL_Rect end_rect_dest; void process_first_pass(); void schedule_drawing(PlayDisplay * pd); void print_data(); int num_pixels_moved; Direction my_direction; public: Log(int _y, int _width, int _height, int _map_x, int _row, int _row_length_pixels, Direction _direction, LogColor _color); ~Log(); LogColor get_color() const { return current_color; } void set_color(LogColor c) { current_color = c; } int get_num_pixels_moved() const { return num_pixels_moved; } Direction get_direction() const { return my_direction; } 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); void reset() { current_color = original_color; } }; // class Log } // namespace FS #endif