//---------------------------------------------------------------------------
// Lethal Enforcers 2
// 
// Level        Saloon
// Round        1
// Background   568, 360
// SetScale     0x1a=5000, 0x5d=2628
// Layers       255 110 93 75 75   76 65 52 45 45   44 38 26 0 -100
//---------------------------------------------------------------------------
// Sprites	Enemy Sets
// 		1   2   3   4   
// BGJACK	X   X   X   X   
// BGMEXK	    X   X   X   
// BGMEXS	    X   X   X   
// BGMIKE	X   X   X   X   
// BGSTEV	X   X   X   X   
// BGTHIN	    X   X   X   
// BMBIG	    X   X       
// BWANGE	            X   
// GMGMBL	    X   X       
// GMRICH	    X           
// GMSHEL	    X           
// GWKATH	    X   X   X   
// GWKAY	        X       
//---------------------------------------------------------------------------

// Define hit points
define BGJACK_hp    1 //2
define BGMEXK_hp    1 //2
define BGMEXS_hp    1 //2
define BGMIKE_hp    1 //2
define BGSTEV_hp    1 //2
define BGTHIN_hp    1 //2
define BMBIG_hp     1 //2
define BWANGE_hp    1
define GMGMBL_hp    1
define GMRICH_hp    1
define GMSHEL_hp    1
define GWKATH_hp    1
define GWKAY_hp     1

// Define character literals
define BGJACK1      0
define BGJACK2      1
define BGJACK3      2
define BGJACK4      3
define BGJACK5      4
define BGJACK6      5
define BGJACK7      6
define BGJACK8      7
define BGJACK9      8
define BGJACK10     9
define BGJACK11     10
define BGJACK12     11
define BGMEXK1      12
define BGMEXK2      13
define BGMEXK3      14
define BGMEXK4      15
define BGMEXS1      16
define BGMEXS2      17
define BGMEXS3      18
define BGMEXS4      19
define BGMEXS5      20
define BGMEXS6      21
define BGMEXS7      22
define BGMEXS8      23
define BGMIKE1      24
define BGMIKE2      25
define BGMIKE3      26
define BGMIKE4      27
define BGMIKE5      28
define BGMIKE6      29
define BGMIKE7      30
define BGMIKE8      31
define BGMIKE9      32
define BGSTEV1      33
define BGSTEV2      34
define BGSTEV3      35
define BGSTEV4      36
define BGSTEV5      37
define BGSTEV6      38
define BGSTEV7      39
define BGSTEV8      40
define BGSTEV9      41
define BGTHIN1      42
define BGTHIN2      43
define BGTHIN3      44
define BGTHIN4      45
define BGTHIN5      46
define BGTHIN6      47
define BGTHIN7      48
define BGTHIN8      49
define BMBIG1       50
define BMBIG2       51
define BMBIG3       52
define BWANGE1      53
define GMGMBL1      54
define GMGMBL2      55
define GMRICH1      56
define GMSHEL1      57
define GWKATH1      58
define GWKATH2      59
define GWKATH3      60
define GWKAY1       61
define SALDOORL     62
define SALDOORR     63
define MIRROR       64
define BOTTLE1      65
define BOTTLE2      66
define BOTTLE3      67
define BOTTLE4      68
define BOTTLE5      69
define BOTTLE6      70
define BOTTLE7      71
define BOTTLE8      72
define BOTTLE9      73
define BOTTLE10     74
define BOTTLE11     75
define BOTTLE12     76
define BOTTLE13     77
define BOTTLE14     78
define BOTTLE15     79
define BOTTLE1B     80
define TABLE1       81
define TABLE2       82
define TABLE3       83
define CHAIR1       84
define CHAIR2       85
define CHAIR3       86
define KNIFE1       87
define KNIFE2       88
define KNIFE3       89
define KNIFE4       90
define CHANDLR      91
define RAILING      92
define GATLING      93
define SHOTGUN1     94
define SHOTGUN2     95

// Define difficulty levels
define L1           0
define L2           1
define L3           2
define L4           3
define L5           4
define L6           5
define L7           6
define L8           7

// Define object characteristics
define ENEMY        0x0001    // Enemy
define VICTIM       0x0002    // Victim
define DISAPPEAR    0x0004    // Disappear when out of screen
define GUN          0x0008    // Gun (red contour)
define FALL         0x0010    // Fall, so check for collision
define WINDOW       0x0020    // Window (translucent)
define THROWN       0x0040    // Thrown object (zoom)
define START_ANIM   0x0080    // Can start another anim. over actual one
define ARROW        0x0100    // Arrow (do an arc)
define BLINK        0x0200    // Blink at the end
define SCROLL       0x0400    // We can scroll even though he's not dead
define BOSS         0x0800    // Boss
define VEH_SINUSOID 0x1000    // Vehicle (sinusoidal movement)
define VEH_LINEAR   0x2000    // Vehicle (linear movement)
define NOKILL       0x4000    // Can't be killed
define NODISPLAY    0x8000    // Don't display

// Define positions
// pd1 (BGA for demo)
define pd1_x        348
define pd1_y        290
define pd1_l        13
define pd1_scale    5000

// pd2 (BGB for demo)
define pd2_x        468
define pd2_y        280
define pd2_l        13
define pd2_scale    4575

// pd3 (BGC for demo)
define pd3_x        416
define pd3_y        270
define pd3_l        13
define pd3_scale    4434

// pd4 (title demo)
define pd4_x        344
define pd4_y        224
define pd4_l        13
define pd4_scale    5035

// pd5 (title demo)
define pd5_x        463
define pd5_y        224
define pd5_l        12
define pd5_scale    4611

// pd6 (title demo)
define pd6_x        416
define pd6_y        218
define pd6_l        11
define pd6_scale    4469

// p01 (stand #1 behind counter)
define p01_x        287
define p01_y        260
define p01_l        9
define p01_scale    4221

// p02 (stand #2 behind counter)
define p02_x        360
define p02_y        255
define p02_l        8
define p02_scale    3867

// p03 (stand #3 behind counter)
define p03_x        428
define p03_y        250
define p03_l        7
define p03_scale    3619

// p04 (stand #4 behind counter)
define p04_x        489
define p04_y        260
define p04_l        7
define p04_scale    3336

// p05 (right side from right back)
define p05_x        587
define p05_y        220
define p05_l        8
define p05_scale    3761

// p06 (right low from right front)
define p06_x        570
define p06_y        280
define p06_l        13
define p06_scale    4788

// p07 (right sheriff from right front)
define p07_x        540
define p07_y        285
define p07_l        14
define p07_scale    5920

// p08 (big enemy from left)
define p08_x        326
define p08_y        310
define p08_l        14
define p08_scale    7620

// p09 (big enemy from right)
define p09_x        459
define p09_y        310
define p09_l        14
define p09_scale    7620

// p0a (stand from secret room)
define p0a_x        313
define p0a_y        220
define p0a_l        3
define p0a_scale    3265

// p11 (run from left)
define p11_x        156
define p11_y        60
define p11_l        3
define p11_scale    3832

// p12 (run from right)
define p12_x        486
define p12_y        100
define p12_l        3
define p12_scale    2026

// p13 (left side from door)
define p13_x        163
define p13_y        70
define p13_l        1
define p13_scale    2628

// p14 (right side from door)
define p14_x        250
define p14_y        70
define p14_l        1
define p14_scale    2628

// p15 (big enemy from left)
define p15_x        230
define p15_y        200
define p15_l        14
define p15_scale    7620

// p16 (big enemy from right)
define p16_x        364
define p16_y        190
define p16_l        14
define p16_scale    7620

// p21 (side from left)
define p21_x        -30
define p21_y        270
define p21_l        13
define p21_scale    5531

// p23 (stand #5 behind counter)
define p23_x        229
define p23_y        270
define p23_l        9
define p23_scale    4327

// p24 (left low from step)
define p24_x        30
define p24_y        191
define p24_l        8
define p24_scale    4080

// p25 (right side from right)
define p25_x        310
define p25_y        270
define p25_l        12
define p25_scale    5000


// Load backgrounds and sounds
LoadBKD \BACKGRND\LE2\SALOON\SALOON1.BKD
LoadVAB \SOUNDFX\LE2\SALOON.VAB
SetBKDLoc 0 -248 -120 0

// Load characters
LoadKRT \SPRITES\LE2\SALOON\S1\BGJACK.KRT            // Ch 0 - BGJACK1
SetScale BGJACK1 pd3_scale
SetTotalHitPoints BGJACK1 BGJACK_hp

CloneCharacter BGJACK1                            // Ch 1 - BGJACK2   
SetScale BGJACK2 p01_scale
SetTotalHitPoints BGJACK2 BGJACK_hp

CloneCharacter BGJACK1                            // Ch 2 - BGJACK3   
SetScale BGJACK3 p02_scale
SetTotalHitPoints BGJACK3 BGJACK_hp

CloneCharacter BGJACK1                            // Ch 3 - BGJACK4   
SetScale BGJACK4 p05_scale
SetTotalHitPoints BGJACK4 BGJACK_hp

CloneCharacter BGJACK1                            // Ch 4 - BGJACK5   
SetScale BGJACK5 p02_scale
SetTotalHitPoints BGJACK5 BGJACK_hp

CloneCharacter BGJACK1                            // Ch 5 - BGJACK6   
SetScale BGJACK6 p02_scale
SetTotalHitPoints BGJACK6 BGJACK_hp

CloneCharacter BGJACK1                            // Ch 6 - BGJACK7   
SetScale BGJACK7 p01_scale
SetTotalHitPoints BGJACK7 BGJACK_hp

CloneCharacter BGJACK1                            // Ch 7 - BGJACK8   
SetScale BGJACK8 p13_scale
SetTotalHitPoints BGJACK8 BGJACK_hp

CloneCharacter BGJACK1                            // Ch 8 - BGJACK9   
SetScale BGJACK9 p13_scale
SetTotalHitPoints BGJACK9 BGJACK_hp

CloneCharacter BGJACK1                            // Ch 9 - BGJACK10  
SetScale BGJACK10 p01_scale
SetTotalHitPoints BGJACK10 BGJACK_hp

CloneCharacter BGJACK1                            // Ch 10 - BGJACK11 
SetScale BGJACK11 p24_scale
SetTotalHitPoints BGJACK11 BGJACK_hp

CloneCharacter BGJACK1                            // Ch 11 - BGJACK12 
SetScale BGJACK12 p24_scale
SetTotalHitPoints BGJACK12 BGJACK_hp

LoadKRT \SPRITES\LE2\SALOON\S1\BGMEXK.KRT            // Ch 12 - BGMEXK1
SetScale BGMEXK1 p05_scale
SetTotalHitPoints BGMEXK1 BGMEXK_hp

CloneCharacter BGMEXK1                            // Ch 13 - BGMEXK2  
SetScale BGMEXK2 p03_scale
SetTotalHitPoints BGMEXK2 BGMEXK_hp

CloneCharacter BGMEXK1                            // Ch 14 - BGMEXK3  
SetScale BGMEXK3 p14_scale
SetTotalHitPoints BGMEXK3 BGMEXK_hp

CloneCharacter BGMEXK1                            // Ch 15 - BGMEXK4  
SetScale BGMEXK4 p25_scale
SetTotalHitPoints BGMEXK4 BGMEXK_hp

LoadKRT \SPRITES\LE2\SALOON\S1\BGMEXS.KRT            // Ch 16 - BGMEXS1
SetScale BGMEXS1 p02_scale
SetTotalHitPoints BGMEXS1 BGMEXS_hp

CloneCharacter BGMEXS1                            // Ch 17 - BGMEXS2  
SetScale BGMEXS2 p03_scale
SetTotalHitPoints BGMEXS2 BGMEXS_hp

CloneCharacter BGMEXS1                            // Ch 18 - BGMEXS3  
SetScale BGMEXS3 p06_scale
SetTotalHitPoints BGMEXS3 BGMEXS_hp

CloneCharacter BGMEXS1                            // Ch 19 - BGMEXS4  
SetScale BGMEXS4 p23_scale
SetTotalHitPoints BGMEXS4 BGMEXS_hp

CloneCharacter BGMEXS1                            // Ch 20 - BGMEXS5  
SetScale BGMEXS5 p14_scale
SetTotalHitPoints BGMEXS5 BGMEXS_hp

CloneCharacter BGMEXS1                            // Ch 21 - BGMEXS6  
SetScale BGMEXS6 p02_scale
SetTotalHitPoints BGMEXS6 BGMEXS_hp

CloneCharacter BGMEXS1                            // Ch 22 - BGMEXS7  
SetScale BGMEXS7 p21_scale
SetTotalHitPoints BGMEXS7 BGMEXS_hp

CloneCharacter BGMEXS1                            // Ch 23 - BGMEXS8  
SetScale BGMEXS8 p23_scale
SetTotalHitPoints BGMEXS8 BGMEXS_hp

LoadKRT \SPRITES\LE2\SALOON\S1\BGMIKE.KRT            // Ch 24 - BGMIKE1
SetScale BGMIKE1 pd2_scale
SetTotalHitPoints BGMIKE1 BGMIKE_hp

CloneCharacter BGMIKE1                            // Ch 25 - BGMIKE2  
SetScale BGMIKE2 p02_scale
SetTotalHitPoints BGMIKE2 BGMIKE_hp

CloneCharacter BGMIKE1                            // Ch 26 - BGMIKE3  
SetScale BGMIKE3 p02_scale
SetTotalHitPoints BGMIKE3 BGMIKE_hp

CloneCharacter BGMIKE1                            // Ch 27 - BGMIKE4  
SetScale BGMIKE4 p06_scale
SetTotalHitPoints BGMIKE4 BGMIKE_hp

CloneCharacter BGMIKE1                            // Ch 28 - BGMIKE5  
SetScale BGMIKE5 p05_scale
SetTotalHitPoints BGMIKE5 BGMIKE_hp

CloneCharacter BGMIKE1                            // Ch 29 - BGMIKE6  
SetScale BGMIKE6 p02_scale
SetTotalHitPoints BGMIKE6 BGMIKE_hp

CloneCharacter BGMIKE1                            // Ch 30 - BGMIKE7  
SetScale BGMIKE7 p23_scale
SetTotalHitPoints BGMIKE7 BGMIKE_hp

CloneCharacter BGMIKE1                            // Ch 31 - BGMIKE8  
SetScale BGMIKE8 p21_scale
SetTotalHitPoints BGMIKE8 BGMIKE_hp

CloneCharacter BGMIKE1                            // Ch 32 - BGMIKE9  
SetScale BGMIKE9 p21_scale
SetTotalHitPoints BGMIKE9 BGMIKE_hp

LoadKRT \SPRITES\LE2\SALOON\S1\BGSTEV.KRT            // Ch 33 - BGSTEV1
SetScale BGSTEV1 pd1_scale
SetTotalHitPoints BGSTEV1 BGSTEV_hp

CloneCharacter BGSTEV1                            // Ch 34 - BGSTEV2  
SetScale BGSTEV2 p06_scale
SetTotalHitPoints BGSTEV2 BGSTEV_hp

CloneCharacter BGSTEV1                            // Ch 35 - BGSTEV3  
SetScale BGSTEV3 p01_scale
SetTotalHitPoints BGSTEV3 BGSTEV_hp

CloneCharacter BGSTEV1                            // Ch 36 - BGSTEV4  
SetScale BGSTEV4 p01_scale
SetTotalHitPoints BGSTEV4 BGSTEV_hp

CloneCharacter BGSTEV1                            // Ch 37 - BGSTEV5  
SetScale BGSTEV5 p12_scale
SetTotalHitPoints BGSTEV5 BGSTEV_hp

CloneCharacter BGSTEV1                            // Ch 38 - BGSTEV6  
SetScale BGSTEV6 p01_scale
SetTotalHitPoints BGSTEV6 BGSTEV_hp

CloneCharacter BGSTEV1                            // Ch 39 - BGSTEV7  
SetScale BGSTEV7 p11_scale
SetTotalHitPoints BGSTEV7 BGSTEV_hp

CloneCharacter BGSTEV1                            // Ch 40 - BGSTEV8  
SetScale BGSTEV8 p25_scale
SetTotalHitPoints BGSTEV8 BGSTEV_hp

CloneCharacter BGSTEV1                            // Ch 41 - BGSTEV9  
SetScale BGSTEV9 p23_scale
SetTotalHitPoints BGSTEV9 BGSTEV_hp

LoadKRT \SPRITES\LE2\SALOON\S1\BGTHIN.KRT            // Ch 42 - BGTHIN1
SetScale BGTHIN1 p0a_scale
SetTotalHitPoints BGTHIN1 BGTHIN_hp

CloneCharacter BGTHIN1                            // Ch 43 - BGTHIN2  
SetScale BGTHIN2 p03_scale
SetTotalHitPoints BGTHIN2 BGTHIN_hp

CloneCharacter BGTHIN1                            // Ch 44 - BGTHIN3  
SetScale BGTHIN3 p02_scale
SetTotalHitPoints BGTHIN3 BGTHIN_hp

CloneCharacter BGTHIN1                            // Ch 45 - BGTHIN4  
SetScale BGTHIN4 p11_scale
SetTotalHitPoints BGTHIN4 BGTHIN_hp

CloneCharacter BGTHIN1                            // Ch 46 - BGTHIN5  
SetScale BGTHIN5 p12_scale
SetTotalHitPoints BGTHIN5 BGTHIN_hp

CloneCharacter BGTHIN1                            // Ch 47 - BGTHIN6  
SetScale BGTHIN6 p11_scale
SetTotalHitPoints BGTHIN6 BGTHIN_hp

CloneCharacter BGTHIN1                            // Ch 48 - BGTHIN7  
SetScale BGTHIN7 p23_scale
SetTotalHitPoints BGTHIN7 BGTHIN_hp

CloneCharacter BGTHIN1                            // Ch 49 - BGTHIN8  
SetScale BGTHIN8 p24_scale
SetTotalHitPoints BGTHIN8 BGTHIN_hp

LoadKRT \SPRITES\LE2\SALOON\S1\BMBIG.KRT             // Ch 50 - BMBIG1
SetScale BMBIG1 4096
SetTotalHitPoints BMBIG1 BMBIG_hp

CloneCharacter BMBIG1                             // Ch 51 - BMBIG2   
SetScale BMBIG2 4096
SetTotalHitPoints BMBIG2 BMBIG_hp

CloneCharacter BMBIG1                             // Ch 52 - BMBIG3   
SetScale BMBIG3 4096
SetTotalHitPoints BMBIG3 BMBIG_hp

LoadKRT \SPRITES\LE2\SALOON\S1\BWANGE.KRT            // Ch 53 - BWANGE1
SetScale BWANGE1 p25_scale
SetTotalHitPoints BWANGE1 BWANGE_hp

LoadKRT \SPRITES\LE2\SALOON\S1\GMGMBL.KRT            // Ch 54 - GMGMBL1
SetScale GMGMBL1 p03_scale
SetTotalHitPoints GMGMBL1 GMGMBL_hp
ObjectCharacteristics GMGMBL1 0x0406

CloneCharacter GMGMBL1                            // Ch 55 - GMGMBL2  
SetScale GMGMBL2 p02_scale
SetTotalHitPoints GMGMBL2 GMGMBL_hp
ObjectCharacteristics GMGMBL2 0x0406

LoadKRT \SPRITES\LE2\SALOON\S1\GMRICH.KRT            // Ch 56 - GMRICH1
SetScale GMRICH1 p03_scale
SetTotalHitPoints GMRICH1 GMRICH_hp
ObjectCharacteristics GMRICH1 0x0406

LoadKRT \SPRITES\LE2\SALOON\S1\GMSHEL.KRT            // Ch 57 - GMSHEL1
SetScale GMSHEL1 p07_scale
SetTotalHitPoints GMSHEL1 GMSHEL_hp
ObjectCharacteristics GMSHEL1 0x0406

LoadKRT \SPRITES\LE2\SALOON\S2\GWKATH.KRT            // Ch 58 - GWKATH1
SetScale GWKATH1 p01_scale
SetTotalHitPoints GWKATH1 GWKATH_hp
ObjectCharacteristics GWKATH1 0x0406

CloneCharacter GWKATH1                            // Ch 59 - GWKATH2  
SetScale GWKATH2 p23_scale
SetTotalHitPoints GWKATH2 GWKATH_hp
ObjectCharacteristics GWKATH2 0x0406

CloneCharacter GWKATH1                            // Ch 60 - GWKATH3  
SetScale GWKATH3 p23_scale
SetTotalHitPoints GWKATH3 GWKATH_hp
ObjectCharacteristics GWKATH3 0x0406

LoadKRT \SPRITES\LE2\SALOON\S2\GWKAY.KRT             // Ch 61 - GWKAY1
SetScale GWKAY1 p02_scale
SetTotalHitPoints GWKAY1 GWKAY_hp
ObjectCharacteristics GWKAY1 0x0406

// Load objects
LoadKRT \SPRITES\LE2\SALOON\S2\S1DOOR.KRT            // Ch 62 - SALDOORL
ObjectCharacteristics SALDOORL 0x4400
CloneCharacter SALDOORL				  // Ch 63 - SALDOORR

LoadKRT \SPRITES\LE2\SALOON\S2\S1MIRR.KRT            // Ch 64 - MIRROR
ObjectCharacteristics MIRROR SCROLL

LoadKRT \SPRITES\LE2\SALOON\S2\S1BOTT.KRT            // Ch 65 - BOTTLE1
ObjectCharacteristics BOTTLE1 SCROLL
CloneCharacter BOTTLE1                            // Ch 66 - BOTTLE2
CloneCharacter BOTTLE1                            // Ch 67 - BOTTLE3
CloneCharacter BOTTLE1                            // Ch 68 - BOTTLE4
CloneCharacter BOTTLE1                            // Ch 69 - BOTTLE5
CloneCharacter BOTTLE1                            // Ch 70 - BOTTLE6
CloneCharacter BOTTLE1                            // Ch 71 - BOTTLE7
CloneCharacter BOTTLE1                            // Ch 72 - BOTTLE8
CloneCharacter BOTTLE1                            // Ch 73 - BOTTLE9
CloneCharacter BOTTLE1                            // Ch 74 - BOTTLE10
CloneCharacter BOTTLE1                            // Ch 75 - BOTTLE11
CloneCharacter BOTTLE1                            // Ch 76 - BOTTLE12
CloneCharacter BOTTLE1                            // Ch 77 - BOTTLE13
CloneCharacter BOTTLE1                            // Ch 78 - BOTTLE14
CloneCharacter BOTTLE1                            // Ch 79 - BOTTLE15
CloneCharacter BOTTLE1                            // Ch 80 - BOTTLE1B
SetScale BOTTLE1  4096
SetScale BOTTLE2  4096*90/100
SetScale BOTTLE3  4096*50/100
SetScale BOTTLE4  4096*90/100
SetScale BOTTLE5  4096*88/100
SetScale BOTTLE6  4096*86/100
SetScale BOTTLE7  4096*83/100
SetScale BOTTLE8  4096*73/100
SetScale BOTTLE9  4096*70/100
SetScale BOTTLE10 4096*45/100
SetScale BOTTLE11 4096*40/100
SetScale BOTTLE12 4096*70/100
SetScale BOTTLE13 4096*120/100
SetScale BOTTLE14 4096*100/100
SetScale BOTTLE15 4096*50/100
ObjectCharacteristics BOTTLE1B SCROLL|NOKILL

LoadKRT \SPRITES\LE2\SALOON\S2\S1TABL.KRT            // Ch 81 - TABLE1
ObjectCharacteristics TABLE1 SCROLL|NOKILL
CloneCharacter TABLE1                             // Ch 82 - TABLE2
CloneCharacter TABLE1                             // Ch 83 - TABLE3
CloneCharacter TABLE1                             // Ch 84 - CHAIR1
CloneCharacter TABLE1                             // Ch 85 - CHAIR2
CloneCharacter TABLE1                             // Ch 86 - CHAIR3
SetScale TABLE1 4096*175/100
SetScale TABLE2 4096*110/100
SetScale CHAIR1 4096*110/100
SetScale CHAIR3 4096*110/100

LoadKRT \SPRITES\LE2\L2NIFE.KRT                   // Ch 87 - KNIFE1
ObjectCharacteristics KNIFE1 DISAPPEAR|THROWN|SCROLL
CloneCharacter KNIFE1                             // Ch 88 - KNIFE2
CloneCharacter KNIFE3                             // Ch 89 - KNIFE2
CloneCharacter KNIFE4                             // Ch 90 - KNIFE2
AssignProjectile BGMEXK1 KNIFE1
AssignProjectile BGMEXK2 KNIFE2
AssignProjectile BGMEXK3 KNIFE3
AssignProjectile BGMEXK4 KNIFE4

LoadKRT \SPRITES\LE2\SALOON\S2\S1CHAN.KRT            // Ch 91 - CHANDLR
ObjectCharacteristics CHANDLR SCROLL|FALL

LoadKRT \SPRITES\LE2\SALOON\S2\S1RAIL.KRT            // Ch 92 - RAILING
ObjectCharacteristics RAILING SCROLL|NOKILL

LoadKRT \SPRITES\LE2\L2GUNS.KRT                   // Ch 93 - GATLING
ObjectCharacteristics GATLING GUN|SCROLL
CloneCharacter GATLING                            // Ch 94 - SHOTGUN1
CloneCharacter GATLING                            // Ch 95 - SHOTGUN2
	
	
// Put BGTHIN1 behind the mirror
SetDepth BGTHIN1 p0a_l
Link BGTHIN1  MIRROR   8  1  0  0  p0a_x  p0a_y	// Shoot when mirror breaks
Link BOTTLE1B BOTTLE1 19 18  1  0  187    232   // The vase (BOTTLE1) leaves remains

// Place guns
SetDepth GATLING  11
SetDepth SHOTGUN1 6
Link   GATLING  BOTTLE10 4 15 0 0 355 224

SetDeath BGTHIN4 2 -1
SetDeath BGTHIN5 2 -1
SetDeath BGTHIN6 2 -1
Link   RAILING  BGTHIN4  1  2 0 0 255  75
Link   RAILING  BGSTEV5  1  2 0 0 255  75
Link   RAILING  BGSTEV7  1  2 0 0 255  75
Link   RAILING  BGTHIN5  1  2 0 0 255  75
Link   RAILING  BGSTEV6  1  2 0 0 255  75
Link   SHOTGUN1 RAILING  1  1 0 0 255  75

PlayTrack 501 0                 // SD_BGM2

// Place objects
StartActionXY SALDOORL  0      174       48        2    0     0 L1
StartActionXY SALDOORR  1      256       52        2    0     0 L1
StartActionXY MIRROR    0      313      180        6    0     0 L1
StartActionXY TABLE1    0      210      340       14    0     0 L1
StartActionXY TABLE2    0      410      300       14    0     0 L1
StartActionXY TABLE3    0      550      280       12    0     0 L1
StartActionXY CHAIR1    2      335      295       12    0     1 L1
StartActionXY CHAIR2    3      405      275       12    0     0 L1
StartActionXY CHAIR3    2      470      280       12    0     0 L1

StartActionXY BOTTLE1  17      176      218       11    0     0 L1
StartActionXY BOTTLE2   0      204      170        6    0     0 L1
StartActionXY BOTTLE3  14      230      230       11    0     0 L1
StartActionXY BOTTLE4   2      250      211        6    0     0 L1
StartActionXY BOTTLE5   4      261      213        6    0     0 L1
StartActionXY BOTTLE6   9      273      210        6    0     0 L1
StartActionXY BOTTLE7   9      290      212        6    0     0 L1
StartActionXY BOTTLE8   4      345      213        6    0     0 L1
StartActionXY BOTTLE9   2      360      210        6    0     0 L1
StartActionXY BOTTLE10 14      355      224       11    0     0 L1
StartActionXY BOTTLE11 14      470      217       11    0     0 L1
StartActionXY BOTTLE12 14      200      288       14    0     0 L1
StartActionXY BOTTLE13  4      250      270       14    0     0 L1
StartActionXY BOTTLE14  0      425      247       14    0     0 L1
StartActionXY BOTTLE15 14      435      262       14    0     0 L1

StartActionXY CHANDLR   1      340       50       13    0     0 L1
StartActionXY RAILING   0      255       75        6    0     0 L1

// Action!
define FC     0  // Frame Counter
StartActionXY BGSTEV1   6    pd1_x    pd1_y    pd1_l FC+0     0 L1  // 0x0f
StartActionXY BGMIKE1   3    pd2_x    pd2_y    pd2_l FC+0     0 L1  // 0x08
StartActionXY BGJACK1   6    pd3_x    pd3_y    pd3_l FC+0     0 L1  // 0x15
ScrollBKDTo 0 -248 -120 0 FC+32

define FC   FC+32  // Frame Counter
StartActionXY BGJACK2   6    p01_x    p01_y    p01_l FC+256   0 L1  // STND
StartActionXY BGTHIN2  10    p03_x    p03_y    p03_l FC+272   1 L5  // STND
StartActionXY GWKATH1   1    p01_x    p01_y    p01_l FC+384   0 L1  // STND
StartActionXY BGMIKE2   3    p02_x    p02_y    p02_l FC+400   0 L3  // STND
StartActionXY BGSTEV2  10    p06_x    p06_y    p06_l FC+464   1 L5  // LOW
StartActionXY BGMEXK1   6    p05_x    p05_y    p05_l FC+544   1 L2  // SIDE
StartActionXY BGMIKE3   3    p02_x    p02_y    p02_l FC+560   0 L3  // STND
StartActionXY BGMEXK2   4    p03_x    p03_y    p03_l FC+672   0 L1  // STND
StartActionXY BMBIG1    4    p08_x    p08_y    p08_l FC+676   0 L5  // STND
StartActionXY BGSTEV3   6    p01_x    p01_y    p01_l FC+768   1 L2  // STND
StartActionXY BGJACK3   6    p02_x    p02_y    p02_l FC+769   0 L6  // STND
StartActionXY GMSHEL1   5    p07_x    p07_y    p07_l FC+864   1 L1  // 0x01
StartActionXY BGMEXS1  10    p02_x    p02_y    p02_l FC+880   0 L2  // STND
StartActionXY BGMIKE4   5    p06_x    p06_y-10 p06_l FC+1024  1 L3  // LOW
StartActionXY GMRICH1   1    p03_x    p03_y    p03_l FC+1090  0 L3  // STND
StartActionXY BGJACK4   8    p05_x    p05_y    p05_l FC+1152  1 L4  // SIDE
StartActionXY BGTHIN3  10    p02_x    p02_y    p02_l FC+1160  0 L3  // STND
StartActionXY BGSTEV4   6    p01_x    p01_y    p01_l FC+1216  0 L2  // STND
StartActionXY BGMEXS2  10    p03_x    p03_y    p03_l FC+1220  1 L5  // STND
StartActionXY BMBIG2    4    p09_x    p09_y    p09_l FC+1280  0 L1  // STND
StartActionXY BGJACK5   6    p02_x    p02_y    p02_l FC+1296  0 L4  // STND
StartActionXY BGMEXS3  14    p06_x    p06_y    p06_l FC+1344  1 L2  // LOW
Attach SHOTGUN2 BGMEXS3  1  0 FC+1344 0 0 p06_l L1
StartActionXY GMGMBL1   1    p03_x    p03_y    p03_l FC+1360  1 L1  // STND
StartActionXY BGMIKE5   5    p05_x    p05_y    p05_l FC+1472  1 L5  // SIDE
StartActionXY BGJACK6   6    p02_x    p02_y    p02_l FC+1536  0 L1  // STND
ScrollBKDTo 0 -144 0 60 FC+1568

define FC  FC+1568  // Frame Counter
StartActionXY BGJACK7   6    p01_x    p01_y    p01_l FC+64    0 L5  // STND
StartActionXY BGTHIN4  17    p11_x    p11_y    p11_l FC+128   0 L1  // RUN
ScaleTo BGTHIN4 p11_scale     0 FC+128
ScaleTo BGTHIN4 p12_scale   400 FC+128+1
MoveTo  BGTHIN4 p12_x p12_y 400 FC+128+1
	
StartActionXY GMGMBL2   1    p02_x    p02_y    p02_l FC+192   0 L1  // STND
StartActionXY BGMEXS4  10    p23_x    p23_y    p23_l FC+256   1 L2  // STND
StartActionXY BGMIKE6   3    p02_x    p02_y    p02_l FC+258   0 L6  // STND
StartActionXY BGSTEV5  13    p12_x    p12_y    p12_l FC+320   0 L1  // RUN
ScaleTo BGSTEV5 p12_scale     0 FC+320
ScaleTo BGSTEV5 p11_scale   400 FC+320+1
MoveTo  BGSTEV5 p11_x p11_y 400 FC+320+1

StartActionXY BGJACK8   8    p13_x    p13_y    p13_l FC+322   0 L3  // SIDE
StartActionXY BMBIG3    4    p16_x    p16_y    p16_l FC+324   1 L5  // STND
StartActionXY BGSTEV6   6    p01_x    p01_y    p01_l FC+384   0 L1  // STND
StartActionXY BGMEXS5  12    p14_x    p14_y    p14_l FC+388   1 L7  // SIDE
StartActionXY BGSTEV7  13    p11_x    p11_y    p11_l FC+448   1 L2  // RUN
ScaleTo BGSTEV7 p11_scale     0 FC+448
ScaleTo BGSTEV7 p12_scale   400 FC+448+1
MoveTo  BGSTEV7 p12_x p12_y 400 FC+448+1

StartActionXY BGMIKE7   3    p23_x    p23_y    p23_l FC+512   1 L6  // STND
StartActionXY GWKAY1    1    p02_x    p02_y    p02_l FC+528   0 L1  // STND
StartActionXY BGJACK9   8    p13_x    p13_y    p13_l FC+576   0 L3  // SIDE
StartActionXY BGMEXS6  10    p02_x    p02_y    p02_l FC+592   0 L4  // STND
StartActionXY BGTHIN5  17    p12_x    p12_y    p12_l FC+706   1 L2  // RUN
ScaleTo BGTHIN5 p12_scale     0 FC+706
ScaleTo BGTHIN5 p11_scale   400 FC+706+1
MoveTo  BGTHIN5 p11_x p11_y 400 FC+706+1

StartActionXY BGMEXK3   6    p14_x    p14_y    p14_l FC+768   1 L7  // SIDE
StartActionXY GWKATH2   1    p23_x    p23_y    p23_l FC+832   0 L1  // STND
StartActionXY BGJACK10  6    p01_x    p01_y    p01_l FC+864   0 L5  // STND
StartActionXY BGTHIN6  17    p11_x    p11_y    p11_l FC+866   0 L1  // RUN
ScaleTo BGTHIN6 p11_scale     0 FC+866
ScaleTo BGTHIN6 p12_scale   400 FC+866+1
MoveTo  BGTHIN6 p12_x p12_y 400 FC+866+1

ScrollBKDTo 0 0 -120 60 FC+898

define FC  FC+898  // Frame Counter
StartActionXY BGMIKE8   5    p21_x    p21_y    p21_l FC+64    0 L1  // SIDE
StartActionXY BGJACK11 13    p24_x    p24_y    p24_l FC+66    0 L1  // LOW
StartActionXY BGTHIN7  10    p23_x    p23_y    p23_l FC+192   1 L6  // STND
StartActionXY BGSTEV8   8    p25_x    p25_y    p25_l FC+256   1 L2  // SIDE
StartActionXY BGMEXS7  12    p21_x    p21_y    p21_l FC+384   0 L5  // SIDE
StartActionXY BGTHIN8  14    p24_x    p24_y    p24_l FC+448   0 L1  // LOW
StartActionXY BGSTEV9   6    p23_x    p23_y    p23_l FC+449   1 L4  // STND
StartActionXY BWANGE1   6    p25_x    p25_y    p25_l FC+544   1 L2  // SIDE
StartActionXY GWKATH3   1    p23_x    p23_y    p23_l FC+640   0 L1  // STND
StartActionXY BGMIKE9   5    p21_x    p21_y    p21_l FC+641   0 L6  // SIDE
StartActionXY BGJACK12 13    p24_x    p24_y    p24_l FC+642   0 L1  // LOW
StartActionXY BGMEXS8  10    p23_x    p23_y    p23_l FC+704   1 L3  // STND
StartActionXY BGMEXK4   6    p25_x    p25_y    p25_l FC+705   1 L1  // SIDE
ScrollBKDTo 0 0 -120 0 FC+737

define FC  FC+737  // Frame Counter
EndRound FC+30
