0 Members and 3 Guests are viewing this topic.
Then, the end of the level stream is marked by LVLSTR_END. When this point is reached, the game waits for every enemies to be killed, then quits - although for now you can't kill enemies so we'll see if that works when I'll implement collisions
int levelStream[] = { enemy(110, 0, image_LUT_enemy_ship_0_light, image_LUT_enemy_bullet_1_light, callback_LUT_0, LIGHT, 1), enemy(220, 0, image_LUT_enemy_ship_0_shadow, image_LUT_enemy_bullet_1_light, callback_LUT_0, SHADOW, 1), cmd_killed, LVLSTR_END };
levelStream[n]
int levelStreamAArray = {enemy(...),enemy(...),cmd_killed,LVLSTR_END};int levelStreamA(int n) = levelStreamArray[n];int (*levelStream)(int);levelStream = &levelStreamA
levelStream(n)
int levelStreamB(n) = switch (n%3) case 0: return enemy(110, 0, image_LUT_enemy_ship_0_light, image_LUT_enemy_bullet_1_light, callback_LUT_0, LIGHT, 1); break; case 1: return enemy(220, 0, image_LUT_enemy_ship_0_shadow, image_LUT_enemy_bullet_1_light, callback_LUT_0, SHADOW, 1), break; case 2: return cmd_killed; break; default: // Stops the compiler from yelling at you and is probably good in case of lobsters return LVLSTR_END;levelStream = &levelStreamB
Damn that looks great.
Playing with the patterns engine. That's why "danmaku" means "bullet hell".