Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!pyramid!voder!apple!goldman From: goldman@Apple.COM (Phil Goldman) Newsgroups: comp.sys.mac.programmer Subject: Re: MF compatibility using both screen buffers Message-ID: <7669@apple.Apple.Com> Date: 14 Mar 88 06:43:21 GMT References: <2145@polya.STANFORD.EDU> Reply-To: goldman@apple.UUCP (Phil Goldman) Organization: Apple Computer Inc, Cupertino, CA Lines: 47 In article <2145@polya.STANFORD.EDU> rwilson@polya.stanford.edu () writes: >I am about to release a PD video game that I would like to make >multifinder compatible. It works fine on a Mac II; and on a Plus or SE >most of the time. The problem is that on the 68000 machines I need the >speed of page flipping, and am using the whole screen including menu bar >and the secondary graphics screen. First, does anyone know how to get a >window to overlay the menu bar? There isn't anything that's very clean, but there are a couple of things you can do: (1) Set the menu bar height to 0. HyperCard does this to get rid of the menu bar. Like HyperCard, your app will have to restore this when it gets a suspend event (although if you get rid of the menu bar and your window covers all others it might be difficult for the user to initiate a layer switch -- but you should still handle all this). (2) Change the clipping in the wmgrport. This is pretty gross, and could have some nasty side effects. Therefore, option (1) is much more preferable, given that you're determined to do this. Are you really sure that you want to get rid of the menu bar? This has some undesirable effects in terms of user interface, especially under MultiFinder. At the very least, it would be nice to allow the user to decide whether the menu bar is hidden. In terms of page flipping, I think if you're tricky enough you can still make the menu bar work correctly. >Second, has anyone tried to make MF >deal with the second screen? I think I can accomplish the second if I >get the first. Actually, this is the tough task...really tough. MultiFinder cannot allocate a new screen (or sound) buffer at application launch time. This was possible in the old single application mode because the entire memory state above the system heap was recreated from scratch each time. The only way to really make this work is to have an init that allocates the second buffer before MultiFinder starts up. This is difficult to write and forces the alternate buffer to always be allocated. Note that this is only a problem on MacPlus and SE; the page flipping on the MacII is done differently (since you have to access the video driver on the card directly). A final note: Your application would become *much* more compatible in all respects if you could tune it to the point that you don't need to do page flipping. I guess that's become obvious just from the fact that my response was pretty obtuse...or else it's just me. -Phil Goldman Apple Computer