Files
oboe/osx/classes/pc.h
Celtic Minstrel 6af129c277 - Nuked the storage_gworld and party_template_gworld. Monster, terrain, and PC graphics are now drawn directly from their sheets of origin. This is partly tested, and seems to work fine.
- Removed the terrain_pic and terrain_blockage arrays, which were redundant (though shorter).
- Cleaned out some of the commented code in boe.graphics.cpp and boe.graphutil.cpp
- Added a templated get function to cOutdoors::cWandering.
In the dialog engine:
- Important fields are now initialized to default values, as they should be.
- The absence of required attributes is now recognized as an error
- Added stack element to the DTD; no code support yet
- Added fore attribute to the dialog element to specify default text colour; DTD updated and code support added.
- Likewise with the def-key attribute on other clickable items besides buttons (which already had it)
- Updated stylesheet to fall back on the fore attribute when colour is unspecified
- When drawing default monster graphics, it uses m_start_pic instead of num as the index. This should be right, though it's untested.
Unfortunately, the dialog engine is still unstable.

git-svn-id: http://openexile.googlecode.com/svn/trunk@100 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-06-28 17:18:24 +00:00

77 lines
2.0 KiB
C++

/*
* pc.h
* BoE
*
* Created by Celtic Minstrel on 24/04/09.
*
*/
#ifndef PC_H
#define PC_H
#include <string>
#include <iosfwd>
namespace legacy { struct pc_record_type; };
enum eMainStatus {
MAIN_STATUS_ABSENT = 0, // absent, empty slot
MAIN_STATUS_ALIVE = 1,
MAIN_STATUS_DEAD = 2,
MAIN_STATUS_DUST = 3,
MAIN_STATUS_STONE = 4,
MAIN_STATUS_FLED = 5,
MAIN_STATUS_SURFACE = 6, // fled to surface?
MAIN_STATUS_WON = 7,
MAIN_STATUS_SPLIT = 10,
// The rest are not really necessary, but are here for completeness so that all valid values have a name.
MAIN_STATUS_SPLIT_ABSENT = MAIN_STATUS_SPLIT + MAIN_STATUS_ABSENT,
MAIN_STATUS_SPLIT_ALIVE = MAIN_STATUS_SPLIT + MAIN_STATUS_ALIVE,
MAIN_STATUS_SPLIT_DEAD = MAIN_STATUS_SPLIT + MAIN_STATUS_DEAD,
MAIN_STATUS_SPLIT_DUST = MAIN_STATUS_SPLIT + MAIN_STATUS_DUST,
MAIN_STATUS_SPLIT_STONE = MAIN_STATUS_SPLIT + MAIN_STATUS_STONE,
MAIN_STATUS_SPLIT_FLED = MAIN_STATUS_SPLIT + MAIN_STATUS_FLED,
MAIN_STATUS_SPLIT_SURFACE = MAIN_STATUS_SPLIT + MAIN_STATUS_SURFACE,
MAIN_STATUS_SPLIT_WON = MAIN_STATUS_SPLIT + MAIN_STATUS_WON,
};
class cPlayer {
public:
eMainStatus main_status;
std::string name;
short skills[30];
unsigned short max_health;
short cur_health;
unsigned short max_sp;
short cur_sp;
unsigned short experience;
short skill_pts;
short level;
short status[15];
cItemRec items[24];
bool equip[24];
bool priest_spells[62];
bool mage_spells[62];
pic_num_t which_graphic;
short weap_poisoned;
//bool advan[15];
bool traits[15];
eRace race;
//short exp_adj;
short direction;
short ap;
cPlayer& operator = (legacy::pc_record_type old);
cPlayer();
cPlayer(long key,short slot);
short get_tnl();
void writeTo(std::ostream& file);
void readFrom(std::istream& file);
};
void operator += (eMainStatus& stat, eMainStatus othr);
void operator -= (eMainStatus& stat, eMainStatus othr);
std::ostream& operator << (std::ostream& out, eMainStatus& e);
std::istream& operator >> (std::istream& in, eMainStatus& e);
#endif