Table of Contents

FUNCTION REFERENCE

This is the set of functions made available by the library. Their use is bound to the loading of the midres library. Some of these features are available for all platforms (some require the overlay to be enabled). Others, however, are only available for those configurations that have enough contiguous memory.

LIBRARY SUPPORT

These functions take care of initializing and deinitializing the graphics subsystem for the various platforms. The mr_init function must always be called, before each call. The call to mr_cleanup is optional, and only necessary if you want to leave the system “clean” after execution.

OVERLAY SUPPORT

These functions are only needed if you want to ensure support from the overlay system. They must be used before calling those certain functions.

SCREEN MANAGEMENT

These functions are required for manipulating entire midres screens. They take care of loading, saving, compressing and decompressing images from files to certain screens. They also allow you to indicate which screen should be shown and which to write to (where the hardware has more than one screen).

DRAWING PRIMITIVES

These functions take care of drawing and coloring mixels on the screen. Version 1.0 is suitable for systems with low memory and for integration with other enviroments (i.e. img2midres utility). The two versions are compatible, in the sense that they act on the same midres screens and can therefore be mixed.

v1.0

v1.1

BIT BLIT PRIMITIVES

These functions deal with copying operations of rectangular screen areas of the same size. The areas can be two screens or a memory area towards one screen. Copying can also take place with the application of a logical operation (AND, OR or XOR) or with the effect of transparency (“off” mixels are considered transparent). These functions can be used to implement a rudimentary form of software sprite.

DOUBLE BUFFERING

These functions implement a double buffering mechanism: this is a way to avoid flickering during animations, and consists of drawing on one screen while the other is shown to the user. The screens are exchanged with each other only when the frame needs to be updated.

TILES PRIMITIVE

These functions deal with defining, drawing and modifying the “tiles”.