MAMEWorld >> EmuChat
View all threads Index   Flat Mode Flat  

H@P
Lurker in perpetuity
Reged: 09/22/03
Posts: 234
Loc: Seattle area
Send PM
Re: Aaaargh!
10/02/16 12:29 AM


Finally got a chance to poke around at this again.

Noticed Windows gcc was using 6.x while Linux was using 5.x. Added 6.x as a gcc alternative, clean built, and the problem still persists.

Removed all static const colors:

-       // constants
- static const rgb_t black;
- static const rgb_t white;
- static const rgb_t green;
- static const rgb_t amber;
- static const rgb_t transparent;


and replaced with #defines:

+#define RGB_T__BLACK           rgb_t(0, 0, 0)
+#define RGB_T__WHITE rgb_t(255, 255, 255)
+#define RGB_T__GREEN rgb_t(0, 255, 0)
+#define RGB_T__AMBER rgb_t(247, 170, 0)
+#define RGB_T__TRANSPARENT rgb_t(0, 0, 0, 0)


and all is well.

Let me know if this would be acceptable to submit.

Or is it better to just add the literal initialization everywhere, e.g. either this

 static const pen_t pens_from_color_prom[] =
{
- rgb_t::black,
+ RGB_T__BLACK,
rgb_t(0x00, 0xff, 0x00),
rgb_t(0x00, 0x00, 0xff),
rgb_t(0x00, 0xff, 0xff),
rgb_t(0xff, 0x00, 0x00),
rgb_t(0xff, 0xff, 0x00),
rgb_t(0xff, 0x00, 0xff),
- rgb_t::white
+ RGB_T__WHITE
};


or this:

 static const pen_t pens_from_color_prom[] =
{
- rgb_t::black,
+ rgb_t(0x00, 0x00, 0x00),
rgb_t(0x00, 0xff, 0x00),
rgb_t(0x00, 0x00, 0xff),
rgb_t(0x00, 0xff, 0xff),
rgb_t(0xff, 0x00, 0x00),
rgb_t(0xff, 0xff, 0x00),
rgb_t(0xff, 0x00, 0xff),
- rgb_t::white
+ rgb_t(0xff, 0xff, 0xff)
};


Your code base, you tell me which is more acceptable, if either...

H@P

Edited by H@P (10/02/16 01:06 AM)







Entire thread
Subject Posted by Posted on
* Aaaargh! H@P 09/07/16 03:43 AM
. * Re: Aaaargh! H@P  10/02/16 12:29 AM
. * Re: Aaaargh! Vas Crabb  10/02/16 12:36 PM
. * Re: Aaaargh! casm  09/07/16 03:12 PM
. * Re: Aaaargh! Vas Crabb  09/07/16 07:03 AM
. * Re: Aaaargh! AJR Hacker  09/07/16 07:49 PM
. * Re: Aaaargh! R. Belmont  09/07/16 03:18 PM
. * Re: Aaaargh! AWJ  09/07/16 06:01 PM
. * Re: Aaaargh! AJR Hacker  09/07/16 08:27 PM
. * Re: Aaaargh! MooglyGuy  09/07/16 09:58 AM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
2 registered and 510 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2009