mav_paletteTextureSetFromMem - Set a palette texture from a texture in memory.

[ Maverik Level 1 functions ]

#

mav_paletteTextureSetFromMem

## Summary

Set a palette texture from a texture in memory.

## Syntax

int mav_paletteTextureSetFromMem(MAV_palette *p, int index, int width, int height, unsigned long *mem);

- MAV_palette *p
  Palette to set.

- int index
  Index into textures table, in range 0..`mav_opt_maxTextures` (default 150).

- int width
  Width of texture, in pixels.

- int height
  Height of texture, in pixels.

- unsigned long *mem
  Pointer to start of memory holding texture.

## Description

This function sets the texture for entry `index` in the textures table of palette `p`. A texture of size (`width` x `height`) is obtained from memory starting at address `mem`. Note that the actual texture is not copied into the texture table, only referenced.

## See also

mav_paletteTextureFree.

Back to the index page.