★ APPLICATIONS ★ CREATION GRAPHIQUE ★ MINIMAG ★ |
Minimag (Computing With the Amstrad) | Applications Creation Graphique |
Big on letters, small on space ...that's ROBIN IMIXON's magnifying program IOU may remember Glynne Davies' superb large character utility in the September issue of Computing with the Amstrad. Although it is an excellent program, being rather large it takes up a lot of room - especially if you want to use large letters for a title page or a game screen layout. For those of you who, like me, hate to do too much typing when it can possibly be avoided, may I present Mini Magnifier. This is really a three line program. Line 220 sets up the colours and defines the functions. Lines 40000 and 40010 are the Mini Magnifier subroutine. In the listing, lines 230-260 could be replaced with statements of your own choice. The program works by setting Symbol After to 32. This means that all characters after 32 (space) can be re-defined. To enable this to be done your Amstrad places a copy of the character set just below Himem and moves Himem to one character below the character set so that it cannot be overwritten. Without going into unnecessary detail, each character definition is stored in a sequence of eight bytes. These correspond to the eight parameters following a Symbol command. This therefore gives us a quick and simple means of finding out the definition of any character. To produce his large letters Glynne Davies fills in each block of a character by drawing lines. In Mini Magnifier the boundaries of the block are worked out by functions Z1 to Z4. Then a graphics window is defined and cleared to a chosen colour. This is a much faster method, but it has one disadvantage. The minimum screen width of a graphics window is the width of a character in Mode 2 -one byte. This means that if you want small large letters (if you see what I mean) you will lose out on definition. No problem: Use Glynne Davies' program. On the CPC464 there is really no way around this difficulty, vas you haven't got a fill command. Vou can either have slow, good definition large characters or fast, medium definition large characters. You pays yer money and takes yer choice. To use Mini Magnifier you type in a suitably numbered version of line 220 as the first line of your program. This initialises the subroutine. Then to print large text you need to define the six variables mentioned in the Major Variables panel. Having defined them you then GOSUB 40000 and hey presto! For future use I suggest you delete all the REMs and lines 230-260. Make line 220 into line 1 and save the program. It will then be possible to merge Mini Magnifier with most programs.
|