-
Notifications
You must be signed in to change notification settings - Fork 1
Chunks
Chunks are images associated with a room. For example, if the room contains a house with a smoking chimney, each frame of the chimney's animation will be a chunk. If the room contains a door which can swing open, each frame of the door animation will be a chunk.
The background image of an entire room is not itself considered a chunk, though it probably should have been.
These source files work with chunks:
- chunkxf*.pas were used to create the chunks originally; they are not now useful
- chunker.pas dumps the contents of a chunk file to standard output
- cadburys.pas is a library of routines for working with chunks
- celer.pas displays the chunks during the game.
I'm surprised that I still remember that Celer is named after a painter in the Cambridge Latin Course.
As well as the image data, each chunk has several attributes:
- x, y: original position on the screen. The chunk can be plotted anywhere, but this is the default position.
- xl, yl (note letter l for length, not digit 1): width and height
- size: size of the image data in bytes.
- flavour: either EGA or BGI. EGA means it's a direct dump from the EGA screen memory; this has implications about valid widths and X positions being divisible by 8. BGI means it's an image captured by Turbo Pascal's built-in graphics routines (the Borland Graphics Interface).
- natural: if true, there is no image data saved in the chunk file. Instead, the image is captured from the main screen immediately after it is loaded. If this is true, I believe the flavour is required to be BGI.
- memorise: if true, the image is held in memory while the player is in the room. If false, the image is discarded as soon as it's been used, and must be reloaded next time.
There was supposed to be a system which allowed chunks to refer to one another in order to build simple animations, but it was never completed. The animations within Avalot are all done in code. It would probably be sensible to bring this idea back in ports.