DJ-MAP-EDITOR V2.22 (C) Sept 1991 by 'DE JANEIRO' ------------------------------------------------- 'THE AVENGERS' ------------------ * Historic .... ¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹ Firstly , i'd like to thank people who will use this program, and i hope they 'll be satisfied with its functions . This program 's already existed in several versions before being released , from v 1.00 up to v 2.22 . More than one year and a half have passed since the first version was finished . It's up to you to guess how nasty this one was . Map Editor was to be used in order to create maps , for games like Shoot'em up or any prg games that need some complex graphix areas. At the beggining , Map Editor could only fill the maps with some blocks that had to be cut with another program called 'Make Fnt'. Now , both programs have been linked and all functions for sprites are also available in Map Editor . The oldest versions only worked with low resolution . Actually , you can run the prog either in low or med res without getting it confused with the file selector . The trick i use is to toggle to the original resolution while using the selector . Further on , seeing the slowness of the gem mouse handling , i de- -cided not to use it anymore and to include mine . Additionally , the overscan rout needs most interruptions to be set off . As you have probably already understood , apart from creating some maps , Map Editor can cut graphics blocks , in all standard types , being one plane up to four planes . Almost all sizes are allowed . This should be extremely useful for coders , who often need such files , only including some pieces of pixel art , and not always in four planes . We don't know any programs apart from ours to make all that right. One of the main disavantages of the .FNT files is that all blocks must have the same size . If you do wish to get other sizes , you have to create other files . This ain't that bad , because you can easily have separate files for some 16 x 16 sprites and some 32 x 32 sprites. Any other size being into [ 1 x 1 , .... , 320 x 200 ] is allowed. Although we don't like Degas Elite very much , all graphics have to be cut in some * . P?1 files . There should be a block editor in the updated versions of this program , but it isn't ready yet . Finally , this program 's been debugged many times . Though , there are still some . In any case , none of them should make the prog fail . You ought to read what's written at the end of this file to prevent some problems . * Format of the files ...... ¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹ *.MAP ( files of arrangements ). ¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹ The length of these files depends on the x-size and y-size you've chosen . To each byte of the file goes a number indicating which block is to be displayed . The maximum amount of blocks is 256 . A .MAP file may be useless if you don't use it together with the .FNT file it has been made with . This to say that the MAP does not contain any of the graphics . Here follows the header of the .MAP files : offset: + 0.L: identification message "MAP!" . + 4.L: width of the map . + 8.L: height of the map . +12.B ...: the bytes for the map itself . *.FNT ( files of graphics ). ¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹ These file contain all blocks cut with the program . offset: + 0.W : width X of the blocks ( in pixels ) + 2.W : height Y of the blocks ( in scanlines ) + 4.W : number of planes (1,2,3 or 4). + 6.W : number of blocks in the file . + 8.L : "FNT2" identification message +12.W(3) : 3 words not used yet . +18.w(16): 16 words , the sixteen colours +50 ... : the graphics , one block after the other line after line , per set of planes ( 16 pixels each time ) until the end of one block an so on . Well if you didn't understand , it's the same way as the screen memory is organised, unless you're not using the four plane mode . i hope everyone got it right ! Now , here is a way to find the address of the block number N in a file : adr_block_N=adr_file+50+Y*2*Number_planes*N*X_block and X_block = int ((X-1)/16)+1 X_block is the number of 16-pixels-wide areas needed to stock any of the blocks . Therefore , each block which width can not be divided by 16 is filled up to a 16-multiple with some pixels from colour 0 . There are very few opportunities that some of you want to use a map at any position of the screen . Usually , everyone will try to be at a 16-pixels-multiple . FUNCTIONS AVAILABLE IN MAP EDITOR v 2.22 ¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹ They're of three kind . Some functions for the sprites , some for the map and some for the buffer . All messages used in the program are in english , but should not cause any problem , for they are extensively used out elsewhere . Anyway , the program will never write a speech on the screen . Yet, there are many tests to prevent the prg from crashing. You won't always be given some precise message , such as for disk operations . If something happens during the saving or loading sequence , you will only get an FILE Error message , and it's your responsability to find out what's wrong with your disk ( wrt protected , lack of room , no disk in drive , ... ) Another detail : As there is no matter of using some of the map options when there are no graphics in memory , the map options won't be available as long as you haven't loaded a set of blocks ( or created from a picture ). Any modification over the sprites will destroy the current map. SPRITES FUNCTIONS: ¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹ They're displayed on the right side of the pannel , you only have to move the mouse pointer on to them and click . Some may act diffe- -rently if you use the left or the right mouse button . * LOAD : load a file into memory if there is enough room left * SAVE : save the set of sprites in a .FNT file * SEE : see the set of sprites if it exists . ( read MAP FUNCTIONS / OPTION LOOK for further infos ). * LOAD PICT. : Load a Degas file ( packed or unpacked ) into the buffer and display it . click on the mouse to come back to the menu . * SET : allows to see the buffer and to fix the parameters for the cutter ( OX , OY , TX , TY ) When the picture is displayed , you can also see the whole palet at the top of the screen . In order to set the OX and OY ( origin X and Y ) , all you have to do is click at the position ( there are some position indicators at the top of the screen ) . Then , go on helding the mouse button pressed and draw the figure of the block . Here you are setting the TX and TY parameters ( size X and size Y ) . * PLANE 0123 : by clicking on the different numbers , you should control the amount of planes used for the sprites . Numbers displayed in black are not used . By modifying the number of planes and then looking at the picture, you may see which planes are really used . WARNING : during the cut-sprites session , only the chosen planes will be cut . * OPT : this is an extremely useful possibilitie , since if you use it , the picture will be optimised . The structure of the planes may be modified if there is a chance to use only a part of the colours. the colours needed are moved at the beginning of the palet . There may be a 5-seconds delay before the end of this function . * parameters OX , OY , TX , TY , DX , DY These parameters are used in the AUTOMATIC cut of the sprites. It's useless to fix them for the CUT 1 option , you only need to draw a square in which lie the sprite . You can fix the DX and DY values with the arrows at the sides left button : +1, -1 right button : +10 , -10 OX , OY : position where the cut-session shall start TX , TY : size of the blocks DX , DY : offset to add before cutting another sprite * THE INFO PANNEL : Lying in the right side of the screen , it contains the main infos about the current sprite file . here are some explanations about them : NP : number of planes used by the sprites NOBJ : amount of sprites in the file TX : width ( in pixels ) of each sprite TY : height ( in scanlines ) of each sprite * CUT 1 : allows to get an unique sprite by cutting it into a square with the mouse . This may be very useful for big sprites. * AUTOCUT : switch on the automatic cutter , which will cut as many sprites as you wish . The only thing to be done is to click on the last sprite you want to include in the .FNT file . FUNCTIONS FOR THE MAP : ¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹ They're only available when having a set of sprites in memory. Yet , you can modify the LX and LY parameters in the same way as for sprites size ( click on the arrows with either left or right button ). LOAD : load a map from disk SAVE : save a map from memory onto the disk LOOK : look at the map if possible . This can also be done by pressing the SPACE BAR . While looking at the map , it may spread on the whole screen . However , if the prog can not display an entire block in width ( at the right side ) , there is a blank instead of it . For example , if you're using some 48*48 sprites , you will see 6 sprites in width , and 32 pixels will remain blank ( cos the screen is only 320 pixels wide ) . In the LOOK mode , you will be given some parameters like : IX , IY : position in map of the top left block . X , Y : position of the block on which stands the mouse cursor This ough to be useful for position tests . Using the left mousebutton , you will set the selected block at the position of the mouse . The block will be immediately displayed on the screen and its code will be written in the map . If you wish to fill an area with a block , you needn't release the mousebutton , but just move the mouse. One of the greatest possibilities is to cancel all modifications in the map since you last pressed the left button. This can be achieved by pressing the UNDO key on the keyboard . UNDO may set those blocks again if pressed twice . The right mouse button isn't used to set blocks . If you click on it , the screen will swap to the BLOCK SELECT mode . you'll then be able to choose which block shall be displayed when pressing the left button on the map. If all sprites do not fit in one screen , pressing the right button again will show other sprites . To leave this mode , you must choose a block , even you came in this mode by mistake . Another of the best ever functions of MAP EDITOR is to display a whole set of blocks at any position . In order to choose the set of blocks , you may use the mouse , by pressing the right button and hold it pressed , and then move the mouse over the whole set. You don't have to stop the selection at an end of block , for it seems to be extremely hard . Any half block will be accepted in the set . The prog will then enter BLOCK mode and when using the left button in the map you won't insert an unique block but the whole set. To move in the map, if it takes more than one screen to display it, you can move the mouse cursor to the sides so that the map will scroll. However , if your map is very big , and you do not wish to move with the mouse cos it's too slow , you may use the four arrow keys . The map will then move by a screen-width at a time . When you are looking at map , the sprites or the picture , it's sometimes very boring to see the mouse cursor owing to the palet . If you wish to get rid of this problem , you can press ALTERNATE . An internal palet will then be set as long as you hold the key pressed . As it is a very flashing palet , you may see what you are doing very well . SET DIM : allow to create a new map . its size is fixed by the LX and LY parameters . If you load a map from disk , the LX, LY will be set to the right values . If you want to create a new map , just set yourself the LX and LY and then use the SET DIM option . The CLX and CLY parameters contain the size of the current map. They are modified when LOADing or SETting a new map. LENGTH : Size of the current map in bytes . You should always remind that twice as much is reserved , in order to have a backup of the map in memory. It is used for the UNDO option. If you want to quit MAP EDITOR , you can click on the top screen pannel , over all options , or you can press the ESC key . I hope I haven't forget anything . PROBLEMS ¹¹¹¹¹¹¹¹ Here i write a few words about some problems you may have to face. * Firstly , as i use my own mouse routine and the prog uses overscan , most interruptions have to be switched off . As a consequence , there are no Beep for keyboard , system VBL , disk swapping tests . Though , all interruptions are switched on again while using the file selector and then set off once more . So please swap disk only when being in the selector . * The memory handling works rather well , even if the prog will forbid any cutting-session for sprites if there is less than 32 kilobytes free . It is done in order not to crash some datas , for the program can't evaluate the size of the sprites file that's gonna be created . Although , the 32 Ko would not be enough if you are cutting very small sprites ( like 1 x 1 in four planes ) , to cut the whole screen, MAP ED would need 50 + 64000 * 8 bytes . This can't be done if you own a 520 ST . Yet , we think it's easy not to get confused . If you've run the Auto cutter and then see you confused yourself, you can stop the cutter with the ESC key . This bug should be fixed in the next version , which should also be able to insert and skip some of the sprites. Some memory tests will then be compulsory . PROJECTS ¹¹¹¹¹¹¹¹ * Improvements for the memory handling , with auto modifications in the map if using the INSERT/SKIP sprites options , so that the sprite codes in the map will still be the right ones . * Possibilities to cut a set of blocks from the map , in order to reproduce it elsewhere . * MAP EDitor would be able to insert the memory map into another map from the disk , at any position . This could be used to create complex libraries. * Possibilities to code the map on words instead of bytes , so that we could use 65536 blocks instead of 256 . However , it seems that 256 is enough for most applications . * A sprite editor with zoom may be coded , but all other improvements have to be done before . In a friendly manner , 'De Janeiro' Article written in french by 'De Janeiro' from The Avengers and then translated by Antares also from The Avengers. All letters / bugs report can be sent at the following address : The Avengers 1 impasse Degas 57210 Feves France