define sprite collision boxes in res, use in src/sprite.c
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "../src/sprite.h"
|
||||
|
||||
/* Start of tile array. */
|
||||
unsigned char sprites[] =
|
||||
{
|
||||
@@ -49,4 +51,20 @@ unsigned char sprites[] =
|
||||
0x7E,0x7E,0x3C,0x3C,0xDB,0xDB,0x43,0xC3
|
||||
};
|
||||
|
||||
|
||||
// define the collision box of each sprite in the tileset
|
||||
SpriteCorners sprite_offsets[] = {
|
||||
{ .itl = { .x = 8, .y = 8}, .itr = { .x = 1, .y = 8}, .ibl = { .x = 8, .y = 1}, .ibr = { .x = 1, .y = 1}, },
|
||||
{ .itl = { .x = 8, .y = 8}, .itr = { .x = 1, .y = 8}, .ibl = { .x = 8, .y = 1}, .ibr = { .x = 1, .y = 1}, },
|
||||
{ .itl = { .x = 8, .y = 8}, .itr = { .x = 1, .y = 8}, .ibl = { .x = 8, .y = 1}, .ibr = { .x = 1, .y = 1}, },
|
||||
{ .itl = { .x = 8, .y = 8}, .itr = { .x = 1, .y = 8}, .ibl = { .x = 8, .y = 1}, .ibr = { .x = 1, .y = 1}, },
|
||||
{ .itl = { .x = 8, .y = 8}, .itr = { .x = 1, .y = 8}, .ibl = { .x = 8, .y = 1}, .ibr = { .x = 1, .y = 1}, },
|
||||
{ .itl = { .x = 8, .y = 8}, .itr = { .x = 1, .y = 8}, .ibl = { .x = 8, .y = 1}, .ibr = { .x = 1, .y = 1}, },
|
||||
{ .itl = { .x = 8, .y = 8}, .itr = { .x = 1, .y = 8}, .ibl = { .x = 8, .y = 1}, .ibr = { .x = 1, .y = 1}, },
|
||||
{ .itl = { .x = 8, .y = 8}, .itr = { .x = 1, .y = 8}, .ibl = { .x = 8, .y = 1}, .ibr = { .x = 1, .y = 1}, },
|
||||
{ .itl = { .x = 8, .y = 8}, .itr = { .x = 1, .y = 8}, .ibl = { .x = 8, .y = 1}, .ibr = { .x = 1, .y = 1}, },
|
||||
{ .itl = { .x = 8, .y = 8}, .itr = { .x = 1, .y = 8}, .ibl = { .x = 8, .y = 1}, .ibr = { .x = 1, .y = 1}, },
|
||||
{ .itl = { .x = 8, .y = 8}, .itr = { .x = 1, .y = 8}, .ibl = { .x = 8, .y = 1}, .ibr = { .x = 1, .y = 1}, }
|
||||
};
|
||||
|
||||
/* End of SPRITES.C */
|
||||
|
@@ -22,10 +22,12 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "../src/sprite.h"
|
||||
|
||||
/* Bank of tiles. */
|
||||
#define spritesBank 0
|
||||
/* Start of tile array. */
|
||||
extern unsigned char sprites[];
|
||||
extern SpriteCorners sprite_offsets[];
|
||||
|
||||
/* End of SPRITES.H */
|
||||
|
Reference in New Issue
Block a user