Hi all. I can't figure out how to change the background graphics assets from custom code. What I would like to do is change a closed door asset with a solid tile type to an open door asset with a warp to screen tile type. The closest example would be something like in the legend of zelda when you are in a dungeon and push a block and a stairway appears somewhere on the screen. I have studied all of the code I can find that changes background objects, but they all seem to act on objects that are at the point of collision. I can't figure out how to find an object on the screen and either change the object directly, or destroy it and create a new one. I believe it would be somewhat like what the macros from ChangeTile.asm or ChangeTileAtCollision.asm do.
I think the smart thing would be to loop through all of the background objects and look for a certain custom tile type (i.e a closeddoor tile type) to find it's coordinates. I know assembly code well enough, but I just don't understand the underlying coding for object storage enough to know how to do that. Can anyone show me how to loop through the objects and access their details? Any help or suggestions is appreciated.
I think the smart thing would be to loop through all of the background objects and look for a certain custom tile type (i.e a closeddoor tile type) to find it's coordinates. I know assembly code well enough, but I just don't understand the underlying coding for object storage enough to know how to do that. Can anyone show me how to loop through the objects and access their details? Any help or suggestions is appreciated.