Possible bug with CreateBGPic and @DISPLAY {BGPic=}

Report any Hollywood bugs here
Post Reply
User avatar
Juan Carlos
Posts: 482
Joined: Mon Sep 06, 2010 1:02 pm
Contact:

Possible bug with CreateBGPic and @DISPLAY {BGPic=}

Post by Juan Carlos » Sun May 12, 2019 2:07 pm

I found this possible bug between CreateBGPic and @DISPLAY {BGPic=} with this example you can see better it.

/*BACKGROUNDS */
CreateBGPic(0, 360, 520, #BLACK)
@BGPIC 1, "MyBackground.png", {Loader="inbuilt"}

@DISPLAY {Title="Bug BGPic", BGPic=0, Width=360, Height=520}
Wait(100)
DisplayBGPic(0)

EscapeQuit(True)
Repeat
WaitEvent
Forever

In this code instead of show the BGPic=0 created with CreateBGPic where you create a black background, the code shows fast the @BGPIC 0 but after the main background showed is the @BGPIC 1.

The backgrounds created with CreateBGPic can'ts be use for @DISPLAY {Title="Bug BGPic", BGPic=0, Width=360, Height=520}

User avatar
airsoftsoftwair
Posts: 2985
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Possible bug with CreateBGPic and @DISPLAY {BGPic=}

Post by airsoftsoftwair » Mon May 13, 2019 8:26 pm

That's not a bug. The preprocessor commands are evaluated before script execution starts so BGPic 0 is not there when the preprocessor evaluates the @DISPLAY preprocessor command.

User avatar
Juan Carlos
Posts: 482
Joined: Mon Sep 06, 2010 1:02 pm
Contact:

Re: Possible bug with CreateBGPic and @DISPLAY {BGPic=}

Post by Juan Carlos » Mon May 13, 2019 9:26 pm

airsoftsoftwair wrote:
Mon May 13, 2019 8:26 pm
That's not a bug. The preprocessor commands are evaluated before script execution starts so BGPic 0 is not there when the preprocessor evaluates the @DISPLAY preprocessor command.
Ok, thank you Andreas, I make a black background as one normal picture.

Post Reply