-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcBoss.h
1584 lines (1191 loc) · 54.9 KB
/
cBoss.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
///////////////////////////////////////////////////////
//*-------------------------------------------------*//
//| Part of Project One (https://www.maus-games.at) |//
//*-------------------------------------------------*//
//| Copyright (c) 2010 Martin Mauersics |//
//| Released under the zlib License |//
//*-------------------------------------------------*//
///////////////////////////////////////////////////////
#pragma once
#ifndef _P1_GUARD_BOSS_H_
#define _P1_GUARD_BOSS_H_
// TODO 5: boss0101, boomerangs may generate double-hits because of rotating box collision (when moving away from it), bitfield with reset (player-num)
// TODO 5: boss0101, energy direction in front-part of main-model should be inverted
// TODO 5: boss0101, something should grow when small boomerangs begin to create the duplicate
// TODO 5: boss0101, shadow and type rebinding for duplicate
// TODO 5: boss0101, definition for 1.5f (and related multiplications)
// TODO 5: boss0102, add slight explosion where rays hit the screen
// TODO 5: boss0102, separate emitters to three objects, to make them blue
// TODO 5: boss0103, remove small hitch when finishing rotation in the middle shortly before beginning laser-phase
// TODO 3: transformation properties are invalid on start (basically for phase 0), should this be handled ?
// TODO 4: remove counters and vectors (first remove usage)
// TODO 1: remove leviathan demo code + in-mission
// TODO 4: _RoundHealth and BOSS_HEALTH are not used anymore
// ****************************************************************
// boss definitions
#define BOSS_TIMERS (8u) //
#define BOSS_COUNTERS (16u) //
#define BOSS_VECTORS (12u) //
#define BOSS_PLAYERS (PLAYERS) //
#define BOSS_HELPERS (HELPERS - 1u) //
#define BOSS_HEALTH(x) (this->_RoundHealth(x)) //
// ****************************************************************
// boss specific definitions
#define DHARUK_TRAILS (3u) //
#define DHARUK_DUPLICATE_RAWS (2u * DHARUK_TRAILS) //
#define DHARUK_BOOMERANGS (4u) //
#define DHARUK_BOOMERANGS_RAWS (DHARUK_BOOMERANGS * (DHARUK_TRAILS + 1u)) //
#define DHARUK_WIDTH (0.5f) //
#define DHARUK_HEIGHT (0.75f) //
#define DHARUK_OUTSIDE (1.5f) //
#define TORUS_TURRETS (2u) //
#define TORUS_GUNNERS (4u) //
#define TORUS_CHARGERS (2u) //
#define TORUS_DRIVERS (4u) //
#define TORUS_WAVERS (4u) //
#define TORUS_BARRIERS (8u) //
#define TORUS_BOSS_ROTATION (1.2f) //
#define TORUS_RUMBLE_VOLUME (1.5f) //
#define NAUTILUS_ATTACH_DIST (-10.0f) //
#define NAUTILUS_INK_TIME (10.0f) //
#define NAUTILUS_INK_SPEED (1.65f) //
#define LEVIATHAN_PARTS (5u) //
#define LEVIATHAN_PARTS_BODIES (LEVIATHAN_PARTS - 2u) //
#define LEVIATHAN_RAYS (LEVIATHAN_PARTS) //
#define LEVIATHAN_RAYS_RAWS (2u * LEVIATHAN_RAYS) //
#define LEVIATHAN_MARKS (LEVIATHAN_PARTS) //
#define LEVIATHAN_MARKS_RAWS (LEVIATHAN_MARKS) //
#define LEVIATHAN_RADIUS_OUTER (FOREGROUND_AREA.x * 0.8f) //
#define LEVIATHAN_RADIUS_INNER_1 (10.0f) //
#define LEVIATHAN_RADIUS_INNER_2 (10.0f) //
#define LEVIATHAN_RAY_OFFSET(i) ((i) ? 3.6f : 4.8f) //
#define LEVIATHAN_RAY_HEIGHT (0.2f) //
#define LEVIATHAN_RAY_SIZE (coreVector3(1.4f,50.0f,1.4f)) //
#define LEVIATHAN_RAY_TEXSIZE (coreVector2(0.5f,1.5f)) //
#define LEVIATHAN_RAYWAVE_SIZE (coreVector3(2.8f,7.0f,2.8f)) //
#define LEVIATHAN_RAYWAVE_TEXSIZE (coreVector2(0.5f,0.5f)) //
#define LEVIATHAN_TILES (16u) //
#define TIGER_SIDES (4u) //
#define TIGER_STINGS (32u * TIGER_SIDES) //
#define TIGER_STINGS_SIDE (32u) //
#define TIGER_WEAPONS (5u) //
#define TIGER_SUBS (5u) //
#define TIGER_AIMS (5u) //
#define TIGER_DAMAGE (70) //
#define MESSIER_SHELLS (2u) //
#define MESSIER_RINGS (3u) //
#define MESSIER_TRAILS (3u) //
#define MESSIER_ENEMIES_SMALL (8u) //
#define MESSIER_ENEMIES_BIG (8u) //
#define MESSIER_METEOR_RANGE (1.35f) //
#define MESSIER_SHOOT_RATE (1.8f) //
#define MESSIER_SHOOT_RADIUS (8.0f * (BULLET_SPEED_FACTOR / MESSIER_SHOOT_RATE)) //
#define MESSIER_SHOOT_STEP (0.01f) //
#define MESSIER_SHOOT_TIMES (3u) //
#define MESSIER_SCALE (10.0f) //
#define CHOL_WINGS (4u) //
#define CHOL_SHIFT (4.0f) //
#define CHOL_FAKE_SCORE (57300u) //
#define ZEROTH_LIMBS (6u) //
#define ZEROTH_ICES (2u) //
#define ZEROTH_LIMB_HEAD (0u) //
#define ZEROTH_LIMB_TAIL (3u) //
#define ZEROTH_RADIUS (8.0f) //
#define ZEROTH_RADIUS_BULLET (2.0f) //
#define ZEROTH_SPEED_SLOW (8.0f) //
#define ZEROTH_SPEED_FAST (16.0f) //
#define ZEROTH_LASER_SIZE (coreVector3(1.65f,45.0f,1.65f)) //
#define ZEROTH_LASER_TEXSIZE (coreVector2(0.5f,1.0f)) //
#define ZEROTH_LASERWAVE_SIZE (coreVector3(2.9f,22.5f,2.9f)) //
#define ZEROTH_LASERWAVE_TEXSIZE (coreVector2(0.5f,1.5f)) //
#define GEMINGA_ENEMIES_TELEPORT (4u) //
#define GEMINGA_ENEMIES_LEGION (10u) //
#define PROJECTONE_SHIELDS (HELPERS - 1u) //
#define PROJECTONE_CLONES (5u) //
#define PROJECTONE_FRAGMENTS (FRAGMENTS - 1u) //
#define PROJECTONE_ENEMIES_METEOR (8u) //
#define PROJECTONE_ENEMIES_LEGION (4u) //
#define PROJECTONE_COLL_SCALE (1.1f) //
#define EIGENGRAU_LAYERS (4u) //
#define EIGENGRAU_PARASITES (1u)//18u) //
#define EIGENGRAU_FOLLOWERS (1u)//52u) //
#define EIGENGRAU_DEPTH (-340.0f) //
// ****************************************************************
// phase management macros
#define PHASE_CONTROL_TIMER(a,b,c) this->_PhaseTimer (a, __LINE__, b, c, [&](const coreFloat fTime, const coreFloat fTimeBefore, const coreBool __bEnd) // NOLINT
#define PHASE_CONTROL_TICKER(a,b,c,d) this->_PhaseTicker(a, __LINE__, b, c, d, [&](const coreUint16 iTick, const coreBool __bEnd) // NOLINT
#define PHASE_CONTROL_PAUSE(a,b) PHASE_CONTROL_TICKER(a, 1u, b, LERP_LINEAR)
#define PHASE_HEALTH_GOAL(...) {static constexpr coreInt32 A[] = __VA_ARGS__; m_piHealthGoal = A; STATIC_ASSERT(!A[ARRAY_SIZE(A) - 1u])}
#define PHASE_TIME_POINT(t) (InBetween((t), fTimeBefore, fTime))
#define PHASE_TIME_BEFORE(t) (fTime < (t))
#define PHASE_TIME_AFTER(t) (fTime >= (t))
#define PHASE_TIME_BETWEEN(t,u) (InBetween(fTime, (t), (u)))
#define PHASE_BEGINNING (PHASE_TIME_POINT(0.0f))
#define PHASE_MAINTIME_POINT(t) (InBetween((t), m_fPhaseTimeBefore, m_fPhaseTime))
#define PHASE_MAINTIME_BEFORE(t) (m_fPhaseTime < (t))
#define PHASE_MAINTIME_AFTER(t) (m_fPhaseTime >= (t))
#define PHASE_MAINTIME_BETWEEN(t,u) (InBetween(m_fPhaseTime, (t), (u)))
#define PHASE_BEGINNING2 (PHASE_MAINTIME_POINT(0.0f))
#define PHASE_POSITION_POINT(e,t,v) (STAGE_POSITION_POINT (e, t, v))
#define PHASE_POSITION_BEFORE(e,t,v) (STAGE_POSITION_BEFORE (e, t, v))
#define PHASE_POSITION_AFTER(e,t,v) (STAGE_POSITION_AFTER (e, t, v))
#define PHASE_POSITION_BETWEEN(e,t,u,v) (STAGE_POSITION_BETWEEN(e, t, u, v))
#define PHASE_FLYPAST(e,f,v) (STAGE_FLYPAST (e, f, v))
#define PHASE_CHANGE_TO(i) {this->ChangePhase(i);}
#define PHASE_CHANGE_INC {this->ChangePhase(m_iPhase + 1u);}
#define PHASE_RESET(i) {m_aTimer[i].Stop(); m_aiTimerLine[i] = 0u;}
#define PHASE_AGAIN(i) {m_aTimer[i].SetValue(fTimeBefore - 1.0f); m_bControlAgain = true;}
#define PHASE_FINISHED (__bEnd)
// ****************************************************************
//
#define LERP_LINEAR (&LERP <coreFloat, coreFloat>)
#define LERP_SMOOTH (&LERPS <coreFloat, coreFloat>)
#define LERP_SMOOTH_REV (&LerpSmoothRev<coreFloat>)
#define LERP_BREAK (&LERPB <coreFloat, coreFloat>)
#define LERP_BREAK_REV (&LERPBR <coreFloat, coreFloat>)
#define LERP_HERMITE3 (&LERPH3 <coreFloat, coreFloat>)
#define LERP_HERMITE5 (&LERPH5 <coreFloat, coreFloat>)
// ****************************************************************
// boss entity interface
class INTERFACE cBoss : public cEnemy
{
protected:
coreTimer m_aTimer [BOSS_TIMERS]; //
coreUint16 m_aiTimerLine[BOSS_TIMERS]; //
coreInt16 m_aiCounter[BOSS_COUNTERS]; //
coreVector4 m_avVector [BOSS_VECTORS]; //
coreVector2 m_vLastPosition; //
coreVector3 m_vLastDirection; //
coreVector3 m_vLastOrientation; //
const coreInt32* m_piHealthGoal; //
coreInt32 m_iMaxHealthGoal; //
coreUint8 m_iPhase; //
coreFlow m_fPhaseTime; //
coreFloat m_fPhaseTimeBefore; //
coreFlow m_fStartup; //
coreBool m_bControlAgain; //
coreUint8 m_iHelperSpawn; //
coreUint8 m_iHelperHit; //
coreBool m_bActive; //
coreBool m_bForeshadow; //
coreBool m_bSkipped; //
static coreVector2 s_vPositionPoint; //
public:
cBoss()noexcept;
virtual ~cBoss()override;
DISABLE_COPY(cBoss)
ENABLE_ID_EX
ENABLE_EXTRA
//
void ChangePhase(const coreUint8 iPhase);
//
void StorePosition(const coreVector2 vPos);
void StorePosition();
void StoreRotation(const coreVector3 vDir, const coreVector3 vOri);
void StoreRotation();
//
coreFloat CalcHealthGoal()const;
//
inline coreBool HasStartup()const {return (m_fStartup != 0.0f) && !m_bForeshadow;}
//
inline coreBool HasAllHelpers()const {return (m_iHelperHit == BITLINE(BOSS_HELPERS));}
// get object properties
inline const coreInt32* GetHealthGoal ()const {return m_piHealthGoal;}
inline const coreInt32& GetMaxHealthGoal()const {return m_iMaxHealthGoal;}
inline const coreUint8& GetPhase ()const {return m_iPhase;}
inline const coreUint8& GetHelperHit ()const {return m_iHelperHit;}
virtual const coreChar* GetMusicName ()const {return "";}
protected:
//
void _StartBoss();
void _EndBoss();
//
void _UpdateBoss();
//
void _ResurrectBoss();
//
coreBool _ResurrectHelper(const coreUint8 iElement, const coreBool bSmooth);
void _KillHelper (const coreUint8 iElement, const coreBool bAnimated);
//
void _CreateFragment(const coreUint8 iType, const coreVector2 vPosition);
void _CreateFragment(const coreUint8 iType);
//
coreInt32 _RoundHealth(const coreInt32 iHealth)const;
//
template <typename F, typename G> void _PhaseTimer (const coreUintW iTimerIndex, const coreUint16 iCodeLine, const coreFloat fSpeed, G&& nLerpFunc, F&& nUpdateFunc); // [](const coreFloat x, const coreFloat y, const coreFloat s) -> coreFloat, [](const coreFloat fTime, const coreFloat fTimeBefore, const coreBool __bEnd) -> void
template <typename F, typename G> void _PhaseTicker(const coreUintW iTimerIndex, const coreUint16 iCodeLine, const coreUint16 iTicks, const coreFloat fRate, G&& nLerpFunc, F&& nUpdateFunc); // [](const coreFloat x, const coreFloat y, const coreFloat s) -> coreFloat, [](const coreUint16 iTick, const coreBool __bEnd) -> void
};
// ****************************************************************
// Dharuk boss class
class cDharukBoss final : public cBoss
{
private:
cCustomEnemy m_Duplicate; //
coreBatchList m_DuplicateTrail; //
coreObject3D m_aDuplicateRaw[DHARUK_DUPLICATE_RAWS]; //
coreFloat m_fDuplicateValue; //
coreBatchList m_Boomerang; //
coreBatchList m_BoomerangTrail; //
coreObject3D m_aBoomerangRaw [DHARUK_BOOMERANGS_RAWS]; //
coreFloat m_afBoomerangValue[DHARUK_BOOMERANGS]; //
coreObject3D m_Summon; //
coreFlow m_afVisibility[2]; //
coreBool m_bHelperEvent; //
coreUint8 m_iPackedDir; //
coreFlow m_fAnimation; // animation value
public:
cDharukBoss()noexcept;
~cDharukBoss()final;
DISABLE_COPY(cDharukBoss)
ASSIGN_ID_EX(101, "DHARUK", COLOR_MENU_RED, COLOR_MENU_RED, coreVector2(-1.0f,-1.0f))
ASSIGN_EXTRA("ダルク")
//
inline const coreBool& GetHelperEvent()const {return m_bHelperEvent;}
private:
// execute own routines
void __ResurrectOwn ()final;
void __KillOwn (const coreBool bAnimated)final;
void __RenderOwnUnder()final;
void __RenderOwnOver ()final;
void __MoveOwn ()final;
//
void __EnableDuplicate ();
void __DisableDuplicate(const coreBool bAnimated);
//
void __EnableBoomerang (const coreUintW iIndex, const coreVector2 vPosition, const coreVector2 vDirection);
void __DisableBoomerang(const coreUintW iIndex, const coreBool bAnimated);
//
void __EnableSummon (const coreVector2 vPosition);
void __DisableSummon(const coreBool bAnimated);
//
inline void __BecomeInvisible1() {m_afVisibility[0] = -1.0f; this ->SetAlpha(0.0f); this ->AddStatus(ENEMY_STATUS_HIDDEN);}
inline void __BecomeInvisible2() {m_afVisibility[1] = -1.0f; m_Duplicate.SetAlpha(0.0f); m_Duplicate.AddStatus(ENEMY_STATUS_HIDDEN);}
//
coreVector2 __RepeatPosition (const coreVector2 vPosition, const coreFloat fThreshold, coreBool* OUTPUT pbChange);
coreVector2 __RepeatPosition (const coreVector2 vPosition, const coreFloat fThreshold);
void __EncodeDirection(const coreUintW iIndex, const coreVector2 vDirection);
coreVector2 __DecodeDirection(const coreUintW iIndex)const;
};
// ****************************************************************
// Torus boss class
class cTorusBoss final : public cBoss
{
private:
coreObject3D m_Emitter; //
coreObject3D m_aCircle[2]; //
coreObject3D m_Summon; //
cCustomEnemy m_aTurret[TORUS_TURRETS]; //
coreBatchList m_TurretHull; //
coreObject3D m_aTurretHullRaw[TORUS_TURRETS]; //
cCustomEnemy m_aGunner[TORUS_GUNNERS]; //
coreBatchList m_GunnerHull; //
coreObject3D m_aGunnerHullRaw[TORUS_GUNNERS]; //
cCustomEnemy m_aCharger[TORUS_CHARGERS]; //
coreBatchList m_ChargerHull; //
coreObject3D m_aChargerHullRaw[TORUS_CHARGERS]; //
cCustomEnemy m_aDriver[TORUS_DRIVERS]; //
coreBatchList m_DriverHull; //
coreObject3D m_aDriverHullRaw[TORUS_DRIVERS]; //
cCustomEnemy m_aWaver[TORUS_WAVERS]; //
coreBatchList m_WaverHull; //
coreObject3D m_aWaverHullRaw[TORUS_WAVERS]; //
coreFlow m_fAnimation; // animation value
coreFlow m_fRotationBoss; //
coreFlow m_fRotationObject; //
coreUint8 m_iTurretActive; //
coreUint8 m_iTurretMove; //
coreUint8 m_iGunnerActive; //
coreUint8 m_iChargerActive; //
coreUint8 m_iDriverActive; //
coreUint8 m_iWaverActive; //
coreUint8 m_iDecalState; //
coreSoundPtr m_pRumbleSound; //
coreSoundPtr m_pWooshSound; //
public:
cTorusBoss()noexcept;
~cTorusBoss()final;
DISABLE_COPY(cTorusBoss)
ASSIGN_ID_EX(102, "TORUS", COLOR_MENU_GREEN, COLOR_MENU_GREEN, coreVector2(0.75f,0.25f))
ASSIGN_EXTRA("トーラス")
// get object properties
inline const coreChar* GetMusicName()const final {return "boss_01";}
private:
// execute own routines
void __ResurrectOwn ()final;
void __KillOwn (const coreBool bAnimated)final;
void __RenderOwnBottom()final;
void __RenderOwnUnder ()final;
void __RenderOwnOver ()final;
void __MoveOwn ()final;
//
void __EnableSummon (const coreVector2 vPosition, const coreVector3 vColor);
void __DisableSummon(const coreBool bAnimated);
//
void __EnableTurret (const coreUintW iIndex, const coreVector2 vPosition);
void __DisableTurret(const coreUintW iIndex, const coreBool bAnimated);
//
void __EnableGunner (const coreUintW iIndex, const coreVector2 vPosition);
void __DisableGunner(const coreUintW iIndex, const coreBool bAnimated);
//
void __EnableCharger (const coreUintW iIndex, const coreVector2 vPosition, const coreVector2 vDirection);
void __DisableCharger(const coreUintW iIndex, const coreBool bAnimated);
//
void __EnableDriver (const coreUintW iIndex, const coreVector2 vPosition, const coreVector2 vDirection);
void __DisableDriver(const coreUintW iIndex, const coreBool bAnimated);
//
void __EnableWaver (const coreUintW iIndex, const coreVector2 vPosition);
void __DisableWaver(const coreUintW iIndex, const coreBool bAnimated);
//
void __CreateOverdrive(const coreVector3 vIntersect);
//
void __ChangeColor(const coreUint8 iType);
//
static coreFloat __PositionToGrind (const coreVector2 vPosition);
static coreVector2 __GrindToPosition (const coreFloat fGrind);
static coreVector2 __GrindToPosition2(const coreFloat fGrind);
static coreVector2 __GrindToPosition3(const coreFloat fGrind);
};
// ****************************************************************
// Vaus boss class
class cVausBoss final : public cBoss
{
private:
cCustomEnemy m_aCompanion[2]; //
public:
cVausBoss()noexcept;
~cVausBoss()final;
DISABLE_COPY(cVausBoss)
ASSIGN_ID_EX(103, "VAUS", COLOR_MENU_YELLOW, COLOR_MENU_YELLOW, coreVector2(-1.0f,-1.0f))
ASSIGN_EXTRA("バウス")
private:
// execute own routines
void __ResurrectOwn()final;
void __KillOwn (const coreBool bAnimated)final;
void __MoveOwn ()final;
};
// ****************************************************************
// Nautilus boss class
class cNautilusBoss final : public cBoss
{
private:
cCustomEnemy m_aClaw[2]; //
coreFloat m_fClawAngle; //
coreObject3D m_InkBullet; //
coreVector2 m_vInkTarget; //
coreFlow m_afInkAlpha[2]; //
coreFlow m_fAnimation; // animation value
coreFlow m_fMovement; //
public:
cNautilusBoss()noexcept;
~cNautilusBoss()final;
DISABLE_COPY(cNautilusBoss)
ASSIGN_ID_EX(201, "NAUTILUS", coreVector3(0.0f,0.0f,0.0f), coreVector3(0.0f,0.0f,0.0f), coreVector2(-1.0f,-1.0f))
ASSIGN_EXTRA("")
private:
// execute own routines
void __ResurrectOwn ()final;
void __KillOwn (const coreBool bAnimated)final;
void __RenderOwnOver()final;
void __MoveOwn ()final;
//
void __CreateInk(const coreUintW iIndex, const coreVector2 vPosition);
//
void __EnableBullet (const coreVector2 vStart, const coreVector2 vEnd);
void __DisableBullet(const coreBool bAnimated);
};
// ****************************************************************
// Amemasu boss class
class cAmemasuBoss final : public cBoss
{
public:
cAmemasuBoss()noexcept;
~cAmemasuBoss()final;
DISABLE_COPY(cAmemasuBoss)
ASSIGN_ID_EX(202, "AMEMASU", coreVector3(0.0f,0.0f,0.0f), coreVector3(0.0f,0.0f,0.0f), coreVector2(-1.0f,-1.0f))
ASSIGN_EXTRA("")
private:
// execute own routines
void __MoveOwn()final;
};
// ****************************************************************
// Leviathan boss class
class cLeviathanBoss final : public cBoss
{
private:
cCustomEnemy m_Head; //
cCustomEnemy m_aBody[LEVIATHAN_PARTS_BODIES]; //
cCustomEnemy m_Tail; //
coreBatchList m_Ray; //
coreBatchList m_RayWave; //
coreObject3D m_aRayRaw [LEVIATHAN_RAYS_RAWS]; //
coreFlow m_afRayTime[LEVIATHAN_RAYS]; //
coreFloat m_afRayLen [LEVIATHAN_RAYS]; //
coreUint8 m_iRayState; //
coreBatchList m_Mark; //
coreObject3D m_aMarkRaw [LEVIATHAN_MARKS]; //
coreUint16 m_iDecalState; //
coreVector2 m_avSwimDir [LEVIATHAN_PARTS]; //
coreUint8 m_aiSwimCount[LEVIATHAN_PARTS]; //
coreFlow m_fAnimation; // animation value
coreFlow m_fMovement; //
coreSoundPtr m_pLaserSound; //
coreSoundPtr m_pRumbleSound; //
public:
cLeviathanBoss()noexcept;
~cLeviathanBoss()final;
DISABLE_COPY(cLeviathanBoss)
ASSIGN_ID_EX(203, "LEVIATHAN", COLOR_MENU_CYAN, COLOR_MENU_CYAN, coreVector2(0.5f,0.25f))
ASSIGN_EXTRA("レヴィアタン")
//
void ResurrectDemo();
// get object properties
inline const coreChar* GetMusicName()const final {return "boss_02";}
private:
// execute own routines
void __ResurrectOwn ()final;
void __KillOwn (const coreBool bAnimated)final;
void __RenderOwnBottom()final;
void __RenderOwnUnder ()final;
void __RenderOwnOver ()final;
void __MoveOwn ()final;
//
void __EnableRay (const coreUintW iIndex, const coreBool bAnimated);
void __DisableRay (const coreUintW iIndex, const coreBool bAnimated);
void __BeginRay (const coreUintW iIndex);
void __CreateOverdrive(const coreUintW iIndex, const coreVector3 vIntersect, const coreFloat fTime, const coreBool bGround);
//
void __EnableMark (const coreUintW iIndex);
void __DisableMark(const coreUintW iIndex, const coreBool bAnimated);
//
void __UpdateHealth();
void __RefreshHealth(const coreInt32 iHead, const coreInt32 iBody, const coreInt32 iTail);
//
static FUNC_NOALIAS void __CalcCurvePosDir(const coreVector3 vAxis, const coreFloat fAngle, const coreVector3 vScale, coreVector3* OUTPUT vPosition, coreVector3* OUTPUT vDirection);
static FUNC_CONST coreFloat __CalcAngle (const coreFloat fDistance, const coreFloat fRadius);
//
cEnemy* __GetPart (const coreUintW iIndex);
static FUNC_CONST coreFloat __GetPartDistance(const coreUintW iIndex);
};
// ****************************************************************
// Urtica boss class
class cUrticaBoss final : public cBoss
{
public:
cUrticaBoss()noexcept;
~cUrticaBoss()final;
DISABLE_COPY(cUrticaBoss)
ASSIGN_ID_EX(301, "URTICA", coreVector3(0.0f,0.0f,0.0f), coreVector3(0.0f,0.0f,0.0f), coreVector2(-1.0f,-1.0f))
ASSIGN_EXTRA("")
private:
// execute own routines
void __MoveOwn()final;
};
// ****************************************************************
// Tiger boss class
class cTigerBoss final : public cBoss
{
private:
cCustomEnemy m_aTrack [2]; //
cCustomEnemy m_aWeapon [TIGER_SUBS]; //
cCustomEnemy m_aWeaponOld[TIGER_SUBS]; //
coreObject3D m_aBeam[2]; //
coreVector2 m_vBeamPos; //
coreFlow m_fBeamTime; //
coreObject3D m_aAim[TIGER_AIMS]; //
coreObject3D m_AimRing; //
coreBatchList m_Sting; //
coreObject3D m_aStingRaw [TIGER_STINGS]; //
coreFlow m_afStingTime[TIGER_SIDES]; //
coreVector2 m_avPushDir[2]; // (0 = current | 1 = target)
coreFlow m_fPushPower; //
coreBool m_bPushState; //
coreModelPtr m_aapModelHigh[TIGER_WEAPONS][TIGER_SUBS]; //
coreModelPtr m_aapModelLow [TIGER_WEAPONS][TIGER_SUBS]; //
coreUint8 m_iWeaponType; //
coreUint8 m_iWeaponTypeOld; //
coreFlow m_fWeaponChange; //
coreUint16 m_aiBulletHit[TIGER_WEAPONS]; //
coreUint8 m_iDecalState; //
coreFlow m_fAnimation; //
coreSoundPtr m_pTankSound; //
public:
cTigerBoss()noexcept;
~cTigerBoss()final;
DISABLE_COPY(cTigerBoss)
ASSIGN_ID_EX(302, "TIGER MK-III", COLOR_MENU_YELLOW, COLOR_MENU_YELLOW, coreVector2(0.0f,0.0f))
ASSIGN_EXTRA("タイガーマーク III")
//
inline coreBool ResurrectHelper(const coreUint8 iElement, const coreBool bSmooth) {return this->_ResurrectHelper(iElement, bSmooth);}
inline void KillHelper (const coreUint8 iElement, const coreBool bAnimated) {this->_KillHelper(iElement, bAnimated);}
// get object properties
inline const coreChar* GetMusicName()const final {return "boss_03";}
private:
// execute own routines
void __ResurrectOwn ()final;
void __KillOwn (const coreBool bAnimated)final;
void __RenderOwnBottom()final;
void __RenderOwnOver ()final;
void __MoveOwn ()final;
//
void __EnableBeam (const coreVector2 vPosition);
void __DisableBeam(const coreBool bAnimated);
//
void __EnableAim (const coreUintW iIndex);
void __DisableAim(const coreUintW iIndex, const coreBool bAnimated);
//
void __EnableStings (const coreUintW iIndex);
void __DisableStings(const coreUintW iIndex, const coreBool bAnimated);
//
void __EnableWind (const coreVector2 vDir);
void __DisableWind();
//
void __SwitchWeapon(const coreUintW iType);
//
void __ShootWeapon();
//
void __CauseBeamDamage(cPlayer* OUTPUT pTarget);
//
void __CreateTrail (const coreUintW iIndex, const coreVector3 vIntersect);
void __CreateOverdrive(const coreVector3 vIntersect);
};
// ****************************************************************
// Lucifer boss class
class cLuciferBoss final : public cBoss
{
public:
cLuciferBoss()noexcept;
~cLuciferBoss()final;
DISABLE_COPY(cLuciferBoss)
ASSIGN_ID_EX(303, "L.U.C.I.F.E.R.", coreVector3(0.0f,0.0f,0.0f), coreVector3(0.0f,0.0f,0.0f), coreVector2(-1.0f,-1.0f))
ASSIGN_EXTRA("")
private:
// execute own routines
void __MoveOwn()final;
};
// ****************************************************************
// Quaternion boss class
class cQuaternionBoss final : public cBoss
{
public:
cQuaternionBoss()noexcept;
~cQuaternionBoss()final;
DISABLE_COPY(cQuaternionBoss)
ASSIGN_ID_EX(401, "QUATERNION", coreVector3(0.0f,0.0f,0.0f), coreVector3(0.0f,0.0f,0.0f), coreVector2(-1.0f,-1.0f))
ASSIGN_EXTRA("")
private:
// execute own routines
void __MoveOwn()final;
};
// ****************************************************************
// Saros boss class
class cSarosBoss final : public cBoss
{
public:
cSarosBoss()noexcept;
~cSarosBoss()final;
DISABLE_COPY(cSarosBoss)
ASSIGN_ID_EX(402, "SAROS", coreVector3(0.0f,0.0f,0.0f), coreVector3(0.0f,0.0f,0.0f), coreVector2(-1.0f,-1.0f))
ASSIGN_EXTRA("")
private:
// execute own routines
void __MoveOwn()final;
};
// ****************************************************************
// Messier boss class
class cMessierBoss final : public cBoss
{
private:
cCustomEnemy m_aShell[MESSIER_SHELLS]; //
coreObject3D m_aRing[MESSIER_RINGS]; //
coreFlow m_fRingTime; //
coreFlow m_fRingScreen; //
coreObject3D m_aClock [2]; //
coreObject3D m_aaClockTrail [2][MESSIER_TRAILS]; //
coreFlow m_aafClockAlpha[2][MESSIER_TRAILS]; //
coreFlow m_fClockTime; //
coreBool m_bClockState; //
coreObject3D m_Bubble; //
coreFlow m_fBubbleTime; //
coreFlow m_fBubbleAlpha; //
coreBool m_bBubbleState; //
coreObject3D m_aHole[2]; //
coreBool m_bHoleState; //
coreFloat m_fTimeFactor; //
coreUint8 m_iTimeRevert; //
coreBool m_bTimeMusic; //
coreFlow m_afShootTime[MESSIER_SHOOT_TIMES]; //
coreUint32 m_aiShootTick[MESSIER_SHOOT_TIMES]; //
coreUint32 m_iTick; //
coreFlow m_fMeteorRota; //
coreFlow m_fBossRota; //
coreSoundPtr m_pBellSound; //
coreSoundPtr m_pVoidSound; //
public:
cMessierBoss()noexcept;
~cMessierBoss()final;
DISABLE_COPY(cMessierBoss)
ASSIGN_ID_EX(403, "MESSIER 87", COLOR_MENU_MAGENTA, COLOR_MENU_MAGENTA, coreVector2(0.75f,0.0f))
ASSIGN_EXTRA("メシエ 87")
// get object properties
inline const coreChar* GetMusicName ()const final {return "boss_04";}
inline const coreChar* GetMusicNameRev()const {return "boss_04_reverse";}
private:
// execute own routines
void __ResurrectOwn ()final;
void __KillOwn (const coreBool bAnimated)final;
void __RenderOwnUnder()final;
void __RenderOwnOver ()final;
void __RenderOwnTop ()final;
void __MoveOwn ()final;
//
void __EnableRings ();
void __DisableRings(const coreBool bAnimated);
//
void __EnableClock ();
void __DisableClock(const coreBool bAnimated);
//
void __EnableBubble (const coreVector3 vColor);
void __DisableBubble(const coreBool bAnimated);
//
void __EnableHole ();
void __DisableHole(const coreBool bAnimated);
//
void __SetWavePosition(const coreVector2 vPosition);
//
void __AddBullet (const coreUintW iType, const coreFloat fSpeed, const coreVector2 vPosition, const coreVector2 vDirection);
coreBool __PhaseTicker(const coreUintW iIndex, const coreFloat fRate);
};
// ****************************************************************
// Tartarus boss class
class cTartarusBoss final : public cBoss
{
public:
cTartarusBoss()noexcept;
~cTartarusBoss()final;
DISABLE_COPY(cTartarusBoss)
ASSIGN_ID_EX(501, "TARTARUS", coreVector3(0.0f,0.0f,0.0f), coreVector3(0.0f,0.0f,0.0f), coreVector2(-1.0f,-1.0f))
ASSIGN_EXTRA("")
private:
// execute own routines
void __MoveOwn()final;
};
// ****************************************************************
// Phalaris boss class
class cPhalarisBoss final : public cBoss
{
public:
cPhalarisBoss()noexcept;
~cPhalarisBoss()final;
DISABLE_COPY(cPhalarisBoss)
ASSIGN_ID_EX(502, "PHALARIS", coreVector3(0.0f,0.0f,0.0f), coreVector3(0.0f,0.0f,0.0f), coreVector2(-1.0f,-1.0f))
ASSIGN_EXTRA("")
private:
// execute own routines
void __MoveOwn()final;
};
// ****************************************************************
// Chol boss class
class cCholBoss final : public cBoss
{
private:
cCustomEnemy m_aWing[CHOL_WINGS]; //
coreObject3D m_Fire; //
coreUint8 m_aiWingState [CHOL_WINGS]; //
coreFlow m_afWingTime [CHOL_WINGS]; //
coreVector3 m_avWingReturn[CHOL_WINGS]; //
coreModelPtr m_apFireModel[2]; //
coreFlow m_fFireFade; //
coreUint8 m_iFireType; //
coreBool m_bFireActive; //
coreFloat m_fWebLevel; //
coreFloat m_fWebReverse; //
coreUintW m_iWebIndex; //
coreUintW m_iPathIndex; //
coreUint8 m_iPathSide; //
coreFloat m_fTilt; //
coreFloat m_fFlap; //
coreFloat m_fPush; //
coreFlow m_fCountdown; //
coreFlow m_fAnimation; //
public:
cCholBoss()noexcept;
~cCholBoss()final;
DISABLE_COPY(cCholBoss)
ASSIGN_ID_EX(503, "CHOL", COLOR_MENU_ORANGE, COLOR_MENU_ORANGE, coreVector2(0.25f,0.0f))
ASSIGN_EXTRA("コール")
//
void ResurrectIntro(const coreUint8 iSub);
// get object properties
inline const coreChar* GetMusicName()const final {return "boss_05";}
private:
// execute own routines
void __ResurrectOwn ()final;
void __KillOwn (const coreBool bAnimated)final;
void __RenderOwnUnder()final;
void __MoveOwn ()final;
//
void __EnableFire (const coreUint8 iType);
void __DisableFire(const coreBool bAnimated);
//
inline void __ChangeWing (const coreUintW iIndex, const coreUint8 iState) {ASSERT(iIndex < CHOL_WINGS) m_aiWingState[iIndex] = iState; m_afWingTime[iIndex] = 0.0f;}
inline void __ChangeWingInc (const coreUintW iIndex) {this->__ChangeWing(iIndex, m_aiWingState[iIndex] + 1u);}
inline void __ChangeWingReset (const coreUintW iIndex) {this->__ChangeWing(iIndex, 0u);}
inline void __ChangeWingIntro (const coreUintW iIndex) {this->__ChangeWing(iIndex, 1u);}
inline void __ChangeWingThrow1 (const coreUintW iIndex) {this->__ChangeWing(iIndex, 11u);}
inline void __ChangeWingThrow2 (const coreUintW iIndex) {this->__ChangeWing(iIndex, 21u);}
inline void __ChangeWingReturn (const coreUintW iIndex) {this->__ChangeWing(iIndex, 31u);}
inline void __ChangeWingPull (const coreUintW iIndex) {this->__ChangeWing(iIndex, 41u);}
inline void __ChangeWingSpike (const coreUintW iIndex) {this->__ChangeWing(iIndex, 51u);}
inline void __ChangeWingExplode1 (const coreUintW iIndex) {this->__ChangeWing(iIndex, 61u);}
inline void __ChangeWingExplode2 (const coreUintW iIndex) {this->__ChangeWing(iIndex, 71u);}
inline void __ChangeWingResurrect1(const coreUintW iIndex) {this->__ChangeWing(iIndex, 81u);}
inline void __ChangeWingResurrect2(const coreUintW iIndex) {this->__ChangeWing(iIndex, 91u);}
//
void __RepairWing(const coreUintW iIndex, const coreInt32 iHealth);
//
void __Impact(coreObject3D* OUTPUT pObject, const coreVector2 vPos, const coreVector3 vDir, const coreFloat fTime, const coreFloat fTimeBefore, const coreBool bBig);
//
void __ResurrectFake();
void __KillFake();
};
// ****************************************************************
// Fenrir boss class
class cFenrirBoss final : public cBoss
{
public:
cFenrirBoss()noexcept;
~cFenrirBoss()final;