home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!cc.helsinki.fi!hellgren
- From: hellgren@cc.helsinki.fi
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Double buffered intuition screens?y
- Message-ID: <1992Aug13.132304.1@cc.helsinki.fi>
- Date: 13 Aug 92 11:23:04 GMT
- References: <13240@chalmers.se>
- Sender: news@klaava.Helsinki.FI (Uutis Ankka)
- Organization: University of Helsinki
- Lines: 30
-
- In article <13240@chalmers.se>, d9erikb@dtek.chalmers.se writes:
- > I'm writing a game where I would like to have double buffered
- > screens. However, I want system/reqtools requesters to appear
- > on the visible bitmap.
- > After some experimentation I have found a solution: I simply
- > swap the Planes[] part of the BitMap structure between the
- > Screen structures BitMap and my extra "draw" BitMap.
- >
- > My questions:
- >
- > 1. Is there some particular reason for this to be a BAD THING?
- > 2. What do I need to do to prevent race conditions when I swap
- > the bitplane pointers? Should I Disable(), Forbid() or what?
- > 3. Is there a better way?
-
- 1. I don't know any reason for not using this method, but swapping
- BitMaps sounds more reasonable.
- 2. If you have redirected system requesters to your screen, then there
- may be problems if you don't use Forbid() Disable(). If system requester
- appears on the screen during your swapping, requester may end up in the
- not-visible Planes[]. Because you won't see the requester, you cannot
- kknow why the system is halted. I would use Forbid() and Disable() This is
- only theory; I don't know if this is possible.
- 3. The other way: Use two BitMaps. This method is used in RKM, in program
- called anim_ex.c in chapter Graphics:Bobs, Sprites and Animation (at least
- in 1.3 RKM). Source code is available in FISH disk 344. Because I don't have
- the code right here, I can't write it now. I use this method (a little bit
- modified version) in my game programming.
-
- Vesa Hellgren
-