First, I recommend to install the LDG kit available on the
official LDG site.
Next, download the
LDV kit+documentation
To make an LDV, you need:
Warning! By default, the development kit provided by VISION includes these files for the PureC compiler. I strongly recommend to update regularly the .H and .LIB according to the evolution of LDGs.
The tree proposed in VISION LDV kit is the following:
Folder / Sub folder | Files |
<..>/LDV | For LDG management: LDG.H: Librairies dynamiques GEM, header file .H MT_AES.H: To use LDG/LDV under a multi tasking OS. In fact, this file is useful only if you use AES in the LDV, which is unlikely at the moment, but perhaps soon... LDG.LIB, MT_AES.LIB: to be linked with your LDV For LDV management: LDV.H: Definition of structures and interfaces with VISION VAPI.H: Definition of structures and interfaces with VAPI |
<...>/LDV/SRC | Each LDV is there in a directory associated with
its name. In such a directory, there is: <name of ldv>.C: the "source" file of the LDV <name of ldv>.PRJ: the project file (Pure C) |
<...>/LDV/DOC | This documentation |
You can use for the skeleton of an LDV any source of an LDV found in the kit. It is up to you to see which file suits best the LDV you want to make!
The VISION kit provides the following LDVs as well as the sources (in PureC). Here are their characteristics:
INVERT.LDV | |
Description | Inversion of bits of an image |
Capabilities | Any number of bitplans (1, 2, 4, 8, 16, 24 and 32). Machine format. Does not modify the palette. |
Transformation type | In place. This property can also be suppressed from the CAPS define, and VISION can be forced to allocate memory for the destination (teaching only purpose!) |
Uses VAPI | No |
INI file | Yes (English / French) |
Comment | Very simple! Uses only vro_cpyfm VDI function Not really useful: VISION already provides the "Négative" function since version 1.0! |
XWAVE.LDV / YWAVE.LDV | |
Description | Waves on X / Y axis |
Capabilities | Any number of bitplans (1, 2, 4, 8, 16, 24 and 32). Machine format. Does not modify the palette. |
Transformation type | Forces VISION to allocate memory for destination. It must be possible to do without, but this complicates a little the LDV... |
Uses VAPI | Yes (Progress + Raster Interface) |
INI file | Yes (English / French) |
Comment | Amusing and quite simple. Presents the VAPI progress interface and the function to "clear" an image (RaImgWhite). |
BW.LDV | |
Description | Conversion of an image (or part in True colour) to an image in shades of grey |
Capabilities | Any number of bitplans (1, 2, 4, 8, 16, 24 and 32). Machine format. Modifies the palette. |
Transformation type | In place |
Uses VAPI | Yes (Progress + Raster Interface) |
INI file | Yes (English / French) |
Comment | Uses True colour conversion format functions (RaTCConvert and RaTCInvConvert). Shows also how to modify the palette. Compared to the equivalent VISION (B&W conversion) function, this LDV allows to do it on a block (True Colour mode only) |
PIXEL.LDV | |
Description | Performs a pixelization on an image or part of it |
Capabilities | True Color modes only (16 and 32 planes). ATARI. format |
Transformation type | In place |
Uses VAPI | Yes (Progress Interface) |
INI file | Yes (English / French) |
Comment | Nice effect and good for learning: this LDV only considers True Color ATARI format and it will nevertheless run on your MagicPC ! It makes use of VISION feature to deal with format handling and only focuses on a specific format. Hadnles cancel feature. |
YPERSC.LDV | |
Description | Performs a perspective effect on an image or part of it |
Capabilities | Any number of bitplans (1, 2, 4, 8, 16, 24 and 32). ATARI format. Does not change palette. |
Transformation type | Forces VISION to allocate memory for destination. |
Uses VAPI | Oui (Progress Interface+ Raster Interface + MEM Interface) |
INI file | Yes (English / French) |
Comment | Nice perspective effect. When operating on selection, the allocation bloc is set thanks to LDVF_NOSELECTION flag (pretty painful to handle in bitplane mode). This LDV only gets an image and not bloc selection.MEM Interface function MeCopyMemoryxx is used to scale lines. |
LIGHT.LDV / GAMMA.LDV | |
Description | Change red, green, blue color spreading using a line (light) or a gamma curve (gamma). |
Capabilities | Any number of bitplans (1, 2, 4, 8, 16, 24 and 32). Machine format. Modifies the palette. |
Transformation type | In place |
Uses VAPI | Yes (Progress Interface+ Raster Interface) |
INI file | Yes (English / French) |
Comment | Smart replace for old embedded functions in
VISION..In bitplane mode, palette is changed. Handles cancel. These LDVs are pretty optimized for memory performances: they operate in place on machine specific format and can work on a bloc inside the image.(true colro only). These LDVs are very similar : only internal function ChangeColors is specific to a LDV. |
ROTATE.LDV | |
Description | Performs a rotation on the image or part of it. |
Capabilities | Any number of bitplans (1, 2, 4, 8, 16, 24 and 32). Machine format. Does not change the palette. |
Transformation type | Forces VISION to allocate memory for destination. |
Uses VAPI | Yes (Progress Interface+ Raster Interface) |
INI file | Yes (English / French) |
Comment | This LDV is very simple. Actually it just calls RaRasterRotateGetDstMFDB and RaRasterRotate
functions in VAPI Raster interface . Have a look how LDVF_NOSELECTION flag is used in order to not complicate things with blocs. |
PUZZLE.LDV | |
Description | Mixes image blocs to generate a puzzle |
Capabilities | Any number of bitplans (1, 2, 4, 8, 16, 24 and 32). Machine format. Does not change the palette. |
Transformation type | Forces VISION to allocate memory for destination. |
Uses VAPI | Yes (Progress Interface) |
INI file | Yes (English / French) |
Comment | Fun LDV easy to code. Smartest thing is entropy handling i.e. how much disorder there is in the mix. |
BHOLE.LDV | |
Description | Simulates a black hole in an image. Consider it as a tribute to Stephen Hawking. |
Capabilities | Any number of bitplans (1, 2, 4, 8, 16, 24 and 32). Machine format. Does not change the palette. |
Transformation type | Forces VISION to allocate memory for destination. |
Uses VAPI | Yes (Progress Interface+Config Interface+Logging Interface) |
INI file | Yes (English / French) |
Comment | Most complicated LDV so far. Has its own optimzations for 68030 and 68881. Uses black hole symetry to speed up computations. |
CNTCOLLDV | |
Description | Count the number of different colors on each line and for the whole image |
Capabilities | Any number of bitplans (1, 2, 4, 8, 16 and 32). Machine format. Does not change the palette. Does not alter the image. |
Transformation type | No change on image. Generates cntcol.txt file in VISION's folder or the file specified by parameter#2 |
Uses VAPI | Yes (Progress Interface+MEM Interface + Raster Interface +Logging Interface) |
INI file | Yes (English) |
Comment | Inspired by http://www.atari-forum.com/viewtopic.php?f=27&t=38492 |
GENIMG.LDV | |
Description | Generates as many different colors as possible on an image (tester for previous LDV) |
Capabilities | Any number of bitplans (1, 2, 4, 8, 16, and 32). Machine format. Does not change the palette. |
Transformation type | Forces VISION to allocate memory for destination. |
Uses VAPI | Yes (Progress Interface+Raster Interface) |
INI file | Yes (English) |
Comment | Ugly image generated. |
DITHER.LDV | |
Description | Dithers an image to any number of planes using different methods |
Capabilities | Any number of bitplans (1, 2, 4, 8, 16, and 32). ATARI format. Palette might be changed/created. |
Transformation type | Forces VISION to allocate memory for destination. |
Uses VAPI | Yes (Progress Interface+Config Interface+Logging Interface + Image Interface) |
INI file | Yes (English) |
Comment | Pretty simple as it basically calls ImDither function from Image Interface. |