0% found this document useful (0 votes)
11 views3 pages

Music Selector

This document is a script for a music selector in Sonic CD, created by Christian Whitehead and unpacked by Rubberduckycooly. It defines various states for the music selector, manages object positioning based on user input, and handles sprite loading and drawing. The script includes detailed sprite frame definitions for different music tracks and their variations.

Uploaded by

Samuel Augusto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views3 pages

Music Selector

This document is a script for a music selector in Sonic CD, created by Christian Whitehead and unpacked by Rubberduckycooly. It defines various states for the music selector, manages object positioning based on user input, and handles sprite loading and drawing. The script includes detailed sprite frame definitions for different music tracks and their variations.

Uploaded by

Samuel Augusto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

//--------------Sonic CD Music Selector Script----------------//

//--------Scripted by Christian Whitehead 'The Taxman'--------//


//-------Unpacked By Rubberduckycooly's Script Unpacker-------//

// States
#alias 0 : MUSICSELECTOR_BLANK
#alias 1 : MUSICSELECTOR_STOP_MOVE_L
#alias 2 : MUSICSELECTOR_MOVE_L
#alias 3 : MUSICSELECTOR_STOP_MOVE_R
#alias 4 : MUSICSELECTOR_MOVE_R

sub ObjectMain
switch Object.State
case MUSICSELECTOR_BLANK
break

case MUSICSELECTOR_STOP_MOVE_L
Object.XPos -= 0xC0000
TempValue0 = Screen.CenterX
TempValue0 <<= 16
if Object.XPos <= TempValue0
Object.XPos = TempValue0
Object.State = MUSICSELECTOR_BLANK
end if
break

case MUSICSELECTOR_MOVE_L
Object.XPos -= 0xC0000
if Object.XPos < -0x600000
TempValue0 = Screen.XSize
TempValue0 += 192
TempValue0 <<= 16
Object.XPos += TempValue0
Object.State = MUSICSELECTOR_STOP_MOVE_L
if Object.Frame < 33
Object.Frame++
else
Object.Frame = 0
end if
end if
break

case MUSICSELECTOR_STOP_MOVE_R
Object.XPos += 0xC0000
TempValue0 = Screen.CenterX
TempValue0 <<= 16
if Object.XPos >= TempValue0
Object.XPos = TempValue0
Object.State = MUSICSELECTOR_BLANK
end if
break

case MUSICSELECTOR_MOVE_R
Object.XPos += 0xC0000
TempValue0 = Screen.XSize
TempValue0 += 96
TempValue0 <<= 16
if Object.XPos > TempValue0
Object.XPos -= TempValue0
Object.XPos -= 0x600000
Object.State = MUSICSELECTOR_STOP_MOVE_R
if Object.Frame > 0
Object.Frame--
else
Object.Frame = 33
end if
end if
break

end switch
end sub

sub ObjectDraw
DrawSprite(Object.Frame)
end sub

sub ObjectStartup
LoadSpriteSheet("DAGarden/Objects.gif")

SpriteFrame(-49, -4, 98, 8, 1, 577) // #0 - PPZ


SpriteFrame(-68, -4, 136, 8, 1, 586) // #1 - PPZ "G" Mix
SpriteFrame(-68, -4, 136, 8, 1, 595) // #2 - PPZ "B" Mix
switch SaveRam[512]
case 0
SpriteFrame(-42, -4, 94, 8, 1, 856) // #3 - DDZ
SpriteFrame(-65, -4, 130, 8, 1, 865) // #4 - DDZ "G" Mix
SpriteFrame(-65, -4, 130, 8, 1, 874) // #5 - DDZ "B" Mix
break

case 1
SpriteFrame(-42, -4, 84, 8, 1, 883) // #3 - RRZ
SpriteFrame(-60, -4, 120, 8, 1, 892) // #4 - RRZ "G" Mix
SpriteFrame(-60, -4, 120, 8, 1, 901) // #5 - RRZ "B" Mix
break

case 2 //"Relic Ruins". No relic ruins? :(


SpriteFrame(-35, -4, 70, 8, 1, 910) // #3 - RRZ
SpriteFrame(-53, -4, 106, 8, 1, 919) // #4 - RRZ "G" Mix
SpriteFrame(-53, -4, 106, 8, 1, 928) // #5 - RRZ "B" Mix
break

end switch
SpriteFrame(-54, -4, 108, 8, 1, 604) // #6 - CCZ
SpriteFrame(-72, -4, 144, 8, 1, 613) // #7 - CCZ "G" Mix
SpriteFrame(-72, -4, 144, 8, 1, 622) // #8 - CCZ "B" Mix
SpriteFrame(-46, -4, 92, 8, 1, 631) // #9 - TTZ
SpriteFrame(-65, -4, 130, 8, 1, 640) // #10 - TTZ "G" Mix
SpriteFrame(-65, -4, 130, 8, 1, 649) // #11 - TTZ "B" Mix
SpriteFrame(-54, -4, 108, 8, 1, 658) // #12 - QQZ
SpriteFrame(-72, -4, 144, 8, 1, 667) // #13 - QQZ "G" Mix
SpriteFrame(-72, -4, 144, 8, 1, 676) // #14 - QQZ "B" Mix
SpriteFrame(-55, -4, 110, 8, 1, 685) // #15 - WWZ
SpriteFrame(-73, -4, 146, 8, 1, 694) // #16 - WWZ "G" Mix
SpriteFrame(-73, -4, 146, 8, 1, 703) // #17 - WWZ "B" Mix
SpriteFrame(-61, -4, 122, 8, 1, 712) // #18 - SSZ
SpriteFrame(-79, -4, 158, 8, 1, 721) // #19 - SSZ "G" Mix
SpriteFrame(-79, -4, 158, 8, 1, 730) // #20 - SSZ "B" Mix
SpriteFrame(-59, -4, 118, 8, 1, 739) // #21 - MMZ
SpriteFrame(-77, -4, 154, 8, 1, 748) // #22 - MMZ "G" Mix
SpriteFrame(-77, -4, 154, 8, 1, 757) // #23 - MMZ "B" Mix
SpriteFrame(-38, -4, 76, 8, 1, 766) // #24 - Final Fever
SpriteFrame(-46, -4, 92, 8, 1, 775) // #25 - Little Planet
SpriteFrame(-33, -4, 66, 8, 1, 784) // #26 - Game Over
SpriteFrame(-36, -4, 72, 8, 1, 793) // #27 - Zone Clear
SpriteFrame(-18, -4, 36, 8, 1, 802) // #28 - Boss!!
SpriteFrame(-37, -4, 74, 8, 1, 811) // #29 - Invincible!!
SpriteFrame(-30, -4, 60, 8, 1, 820) // #30 - Speed Up!!
SpriteFrame(-18, -4, 36, 8, 1, 829) // #31 - Title
SpriteFrame(-45, -4, 90, 8, 1, 838) // #32 - Special Stage
SpriteFrame(-40, -4, 81, 8, 1, 847) // #33 - Time Attack
end sub

// ========================
// Editor Subs
// ========================

sub RSDKDraw
DrawSprite(0)
end sub

sub RSDKLoad
LoadSpriteSheet("DAGarden/Objects.gif")
SpriteFrame(-49, -4, 98, 8, 1, 577) // PPZ text

SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end sub

You might also like