Plan for cleanup and control of fades

From OHRRPGCE-Wiki
Revision as of 10:35, 31 August 2011 by Bob the Hamster (talk | contribs) (start of a plan)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Some fading happens automatically, such as when you use doors to other maps, or when you enter and exit battle. It would be very nice if the game author could be given control over whether or not these automatic fades happen.

This is also a good opportunity to clean up the rather messy code for triggering fades.

  • Identify all the places where fades happen automatically, and make a list of them.
  • Clean up the needf variable. needf means need-fade-in and it is uses to trigger fades back in after a fade out.
    • needf is not a global. Maybe it should be a member of GameState?
    • needf is sometimes used as a countdown to zero, or sometimes as a simple 0/1 flag.
      • The countdown may be very important in some cases, to allow the screen to be repainted before the fade... in other places it might be superstition.
  • There should be a set of options (maybe bitsets in .gen?) to disable automatic fading