00001 /************************************************************************* 00002 player.h 00003 Project Piedmont game 00004 ------------------------- 00005 00006 Date Created: 11/08/00 Last Modified: 05/07/08 00007 Programmer: David Foster 00008 Copyright: (C) 2000 David Foster (see file COPYING) 00009 E-mail: dfoster@computer.org 00010 00011 Description: player character class, similar to the character class 00012 00013 This program is free software; you can redistribute it and/or modify 00014 it under the terms of the GNU General Public License as published by 00015 the Free Software Foundation; either version 2 of the License, or 00016 (at your option) any later version. 00017 00018 This program is distributed in the hope that it will be useful, 00019 but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 GNU General Public License for more details. 00022 00023 You should have received a copy of the GNU General Public License 00024 along with this program; if not, write to the Free Software 00025 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00026 00027 ************************************************************************/ 00028 00029 #ifndef PLAYER_H 00030 #define PLAYER_H 00031 #define PLAYER_DEBUG 0 //1 allows debug statements to be output 00032 00033 #include <stdio.h> 00034 #include <iostream> 00035 #include <stdlib.h> 00036 #include <string> 00037 #include <stddef.h> 00038 #include <unistd.h> 00039 #include <SDL/SDL.h> 00040 #include "misc.h" 00041 #include "screen.h" 00042 #include "tiles.h" 00043 #include "fgentity.h" 00044 00045 class Player : public FGEntity{ 00046 private: 00047 Screen screen; 00048 paul_info *pinfo; 00049 // int direction; // paul_info->direction is being used 00050 int num_frames_phase; //frames per phase 00051 int num_frames_action; //frames per each action 00052 int frame_dir; 00053 int phase; 00054 int undo_move_x, undo_move_y; 00055 public: 00056 Player(); 00057 ~Player(); 00058 void set_screen (Screen &s); 00059 void set_paul_info (paul_info *p); 00060 void move (int dir); 00061 void unmove (int dir); 00062 void redraw (); 00063 void static_redraw (int dir); 00064 void static_redraw_cycle (int dir); 00065 void overlay (); 00066 void update (); 00067 00068 }; 00069 00070 #endif 00071 00072 00073