27.11.2013, 18:34
I don't get a part of the code, would you mind to explain it to me?
You create cdata array that can only get an index of 0 and so you did:
but then you used { } and indexes 0, 1, 2 and that's the part I don't get. You didn't use any char in the array (for using { }) and neither the size of the cdata was 3 so you could have those 3 indexes, so my question is: What does it do?
EDIT: After few tests, it seems that those three give the R G B values of the color before assigning the new ones.
pawn Код:
static colors[2][9], cdata[1];
cdata[0] = color;
cdata{0} = floatround(float(cdata{0}) - (float(cdata{0}) * 0.3));
cdata{1} = floatround(float(cdata{1}) - (float(cdata{1}) * 0.3));
cdata{2} = floatround(float(cdata{2}) - (float(cdata{2}) * 0.3));
pawn Код:
cdata[0] = color;
EDIT: After few tests, it seems that those three give the R G B values of the color before assigning the new ones.