10 #include "../clib/Program/ProgramMain.h" 11 #include "../clib/cfgelem.h" 12 #include "../clib/cfgfile.h" 13 #include "../clib/fdump.h" 14 #include "../clib/fileutil.h" 15 #include "../clib/logfacility.h" 16 #include "../clib/rawtypes.h" 17 #include "../clib/stlutil.h" 18 #include "../clib/strutil.h" 19 #include "../plib/realmdescriptor.h" 20 #include "../plib/staticblock.h" 21 #include "../plib/systemstate.h" 22 #include "../pol/clidata.h" 23 #include "../pol/globals/multidefs.h" 24 #include "../pol/multi/multidef.h" 25 #include "../pol/objtype.h" 26 #include "../pol/polfile.h" 27 #include "../pol/poltype.h" 28 #include "../pol/uconst.h" 29 #include "../pol/udatfile.h" 30 #include "../pol/uofile.h" 31 #include "../pol/uofilei.h" 32 #include "../pol/ustruct.h" 34 #include <format/format.h> 56 0x0002, 0x01f5, 0x0226, 0x0347, 0x0757, 0x0286, 0x03b6, 0x0327, 0x0e08, 0x0628, 0x0567, 0x0798,
57 0x19d9, 0x0978, 0x02a6, 0x0577, 0x0718, 0x05b8, 0x1cc9, 0x0a78, 0x0257, 0x04f7, 0x0668, 0x07d8,
58 0x1919, 0x1ce9, 0x03f7, 0x0909, 0x0598, 0x07b8, 0x0918, 0x0c68, 0x02d6, 0x1869, 0x06f8, 0x0939,
59 0x1cca, 0x05a8, 0x1aea, 0x1c0a, 0x1489, 0x14a9, 0x0829, 0x19fa, 0x1719, 0x1209, 0x0e79, 0x1f3a,
60 0x14b9, 0x1009, 0x1909, 0x0136, 0x1619, 0x1259, 0x1339, 0x1959, 0x1739, 0x1ca9, 0x0869, 0x1e99,
61 0x0db9, 0x1ec9, 0x08b9, 0x0859, 0x00a5, 0x0968, 0x09c8, 0x1c39, 0x19c9, 0x08f9, 0x18f9, 0x0919,
62 0x0879, 0x0c69, 0x1779, 0x0899, 0x0d69, 0x08c9, 0x1ee9, 0x1eb9, 0x0849, 0x1649, 0x1759, 0x1cd9,
63 0x05e8, 0x0889, 0x12b9, 0x1729, 0x10a9, 0x08d9, 0x13a9, 0x11c9, 0x1e1a, 0x1e0a, 0x1879, 0x1dca,
64 0x1dfa, 0x0747, 0x19f9, 0x08d8, 0x0e48, 0x0797, 0x0ea9, 0x0e19, 0x0408, 0x0417, 0x10b9, 0x0b09,
65 0x06a8, 0x0c18, 0x0717, 0x0787, 0x0b18, 0x14c9, 0x0437, 0x0768, 0x0667, 0x04d7, 0x08a9, 0x02f6,
66 0x0c98, 0x0ce9, 0x1499, 0x1609, 0x1baa, 0x19ea, 0x39fa, 0x0e59, 0x1949, 0x1849, 0x1269, 0x0307,
67 0x06c8, 0x1219, 0x1e89, 0x1c1a, 0x11da, 0x163a, 0x385a, 0x3dba, 0x17da, 0x106a, 0x397a, 0x24ea,
68 0x02e7, 0x0988, 0x33ca, 0x32ea, 0x1e9a, 0x0bf9, 0x3dfa, 0x1dda, 0x32da, 0x2eda, 0x30ba, 0x107a,
69 0x2e8a, 0x3dea, 0x125a, 0x1e8a, 0x0e99, 0x1cda, 0x1b5a, 0x1659, 0x232a, 0x2e1a, 0x3aeb, 0x3c6b,
70 0x3e2b, 0x205a, 0x29aa, 0x248a, 0x2cda, 0x23ba, 0x3c5b, 0x251a, 0x2e9a, 0x252a, 0x1ea9, 0x3a0b,
71 0x391b, 0x23ca, 0x392b, 0x3d5b, 0x233a, 0x2cca, 0x390b, 0x1bba, 0x3a1b, 0x3c4b, 0x211a, 0x203a,
72 0x12a9, 0x231a, 0x3e0b, 0x29ba, 0x3d7b, 0x202a, 0x3adb, 0x213a, 0x253a, 0x32ca, 0x23da, 0x23fa,
73 0x32fa, 0x11ca, 0x384a, 0x31ca, 0x17ca, 0x30aa, 0x2e0a, 0x276a, 0x250a, 0x3e3b, 0x396a, 0x18fa,
74 0x204a, 0x206a, 0x230a, 0x265a, 0x212a, 0x23ea, 0x3acb, 0x393b, 0x3e1b, 0x1dea, 0x3d6b, 0x31da,
75 0x3e5b, 0x3e4b, 0x207a, 0x3c7b, 0x277a, 0x3d4b, 0x0c08, 0x162a, 0x3daa, 0x124a, 0x1b4a, 0x264a,
76 0x33da, 0x1d1a, 0x1afa, 0x39ea, 0x24fa, 0x373b, 0x249a, 0x372b, 0x1679, 0x210a, 0x23aa, 0x1b8a,
77 0x3afb, 0x18ea, 0x2eca, 0x0627, 0x00d4
86 <<
"SVR_KEYDESC keydesc[ 257 ] = {\n";
88 for (
int i = 0; i <= 256; i++ )
90 int nbits = keyid[i] & 0x0F;
91 unsigned short inmask = 0x10;
92 const unsigned short val =
static_cast<const unsigned short>( keyid[i] );
93 unsigned short valout = 0;
101 _tmp.Format(
" {{ {:>2}, 0x{:04X}, 0x{:04X}}},\n" )
102 << ( keyid[i] & 0x0F ) << ( keyid[i] >> 4 ) << valout;
111 #define TILES_START 0x68800 116 _tmp.Format(
"objtype: 0x{:04X}\n" ) << objtype;
117 _tmp <<
" name: " << tile.
name <<
"\n";
119 _tmp.Format(
" flags: 0x{:08X}\n" ) <<
static_cast<unsigned long>( tile.
flags );
121 _tmp.Format(
" weight: 0x{:02X}\n" ) << (int)tile.
weight;
123 _tmp.Format(
" layer: 0x{:02X}\n" ) << (int)tile.
layer;
125 _tmp.Format(
" unk6: 0x{:02X}\n" ) << (int)tile.
unk6;
127 _tmp.Format(
" unk7: 0x{:02X}\n" ) << (int)tile.
unk7;
129 _tmp.Format(
" unk8: 0x{:02X}\n" ) << (int)tile.
unk8;
131 _tmp.Format(
" unk9: 0x{:02X}\n" ) << (int)tile.
unk9;
133 _tmp.Format(
" anim: 0x{:08X}\n" ) <<
static_cast<unsigned long>( tile.
anim );
135 _tmp.Format(
" height: 0x{:02X}\n" ) << (int)tile.
height;
137 _tmp.Format(
" unk14: 0x{:02X}\n" ) << (int)tile.
unk14;
139 _tmp.Format(
" unk15: 0x{:02X}\n" ) << (int)tile.
unk15;
149 FILE* fp = fopen( argv[2],
"rb" );
152 unsigned short objtype = 0;
157 if ( fread( &version,
sizeof version, 1, fp ) != 1 )
159 INFO_PRINT.Format(
"Block Version: {:08X}\n" ) <<
static_cast<unsigned long>( version );
161 if ( fread( &tile,
sizeof tile, 1, fp ) != 1 )
182 for ( i = 0; i <= 0xFFFF; i++ )
184 unsigned short objtype = (
unsigned short)i;
200 for ( i = 0; i <= 0x3FFF; i++ )
202 unsigned short objtype = (
unsigned short)i;
204 if ( landtile.
flags || landtile.
unk || landtile.
name[0] )
206 INFO_PRINT <<
"Land Tile: 0x" << fmt::hexu( objtype ) <<
"\n" 207 <<
"\tflags: 0x" << fmt::hexu( landtile.
flags ) <<
"\n" 208 <<
"\t unk: 0x" << fmt::hexu( landtile.
unk ) <<
"\n" 209 <<
"\t name: " << landtile.
name <<
"\n";
223 typedef std::map<std::string, unsigned> M;
227 for ( i = 0; i < 0x4000; i++ )
229 unsigned short objtype = (
unsigned short)i;
231 tilecount[landtile.
name] = tilecount[landtile.
name] + 1;
235 for (
const auto& elem : tilecount )
237 tmp << elem.first <<
": " << elem.second <<
"\n";
254 unsigned int flags = strtoul( argv[2], NULL, 0 );
255 unsigned int notflags = 0;
257 notflags = strtoul( argv[3], NULL, 0 );
260 for ( i = 0; i <= 0xFFFF; i++ )
262 unsigned short objtype = (
unsigned short)i;
264 if ( ( ( tile.
flags & flags ) == flags ) && ( ( ~tile.
flags & notflags ) == notflags ) )
281 unsigned int flags = strtoul( argv[2], NULL, 0 );
282 unsigned int notflags = 0;
284 notflags = strtoul( argv[3], NULL, 0 );
289 for ( i = 0; i < 0x4000; i++ )
291 unsigned short objtype = (
unsigned short)i;
293 if ( ( landtile.
flags & flags ) == flags && ( ~landtile.
flags & notflags ) == notflags )
295 INFO_PRINT <<
"Land Tile: 0x" << fmt::hexu( objtype ) <<
"\n" 296 <<
"\tflags: 0x" << fmt::hexu( landtile.
flags ) <<
"\n" 297 <<
"\t unk: 0x" << fmt::hexu( landtile.
unk ) <<
"\n" 298 <<
"\t name: " << landtile.
name <<
"\n";
312 for (
int i = 0; i <= 0xFFFF; i++ )
314 unsigned short objtype = (
unsigned short)i;
322 if ( old_lostest != new_lostest )
325 INFO_PRINT.Format(
" Old LOS: %s\n New LOS: %s\n" )
326 << ( old_lostest ?
"true" :
"false" ) << ( new_lostest ?
"true" :
"false" );
337 int num_version_records;
342 fread( &num_version_records,
sizeof num_version_records, 1,
Core::verfile );
344 INFO_PRINT <<
"There are " << num_version_records <<
" version records.\n";
347 int inv_filecount = 0;
348 memset( filecount, 0,
sizeof filecount );
350 for (
int i = 0; i < num_version_records; i++ )
353 if ( vrec.
file < 32 )
354 ++filecount[vrec.
file];
358 for (
int i = 0; i < 32; ++i )
361 INFO_PRINT <<
"File 0x" << fmt::hexu( i ) <<
": " << filecount[i] <<
" versioned blocks.\n";
364 INFO_PRINT << inv_filecount <<
" invalid file indexes\n";
375 int strange_water = 0;
377 for (
u16 y = 30; y < 50; y++ )
379 for (
u16 x = 5900; x < 5940; x++ )
381 std::vector<Core::StaticRec> vec;
386 bool hdrshown =
false;
387 for (
const auto& elem : vec )
390 if ( elem.graphic >= 0x1796 && elem.graphic <= 0x17b2 )
392 if ( elem.z == -5 && height == 0 )
401 INFO_PRINT <<
"\tOBJT= 0x" << fmt::hexu( elem.graphic ) <<
" Z=" << int( elem.z )
402 <<
" HT=" << height <<
" FLAGS=0x" 410 << water <<
" water tiles exist.\n" 411 << strange_water <<
" strange water tiles exist.\n";
421 FILE* fp = fopen( argv[2],
"rb" );
422 int hdrlen = atoi( argv[3] );
423 int reclen = atoi( argv[4] );
430 if ( fread( buffer, hdrlen, 1, fp ) != 1 )
441 while ( fread( buffer, reclen, 1, fp ) == 1 )
444 tmp.Format(
"Record {} (0x{:X}):\n" ) << recnum << recnum;
458 is.read( (
char*)a,
sizeof a );
459 return ( a[3] << 24 ) | ( a[2] << 16 ) | ( a[1] << 8 ) | a[0];
471 std::ifstream soundidx( soundidxname.c_str(), std::ios::in |
std::ios::binary );
475 while ( soundidx.good() )
481 if ( !soundidx.good() )
484 if ( offset == 0xFFffFFffLu )
487 sound.seekg( offset, std::ios::beg );
491 sound.read( filename,
sizeof filename );
492 INFO_PRINT <<
"0x" << fmt::hexu( i ) <<
", 0x" << fmt::hexu( serial ) <<
": " << filename
494 <<
"len " << length <<
"\n";
501 if ( multi->
hull.empty() )
507 <<
" -- " << tile.
name <<
":\n";
509 for (
short y = multi->
minry; y <= multi->maxry; ++y )
511 for (
short x = multi->
minrx; x <= multi->maxrx; ++x )
513 unsigned short key = multi->
getkey( x, y );
514 bool external = multi->
hull2.count( key ) != 0;
516 bool origin = ( x == 0 && y == 0 );
518 if ( external && !
internal )
520 else if ( !external &&
internal )
522 else if ( external &&
internal )
537 if ( multi->
hull.empty() )
543 <<
" -- " << tile.
name <<
":\n";
548 tmp <<
"0x" << fmt::hexu( elem->
objtype ) <<
" 0x" << fmt::hexu( (
int)elem->
is_static ) <<
":" 549 << elem->
x <<
"," << elem->
y <<
"," << elem->
z <<
"\n";
561 for (
u16 i = 0; i < 0x1000; ++i )
575 unsigned int zcount[256];
576 memset( zcount, 0,
sizeof( zcount ) );
581 for (
u16 x = 0; x < 6143; ++x )
584 for (
u16 y = 0; y < 4095; ++y )
594 for (
int i = 0; i < 256; ++i )
597 INFO_PRINT << i - 128 <<
": " << zcount[i] <<
"\n";
605 unsigned int counts[1000];
606 memset( counts, 0,
sizeof counts );
610 for (
u16 x = 0; x < 6143; x += 8 )
613 for (
u16 y = 0; y < 4095; y += 8 )
615 std::vector<Core::USTRUCT_STATIC> p;
626 for (
int i = 0; i < 1000; ++i )
635 static int write_polmap(
const char* filename,
unsigned short xbegin,
unsigned short xend )
638 FILE* fp = fopen( filename,
"wb" );
639 int num = xend + 1 - xbegin;
640 for (
u16 xs = xbegin; xs < xend; xs += 8 )
642 int percent = ( xs - xbegin ) * 100 / num;
644 for (
u16 ys = 0; ys < 4096; ys += 8 )
648 memset( &blk, 0,
sizeof blk );
649 for (
u16 xi = 0; xi < 8; ++xi )
651 for (
u16 yi = 0; yi < 8; ++yi )
660 blk.
z[xi][yi] =
static_cast<signed char>( z );
662 blk.
walkok[xi] |= ( 1 << yi );
665 fwrite( &blk,
sizeof blk, 1, fp );
695 for (
const auto& rec : vec )
705 u16 wxl = 1420, wxh = 1480, wyl = 1760, wyh = 1780;
707 for (
u16 y = wyl; y < wyh; y++ )
709 for (
u16 x = wxl; x < wxh; x++ )
724 u16 wxl = 5485, wxh = 5500, wyl = 0, wyh = 30;
728 wxl = wxh =
static_cast<u16>( atoi( argv[2] ) );
729 wyl = wyh =
static_cast<u16>( atoi( argv[3] ) );
733 wxh =
static_cast<u16>( atoi( argv[4] ) );
734 wyh =
static_cast<u16>( atoi( argv[5] ) );
740 std::ofstream ofs(
"mapdump.html" );
742 ofs <<
"<table border=1 cellpadding=5 cellspacing=0>" << std::endl;
743 ofs <<
"<tr><td> </td>";
744 for (
u16 x = wxl; x <= wxh; ++x )
746 ofs <<
"<td align=center>" << x <<
"</td>";
748 ofs <<
"</tr>" << std::endl;
749 for (
u16 y = wyl; y <= wyh; ++y )
751 ofs <<
"<tr><td valign=center>" << y <<
"</td>" << std::endl;
752 for (
u16 x = wxl; x <= wxh; ++x )
754 ofs <<
"<td align=left valign=top>";
760 ofs <<
"z=" << z <<
"<br>";
763 ofs <<
"mapz=" << (int)mi.
z <<
"<br>";
767 if ( !statics.empty() )
769 ofs <<
"<table border=1 cellpadding=5 cellspacing=0>" << std::endl;
770 ofs <<
"<tr><td>graphic</td><td>z</td><td>flags</td><td>ht</td>" << std::endl;
771 for (
const auto& rec : statics )
774 ofs <<
"<td>" <<
Clib::hexint( rec.graphic ) <<
"</td>";
775 ofs <<
"<td>" << int( rec.z ) <<
"</td>";
777 ofs <<
"<td>" << int( rec.height ) <<
"</td>";
778 ofs <<
"</tr>" << std::endl;
780 ofs <<
"</table>" << std::endl;
782 ofs <<
"</td>" << std::endl;
784 ofs <<
"</tr>" << std::endl;
786 ofs <<
"</table>" << std::endl;
793 signed char z[6144][4096];
802 for (
u16 y = 0; y < 4095; ++y )
804 for (
u16 x = 0; x < 6143; ++x )
817 mc->z[x][y] =
static_cast<signed char>( newz );
826 std::ofstream ofs(
"contour.dat", std::ios::trunc | std::ios::out |
std::ios::binary );
827 ofs.write( reinterpret_cast<const char*>( mc ),
sizeof(
MapContour ) );
835 int landtile = strtoul( argv[1], NULL, 0 );
839 for (
u16 y = 0; y < 4095; ++y )
841 for (
u16 x = 0; x < 6143; ++x )
862 int graphic = strtoul( argv[1], NULL, 0 );
863 INFO_PRINT <<
"Searching map for statics with graphic=0x" << fmt::hexu( graphic ) <<
"\n";
868 for (
u16 y = 0; y < 4095; ++y )
870 for (
u16 x = 0; x < 6143; ++x )
874 for (
const auto& rec : statics )
876 if ( rec.graphic == graphic )
878 INFO_PRINT << x <<
"," << y <<
"," << rec.z <<
"\n";
889 unsigned int flags = strtoul( argv[1], NULL, 0 );
893 for (
u16 y = 0; y < 4095; ++y )
895 for (
u16 x = 0; x < 6143; ++x )
902 INFO_PRINT << x <<
"," << y <<
"," << (int)mi.
z <<
": landtile 0x" 903 << fmt::hexu( mi.
landtile ) <<
", flags 0x" 936 FILE* fidx = fopen( statidx.c_str(),
"wb" );
937 FILE* fmul = fopen( statics.c_str(),
"wb" );
939 int lastprogress = -1;
942 int progress = x * 100L / descriptor.
width;
943 if ( progress != lastprogress )
945 INFO_PRINT <<
"\rRewriting statics files: " << progress <<
"%";
946 lastprogress = progress;
950 std::vector<Core::USTRUCT_STATIC> pstat;
952 std::vector<Core::USTRUCT_STATIC> tilelist;
956 int currwritepos = ftell( fmul );
957 for (
int i = 0; i < num; ++i )
963 for (
const auto& stile : tilelist )
965 if ( ( tile.
graphic == stile.graphic ) && ( tile.
x_offset == stile.x_offset ) &&
966 ( tile.
y_offset == stile.y_offset ) && ( tile.
z == stile.z ) &&
967 ( tile.
hue == stile.hue ) )
981 tilelist.push_back( newtile );
989 if ( !tilelist.empty() )
991 idx.
offset = currwritepos;
992 for (
const auto& elem : tilelist )
996 currwritepos = ftell( fmul ) - currwritepos;
997 idx.
length = currwritepos;
1001 fwrite( &idx,
sizeof idx, 1, fidx );
1009 fwrite( &idx,
sizeof idx, 1, fidx );
1014 INFO_PRINT <<
"\rRewriting statics files: Complete\n";
1022 std::string
name =
"";
1023 for (
int i = 1; i < argc; ++i )
1025 name.append( argv[i] );
1026 if ( i < ( argc - 1 ) )
1029 if ( name.length() == 0 )
1031 for (
unsigned short amount = 1; amount <= 2; ++amount )
1033 const char* src = name.c_str();
1040 sprintf( s,
"%hu ", amount );
1044 int singular = ( amount == 1 );
1045 int plural_handled = 0;
1048 while (
'\0' != ( ch = *src ) )
1062 else if ( phase == 1 )
1066 else if ( ch ==
'/' )
1068 else if ( !singular )
1071 else if ( phase == 2 )
1075 else if ( singular )
1089 if ( !singular && !plural_handled )
1104 if ( fseek( multi_idx, 0, SEEK_SET ) != 0 )
1106 fclose( multi_idx );
1107 fclose( multi_mul );
1112 unsigned warnings = 0;
1113 unsigned errors = 0;
1114 unsigned invisitems = 0;
1116 for (
int i = 0; fread( &idxrec,
sizeof idxrec, 1, multi_idx ) == 1; ++i )
1118 if ( idxrec.
offset == 0xFFffFFffLu )
1120 fseek( multi_mul, idxrec.
offset, SEEK_SET );
1122 fread( &elem,
sizeof elem, 1, multi_mul );
1123 if ( elem.
x != 0 || elem.
y != 0 || elem.
z != 0 )
1125 INFO_PRINT <<
"ERROR: First tile not in center: " << elem.
x <<
" " << elem.
y <<
" " << elem.
z 1126 <<
" (" << elem.
flags <<
") MultiID: 0x" << fmt::hexu( i ) <<
"\n";
1129 else if ( elem.
graphic == 0x0001 )
1132 unsigned int itemcount = idxrec.
length /
sizeof elem;
1134 while ( itemcount-- )
1136 fread( &elem,
sizeof elem, 1, multi_mul );
1137 if ( elem.
x == 0 && elem.
y == 0 && elem.
z == 0 && elem.
graphic != 0x0001 && elem.
flags )
1139 INFO_PRINT <<
"Warning: Found invis tile as center, but could use 0x" 1140 << fmt::hexu( elem.
graphic ) <<
" at 0 0 0 MultiID: 0x" << fmt::hexu( i )
1149 INFO_PRINT <<
"Checked Multis: " << count <<
" with invis center: " << invisitems
1150 <<
" Warnings: " << warnings <<
" Errors: " << errors <<
"\n";
1151 fclose( multi_idx );
1152 fclose( multi_mul );
1159 UoToolMain::UoToolMain() :
Pol::Clib::ProgramMain() {}
1167 <<
" UOTOOL command [options ...]\n" 1170 <<
" tiledump filename Dump object information\n" 1171 <<
" vertile Dump updated object info\n" 1172 <<
" rawdump filename hdrlen reclen\n" 1173 <<
" ctable Print Server encryption table\n" 1174 <<
" findgraphic graphic finds coords of statics with graphic\n" 1175 <<
" findlandtileflags flags finds landtiles with flags\n" 1176 <<
" contour write binary file 6144x4096 z heights\n" 1177 <<
" mapdump x1 y1 [x2 y2] dumps map+statics info to html tables\n" 1178 <<
" landtileflagsearch flags [notflags] prints landtiles matching args\n" 1179 <<
" flagsearch flags [notflags] prints tiles matching flags\n" 1180 <<
" landtilehist prints landtile histogram\n" 1181 <<
" staticshist histogram of number of statics at a location\n" 1182 <<
" zhist histogram of map z\n" 1183 <<
" multis prints multi definitions \n" 1184 <<
" verdata prints verdata info\n" 1185 <<
" statics prints statics info\n" 1186 <<
" sndlist prints sound list info\n" 1187 <<
" verlandtile prints verdata landtile info\n" 1188 <<
" loschange prints differences in LOS handling \n" 1189 <<
" staticdefrag [realm] recreates static files {default britannia} \n" 1190 <<
" formatdesc name prints plural and singular form of name \n" 1191 <<
" checkmultis prints infos about multi center items \n";
1199 const std::vector<std::string>& binArgs =
programArgs();
1204 if ( binArgs.size() == 1 )
1229 std::string argvalue = binArgs[1];
1230 if ( argvalue[0] ==
'/' || argvalue[0] ==
':' )
1233 if ( binArgs.size() < 3 )
1238 argvalue = binArgs[2];
1241 std::transform( argvalue.begin(), argvalue.end(), argvalue.begin(),
1242 [](
char c ) {
return static_cast<char>( ::tolower( c ) ); } );
1244 if ( argvalue ==
"tiledump" )
1248 else if ( argvalue ==
"vertile" )
1252 else if ( argvalue ==
"verlandtile" )
1256 else if ( argvalue ==
"landtilehist" )
1260 else if ( argvalue ==
"flagsearch" )
1264 else if ( argvalue ==
"landtileflagsearch" )
1268 else if ( argvalue ==
"loschange" )
1272 else if ( argvalue ==
"rawdump" )
1276 else if ( argvalue ==
"ctable" )
1280 else if ( argvalue ==
"sndlist" )
1284 else if ( argvalue ==
"statics" )
1288 else if ( argvalue ==
"verdata" )
1292 else if ( argvalue ==
"multis" )
1296 else if ( argvalue ==
"water" )
1300 else if ( argvalue ==
"newstatics" )
1304 else if ( argvalue ==
"staticsmax" )
1310 else if ( argvalue ==
"watersearch" )
1314 else if ( argvalue ==
"zhist" )
1318 else if ( argvalue ==
"staticshist" )
1322 else if ( argvalue ==
"writedungmap" )
1326 else if ( argvalue ==
"writekeys" )
1328 INFO_PRINT <<
"Keys written to current.key\n";
1331 else if ( argvalue ==
"mapdump" )
1335 else if ( argvalue ==
"contour" )
1339 else if ( argvalue ==
"findlandtile" )
1343 else if ( argvalue ==
"findlandtileflags" )
1347 else if ( argvalue ==
"findgraphic" )
1351 else if ( argvalue ==
"defragstatics" )
1355 else if ( argvalue ==
"formatdesc" )
1359 else if ( argvalue ==
"checkmultis" )
1380 UoToolMain->
start( argc, argv );
static RealmDescriptor Load(const std::string &realm_name, const std::string &realm_path="")
std::string remove_string(const char *propname)
const std::vector< std::string > & programArgs() const
std::vector< StaticRec > StaticList
void readstatics(StaticList &vec, unsigned short x, unsigned short y)
void readallstatics(StaticList &vec, unsigned short x, unsigned short y)
unsigned int tile_uoflags(unsigned short tilenum)
void open_uo_data_files(void)
bool BoatShapeExists(u16 multiid)
char * binary(unsigned int val, int nbits)
void read_objinfo(u16 graphic, struct USTRUCT_TILE &objinfo)
const unsigned STATICBLOCK_CHUNK
void start(int argc, char *argv[])
void getmapinfo(unsigned short x, unsigned short y, short *z, USTRUCT_MAPINFO *mi)
void fdump(fmt::Writer &writer, const void *data, int len)
static unsigned short getkey(short rx, short ry)
void readlandtile(unsigned short tilenum, USTRUCT_LAND_TILE *landtile)
void readraw(ConfigElem &elem)
std::string hexint(unsigned short v)
unsigned int landtile_uoflags(unsigned short landtile)
void safe_getmapinfo(unsigned short x, unsigned short y, short *z, USTRUCT_MAPINFO *mi)
std::string tostring(const Bscript::BTokenType &v)
std::set< unsigned int > water
void readstaticblock(std::vector< USTRUCT_STATIC > *ppst, int *pnum, unsigned short x, unsigned short y)
void standheight(MOVEMODE movemode, StaticList &statics, unsigned short x, unsigned short y, short oldz, bool *result_out, short *newz_out)
char tileheight(unsigned short tilenum)
bool groundheight(unsigned short x, unsigned short y, short *z)
unsigned short uo_map_height
void RemoveFile(const std::string &fname)
unsigned short remove_ushort(const char *propname)
FILE * open_uo_file(const std::string &filename_part)
unsigned short uo_map_width
std::string normalized_dir_form(const std::string &istr)
std::string uo_datafile_root
int write_pol_static_files(const std::string &realm)
MultiDefBuffer multidef_buffer
bool iswater(u16 objtype)