Clear screen to the green background ?

News,announcements,programming,fixes,game patches & discussions.

Moderator: troed

User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Clear screen to the green background ?

Post by exxos »

I can use v_clrwk to clear it, but it turns the screen white. Is there a way to restore the green background GEM colour ?

This came about because I cheated and just fill the screen with a green bar, but now I see on EMUTOS, seems to have a hatched pattern so I end up with two different green backgrounds :roll:

As this appears when the window is open and close, Maybe I am not setting something like the clipping rectangle or something causing the problem ? I don't seem to have this problem in TOS though anyway.

IMG_5031.JPG
IMG_5031.JPG (428.66 KiB) Viewed 4595 times
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
mfro
Posts: 122
Joined: Thu Dec 13, 2018 7:32 am

Re: Clear screen to the green background ?

Post by mfro »

exxos wrote: Wed Apr 22, 2020 9:29 pm I can use v_clrwk to clear it, but it turns the screen white. Is there a way to restore the green background GEM colour ?
This happens when you don't obey the stacked nature of GEM. If you use the "top of stack" AES (as you apparently do with the dialog box) you are supposed to use the VDI only inside the work area of AES windows (everything outside is supposed to be owned by the AES, otherwise you pull the carpet below the AES' feet).

Either send a WM_REDRAW message to the desktop (AES window handle 0) to redraw the background or register your own desktop with wind_set(WF_DESKTOP, ...) (after that you need to handle redraw messages to the desktop window yourself).
And remember: Beethoven wrote his first symphony in C.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Clear screen to the green background ?

Post by exxos »

mfro wrote: Thu Apr 23, 2020 7:51 pm or register your own desktop with wind_set(WF_DESKTOP, ...)
Is that right as it doesn't seem to be listed ? http://toshyp.atari.org/en/008009.html#wind_set
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
thorsten.otto
Posts: 148
Joined: Mon Nov 04, 2019 2:20 am

Re: Clear screen to the green background ?

Post by thorsten.otto »

It is WF_NEWDESK, not WF_DESKTOP.
after that you need to handle redraw messages to the desktop window yourself
Erm, no. The AES still does that for you.

PS: i just wonder how long it takes until that old links disappear. The current version of tos.hyp is maintained on github, for several years already.
User avatar
mfro
Posts: 122
Joined: Thu Dec 13, 2018 7:32 am

Re: Clear screen to the green background ?

Post by mfro »

thorsten.otto wrote: Fri Apr 24, 2020 2:44 pm It is WF_NEWDESK, not WF_DESKTOP.
Good, old - and buggy - Atari Compendium. Right you are, it's WF_NEWDESK. Thanks.
And remember: Beethoven wrote his first symphony in C.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Clear screen to the green background ?

Post by exxos »

thorsten.otto wrote: Fri Apr 24, 2020 2:44 pm PS: i just wonder how long it takes until that old links disappear. The current version of tos.hyp is maintained on github, for several years already.
I always google the things I want.. github pages never show up.
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Clear screen to the green background ?

Post by exxos »

I am not really getting this.. I just created a standard window for now... Though when the dialogue boxes open and close, it is leaving a copy of itself on the screen.. So the background is not refreshing at all now :roll:
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
thorsten.otto
Posts: 148
Joined: Mon Nov 04, 2019 2:20 am

Re: Clear screen to the green background ?

Post by thorsten.otto »

- do you call form_dial(FMD_FINISH,...) when you are done with the dialog?
- do you handle WM_REDRAW messages for your window?
User avatar
ari.tao
Posts: 45
Joined: Tue Sep 18, 2018 8:50 am

Re: Clear screen to the green background ?

Post by ari.tao »

Sic!
To handle the AES update semaphores correctly is essential when calling a dialogue.
Falcon, TT & some more
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Clear screen to the green background ?

Post by exxos »

thorsten.otto wrote: Sat Apr 25, 2020 7:01 am - do you call form_dial(FMD_FINISH,...) when you are done with the dialog?
- do you handle WM_REDRAW messages for your window?
FMD_FINISH is half the problem. When I draw the menu box, go into a second menu and quit back to main menu I get a copy of the second menu left on the screen as that menu is larger than the first. Now FMD_FINISH clears that issue by restoring the desktop background. So in that respect it all works fine..BUT..

If I fill the screen with red for example, FMD_FINISH restores again the desktop background so I end up with green blocks around my red background. I guess it would be better to post a video about this...

WM_REDRAW I'm not using as I don't think it would help. The workaround is to just draw a red background full screen after FMD_FINISH, But that doesn't seem a good solution to me, it is literally a work around.
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
Post Reply

Return to “SOFTWARE PROGRAMMING & DISCUSSION”