Should we just make a thread if we find a bug or some other issue?
I was just messing with the game API in 0.4 and created a new project through the IDE - Game API Advanced Project.
It was nice to have the framework there, but there's a problem:
in WinMain
---> Global(KeysPressed$, keys$);
I couldn't get any keypresses to work until I removed the 'keys$' declaration like the samples have. I assume it's declared somewhere else, right? Should there be a warning that you've already defined a variable with the same name?
There also appears to be something strange with the colors of lines... i.e.
G_LINE(20,30,40,50, G_RGB(255,0,0) );
draws a green line instead of red.
Hi fastrx,
It is perfect to create a new thread about a bug. Is the Global line after or before the InitGameAPI line? If it's after then that is why. I will take a look and fix it.
It is strange the G_RGB uses the Frog::Color(r,g,b) function. I will take a look too.
I am trying to accumulate as much as I can until v0.4a which I plan on releasing in a couple of days.
Regards,
Kornalius
it is just after the InitGameAPI call.
The basic game api template doesn't have any entry for the keys variable at all. Should it have?
The keys variable is defined in InitGameAPI if I remember correctly. The Global and Local functions re-initialize the variables. I will fix this for 0.4a, I don't like this behavior. I also fixed the template to do the Global before the InitGameAPI.
Regards,
Kornalius
Ok, so what about the problem with the colors...
The textout function seems to give the right colors (at least what I checked). But the others, line, rect, pixel, etc, all seem to mess up the colors.
I've even tried to use getpixel to try to see what could be going on, but it seems to get messed up as well.
Example, I set color as (255,0,0) which should be pure RED.
I draw text, and get red, I draw everything else and get a shade of GREEN.
If I set the color to (0,255,0) - pure green, the text is green and everthing else is RED.
With (0,0,255) I get blue text and everything else black.
In PocketFrog, when using the line(), fillrect() functions... Do you use Frog::Color() function or something else?
I will do some tests tomorrow and let you know. Difinitely a strange thing!

Oh and btw, I've fixed the Global and Local functions (for version 0.4a) not to re-initialize the variables anymore, so you can place them after or before the declaration.
Hey Fast_rx,
I found the problem, somehow I was doing an extra Color() conversion in most functions but some didn't.
Anyway, it's ok from build 0.4a on.
Regards,
Kornalius