|
Pol
Revision:cb584c9
|
#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::ObjArray * | list_parts () const |
| unsigned char | NumUsedPlanes () const |
| CustomHouseDesign & | operator= (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) |
Definition at line 103 of file customhouses.h.
| 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.
| void Pol::Multi::CustomHouseDesign::Add | ( | CUSTOM_HOUSE_ELEMENT & | elem | ) |
Definition at line 145 of file customhouses.cpp.
References Pol::Multi::CustomHouseElements::AddElement(), Elements, floor_sizes, Pol::Multi::CUSTOM_HOUSE_ELEMENT::z, and z_to_custom_house_table().
Referenced by AddComponents(), AddMultiAtOffset(), AddOrReplace(), readProperties(), ReplaceDirtFloor(), and Pol::Multi::UHouse::script_method_id().
| void Pol::Multi::CustomHouseDesign::AddComponents | ( | UHouse * | house | ) |
Definition at line 531 of file customhouses.cpp.
References Add(), Pol::Multi::UHouse::get_components(), Pol::Core::ULWObject::graphic, Pol::Multi::CUSTOM_HOUSE_ELEMENT::graphic, isEditableItem(), Pol::Core::ULWObject::orphan(), Pol::Core::ULWObject::x, Pol::Multi::CUSTOM_HOUSE_ELEMENT::xoffset, Pol::Core::ULWObject::y, Pol::Multi::CUSTOM_HOUSE_ELEMENT::yoffset, Pol::Core::ULWObject::z, and Pol::Multi::CUSTOM_HOUSE_ELEMENT::z.
Referenced by Pol::Multi::UHouse::AcceptHouseCommit(), and Pol::Module::UOExecutorModule::mf_SendHousingTool().
Definition at line 388 of file customhouses.cpp.
References Add(), Pol::Multi::MultiDef::components, Pol::Plib::SystemState::config, ERROR_PRINT, Pol::Multi::CUSTOM_HOUSE_ELEMENT::graphic, Pol::Core::PolConfig::max_tile_id, Pol::Multi::MultiDefByMultiID(), Pol::Multi::MULTI_ELEM::objtype, Pol::Plib::systemstate, Pol::Multi::MULTI_ELEM::x, Pol::Multi::CUSTOM_HOUSE_ELEMENT::xoffset, Pol::Multi::MULTI_ELEM::y, Pol::Multi::CUSTOM_HOUSE_ELEMENT::yoffset, Pol::Multi::MULTI_ELEM::z, and Pol::Multi::CUSTOM_HOUSE_ELEMENT::z.
Referenced by Pol::Multi::CustomHousesAddMulti(), and Pol::Multi::CustomHousesClear().
| void Pol::Multi::CustomHouseDesign::AddOrReplace | ( | CUSTOM_HOUSE_ELEMENT & | elem | ) |
Definition at line 156 of file customhouses.cpp.
References Add(), Pol::Multi::CustomHouseElements::data, Elements, floor_sizes, Pol::Multi::CUSTOM_HOUSE_ELEMENT::graphic, Pol::Core::tileheight(), ValidLocation(), xoff, Pol::Multi::CUSTOM_HOUSE_ELEMENT::xoffset, yoff, Pol::Multi::CUSTOM_HOUSE_ELEMENT::yoffset, Pol::Multi::CUSTOM_HOUSE_ELEMENT::z, and z_to_custom_house_table().
Referenced by Pol::Multi::CustomHousesAdd(), and Pol::Multi::CustomHousesRoofSelect().
| void Pol::Multi::CustomHouseDesign::Clear | ( | ) |
Definition at line 277 of file customhouses.cpp.
References CUSTOM_HOUSE_NUM_PLANES, Pol::Multi::CustomHouseElements::data, data, Elements, and floor_sizes.
Referenced by Pol::Multi::CustomHousesClear().
|
static |
Definition at line 511 of file customhouses.cpp.
References Pol::Core::destroy_item(), Pol::Multi::UHouse::get_components(), isEditableItem(), and Pol::Core::ULWObject::orphan().
Referenced by Pol::Multi::UHouse::AcceptHouseCommit(), and Pol::Module::UOExecutorModule::mf_SendHousingTool().
| unsigned char * Pol::Multi::CustomHouseDesign::Compress | ( | int | floor, |
| u32 * | uncompr_length, | ||
| u32 * | compr_length | ||
| ) |
Definition at line 296 of file customhouses.cpp.
References BYTES_PER_TILE, Pol::Multi::CustomHouseElements::data, data, Elements, and floor_sizes.
Referenced by Pol::Multi::CustomHousesSendFull().
Definition at line 97 of file customhousehelp.cpp.
References Pol::Multi::CustomHouseElements::data, data, Elements, Erase(), IsStair(), IsStairBlock(), ReplaceDirtFloor(), ValidLocation(), xoff, yoff, and z_to_custom_house_table().
Referenced by Pol::Multi::CustomHousesErase().
Definition at line 188 of file customhouses.cpp.
References Pol::Multi::CustomHouseElements::data, Elements, floor_sizes, Pol::Core::tileheight(), ValidLocation(), xoff, yoff, and z_to_custom_house_table().
Referenced by DeleteStairs().
Definition at line 215 of file customhouses.cpp.
References Pol::Multi::CustomHouseElements::data, Elements, floor_sizes, ValidLocation(), xoff, yoff, and z_to_custom_house_table().
Referenced by Pol::Multi::CustomHousesErase(), Pol::Multi::CustomHousesRoofRemove(), and Pol::Multi::UHouse::script_method_id().
| size_t Pol::Multi::CustomHouseDesign::estimatedSize | ( | ) | const |
Definition at line 108 of file customhouses.cpp.
References CUSTOM_HOUSE_NUM_PLANES, CustomHouseDesign(), and Elements.
Referenced by Pol::Multi::UHouse::estimatedSize().
| void Pol::Multi::CustomHouseDesign::FillComponents | ( | UHouse * | house, |
| bool | add_as_component = true |
||
| ) |
Definition at line 552 of file customhouses.cpp.
References Pol::Multi::UHouse::add_component(), Pol::Items::Item::create(), CUSTOM_HOUSE_NUM_PLANES, Pol::Multi::CustomHouseElements::data, data, Pol::Items::ItemDesc::DOORDESC, Elements, Pol::Items::find_itemdesc(), floor_sizes, passert_always_r, TELEPORTER_END, TELEPORTER_START, and Pol::Core::ULWObject::z.
Referenced by Pol::Network::ClientGameData::clear(), and Pol::Multi::CustomHousesCommit().
| void Pol::Multi::CustomHouseDesign::InitDesign | ( | u32 | _height, |
| u32 | _width, | ||
| s32 | xoffset, | ||
| s32 | yoffset | ||
| ) |
Definition at line 118 of file customhouses.cpp.
References CUSTOM_HOUSE_NUM_PLANES, Elements, floor_sizes, height, Pol::Multi::CustomHouseElements::SetHeight(), Pol::Multi::CustomHouseElements::SetWidth(), width, Pol::Multi::CustomHouseElements::xoff, xoff, Pol::Multi::CustomHouseElements::yoff, and yoff.
Referenced by CustomHouseDesign(), and Pol::Multi::UHouse::readProperties().
|
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().
|
static |
Definition at line 72 of file customhousehelp.cpp.
References Pol::Plib::SystemState::config, Pol::Core::PolConfig::max_tile_id, Pol::Multi::StairIDs, Pol::Multi::StairSeqs, and Pol::Plib::systemstate.
Referenced by DeleteStairs().
|
static |
Definition at line 61 of file customhousehelp.cpp.
References Pol::Multi::BlockIDs, Pol::Plib::SystemState::config, Pol::Core::PolConfig::max_tile_id, and Pol::Plib::systemstate.
Referenced by DeleteStairs().
| Bscript::ObjArray * Pol::Multi::CustomHouseDesign::list_parts | ( | ) | const |
Definition at line 607 of file customhouses.cpp.
References CUSTOM_HOUSE_NUM_PLANES, Pol::Multi::CustomHouseElements::data, data, and Elements.
Referenced by Pol::Multi::CustomHousesCommit(), and Pol::Multi::UHouse::get_script_member_id().
| 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 |
Definition at line 442 of file customhouses.cpp.
References CUSTOM_HOUSE_NUM_PLANES, Pol::Multi::CustomHouseElements::data, data, Elements, and IsEmpty().
Referenced by Pol::Multi::UHouse::printProperties().
| void Pol::Multi::CustomHouseDesign::readProperties | ( | Clib::ConfigElem & | elem, |
| const std::string & | prefix | ||
| ) |
Definition at line 418 of file customhouses.cpp.
References Add(), Pol::Multi::CUSTOM_HOUSE_ELEMENT::graphic, ISTRINGSTREAM, Pol::Clib::ConfigElem::remove_prop(), Pol::Multi::CUSTOM_HOUSE_ELEMENT::xoffset, Pol::Multi::CUSTOM_HOUSE_ELEMENT::yoffset, and Pol::Multi::CUSTOM_HOUSE_ELEMENT::z.
Referenced by Pol::Multi::UHouse::readProperties().
Definition at line 239 of file customhouses.cpp.
References Add(), Pol::Multi::CustomHouseElements::data, DIRTY_TILE, Elements, Pol::Multi::CUSTOM_HOUSE_ELEMENT::graphic, height, Pol::Core::tileheight(), ValidLocation(), xoff, Pol::Multi::CUSTOM_HOUSE_ELEMENT::xoffset, yoff, Pol::Multi::CUSTOM_HOUSE_ELEMENT::yoffset, and Pol::Multi::CUSTOM_HOUSE_ELEMENT::z.
Referenced by Pol::Multi::CustomHousesErase(), and DeleteStairs().
| void Pol::Multi::CustomHouseDesign::testprint | ( | std::ostream & | os | ) | const |
Definition at line 468 of file customhouses.cpp.
References CUSTOM_HOUSE_NUM_PLANES, Pol::Multi::CustomHouseElements::data, data, Elements, and IsEmpty().
| 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().
Definition at line 137 of file customhouses.h.
Referenced by AddOrReplace(), DeleteStairs(), Erase(), EraseGraphicAt(), and ReplaceDirtFloor().
|
staticprivate |
Definition at line 80 of file customhouses.cpp.
References CUSTOM_HOUSE_NUM_PLANES, and custom_house_z_xlate_table.
Referenced by Add(), AddOrReplace(), DeleteStairs(), Erase(), and EraseGraphicAt().
|
static |
Definition at line 145 of file customhouses.h.
Referenced by Pol::Mobile::Character::CustomHousingMove(), and z_to_custom_house_table().
| CustomHouseElements Pol::Multi::CustomHouseDesign::Elements[CUSTOM_HOUSE_NUM_PLANES] |
Definition at line 143 of file customhouses.h.
Referenced by Add(), AddOrReplace(), Clear(), Compress(), DeleteStairs(), Erase(), EraseGraphicAt(), estimatedSize(), FillComponents(), InitDesign(), list_parts(), operator=(), printProperties(), Pol::Multi::UHouse::readobjects(), Pol::Multi::UHouse::readshapes(), ReplaceDirtFloor(), and testprint().
| int Pol::Multi::CustomHouseDesign::floor_sizes[CUSTOM_HOUSE_NUM_PLANES] |
Definition at line 132 of file customhouses.h.
Referenced by Add(), AddOrReplace(), Clear(), Compress(), CustomHouseDesign(), Erase(), EraseGraphicAt(), FillComponents(), InitDesign(), IsEmpty(), NumUsedPlanes(), operator=(), and TotalSize().
| u32 Pol::Multi::CustomHouseDesign::height |
Definition at line 141 of file customhouses.h.
Referenced by Pol::Multi::CustomHousesErase(), InitDesign(), Pol::Multi::UHouse::readobjects(), Pol::Multi::UHouse::readshapes(), and ReplaceDirtFloor().
| u32 Pol::Multi::CustomHouseDesign::width |
Definition at line 141 of file customhouses.h.
Referenced by InitDesign(), Pol::Multi::UHouse::readobjects(), and Pol::Multi::UHouse::readshapes().
| s32 Pol::Multi::CustomHouseDesign::xoff |
Definition at line 142 of file customhouses.h.
Referenced by AddOrReplace(), Pol::Multi::CustomHousesErase(), DeleteStairs(), Erase(), EraseGraphicAt(), InitDesign(), Pol::Multi::UHouse::readobjects(), Pol::Multi::UHouse::readshapes(), and ReplaceDirtFloor().
| s32 Pol::Multi::CustomHouseDesign::yoff |
Definition at line 142 of file customhouses.h.
Referenced by AddOrReplace(), Pol::Multi::CustomHousesErase(), DeleteStairs(), Erase(), EraseGraphicAt(), InitDesign(), Pol::Multi::UHouse::readobjects(), Pol::Multi::UHouse::readshapes(), and ReplaceDirtFloor().