00001
00002
00003
00004
00005 #ifndef OW_CELL_H
00006 #define OW_CELL_H
00007
00008 #include <string>
00009 #include <SDL/SDL.h>
00010 #include <SDL/SDL_ttf.h>
00011
00012 using namespace std;
00017 class ow_cell{
00018 private:
00019 int x,y;
00020 string cellname;
00021 SDL_Surface *gfxdata;
00022 SDL_Surface *background;
00023 int cellstatus;
00024 int cellaction;
00025 int cellseeds;
00026 int statusaction_timeout;
00027 public:
00028 ow_cell(int screenx, int screeny, int boardside, int cellx, int celly);
00029
00030 int countseeds();
00031 void emptyseeds();
00032 int addseeds(int seeds);
00033 int takeseeds(int seeds);
00034
00035 void setaction(int action, int timeout);
00036 void setstatus(int status, int timeout);
00037 void update_status_action();
00038
00039 void set_gfxdata(SDL_Surface *gfxdat);
00040 void draw(SDL_Surface *surface, TTF_Font *font);
00041
00042 cellXY getcellcoordXY();
00043 void setcellname(string newcellname);
00044 int isOverCoordXY(int coordx, int coordy);
00045
00046 ~ow_cell();
00047
00048 };
00049
00050 #endif