How to Clear display Empty when having BGPIC?

Find quick help here to get you started with Hollywood
Post Reply
Bugala
Posts: 823
Joined: Sun Feb 14, 2010 7:11 pm

How to Clear display Empty when having BGPIC?

Post by Bugala » Thu May 02, 2019 1:38 pm

Now this is embarrassing, but I don't seem to be able to figure out this one.

I have a display with a bgpic.

What I would like to do, is to clear the screen empty with one color (black), however, when I use for example CLS() command, it clears the display otherwise but leaves the Background image untouched (which is how it is supposed to work).

So how can I clear a display black when it has Background picture attached to it?, or can I somehow un-attach this Bgpic?

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

Re: How to Clear display Empty when having BGPIC?

Post by airsoftsoftwair » Thu May 02, 2019 5:18 pm

Why don't you just display a new black BGPic?

Bugala
Posts: 823
Joined: Sun Feb 14, 2010 7:11 pm

Re: How to Clear display Empty when having BGPIC?

Post by Bugala » Thu May 02, 2019 6:41 pm

hmm.. seems I have misunderstood something here, since I actually tried that and it failed, but trying now again, now it works.

How do those backgrounds actually work?

I had used LoadBGpic(1, file)

then when i first time tried, i just used CreateBGPic(1...) thinking it would replace the previous picture.

But seems I need to add that DisplayBgpic(1) still after that for it to actually replace that old one?

So how does this actually work?

I always thought that selectbgpic would be like, double buffering sort of, that I could have 3 different Bgpics, keep number 1 displayed, and then use selectbgpic 2 or 3 to do things hidden from eyes, and when finally would use displaybgpic 2 or 3 i would see what i did there hidden.

That basically I could have had Game running on BGpic 1, and inventory in bgpic2, and when ever i wanted to peak to inventory, i could have used displaybgpic 2, and then use displaybgpic1 to get back to game.

But now it seems I have misunderstood something, so how exactly do those Bgpics work? Are they basically just brushes that I can choose to attach to a display as a background?

User avatar
emeck
Posts: 80
Joined: Fri Apr 03, 2015 3:17 pm

Re: How to Clear display Empty when having BGPIC?

Post by emeck » Thu May 02, 2019 7:03 pm

@Bugala
That basically I could have had Game running on BGpic 1, and inventory in bgpic2, and when ever i wanted to peak to inventory, i could have used displaybgpic 2, and then use displaybgpic1 to get back to game.
AFAIU Display library is what you need for that (CreateDisplay, SelectDisplay, OpenDisplay,ShowDisplay, HideDisplay...)
PowerBook 5.2 MorphOS 3.12
PowerBook 5.8 MorphOS 3.12
Amiga 1200 BPPC/BVision AOS4.1 FE

Post Reply