bmap_for_entity (ENTITY*, var frame)
Returns a BMAP* pointer to an entity texture.
A pointer to a sprite, model, terrain, or map entity
||Number of frame or skin to determine the texture. At 0 the current
frame or skin will be used
BMAP* pointer to a bmap if operation was successfully, otherwise NULL.
- Functions like media_play, bmap_for_screen, bmap_to_uv etc.
can use this bmap pointer.
- If several entities share the
same file, they will also return
the same bmap pointer.
- The bmap can be temporary
assigned to other objects, like panels, but
won't be saved by the game_save instruction.
- In case of a map entity, the frame variable
gives the number of the texture to be returned,
starting with 1. If it's higher than the number
of textures in the map, 0 is returned.
// capture a screenshot in a sprite