I've been programming for the Atari Lynx for a little while.
It's fun, but I run into a small problem. I want to dynamically allocate and free collision sprites.
I'm aware that the collision offset is -1 relatively to the sprite. My collision sprite type is defined as follows
typedef struct {
char collindex;
SCB_REHV sprite;
void *next;
} sprite_t;
This all goes well, when all the sprites are statically allocated and I set tgi_setcollisiondetection(1);
It also goes well if I dynamically allocated the sprites (simple linked list) and tgi_setcollisiondetection(0);
Once I set collision detection on, however, it doesn't seem to work.
Is this some memory alignment issue or how the heap allocates?
Is there any boiler plate code for this?
Sincerely,
Rob