home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / games / gamesuite / !Amnesia / AmsHelp / Windows < prev   
Text File  |  1995-01-29  |  3KB  |  67 lines

  1. Amnesia Windows - for Amnesia 1.00
  2. ===================================
  3.  
  4. This file describes the use of windows within Amnesia.
  5.  
  6. Overview
  7. --------
  8.  
  9. Amnesia can control graphical objects within a large area - much larger than
  10. the screen.  When an object, say a bullet or a bomb, moves off the screen you
  11. might be tempted to forget about it.  However, this would be a bad idea, as
  12. you would build up a surplus of objects which were off the screen, taking no
  13. part in the game, but still consuming processor time to move them etc.
  14.  
  15. So that you can just forget about objects as they move off the screen,
  16. Amnesia provides three 'windows' - rectangular areas which may be smaller or
  17. larger than the screen.  Amnesia then takes action depending on whether the
  18. objects are inside or outside of these windows.  I’ll deal with each window
  19. in turn.
  20.  
  21. (1) The game window
  22. -------------------
  23.  
  24. This window is provided purely for the user.  It is intended to form some
  25. part of the game.  The game window is useful for bouncing objects off the
  26. edges of the screen.  If any part of an object is outside of the game window
  27. that object will be returned for attention, providing that the game window 
  28. bits are set in its flags.  To help with bouncing objects the game window 
  29. tells you whether the object is outside of the window in a horizontal or
  30. vertical direction (or both).
  31.  
  32. (2) The plot window
  33. -------------------
  34.  
  35. This window is used to make sure that a game runs at the highest speed it
  36. can.  It is used to make sure that no attempt will be made to plot an object
  37. if it is fully off the screen.  Unlike the game window, the plot window only
  38. prevents the plot if the WHOLE of the object is outside of the window.  As a
  39. rule of thumb, you should use this window if a lot of your objects spend most
  40. of their time off the screen, and you should set the window to the size of
  41. the screen.
  42.  
  43. (3) The kill window
  44. -------------------
  45.  
  46. This window is really useful to tidy up all those stray objects that wander
  47. off the screen.  If the kill window bit is set (bit 16) in the object flags,
  48. and the object wanders outside of the window, it is automatically deleted.
  49.  
  50. Setting Windows
  51. ---------------
  52.  
  53. Amnesia provides an SWI to set windows:
  54.  
  55. SYS "Amnesia_SetWindow",window,min x,min y,max x,max y
  56.  
  57. window is the window number.  0 -> the game window, 1 -> the plot window, and 2 -> the kill window.
  58. min x is the minimum x value - the left hand edge of the window.
  59. min y is the minimum y value - the top edge.
  60. max x is the maximum x value - the right hand edge.
  61. max y is the maximum y value - the bottom edge.
  62.  
  63. The full plot window for a MODE 13 screen is set by
  64.  
  65. SYS "Amnesia_SetWindow",1,0,0,320<<12,256<<12
  66.  
  67.