diff --git a/src/elements/soap.c b/src/elements/soap.c index 6cf25cda7..fbc5e37ee 100644 --- a/src/elements/soap.c +++ b/src/elements/soap.c @@ -2,8 +2,10 @@ int update_SOAP(UPDATE_FUNC_ARGS) { - int r, rx, ry; - + int r, rx, ry, nr, ng, nb, na; + float tr, tg, tb, ta; + float blend; + //0x01 - bubble on/off //0x02 - first mate yes/no //0x04 - "back" mate yes/no @@ -203,6 +205,30 @@ int update_SOAP(UPDATE_FUNC_ARGS) } } } + + for (rx=-2; rx<3; rx++) + for (ry=-2; ry<3; ry++) + if (x+rx>=0 && y+ry>0 && x+rx>8].dcolour>>16)&0xFF; + tg = (parts[r>>8].dcolour>>8)&0xFF; + tb = (parts[r>>8].dcolour)&0xFF; + ta = (parts[r>>8].dcolour>>24)&0xFF; + + nr = (tr*blend); + ng = (tg*blend); + nb = (tb*blend); + na = (ta*blend); + + parts[r>>8].dcolour = nr<<16 | ng<<8 | nb | na<<24; + } + } return 0; }