why can't I get the line function to work, e.g
line(120,160,120+cx,160+cx,0xFFFF);
it compiles ok, but nothing on the screen.... ?
using the same code for this works ok, so I know cx and cx are ok....
place_item(120+cx,160+cy,20,20, quit_btn_p,screen_buffer_p);
//this function takes a midpoint of an object (buffer) for placment and places it another buffer
place_item(dest buffer locx, locy, source sizex, sizey,source*, dest* (must be 240x320));
anyhow it does not work.... the line thingy.
and also, since there is no doco

, whats the differnce between line, line_a and line_x ?
-brendan
line_a uses additive blending (it adds the color to each pixel instead of replacing it). line_x plots using XOR (exclusive or... if you draw the same line twice with line_x the image will remain unchanged).
As for your first question, as the line function is written, it takes numbers in fixed point format. In other words, use the IFP(x) macro on each of the arguments.
IFP gives the following error,
error C2296: '<<' : illegal, left operand has type 'double'
from this code:
line(IFP(120),IFP(160),IFP(120 + cos(radians) * 100),IFP(160 + sin(radians) * 100),0xFFFF);
anyhow according to the function dec, it take ints ?
yeah, fixed points are integers, they are just shifted left by ten bits. (In other words, multiplied by 2^10=1024) The remaining points represent the fractional part of the number. The reason for using fixed point is mainly speed. I think there is a short tutorial on fixed point numbers at
www.flipcode.com at the link "The Art of Demomaking" on the left side.
To use doubles for input, use the FFP(x) (it might be FP(x), I'm not exactly sure and I don't have the EasyCE header handy) macro. That will convert to the nescessary format and preserve the accuracy of the floating-point number, but for speed, you are better off using integers in the first place.
yep, the FP() worked, thanks, speed is not really an issue, it just a clock screen saver to have running on my desk during docked time! (better than seeing the anoying "today list")
