Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R6/BossCamera.txt
1319 views
1
//----------------Sonic CD Boss Camera Script-----------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
// Aliases
6
#alias Object.Value0 : Object.CameraHeight
7
#alias Object.Value1 : Object.BoundaryHeight
8
9
10
sub ObjectMain
11
TempValue0 = Object.YPos
12
TempValue0 -= Player.YPos
13
TempValue0 >>= 25
14
15
if TempValue0 != Object.CameraHeight
16
if Object.CameraHeight < TempValue0
17
Stage.NewYBoundary2 = TempValue0
18
Stage.NewYBoundary2 *= -512
19
Stage.NewYBoundary2 += Object.iYPos
20
Object.BoundaryHeight = Stage.NewYBoundary2
21
else
22
Stage.YBoundary2 = TempValue0
23
Stage.YBoundary2 *= -512
24
Stage.YBoundary2 += Object.iYPos
25
Object.BoundaryHeight = Stage.YBoundary2
26
end if
27
28
Object.CameraHeight = TempValue0
29
else
30
if Object.BoundaryHeight < Stage.YBoundary2
31
Stage.YBoundary2--
32
33
if Object.BoundaryHeight < Stage.YBoundary2
34
Stage.YBoundary2--
35
end if
36
37
if Object.BoundaryHeight < Stage.YBoundary2
38
Stage.YBoundary2--
39
end if
40
41
if Object.BoundaryHeight < Stage.YBoundary2
42
Stage.YBoundary2--
43
end if
44
end if
45
end if
46
end sub
47
48
49
// ========================
50
// Editor Subs
51
// ========================
52
53
sub RSDKDraw
54
DrawSprite(0)
55
end sub
56
57
58
sub RSDKLoad
59
LoadSpriteSheet("Global/Display.gif")
60
SpriteFrame(-16, -16, 32, 32, 1, 143) // #0 - "Script" Icon
61
62
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
63
end sub
64
65