home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / amiga / programm / 12268 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  1.9 KB

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