; 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 = "Bowser's Castle"

;--------------------------------------------------------
[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 = -378
boundright = 435

 ;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 = -190
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 = .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 = 30

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


;--------------------------------------------------------
[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 = 195

 ;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 = 1

;--------------------------------------------------------
[Shadow]
 ;This is the shadow color given in r,g,b. Valid values for each
 ;range from 0 (lightest) to 255 (darkest).
 ;Defaults to 92,92,92 if omitted.
color = 50,50,50
intensity = 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

 ;Set to 1 to draw "reflection" shadows. Defaults to 0.
reflect = 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/BowserTheme.mp3

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

;========================================================
;--------------------------------------------------------
; Background definition
; ***
;-------------------------------------
; [BG x]
; type = ?       "Normal"/"Parallax"/"Height"  (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"/"sub"/"avg" (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)
; tilespacing = ?, ? Tiling: x, y (int) : space between tiles (def: 0, 0)
;  Parallax-only:
; xscale = ?, ?    Top xscale, bottom xscale (float) (if used, then no tiling)
; width = ?, ?     Top width, bottom width (int)  (if used, then tiles;
;                             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/BowsersCastle.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

;----------
; 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)
 ;"sub" for colour subtraction (like a shadow effect)
 ;If this line is omitted, it's assumed that there will be no transparency.
;trans = none

 ;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, 319, 239

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

;----------
[BG Sky]
type  = anim
actionno = 5
ID = 5
start = 0, 20
delta = .4, .6
mask = 1

;----------
[BG Background]
type  = normal
spriteno = 3,0
start = 0, 20
delta = .5, .7
mask = 1
window = 0,0, 319, 239

;----------
[BG FirewandThree]
type  = anim
actionno = 8
ID = 8
start = 0, 20
trans = add
delta = .5, .7
mask = 1

;----------
[BG FirewandTwo]
type  = anim
actionno = 7
ID = 7
start = 0, 20
trans = add
delta = .5, .7
mask = 1

;----------
[BG FirewandOne]
type  = anim
actionno = 6
ID = 6
start = 0, 20
trans = add
delta = .5, .7
mask = 1

;----------
[BG GateLava]
type  = anim
actionno = 4
ID = 4
start = 0, 20
delta = .5, .7
mask = 1

;----------
[BG Thwomp]
type  = anim
actionno = 3
ID = 3
start = 0, 20
delta = .5, .7
mask = 1

;----------
[BG Lava]
type  = normal
spriteno = 2,0
start = 0,241
trans = add
delta = .5,.7
mask = 1
velocity = -.4, 0
tile = 1,0

;----------
[BG Bubbles]
type  = anim
actionno = 2
ID = 2
start = 0, 20
delta = .5, .7
mask = 1

;----------
[BG Axe]
type  = normal
spriteno = 15,0
start = 0, 10
delta = .5, .7
mask = 1

;----------
[BG Lavaball Far Left]
type  = anim
actionno = 12
ID = 12
start = -100, 20
delta = .5, .7
mask = 1

;----------
[BG Lavaball Left]
type  = anim
actionno = 9
ID = 9
start = 35, 20
delta = .5, .7
mask = 1

;----------
[BG Lavaball Right]
type  = anim
actionno = 10
ID = 10
start = 230, 20
delta = .5, .7
mask = 1

;----------
[BG Lavaball Far Right]
type  = anim
actionno = 13
ID = 13
start = 435, 20
delta = .5, .7
mask = 1

;----------
[BG BulletBill]
type  = normal
spriteno = 16,0
;actionno = 11
;ID = 11
start = 0, 20
velocity = 6,0
delta = .6, .7
mask = 1
tile = 1,0
tilespacing = 3000,0

;----------
[BG Columns]
type  = normal
spriteno = 4,0
start = 0, 10
delta = .6, .7
mask = 1

;----------
[BG Torches]
type  = anim
actionno = 1
ID = 1
start = 0, 10
delta = .6, .7
mask = 1

;----------
[BG Bridge]
type  = normal
spriteno = 1,0
start = 0, 230
delta = 1,1
;xscale = .5,1
mask = 1
;tile = 1,0


[Begin action 1]
5,0, 0,0, 3
6,0, 0,0, 3,,A

[Begin action 2]
7,0, 0,0, 8,,A
7,1, 0,0, 10,,A
7,2, 0,0, 8,,A
7,3, 0,0, 10,,A

[Begin action 3]
8,0,0,0,120
8,1,0,0,2
8,2,0,0,2
8,3,0,0,2
8,4,0,0,2
8,5,0,0,2
8,6,0,0,2
8,7,0,0,2
8,8,0,0,2
8,9,0,0,2
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,1
8,9,0,0,1
8,10,0,0,180
8,9,0,0,6
8,8,0,0,6
8,7,0,0,6
8,6,0,0,6
8,5,0,0,6
8,4,0,0,6
8,3,0,0,6
8,2,0,0,6
8,1,0,0,6

[Begin Action 4]
9,0,0,0,7,,A
9,1,0,0,7,,A
9,2,0,0,7,,A

[Begin Action 5]
10,0,0,0,300
10,1,0,0,5
10,0,0,0,7
10,1,0,0,5
10,0,0,0,100
10,1,0,0,5
10,2,0,0,10
10,3,0,0,10
10,4,0,0,10

[Begin Action 6]
12,0,0,0,10,,A
12,4,0,0,5,,A
12,3,0,0,5,,A
12,2,0,0,5,,A
12,1,0,0,5,,A
12,0,0,0,10,,A

[Begin Action 7]
13,0,0,0,10,,A
13,1,0,0,5,,A
13,2,0,0,5,,A
13,3,0,0,5,,A
13,4,0,0,5,,A
13,5,0,0,5,,A
13,6,0,0,5,,A
13,0,0,0,10,,A

[Begin Action 8]
14,0,0,0,10,,A
14,1,0,0,5,,A
14,2,0,0,5,,A
14,3,0,0,5,,A
14,4,0,0,5,,A
14,5,0,0,5,,A
14,6,0,0,5,,A
14,0,0,0,10,,A

[Begin Action 9]
11,0,0,0,3,,A
11,1,0,0,3,,A
11,2,0,0,3,,A
11,3,0,0,3,,A
11,4,0,0,3,,A
11,5,0,0,3,,A
11,6,0,0,3,,A
11,7,0,0,3,,A
11,8,0,0,3,,A
11,9,0,0,3,,A
11,10,0,0,3,,A
11,11,0,0,3,,A
11,12,0,0,3,,A
11,13,0,0,3,,A
11,14,0,0,3,,A
11,15,0,0,4,,A
11,16,0,0,4,,A
11,17,0,0,4,,A
11,18,0,0,4,,A
11,19,0,0,4,,A
11,20,0,0,4,,A
11,21,0,0,4,,A
11,22,0,0,4,,A
11,23,0,0,4,,A
11,24,0,0,4,,A
11,25,0,0,4,,A
11,26,0,0,4,,A
11,27,0,0,300,,A

[Begin Action 10]
11,0,0,0,3,,A
11,1,0,0,3,,A
11,2,0,0,3,,A
11,3,0,0,3,,A
11,4,0,0,3,,A
11,5,0,0,3,,A
11,6,0,0,3,,A
11,7,0,0,3,,A
11,8,0,0,3,,A
11,9,0,0,3,,A
11,10,0,0,3,,A
11,11,0,0,3,,A
11,12,0,0,3,,A
11,13,0,0,3,,A
11,14,0,0,3,,A
11,15,0,0,4,,A
11,16,0,0,4,,A
11,17,0,0,4,,A
11,18,0,0,4,,A
11,19,0,0,4,,A
11,20,0,0,4,,A
11,21,0,0,4,,A
11,22,0,0,4,,A
11,23,0,0,4,,A
11,24,0,0,4,,A
11,25,0,0,4,,A
11,26,0,0,4,,A
11,27,0,0,400,,A

;[Begin Action 11]
;16,0,0,0,300
;11,27,0,0,10

[Begin Action 12]
11,0,0,0,3,,A
11,1,0,0,3,,A
11,2,0,0,3,,A
11,3,0,0,3,,A
11,4,0,0,3,,A
11,5,0,0,3,,A
11,6,0,0,3,,A
11,7,0,0,3,,A
11,8,0,0,3,,A
11,9,0,0,3,,A
11,10,0,0,3,,A
11,11,0,0,3,,A
11,12,0,0,3,,A
11,13,0,0,3,,A
11,14,0,0,3,,A
11,15,0,0,4,,A
11,16,0,0,4,,A
11,17,0,0,4,,A
11,18,0,0,4,,A
11,19,0,0,4,,A
11,20,0,0,4,,A
11,21,0,0,4,,A
11,22,0,0,4,,A
11,23,0,0,4,,A
11,24,0,0,4,,A
11,25,0,0,4,,A
11,26,0,0,4,,A
11,27,0,0,200,,A

[Begin Action 13]
11,0,0,0,3,,A
11,1,0,0,3,,A
11,2,0,0,3,,A
11,3,0,0,3,,A
11,4,0,0,3,,A
11,5,0,0,3,,A
11,6,0,0,3,,A
11,7,0,0,3,,A
11,8,0,0,3,,A
11,9,0,0,3,,A
11,10,0,0,3,,A
11,11,0,0,3,,A
11,12,0,0,3,,A
11,13,0,0,3,,A
11,14,0,0,3,,A
11,15,0,0,4,,A
11,16,0,0,4,,A
11,17,0,0,4,,A
11,18,0,0,4,,A
11,19,0,0,4,,A
11,20,0,0,4,,A
11,21,0,0,4,,A
11,22,0,0,4,,A
11,23,0,0,4,,A
11,24,0,0,4,,A
11,25,0,0,4,,A
11,26,0,0,4,,A
11,27,0,0,500,,A
