character.h

00001 /***************************************************************************
00002  *   Copyright (C) 2007 by Mike Polan                                      *
00003  *   kanadakid@gmail.com                                                   *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 // character.h: the Character class
00021 
00022 #ifndef CHARACTER_H
00023 #define CHARACTER_H
00024 
00025 #include <iostream>
00026 #include "SDL.h"
00027 
00028 #include "common.h"
00029 #include "sprite.h"
00030 
00035 class Character {
00036         public:
00038                 enum Gender { GENDER_MALE=0, GENDER_FEMALE, GENDER_UNKNOWN };
00039                 
00046                 Character(const ustring &internal="", const ustring &name="", 
00047                           const ustring &caption="", const ustring &description="");
00048                 
00053                 void addTalkOption(const ustring &viewStr, const ustring &block);
00054                 
00058                 void removeTalkOption(const ustring &id);
00059                 
00061                 void clearTalkOptions() { m_TalkOptions.clear(); }
00062                 
00066                 std::vector<StringPair> getTalkOptions() const { return m_TalkOptions; }
00067                 
00072                 void addPresentable(const ustring &id, const ustring &targetBlock);
00073                 
00077                 void removePresentable(const ustring &id);
00078                 
00080                 void clearPresentableItems() { m_AcceptedItems.clear(); }
00081                 
00085                 void setBadPresentableBlock(const ustring &id) { m_BadPresentableBlock=id; }
00086                 
00090                 ustring getBadPresentableBlock() const { return m_BadPresentableBlock; }
00091                 
00095                 std::vector<StringPair> getPresentableItems() const { return m_AcceptedItems; }
00096                 
00100                 void setInternalName(const ustring &name) { m_InternalName=name; }
00101                 
00105                 ustring getInternalName() const { return m_InternalName; }
00106                 
00110                 void setName(const ustring &name) { m_Name=name; }
00111                 
00115                 ustring getName() const { return m_Name; }
00116                 
00120                 void setGender(const Gender &g) { m_Gender=g; }
00121                 
00125                 Gender getGender() const { return m_Gender; }
00126                 
00130                 void setCaption(const ustring &caption) { m_Caption=caption; }
00131                 
00135                 ustring getCaption() const { return m_Caption; }
00136                 
00140                 void setDescription(const ustring &desc) { m_Description=desc; }
00141                 
00145                 ustring getDescription() const { return m_Description; }
00146                 
00150                 void setSprite(const Sprite &spr) { m_Sprite=spr; }
00151                 
00155                 Sprite* getSprite() { return &m_Sprite; }
00156                 
00160                 void setSpriteName(const ustring &name) { m_SpriteName=name; }
00161                 
00165                 ustring getSpriteName() const { return m_SpriteName; }
00166                 
00170                 void setRootAnimation(const ustring &anim) { m_RootAnim=anim; }
00171                 
00175                 ustring getRootAnimation() const { return m_RootAnim; }
00176                 
00180                 void setHasTextBoxTag(bool b) { m_HasTextBoxTag=b; }
00181                 
00185                 bool hasTextBoxTag() const { return m_HasTextBoxTag; }
00186                 
00190                 void setTextBoxTag(SDL_Surface *surface) { m_TextBoxTag=surface; }
00191                 
00195                 SDL_Surface* getTextBoxTag() { return m_TextBoxTag; }
00196                 
00200                 void setHasHeadshot(bool b) { m_HasHeadshot=b; }
00201                 
00205                 bool hasHeadshot() const { return m_HasHeadshot; }
00206                 
00210                 void setHeadshot(SDL_Surface *full, SDL_Surface *thumb) { m_Headshot=full; m_HeadshotThumb=thumb; }
00211                 
00215                 SDL_Surface* getHeadshot() { return m_Headshot; }
00216                 
00222                 SDL_Surface* getHeadshotThumb() { return m_HeadshotThumb; }
00223         
00224         private:
00226                 ustring m_InternalName;
00227                 
00229                 ustring m_Name;
00230                 
00232                 ustring m_Caption;
00233                 
00235                 ustring m_Description;
00236                 
00238                 ustring m_SpriteName;
00239                 
00241                 ustring m_RootAnim;
00242                 
00244                 bool m_HasTextBoxTag;
00245                 
00247                 SDL_Surface *m_TextBoxTag;
00248                 
00250                 Sprite m_Sprite;
00251                 
00253                 Gender m_Gender;
00254                 
00256                 std::vector<StringPair> m_TalkOptions;
00257                 
00259                 std::vector<StringPair> m_AcceptedItems;
00260                 
00262                 ustring m_BadPresentableBlock;
00263                 
00265                 bool m_HasHeadshot;
00266                 
00268                 SDL_Surface *m_Headshot;
00269                 
00271                 SDL_Surface *m_HeadshotThumb;
00272 };
00273 
00274 #endif

Generated on Fri Feb 22 22:29:23 2008 for Phoenix Wright Case Player API by  doxygen 1.5.3