cleanup
This commit is contained in:
parent
2bd8fa1aa9
commit
9102b190c8
|
@ -1,25 +1,5 @@
|
|||
// bullets
|
||||
|
||||
#define BULLET_COUNT 64
|
||||
|
||||
struct bullet {
|
||||
bool active, player;
|
||||
fix16 speed;
|
||||
fix32 dist;
|
||||
Vect2D_f16 pos, vel;
|
||||
s16 angle, clock;
|
||||
Sprite* image;
|
||||
bool dead, big;
|
||||
void (*updater)(s16);
|
||||
bool bools[COUNT_INT];
|
||||
s16 ints[COUNT_INT];
|
||||
fix16 fixes[COUNT_INT];
|
||||
};
|
||||
struct bullet bullets[BULLET_COUNT];
|
||||
|
||||
|
||||
// lifecycle
|
||||
|
||||
#define BULLET_OFF 4
|
||||
#define BULLET_OFF_BIG 8
|
||||
|
||||
|
|
21
src/global.h
21
src/global.h
|
@ -26,25 +26,4 @@ u32 score,
|
|||
s16 emptyI; // lmao
|
||||
void EMPTY(s16 i){emptyI = i;}
|
||||
|
||||
|
||||
// structs
|
||||
|
||||
struct bulletSpawner {
|
||||
fix16 x, y, speed;
|
||||
Vect2D_f16 vel;
|
||||
s16 angle;
|
||||
SpriteDefinition* image;
|
||||
bool big, player;
|
||||
bool bools[COUNT_INT];
|
||||
s16 ints[COUNT_INT];
|
||||
fix16 fixes[COUNT_INT];
|
||||
};
|
||||
|
||||
void collideObstacleWithPlayer(s16);
|
||||
|
||||
struct playerStruct {
|
||||
Vect2D_f16 pos, vel;
|
||||
Sprite* image;
|
||||
s16 clock, invincibleClock, shotClock;
|
||||
};
|
||||
struct playerStruct player;
|
|
@ -4,6 +4,7 @@
|
|||
#include <resources.h>
|
||||
|
||||
#include "global.h"
|
||||
#include "structs.h"
|
||||
#include "controls.h"
|
||||
#include "background.h"
|
||||
#include "foreground.h"
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
// structs
|
||||
|
||||
#define BULLET_COUNT 64
|
||||
struct bulletSpawner {
|
||||
fix16 x, y, speed;
|
||||
Vect2D_f16 vel;
|
||||
s16 angle;
|
||||
SpriteDefinition* image;
|
||||
bool big, player;
|
||||
bool bools[COUNT_INT];
|
||||
s16 ints[COUNT_INT];
|
||||
fix16 fixes[COUNT_INT];
|
||||
};
|
||||
struct bullet {
|
||||
bool active, player;
|
||||
fix16 speed;
|
||||
fix32 dist;
|
||||
Vect2D_f16 pos, vel;
|
||||
s16 angle, clock;
|
||||
Sprite* image;
|
||||
bool dead, big;
|
||||
void (*updater)(s16);
|
||||
bool bools[COUNT_INT];
|
||||
s16 ints[COUNT_INT];
|
||||
fix16 fixes[COUNT_INT];
|
||||
};
|
||||
struct bullet bullets[BULLET_COUNT];
|
||||
|
||||
struct playerStruct {
|
||||
Vect2D_f16 pos, vel;
|
||||
Sprite* image;
|
||||
s16 clock, invincibleClock, shotClock;
|
||||
};
|
||||
struct playerStruct player;
|
Reference in New Issue