Table of Contents

 
ChangeLayerType
 

Purpose

Changes the type of a layer

 

Protoype

void CTileMngr::ChangeLayerType (int i_layer, int i_type)
 

Parameters

layer the layer number to change
type the new layer type
 

Description

This function changes the type of a layer, which can be easier than removing the layer and adding a new one. When the type of layer is changed, all object IDs associated with that layer are removed from the map engine (but the actual objects themselves are not deleted from their managers), allowing the new layer to function properly. The three layer types are TYPE_TILE, TYPE_SPRITE, and TYPE_IMAGE.

 

Use

CTileMngr tile_mngr;
tile_mngr.ChangeTileLayer(2, TYPE_IMAGE);
 

Prev: AssignAnimation