Files
oboe/osx/classes/item.h
Celtic Minstrel b02902770c Well, at present the Windows code for the actual game almost compiles. The current goal is to undo all the things that Ormus did to make this job difficult.
Basically, remove as many as possible of the dependencies of the source files in the tools and classes folders on source files not in those folders.
(With the exception that files in the classes folder may depend on files in the tools folder.)

In this commit, several changes were made.
- Project file modified, may need further modification.
- Many files renamed to match the Mac version.
- #include statements for system headers changed to use <> instead of "" (some already did, but many didn't).
- xxx.h headers replaced with cxxx headers where appropriate.
- Most sound-related variables moved from globvars.cpp to soundvars.cpp.
- The files originally named graphutil and gutils have been merged.
- Changed TRUE/FALSE to true/false.
- Changed exlsound to soundtool and mostly removed dependencies on the main game files; the exception is that it still uses mainPtr (which probably can't be helped)
  and print_nums (which should probably be incorporated into the MessageBox string).
- Possibly other things that were forgotten.

For some reason this commit also includes changes recently committed into the branch for osx.

git-svn-id: http://openexile.googlecode.com/svn/trunk@121 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-08-03 19:00:23 +00:00

99 lines
2.4 KiB
C++

/*
* item.h
* BoE
*
* Created by Celtic Minstrel on 20/04/09.
*
*/
#ifndef ITEM_H
#define ITEM_H
#include "location.h"
#include <string>
#include <iosfwd>
namespace legacy { struct item_record_type; };
class cItemRec {
public:
eItemType variety;
short item_level;
char awkward;
char bonus;
char protection;
char charges;
eWeapType type;
char magic_use_type;
unsigned short graphic_num;
eItemAbil ability;
unsigned char ability_strength;
unsigned short type_flag;
unsigned char is_special;
short value;
unsigned char weight;
unsigned char special_class;
location item_loc;
std::string full_name;
std::string name;
unsigned char treas_class;
//unsigned char item_properties;
bool ident : 1;
bool property : 1;
bool magic : 1;
bool contained : 1;
bool cursed : 1;
bool concealed : 1;
bool enchanted : 1;
bool unsellable : 1;
private:
unsigned char reserved1;
unsigned char reserved2;
public:
//string desc; // for future use
unsigned char rec_treas_class() const;
// bool is_ident() const;
// bool is_property() const;
// bool is_magic() const;
// bool is_contained() const;
// bool is_cursed() const;
// bool is_concealed() const;
// bool is_enchanted() const;
// void set_ident(bool b);
// void set_property(bool b);
// void set_magic(bool b);
// void set_contained(bool b);
// void set_cursed(bool b);
// void set_concealed(bool b);
// void set_enchanted(bool b);
short item_weight() const;
cItemRec();
cItemRec(long preset);
cItemRec& operator = (legacy::item_record_type& old);
void writeTo(std::ostream& file, std::string prefix = "");
void readAttrFrom(std::string cur, std::istream& sin);
};
std::ostream& operator << (std::ostream& out, eWeapType& e);
std::ostream& operator << (std::ostream& out, eItemType& e);
std::ostream& operator << (std::ostream& out, eItemAbil& e);
std::istream& operator >> (std::istream& in, eWeapType& e);
std::istream& operator >> (std::istream& in, eItemType& e);
std::istream& operator >> (std::istream& in, eItemAbil& e);
/*
typedef struct {
short variety, item_level;
char awkward, bonus, protection, charges, type;
unsigned char graphic_num,ability, type_flag, is_special;
short value;
bool identified, magic;
unsigned char weight, description_flag;
char full_name[25], name[15];
unsigned char reserved1,reserved2;
unsigned char magic_use_type, ability_strength, treas_class, real_abil;
} short_item_record_type;
*/
#endif