GetLevelABSHeight
Height = GetLevelABSHeight(MapIndex, LevelIndex)
 
Parameters:

    MapIndex = The Index of the Map you wish to query a level within
    LevelIndex = The index of the level you wish to query.
Returns:

    Height = Height of level in pixels
 

The GetLevelABSHeight function returns the absolute height of a level in pixels.


It's the same calculation as,
  
  BlockHeight=GetMapBlockHeight(myMap)
  LevelHeight=GetLevelHeight(MyMap,MyLevel)
  Height=LevelHeight * BlockHeight
  





FACTS:


* The returned value is in PIXELS not TILES.




Mini Tutorial:


This example shows how to first create a Map & Level, then displays the size information about this level.


  
; Create map with provision for 5 levels
  MyMap=NewMap(5)
  
; Create some blank block GFX for this map
  CreateMapGFX MyMap,30,20,10,RGB(0,0,0)
  
; Create level 1 of size 100x,200y, and attach
; it To MYMap
  CreateLevel MyMap,1,100,200
  
; Display the info about Level 1 in MyMap
  Print "Level Status:"+Str$(GetLevelStatus(MyMap,1))
  Print "Level Tile Width:"+Str$(GetLevelWidth(MyMap,1))
  Print "Level Tile Height:"+Str$(GetLevelHeight(MyMap,1))
  
  Print "Level Pixel Width:"+Str$(GetLevelABSWidth(MyMap,1))
  Print "Level Pixel Height:"+Str$(GetLevelABSHeight(MyMap,1))
  
; Display the screen and wait for a key to be pressed
  Sync
  WaitKey
  
  



This example would output.

  
  Level Status:1
  Level Tile Width:100
  Level Tile Height:200
  Level Pixel Width:3030
  Level Pixel Height:4020
  

 
Related Info: CreateLevel | GetLevelABSWidth | GetLevelHeight | GetLevelWidth | ResizeLevel :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com