General > Media

Crazybob's Points Map

<< < (16/19) > >>

[MAF]Karlis:
then you could try to hardcode it?

[MAF]Karlis:
here's func that i came up with for that. it is based on alpha change and it assumes that drawPixel function has merged color value, if thats not the case it needs some adjustments.
NOTE: i did test it, but not visually, so its not warranted to be bugfree.

--- Code: ---int DrawPixelInbetween(float fx, float fy, int color)
{
int ix = (int)fx; //the base integers
int iy = (int)fy;
int offx = int(0xff*(fx - ix)); //the multipliers, think of them as floats ( makes int and float mixed math easier)
int offy = int(0xff*(fy - iy));
int alpha = (color & 0xff000000) / 0xffff; // getting alpha, divided with 0xffff because multipliers before should bring the value back to original or decrease it accordingly
color &= 0xffffff; // get normal color
DrawPixel(ix + 1,iy + 1, color | (alpha * offx * offy & 0xff000000)); //get alpha at particular point and merge it back to normal color
DrawPixel(ix, iy + 1, color | (alpha * (0xff - offx) * offy & 0xff000000));
DrawPixel(ix + 1, iy, color | (alpha * offx * (0xff - offy) & 0xff000000));
DrawPixel(ix, iy, color | (alpha * (0xff - offx) * (0xff - offy) & 0xff000000));
return 1;
}
--- End code ---

EDIT: apparently it has 1 bit precision loss, no big deal imo.

[MAF]Epoxi:
I don't think FTLK supports alpha transparency, but I will try to implement the code blending with black or something.

How is the data collection from the server coming along?

[MAF]Karlis:
nothing still, none of us have a clue why it doesn't work and debugging fails to show any errors too :(
the worst part is i cannot reproduce the issue in local server, but ax becomes unusable if i test here, so i dunno what to do atm, i'll have some more free time in wednesday, will try some more then.

[MAF]Epoxi:
Cool, thanks.  ;D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version