Alvie Rahman 6e1690ceea
faster collisions
Squashed commit of the following:

commit 053c06ea29702728e2605899a2b47edac647c459
Author: Alvie Rahman <alvierahman90@gmail.com>
Date:   Sat Dec 3 16:09:51 2022 +0000

    begin documentation on codebase: sprite metadata

commit 435f0c62743112818594f4b1a902d90d1f60823a
Author: Alvie Rahman <alvierahman90@gmail.com>
Date:   Sat Dec 3 16:05:37 2022 +0000

    formatting, mostly

commit f338476aaf4c33081969b18b2a6d13a3639571cd
Author: Alvie Rahman <alvierahman90@gmail.com>
Date:   Fri Dec 2 23:18:27 2022 +0000

    way faster collisions
2022-12-03 16:13:44 +00:00

35 lines
622 B
C

#ifndef SPRITE_H_
#define SPRITE_H_
#include "./vec.h"
#include "./map.h"
typedef struct SpriteCorners {
UVec itl;
UVec itr;
UVec ibl;
UVec ibr;
} SpriteCorners;
typedef struct Sprites {
int gb_sprite_index;
int frames_since_last_dash;
int frames_since_last_jump;
int bitmap_index_prev;
int bitmap_index;
int bitmap_indexes[8];
int bitmap_prop[8];
int has_diag_sprites;
int has_joypad;
char name[20];
int collision_offset[8][12];
UVec pos;
Vec vel;
Vec acc;
} Sprite;
void sprite_iter_frame(Sprite *sprite, Map *map, int joypad, unsigned int *fc);
void sprite_draw_to_screen(Sprite *sprite);
#endif