Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-CD-2011-Script-Decompilation
Path: blob/main/Scripts/R6/R6BounceFloor.txt
1319 views
1
//------------Sonic CD R6 BounceFloor Script-------------//
2
//--------Scripted by Christian Whitehead 'The Taxman'--------//
3
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//
4
5
//-------Aliases-------//
6
7
#alias Object.Scale : Object.BounceFloorFlag
8
9
// Stage SFX
10
#alias 0 : SFX_S_BOUNCEFLOOR
11
12
// Priority
13
#alias 1 : PRIORITY_ACTIVE
14
15
// Tile Info
16
#alias 8 : TILEINFO_ANGLEB
17
18
// Gravity
19
#alias 1 : GRAVITY_AIR
20
21
sub ObjectPlayerInteraction
22
TempValue2 = Player.XPos
23
TempValue2 >>= 16
24
TempValue2 += Player.CollisionRight
25
TempValue3 = Player.YPos
26
TempValue3 >>= 16
27
TempValue3 += Player.CollisionBottom
28
TempValue3 += 2
29
Get16x16TileInfo(TempValue0, TempValue2, TempValue3, TILEINFO_ANGLEB)
30
31
TempValue2 = Player.XPos
32
TempValue2 >>= 16
33
TempValue2 += Player.CollisionLeft
34
Get16x16TileInfo(TempValue1, TempValue2, TempValue3, TILEINFO_ANGLEB)
35
36
TempValue0 |= TempValue1
37
if TempValue0 == 1
38
if Stage.PlayerListPos == PLAYER_KNUCKLES
39
if Player.State == Player_State_LedgePullUp
40
TempValue0 = 0
41
Object.Value2 = 1 // Not sure what this is, figure out later.
42
end if
43
end if
44
end if
45
if TempValue0 == 1
46
if Object[19].BounceFloorFlag == 1
47
if Player.YVelocity > -1
48
Player.Animation = ANI_JUMPING
49
Player.Gravity = GRAVITY_AIR
50
Player.Timer = 0
51
Player.YVelocity = -0x160000
52
Player.State = Player_State_Air_NoDropDash
53
PlayStageSfx(SFX_S_BOUNCEFLOOR, false)
54
end if
55
end if
56
end if
57
end sub
58
59
60
sub ObjectStartup
61
Object[1000].Type = TypeName[R6BounceFloor]
62
Object[1000].Priority = PRIORITY_ACTIVE
63
end sub
64
65
sub RSDKDraw
66
DrawSprite(0)
67
end sub
68
69
sub RSDKLoad
70
LoadSpriteSheet("Global/Display.gif")
71
SpriteFrame(-16, -16, 32, 32, 1, 143)
72
end sub
73
74