| 1025 | COMMANDF(mapmrproper, "", () { mapmrproper(true); }); |
| 1026 | |
| 1027 | void mapareacheck(char *what) // "vdelta" | "steepest" | "total" | "pprest" | "pp"(default) |
| 1028 | { |
| 1029 | mapareastats_s ms; |
| 1030 | mapdim_s md; |
| 1031 | stopwatch ti; |
| 1032 | ti.start(); |
| 1033 | servsqr *sw = createservworld(world, cubicsize); |
| 1034 | calcmapdims(md, sw, ssize); |
| 1035 | calcmapareastats(ms, sw, ssize, md); |
| 1036 | delete[] sw; |
| 1037 | vector<char> res; |
| 1038 | if(!strcasecmp(what, "vdelta")) |
| 1039 | { |
| 1040 | loopi(MAS_VDELTA_TABSIZE) cvecprintf(res, "%d ", ms.vdd[i]); |
| 1041 | } |
| 1042 | else if(!strcasecmp(what, "steepest")) cvecprintf(res, "%d.5 %d.5 %d ", ms.steepest % ssize, ms.steepest / ssize, world[ms.steepest % cubicsize].floor); |
| 1043 | else if(!strcasecmp(what, "total")) cvecprintf(res, "%d ", ms.total); |
| 1044 | else if(!strcasecmp(what, "pprest")) cvecprintf(res, "%d ", ms.rest); |
| 1045 | else // default |
| 1046 | { |
| 1047 | loopi(MAS_GRID2) |
| 1048 | { |
| 1049 | int x = ms.ppp[i] % ssize, y = ms.ppp[i] / ssize, z = OUTBORD(x, y) ? 0 : S(x, y)->floor; |
| 1050 | cvecprintf(res, "%d %d %d %d %d %.5g\n", x, y, z, ms.ppa[i], ms.ppv[i], ms.ppa[i] ? float(ms.ppv[i]) / ms.ppa[i] : 0.0f); |
| 1051 | } |
| 1052 | } |
| 1053 | resultcharvector(res, -1); |
| 1054 | } |
| 1055 | |
| 1056 | COMMAND(mapareacheck, "s"); |
| 1057 |
nothing calls this directly
no test coverage detected