; Definition of stage 0 (training stage)
; *** denotes values you should change/check for each stage.
; The term "background" is used to mean both backgrounds and foregrounds.

;--------------------------------------------------------
[Info]
 ;Name of the stage.
name = "Super Smash Bros. Brawl - Sunset"

;--------------------------------------------------------
[Camera]
 ;Camera starting position: Usually 0 for both
startx = 0
starty = 0

 ;Left and right bound of camera
 ;You may want to fiddle a bit with these values to make sure the
 ;background doesn't move too far or too little
 ;***
boundleft = -192
boundright = 192

 ;High and low bound of camera
 ;High is a negative number. Make is more negative if you want to
 ;camera to be able to move higher.
 ;Low should usually be 0.
 ;If omitted, defaults to -25 and 0 respectively
 ;***
boundhigh = -192
boundlow = 0

 ;This is how much the camera will move vertically towards the
 ;highest player. Valid values are from 0 to 1. A value of 0 will mean
 ;the camera does not move up at all. A value of 1 will makes the camera
 ;follow the highest player.
 ;Typically .2 for normal-sized backgrounds. You may need to pull this
 ;value up for taller backgrounds.
verticalfollow = 0.8

 ;Minimum vertical distance the highest player has to be from the floor,
 ;before the camera starts to move up to follow him. For extremely
 ;tall stages, a floor tension of about 20-30 coupled with a
 ;vertical-follow of .8 allows the camera to follow the action.
floortension = 60

 ;Horizontal distance player is from edge before camera starts to move
 ;left or right. Typically 50 or 60.
tension = 50


;--------------------------------------------------------
[PlayerInfo]
;--- Player 1 ---
 ;Player 1 starting coordinates.
 ;p1startx is typically -70 and p2startx is 70.
 ;p1starty and p1startz should be 0.
p1startx = -70          ;Starting x coordinates
p1starty = 0            ;Starting y coordinates
p1startz = 0            ;Starting z coordinates
p1facing = 1            ;Direction player faces: 1=right, -1=left

;--- Player 2 ---
p2startx = 70
p2starty = 0
p2startz = 0
p2facing = -1

;--- Common ---
 ;Don't change these values.
leftbound  = -1000 ;Left bound (x-movement)
rightbound =  1000 ;Right bound
topbound  =  0     ;Top bound (z-movement)
botbound  =  0     ;Bottom bound

;--------------------------------------------------------
[Scaling]
 ;No need to change these values
topz     = 0       ;Top z-coordinate for scaling
botz     = 50      ;Bottom z-coordinate for scaling
topscale = 1       ;Scale to use at top
botscale = 1.2     ;Scale to use at bottom

;--------------------------------------------------------
[Bound]
 ;Distance from left/right edge of screen that player can move to
 ;Typically 15
screenleft = 15    ;Dist from left of screen that player can move to
screenright = 15   ;Right edge

;--------------------------------------------------------
[StageInfo]
 ;Z offset for drawing
 ;Adjust this value to move the ground level up/down in the screen.
 ;It's the position where the players stand at.
 ;Up - smaller, Down - larger
 ;***
zoffset = 208
zoffsetlink = 33

 ;Leave this at 1. It makes the players face each other
autoturn = 1

 ;Set the following to 1 to have the background be reset between
 ;rounds.
resetBG = 0

;--------------------------------------------------------
[Shadow]
 ;This is the shadow darkening intensity. Valid values range from
 ;0 (lightest) to 256 (darkest). Defaults to 128 if omitted.
intensity = 96

 ;This is the shadow color given in r,g,b. Valid values for each
 ;range from 0 (lightest) to 255 (darkest).
 ;Defaults to 0,0,0 if omitted.
 ;intensity and color's effects add up to give the final shadow
 ;result.
color = 0,0,0

 ;This is the scale factor of the shadow. Use a big scale factor
 ;to make the shadow longer. You can use a NEGATIVE scale factor
 ;to make the shadow fall INTO the screen.
 ;Defaults to 0.4 if omitted.
yscale = .3

 ;This parameter lets you set the range over which the shadow is
 ;visible. The first value is the high level, and the second is
 ;the middle level. Both represent y-coordinates of the player.
 ;A shadow is invisible if the player is above the high level,
 ;and fully visible if below the middle level. The shadow is
 ;faded in between the two levels. This gives an effect of the
 ;shadow fading away as the player gets farther away from the
 ;ground. If omitted, defaults to no level effects (shadow is
 ;always fully visible).
fade.range = 0,0

;--------------------------------------------------------
[Reflection]
 ;Intensity of reflection (from 0 to 256). Set to 0 to have no
 ;reflection. Defaults to 0.
intensity = 0

;--------------------------------------------------------
[Music]
 ;Put a filename for a MOD, MP3 or MIDI here, or just leave it
 ;blank if you don't want music. If an invalid filename is
 ;given, then no music will play. To play CD audio, put
 ;the track number followed by ".da". Using a track number of
 ;0 will play a random audio track. For example, to play
 ;track 3 from a music CD, use:
 ;  bgmusic = 3.da
bgmusic = sound/ssbbsunset.mp3
;bgmusic = sound/ssbbsunset.adx

 ;Adjust the volume. 0 is normal, negative for softer, and
 ;positive for louder (only for mp3, mods and CDA)
bgvolume = 0

;========================================================
;--------------------------------------------------------
; Background definition
; ***
;-------------------------------------
; [BG x]
; type = ?       "Normal"/"Parallax"  (def: "normal")
; spriteno = ?, ? Sprite group and number: groupno, imgno  (req'd)
; start = ?, ?   Starting location (integer)  (def: 0, 0)
; delta = ?, ?   Change in location per camera unit moved (float)  (def: 1,1)
; trans = ?      Transparency settings: "none"/"add"/"add1"/"sub"" (def: "none")
; mask = ?       Masking (int): 0 - off, 1 - on  (def: 0)
; velocity = ?, ? Velocity: x, y (float): speed background moves (def: 0, 0)
; tile = ?, ?    Tiling: xtile, ytile (int): 0 - off, 1 - infinite,
;                        >1 - tile that number of times  (def: 0, 0) - only for Normal BG
; tilespacing = ?, ? Tiling: x, y (int) : space between tiles (def: 0, 0)
;  Parallax-only:
; xscale = ?, ?    Top xscale, bottom xscale (float)
; width = ?, ?     Top width, bottom width (int)  (use either this or above, but not both)
; yscalestart = ?  Starting y-scale (float, in percent)  (def: 100)
; yscaledelta = ?  Change in y-scale per unit (float, in percent)  (def: 0)
;-------------------------------------

;-------------------------------------
; Main background definition
[BGdef]
 ;Filename of sprite data
spr = ssbbsunset.sff

 ;Set to 1 if you want to clear the screen to magenta before
 ;drawing layer 0 (the default background). Good for spotting "holes"
 ;in your background.
 ;Remember to turn this off when you are done debugging the background,
 ;because it slows down performance.
debugbg = 0

[BG 0]
type  = normal
spriteno = 0, 0
start = -160, 0
delta = 0, 0

[BG 0]
type  = normal
spriteno = 0, 1
start = -160, 0
delta = 0.05, 0.05
trans = add
tile = 1, 1
window = 0, -96, 319, 111
windowdelta = 0, 0.1
id = 37

[BG Water 1]
type = parallax
spriteno = 1, 0
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 1

[BG Water 2]
type = parallax
spriteno = 1, 1
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 2

[BG Water 3]
type = parallax
spriteno = 1, 2
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 3

[BG Water 4]
type = parallax
spriteno = 1, 3
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 4

[BG Water 5]
type = parallax
spriteno = 1, 4
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 5

[BG Water 6]
type = parallax
spriteno = 1, 5
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 6

[BG Water 7]
type = parallax
spriteno = 1, 6
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 7

[BG Water 8]
type = parallax
spriteno = 1, 7
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 8

[BG Water 9]
type = parallax
spriteno = 1, 8
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 9

[BG Water 10]
type = parallax
spriteno = 1, 9
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 10

[BG Water 11]
type = parallax
spriteno = 1, 10
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 11

[BG Water 12]
type = parallax
spriteno = 1, 11
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 12

[BG Water 13]
type = parallax
spriteno = 1, 12
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 13

[BG Water 14]
type = parallax
spriteno = 1, 13
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 14

[BG Water 15]
type = parallax
spriteno = 1, 14
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 15

[BG Water 16]
type = parallax
spriteno = 1, 15
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 16

[BG Water 17]
type = parallax
spriteno = 1, 16
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 17

[BG Water 18]
type = parallax
spriteno = 1, 17
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 18

[BG Water 19]
type = parallax
spriteno = 1, 18
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 19

[BG Water 20]
type = parallax
spriteno = 1, 19
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 20

[BG Water 21]
type = parallax
spriteno = 1, 20
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 21

[BG Water 22]
type = parallax
spriteno = 1, 21
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 22

[BG Water 23]
type = parallax
spriteno = 1, 22
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 23

[BG Water 24]
type = parallax
spriteno = 1, 23
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 24

[BG Water 25]
type = parallax
spriteno = 1, 24
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 25

[BG Water 26]
type = parallax
spriteno = 1, 25
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 26

[BG Water 27]
type = parallax
spriteno = 1, 26
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 27

[BG Water 28]
type = parallax
spriteno = 1, 27
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 28

[BG Water 29]
type = parallax
spriteno = 1, 28
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 29

[BG Water 30]
type = parallax
spriteno = 1, 29
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 30

[BG Water 31]
type = parallax
spriteno = 1, 30
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 31

[BG Water 32]
type = parallax
spriteno = 1, 31
start = 0, 176
delta = 0.1, 0.1
xscale = 0.5, 1.5
trans = add
alpha = 75, 25
id = 32

[BGCtrlDef WaterAnim]
looptime = 160

[BGCtrl Enabled 1]
type = Enable
value = 1
ctrlID = 1
time = 0

[BGCtrl Disable 1a]
type = Enable
value = 0
ctrlID = 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
time = 0

[BGCtrl Disable 1b]
type = Enable
value = 0
ctrlID = 12, 13, 14, 15, 16, 17, 18, 19, 20, 21
time = 0

[BGCtrl Disable 1c]
type = Enable
value = 0
ctrlID = 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
time = 0

[BGCtrl Disable 1d]
type = Enable
value = 0
ctrlID = 32
time = 0

[BGCtrl Enabled 2]
type = Enable
value = 1
ctrlID = 2
time = 5

[BGCtrl Disable 2]
type = Enable
value = 0
ctrlID = 1
time = 5

[BGCtrl Enabled 3]
type = Enable
value = 1
ctrlID = 3
time = 10

[BGCtrl Disable 3]
type = Enable
value = 0
ctrlID = 2
time = 10

[BGCtrl Enabled 4]
type = Enable
value = 1
ctrlID = 4
time = 15

[BGCtrl Disable 4]
type = Enable
value = 0
ctrlID = 3
time = 15

[BGCtrl Enabled 5]
type = Enable
value = 1
ctrlID = 5
time = 20

[BGCtrl Disable 5]
type = Enable
value = 0
ctrlID = 4
time = 20

[BGCtrl Enabled 6]
type = Enable
value = 1
ctrlID = 6
time = 25

[BGCtrl Disable 6]
type = Enable
value = 0
ctrlID = 5
time = 25

[BGCtrl Enabled 7]
type = Enable
value = 1
ctrlID = 7
time = 30

[BGCtrl Disable 7]
type = Enable
value = 0
ctrlID = 6
time = 30

[BGCtrl Enabled 8]
type = Enable
value = 1
ctrlID = 8
time = 35

[BGCtrl Disable 8]
type = Enable
value = 0
ctrlID = 7
time = 35

[BGCtrl Enabled 9]
type = Enable
value = 1
ctrlID = 9
time = 40

[BGCtrl Disable 9]
type = Enable
value = 0
ctrlID = 8
time = 40

[BGCtrl Enabled 10]
type = Enable
value = 1
ctrlID = 10
time = 45

[BGCtrl Disable 10]
type = Enable
value = 0
ctrlID = 9
time = 45

[BGCtrl Enable 11]
type = Enable
value = 1
ctrlID = 11
time = 50

[BGCtrl Disable 11]
type = Enable
value = 0
ctrlID = 10
time = 50

[BGCtrl Enable 12]
type = Enable
value = 1
ctrlID = 12
time = 55

[BGCtrl Disable 12]
type = Enable
value = 0
ctrlID = 11
time = 55

[BGCtrl Enable 13]
type = Enable
value = 1
ctrlID = 13
time = 60

[BGCtrl Disable 13]
type = Enable
value = 0
ctrlID = 12
time = 60

[BGCtrl Enable 14]
type = Enable
value = 1
ctrlID = 14
time = 65

[BGCtrl Disable 14]
type = Enable
value = 0
ctrlID = 13
time = 65

[BGCtrl Enable 15]
type = Enable
value = 1
ctrlID = 15
time = 70

[BGCtrl Disable 15]
type = Enable
value = 0
ctrlID = 14
time = 70

[BGCtrl Enable 16]
type = Enable
value = 1
ctrlID = 16
time = 75

[BGCtrl Disable 16]
type = Enable
value = 0
ctrlID = 15
time = 75

[BGCtrl Enable 17]
type = Enable
value = 1
ctrlID = 17
time = 80

[BGCtrl Disable 17]
type = Enable
value = 0
ctrlID = 16
time = 80

[BGCtrl Enable 18]
type = Enable
value = 1
ctrlID = 18
time = 85

[BGCtrl Disable 18]
type = Enable
value = 0
ctrlID = 17
time = 85

[BGCtrl Enable 19]
type = Enable
value = 1
ctrlID = 19
time = 90

[BGCtrl Disable 19]
type = Enable
value = 0
ctrlID = 18
time = 90

[BGCtrl Enable 20]
type = Enable
value = 1
ctrlID = 20
time = 95

[BGCtrl Disable 20]
type = Enable
value = 0
ctrlID = 19
time = 95

[BGCtrl Enable 21]
type = Enable
value = 1
ctrlID = 21
time = 100

[BGCtrl Disable 21]
type = Enable
value = 0
ctrlID = 20
time = 100

[BGCtrl Enable 22]
type = Enable
value = 1
ctrlID = 22
time = 105

[BGCtrl Disable 22]
type = Enable
value = 0
ctrlID = 20
time = 105

[BGCtrl Enable 23]
type = Enable
value = 1
ctrlID = 23
time = 110

[BGCtrl Disable 23]
type = Enable
value = 0
ctrlID = 22
time = 110

[BGCtrl Enable 24]
type = Enable
value = 1
ctrlID = 24
time = 115

[BGCtrl Disable 24]
type = Enable
value = 0
ctrlID = 23
time = 115

[BGCtrl Enable 25]
type = Enable
value = 1
ctrlID = 25
time = 120

[BGCtrl Disable 25]
type = Enable
value = 0
ctrlID = 24
time = 120

[BGCtrl Enable 26]
type = Enable
value = 1
ctrlID = 26
time = 125

[BGCtrl Disable 26]
type = Enable
value = 0
ctrlID = 25
time = 125

[BGCtrl Enable 27]
type = Enable
value = 1
ctrlID = 27
time = 130

[BGCtrl Disable 27]
type = Enable
value = 0
ctrlID = 26
time = 130

[BGCtrl Enable 28]
type = Enable
value = 1
ctrlID = 28
time = 135

[BGCtrl Disable 28]
type = Enable
value = 0
ctrlID = 27
time = 135

[BGCtrl Enable 29]
type = Enable
value = 1
ctrlID = 29
time = 140

[BGCtrl Disable 29]
type = Enable
value = 0
ctrlID = 28
time = 140

[BGCtrl Enable 30]
type = Enable
value = 1
ctrlID = 30
time = 145

[BGCtrl Disable 30]
type = Enable
value = 0
ctrlID = 29
time = 145

[BGCtrl Enable 31]
type = Enable
value = 1
ctrlID = 31
time = 150

[BGCtrl Disable 31]
type = Enable
value = 0
ctrlID = 30
time = 150

[BGCtrl Enable 32]
type = Enable
value = 1
ctrlID = 32
time = 155

[BGCtrl Disable 32]
type = Enable
value = 0
ctrlID = 31
time = 155

[BG Water Overlay]
type = normal
spriteno = 5, 1
start = 0, 112
delta = 0.1, 0.1
velocity = 0, -0.25
trans = addalpha
alpha = 128, 256
tile = 1, 1
window = 0, 112, 319, 239
windowdelta = 0, 0.1
id = 36

[BG Water Overlay 2]
type = normal
spriteno = 5, 0
start = 0, 112
delta = 0.1, 0.1
velocity = 0, 0.3
trans = addalpha
alpha = 96, 256
tile = 1, 1
window = 0, 112, 319, 239
windowdelta = 0, 0.1
id = 36

[BG Horizon]
type = normal
spriteno = 0, 2
start = 0, 112
delta = 0, 0.1
trans = add
id = 36

[BG X]
Type = normal
spriteno = 6, 0
start = 0, 80
delta = 0.08, 0.08
trans = add
id = 35

[BG EE]
type = normal
spriteno = 7, 0
start = 208, -48
delta = 0.25, 0.25
id = 38
sin.y = 1, 60, 0
mask = 1

[BG Dummy]
type = dummy
id = 33

[BG Cliff 1]
type = normal
spriteno = 3, 1
delta = 0.757, 1
start = -119, 61
id = 34

[BG Cliff 2]
type = normal
spriteno = 3, 1
delta = 0.76, 1
start = 94, 63
id = 34

[BG Cliff 3]
type = normal
spriteno = 3, 2
delta = 0.78, 1
start = 189, 75
mask = 1
id = 34

[BG Cliff 4]
type = normal
spriteno = 3, 2
delta = 0.801, 1
start = 180, 88
mask = 1
id = 34

[BG Cliff 5]
type = normal
spriteno = 3, 3
delta = 0.806, 1
start = -259, 91
mask = 1
id = 34

[BG Cliff 6]
type = normal
spriteno = 3, 3
delta = 0.843, 1
start = -275, 113
mask = 1
id = 34

[BG Cliff 7]
type = normal
spriteno = 3, 3
delta = 0.858, 1
start = -286, 122
mask = 1
id = 34

[BG Cliff 8]
type = normal
spriteno = 3, 3
delta = 0.866, 1
start = -289, 127
mask = 1
id = 34

[BG Cliff 9]
type = normal
spriteno = 3, 1
delta = 0.896, 1
start = -293, 145
id = 34

[BG Platform]
type = parallax
spriteno = 3, 0
start = 0, 208
delta = 0.75, 1
xscale = 1, 1.404
mask = 1
id = 34

[BGCtrlDef Intro]

[BGCtrl StartPos Cliff]
type = PosSet
ctrlID = 33, 34
y = 128
time = 0

[BGCtrl StartMove Cliff]
type = VelSet
ctrlID = 33, 34
y = -1
time = 30

[BGCtrl EndPos Cliff]
type = PosSet
ctrlID = 33, 34
y = 0
time = 158

[BGCtrl StopMove Cliff]
type = VelSet
ctrlID = 33, 34
y = 0
time = 158

[BGCtrl StartPos X]
type = PosSet
ctrlID = 35
y = 10.24
time = 0

[BGCtrl StartMove X]
type = VelSet
ctrlID = 35
y = -0.08
time = 30

[BGCtrl EndPos X]
type = PosSet
ctrlID = 35
y = 0
time = 158

[BGCtrl StopMove X]
type = VelSet
ctrlID = 35
y = 0
time = 158

[BGCtrl StartPos Sky]
type = PosSet
ctrlID = 37
y = 6.4
time = 0

[BGCtrl StartMove Sky]
type = VelSet
ctrlID = 37
y = -0.05
time = 30

[BGCtrl EndPos Sky]
type = PosSet
ctrlID = 37
y = 0
time = 158

[BGCtrl StopMove Sky]
type = VelSet
ctrlID = 37
y = 0
time = 158

[BGCtrlDef EE]
looptime = 6840
ctrlID = 38

[BGCtrl Start EE]
type = VelSet
x = 0
time = 0

[BGCtrl Reset EE]
type = PosSet
x = 0
time = 0

[BGCtrl Move EE]
type = VelSet
x = -0.25
time = 3768