|
Pol
Rev 533
|
#include <customhouses.h>
Collaboration diagram for CustomHouseDesign: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 |
| ObjArray * | list_parts () const |
| unsigned char | NumUsedPlanes () const |
| CustomHouseDesign & | operator= (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) |
Definition at line 90 of file customhouses.h.
Definition at line 79 of file customhouses.cpp.
References CUSTOM_HOUSE_NUM_PLANES, and floor_sizes.
| 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:Definition at line 92 of file customhouses.cpp.
| void CustomHouseDesign::Add | ( | CUSTOM_HOUSE_ELEMENT & | elem | ) |
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:| void CustomHouseDesign::AddComponents | ( | UHouse * | house | ) |
Definition at line 494 of file customhouses.cpp.
References Add(), UHouse::get_components(), CUSTOM_HOUSE_ELEMENT::graphic, UObject::graphic, Item::invisible(), UObject::orphan(), UObject::x, CUSTOM_HOUSE_ELEMENT::xoffset, UObject::y, CUSTOM_HOUSE_ELEMENT::yoffset, CUSTOM_HOUSE_ELEMENT::z, and UObject::z.
Referenced by UHouse::AcceptHouseCommit(), and UOExecutorModule::mf_SendHousingTool().
Here is the call graph for this function:
Here is the caller graph for this function:| void CustomHouseDesign::AddMultiAtOffset | ( | u16 | multiid, |
| s8 | x, | ||
| s8 | y, | ||
| s8 | z | ||
| ) |
Definition at line 366 of file customhouses.cpp.
References Add(), MultiDef::components, config, CUSTOM_HOUSE_ELEMENT::graphic, PolConfig::max_tile_id, MultiDefByMultiID(), MULTI_ELEM::objtype, MULTI_ELEM::x, x, CUSTOM_HOUSE_ELEMENT::xoffset, MULTI_ELEM::y, CUSTOM_HOUSE_ELEMENT::yoffset, CUSTOM_HOUSE_ELEMENT::z, and MULTI_ELEM::z.
Referenced by CustomHousesAddMulti(), CustomHousesClear(), and UHouse::CustomHouseSetInitialState().
Here is the call graph for this function:
Here is the caller graph for this function:| void CustomHouseDesign::AddOrReplace | ( | CUSTOM_HOUSE_ELEMENT & | elem | ) |
Definition at line 135 of file customhouses.cpp.
References Add(), CustomHouseElements::data, Elements, floor_sizes, CUSTOM_HOUSE_ELEMENT::graphic, tileheight(), ValidLocation(), xoff, CUSTOM_HOUSE_ELEMENT::xoffset, yoff, CUSTOM_HOUSE_ELEMENT::yoffset, CUSTOM_HOUSE_ELEMENT::z, and z_to_custom_house_table().
Referenced by CustomHousesAdd(), and CustomHousesRoofSelect().
Here is the call graph for this function:
Here is the caller graph for this function:| void CustomHouseDesign::Clear | ( | ) |
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 |
||
| ) |
Definition at line 515 of file customhouses.cpp.
References UHouse::add_component(), Item::create(), CUSTOM_HOUSE_NUM_PLANES, CustomHouseElements::data, ItemDesc::DOORDESC, Elements, find_itemdesc(), floor_sizes, TELEPORTER_END, TELEPORTER_START, BObjectImp::type(), and UObject::z.
Referenced by ClientGameData::clear(), CustomHousesCommit(), and UHouse::CustomHousesQuit().
Here is the call graph for this function:
Here is the caller graph for this function:| void CustomHouseDesign::InitDesign | ( | u32 | _height, |
| u32 | _width, | ||
| s32 | xoffset, | ||
| s32 | yoffset | ||
| ) |
Definition at line 97 of file customhouses.cpp.
References CUSTOM_HOUSE_NUM_PLANES, Elements, floor_sizes, height, CustomHouseElements::SetHeight(), CustomHouseElements::SetWidth(), width, CustomHouseElements::xoff, xoff, CustomHouseElements::yoff, and yoff.
Referenced by CustomHouseDesign(), UHouse::CustomHouseSetInitialState(), and UHouse::readProperties().
Here is the call graph for this function:
Here is the caller graph for this function:| bool CustomHouseDesign::IsEmpty | ( | ) | const |
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:| ObjArray * CustomHouseDesign::list_parts | ( | ) | const |
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:| void CustomHouseDesign::ReplaceDirtFloor | ( | u32 | x, |
| u32 | y | ||
| ) |
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.
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:const char CustomHouseDesign::custom_house_z_xlate_table = {0,7,27,47,67,80} [static] |
Definition at line 135 of file customhouses.h.
Referenced by CustomHousesAdd(), CustomHousesAddMulti(), CustomHousesErase(), CustomHousesRoofSelect(), CustomHousesSelectFloor(), Character::CustomHousingMove(), and z_to_custom_house_table().
Definition at line 133 of file customhouses.h.
Referenced by Add(), AddOrReplace(), Clear(), Compress(), DeleteStairs(), Erase(), EraseGraphicAt(), FillComponents(), InitDesign(), list_parts(), operator=(), printProperties(), UHouse::readobjects(), UHouse::readshapes(), ReplaceDirtFloor(), and testprint().
Definition at line 118 of file customhouses.h.
Referenced by Add(), AddOrReplace(), Clear(), Compress(), CustomHouseDesign(), Erase(), EraseGraphicAt(), FillComponents(), InitDesign(), IsEmpty(), NumUsedPlanes(), operator=(), and TotalSize().
Definition at line 131 of file customhouses.h.
Referenced by CustomHousesErase(), DeleteStairs(), Erase(), InitDesign(), UHouse::readobjects(), UHouse::readshapes(), and ValidLocation().
Definition at line 131 of file customhouses.h.
Referenced by InitDesign(), UHouse::readobjects(), UHouse::readshapes(), and ValidLocation().
Definition at line 132 of file customhouses.h.
Referenced by AddOrReplace(), CustomHousesErase(), DeleteStairs(), Erase(), EraseGraphicAt(), InitDesign(), UHouse::readobjects(), UHouse::readshapes(), and ReplaceDirtFloor().
Definition at line 132 of file customhouses.h.
Referenced by AddOrReplace(), CustomHousesErase(), DeleteStairs(), Erase(), EraseGraphicAt(), InitDesign(), UHouse::readobjects(), UHouse::readshapes(), and ReplaceDirtFloor().