|
LevelTransparent | ||
LevelTransparent MapIndex, LevelIndex, TransparentBlock | ||
Parameters: MapIndex = The Index of the Map you wish to set a levels render mode LevelIndex = The index of the level you wish to set to transparent TransparentBlock = The Index of a totally transparent block to ignore. |
||
Returns: NONE | ||
LevelTransparent sets a levels rendering mode to transparent. In transparent mode, the level tiles will be drawn using the previously defined block transparency colour. So any colour within the blocks, will be masked out and appear as transparent. Transparent mode also requires an extra parameter. This parameter is the index of a block that is known to be clear. Since we know this block is clear, then obviously it doesn't make sense to drawn a clear block. It's a waste of valuable processing time. Thus we screen this block out entirely, so basically DrawMap will ignore it. FACTS: * Transparent mode rendering is a little slower than solid mode where all the blocks are present and have a few transparent pixels. * Transparent mode can be combined with animation mode. * Since PlayBASIC V1.64N each block has three transparent states, those being SOLID, partyly transparent and completely transparent. Which allows the transparent map rendering to do a better job at screening out blocks that don't need drawing. Mini Tutorial: This example creates a maps level, and then draws the solid and transparent versions of this level at the mouse pointers current position, as if the level was a sprite.
This example would output.
|
Related Info: | CreateLevel | CreateMap | DrawMap | GetLevelDrawMode | LevelAnimated | LevelDrawMode | LevelSolid | LevelTransparentTile : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |