Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
vor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rewording bounce calculations.
[vor.git]
/
sprite.h
diff --git
a/sprite.h
b/sprite.h
index
4c0cefd
..
e1216cf
100644
(file)
--- a/
sprite.h
+++ b/
sprite.h
@@
-22,6
+22,7
@@
struct sprite {
int w, h;
int mask_w;
uint32_t *mask;
int w, h;
int mask_w;
uint32_t *mask;
+ uint32_t area;
};
Sprite *free_sprites[N_TYPES]; // lists of free sprites, by type.
};
Sprite *free_sprites[N_TYPES]; // lists of free sprites, by type.
@@
-31,10
+32,12
@@
void add_sprite(Sprite *s);
void move_sprite(Sprite *s);
void move_sprites(void);
void move_sprite(Sprite *s);
void move_sprites(void);
-int collides(Sprite *s);
+Sprite *collides(Sprite *s);
int pixel_collides(float x, float y);
void load_sprite(Sprite *sprite, char *filename);
int pixel_collides(float x, float y);
void load_sprite(Sprite *sprite, char *filename);
+void bounce(Sprite *a, Sprite *b);
+
// extended sprites
// extended sprites
@@
-48,6
+51,7
@@
struct ship {
int w, h;
int mask_w;
uint32_t *mask;
int w, h;
int mask_w;
uint32_t *mask;
+ uint32_t area;
// SHIP extras
int lives;
int jets;
// SHIP extras
int lives;
int jets;
@@
-63,6
+67,7
@@
struct rock {
int w, h;
int mask_w;
uint32_t *mask;
int w, h;
int mask_w;
uint32_t *mask;
+ uint32_t area;
// ROCK extras
int type;
};
// ROCK extras
int type;
};