Pol
Revision:cb584c9
|
Classes | |
class | StaticsByZ |
class | UoConvertMain |
Functions | |
void | create_landtiles_cfg () |
void | create_map (const std::string &realm, unsigned short width, unsigned short height) |
void | create_maptile (const std::string &realmname) |
void | create_multis_cfg () |
void | create_multis_cfg (FILE *multi_idx, FILE *multi_mul, FILE *multis_cfg) |
void | create_tiles_cfg () |
bool | differby_exactly (unsigned char f1, unsigned char f2, unsigned char bits) |
void | display_flags () |
bool | flags_match (unsigned int f1, unsigned int f2, unsigned char bits_compare) |
short | get_lowestadjacentz (unsigned short x, unsigned short y, short z) |
bool | is_cave_exit (USTRUCT_MAPINFO &mi) |
bool | is_cave_shadow (USTRUCT_MAPINFO &mi) |
bool | is_no_draw (USTRUCT_MAPINFO &mi) |
bool | otherflags_match (unsigned char f1, unsigned char f2, unsigned char bits_exclude) |
unsigned char | polmap_flags_from_landtile (unsigned short landtile) |
void | ProcessSolidBlock (unsigned short x_base, unsigned short y_base, MapWriter &mapwriter) |
void | update_map (const std::string &realm, unsigned short x, unsigned short y) |
void | write_flags (FILE *fp, unsigned int flags) |
void | write_multi (FILE *multis_cfg, unsigned id, FILE *multi_mul, unsigned int offset, unsigned int length) |
Variables | |
std::set< unsigned int > | BoatTypes |
bool | cfg_LOS_through_windows = 0 |
bool | cfg_use_no_shoot = 0 |
unsigned | empty = 0 |
std::set< unsigned int > | HouseTypes |
std::set< unsigned int > | MountTypes |
unsigned | nonempty = 0 |
std::set< unsigned int > | StairTypes |
unsigned | total_statics = 0 |
unsigned | with_more_solids = 0 |
void Pol::UoConvert::create_landtiles_cfg | ( | ) |
Definition at line 1007 of file UoConvertMain.cpp.
References Pol::Core::cfg_use_new_hsa_format, Pol::Core::USTRUCT_LAND_TILE::flags, Pol::Core::USTRUCT_LAND_TILE_HSA::flags, INFO_PRINT, Pol::Core::USTRUCT_LAND_TILE::name, Pol::Core::USTRUCT_LAND_TILE_HSA::name, Pol::Plib::polflags_from_landtileflags(), Pol::Core::readlandtile(), Pol::Core::USTRUCT_LAND_TILE::unk, Pol::Core::USTRUCT_LAND_TILE_HSA::unk, and write_flags().
Referenced by Pol::UoConvert::UoConvertMain::main().
void Pol::UoConvert::create_map | ( | const std::string & | realm, |
unsigned short | width, | ||
unsigned short | height | ||
) |
Definition at line 237 of file UoConvertMain.cpp.
References Pol::Plib::MapWriter::CreateNewFiles(), Pol::Tools::Timer< printer >::ellapsed(), INFO_PRINT, nonempty, ProcessSolidBlock(), Pol::Core::rawmapfullread(), Pol::Core::rawstaticfullread(), SOLIDX_X_SIZE, SOLIDX_Y_SIZE, Pol::Tools::Timer< printer >::stop(), Pol::Core::uo_map_height, Pol::Core::uo_map_width, Pol::Core::uo_mapid, Pol::Core::uo_readuop, Pol::Core::uo_usedif, and Pol::Plib::MapWriter::WriteConfigFile().
Referenced by Pol::UoConvert::UoConvertMain::main().
void Pol::UoConvert::create_maptile | ( | const std::string & | realmname | ) |
Definition at line 138 of file UoConvertMain.cpp.
References Pol::Core::USTRUCT_TILE::FLAG_LIQUID, Pol::Plib::RealmDescriptor::height, INFO_PRINT, Pol::Plib::MAPTILE_CELL::landtile, Pol::Core::USTRUCT_MAPINFO::landtile, Pol::Core::landtile_uoflags(), Pol::Plib::RealmDescriptor::Load(), Pol::Plib::MAPTILE_CHUNK, Pol::Core::safe_getmapinfo(), Pol::Core::uo_map_height, Pol::Core::uo_map_width, Pol::Plib::RealmDescriptor::uodif, Pol::Plib::RealmDescriptor::uomapid, Pol::Plib::RealmDescriptor::width, Pol::Plib::MAPTILE_CELL::z, and Pol::Core::USTRUCT_MAPINFO::z.
Referenced by Pol::UoConvert::UoConvertMain::main().
void Pol::UoConvert::create_multis_cfg | ( | ) |
Definition at line 899 of file UoConvertMain.cpp.
References Pol::Core::open_uo_file().
Referenced by Pol::UoConvert::UoConvertMain::main().
void Pol::UoConvert::create_multis_cfg | ( | FILE * | multi_idx, |
FILE * | multi_mul, | ||
FILE * | multis_cfg | ||
) |
Definition at line 872 of file UoConvertMain.cpp.
References Pol::Core::check_verdata(), Pol::Core::USTRUCT_VERSION::filepos, Pol::Core::idxrec, INFO_PRINT, Pol::Core::USTRUCT_VERSION::length, Pol::Core::USTRUCT_IDX::length, Pol::Core::USTRUCT_IDX::offset, Pol::Core::verfile, VERFILE_MULTI_MUL, and write_multi().
void Pol::UoConvert::create_tiles_cfg | ( | ) |
Definition at line 941 of file UoConvertMain.cpp.
References Pol::Core::USTRUCT_TILE::anim, Pol::Core::USTRUCT_TILE_HSA::anim, Pol::Core::cfg_use_new_hsa_format, Pol::Plib::SystemState::config, Pol::Plib::FLAG::EQUIPPABLE, Pol::Core::USTRUCT_TILE::flags, Pol::Core::USTRUCT_TILE_HSA::flags, Pol::Core::USTRUCT_TILE::height, Pol::Core::USTRUCT_TILE_HSA::height, INFO_PRINT, Pol::Core::USTRUCT_TILE::layer, Pol::Core::USTRUCT_TILE_HSA::layer, Pol::Core::PolConfig::max_tile_id, Pol::Core::USTRUCT_TILE::name, Pol::Core::USTRUCT_TILE_HSA::name, name, Pol::Plib::polflags_from_tileflags(), Pol::Core::read_objinfo(), Pol::Plib::systemstate, Pol::Core::USTRUCT_TILE::unk14, Pol::Core::USTRUCT_TILE_HSA::unk14, Pol::Core::USTRUCT_TILE::unk15, Pol::Core::USTRUCT_TILE_HSA::unk15, Pol::Core::USTRUCT_TILE::unk6, Pol::Core::USTRUCT_TILE_HSA::unk6, Pol::Core::USTRUCT_TILE::unk7, Pol::Core::USTRUCT_TILE_HSA::unk7, Pol::Core::USTRUCT_TILE::unk8, Pol::Core::USTRUCT_TILE_HSA::unk8, Pol::Core::USTRUCT_TILE::unk9, Pol::Core::USTRUCT_TILE_HSA::unk9, Pol::Core::USTRUCT_TILE::weight, Pol::Core::USTRUCT_TILE_HSA::weight, and write_flags().
Referenced by Pol::UoConvert::UoConvertMain::main().
bool Pol::UoConvert::differby_exactly | ( | unsigned char | f1, |
unsigned char | f2, | ||
unsigned char | bits | ||
) |
Definition at line 210 of file UoConvertMain.cpp.
References ProcessSolidBlock().
void Pol::UoConvert::display_flags | ( | ) |
Definition at line 87 of file UoConvertMain.cpp.
References Pol::Core::USTRUCT_TILE::FLAG__WALK, Pol::Core::USTRUCT_TILE::FLAG_BLOCKING, Pol::Core::USTRUCT_TILE::FLAG_FLOOR, Pol::Core::USTRUCT_TILE::FLAG_HALF_HEIGHT, Pol::Core::USTRUCT_TILE::FLAG_PLATFORM, Pol::Core::USTRUCT_TILE::FLAG_WALL, INFO_PRINT, Pol::Plib::FLAG::MOVELAND, and Pol::Plib::polflags_from_tileflags().
Referenced by Pol::UoConvert::UoConvertMain::main().
bool Pol::UoConvert::flags_match | ( | unsigned int | f1, |
unsigned int | f2, | ||
unsigned char | bits_compare | ||
) |
Definition at line 200 of file UoConvertMain.cpp.
Referenced by ProcessSolidBlock().
short Pol::UoConvert::get_lowestadjacentz | ( | unsigned short | x, |
unsigned short | y, | ||
short | z | ||
) |
Definition at line 305 of file UoConvertMain.cpp.
References is_cave_exit(), is_cave_shadow(), is_no_draw(), Pol::Core::safe_getmapinfo(), Pol::Core::uo_map_height, and Pol::Core::uo_map_width.
Referenced by ProcessSolidBlock().
bool Pol::UoConvert::is_cave_exit | ( | USTRUCT_MAPINFO & | mi | ) |
Definition at line 285 of file UoConvertMain.cpp.
References Pol::Core::USTRUCT_MAPINFO::landtile.
Referenced by get_lowestadjacentz().
bool Pol::UoConvert::is_cave_shadow | ( | USTRUCT_MAPINFO & | mi | ) |
Definition at line 296 of file UoConvertMain.cpp.
References Pol::Core::USTRUCT_MAPINFO::landtile.
Referenced by get_lowestadjacentz(), and ProcessSolidBlock().
bool Pol::UoConvert::is_no_draw | ( | USTRUCT_MAPINFO & | mi | ) |
Definition at line 280 of file UoConvertMain.cpp.
References Pol::Core::USTRUCT_MAPINFO::landtile.
Referenced by get_lowestadjacentz().
bool Pol::UoConvert::otherflags_match | ( | unsigned char | f1, |
unsigned char | f2, | ||
unsigned char | bits_exclude | ||
) |
Definition at line 205 of file UoConvertMain.cpp.
unsigned char Pol::UoConvert::polmap_flags_from_landtile | ( | unsigned short | landtile | ) |
Definition at line 128 of file UoConvertMain.cpp.
References Pol::Core::landtile_uoflags(), and Pol::Plib::polflags_from_tileflags().
void Pol::UoConvert::ProcessSolidBlock | ( | unsigned short | x_base, |
unsigned short | y_base, | ||
MapWriter & | mapwriter | ||
) |
Definition at line 446 of file UoConvertMain.cpp.
References Pol::Plib::SOLIDX2_ELEM::addindex, Pol::Plib::MapWriter::AppendSolid(), Pol::Plib::MapWriter::AppendSolidx2Elem(), Pol::Plib::SOLIDX2_ELEM::baseindex, Pol::Plib::FLAG::BLOCKING, Pol::Plib::FLAG::BLOCKSIGHT, empty, Pol::Core::USTRUCT_TILE::FLAG_BLOCKING, Pol::Core::USTRUCT_TILE::FLAG_FLOOR, Pol::Core::USTRUCT_TILE::FLAG_HALF_HEIGHT, Pol::Core::USTRUCT_TILE::FLAG_HOVEROVER, Pol::Core::USTRUCT_TILE::FLAG_LIQUID, Pol::Core::USTRUCT_TILE::FLAG_NO_SHOOT, Pol::Core::USTRUCT_TILE::FLAG_PLATFORM, Pol::Core::USTRUCT_TILE::FLAG_WALL, Pol::Plib::MapShape::flags, Pol::Core::StaticRec::flags, Pol::Plib::SOLIDS_ELEM::flags, Pol::Plib::MAPCELL::flags, flags_match(), get_lowestadjacentz(), Pol::Plib::FLAG::GRADUAL, Pol::Core::StaticRec::graphic, Pol::Plib::MapShape::height, Pol::Core::StaticRec::height, Pol::Plib::SOLIDS_ELEM::height, INFO_PRINT, is_cave_shadow(), Pol::Core::USTRUCT_MAPINFO::landtile, Pol::Core::landtile_uoflags(), Pol::Plib::FLAG::MORE_SOLIDS, Pol::Plib::FLAG::MOVELAND, Pol::Plib::FLAG::MOVESEA, Pol::Plib::MapWriter::NextSolidIndex(), Pol::Plib::MapWriter::NextSolidx2Offset(), nonempty, Pol::Plib::FLAG::OVERFLIGHT, passert_always, Pol::Plib::polflags_from_tileflags(), Pol::Core::readstatics(), Pol::Core::safe_getmapinfo(), Pol::Plib::MapWriter::SetMapCell(), Pol::Plib::MapWriter::SetSolidx2Offset(), SOLIDX_X_SIZE, SOLIDX_Y_SIZE, Pol::Core::uo_map_height, Pol::Core::uo_map_width, with_more_solids, Pol::Plib::MapShape::z, Pol::Core::StaticRec::z, Pol::Plib::SOLIDS_ELEM::z, Pol::Plib::MAPCELL::z, and Pol::Core::USTRUCT_MAPINFO::z.
Referenced by create_map(), differby_exactly(), and update_map().
void Pol::UoConvert::update_map | ( | const std::string & | realm, |
unsigned short | x, | ||
unsigned short | y | ||
) |
Definition at line 221 of file UoConvertMain.cpp.
References INFO_PRINT, nonempty, Pol::Plib::MapWriter::OpenExistingFiles(), ProcessSolidBlock(), Pol::Core::rawmapfullread(), Pol::Core::rawstaticfullread(), SOLIDX_X_SIZE, and SOLIDX_Y_SIZE.
Referenced by Pol::UoConvert::UoConvertMain::main().
void Pol::UoConvert::write_flags | ( | FILE * | fp, |
unsigned int | flags | ||
) |
Definition at line 913 of file UoConvertMain.cpp.
References Pol::Plib::FLAG::ALLOWDROPON, Pol::Plib::FLAG::BLOCKING, Pol::Plib::FLAG::BLOCKSIGHT, Pol::Plib::FLAG::DESC_PREPEND_A, Pol::Plib::FLAG::DESC_PREPEND_AN, Pol::Plib::FLAG::EQUIPPABLE, Pol::Plib::FLAG::GRADUAL, Pol::Plib::FLAG::MOVABLE, Pol::Plib::FLAG::MOVELAND, Pol::Plib::FLAG::MOVESEA, Pol::Plib::FLAG::OVERFLIGHT, and Pol::Plib::FLAG::STACKABLE.
Referenced by create_landtiles_cfg(), and create_tiles_cfg().
void Pol::UoConvert::write_multi | ( | FILE * | multis_cfg, |
unsigned | id, | ||
FILE * | multi_mul, | ||
unsigned int | offset, | ||
unsigned int | length | ||
) |
Definition at line 789 of file UoConvertMain.cpp.
References Pol::Core::cfg_use_new_hsa_format, ERROR_PRINT, Pol::Core::USTRUCT_MULTI_ELEMENT::flags, Pol::Core::USTRUCT_MULTI_ELEMENT::graphic, GRAPHIC_NODRAW, Pol::Core::USTRUCT_TILE::name, Pol::Core::USTRUCT_TILE_HSA::name, Pol::Core::readtile(), Pol::Core::USTRUCT_MULTI_ELEMENT::x, Pol::Core::USTRUCT_MULTI_ELEMENT::y, and Pol::Core::USTRUCT_MULTI_ELEMENT::z.
Referenced by create_multis_cfg().
std::set<unsigned int> Pol::UoConvert::BoatTypes |
Definition at line 75 of file UoConvertMain.cpp.
Referenced by Pol::UoConvert::UoConvertMain::main().
bool Pol::UoConvert::cfg_LOS_through_windows = 0 |
Definition at line 72 of file UoConvertMain.cpp.
Referenced by Pol::UoConvert::UoConvertMain::main().
bool Pol::UoConvert::cfg_use_no_shoot = 0 |
Definition at line 71 of file UoConvertMain.cpp.
Referenced by Pol::UoConvert::UoConvertMain::main().
unsigned Pol::UoConvert::empty = 0 |
Definition at line 217 of file UoConvertMain.cpp.
Referenced by Pol::Plib::MapWriter::CreateBaseDat(), and ProcessSolidBlock().
std::set<unsigned int> Pol::UoConvert::HouseTypes |
Definition at line 74 of file UoConvertMain.cpp.
Referenced by Pol::UoConvert::UoConvertMain::main().
std::set<unsigned int> Pol::UoConvert::MountTypes |
Definition at line 77 of file UoConvertMain.cpp.
Referenced by Pol::UoConvert::UoConvertMain::main().
unsigned Pol::UoConvert::nonempty = 0 |
Definition at line 217 of file UoConvertMain.cpp.
Referenced by create_map(), ProcessSolidBlock(), and update_map().
std::set<unsigned int> Pol::UoConvert::StairTypes |
Definition at line 76 of file UoConvertMain.cpp.
Referenced by Pol::UoConvert::UoConvertMain::main().
unsigned Pol::UoConvert::total_statics = 0 |
Definition at line 218 of file UoConvertMain.cpp.
unsigned Pol::UoConvert::with_more_solids = 0 |
Definition at line 219 of file UoConvertMain.cpp.
Referenced by ProcessSolidBlock().