; Definition of KFM's 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 = "Stormy rain"
;author = "Enscripture"

;--------------------------------------------------------
[Camera]
 ;Camera starting position: Usually 0 for both
startx = 0
starty = 0
boundleft = -90000
boundright = 90000
boundhigh = 0
boundlow = 0
verticalfollow = .4
floortension = .1
tension = 60


;--------------------------------------------------------
[PlayerInfo]
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  = -90000 ;Left bound (x-movement)
rightbound =  90000 ;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]
screenleft = 15    ;Dist from left of screen that player can move to
screenright = 15   ;Right edge

;--------------------------------------------------------
[StageInfo]

zoffset = 158
autoturn = 1
resetBG = 0

;--------------------------------------------------------
[Shadow]
intensity = 0
color = 0,0,0
yscale = 0
fade.range = -0,-0

;--------------------------------------------------------
[Reflection]
intensity = 0

;--------------------------------------------------------
[Music]
bgmusic = sound/stormyrain.mp3
bgvolume = 255

;========================================================
;--------------------------------------------------------
; 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"/"addalpha" (def: "none")
; alpha = ?, ?   (only for trans=addalpha) Source,dest alpha (def: 256,0)
; 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 = stages/Rainy.sff
debugbg = 0

;----------
; Start each background element with the following:
; Make sure it's "[BG n]", where n is anything you like (it's only used to
; report errors.) For example, you could use:  [BG TheFloor]
; Specify as many as you like. This is an example of a normal background:
[BG 0]

 ;The background type goes here: for now, only NORMAL and PARALLAX
 ;If this line is omitted, the type will be assumed to be normal.
type  = normal

 ;The sprite number to use for the background (from the SFF specified above)
 ;It's the group-number, followed by a comma, then the sprite-number
 ;*** Do not omit this line.
spriteno = 0, 0

 ;This is the layer number, which determines where the sprite is drawn to.
 ;Valid values are 0 and 1.
 ;0 for background (behind characters), 1 for foreground (in front)
 ;If this line is omitted, the default value of 0 will be assumed.
layerno = 0                

 ;This is the starting location of the background in the format
 ;x, y
 ;If this line is omitted, the default value of 0,0 will be assumed.
start = 0, 0

 ;These are the number of pixels the background moves for every single unit
 ;of camera movement, in the format
 ;x, y
 ;For the main background (eg. the floor the players stand on) you'll want
 ;to use a delta of 1,1. Things farther away should have a smaller delta,
 ;like 0.5 for example. Things near the camera should have a larget delta.
 ;If this line is omitted, the default value of 1,1 will be assumed.
delta = .5,.5

 ;Here is the transparency setting of the background.
 ;Valid values are:
 ;"none" for normal drawing
 ;"add" for colour addition (like a spotlight effect)
 ;"add1" for colour addition with background dimmed to 50% brightness
 ;"addalpha" for colour addition with control over alpha values (you need
 ;    an "alpha" parameter if you use this)
 ;"sub" for colour subtraction (like a shadow effect)
 ;If this line is omitted, it's assumed that there will be no transparency.
trans = none

 ;Use this parameter only if "trans = addalpha". First value is the alpha
 ;of the source (sprite), and the second is the alpha of the destination
 ;(background). The values range from 0 to 256.
;alpha = 256,0

 ;Mask means whether or not to draw colour zero of a sprite.
 ;If you turn masking off, the background will take less CPU power to draw,
 ;so remember to turn it off on sprites that don't use it.
 ;If this line is omitted, it's assumed that there will be no masking.
mask  = 0

 ;The format for tiling is x,y. For each of them, the value is:
 ;0 to use no tiling, 1 to tile, n where (n>1) to tile n times.
 ;If this line is omitted, it's assumed that there will be no tiling.
tile  = 0, 0

 ;This is the x and y space between each tile, for tiled backgrounds
 ;If omitted, default value is 0,0
tilespacing = 0,0

 ;This defines the drawing space, or "window" of the background. It's
 ;given in the form
 ;x1,y1, x2,y2
 ;where (x1,y1)-(x2,y2) define a rectangular box.
 ;Make the window smaller if you only want to draw part of the background.
 ;You normally do not have to change this setting. Value values range from
 ;0-319 for x, and 0-239 for y. The values are 0,0, 319,239 by default (full
 ;screen).
;window = 0,0, 416, 224

 ;Similar to the delta parameter, this one affects the movement of
 ;the window. Defaults to 0,0
;windowdelta = 0,0

;----------

[BG Lowest Cloud]
type  = normal
layerno = 0
spriteno = 1, 0
start = 0, 8
delta = 1,1
mask  = 1
tile = 1, 0
velocity = -.1, 0

[BG Low Cloud]
type  = normal
layerno = 0
spriteno = 1, 1
start = 0, 5
delta = 1,1
mask  = 1
tile = 1, 0
velocity = -.2, 0

[BG Medium Cloud]
type  = normal
layerno = 0
spriteno = 1, 2
start = 0, 5
delta = 1,1
mask  = 1
tile = 1, 0
velocity = -.34, 0

[BG High Cloud]
type  = normal
layerno = 0
spriteno = 1, 3
start = 0, -15
delta = 1,1
mask  = 1
tile = 1, 0
velocity = -.6, 0

[BG Floor Cloud]

type = anim
actionno = 1
layerno = 0
start = 0, 40
delta = 1, 1
tile = 1, 0
tilespacing = 16, 16
mask = 1

[Begin Action 1]

0,0,0,0,5
0,1,0,0,5
0,2,0,0,5
0,3,0,0,5

[BG Rain Pool]

type = anim
actionno = 2
layerno = 0
start = 0, 170
delta = 1, 1
tile = 1, 0
tilespacing = 140, 140
mask = 1

[Begin Action 2]

3,0,0,0,3,, AS64D192
3,1,0,0,3,, AS64D192
3,2,0,0,3,, AS64D192
3,3,0,0,3,, AS64D192
3,4,0,0,3,, AS64D192
3,5,0,0,3,, AS64D192
3,6,0,0,3,, AS64D192
3,7,0,0,3,, AS64D192

[BG Rain]

type = anim
actionno = 3
layerno = 1
start = 0, 2
delta = 1, 1
tile = 1, 0
tilespacing = 128, 128
mask = 1

[Begin Action 3]

2,0,0,0,4
2,1,0,0,4
2,2,0,0,4
2,3,0,0,4
2,4,0,0,4
2,5,0,0,4
2,6,0,0,4
2,7,0,0,4
2,8,0,0,4
2,9,0,0,4
2,10,0,0,4
2,11,0,0,4
2,12,0,0,4
2,13,0,0,4
2,14,0,0,4
