Cleanmap tweak: removes broken ammunition

develop
Petr Mrázek 2011-02-21 08:26:40 +01:00
parent dd462fed6c
commit d0c76c8162
2 changed files with 16 additions and 3 deletions

@ -55,6 +55,7 @@ int main (int argc, char** argv)
Mapz->getSize(x_max,y_max,z_max);
uint8_t zeroes [16][16] = {0};
DFHack::occupancies40d occ;
// walk the map
for(uint32_t x = 0; x< x_max;x++)
@ -66,6 +67,13 @@ int main (int argc, char** argv)
if(Mapz->isValidBlock(x,y,z))
{
Mapz->ReadVeins(x,y,z,0,0,&splatter);
Mapz->ReadOccupancy(x,y,z,&occ);
for(int i = 0; i < 16; i++)
for(int j = 0; j < 16; j++)
{
occ[i][j].unibits.splatter = 0;
}
Mapz->WriteOccupancy(x,y,z,&occ);
for(uint32_t i = 0; i < splatter.size(); i++)
{
DFHack::t_spattervein & vein = splatter[i];

@ -908,13 +908,18 @@ int main (void)
" 4=string, 5=automated offset search, 6=vector by address in its array,\n"
" 7=pointer vector by address of an object, 8=vector>first object>string\n"
" 9=string buffers, 10=known data, 11=backpointers, 12=data+backpointers\n"
" 13=coord lookup\n";
" 13=coord lookup\n"
" 0= exit\n";
int mode;
bool finish = 0;
do
{
getNumber(prompt,mode, 1, false);
switch (mode)
{
case 0:
finish = 1;
break;
case 1:
DF->Detach();
FindIntegers(DFMgr, selected_ranges);
@ -967,9 +972,9 @@ int main (void)
FindCoords(DFMgr, selected_ranges);
break;
default:
cout << "not implemented :(" << endl;
cout << "Unknown function, try again." << endl;
}
} while (mode < 1 || mode > 12 );
} while ( !finish );
#ifndef LINUX_BUILD
cout << "Done. Press any key to continue" << endl;
cin.ignore();