home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Simple Slideshow / clut_fade 1.2 ƒ / _README_ next >
Encoding:
Text File  |  1994-10-31  |  7.6 KB  |  93 lines  |  [TEXT/ttxt]

  1. Clut Fade 1.2 Example Code -- Release Notes
  2.  
  3. This is a demo of screen fading operations which can be used to make your
  4. games more professional looking.
  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. ----------
  14. 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.
  15. 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.
  16.  
  17. What's New?
  18. -----------
  19. 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.
  20.  
  21. Other changes are:
  22. • 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.
  23. • I tried to make the library 'Pascal friendly' by making the public functions pascal compatible.  I don't know if more needs to be done.  If those of you that use Pascal could give me some feedback (maybe even a compatible include file!) I will be happy to incorporate it.
  24. • 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.
  25. • 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.
  26. • I tried to clean up the code a little bit.  Most of it came about from the bug fixes and integrating Macneil's code.
  27. • 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.
  28.  
  29. Notes
  30. -----
  31. • 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.
  32. • 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.
  33.  
  34. The Future
  35. ----------
  36. • Integrating the fade_to_black and fade_to_clut into one routine with multiple monitor support.  After all, black is just another color.
  37. • 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.
  38.  
  39. WE WANT TO HEAR FROM YOU!!!!
  40. ---------------------------
  41. If there something you want this library to do, find a bug, think it is cool, or you want to encourage Macneil to integrate the picture-to-picture fading, please contact us at the following addresses:
  42. Mark Womack - AOL: MarkWomack, Internet: markwomack@aol.com
  43. Macneil Shonle - AOL: MacneilS, Internet: macneils@aol.com (he likes to get email!)
  44.  
  45. -----------------------------------------------------------------------------
  46. Clut-Fade 1.1 Example Code -- Release Notes
  47.  
  48. 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.
  49.  
  50. For example, I see the following steps happening:
  51.  
  52. 1. User launches game and all monitors fade to black.
  53. 2. The main monitor fades to the first game screen (all other screens are still black).
  54. 3. The main monitor fades between various screens in the game.
  55. 4. User quits game, and all the monitors fade back to original contents.
  56.  
  57. 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.
  58.  
  59. The clut_fade routines are now in their own project that is used by the Fade Tester 1.0 project to demonstrate the features.
  60.  
  61. 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.
  62.  
  63. If you like it, make cool modifications, find any bugs or problems I'd really like to hear from you.  Please feel free to contact me at the above email addresses.
  64.  
  65. -----------------------------------------------------------------------------
  66. Clut-Fade 1.0 Example Code -- Release Notes
  67.  
  68. This is a demo of a fade to black operation, which can be used to make your
  69. games more professional looking.
  70.  
  71. Someone on America Online mentioned that Andrew Welch had posted some fade
  72. routines in a message.  I went to track them down.  I found them and tried to
  73. get them to run in a shell made from Bullseye, without success.  So I e-mailed
  74. Andrew back and forth to see if I could get it operational.  But that was a
  75. time consuming process and I decided to stop bothering him.
  76.  
  77. Then one day I ask Jonas Englund if I could have a .c file for his content-
  78. click text scroll.  I told him I'd trade some fader code for it.  The code I
  79. sent was not the clut fader, but I included it, and said it would be a great
  80. demo.  
  81.  
  82. He did me one better!  He sent me a demo project of the scroll diddleybob, and
  83. sent me the clut_fade 1.0 demo.  I asked him if it was okay to post it and
  84. he said yes.
  85.  
  86. So I'm posting it along with the fader source from Andrew, which got this all
  87. started in the first place.
  88.  
  89. Jonas England wrote IconArtist, amoung other things.
  90.  
  91. Andrew Welch wrote...  Well, you know.
  92.  
  93. I wrote this text file.  I'm Ken Long.