taisei/src/stages/stage3/wriggle.h

46 lines
1 KiB
C
Raw Normal View History

/*
* This software is licensed under the terms of the MIT License.
* See COPYING for further information.
* ---
2024-05-16 23:30:41 +02:00
* Copyright (c) 2011-2024, Lukas Weber <laochailan@web.de>.
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
*/
#pragma once
#include "taisei.h"
#include "coroutine/taskdsl.h"
#include "entity.h"
#include "renderer/api.h"
stage3: Major redesign of the stage (WIP) Still needs work, but good enough for now. Merges #203 Squashed commit of the following: commit 7f30ef239337f54b6612f13229e098cb0d227ffd Author: Andrei Alexeyev <akari@taisei-project.org> Date: Fri Jan 27 23:50:42 2023 +0100 stageinfo: finally rename stage3 commit 53ca691e680931d6ebf8497eb40a0bab45748248 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Fri Jan 27 23:38:36 2023 +0100 stage3: telegraph moonlight rockets commit 4d247877e7d23c0529d87f80e9d0be06e545cabb Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Jan 18 15:54:44 2023 +0100 stage3: moonlight rocket fixes commit 684a167611d5b404afe61bf7c1e5cc40a86bbf75 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Jan 18 14:50:48 2023 +0100 stage3: update background commit bed836f56cc0acd3d7a1cb60431b1c43a9c841a7 Author: laochailan <laochailan@web.de> Date: Sat Jan 7 19:52:51 2023 -0500 stage3: make easy mode easier commit bec659a6eb9e953212b49d3a6e7aa6e2cb2246d7 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 7 20:20:18 2022 +0100 stage3: sprinkle some random difficulty_value() calls commit 2090821188134b2abed316beee191d4d337dfacd Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Nov 20 07:57:33 2022 +0100 stage3: refactor and fix deadly dance (no design update yet) commit 5dbdeae1dd651cc64cd167641b8eba4f462fe660 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Nov 20 07:17:05 2022 +0100 stage3: redesign scuttle nonspell commit 70666a40749014469f05bd38265811ca6cef2e93 Author: Andrei Alexeyev <0x416b617269@gmail.com> Date: Mon Nov 14 01:32:11 2022 +0100 stage3: last pre-boss section draft commit 42bb538ff58b58fd644e4cd861604edcd132d8e2 Author: Andrei Alexeyev <0x416b617269@gmail.com> Date: Mon Nov 14 01:28:32 2022 +0100 stage3: bunch of swarm-trail fairy fixes commit 593878359125c42148f2b818aacdfdd954ec5814 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Nov 12 01:40:23 2022 +0100 stage3: more misery commit 84342f1973cd58764ea9c9469834ab0a9572c558 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Tue Nov 8 16:35:11 2022 +0100 stage3: post-midboss up to climax commit b40f71bbc6c30ed0e45a01588df79bee5b72e269 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Nov 2 18:43:54 2022 +0100 stage3: experimental post-midboss pattern commit b5710faa041f9b3f5de45448891a7da5ef210bb1 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Nov 2 18:12:49 2022 +0100 stage3: deadly dance fixes commit f85aa25c00cd2244d070112345a3d214670bb0b1 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Nov 2 18:08:02 2022 +0100 stage3: first sparks of difficulty balance commit 33b65b7fbe01d07f7b12db599819341de50b661a Author: laochailan <laochailan@web.de> Date: Sun Oct 16 10:27:24 2022 -0400 stage3: align swarm fairies commit 2556a0de9e861d39e05eeff8e39720235080c77c Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Sep 26 05:35:53 2022 +0200 stage3: more progress on the first half commit 86fc38255b66268fe333e7a38c47bd3c4922f523 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Sep 24 04:10:57 2022 +0200 stage3: add some swirls after superfairy commit b0134e82c774f17057443c3de4a9093a3f8dc0df Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Sep 24 04:10:11 2022 +0200 stage3: experimental laserball fairy commit 88d76469271678930149c9039e290d92d0a932c3 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Sep 24 04:09:14 2022 +0200 stage3: tweak horde fairies commit b97da7a9e968af772a30e238dd4eb3b251d8a4fa Author: Andrei Alexeyev <akari@taisei-project.org> Date: Tue Sep 13 17:08:12 2022 +0200 stage3: wip circletwist fairy tweaks commit ee9234a72b62ece169e0859c6b34f851bb3f42d1 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Sep 5 04:41:55 2022 +0200 wip swirls commit 26c7a35e0487a098bccf148b28890029c4c94114 Author: laochailan <laochailan@web.de> Date: Sun Jan 2 11:29:41 2022 +0100 stage3 wip commit d1a263223f8ff680e2d93ca4a40eecca04a860f8 Author: laochailan <laochailan@web.de> Date: Fri Nov 12 05:57:07 2021 +0100 wip wip wip commit c2527b05cf699ce9ea78ef7d32263e6f4d1a0120 Author: laochailan <laochailan@web.de> Date: Thu Sep 30 20:38:38 2021 +0200 stage3 redesign: some first prototypes commit 0c2855e3ca343a36fc4a09ffa463fc7f3110fd76 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Thu May 6 21:59:48 2021 +0300 stage3: some preliminary fixes commit fddf314db952dcb39e8c8849211afd4ed6ca4186 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Feb 28 07:36:04 2021 +0200 stage3: port rest of night ignite commit 1cd84d7834299243985222ec92d5d2a9ea0033ea Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Feb 27 04:50:46 2021 +0200 stage3: port night ignite slaves commit cb991be703d13f5422d17fefe1e69c162c9f6041 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Feb 27 04:26:26 2021 +0200 stage3: finish porting firefly storm commit 0fb973382929e36c77d32c7d56f902fd251bcd4b Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Jun 23 02:44:14 2021 +0300 stage3: partial firefly storm port commit ba174893a0b40418bf5b8e306c9ac95187b36e34 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Tue Feb 23 02:28:13 2021 +0200 stage3: enable all wriggle attacks commit 03e1dd80789e9cc22e9ac72807d7d74d173a76ef Author: Andrei Alexeyev <akari@taisei-project.org> Date: Tue Feb 23 02:22:35 2021 +0200 stage3: port wriggle nons commit 3308255579da026967f87ea2e16902aebe9a75d1 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Feb 22 16:27:50 2021 +0200 stage3: fix some indent issues commit b1c1115d7feebdb934e8c7bf5a4db9ab315478cb Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Feb 22 16:23:07 2021 +0200 stage3: fix deprecations in moonlight rocket commit 990489e960578c9b07342afc906f60584b8effc8 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Thu Feb 4 08:53:00 2021 +0200 stage3: port moonlight rocket commit 859592a89b98d442fd6172aa75493fcd5018e485 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Thu Feb 4 07:31:58 2021 +0200 stage3: basic port of wriggle slaves commit b88b4f5249f70e9b2ca8b33c2eaa7d9c084acffc Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Feb 1 06:28:30 2021 +0200 stage3: port Light Singularity commit db6bb1332622b5114bfbcaae70fab3f384e80e9d Author: Alice D <34408664+StarWitch@users.noreply.github.com> Date: Wed Mar 18 23:25:25 2020 -0400 stage3: preliminary coroutinization (#197) * first enemy of Stage 3 converted * review suggestions * add interval for burst_swirls * mid-commit * fairy group (second spawned enemies) * forgot to use my own variable * comment changes * better understanding of second arg of create_enemy* * fix subtasks (wasn't using them the correct way) * swirls that go from one side to the other * burst fairies complete * all complete up until midboss (stage 3 coroutines) * remove sub-rule for projectiles in charge_fairy * entire stage on coroutines now (boss spellcards missing) * rip out more old/dead code, make file better organized * timing changes * remove old background (looks jank now with new timing) * PR review changes * slight readability changes * Scuttle lethal_bite implemented * PR changes (ignore wriggle, she's still a WIP) * revert Info.plist entry (for separate PR) * finish(?) Scuttle's deadly dance, plus some PR changes Co-authored-by: Alice D <34408664+StarWitch@users.noreply.github.com> Co-authored-by: Lukas Weber <laochailan@web.de>
2023-01-27 23:57:12 +01:00
DEFINE_ENTITY_TYPE(WriggleSlave, {
struct {
Sprite *circle, *particle;
} sprites;
cmplx pos;
int spawn_time;
Color color;
cmplxf scale;
COEVENTS_ARRAY(
despawned
) events;
});
Boss *stage3_spawn_wriggle(cmplx pos);
void stage3_draw_wriggle_spellbg(Boss *boss, int time);
stage3: Major redesign of the stage (WIP) Still needs work, but good enough for now. Merges #203 Squashed commit of the following: commit 7f30ef239337f54b6612f13229e098cb0d227ffd Author: Andrei Alexeyev <akari@taisei-project.org> Date: Fri Jan 27 23:50:42 2023 +0100 stageinfo: finally rename stage3 commit 53ca691e680931d6ebf8497eb40a0bab45748248 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Fri Jan 27 23:38:36 2023 +0100 stage3: telegraph moonlight rockets commit 4d247877e7d23c0529d87f80e9d0be06e545cabb Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Jan 18 15:54:44 2023 +0100 stage3: moonlight rocket fixes commit 684a167611d5b404afe61bf7c1e5cc40a86bbf75 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Jan 18 14:50:48 2023 +0100 stage3: update background commit bed836f56cc0acd3d7a1cb60431b1c43a9c841a7 Author: laochailan <laochailan@web.de> Date: Sat Jan 7 19:52:51 2023 -0500 stage3: make easy mode easier commit bec659a6eb9e953212b49d3a6e7aa6e2cb2246d7 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 7 20:20:18 2022 +0100 stage3: sprinkle some random difficulty_value() calls commit 2090821188134b2abed316beee191d4d337dfacd Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Nov 20 07:57:33 2022 +0100 stage3: refactor and fix deadly dance (no design update yet) commit 5dbdeae1dd651cc64cd167641b8eba4f462fe660 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Nov 20 07:17:05 2022 +0100 stage3: redesign scuttle nonspell commit 70666a40749014469f05bd38265811ca6cef2e93 Author: Andrei Alexeyev <0x416b617269@gmail.com> Date: Mon Nov 14 01:32:11 2022 +0100 stage3: last pre-boss section draft commit 42bb538ff58b58fd644e4cd861604edcd132d8e2 Author: Andrei Alexeyev <0x416b617269@gmail.com> Date: Mon Nov 14 01:28:32 2022 +0100 stage3: bunch of swarm-trail fairy fixes commit 593878359125c42148f2b818aacdfdd954ec5814 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Nov 12 01:40:23 2022 +0100 stage3: more misery commit 84342f1973cd58764ea9c9469834ab0a9572c558 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Tue Nov 8 16:35:11 2022 +0100 stage3: post-midboss up to climax commit b40f71bbc6c30ed0e45a01588df79bee5b72e269 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Nov 2 18:43:54 2022 +0100 stage3: experimental post-midboss pattern commit b5710faa041f9b3f5de45448891a7da5ef210bb1 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Nov 2 18:12:49 2022 +0100 stage3: deadly dance fixes commit f85aa25c00cd2244d070112345a3d214670bb0b1 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Nov 2 18:08:02 2022 +0100 stage3: first sparks of difficulty balance commit 33b65b7fbe01d07f7b12db599819341de50b661a Author: laochailan <laochailan@web.de> Date: Sun Oct 16 10:27:24 2022 -0400 stage3: align swarm fairies commit 2556a0de9e861d39e05eeff8e39720235080c77c Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Sep 26 05:35:53 2022 +0200 stage3: more progress on the first half commit 86fc38255b66268fe333e7a38c47bd3c4922f523 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Sep 24 04:10:57 2022 +0200 stage3: add some swirls after superfairy commit b0134e82c774f17057443c3de4a9093a3f8dc0df Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Sep 24 04:10:11 2022 +0200 stage3: experimental laserball fairy commit 88d76469271678930149c9039e290d92d0a932c3 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Sep 24 04:09:14 2022 +0200 stage3: tweak horde fairies commit b97da7a9e968af772a30e238dd4eb3b251d8a4fa Author: Andrei Alexeyev <akari@taisei-project.org> Date: Tue Sep 13 17:08:12 2022 +0200 stage3: wip circletwist fairy tweaks commit ee9234a72b62ece169e0859c6b34f851bb3f42d1 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Sep 5 04:41:55 2022 +0200 wip swirls commit 26c7a35e0487a098bccf148b28890029c4c94114 Author: laochailan <laochailan@web.de> Date: Sun Jan 2 11:29:41 2022 +0100 stage3 wip commit d1a263223f8ff680e2d93ca4a40eecca04a860f8 Author: laochailan <laochailan@web.de> Date: Fri Nov 12 05:57:07 2021 +0100 wip wip wip commit c2527b05cf699ce9ea78ef7d32263e6f4d1a0120 Author: laochailan <laochailan@web.de> Date: Thu Sep 30 20:38:38 2021 +0200 stage3 redesign: some first prototypes commit 0c2855e3ca343a36fc4a09ffa463fc7f3110fd76 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Thu May 6 21:59:48 2021 +0300 stage3: some preliminary fixes commit fddf314db952dcb39e8c8849211afd4ed6ca4186 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Feb 28 07:36:04 2021 +0200 stage3: port rest of night ignite commit 1cd84d7834299243985222ec92d5d2a9ea0033ea Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Feb 27 04:50:46 2021 +0200 stage3: port night ignite slaves commit cb991be703d13f5422d17fefe1e69c162c9f6041 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Feb 27 04:26:26 2021 +0200 stage3: finish porting firefly storm commit 0fb973382929e36c77d32c7d56f902fd251bcd4b Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Jun 23 02:44:14 2021 +0300 stage3: partial firefly storm port commit ba174893a0b40418bf5b8e306c9ac95187b36e34 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Tue Feb 23 02:28:13 2021 +0200 stage3: enable all wriggle attacks commit 03e1dd80789e9cc22e9ac72807d7d74d173a76ef Author: Andrei Alexeyev <akari@taisei-project.org> Date: Tue Feb 23 02:22:35 2021 +0200 stage3: port wriggle nons commit 3308255579da026967f87ea2e16902aebe9a75d1 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Feb 22 16:27:50 2021 +0200 stage3: fix some indent issues commit b1c1115d7feebdb934e8c7bf5a4db9ab315478cb Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Feb 22 16:23:07 2021 +0200 stage3: fix deprecations in moonlight rocket commit 990489e960578c9b07342afc906f60584b8effc8 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Thu Feb 4 08:53:00 2021 +0200 stage3: port moonlight rocket commit 859592a89b98d442fd6172aa75493fcd5018e485 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Thu Feb 4 07:31:58 2021 +0200 stage3: basic port of wriggle slaves commit b88b4f5249f70e9b2ca8b33c2eaa7d9c084acffc Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Feb 1 06:28:30 2021 +0200 stage3: port Light Singularity commit db6bb1332622b5114bfbcaae70fab3f384e80e9d Author: Alice D <34408664+StarWitch@users.noreply.github.com> Date: Wed Mar 18 23:25:25 2020 -0400 stage3: preliminary coroutinization (#197) * first enemy of Stage 3 converted * review suggestions * add interval for burst_swirls * mid-commit * fairy group (second spawned enemies) * forgot to use my own variable * comment changes * better understanding of second arg of create_enemy* * fix subtasks (wasn't using them the correct way) * swirls that go from one side to the other * burst fairies complete * all complete up until midboss (stage 3 coroutines) * remove sub-rule for projectiles in charge_fairy * entire stage on coroutines now (boss spellcards missing) * rip out more old/dead code, make file better organized * timing changes * remove old background (looks jank now with new timing) * PR review changes * slight readability changes * Scuttle lethal_bite implemented * PR changes (ignore wriggle, she's still a WIP) * revert Info.plist entry (for separate PR) * finish(?) Scuttle's deadly dance, plus some PR changes Co-authored-by: Alice D <34408664+StarWitch@users.noreply.github.com> Co-authored-by: Lukas Weber <laochailan@web.de>
2023-01-27 23:57:12 +01:00
void stage3_init_wriggle_slave(WriggleSlave *slave, cmplx pos);
WriggleSlave *stage3_host_wriggle_slave(cmplx pos);
void stage3_despawn_wriggle_slave(WriggleSlave *slave);
DECLARE_EXTERN_TASK(wriggle_slave_damage_trail, { BoxedWriggleSlave slave; });
DECLARE_EXTERN_TASK(wriggle_slave_follow, {
BoxedWriggleSlave slave;
BoxedBoss boss;
real rot_speed;
real rot_initial;
cmplx *out_dir;
});