v->target1 + offset, no?

I don't know about the Lite-C compiler, but pointer arithmetic (not jumping ;)) doesn't work by adding bytes, unless you used bytes to begin with.

Code:
int *bar = xyz;
*(bar + 0) = 1024; // First element of the "Array"
*(bar + 1) = 512; // Second element
*(bar + 2) = 32; // Third element



Since the Lite-C compiler packs everything closely anyways (and a pointer is word aligned), target1, target2 and target3 are in fact consecutively laid out in memory, so adding 1 to target1 will result in a pointer pointing to target2.

Sooo...
Code:
if(offset == 0)
    return v->bmap;
return v->target1 + offset - 1;



Speaking of, you can use return inside a case label wink

Quote:
Hm, I don't know if this is helpful but I feel motivated to share things since that good-bye post of Sid wink

I hope I didn't stop you. I'm off again now anyways, I just clicked here out of old habit...


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com