Palette fade: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 15:
Before each iteration, there is a delay. The delay starts at 64 frames, and this value is decremented between each iteration. The delay will never go below 1 frame.
 
To update a color, compare each of the red, green, and blue components of the current color and the target color. If the current value is less than the target value, increment it, if it is greater, decrement it, and if the values are the same, do not alter it. This process means that the number of iterations required to complete the fade depends on the largest difference between starting and target color components. See [[#Timing dataData|timing data]] for details.
 
== Additional data format ==
Line 23:
{| class="wikitable"
|-
! Offset !! Length !! [[Data types|Type]] !! Description
|-
| 0x00 || 4 || pointer32 || Pointer to target background palette
Line 36:
{| class="wikitable"
|-
! Address !! Length !! [[Data types|Type]] !! Description
|-
| $00 || 4 || pointer32 || Pointer to [[#Additional data format|additional data]]
Line 45:
{| class="wikitable"
|-
! Address !! Length !! [[Data types|Type]] !! Description
|-
| $0A || 2 || boolean || Any palette has been updated in current 8-palette cycle
Line 199:
 
[[Category:Boss monster]]
[[Category:Monster]]
[[Category:Entity]]