Mercurial > hg > forks > multipaint-js
diff draw_inputs.pde @ 45:9b77ed046003
Cosmetic cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 04 Jul 2018 17:30:46 +0300 |
parents | 72407a4d9539 |
children | f5c32f6470d0 |
line wrap: on
line diff
--- a/draw_inputs.pde Wed Jul 04 14:55:46 2018 +0300 +++ b/draw_inputs.pde Wed Jul 04 17:30:46 2018 +0300 @@ -59,17 +59,19 @@ //returns the multicolor color on point x1,y1 int ad, looks, mmc, source1, source2; + ad = 1024 + x1 + y1 * X; if (g_multic == 2) { - looks = 1024 + x1 + y1 * X; - if (mode == 0) return g_map[looks]; - if (mode == 1) return g_brush[looks]; + if (mode == 0) return g_map[ad]; + if (mode == 1) return g_brush[ad]; } - x1 = chop2(x1); - ad = 1024 + x1 + y1 * X; + source1 = 0; source2 = 0; + + x1 = chop2(x1); looks = 65536 + int(x1 / 8) + int(y1 / 8) * MX; + if (mode == 0) { source1 = g_map[ad]; source2 = g_map[ad + 1]; @@ -79,6 +81,7 @@ source2 = g_brush[ad + 1]; } mmc = source1 + source2 * 2; + //source1=0 //source2=+1 //00=zeroc =0