Community

SCI Programming => SCI Syntax Help => Topic started by: Doan Sephim on September 10, 2021, 01:00:11 PM

Title: SCI0 - Text window vanishing cutouts of Views
Post by: Doan Sephim on September 10, 2021, 01:00:11 PM
Does anyone know why this happens? This particular text box reveals a "hidden" area behind a breakable wall.

This isn't a super high priority as I can just move the location of the text box, but this is an issue I don't think I've ever seen anyone talk about before.
Title: Re: SCI0 - Text window vanishing cutouts of Views
Post by: Collector on September 10, 2021, 08:23:16 PM
Do you have a view covering the hole?
Title: Re: SCI0 - Text window vanishing cutouts of Views
Post by: Doan Sephim on September 10, 2021, 09:49:29 PM
Do you have a view covering the hole?
I do. But whenever the text is there, it cuts out a square shaped "hole" in the view. I'm guessing the windows dimensions might be being drawn improperly...or at least the clearing for it?

The attached is what it looks like without the text box interference.
Title: Re: SCI0 - Text window vanishing cutouts of Views
Post by: Collector on September 11, 2021, 12:29:11 AM
Or the view is not being redrawn after the box is disposed.
Title: Re: SCI0 - Text window vanishing cutouts of Views
Post by: Doan Sephim on September 11, 2021, 10:15:29 AM
I should clarify. Once the text box is gone, the view's pixels are restored. It only when the text window is on screen that the view has a piece cut out
Title: Re: SCI0 - Text window vanishing cutouts of Views
Post by: gumby on September 11, 2021, 01:02:14 PM
Yes, I've seen this happen before too.  Not sure how to fix it though.
Title: Re: SCI0 - Text window vanishing cutouts of Views
Post by: Kawa on September 11, 2021, 01:43:56 PM
One possible workaround might be to addToPic the wall view over the hole on init (only if it should be covered of course), and redraw the room picture (which has no wall there) when it's revealed.

Edit: it's actually quite surprising how often this happens!
Title: Re: SCI0 - Text window vanishing cutouts of Views
Post by: Doan Sephim on September 11, 2021, 02:08:07 PM
One possible workaround might be to addToPic the wall view over the hole on init (only if it should be covered of course), and redraw the room picture (which has no wall there) when it's revealed.
Interesting. I don't have any experience with "addToPic." I'll have to tinker with it to see how it works. Would it work with a crumbling animation? Or would addToPic keep the first cel of the view static on the background?

I have a hard time deciphering a lot of the base template code, so I just wonder if there were some errors in the window printing that was causing this.
Title: Re: SCI0 - Text window vanishing cutouts of Views
Post by: Kawa on September 11, 2021, 02:14:18 PM
Would it work with a crumbling animation? Or would addToPic keep the first cel of the view static on the background?
If you redraw the pic first and then play the crumble animation, you should be fine. And yes, addToPic-ing involves the View's current view loop and cel.
Quote
I have a hard time deciphering a lot of the base template code, so I just wonder if there were some errors in the window printing that was causing this.
As you can see from my little montage, windows cutting off views is a common issue even in SCI11 and with custom frames. It's not you.
Title: Re: SCI0 - Text window vanishing cutouts of Views
Post by: Doan Sephim on September 11, 2021, 02:17:00 PM
Cool! Thanks for the replies and help  :)