|
PokeLevelTile | |||
PokeLevelTile MapIndex, LevelIndex, TileXpos, TileYpos, BlockIndex | |||
Parameters: MapIndex = The Index Identifier of the Map you wish to poke this level in. LevelIndex = The index of the level you wish to write to. TileXpos = The X coordinate in the level map TileYpos = The Y coordinate in the level map BlockIndex = The Index of the Block Gfx that you wish to place at this X & Y position |
|||
Returns: NONE | |||
The PokelevelTile() function will store either Tiles Index or Animation Index directly into a level array. Animation Note: When PlayBASIC draws a level, it distinguishes between normal block and animation indexes tiles by performing a Bit TEST on value. Normal block indexes should be stored as positives values (from 0 to the number of blocks this map has). To store an Animation index, the index needs to be OR'd with the PBMapAnim_Mask constant. This will appropriately tag this value as animation index, rather than a block index. I.e. Poking an animation index into a level.
FACTS: * Levels can not be drawn until the maps graphics tiles have been loaded/created. * The TileXpos parameter is in TILES not pixels. * The TileYpos parameter is in TILES not pixels. * Animation indexes require the High Bit the set. To set it, we Or the Animation Index with the PBMapAnim_Mask constant. Eg PokeLevelTile THisMap,ThisLevel,X,Y, AnimIndex or PBMapAnim_Mask Mini Tutorial: This example creates a map with tile graphics and a level map the size opf the display. The user can draw tiles onto the blank map by Poking them withthe mouse.
This example would output.
|
Related Info: | LevelAnimated | LevelDrawMode | LevelSolid | LevelTransparent | LevelTransparentTile | Maps | PBMapAnim_Mask | PeekLevelTile : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |