Skip to content

Commit d0c76c8

Browse files
committed
Cleanmap tweak: removes broken ammunition
1 parent dd462fe commit d0c76c8

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

tools/supported/cleanmap.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ int main (int argc, char** argv)
5555
Mapz->getSize(x_max,y_max,z_max);
5656

5757
uint8_t zeroes [16][16] = {0};
58+
DFHack::occupancies40d occ;
5859

5960
// walk the map
6061
for(uint32_t x = 0; x< x_max;x++)
@@ -66,6 +67,13 @@ int main (int argc, char** argv)
6667
if(Mapz->isValidBlock(x,y,z))
6768
{
6869
Mapz->ReadVeins(x,y,z,0,0,&splatter);
70+
Mapz->ReadOccupancy(x,y,z,&occ);
71+
for(int i = 0; i < 16; i++)
72+
for(int j = 0; j < 16; j++)
73+
{
74+
occ[i][j].unibits.splatter = 0;
75+
}
76+
Mapz->WriteOccupancy(x,y,z,&occ);
6977
for(uint32_t i = 0; i < splatter.size(); i++)
7078
{
7179
DFHack::t_spattervein & vein = splatter[i];

tools/supported/incrementalsearch.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -908,13 +908,18 @@ int main (void)
908908
" 4=string, 5=automated offset search, 6=vector by address in its array,\n"
909909
" 7=pointer vector by address of an object, 8=vector>first object>string\n"
910910
" 9=string buffers, 10=known data, 11=backpointers, 12=data+backpointers\n"
911-
" 13=coord lookup\n";
911+
" 13=coord lookup\n"
912+
" 0= exit\n";
912913
int mode;
914+
bool finish = 0;
913915
do
914916
{
915917
getNumber(prompt,mode, 1, false);
916918
switch (mode)
917919
{
920+
case 0:
921+
finish = 1;
922+
break;
918923
case 1:
919924
DF->Detach();
920925
FindIntegers(DFMgr, selected_ranges);
@@ -967,9 +972,9 @@ int main (void)
967972
FindCoords(DFMgr, selected_ranges);
968973
break;
969974
default:
970-
cout << "not implemented :(" << endl;
975+
cout << "Unknown function, try again." << endl;
971976
}
972-
} while (mode < 1 || mode > 12 );
977+
} while ( !finish );
973978
#ifndef LINUX_BUILD
974979
cout << "Done. Press any key to continue" << endl;
975980
cin.ignore();

0 commit comments

Comments
 (0)