Author: Tari
Posted: 18 Nov 2012 09:57:02 pm (GMT -5)
Hard to tell if we can't map line numbers to anything. Just guessing, but maybe Kerm has not-C on the brain (but maybe what he said is actually valid for the array declaration).
Code:
If all your sprites are the same known size, it'll be slightly more efficient to make a 2d rather than jagged array:
Code:
Similarly, that's a wonky function prototype (where's the return type?!).
Code:
Your implementation of course needs to agree with this signature, which it sounds like it doesn't. We'll need to know more about your code to really be able to help.
_________________
![]()
![]()
![]()
タリ·MishaBot
Posted: 18 Nov 2012 09:57:02 pm (GMT -5)
Hard to tell if we can't map line numbers to anything. Just guessing, but maybe Kerm has not-C on the brain (but maybe what he said is actually valid for the array declaration).
Code:
const color_t * const sprite_ptrs[3] = {sprite1, sprite2, sprite3};
Code:
const color_t sprites[SPRITE_SIZE_PX][3] = {
{ /* data here, etc */ }
};
Similarly, that's a wonky function prototype (where's the return type?!).
Code:
void XORSprite(const color_t *sprite, int x, int y, int w, int h);
_________________



タリ·MishaBot