Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/CPZ/CPZBoss.c
338 views
1
// ---------------------------------------------------------------------
2
// RSDK Project: Sonic Mania
3
// Object Description: CPZBoss Object
4
// Object Author: Christian Whitehead/Simon Thomley/Hunter Bridges
5
// Decompiled by: Rubberduckycooly & RMGRich
6
// ---------------------------------------------------------------------
7
8
#include "Game.h"
9
#include <time.h>
10
11
ObjectCPZBoss *CPZBoss;
12
13
void CPZBoss_Update(void)
14
{
15
RSDK_THIS(CPZBoss);
16
17
StateMachine_Run(self->state);
18
}
19
20
void CPZBoss_LateUpdate(void) {}
21
22
void CPZBoss_StaticUpdate(void) {}
23
24
void CPZBoss_Draw(void)
25
{
26
RSDK_THIS(CPZBoss);
27
28
RSDK.DrawSprite(&self->characterAnimator, NULL, false);
29
RSDK.DrawSprite(&self->enterAnimator, &self->startPos, false);
30
RSDK.DrawSprite(&self->panelAnimator, &self->startPos, false);
31
}
32
33
void CPZBoss_Create(void *data)
34
{
35
RSDK_THIS(CPZBoss);
36
37
if (!SceneInfo->inEditor) {
38
if (globals->gameMode == MODE_TIMEATTACK) {
39
destroyEntity(self);
40
}
41
else {
42
self->drawGroup = Zone->playerDrawGroup[0];
43
self->startPos = self->position;
44
self->active = ACTIVE_BOUNDS;
45
self->visible = true;
46
self->updateRange.x = 0x800000;
47
self->updateRange.y = 0x800000;
48
49
if (self->type == CPZBOSS_PLAYER) {
50
self->drawFX = FX_FLIP;
51
self->state = CPZBoss_State_SetupArena;
52
}
53
else {
54
RSDK.SetSpriteAnimation(CPZBoss->aniFrames, 2, &self->characterAnimator, true, 0);
55
RSDK.SetSpriteAnimation(CPZBoss->aniFrames, 0, &self->panelAnimator, true, 0);
56
}
57
}
58
}
59
}
60
61
void CPZBoss_StageLoad(void)
62
{
63
CPZBoss->aniFrames = RSDK.LoadSpriteAnimation("Eggman/EggmanCPZ.bin", SCOPE_STAGE);
64
65
CPZBoss->hitboxPlayerTrigger.left = -16;
66
CPZBoss->hitboxPlayerTrigger.top = 8;
67
CPZBoss->hitboxPlayerTrigger.right = 16;
68
CPZBoss->hitboxPlayerTrigger.bottom = 16;
69
70
CPZBoss->sfxExplosion = RSDK.GetSfx("Stage/Explosion2.wav");
71
72
RSDK.SetDrawGroupProperties(Zone->objectDrawGroup[1], false, StateMachine_None);
73
RSDK.SetDrawGroupProperties(Zone->objectDrawGroup[1] + 1, false, StateMachine_None);
74
}
75
76
void CPZBoss_DrawHook_SetupPuyoHUD(void) { RSDK.SetClipBounds(0, 0, 24, ScreenInfo->size.x, ScreenInfo->size.y); }
77
void CPZBoss_DrawHook_RemovePuyoHUD(void) { RSDK.SetClipBounds(0, 0, 0, ScreenInfo->size.x, ScreenInfo->size.y); }
78
79
void CPZBoss_Explode_Eggman(void)
80
{
81
RSDK_THIS(CPZBoss);
82
83
if (!(Zone->timer % 3)) {
84
RSDK.PlaySfx(CPZBoss->sfxExplosion, false, 0xFF);
85
if (Zone->timer & 4) {
86
int32 x = self->explosionPos.x + RSDK.Rand(-0x300000, 0x300000);
87
int32 y = self->explosionPos.y + RSDK.Rand(-0x100000, 0x100000);
88
CREATE_ENTITY(Explosion, INT_TO_VOID((RSDK.Rand(0, 256) > 192) + EXPLOSION_BOSS), x, y)->drawGroup = Zone->hudDrawGroup;
89
}
90
}
91
}
92
93
void CPZBoss_Explode_Player(void)
94
{
95
RSDK_THIS(CPZBoss);
96
97
if (!(Zone->timer % 3)) {
98
RSDK.PlaySfx(CPZBoss->sfxExplosion, false, 0xFF);
99
if (Zone->timer & 4) {
100
int32 x = self->position.x + RSDK.Rand(-0x100000, 0x100000);
101
int32 y = self->position.y + RSDK.Rand(-0x100000, 0x100000);
102
CREATE_ENTITY(Explosion, INT_TO_VOID((RSDK.Rand(0, 256) > 192) + EXPLOSION_BOSS), x, y)->drawGroup = Zone->hudDrawGroup;
103
}
104
}
105
}
106
107
bool32 CPZBoss_CheckMatchReset(void)
108
{
109
RSDK_THIS(CPZBoss);
110
111
if (!RSDK.CheckOnScreen(self, NULL)) {
112
RSDK.SetDrawGroupProperties(Zone->objectDrawGroup[1], false, StateMachine_None);
113
RSDK.SetDrawGroupProperties(Zone->objectDrawGroup[1] + 1, false, StateMachine_None);
114
Music_TransitionTrack(TRACK_STAGE, 0.0125);
115
PuyoBean->comboChainCount[0] = 0;
116
PuyoBean->disableBeanLink[0] = 0;
117
PuyoBean->comboChainCount[1] = 0;
118
PuyoBean->disableBeanLink[1] = 0;
119
120
for (int32 i = 0; i < 0x100; ++i) PuyoBean->playfield[i] = NULL;
121
122
foreach_all(PuyoBean, bean) { destroyEntity(bean); }
123
124
int32 layerID = RSDK.GetTileLayerID("FG High");
125
RSDK.CopyTileLayer(layerID, 438, 150, layerID, 452, 150, 6, 2);
126
SceneInfo->timeEnabled = true;
127
CPZBoss_Create(NULL);
128
129
return true;
130
}
131
return false;
132
}
133
134
void CPZBoss_State_SetupArena(void)
135
{
136
RSDK_THIS(CPZBoss);
137
138
if (++self->timer >= 8) {
139
SceneInfo->timeEnabled = false;
140
Music_SetMusicTrack("BossPuyo.ogg", TRACK_EGGMAN2, 846720);
141
Music_TransitionTrack(TRACK_EGGMAN2, 0.0125);
142
143
EntityCPZBoss *target = RSDK_GET_ENTITY(SceneInfo->entitySlot + 1, CPZBoss);
144
Camera_SetupLerp(CAMERA_LERP_SIN1024_2, 0, target->position.x, target->position.y, 8);
145
146
foreach_active(HUD, hud) { CPZBoss->hudSlotID = RSDK.GetEntitySlot(hud); }
147
148
HUD_MoveOut();
149
150
foreach_active(Player, player)
151
{
152
if (player->sidekick)
153
player->active = ACTIVE_NEVER;
154
else
155
player->velocity.y = 0;
156
}
157
158
switch (GET_CHARACTER_ID(1)) {
159
default:
160
case ID_SONIC: CPZBoss->playerFrames = RSDK.LoadSpriteAnimation("CPZ/MBMSonic.bin", SCOPE_STAGE); break;
161
case ID_TAILS: CPZBoss->playerFrames = RSDK.LoadSpriteAnimation("CPZ/MBMTails.bin", SCOPE_STAGE); break;
162
case ID_KNUCKLES: CPZBoss->playerFrames = RSDK.LoadSpriteAnimation("CPZ/MBMKnux.bin", SCOPE_STAGE); break;
163
#if MANIA_USE_PLUS
164
case ID_MIGHTY: CPZBoss->playerFrames = RSDK.LoadSpriteAnimation("CPZ/MBMMighty.bin", SCOPE_STAGE); break;
165
case ID_RAY: CPZBoss->playerFrames = RSDK.LoadSpriteAnimation("CPZ/MBMRay.bin", SCOPE_STAGE); break;
166
#endif
167
}
168
169
RSDK.SetSpriteAnimation(CPZBoss->playerFrames, 1, &self->enterAnimator, true, 0);
170
RSDK.SetSpriteAnimation(CPZBoss->playerFrames, 0, &self->panelAnimator, true, 0);
171
self->timer = 0;
172
self->active = ACTIVE_NORMAL;
173
self->state = CPZBoss_State_EnterPlayer;
174
}
175
}
176
177
void CPZBoss_State_EnterPlayer(void)
178
{
179
RSDK_THIS(CPZBoss);
180
181
if (!CPZBoss_CheckMatchReset() && ++self->timer >= 30) {
182
foreach_active(Player, player)
183
{
184
if (!player->sidekick)
185
player->velocity.y = 0x80000;
186
}
187
188
self->state = CPZBoss_State_CheckPlayerReady;
189
}
190
}
191
192
void CPZBoss_State_CheckPlayerReady(void)
193
{
194
RSDK_THIS(CPZBoss);
195
196
if (!CPZBoss_CheckMatchReset()) {
197
foreach_active(Player, player)
198
{
199
if (Player_CheckCollisionTouch(player, self, &CPZBoss->hitboxPlayerTrigger)) {
200
if (player->sidekick) {
201
player->state = Player_State_Air;
202
}
203
else {
204
player->visible = false;
205
player->active = ACTIVE_NEVER;
206
player->up = false;
207
player->down = false;
208
player->left = false;
209
player->right = false;
210
player->jumpPress = false;
211
player->jumpHold = false;
212
player->position.x = self->position.x;
213
player->position.y = self->position.y;
214
player->velocity.x = 0;
215
player->velocity.y = 0;
216
RSDK.SetSpriteAnimation(-1, 0, &self->enterAnimator, true, 0);
217
RSDK.SetSpriteAnimation(CPZBoss->playerFrames, 1, &self->characterAnimator, true, 1);
218
self->direction = FLIP_X;
219
self->state = CPZBoss_State_PlayPlayerEnterAnim;
220
}
221
}
222
}
223
}
224
}
225
226
void CPZBoss_State_PlayPlayerEnterAnim(void)
227
{
228
RSDK_THIS(CPZBoss);
229
230
if (!CPZBoss_CheckMatchReset()) {
231
RSDK.ProcessAnimation(&self->characterAnimator);
232
233
if (self->characterAnimator.frameID == self->characterAnimator.frameCount - 1) {
234
foreach_active(CPZBoss, boss)
235
{
236
if (boss->type == CPZBOSS_EGGMAN) {
237
RSDK.SetSpriteAnimation(CPZBoss->aniFrames, 4, &boss->characterAnimator, true, 0);
238
boss->state = CPZBoss_State_HandleMatch_Eggman;
239
}
240
}
241
self->state = CPZBoss_State_SetupMatch;
242
}
243
}
244
}
245
246
void CPZBoss_State_SetupMatch(void)
247
{
248
RSDK_THIS(CPZBoss);
249
250
if (!CPZBoss_CheckMatchReset() && ++self->timer == 60) {
251
foreach_active(CPZShutter, shutter) { shutter->state = CPZShutter_State_Open; }
252
int32 key = (int32)time(NULL);
253
int32 rand = RSDK.RandSeeded(0, 512, &key);
254
255
int32 matchCount = 0;
256
foreach_active(PuyoMatch, match)
257
{
258
RSDK.SetSpriteAnimation(-1, 0, &match->beanRAnimator, true, 0);
259
RSDK.SetSpriteAnimation(-1, 0, &match->beanLAnimator, true, 0);
260
match->state = PuyoMatch_State_HandleMatch;
261
match->matchKey = rand;
262
PuyoMatch_SetupNextBeans(match);
263
264
if (match->playerID == 1) {
265
match->stateInput = PuyoAI_Input_AI;
266
PuyoAI->isAI[match->playerID] = false;
267
PuyoAI->lastBeanY[match->playerID] = PUYO_PLAYFIELD_H;
268
PuyoAI->desiredColumn[match->playerID] = 0;
269
PuyoAI->desiredRotation[match->playerID] = 0;
270
PuyoAI->isAI[match->playerID] = true;
271
PuyoAI->controlInterval[match->playerID] = 16;
272
PuyoAI->controlChance[match->playerID] = 50;
273
}
274
275
CPZBoss->managers[matchCount++] = match;
276
}
277
278
self->direction = FLIP_NONE;
279
RSDK.SetSpriteAnimation(CPZBoss->playerFrames, 2, &self->characterAnimator, false, 0);
280
self->state = CPZBoss_State_HandleMatch_Player;
281
RSDK.SetDrawGroupProperties(Zone->objectDrawGroup[1], false, CPZBoss_DrawHook_SetupPuyoHUD);
282
RSDK.SetDrawGroupProperties(Zone->objectDrawGroup[1] + 1, false, CPZBoss_DrawHook_RemovePuyoHUD);
283
}
284
}
285
286
void CPZBoss_State_HandleMatch_Player(void)
287
{
288
RSDK_THIS(CPZBoss);
289
290
if (!CPZBoss_CheckMatchReset()) {
291
RSDK.ProcessAnimation(&self->characterAnimator);
292
293
EntityPuyoMatch *manager = CPZBoss->managers[self->type];
294
if (self->characterAnimator.animationID == 2) {
295
if (manager) {
296
EntityPuyoBean *bean = manager->beanPtr;
297
if (bean) {
298
if (bean->state == PuyoBean_State_JunkLand) {
299
RSDK.SetSpriteAnimation(CPZBoss->playerFrames, 3, &self->characterAnimator, false, 0);
300
}
301
else {
302
if (bean->down)
303
self->characterAnimator.frameID = 3;
304
else if (bean->left)
305
self->characterAnimator.frameID = 1;
306
else if (bean->right)
307
self->characterAnimator.frameID = 2;
308
309
if (bean->rotateRight)
310
self->characterAnimator.frameID = 4;
311
else if (bean->rotateLeft)
312
self->characterAnimator.frameID = 5;
313
}
314
}
315
}
316
}
317
else if (self->characterAnimator.animationID == 3 && self->characterAnimator.frameID == self->characterAnimator.frameCount - 1) {
318
RSDK.SetSpriteAnimation(CPZBoss->playerFrames, 2, &self->characterAnimator, false, 0);
319
}
320
321
if (ControllerInfo[CONT_P1].keyStart.press) {
322
if (RSDK_GET_ENTITY(SLOT_PAUSEMENU, PauseMenu)->classID == TYPE_BLANK) {
323
RSDK.ResetEntitySlot(SLOT_PAUSEMENU, PauseMenu->classID, NULL);
324
RSDK.PlaySfx(PauseMenu->sfxAccept, false, 0xFF);
325
RSDK.SetEngineState(ENGINESTATE_FROZEN);
326
}
327
}
328
329
if (manager) {
330
if (manager->state == PuyoMatch_State_Lose) {
331
PuyoBean_DestroyPuyoBeans();
332
self->timer = 0;
333
self->state = CPZBoss_State_HandleMatchFinish_PlayerLose;
334
PuyoAI->isAI[0] = false;
335
PuyoAI->isAI[1] = false;
336
RSDK.SetSpriteAnimation(CPZBoss->playerFrames, 3, &self->characterAnimator, false, 0);
337
}
338
}
339
}
340
}
341
342
void CPZBoss_State_HandleMatch_Eggman(void)
343
{
344
RSDK_THIS(CPZBoss);
345
346
if (!CPZBoss_CheckMatchReset()) {
347
RSDK.ProcessAnimation(&self->characterAnimator);
348
349
EntityPuyoMatch *manager = CPZBoss->managers[self->type];
350
if (self->characterAnimator.animationID == 2) {
351
if (manager) {
352
EntityPuyoBean *bean = manager->beanPtr;
353
if (bean && bean->state == PuyoBean_State_JunkLand)
354
RSDK.SetSpriteAnimation(CPZBoss->aniFrames, 3, &self->characterAnimator, false, 0);
355
}
356
}
357
else {
358
if (self->characterAnimator.animationID == 3 || self->characterAnimator.animationID == 4) {
359
if (self->characterAnimator.frameID == self->characterAnimator.frameCount - 1)
360
RSDK.SetSpriteAnimation(CPZBoss->aniFrames, 2, &self->characterAnimator, false, 0);
361
}
362
}
363
364
if (manager) {
365
if (manager->state == PuyoMatch_State_Lose) {
366
PuyoBean_DestroyPuyoBeans();
367
self->state = CPZBoss_State_HandleMatchFinish_EggmanLose;
368
self->explosionPos.x = self->position.x + 0x400000;
369
self->explosionPos.y = (ScreenInfo->size.y + ScreenInfo->position.y) << 16;
370
RSDK.SetSpriteAnimation(CPZBoss->aniFrames, 3, &self->characterAnimator, false, 0);
371
}
372
}
373
}
374
}
375
376
void CPZBoss_State_HandleMatchFinish_EggmanLose(void)
377
{
378
RSDK_THIS(CPZBoss);
379
380
if (!CPZBoss_CheckMatchReset()) {
381
RSDK.ProcessAnimation(&self->characterAnimator);
382
383
CPZBoss_Explode_Eggman();
384
385
self->explosionPos.y -= 0x40000;
386
if (self->explosionPos.y < self->position.y - 0xD00000) {
387
RSDK.SetSpriteAnimation(CPZBoss->aniFrames, 5, &self->characterAnimator, false, 0);
388
self->state = CPZBoss_State_PlayerWin;
389
foreach_active(CPZShutter, shutter) { shutter->state = CPZShutter_State_Close; }
390
}
391
}
392
}
393
394
void CPZBoss_State_PlayerWin(void)
395
{
396
RSDK_THIS(CPZBoss);
397
398
if (!CPZBoss_CheckMatchReset()) {
399
RSDK.ProcessAnimation(&self->characterAnimator);
400
401
CPZBoss_Explode_Player();
402
403
if (++self->timer == 60) {
404
self->timer = 0;
405
self->active = ACTIVE_NORMAL;
406
self->state = CPZBoss_State_EggmanFall;
407
RSDK.SetSpriteAnimation(CPZBoss->playerFrames, 1, &self->enterAnimator, true, 0);
408
RSDK.SetSpriteAnimation(CPZBoss->aniFrames, 6, &self->characterAnimator, false, 0);
409
Music_TransitionTrack(TRACK_STAGE, 0.0125);
410
411
RSDK.PlaySfx(PuyoBean->sfxFall, false, 255);
412
foreach_active(TippingPlatform, platform)
413
{
414
if (platform->bossID == TIPPINGPLATFORM_EGGMAN) {
415
platform->state = TippingPlatform_State_Tipping_Boss;
416
platform->timer = 120;
417
}
418
}
419
420
foreach_active(CPZBoss, boss)
421
{
422
if (!boss->type) {
423
boss->state = CPZBoss_State_PlayerExit;
424
RSDK.SetSpriteAnimation(-1, 0, &boss->characterAnimator, false, 0);
425
RSDK.SetSpriteAnimation(CPZBoss->playerFrames, 1, &boss->enterAnimator, true, 0);
426
427
foreach_all(Player, player)
428
{
429
player->up = false;
430
player->down = false;
431
player->left = false;
432
player->right = false;
433
player->velocity.x = 0;
434
player->velocity.y = 0;
435
player->groundVel = 0;
436
if (!player->sidekick)
437
player->stateInput = StateMachine_None;
438
player->visible = true;
439
player->active = ACTIVE_NORMAL;
440
player->position.x = boss->position.x;
441
player->position.y = boss->position.y;
442
}
443
}
444
}
445
}
446
}
447
}
448
449
void CPZBoss_State_HandleMatchFinish_PlayerLose(void)
450
{
451
RSDK_THIS(CPZBoss);
452
453
if (!CPZBoss_CheckMatchReset()) {
454
RSDK.ProcessAnimation(&self->characterAnimator);
455
456
if (++self->timer == 60) {
457
self->timer = 0;
458
self->state = (Type_StateMachine)CPZBoss_CheckMatchReset;
459
RSDK.PlaySfx(PuyoBean->sfxFall, false, 255);
460
foreach_active(TippingPlatform, platform)
461
{
462
if (platform->bossID == TIPPINGPLATFORM_PLAYER) {
463
platform->state = TippingPlatform_State_Tipping_Boss;
464
platform->timer = 120;
465
}
466
}
467
468
foreach_all(Player, player)
469
{
470
player->visible = true;
471
player->active = ACTIVE_NORMAL;
472
player->position.x = self->position.x;
473
player->position.y = self->position.y;
474
player->drawGroup = Zone->playerDrawGroup[0];
475
player->state = Player_State_Air;
476
player->onGround = false;
477
player->velocity.y = -0x20000;
478
RSDK.AddDrawListRef(Zone->playerDrawGroup[0], RSDK.GetEntitySlot(&player));
479
RSDK.SetSpriteAnimation(player->aniFrames, ANI_HURT, &player->animator, false, 0);
480
RSDK.SetSpriteAnimation(-1, 0, &self->characterAnimator, false, 0);
481
RSDK.SetSpriteAnimation(CPZBoss->playerFrames, 1, &self->enterAnimator, true, 0);
482
}
483
484
foreach_active(CPZShutter, shutter)
485
{
486
shutter->active = ACTIVE_NORMAL;
487
shutter->state = CPZShutter_State_Close;
488
}
489
490
EntityHUD *hud = RSDK_GET_ENTITY(CPZBoss->hudSlotID, HUD);
491
RSDK.ResetEntity(hud, HUD->classID, NULL);
492
HUD_MoveIn(hud);
493
}
494
}
495
}
496
497
void CPZBoss_State_EggmanFall(void)
498
{
499
RSDK_THIS(CPZBoss);
500
501
RSDK.ProcessAnimation(&self->characterAnimator);
502
if (self->timer > 32) {
503
self->velocity.y += 0x2800;
504
self->position.y += self->velocity.y;
505
}
506
507
if (++self->timer == 95)
508
self->state = StateMachine_None;
509
}
510
511
void CPZBoss_State_PlayerExit(void)
512
{
513
RSDK_THIS(CPZBoss);
514
515
if (++self->timer == 240) {
516
self->timer = 0;
517
foreach_active(Player, player)
518
{
519
player->state = Player_State_Air;
520
player->nextAirState = StateMachine_None;
521
player->nextGroundState = StateMachine_None;
522
player->applyJumpCap = false;
523
player->onGround = false;
524
player->position.x = self->position.x;
525
player->position.y = self->position.y;
526
player->velocity.x = 0;
527
player->velocity.y = -0x80000;
528
RSDK.SetSpriteAnimation(player->aniFrames, ANI_JUMP, &player->animator, false, 0);
529
Zone->playerBoundActiveR[player->playerID] = true;
530
}
531
532
EntityTransportTube *tube = RSDK_GET_ENTITY(SceneInfo->entitySlot + 3, TransportTube);
533
tube->dirMask = TRANSPORTTUBE_DIR_S | TRANSPORTTUBE_DIR_E;
534
TransportTube_SetupDirections(tube);
535
536
EntityHUD *hud = RSDK_GET_ENTITY(CPZBoss->hudSlotID, HUD);
537
RSDK.ResetEntity(hud, HUD->classID, NULL);
538
HUD_MoveIn(hud);
539
540
self->active = ACTIVE_NORMAL;
541
self->state = CPZBoss_State_Destroyed;
542
}
543
}
544
545
void CPZBoss_State_Destroyed(void)
546
{
547
RSDK_THIS(CPZBoss);
548
549
if (++self->timer == 24) {
550
for (int32 i = 0; i < Player->playerCount; ++i) {
551
EntityPlayer *player = RSDK_GET_ENTITY(i, Player);
552
if (player->camera)
553
player->camera->state = Camera_State_FollowXY;
554
if (!player->sidekick)
555
player->stateInput = Player_Input_P1;
556
}
557
558
self->active = ACTIVE_BOUNDS;
559
self->state = StateMachine_None;
560
}
561
}
562
563
#if GAME_INCLUDE_EDITOR
564
void CPZBoss_EditorDraw(void)
565
{
566
RSDK_THIS(CPZBoss);
567
self->startPos = self->position;
568
569
if (self->type == CPZBOSS_PLAYER) {
570
self->drawFX = FX_FLIP;
571
RSDK.SetSpriteAnimation(CPZBoss->playerFrames, 1, &self->enterAnimator, true, 0);
572
RSDK.SetSpriteAnimation(CPZBoss->playerFrames, 0, &self->panelAnimator, true, 0);
573
RSDK.SetSpriteAnimation(-1, 0, &self->characterAnimator, true, 0);
574
}
575
else {
576
RSDK.SetSpriteAnimation(CPZBoss->aniFrames, 2, &self->characterAnimator, true, 0);
577
RSDK.SetSpriteAnimation(CPZBoss->aniFrames, 0, &self->panelAnimator, true, 0);
578
RSDK.SetSpriteAnimation(-1, 0, &self->enterAnimator, true, 0);
579
}
580
581
CPZBoss_Draw();
582
}
583
584
void CPZBoss_EditorLoad(void)
585
{
586
CPZBoss->aniFrames = RSDK.LoadSpriteAnimation("Eggman/EggmanCPZ.bin", SCOPE_STAGE);
587
CPZBoss->playerFrames = RSDK.LoadSpriteAnimation("CPZ/MBMSonic.bin", SCOPE_STAGE);
588
589
RSDK_ACTIVE_VAR(CPZBoss, type);
590
RSDK_ENUM_VAR("Player", CPZBOSS_PLAYER);
591
RSDK_ENUM_VAR("Eggman", CPZBOSS_EGGMAN);
592
}
593
#endif
594
595
void CPZBoss_Serialize(void) { RSDK_EDITABLE_VAR(CPZBoss, VAR_UINT8, type); }
596
597