Page 1 of 1

[10 Dec 2009] Bug in DisplayBGPicPart()

Posted: Sat Jun 13, 2020 5:32 pm
by PEB
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 10 Dec 2009 17:59:34 -0000

There seems to be a bug in DisplayBGPicPart() when there is a layer on the Background with a transparency---at least, it causes a lockup in OS4.1. So running the following code causes the crash, but if the line with SetLayerTransparency() is removed, then there is no crash.

Code: Select all

EnableLayers()
CreateBGPic(1, 640, 480)
DisplayBGPic(1)
LoadBrush(1, "Test.png", {LoadAlpha=True})
InsertLayer(1, #BRUSH, 1, 0, 0)
SetLayerTransparency(1, 128)
CreateBrush(2, 640, 480)
SelectBrush(2)
DisplayBGPicPart(1, 0, 0, 640, 480, 0, 0, {Layers = TRUE})

[10 Dec 2009] Re: Bug in DisplayBGPicPart()

Posted: Sat Jun 13, 2020 5:32 pm
by airsoftsoftwair
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 10 Dec 2009 22:32:24 +0100
There seems to be a bug in DisplayBGPicPart() when there is a layer on the Background with a transparency---at least, it causes a lockup in OS4.1. So running the following code causes the crash, but if the line with SetLayerTransparency() is removed, then there is no crash.

Code: Select all

EnableLayers()
CreateBGPic(1, 640, 480)
DisplayBGPic(1)
LoadBrush(1, "Test.png", {LoadAlpha=True})
InsertLayer(1, #BRUSH, 1, 0, 0)
SetLayerTransparency(1, 128)
CreateBrush(2, 640, 480)
SelectBrush(2)
DisplayBGPicPart(1, 0, 0, 640, 480, 0, 0, {Layers = TRUE})
This works fine with Hollywood 4.5 so I seem to have already fixed it along the way :)