Pol  Rev 533
CustomHouseDesign Class Reference

#include <customhouses.h>

+ Collaboration diagram for CustomHouseDesign:

List of all members.

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)
void FillComponents (UHouse *house, bool add_as_component=true)
void InitDesign (u32 _height, u32 _width, s32 xoffset, s32 yoffset)
bool IsEmpty () const
ObjArraylist_parts () const
unsigned char NumUsedPlanes () const
CustomHouseDesignoperator= (const CustomHouseDesign &design)
void printProperties (std::ostream &os, const std::string &prefix) const
void readProperties (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] = {0,7,27,47,67,80}

Private Member Functions

char z_to_custom_house_table (char z)

Detailed Description

Definition at line 90 of file customhouses.h.


Constructor & Destructor Documentation

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

Definition at line 87 of file customhouses.cpp.

References InitDesign().

+ Here is the call graph for this function:


Member Function Documentation

Definition at line 124 of file customhouses.cpp.

References CustomHouseElements::AddElement(), Elements, floor_sizes, CUSTOM_HOUSE_ELEMENT::z, and z_to_custom_house_table().

Referenced by AddComponents(), AddMultiAtOffset(), AddOrReplace(), readProperties(), ReplaceDirtFloor(), and UHouse::script_method_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 253 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, CustomHouseElements::data, Elements, and floor_sizes.

Referenced by CustomHousesClear(), and UHouse::CustomHouseSetInitialState().

+ Here is the caller graph for this function:

void CustomHouseDesign::ClearComponents ( UHouse house) [static]

Definition at line 474 of file customhouses.cpp.

References destroy_item(), UHouse::get_components(), Item::invisible(), and UObject::orphan().

Referenced by UHouse::AcceptHouseCommit(), and UOExecutorModule::mf_SendHousingTool().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned char * CustomHouseDesign::Compress ( int  floor,
u32 uncompr_length,
u32 compr_length 
)

Definition at line 274 of file customhouses.cpp.

References BYTES_PER_TILE, CustomHouseElements::data, Elements, and floor_sizes.

Referenced by CustomHousesSendFull().

+ Here is the caller graph for this function:

bool CustomHouseDesign::DeleteStairs ( u16  id,
s32  x,
s32  y,
s8  z 
)

Definition at line 86 of file customhousehelp.cpp.

References CustomHouseElements::data, Elements, Erase(), height, IsStair(), IsStairBlock(), ReplaceDirtFloor(), ValidLocation(), x, xoff, yoff, and z_to_custom_house_table().

Referenced by CustomHousesErase().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool CustomHouseDesign::Erase ( u32  xoffset,
u32  yoffset,
u8  z,
int  minheight = 0 
)

Definition at line 167 of file customhouses.cpp.

References CustomHouseElements::data, Elements, floor_sizes, height, tileheight(), ValidLocation(), xoff, yoff, and z_to_custom_house_table().

Referenced by DeleteStairs().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool CustomHouseDesign::EraseGraphicAt ( u16  graphic,
u32  xoffset,
u32  yoffset,
u8  z 
)

Definition at line 193 of file customhouses.cpp.

References CustomHouseElements::data, Elements, floor_sizes, ValidLocation(), xoff, yoff, and z_to_custom_house_table().

Referenced by CustomHousesErase(), CustomHousesRoofRemove(), and UHouse::script_method_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CustomHouseDesign::FillComponents ( UHouse house,
bool  add_as_component = true 
)
void CustomHouseDesign::InitDesign ( u32  _height,
u32  _width,
s32  xoffset,
s32  yoffset 
)

Definition at line 334 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, and floor_sizes.

Referenced by printProperties(), and testprint().

+ Here is the caller graph for this function:

bool CustomHouseDesign::IsStair ( u16  id,
int &  dir 
) [static]

Definition at line 61 of file customhousehelp.cpp.

References config, PolConfig::max_tile_id, StairIDs, and StairSeqs.

Referenced by DeleteStairs().

+ Here is the caller graph for this function:

bool CustomHouseDesign::IsStairBlock ( u16  id) [static]

Definition at line 50 of file customhousehelp.cpp.

References BlockIDs, config, and PolConfig::max_tile_id.

Referenced by DeleteStairs().

+ Here is the caller graph for this function:

Definition at line 561 of file customhouses.cpp.

References ObjArray::addElement(), BStruct::addMember(), CUSTOM_HOUSE_NUM_PLANES, CustomHouseElements::data, and Elements.

Referenced by CustomHousesCommit().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned char CustomHouseDesign::NumUsedPlanes ( ) const

Definition at line 352 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, and floor_sizes.

Referenced by CustomHousesSendFull().

+ Here is the caller graph for this function:

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

Definition at line 113 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, Elements, and floor_sizes.

void CustomHouseDesign::printProperties ( std::ostream &  os,
const std::string &  prefix 
) const

Definition at line 418 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, CustomHouseElements::data, Elements, and IsEmpty().

Referenced by UHouse::printProperties().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CustomHouseDesign::readProperties ( ConfigElem elem,
const std::string &  prefix 
)

Definition at line 394 of file customhouses.cpp.

References Add(), CUSTOM_HOUSE_ELEMENT::graphic, ISTRINGSTREAM, ConfigElem::remove_prop(), x, CUSTOM_HOUSE_ELEMENT::xoffset, CUSTOM_HOUSE_ELEMENT::yoffset, and CUSTOM_HOUSE_ELEMENT::z.

Referenced by UHouse::readProperties().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 217 of file customhouses.cpp.

References Add(), CustomHouseElements::data, DIRTY_TILE, Elements, CUSTOM_HOUSE_ELEMENT::graphic, tileheight(), ValidLocation(), x, xoff, CUSTOM_HOUSE_ELEMENT::xoffset, yoff, CUSTOM_HOUSE_ELEMENT::yoffset, and CUSTOM_HOUSE_ELEMENT::z.

Referenced by CustomHousesErase(), and DeleteStairs().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CustomHouseDesign::testprint ( std::ostream &  os) const

Definition at line 445 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, CustomHouseElements::data, Elements, IsEmpty(), and x.

+ Here is the call graph for this function:

unsigned int CustomHouseDesign::TotalSize ( ) const

Definition at line 342 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, and floor_sizes.

Referenced by CustomHousesSendFull().

+ Here is the caller graph for this function:

bool CustomHouseDesign::ValidLocation ( u32  xidx,
u32  yidx 
) [inline]

Definition at line 123 of file customhouses.h.

References height, and width.

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

+ Here is the caller graph for this function:

char CustomHouseDesign::z_to_custom_house_table ( char  z) [private]

Definition at line 66 of file customhouses.cpp.

References CUSTOM_HOUSE_NUM_PLANES, and custom_house_z_xlate_table.

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

+ Here is the caller graph for this function:


Member Data Documentation


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