I'm currently working with DirectX 9 (specifically the 2D portion of it) and would like to draw sprites in front of each other in a particular order.
I have tried drawing sprites from bottom to top and also using the Z coordinate of the draw function, but still nothing.
I'm probably missing something simple, but anyway you can do it with DX9 would be appreciated. Thanks for reading and any replies.
I have been trying to make a top-down shooter just for my own experience and want to finish something. Nothing special.
But, as always, something is barring me from progressing any farther and that would be: entity spawning and dynamic memory. I have never worked with dynamic memory beyond that which is required by multiple file projects so I don't have much experience. I'm looking to replace all the static arrays I had that contained information about projectiles, mobs, and the player into a dynamic linked list. The way I have functions set up is that one function is called for entity spawning, a different one for entity moving, another one for collision and so forth. I do not know how to have one global linked list but have it be accessible in different files and in different functions.
The problem I have ran into, obviously, is the problem of how to actually implement such a list. If someone could post a tutorial or something similar on how to do these I would greatly appreciate it. I have read several on linked lists but they're not too good at explaining exactly how you do it, what each piece does, why it works, and how to implement it yourself.