jjLAYERWAVE class no handles JJ2+

Properties of the wave effect of a layer, see jjLAYER::wave

The values are shared with the other texture styles of the same layer, see jjLAYERWARPHORIZON. The wavelengths and the speed are stored in the red, green and blue of the fade color.

Properties

float amplitudeX
How far the waves shift the rows of the texture horizontally
float amplitudeY
How far the waves shift the columns of the texture vertically
bool distortionAngle C++
Whether the movement of the waves is turned by 90 degrees, false by default
uint8 wavelengthX
The wavelength of the waves that shift the rows
uint8 wavelengthY
The wavelength of the waves that shift the columns
int8 waveSpeed
How fast the waves move along the texture

Property documentation

float jjLAYERWAVE::amplitudeX

How far the waves shift the rows of the texture horizontally

In units of 128 pixels, 0.5 by default.

float jjLAYERWAVE::amplitudeY

How far the waves shift the columns of the texture vertically

In units of 128 pixels, 0.5 by default.

uint8 jjLAYERWAVE::wavelengthX

The wavelength of the waves that shift the rows

The wave repeats every wavelengthX + 1 rows, values such as 255 that are one less than a power of two work best.

uint8 jjLAYERWAVE::wavelengthY

The wavelength of the waves that shift the columns

The wave repeats every wavelengthY + 1 columns, see wavelengthX.

int8 jjLAYERWAVE::waveSpeed

How fast the waves move along the texture

Independent of the speeds of the layer: each 70th of a second, the waves move by 1/1024 of their period times this value. The sign, together with distortionAngle, decides the direction.