Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-Mania-Decompilation
Path: blob/master/SonicMania/Objects/PGZ/InkWipe.c
338 views
1
// ---------------------------------------------------------------------
2
// RSDK Project: Sonic Mania
3
// Object Description: InkWipe Object
4
// Object Author: Christian Whitehead/Simon Thomley/Hunter Bridges
5
// Decompiled by: Rubberduckycooly & RMGRich
6
// ---------------------------------------------------------------------
7
8
#include "Game.h"
9
10
ObjectInkWipe *InkWipe;
11
12
// This object doesn't look like it was ever fully finished, a bummer indeed
13
14
void InkWipe_Update(void)
15
{
16
RSDK_THIS(InkWipe);
17
18
RSDK.ProcessAnimation(&self->animator);
19
}
20
21
void InkWipe_LateUpdate(void) {}
22
23
void InkWipe_StaticUpdate(void) {}
24
25
void InkWipe_Draw(void)
26
{
27
RSDK_THIS(InkWipe);
28
29
RSDK.DrawSprite(&self->animator, NULL, false);
30
}
31
32
void InkWipe_Create(void *data)
33
{
34
RSDK_THIS(InkWipe);
35
36
if (!SceneInfo->inEditor) {
37
self->active = ACTIVE_BOUNDS;
38
self->visible = true;
39
self->drawGroup = Zone->objectDrawGroup[1];
40
self->updateRange.x = 0x800000;
41
self->updateRange.y = 0x800000;
42
RSDK.SetSpriteAnimation(InkWipe->aniFrames, 0, &self->animator, true, 0);
43
}
44
}
45
46
void InkWipe_StageLoad(void)
47
{
48
if (RSDK.CheckSceneFolder("PSZ1"))
49
InkWipe->aniFrames = RSDK.LoadSpriteAnimation("PSZ1/InkWipe.bin", SCOPE_STAGE);
50
}
51
52
#if GAME_INCLUDE_EDITOR
53
void InkWipe_EditorDraw(void)
54
{
55
RSDK_THIS(InkWipe);
56
57
self->drawGroup = Zone->objectDrawGroup[1];
58
self->updateRange.x = 0x800000;
59
self->updateRange.y = 0x800000;
60
RSDK.SetSpriteAnimation(InkWipe->aniFrames, 0, &self->animator, true, 0);
61
62
InkWipe_Draw();
63
}
64
65
void InkWipe_EditorLoad(void) { InkWipe->aniFrames = RSDK.LoadSpriteAnimation("PSZ1/InkWipe.bin", SCOPE_STAGE); }
66
#endif
67
68
void InkWipe_Serialize(void) {}
69
70