Anonymous

Changes

From Final Fantasy Inside

FF7/Field/Script/Opcodes/25 NFADE

2,131 bytes added, 11:27, 28 August 2020
Update some fade types

* Opcode: '''0x6B'''
* Short name: '''FADE'''
* Long name: Fade

==== Memory layout ====
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! width="40" | 0x6B
! width="50" | ''B1 / B2''
! width="50" | ''0 / B3''
! width="40" | ''T''
! width="40" | ''R''
! width="40" | ''G''
! width="40" | ''B''
! width="40" | ''S''
! width="40" | ''unused''
|}

==== 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''' ''T'': Type of fade; see table.
* '''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''' ''unused'': Unused

==== 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).

==== Fade Types ====

Note: Not 100% accurate, but based on PC

{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! style="background:rgb(204,204,204)" width="40" | ID
! style="background:rgb(204,204,204)" width="250" | Fade Type
|-
| align="center" | 0
| Instantly show the screen
|-
| align="center" | 11
| Fade color to black
|-
| align="center" | 12
| Black to colour with subtractive blending, unless 255,255,255, in which case fade screen to black
There are probably multiple layers of blending here, and therefore multiple layers to add
|}
50
edits