GetSpriteLocalPtr
Address = GetSpriteLocalPtr(SpriteNumber)
 
Parameters:

    SpriteNumber = The Index of the sprite you wish to query
Returns:

    Address = The Address in memory of this sprites local data area
 

      The GetSpriteLocalPtr function returns the memory address (pointer) of the sprites local data area.



FACTS:


      * GetSpriteLocalPtr will return a zero if no local area exists

      * See CreateSpriteLocals & Pointer






Mini Tutorial:


      This example creates a sprites local data bank, fills it will various tidbits of test data, then reads this data back from the sprite.


  
; Create a Sprite
  CreateSprite 1
  
; Attach a Local data area, 100 bytes long To this sprite
  CreateSpriteLocals 1,100
  
  Print "Size:"+Str$(GetSpriteLocalSize(1))
  
  Print "Pointer:"+Str$(GetSpriteLocalPtr(1))
  
  
; Display the screen and wait for a key press
  Sync
  WaitKey
  
  



This example would output something like the following. The pointer address of the your sprites local data will be different each time you run the program.

  
  Size:100
  Pointer12345678
  


 
Related Info: CreateSpriteLocals | DeleteSpriteLocals | GetSpriteLocalByte | GetSpriteLocalFloat | GetSpriteLocalInt | GetSpriteLocalSize | GetSpriteLocalString | GetSpriteLocalWord | SpriteLocalByte | SpriteLocalFloat | SpriteLocalInt | SpriteLocalString | SpriteLocalWord :
 


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