FF7/Field/Script/Opcodes/6B FADE

From Final Fantasy Inside
< FF7‎ | Field‎ | Script‎ | Opcodes
Revision as of 11:21, 28 August 2020 by Dangarfield (talk | contribs) (Updated some fade case descriptions)
Jump to navigation Jump to search
  • Opcode: 0x6B
  • Short name: FADE
  • Long name: Fade

Memory layout

0x6B B1 / B2 0 / B3 R G B S T A

Arguments

  • const Bit[4] B1: Bank to retrieve R, or zero if R is given as a literal value.
  • const Bit[4] B2: Bank to retrieve G, or zero if G is given as a literal value.
  • const Bit[4] 0: Zero.
  • const Bit[4] B3: Bank to retrieve B, or zero if B is given as a literal value.
  • const UByte R: Red component value, or address of red value if B1 is non-zero.
  • const UByte G: Green component value, or address of green value if B2 is non-zero.
  • const UByte B: Blue component value, or address of blue value if B3 is non-zero.
  • const UByte S: Speed of fade. Larger numbers indicate faster fades.
  • const UByte T: Type of fade; see table.
  • const UByte A: Adjusts the speed of the fade, based on fade in/out.

Description

Fades the screen to the colour specified, either as literal values or values from memory, using the type of fade specified by T.

The speed of the fade is specified by S, but can also be adjusted based on the type of fade. If the fade type is a fade out (to the colour given), the adjustment ranges from a value of zero (fades at speed S), and a value of 0xFF (instant fade). If the fade type is a fade back (from fade colour back to the normal screen), these are reversed, and zero indicates an instant return, whilst 0xFF fades back at speed S.

Fade Types

Note: Not 100% accurate, but based on PC

ID Fade Type
1 Color to screen (alpha 1 -> 0) with subtractive blending, colors are inverse x3 - (3 * 255-c)
2 Screen to colour fadeIn (alpha 0 -> 1) with subtractive blending, colors are inverse x3
3 There are none of these in the PC fields... But previously mentioned, colour fade to screen
4 Show black (alpha = 1) instant
5 Colour to screen fadeout (alpha 1 -> 0) with additive blending
6 en to colour fadeIn (alpha 0 -> 1) with additive blending
7 Haven't worked this out yet. trackin, shmei, script 1
8 Screen to colour fadeIn (alpha 0 -> 1) with multiply blending
9 Screen to color (alpha = 1) instant with normal blending
10 Screen to colour fadeIn (alpha 0 -> 1) with additive blending

Need to look at this more, looks like an additional layer ontop of the current fade layer