Pol  Revision:cb584c9
Pol::Multi::CustomHouseDesign Class Reference

#include <customhouses.h>

Public Member Functions

 CustomHouseDesign ()
 
 CustomHouseDesign (u32 _height, u32 _width, s32 xoffset, s32 yoffset)
 
 ~CustomHouseDesign ()
 
void Add (CUSTOM_HOUSE_ELEMENT &elem)
 
void AddComponents (UHouse *house)
 
void AddMultiAtOffset (u16 multiid, s8 x, s8 y, s8 z)
 
void AddOrReplace (CUSTOM_HOUSE_ELEMENT &elem)
 
void Clear ()
 
unsigned char * Compress (int floor, u32 *uncompr_length, u32 *compr_length)
 
bool DeleteStairs (u16 id, s32 x, s32 y, s8 z)
 
bool Erase (u32 xoffset, u32 yoffset, u8 z, int minheight=0)
 
bool EraseGraphicAt (u16 graphic, u32 xoffset, u32 yoffset, u8 z)
 
size_t estimatedSize () const
 
void FillComponents (UHouse *house, bool add_as_component=true)
 
void InitDesign (u32 _height, u32 _width, s32 xoffset, s32 yoffset)
 
bool IsEmpty () const
 
Bscript::ObjArraylist_parts () const
 
unsigned char NumUsedPlanes () const
 
CustomHouseDesignoperator= (const CustomHouseDesign &design)
 
void printProperties (Clib::StreamWriter &sw, const std::string &prefix) const
 
void readProperties (Clib::ConfigElem &elem, const std::string &prefix)
 
void ReplaceDirtFloor (u32 x, u32 y)
 
void testprint (std::ostream &os) const
 
unsigned int TotalSize () const
 
bool ValidLocation (u32 xidx, u32 yidx)
 

Static Public Member Functions

static void ClearComponents (UHouse *house)
 
static bool IsStair (u16 id, int &dir)
 
static bool IsStairBlock (u16 id)
 

Public Attributes

CustomHouseElements Elements [CUSTOM_HOUSE_NUM_PLANES]
 
int floor_sizes [CUSTOM_HOUSE_NUM_PLANES]
 
u32 height
 
u32 width
 
s32 xoff
 
s32 yoff
 

Static Public Attributes

static const char custom_house_z_xlate_table [CUSTOM_HOUSE_NUM_PLANES]
 

Static Private Member Functions

static bool isEditableItem (UHouse *house, Items::Item *item)
 Tells wether an item should be show in custom house design or not. More...
 
static char z_to_custom_house_table (char z)
 

Detailed Description

Definition at line 103 of file customhouses.h.

Constructor & Destructor Documentation

Pol::Multi::CustomHouseDesign::CustomHouseDesign ( )

Definition at line 93 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, and floor_sizes.

Referenced by estimatedSize().

Pol::Multi::CustomHouseDesign::CustomHouseDesign ( u32  _height,
u32  _width,
s32  xoffset,
s32  yoffset 
)

Definition at line 101 of file customhouses.cpp.

References InitDesign().

Pol::Multi::CustomHouseDesign::~CustomHouseDesign ( )

Definition at line 106 of file customhouses.cpp.

Member Function Documentation

void Pol::Multi::CustomHouseDesign::Clear ( )
void Pol::Multi::CustomHouseDesign::ClearComponents ( UHouse house)
static
unsigned char * Pol::Multi::CustomHouseDesign::Compress ( int  floor,
u32 uncompr_length,
u32 compr_length 
)
bool Pol::Multi::CustomHouseDesign::DeleteStairs ( u16  id,
s32  x,
s32  y,
s8  z 
)
bool Pol::Multi::CustomHouseDesign::Erase ( u32  xoffset,
u32  yoffset,
u8  z,
int  minheight = 0 
)
bool Pol::Multi::CustomHouseDesign::EraseGraphicAt ( u16  graphic,
u32  xoffset,
u32  yoffset,
u8  z 
)
size_t Pol::Multi::CustomHouseDesign::estimatedSize ( ) const
bool Pol::Multi::CustomHouseDesign::isEditableItem ( UHouse house,
Items::Item item 
)
inlinestaticprivate

Tells wether an item should be show in custom house design or not.

Definition at line 497 of file customhouses.cpp.

References Pol::Realms::Realm::find_supporting_multi(), Pol::Items::Item::invisible(), Pol::Core::ULWObject::realm, Pol::Core::ULWObject::x, Pol::Core::ULWObject::y, and Pol::Core::ULWObject::z.

Referenced by AddComponents(), and ClearComponents().

bool Pol::Multi::CustomHouseDesign::IsEmpty ( ) const

Definition at line 355 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, and floor_sizes.

Referenced by printProperties(), and testprint().

bool Pol::Multi::CustomHouseDesign::IsStair ( u16  id,
int &  dir 
)
static
bool Pol::Multi::CustomHouseDesign::IsStairBlock ( u16  id)
static
Bscript::ObjArray * Pol::Multi::CustomHouseDesign::list_parts ( ) const
unsigned char Pol::Multi::CustomHouseDesign::NumUsedPlanes ( ) const

Definition at line 373 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, and floor_sizes.

Referenced by Pol::Multi::CustomHousesSendFull().

CustomHouseDesign & Pol::Multi::CustomHouseDesign::operator= ( const CustomHouseDesign design)

Definition at line 134 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, Elements, and floor_sizes.

void Pol::Multi::CustomHouseDesign::printProperties ( Clib::StreamWriter sw,
const std::string &  prefix 
) const
void Pol::Multi::CustomHouseDesign::testprint ( std::ostream &  os) const
unsigned int Pol::Multi::CustomHouseDesign::TotalSize ( ) const

Definition at line 363 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, and floor_sizes.

Referenced by Pol::Multi::CustomHousesSendFull().

bool Pol::Multi::CustomHouseDesign::ValidLocation ( u32  xidx,
u32  yidx 
)
inline

Definition at line 137 of file customhouses.h.

Referenced by AddOrReplace(), DeleteStairs(), Erase(), EraseGraphicAt(), and ReplaceDirtFloor().

char Pol::Multi::CustomHouseDesign::z_to_custom_house_table ( char  z)
staticprivate

Member Data Documentation

const char Pol::Multi::CustomHouseDesign::custom_house_z_xlate_table
static
Initial value:
= {0, 7, 27,
47, 67, 80}

Definition at line 145 of file customhouses.h.

Referenced by Pol::Mobile::Character::CustomHousingMove(), and z_to_custom_house_table().

u32 Pol::Multi::CustomHouseDesign::height
u32 Pol::Multi::CustomHouseDesign::width

The documentation for this class was generated from the following files: