home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / ClutFade 1.3 / clut_fade README next >
Encoding:
Text File  |  1995-12-07  |  9.3 KB  |  103 lines  |  [TEXT/ttxt]

  1. Clut Fade 1.3 Example Code -- Release Notes
  2. Notes written by Mark Womack
  3.  
  4. This is a demo of screen fading operations which can be used to make your games more professional looking.  Not only does the clut_fade library let you fade to and from black, but it also provides routines to fade to and from a specific color or a specific clut.  It also provides some control over which monitors are faded.
  5.  
  6. fade_to_black function written by Jonas Englund, modified by Mark Womack for multiple monitors.  
  7. fade_to_clut function written by Macneil Shonle.
  8.  
  9. Clut Fade 1.0 was posted by Ken Long (AOL: KenLong, Internet: kenlong@aol.com).  
  10. Release notes for earlier versions are also included in this file.
  11.  
  12. Disclaimer
  13. This software is considered Public Domain. You are free to use it in any manner you wish. You are free to upload it to your favorite online service, but you must post it with the accompanying readme and description files. If you use or appreciate it, please let us know!! We all love to get email. See the addresses below.
  14. This software is offered 'as is'. The authors are not responsible for any damages caused by bugs or defects that might be lurking. But if it blows up your monitor, please let us know. If you find any bugs, problems, enhancements, please contact us.
  15.  
  16. What's New?
  17. Not much has changed.  Just some upgrades to MetroWerks and a couple changes in Fade Tester.
  18.  
  19. • Upgraded to MetroWerks 6.0 for both the clut_fade library and the FadeTester demo.  However, THINK C library and projects are still included.
  20. • FadeTester now uses "Jim's CDEFs v1.50" (written by Jim Stout) for the controls in the dialog.  Also added a control for the fade speed.  Jim's CDEFs is very cool.
  21.  
  22. Other Items of Interest
  23. • Some time back someone reported a bug with the clut_fade library.  Something to do with the wrong colors in the clut.  Neither Mac nor myself can remember exactly the bug or what the fix was and we don't think it made it into a version.  So, if you encounter a similar bug or you're that person reading this, please send us some email and let us know so we can fix it.
  24. • Kenneth Worley has created some C++ classes that are based on the clut_fade routines.  Sounds like he has added some other neat enhancements.  If you are interested you can reach him at:  AOL: KNEworley, Internet: KNEworley@aol.com.
  25. • Ingemar Ragnemalm has created a Pascal native version of the clut_fade 1.0 version.  The package is available on AOL or you can contact Ingemar at: <ingemar@lysator.liu.se>.
  26.  
  27. WE WANT TO HEAR FROM YOU!!!!
  28. If there something you want this library to do, or you have a modification you'd like to share with the world, or you find a bug, or just think clut_fade is cool please contact us at the following addresses:
  29. Mark Womack - AOL: MarkWomack, Internet: markwomack@aol.com
  30. Macneil Shonle - AOL: MacneilS, Internet: macneils@aol.com
  31.  
  32. Mark will be keeping a mailing list for sending updates in the future, so if you'd like to keep up to date, drop him a line and get added.
  33.  
  34. ----------------------------------------------------------------------------------------------------------------------------------------
  35. Clut Fade 1.2 Example Code -- Release Notes
  36. Notes written by Mark Womack
  37.  
  38. What's New?
  39. The biggest addition to the Clut Fade library is the fade_to_clut function written by Macneil Shonle.  At the end of the 1.1 release notes I mentioned that Ken Long wanted to be able to fade to other colors besides black.  Well, Macneil sent me this cool little piece of code that does just that and more.  It actually takes a new clut as a parameter, so you can fade to an entirely different color set.  This has the potential for some really neat effects, only a couple of which are explored in the Fade Tester application.  Take a look at the code, it is very cool.
  40.  
  41. Other changes are:
  42. • Created a fade_to_color() function which in basically a wrapper for the fade_to_clut() function.  If you want to fade to a single color, not an entire clut, then use this routine.  It creates a single color clut on the fly so you don’t have to load it from a ‘clut’ resource.  Examples of both are in the Fade Tester application.
  43. • I tried to make the library 'Pascal friendly' by making the public functions pascal compatible.  I created a .lib file that is compatible with Think Pascal and Chris Sollitto was kind enough to create and test a Pascal interface file.  You can find both in 'For Pascal' folder.
  44. • I fixed a really bad bug with monitors set or limited to 16 colors.  The fade routines were assuming that all the monitors were set to 256 colors.  So, when a monitor was set to 16 colors it was going out and changing the memory locations for 240 colors that did not exist.  Needless to say, this corrupted the system heap and caused an almost immediate system crash.  I fixed it by limiting the loops to the size of the devices color table.
  45. • Even though I can't prove it, I think the fade_to_black function was only fading 255 instead of 256 color indices.  But since the last color in the system color table is black, no one noticed.
  46. • I tried to clean up the code a little bit.  Most of it came about from the bug fixes and integrating Macneil's code.
  47. • The Fade Tester application has been upgraded to include a demo of Macneil's function and contains some useful examples of its use.  It basically loads some clut resources and fades to them.  There is also an example of manipulating an existing color table and fading to it.  These examples probably only just begin to tap the power of this function.  If you find a cool use for it, both Macneil and myself would love to hear from you.
  48.  
  49. Notes
  50. • Knowing the size of your color tables in very important.  For the fade_to_clut() routine, you don't want to send a 256 color table to a 16 color device.  You will hang, or at least I did.  Either make sure the device is set to the depth of your color tables or limit your color tables to the depth of the device.  There is an example of limiting your color tables in the Fade Tester application.
  51. • The Clut Fade routines are limited to 256 color max.  If your device is set to thousands or millions of colors, it probably won't work well.
  52.  
  53. The Future
  54. • Integrating the fade_to_black and fade_to_clut into one routine with multiple monitor support.  After all, black is just another color.
  55. • Macneil sent me a preliminary version of some code that performs a picture-to-picture fade.  Not some goofy pixel fade like in HyperCard, but a clut kind of fade.  When he feels it is ready, hopefully he'll integrate it.  Let him know if you would find it useful.
  56.  
  57. ----------------------------------------------------------------------------------------------------------------------------------------
  58. Clut-Fade 1.1 Example Code -- Release Notes
  59. Notes written by Mark Womack
  60.  
  61. So, what is new?  The original code only performed the fade on the main screen.  It was a great jumping off point for what I wanted in my game code. Sometimes I'd like to fade all of the monitors, or maybe all the monitors except the main monitor.
  62.  
  63. For example, I see the following steps happening:
  64.  
  65. 1. User launches game and all monitors fade to black.
  66. 2. The main monitor fades to the first game screen (all other screens are still black).
  67. 3. The main monitor fades between various screens in the game.
  68. 4. User quits game, and all the monitors fade back to original contents.
  69.  
  70. With this in mind, I modified the code to accept a new flag parameter to fade the main monitor only, all the monitors, or all the monitors except the main monitor.  Inside Jonas' original code I added some loops that work with each gDevice connected.  I also removed almost all the globals that were previously used.  My modifications would have significantly grown the global data, so I made it all local to the fade routine.  The 1.0 code was very well written and made it a snap to make my modifications.
  71.  
  72. The clut_fade routines are now in their own project that is used by the Fade Tester 1.0 project to demonstrate the features.
  73.  
  74. Ken Long suggested a modification where you can fade to other colors besides black.  I didn't get a chance to look into it.  Maybe someone out there can take it to that next step.
  75.  
  76. ----------------------------------------------------------------------------------------------------------------------------------------
  77. Clut-Fade 1.0 Example Code -- Release Notes
  78. Notes written by Ken Long
  79.  
  80. This is a demo of a fade to black operation, which can be used to make your
  81. games more professional looking.
  82.  
  83. Someone on America Online mentioned that Andrew Welch had posted some fade
  84. routines in a message.  I went to track them down.  I found them and tried to
  85. get them to run in a shell made from Bullseye, without success.  So I e-mailed
  86. Andrew back and forth to see if I could get it operational.  But that was a
  87. time consuming process and I decided to stop bothering him.
  88.  
  89. Then one day I ask Jonas Englund if I could have a .c file for his content-
  90. click text scroll.  I told him I'd trade some fader code for it.  The code I
  91. sent was not the clut fader, but I included it, and said it would be a great
  92. demo.  
  93.  
  94. He did me one better!  He sent me a demo project of the scroll diddleybob, and
  95. sent me the clut_fade 1.0 demo.  I asked him if it was okay to post it and
  96. he said yes.
  97.  
  98. So I'm posting it along with the fader source from Andrew, which got this all
  99. started in the first place.
  100.  
  101. Jonas England wrote IconArtist, amoung other things.
  102.  
  103. Andrew Welch wrote...  Well, you know.