+-----------------------------------------------------------------------------+ | M r E D ! | | V1.20 | | | | (ibM gRaphics EDitor) The ANSI graphics editor for the Amiga | +-----------------------------------------------------------------------------+ BY: Robert V. Fahey a.k.a. NECR0SIS internet: faheyr@silver.ucs.indiana.edu faheyr@cssun.cs.indiana.edu faheyr@rose.ucs.indiana.edu bitnet: faheyr@iugold (C) 1991, R. Fahey, all rights reserved. ******************************************************************************* ShareWare Notice: This program is ShareWare, and R.Fahey holds all Copyrights to it. MrED is freely distributable, so long as the files contained in this archive are distributed AS IS... etc etc etc... I'm sure you have all heard this before... ;-) I am releasing this program as Shareware, because I believe in the Shareware policy of "try-before-you-buy". This program can be registered for only $10 (U.S. Currency, or equivalent), and will get you free upgrades as they are completed. I am only asking $10, and I ask you to please register it if you use it. (I'm a starving college student, and any contributions would be greatly appreciated!) Not only that, if you register, I know who has needs for this program, and can receive feedback to further improve this product. ****************************************************************************** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! YOU MUST READ THIS!!! VITAL! WARNING! In V1.05, i added something that is great/deadly. What do I mean? Well... Before this version, I only allowed the user to draw boxes, etc, with the special character sets (mapped to the function keys). This version, I added every ansi character to ansi.font, and put in 10 new character sets. (access them by using right amiga key plus F1-F10) At first, I allowed the user to enter ANY character (ascii 0 - ascii 255), but ran into a big problem: you could actually hit a key that was an ascii return, or an escape. So, in other words, you could write software with this editor! (I prefer a compiler myself... ;-) ) I took out only 3 keys (carriage return, newline, and escape), only because it messed up MrED pictures. I left all others in there, BUT, PAY HEED! USE CHAR SETS 7 AND 8 AT YOUR OWN RISK! I grouped the dangerous characters into the two char sets (right amiga F1 and right amiga f2), and I would stay the hell away from using these characters. Here's why: I did a nifty picture, but when I viewed it with JrComm .95, it crashed it! Some nice pattern that I created was interpreted as a bizarre sequence, and killed my term program! Now, since a logical person sees that most BBS users call in with JrComm, it would be in your best interest to NOT USE character sets 7 and 8 unless you know exactly what you are doing!!! You may be asking yourself, "Why did he put them in if they are so dangerous?" Because danger is fun! The more control you have over a system leads to more hazardous things that you can do. I left it in because someone may have some strange use for it.... All in all, DON'T USE THESE SETS UNLESS YOU KNOW WHAT YOU ARE DOING! (did you ever think ansi graphics could be deadly?) ------------------------------------------------------------------------------ QUICK OVERVIEW OF MRED: ----------------------- Things MrED does: ----------------- o Allows loading and editing of most any ANSI graphics file o Edits and saves the screen in either color ANSI sequences, or straight ASCII (no color codes) o Correctly supports ALL ANSI escape sequences o Does ANSI optimisations while saving the file o Has new line drawing mode (similar to how WordPerfect's) o Has block marking and pasting o Has an easy-to-use key layout for speedy editing o Many routines have been optimised in assembly language, so movement/placement routines are fast o Actually supports most of the bogus ANSI sequences that AnsiMaster produces (why did they make incompatible ansi is beyond me...) :( ******************************************************************************* Introduction: ------------ A bit of history about MrED: A long time ago (back in the days of the C=64), there were (and still are) nifty C-64 color graphics editors. These editors were mostly used by BBS owners to do nice pretty color graphics screens for their BBS's. I always thought these were pretty cool, since one could see "color animations" over their modems. Then, I began in the world of IBM, and discovered that there was something very similar to the C-64's "graphics", namely ANSI graphics. I thought that this was really cool, also (but was still a die-hard commie 64 user... ;-) ) Well, then the Amiga came along -- A computer of amazing capabilities, but was very lacking in BBS capabilities. I noticed some Amiga BBS owners running their BBS on an IBM! Something was missing from the Amiga: good BBS programs. But, as those came along, people wanted ANSI compatibility, so the BBS programmers put it in. Now, here's the dilemna (as I am sure most of you Amiga BBS owners know): How do you edit your ANSI title screens, your ANSI help screens, etc? You go to an IBM, and run a copy of TheDraw. (At least that's what I have done) Again, what's wrong with this picture? A lot. Why should you have to use an IBM to do your BBS screens for an Amiga BBS? Hmmmm..... That's when I wanted to program a good, simple IBM ANSI graphics editor. So, MrED was born. ****************************************************************************** Usage: ------ MrED has been designed for (hopefully) easy usage. If you find something that isn't very easy to use, tell me and I'll try to improve it. As far as I can tell, it is 100% ANSI compatible. I have done many pictures with TheDraw and ported them over, and they all seem to load just fine. MrED even knows about ANSI "animations" where the cursor gets moved around, etc. These even load fine. You can watch the animation, but you can't save anim- ations (yet....) MrED also will do ANSI optimisations for picture saves, similar to how TheDraw does them. (In a few examples I have been working on, the files actually come out SMALLER than what TheDraw spits out!) Basically, you have 4 different functions with MrED: 1) Loading an ANSI/ASCII picture 2) Saving an ASCII picture 3) Saving an ANSI picture (difference explained later) 4) Editing an ANSI/ASCII picture Please note: Since this is an ANSI screen editor, files that are loaded should not be longer than 1 screen (24 lines). Anything past 24 lines will be cut off. You can then edit it however you want, and re-save it as a strict ASCII file again. An ASCII screen may be useful for a non-ANSI menu. For example, you could have a nice color menu that you do, and then save a second copy of it as standard ASCII -- Now you have your ANSI and non-ANSI menu screens -- it's just that the ASCII version doesn't have your ANSI sequences in it, hense no color. To run MrED, just type from your favorite CLI/shell prompt: >MrED1.20 Yup, that's it, just MrED1.20. In making this program, I wanted it to be fully multitaskable, so I make it detatch itself from the current CLI process. Here's the resources MrED needs: - ansi.font and ansi/8, which are included with this distribution. These need to be in your fonts: dir. - diskfont.library, from your workbench disk. - req.library for some of the requesters. As for running MrED from Workbench, you're on your own there. I avoid most GUI's like the bubonic plague, so I couldn't tell you the first thing about it. I would imagine it would run from workbench, and if there is a need, I could come up with some little nifty icon for it, or whatever. Editing with MrED: ------------------ When MrED runs, your screen should look something like this: +------------------------------------------------------+ | # | | | | | | | | | | | | | | | | | | | |(x,y) Text 7x 8x 9x 4x 5x 6x 1x 2x 3x 0x enx | +------------------------------------------------------+ Hmm, after drawing that, I think it needs more explaining that I originally thought. The # is the cursor... In the lower left-hand corner, you will find (x,y). This is the current (x,y) coordinates of the cursor. Possible ranges are x = {0 - 78}, and y = {0 - 23}. The word "Text" appears at the bottom of the screen. This is the current colors of the foreground/background if you were to type a character. The 7x 8x... is the current KeyPad set. The special IBM characters useful in drawing screens (like boxes, fills, etc) are mapped to the numeric keypad. the layout is as follows: 7 8 9 +-- --+-- --+ | | | 4 5 6 | | | +-- --+-- --+ | | | e 1 2 3 n | t | | | | e | +-- --+-- --+ r 0 ------ Again, my drawing leaves the reader a bit bewildered, I'm sure. (It sure confused me when I was drawing it!) Let me try to explain: Look at the keypad for a second. Now, imagine the keypad is the tool with which you will draw boxes, for example. 7 will be the top left corner of the box, and 9 will be the top right corner. 1 will be the bottom left corner, and 3 will be the bottom right corner. (This is what I tried to depict in my diagram above). Now, here's a curve: the 8, 4, 6, and 2 will be "T" pieces. About the only way I can describe this to you is if you were to draw a box like this: +-------------+ "T" \ | | / "T" Piece ----> +-------------+ <---- Piece / | | \ | | +-------------+ They are vertical or horizontal pieces that have a little part sticking off of it. Really, about the only thing I can tell you about that is to examine my diagram, and play around with MrED. You'll see exactly what I am talking about once you try to build a box. Now, there are 2 more pieces to be concerned about: Plain vertical | and plain horizontal -- pieces. Again, just look at your keypad again, and you will see why I selected the keys I did -- Enter will be the vertical part (because it is narrow and tall, like a vertical piece), and 0 is the horizontal bar (because it is wide and short). Whew! Like I said, just play with MrED, and you will see exactly what I am talking about.... ******************************************************************************* NOTE: ----- Remember something important: MrED will never be as fast in movement/ placement of text as a "regular" text editor. The reason for this is very simple: ANSI is 16-colors, therefore 4-bitplanes. (2^4=16) Text editors have little need for color, so they usually stick to 2-bitplanes. (4-color, like workbench) Some of you may already know what the problem is, but for those of you who don't, here it is: Using 3-bitplanes is much MUCH faster than 4-bitplanes. (Hardware-people, turn to all of the non-hardware-people and explain why) And, since I am not a EuroDemo programmer/hacker, I don't feel like doing some hack with the blitter to gain the few possible extra scan lines. It just wouldn't make that much difference, and would tend to become non-OS friendly. (I gave this entire subject much thought in designing 1.05, but discarded the idea after a while) Besides, who wants an editor that kills the operating system, has really cool background music, sine-scroll textscrolls, funky 3-D vectorball effects, and psychodelic solid-vector objects flying around the screen, making you really dizzy in the process? It was Just not appropriate for an editor, IMHO, so I decided against the whole thing... ;-) (I hope you all see humor in there somewhere.) Cursor Movement: ---------------- Cursor keys move the cursor just like you would expect them to. There is another added feature to the cursor keys: Holding down the shift keys will place the cursor at the bounds of the screen. Example: shift Down-Arrow will place the cursor all the way at the bottom, and shift Left-Arrow will place the cursor at the left-most position in the current line. You can also do a "point-n-click" with the mouse -- click the left button anywhere, and the cursor will go there. Insert/Backspace Mode: (from the menu selection) ---------------------- Most normal text exitors would leave you in Insert mode, meaning if you are in the middle of a line of text and type a character, it would automatically shift everything over and insert the char at the current line position. There's a problem with this in text graphics editing. Any of you that have done graphics text editing before will know exactly what I am talking about. It is a pain to type boxes, lines, etc in insert mode since everything gets shifted around. This is why I put a toggle in for the Insert mode. When you select Insert mode from the Modes menu, the word "Insert" will appear at the bottom of the screen, informing you that you are in insert mode. When you select "Insert" from the menu again, it turns it off. Please note: when you are in insert mode, anything at the right side of the screen will get shifted, and will be gone forever. (since the screen is only 80-column) There is another mode very similar to Insert mode, called "Backspace Mode". You probably never thought about this one, but it can be very useful to turn it off in graphics editing. When you type backspace in your favorite text editor, what happens? The character to the left of the cursor gets erased. But, is that all? No. Everything after the cursor gets shifted to the left. This causes a problem very similar to the Insert mode problem, so I put a toggle switch in for it. It is also in the Modes menu, and will display "Backspace" at the bottom of the screen when it is on. "Backspace mode on" means that the backspace will act just like it normally would in a text editor (shift the characters to the left), but with it off, it simply erases the character before the cursor, NOT shifting anything. Experiment with these features, you will see why I allow the user to turn them off... It makes editing quicker which is the whole idea, right? Optimize Mode : ------------- Well, this little bugger DOES do some optimizing, contrary to the responses I have received.... Currently, there are only 3 optimizations that this mode offers, but I decided to leave it in for easy upgrading in the future. So, as of now, it doesn't do a whole heck of a lot. Line Draw Mode : -------------- This feature has been added in release 1.20. For any of you out there that use WordPerfect, this will be a very familiar tool. It allows the user to draw boxes/designs with the arrow keys. How to use: The line drawing mode only allows you to use character sets 1-5 (F5-F9), since these are the only sets that have line drawing characters in them. So, select your desired line pattern (single, double, etc) with the character sets, and begin "outlining" your box with the cursor keys. As you go around corners, MrED will put the appropriate edges, lines, and "t-intersections". I thought this was a handy feature, and allows for quicker editing of boxes around text. Block Move Mode : --------------- Well, it's finally here! I'm still improving the way it works, but this release is functional. There may be some of you who are looking for the Deluxe-Paint-style of block cuts and moves, and I hate to dissappoint you, but it isn't there. (I am talking about the way you drag the mouse over the desired block) I'm thinking about how to do that right now, and should have it done by V1.30. Instead, I took the easier approach to a block mark, and all of you IBM'ers should be comfortable with it, although it will seem awkward for the Amigoids... Here's how it works: Let's say you have a box of text that you want to go pasting all over the screen or whatever. Place the cursor at the top left corner of the box and press Right Amiga M (or select it from the menu). This will leave the cursor at that spot. Now, move the cursor to the bottom right corner of the block that you wish to mark, and again press Right Amiga M (or select it from the menu). Note that you can mark a block up to the same size of the whole screen. This will copy the block, and put it into it's own window. You can then use your arrow keys to move the block around the screen, or if you like, drag it with the mouse. After you stop dragging it, you will notice that the computer will automatically "snap" it to the correct location. Now, if you want to quit without pasting the block, just hit the close-window gadget on the block window, or select QUIT from the block menu (or type right amiga Q). But, if you wish to paste it where it currently is, type Right Amiga P, or select "Paste" from the menu. Now, you can continue moving it around the screen, pasting it all over the place. Or, if you like, type Right Amiga C to "Paste Once" -- This will paste the block where it currently is, and exit the block mode. Here's a quick reference for the Block Move feaure: -------------------------------------------------- 1) Place cursor on top left corner of block 2) Right Amiga M (or menu) to mark 3) Place cursor on bottom right corner of block 4) Right Amiga M (or menu) to mark During Block Move, Special Keys: ------------------------------- arrow keys - move window A-P - Paste window to current location A-C - Paste window once, then exit Block Move A-Q - Quit Block Move A few other functions are as follows:(in Edits menu) ---------------------------------------------------- Kill line - This will delete the current line under the cursor, shifting the lines after it up. Insert line - This will insert a blank line at the current cursor postition, shifting everything 1 line down. Get Background - "Loads" the background color of the char under the cursor to the current text. Get Foreground - Just like above, but for foreground. Get both F/Bground - gets both background and foreground. Put Background - Think of this as a colorizing feature. Let's say you did some design, and don't like the color. You can use this feature to change JUST the background attribute. (try it, it's fun!) Put Foreground - same as above, but for foreground. Put Both F/GGround - copies both the fore- and background colors of the sample "current text" to location under cursor. Special Keys: ------------- Here's a listing of the keybindings for MrED: arrow keys - Move the cursor around the screen bkspace - Deletes the char to the left of the cursor (see above about backspace mode) delete - Deletes the char to the right of the cursor, does a shift of the chars after that character to the left KeyPad - See above -- Use special character sets ESC - Clears the screen (prompts first) F1 - Current foreground color down (decrement color) F2 - Current foreground color up (increment color) F3 - Current background color down (decrement color) F4 - Current background color up (increment color) F5 - F10 - Change the current bindings for the keypad - It selects the first 6 possible special character sets to be bound to the keypad, and displays the binding at the bottom of the screen. (^ denotes holding down the cntrl key, and pressing the following key) ^K - Kill (delete) the current line under the cursor ^N - iNsert a blank line at the current cursor position ^F - Get the foreground color from under the cursor position, make that the current foreground color ^B - Get the background color from under the cursor position, make that the current background color ^C - Get the foreground AND background colors from the current cursor position, make those the current foreground/background colors R-Amiga: -------- L - Load a file S - Save an ANSI file A - Save an ASCII file C - Clear Screen Q - Quit MrED N - Toggle insert mode B - Toggle backspace mode O - Toggle Optimize mode Z - Toggle Line Drawing mode D - Change cursor direction M - Mark Block F1-F10 - Selects charsets 7-16 for COMPLETE and total ansi editing. (SEE URGENT AND EXTREMELY IMPORTANT NOTE ABOUT F1 and F2 ELSEWHERE IN THIS DOCUMENT!!) That's about it, for now at least. As I have said before, the editor is very intuitive, so with a little use, you will be whipping out sharp ANSI screens for your BBS, or whatever. ******************************************************************************* HISTORY: -------- - V1.00a (ALPHA) First version, ANSI support - V1.00b Fixed a major bug with the recursion of the ansi decoding routine, fixed several other minor bugs - V1.01 Incorporated every known ANSI sequence ('cept delete, still doing this one), including the bogus AnsiMaster sequences (for compatibility if nothing else ;-) ) - V1.02 Corrected errors in ANSI output -- namely, a bug with the way the code was displaying bright/dark colors. Also, many many bug fixes - V1.03 Added, tweeked, and just basically screwed up the code. Never released since I noticed many bugs with my new routines... :-( - V1.04 Fixed up everything messed up with 1.03, added many new things like right-amiga key implementation, new file requestor, optimisation option, new save routines... etc etc. - V1.05 Fixed an intermittant bug that went unnoticed in 1.04 - had to do with the shift key. Made a better Ansi.font, and incorporated EVERY (I mean EVERY) ansi character into the editor, with the exception of 3. (see note somewhere about this). Now, instead of just boxes, you have access to characters 0-255. Added new requesters instead of "cheating" and using the slow, clunky system requesters. Added a cursor direction control requester. Usually when a key is typed, the cursor goes to the right. Now, you can control this. (thanks, Graeme, for the suggestion!) Added the "put color" option. Allows one to "colorize" a picture. I.e. change the colors already on the screen. Improved the save/optimize routines. - V1.10 Cleaned up the menu line Added Block Move/Paste - V1.20 Added another file optimization Streamlined key entry Added Line Draw Mode Fixed a bug with the requesters Improved the Block Move feature, and fixed a "glitch" with the pasting routine ******************************************************************************* ACKNOWLEDGEMENTS: ----------------- Special thanks must go out to Jean-Michel Forgeas, for helping me with my font-loading problems, and for contributing some code demonstrating how to make a font resident. Also, thanks go to Chris Wermuth (Mach II) for helping me get started in Amiga assembly a few years ago (I did some optimising in asm, Chris! In case you were wondering... ;-) , and to all the people who helped in the beta-testing of MrED. (Especially John Dutka and Graeme Weir for pointing out some bugs, and for suggesting improvements...) ******************************************************************************* Future Intentions: ------------------ - Animation output - Animation editing - Multi-screen editing - Look out TheDraw! (well, maybe not, but still.... just a goal!) ******************************************************************************* ******************************************************************************* Please! Write me! Tell me what you like/hate about MrED! I'll try & fix it! If you want to contact me, you can reach me at: internet: faheyr@silver.ucs.indiana.edu faheyr@cssun.cs.indiana.edu faheyr@rose.ucs.indiana.edu, amber, jade, or gold if rose is down. bitnet: faheyr@iugold, iujade, iurose, or iuamber.BITNET Snail Mail: (permanent) - during the summer (current) Robert V. Fahey Robert V. Fahey 903 W. Kensington Dr. 3209 E. 10th St. Apt V6 Peoria, Il. 61614 Bloomington, In. 47408 (309) 691-3833 (812) 330-8417 Please! Drop me a line! I like getting mail.... ******************************************************************************* (C) 1991, R. Fahey, all rights reserved. Please respect this notice.