Menu

zgl_fx.pas

Serge

Rus: данный модуль связан с выводом текстур/спрайтов в модулях: zgl_grid_2d, zgl_particles_2d, zgl_sprite_2d и zgl_tiles_2d. В некоторых из перечисленных модулей, определённый функционал данного модуля, может не использоваться.
Eng: this module is associated with the output of textures/sprites in the modules: zgl_grid_2d, zgl_particles_2d, zgl_sprite_2d and zgl_tiles_2d. In some of the listed modules, certain functionality of this module may not be used.


Rus: константы для установки режима блендинга. Устанавливаются в "fx_SetBlendMode".
Eng: constants for setting the blending mode. Set to "fx_SetBlendMode".

FX_BLEND_NORMAL
Rus: обычный режим смешивания.
Eng: normal mixing mode.

FX_BLEND_ADD
Rus: аддитивный режим смешивания.
Eng: additive mixing mode.

FX_BLEND_BLACK
Rus: чем темнее участок изображения тем он прозрачнее.
Eng: the darker the area of the image, the more transparent it is.

FX_BLEND_WHITE
Rus: чем светлее участок изображения тем он прозрачнее.
Eng: the lighter the area of the image, the more transparent it is.

FX_BLEND_MASK
Rus: цвет накладываемой текстуры.
Eng: color of the applied texture.


Rus: константы для установки режима смешивания цвета. Устанавиваются в "fx_SetColorMode".
Eng: constants for setting the color mixing mode. Set to "fx_SetColorMode".

FX_COLOR_MIX
Rus: обычный режим смешивания цвета.
Eng: normal color mixing mode.

FX_COLOR_SET
Rus: заданный режим смешивания цвета.
Eng: specified color mixing mode.


Rus: константы для вывода текстур/спрайтов.
Eng: constants for displaying textures/sprites.

FX2D_FLIPX
Rus: отражение по X.
Eng: reflection on X.

FX2D_FLIPY
Rus: отражение по Y.
Eng: reflection on Y.

FX2D_VCA
Rus: указание использовать заданные значения цвета для каждой текстуры отдельно. Необходимые цвета устанавливается с помощью "fx2d_SetVCA".
Eng: an instruction to use the specified color values for each texture separately. The required colors are set using "fx2d_SetVCA".

FX2D_VCHANGE
Rus: флаг указывающий на использование смещения левого, правого, верхнего, нижнего краёв. Можно задавать от одного до четырёх параметров сразу.
Eng: a flag indicating the use of left, right, top, bottom edge offsets. You can set from one to four parameters at once.

FX2D_SCALE
Rus: флаг указывающий на использование масштабирования.
Eng: flag indicating the use of scaling.

FX2D_ROTATION_PIVOT
Rus: флаг указывающий что используется устанавливаемая точка вращения.
Eng: a flag indicating that a set rotation point is used.

FX_BLEND
Rus: указание для использования режима Blend.
Eng: instructions for using Blend mode.

FX_COLOR
Rus: указание для использования смешивания цвета.
Eng: indication for using color mixing.


procedure fx_SetBlendMode(Mode: Byte; SeparateAlpha: Boolean = TRUE);
Rus: установить режим смешивания. Если SeparateAlpha = true, то альфа-канал будет обработан отдельно.
Используемые флаги (Mode): FX_BLEND_NORMAL, FX_BLEND_ADD, FX_BLEND_MASK, FX_BLEND_BLACK, FX_BLEND_WHITE
Eng: set blending mode. If SeparateAlpha = true, then the alpha channel will be processed separately.
Flags used (Mode): FX_BLEND_NORMAL, FX_BLEND_ADD, FX_BLEND_MASK, FX_BLEND_BLACK, FX_BLEND_WHITE


procedure fx_SetColorMode(Mode: Byte);
Rus: установить режим смешивания цвета.
Используемые флаги (Mode): FX_COLOR_MIX, FX_COLOR_SET.
Eng: set color mixing mode.
Flags used (Mode): FX_COLOR_MIX, FX_COLOR_SET.


procedure fx_SetColorMask(R, G, B, Alpha: Boolean);
Rus: установить/снять запрет на вывод определённого цвета.
При установке одного или нескольких флагов (R, G, B или Alpha) получим отображение заданных цветов. Если для какого-то флага будет задано False, тот цвет (альфа канал) отображаться не будет.
Eng: set/remove a ban on displaying a certain color.
When you set one or more flags (R, G, B or Alpha), we get the display of the specified colors. If a flag is set to False, that color (alpha channel) will not be displayed.


procedure fx2d_SetColor(Color: LongWord);
Rus: установка корректировочного цвета для вывода текстур/спрайтов в перечисленных выше модулях. Значение должно быть в формате RRGGBBAA (LongWord).
Eng: setting an adjustment color for the output of textures/sprites in the modules listed above. The value must be in RRGGBBAA (LongWord) format.


procedure fx2d_SetVCA(c1, c2, c3, c4: LongWord; a1, a2, a3, a4: Byte);
Rus: установить значения цвета для каждого угла отдельно. И так же для каждого угла прозрачность.
Значения c1, c2, c3, c4 должны быть в формате RRGGBB.
Eng: set color values for each corner separately. And also for each corner transparency.
The values c1, c2, c3, c4 must be in the RRGGBB format.


procedure fx2d_SetVertexes(xLeft, yUp, xRight, yDown: Single);
Rus: установка смещений для текстуры/спрайта. Для флага FX2D_VCHANGE. Помним, отсчёт по Y идёт сверху вниз, а не наоборот, поэтому чтоб поднять надо уменьшить координату Y, а чтоб опустить - увеличить. Работает только для заданных параллелограммов.
xLeft - смещаем левый край спрайта, xRight - смещаем правый край спрайта, xUp - смещаем верхний край спрайта, xDown - смещаем нижний край спрайта.
Eng: setting offsets for a texture/sprite. For the FX2D_VCHANGE flag. Remember, the Y counting goes from top to bottom, and not vice versa, so to raise it you need to decrease the Y coordinate, and to lower it you need to increase it. Only works for given parallelograms.
xLeft - shift the left edge of the sprite, xRight - shift the right edge of the sprite, xUp - shift the top edge of the sprite, xDown - shift the bottom edge sprite.


procedure fx2d_SetScale(scaleX, scaleY: Single);
Rus: установка шкалы размерности текстуры/спрайта. Для флага FX2D_SCALE.
Eng: setting the texture/sprite size scale. For the FX2D_SCALE flag.


procedure fx2d_SetRotatingPivot(X, Y: Single);
Rus: установка точки вращения. Для флага FX2D_ROTATION_PIVOT.
Eng: setting the pivot point. For the FX2D_ROTATION_PIVOT flag.