mav_surfaceParamsNew(3)

NAME
mav_surfaceParamsNew - Create a new set of surface parameters.

LEVEL
Maverik Level 1

SYNTAX
MAV_surfaceParams *mav_surfaceParamsNew(int mode, int colour, int material, int texture);

ARGUMENTS

int mode
    Specifies how arguments colour, material and texture are to be interpreted (see description below).

int colour
    Index into palette colour table.

int material
    Index into palette material table.

int texture
    Index into palette texture table.

DESCRIPTION
This function creates and returns a new set of surface parameters, which when used (by mav_surfaceParamsUse) controls "what colour" is subsequent used to render objects in a window.

mode can take one of the following values:

^MAV_COLOUR
    to specify the use of an ambient colour

^MAV_MATERIAL
    to specify the use of a material type

^MAV_TEXTURE
    to specify the use of a decal texture

^MAV_LIT_TEXTURE
    to specify the use of a texture modulated by the material

^MAV_BLENDED_TEXTURE
    to specify the use of a blending between the material and texture depending on the texture's alpha value (0=material, 1=texture).

The other fields, colour, material and texture, respectively specify which colour, material and/or texture index to use from the palette associated with the window in which the object is being drawn. Only for the case of ^MAV_LIT_TEXTURE and ^MAV_BLENDED_TEXTURE does more than one index need to be given.

SEE ALSO
MAV_surfaceParams, mav_surfaceParamsUse, mav_paletteColourSet, mav_paletteMaterialSet, mav_paletteTextureSet