Hi,
a remark on next code :
Code:
{
351 for (int iX = 0; iX < getNx(); iX++) {
352 for (int iY = 0; iY < getNy(); iY++) {
353 if (get(iX, iY) == fromM) {
354 bool found = true;
355 for (int iOffsetX = -offsetX; iOffsetX <= (int) offsetX; ++iOffsetX) {
356 for (int iOffsetY = -offsetY; iOffsetY <= (int) offsetY; ++iOffsetY) {
357 if (getMaterial(iX + iOffsetX, iY + iOffsetY) != fromM) {
358 if (getMaterial(iX + iOffsetX, iY + iOffsetY) != 1245) {
359 found = false; //<==== here we can stop no?
360 }
361 }
362 }
363 }
364 if (found) {
365 get(iX, iY) = 1245;
366 }
367 }
368 }
369 }
370 rename(1245,toM);
371 }
At 359 if false not necessary to continue loop scan ?
maye be a break and a reflexion on this output condition…
Laurent.