Register
Site Login
Site Search
Forums
Advertisement
Welcome to PocketMatrix. PocketMatrix is dedicated to providing the best online community for mobile device developers and enthusiests. What's new?

Bug Reporting


Bug Reporting

Postby fast_rx » May 26, 2004 @ 10:25pm

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.
User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby kornalius » May 27, 2004 @ 1:26am

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
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby fast_rx » May 27, 2004 @ 2:32am

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?
User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby kornalius » May 27, 2004 @ 2:58am

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
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby fast_rx » May 27, 2004 @ 6:51pm

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.
User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby kornalius » May 27, 2004 @ 8:46pm

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! :?
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby kornalius » May 27, 2004 @ 8:47pm

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.
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby kornalius » May 28, 2004 @ 2:18pm

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
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Return to Pocket Programming Language (PPL)


Sort


Forum Description

Discuss this new development tool.

Moderator:

kornalius

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron