Propogate changes to nearby regions when active

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
sigonasr2 2022-05-30 14:41:30 -05:00
parent d81ab8e569
commit 9c118ff30c
4 changed files with 12 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 708 B

View File

@ -148,6 +148,18 @@ public class SigShare {
changes[(gridY)*REGION_X_COUNT+(gridX+1)]+=1; changes[(gridY)*REGION_X_COUNT+(gridX+1)]+=1;
} }
if (changes[gridY*REGION_X_COUNT+gridX]>=CHANGE_THRESHOLD) { if (changes[gridY*REGION_X_COUNT+gridX]>=CHANGE_THRESHOLD) {
if (gridY>0) {
changes[(gridY-1)*REGION_X_COUNT+gridX]+=CHANGE_THRESHOLD/2;
}
if (gridY<REGION_Y_COUNT-1) {
changes[(gridY+1)*REGION_X_COUNT+gridX]+=CHANGE_THRESHOLD/2;
}
if (gridX>0) {
changes[(gridY)*REGION_X_COUNT+(gridX-1)]+=CHANGE_THRESHOLD/2;
}
if (gridX<REGION_Y_COUNT-1) {
changes[(gridY)*REGION_X_COUNT+(gridX+1)]+=CHANGE_THRESHOLD/2;
}
performSubimageUpdate(in, clientOutput, newCapture, gridX, gridY); performSubimageUpdate(in, clientOutput, newCapture, gridX, gridY);
} }
} }