SPRITE namespace JJ2+

Sprite drawing modes and flips

Enums

enum Direction { FLIPNONE = 0, FLIPH, FLIPV = 64, FLIPHV } JJ2+
How a sprite is flipped, used as the direction of drawing functions
enum Mode { NORMAL = 0, TRANSLUCENT = 1, TINTED = 2 partially supported, GEM = 5 partially supported, INVISIBLE = 10 partially supported, SINGLECOLOR = 11, RESIZED = 12, NEONGLOW = 15 partially supported, FROZEN = 16 partially supported, PLAYER = 17 partially supported, PALSHIFT = 18 partially supported, SHADOW = 20, SINGLEHUE = 21 partially supported, BRIGHTNESS = 22 partially supported, TRANSLUCENTCOLOR = 23 partially supported, TRANSLUCENTPLAYER = 24 partially supported, TRANSLUCENTPALSHIFT = 25 partially supported, TRANSLUCENTSINGLEHUE = 26 partially supported, ALPHAMAP = 27 partially supported, MENUPLAYER = 28 partially supported, BLEND_NORMAL = 29, BLEND_DARKEN = 30 partially supported, BLEND_LIGHTEN = 31 partially supported, BLEND_HUE = 32 partially supported, BLEND_SATURATION = 33 partially supported, BLEND_COLOR = 34 partially supported, BLEND_LUMINANCE = 35 partially supported, BLEND_MULTIPLY = 36 partially supported, BLEND_SCREEN = 37 partially supported, BLEND_DISSOLVE = 38 partially supported, BLEND_OVERLAY = 39 partially supported, BLEND_HARDLIGHT = 40 partially supported, BLEND_SOFTLIGHT = 41 partially supported, BLEND_DIFFERENCE = 42 partially supported, BLEND_DODGE = 43 partially supported, BLEND_BURN = 44 partially supported, BLEND_EXCLUSION = 45 partially supported, TRANSLUCENTTILE = 46, CHROMAKEY = 47 partially supported, MAPPING = 48 partially supported, TRANSLUCENTMAPPING = 49 partially supported, INVERSE = 50 partially supported } JJ2+
How the colors of a sprite, tile, text or shape are rendered

Enum documentation

enum SPRITE::Direction JJ2+

How a sprite is flipped, used as the direction of drawing functions

Enumerators
FLIPNONE

Not flipped

FLIPH

Flipped horizontally

FLIPV

Flipped vertically

FLIPHV

Flipped both horizontally and vertically

enum SPRITE::Mode JJ2+

How the colors of a sprite, tile, text or shape are rendered

Most drawing functions take a mode together with a uint8 parameter whose meaning depends on the mode. Some of the blending modes are only approximated.

Enumerators
NORMAL

Drawn with its own colors

TRANSLUCENT

Drawn half transparent

TINTED

Mixed with the palette color param

GEM

Drawn like a gem, param selects the gem color

INVISIBLE

Not drawn at all

SINGLECOLOR

Shape filled with the palette color param

RESIZED

Drawn like NORMAL

NEONGLOW

Brightness added to what is behind, param selects the color channels

FROZEN

Drawn frozen in ice

PLAYER

Drawn in the fur colors of the player with index param

PALSHIFT

Palette indices shifted by param

SHADOW

Darkens what is behind, in the shape of the sprite

SINGLEHUE

Drawn in shades of the palette gradient starting at index param

BRIGHTNESS

Brightness scaled by param, 128 is unchanged

TRANSLUCENTCOLOR

Translucent variant of SINGLECOLOR

TRANSLUCENTPLAYER

Translucent variant of PLAYER

TRANSLUCENTPALSHIFT

Translucent variant of PALSHIFT

TRANSLUCENTSINGLEHUE

Translucent variant of SINGLEHUE

ALPHAMAP

Palette color param, with the sprite's palette indices used as its opacity

MENUPLAYER

Player colors as used in menus

BLEND_NORMAL

Normal blending, param is the opacity

BLEND_DARKEN

Darken blending, param is the opacity

BLEND_LIGHTEN

Lighten blending, param is the opacity

BLEND_HUE

Hue blending, param is the opacity

BLEND_SATURATION

Saturation blending, param is the opacity

BLEND_COLOR

Color blending, param is the opacity

BLEND_LUMINANCE

Luminance blending, param is the opacity

BLEND_MULTIPLY

Multiply blending, param is the opacity

BLEND_SCREEN

Screen blending, param is the opacity

BLEND_DISSOLVE

Random pixels drawn, param is their density

BLEND_OVERLAY

Overlay blending, param is the opacity

BLEND_HARDLIGHT

Hard light blending, param is the opacity

BLEND_SOFTLIGHT

Soft light blending, param is the opacity

BLEND_DIFFERENCE

Difference blending, param is the opacity

BLEND_DODGE

Color dodge blending, param is the opacity

BLEND_BURN

Color burn blending, param is the opacity

BLEND_EXCLUSION

Exclusion blending, param is the opacity

TRANSLUCENTTILE

Translucent the way translucent tiles are

CHROMAKEY

Drawn only over pixels of the palette color param

MAPPING

Colors remapped by mapping param, see jjSpriteModeSetMapping(), a mapping the script didn't define is the additional palette of the level with that index

TRANSLUCENTMAPPING

Translucent variant of MAPPING

INVERSE

Inverted colors