level design etc

This commit is contained in:
t. boddy 2026-02-17 17:40:34 -05:00
parent 0151304d05
commit 4036b5f07e
13 changed files with 460 additions and 21 deletions

View file

@ -1,6 +1,6 @@
u32 clock;
#define CLOCK_LIMIT 32000
#define PROP_COUNT 4
#define PROP_COUNT 8
#define GAME_H_F FIX32(224)
@ -27,6 +27,11 @@ bool started;
bool gameOver;
bool paused, isPausing;
s16 enemyCount, bulletCount;
u8 level;
s16 pendingBossHp;
bool waitForRelease;
bool levelClearing;
u32 levelClearClock;
// controls
struct controls {
@ -81,11 +86,19 @@ struct bullet bullets[BULLET_COUNT];
// enemies
#define ENEMY_COUNT 16
#define ENEMY_COUNT 24
#define ENEMY_TYPE_TEST 0
#define ENEMY_TYPE_DRONE 1
#define ENEMY_TYPE_GUNNER 2
#define ENEMY_TYPE_HUNTER 3
#define ENEMY_TYPE_BUILDER 4
#define ENEMY_TYPE_BOSS 5
struct enemy {
bool active, onScreen;
u8 type;
s16 hp;
s16 angle, off;
u32 clock;
fix32 speed;
@ -151,6 +164,8 @@ void killBullet(u8 i, bool explode){
}
void killEnemy(u8 i){
enemies[i].hp--;
if(enemies[i].hp > 0) return;
if(enemies[i].ints[3] >= 0){
s16 h = enemies[i].ints[3];
if(humans[h].active){