null check to squash bug. some gfx

This commit is contained in:
t. boddy 2026-02-15 15:57:58 -05:00
parent 19258268b0
commit a3f0474ec9
11 changed files with 60 additions and 42 deletions

View file

@ -1,5 +1,7 @@
void loadEnemyOne(u8 i){
enemies[i].ints[0] = random() % 60;
enemies[i].angle = ((random() % 4) * 256) + 128;
enemies[i].speed = FIX32(2);
}
void updateEnemyOne(u8 i){
@ -7,15 +9,16 @@ void updateEnemyOne(u8 i){
struct bulletSpawner spawner = {
.x = enemies[i].pos.x,
.y = enemies[i].pos.y,
.anim = 6 + (random() % 3),
// .anim = 6 + (random() % 3),
.anim = 6,
// .frame = 1,
.speed = FIX32(4),
.angle = random() % 256,
.speed = FIX32(2) + FIX16(random() % 4),
.angle = random() % 128,
};
if(random() % 2 < 1) spawner.anim += 3;
for(u8 j = 0; j < 4; j++){
// if(random() % 2 < 1) spawner.anim += 3;
for(u8 j = 0; j < 8; j++){
spawnBullet(spawner, EMPTY);
spawner.angle += 256;
spawner.angle += 128;
}
}
}