+-----------------------------------------------------------------------------+ | M r E D ! | | V1.04 | | | | (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 $5 (U.S. Currency, or equivalent), and will get you free upgrades as they are completed. I am only asking $5, 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. ****************************************************************************** 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 MANY ANSI optimisations while saving the file o Has an easy-to-use key layout for speedy editing o Most routines have been optimised in assembly language, so movement/placement routines are fast o Actually supports almost ALL of the BOGUS ANSI sequences that AnsiMaster produces (why did they make incompatible ansi is beyond me...) :( Things MrED doesn't do (in this version): ------------------------ o Animation editing/saving routines o Block copy/cut/paste (Definitely by V1.10, I promise!) o Unimited picture editing (edits only a full screen - 24 lines) o Multi-screen editing at the same time NOTE: All of the things that are in the "things MrED doesn't have" list WILL be impemented in later releases. The next release WILL contain block moves (I am coding it right now), and Multi-screen editing. ******************************************************************************* 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 many 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: >MrED! Yup, that's it, just MrED!. In making this program, I wanted it to be fully multitaskable, so I make it detatch itself from the current CLI process. (BTW, MrED isn't a CPU-cycle sucker, and when it isn't being used, it takes 0 cycles away from other processes). 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. - graphics.library. This had better be found by MrED.... ;-) - 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. 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 - 79}, 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: ----- As I said before, many of the routines have been optimised in assembly, so to allow for REALLY fast editing, set your keyrepeat in Preferences to fairly fast. MrED can handle speeds almost up to the maximum (and that will be fixed also in the next version...) 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? 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 - Copies 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. 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 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 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. ******************************************************************************* 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 to C. Heath of Microsmiths, Inc., for the file requestor. (I did some modifications on the source, though). 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: ------------------ - Block Cut/Copy/Paste editing - 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) (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.