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
Aaaargh!
09/07/16 03:43 AM


Not the game. This is about Carnival. Rant follows.

So I showed the game to my son, but something seemed off. It seemed I had cleared the level but it wouldn't end. Then more ducks started coming out. While randomly shooting, I hit something invisible and I was able to complete the level.

I compile my own linux builds, and have each major version archived. I found 0.152 was fine (white rabbits! it was missing all white rabbits!), 0.153 was broken. I couldn't find anything touching the vicdual files. So I ran a git bisect and tracked down the offending commit. I later saw I was searching for vicdual.cpp changes, and it was still *.c at that point... oops.

When the const rgb_t::white is used in a static global palette array, the const doesn't seem to have been initialized yet (runtime initialization of the const value in the class?) so it actually stuffs a black palette entry in its place (uninitialized in this case is the same as black). So in Carnival, rabbits were black on a black background, hence invisible. I confirmed when used in a function directly, or even when used in the same palette array, but defined as a static local, rgb_t::white works as expected.

I checked if other drivers were affected, and found a few. Tested each before, made the fix, tested again, and things lit up white like expected.

So I go to test these changes on a windows pc, and Carnival works just fine in stock 0.177. What the hell?!?

Pretty sure I'm using a fairly recent gcc on both linux and windows.

Can anyone else on linux confirm Carnival is missing white rabbits on 0.177?

What is happening? =(X^@

H@P

Edited by H@P (09/07/16 03:57 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 
0 registered and 548 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2011