Author Topic: Image/View ID Question  (Read 3235 times)

matthewsjc1

  • Guest
Image/View ID Question
« on: June 07, 2012, 03:07:51 am »
I'm writing a sprite class to handle animations. My question is when an image is loaded into memory and assigned a view, are the returned IDs always in sequential order, starting with the next integer after the last loaded image/view? For example, if I load a bunch of images, will the ID of each one be sequential and in the order they were loaded (starting with 1, I assume)? I need to know this, because there are no commands to tell if an image ID is currently used (ie ImageDoesImageExist). Thanks!

tim

  • Administrator
  • Hero Member
  • *****
  • Posts: 1595
  • Karma: +11/-1
    • View Profile
    • DragonFireSDK
Re: Image/View ID Question
« Reply #1 on: June 08, 2012, 07:53:51 am »
First, don't make any assumptions on the handle that's returned by ImageAdd().  It might be the next number in a sequence, but never NEVER count on that.

Second, if you call ImageAdd() on a previously loaded image, the system is smart enough not to load it again.

Tim Sommers
DragonFireSDK Team