home *** CD-ROM | disk | FTP | other *** search
- Amnesia Windows - for Amnesia 1.00
- ===================================
-
- This file describes the use of windows within Amnesia.
-
- Overview
- --------
-
- Amnesia can control graphical objects within a large area - much larger than
- the screen. When an object, say a bullet or a bomb, moves off the screen you
- might be tempted to forget about it. However, this would be a bad idea, as
- you would build up a surplus of objects which were off the screen, taking no
- part in the game, but still consuming processor time to move them etc.
-
- So that you can just forget about objects as they move off the screen,
- Amnesia provides three 'windows' - rectangular areas which may be smaller or
- larger than the screen. Amnesia then takes action depending on whether the
- objects are inside or outside of these windows. I’ll deal with each window
- in turn.
-
- (1) The game window
- -------------------
-
- This window is provided purely for the user. It is intended to form some
- part of the game. The game window is useful for bouncing objects off the
- edges of the screen. If any part of an object is outside of the game window
- that object will be returned for attention, providing that the game window
- bits are set in its flags. To help with bouncing objects the game window
- tells you whether the object is outside of the window in a horizontal or
- vertical direction (or both).
-
- (2) The plot window
- -------------------
-
- This window is used to make sure that a game runs at the highest speed it
- can. It is used to make sure that no attempt will be made to plot an object
- if it is fully off the screen. Unlike the game window, the plot window only
- prevents the plot if the WHOLE of the object is outside of the window. As a
- rule of thumb, you should use this window if a lot of your objects spend most
- of their time off the screen, and you should set the window to the size of
- the screen.
-
- (3) The kill window
- -------------------
-
- This window is really useful to tidy up all those stray objects that wander
- off the screen. If the kill window bit is set (bit 16) in the object flags,
- and the object wanders outside of the window, it is automatically deleted.
-
- Setting Windows
- ---------------
-
- Amnesia provides an SWI to set windows:
-
- SYS "Amnesia_SetWindow",window,min x,min y,max x,max y
-
- window is the window number. 0 -> the game window, 1 -> the plot window, and 2 -> the kill window.
- min x is the minimum x value - the left hand edge of the window.
- min y is the minimum y value - the top edge.
- max x is the maximum x value - the right hand edge.
- max y is the maximum y value - the bottom edge.
-
- The full plot window for a MODE 13 screen is set by
-
- SYS "Amnesia_SetWindow",1,0,0,320<<12,256<<12
-
-