Searge-DP / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

Pandora: buttons redraw with garbage with r1733 #423

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Building the latest SVN (r1733) for Pandora (standard unix build) I get garbage 
in the place of the buttons after they are clicked. It remains there until 
restart, even surviving a change of video mode. Everything else looks and works 
correctly: canvas, palette, dialogs, status line all draw fine.

When I build the last stable release the buttons redraw fine there.

Any ideas what's going wrong?
Has there been a change in how buttons are drawn since the stable release that 
I could revert?

Original issue reported on code.google.com by carl.ols...@gmail.com on 26 Feb 2011 at 6:10

Attachments:

GoogleCodeExporter commented 8 years ago
Aion had similar problem on the Caanoo:
http://lh6.ggpht.com/_7ELzlmTib4Y/TMGcusgmLEI/AAAAAAAAAW4/Iv697ByOK2s/IMAG0001.j
pg
His later comment was: "Problem was in engine.c->Draw_menu_button()->char icon; 
Default setting for char type in compiler was unsigned. So, if (icon==-1) 
condition did not work correctly. I'm changed type for int8_t."

The source code requires that the type "char" is signed, and apparently it's 
not the case by default on your environment. For the moment, add the compiler 
option -fsigned-char and it should solve everything. I'm checking if I can 
easily make the source code work ok in the 2 cases (signed and unsigned)

Original comment by yrizoud on 26 Feb 2011 at 3:42

GoogleCodeExporter commented 8 years ago
r1734 solves this. I tested by re-compiling all with "-funsigned-char", no 
other compiler warning appears. I'm rather confident that the rest of the 
program is ok, because the original DOS code (which is the biggest part) was 
using the custom type name "byte" for an explicit unsigned char (0-255), char 
is used almost only for elements of strings.

Original comment by yrizoud on 26 Feb 2011 at 4:05

GoogleCodeExporter commented 8 years ago
Sweet, looks to work perfectly. Thanks heaps.

Original comment by carl.ols...@gmail.com on 26 Feb 2011 at 4:32

GoogleCodeExporter commented 8 years ago

Original comment by yrizoud on 26 Feb 2011 at 5:52