- This wiki is out of date, use the continuation of this wiki instead
Restore modes
From FenixWiki
Revision as of 11:57, 11 July 2008 (edit) Sandman (Talk | contribs) ← Previous diff |
Revision as of 11:57, 11 July 2008 (edit) (undo) Sandman (Talk | contribs) m (→Notes) Next diff → |
||
Line 17: | Line 17: | ||
== Notes == | == Notes == | ||
It is clear that completely restoring the background every frame is more expensive then updating only parts of it. However, detecting what parts need updating is no small thing either. So cost-wise both have their situations in which they are good. | It is clear that completely restoring the background every frame is more expensive then updating only parts of it. However, detecting what parts need updating is no small thing either. So cost-wise both have their situations in which they are good. | ||
- | PARTIAL_RESTORE is useful if there is relatively not much changing to the background. COMPLETE_RESTORE is useful if many tiny parts of the background need restoration, like in the case of screen-wide partially transparent scrolls. | + | |
+ | PARTIAL_RESTORE is useful if there is relatively not much changing to the background. COMPLETE_RESTORE is useful if many tiny parts of the background need restoration, like in the case of screen-wide partially transparent scrolls. | ||
+ | |||
Be certain [[dump_type]] is compatible with the dump_type set, because some combinations can cause probably unwanted effects. | Be certain [[dump_type]] is compatible with the dump_type set, because some combinations can cause probably unwanted effects. | ||
Revision as of 11:57, 11 July 2008
Contents |
Definition
Restore modes are used to define the type of restoration, needed to be applied to the screen background, by assigning them to the global variable restore_type. This influences if and how the background is restored after each frame.
List
Constant | - Value | - Description |
NO_RESTORE | - -1 | - The background won't be restored (i.e. redrawn). |
PARTIAL_RESTORE | - 0 | - The background will be restored in areas where graphics have been painted or text written (default). |
COMPLETE_RESTORE | - 1 | - The background will be completely restored. |
Notes
It is clear that completely restoring the background every frame is more expensive then updating only parts of it. However, detecting what parts need updating is no small thing either. So cost-wise both have their situations in which they are good.
PARTIAL_RESTORE is useful if there is relatively not much changing to the background. COMPLETE_RESTORE is useful if many tiny parts of the background need restoration, like in the case of screen-wide partially transparent scrolls.
Be certain dump_type is compatible with the dump_type set, because some combinations can cause probably unwanted effects.