//---------------------------------------------------------------------------
// Lethal Enforcers 2
// 
// Level        Bank
// Round        4
// Background   320, 240
// SetScale     0x23=4400, 0x01=6500
// Layers       255 56 56 56 56   55 35 29 1 1   0 0 0 0 0
//---------------------------------------------------------------------------
// Sprites	Enemy Sets
// 		1   
// BMBIG	X   
// BMGALO	X   
// BMJUN	X   
// BMKEVN	X   
// BMLONG	X   
// BMSTEV	X   
// BMTETS	X   
// BMTHIN	X   
// BWTINA	X   
// GMRUSH	X   
//---------------------------------------------------------------------------

// Define hit points
define BMBIG_hp     2
define BMGALO_hp    2
define BMJUN_hp     2
define BMKEVN_hp    2
define BMLONG_hp    2
define BMSTEV_hp    2
define BMTETS_hp    2
define BMTHIN_hp    2
define BWTINA_hp    1
define GMRUSH_hp    1

// Define character literals
define BMBIG1       0
define BMBIG2       1
define BMBIG3       2
define BMBIG4       3
define BMBIG5       4
define BMBIG6       5
define BMBIG7       6
define BMGALO1      7
define BMGALO2      8
define BMJUN1       9
define BMJUN2       10
define BMKEVN1      11
define BMKEVN2      12
define BMLONG1      13
define BMLONG2      14
define BMSTEV1      15
define BMSTEV2      16
define BMSTEV3      17
define BMSTEV4      18
define BMSTEV5      19
define BMTETS1      20
define BMTHIN1      21
define BMTHIN2      22
define BWTINA1      23
define BWTINA2      24
define BWTINA3      25
define BWTINA4      26
define GMRUSH1      27
define DOOR         28
define FRAME        29	// Window frame
define PICTURE      30
define LAMP1        31
define LAMP1b       32
define GATLING      33

// 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
// p01 (*	1:	left	*)
define p01_x        53
define p01_y        190
define p01_l        8
define p01_scale    6500

// p02 ()
define p02_x        400
define p02_y        180
define p02_l        7
define p02_scale    4771

// p03 (for left side from entrance)
define p03_x        120
define p03_y        135
define p03_l        6
define p03_scale    4400

// p04 ()
define p04_x        140
define p04_y        135
define p04_l        1
define p04_scale    3103

// p05 ()
define p05_x        235
define p05_y        140
define p05_l        1
define p05_scale    3103

// p06 (back door from center (BMI only))
define p06_x        202
define p06_y        140
define p06_l        4
define p06_scale    3403

// p07 (big enemy)
define p07_x        88
define p07_y        190
define p07_l        14
define p07_scale    4096

// p08 (big enemy)
define p08_x        257
define p08_y        190
define p08_l        14
define p08_scale    4096


// Load backgrounds and sounds
LoadBKD \BACKGRND\LE2\BANK\BANK4.BKD
SetBKDLoc 0 0 0 0
LoadVAB \SOUNDFX\LE2\BANK.VAB

// Load characters
LoadKRT \SPRITES\LE2\BANK\B1\BMBIG.KRT               // Ch 0 - BMBIG1
SetScale BMBIG1 p08_scale
SetTotalHitPoints BMBIG1 BMBIG_hp

CloneCharacter BMBIG1                             // Ch 1 - BMBIG2    
SetScale BMBIG2 p08_scale
SetTotalHitPoints BMBIG2 BMBIG_hp

CloneCharacter BMBIG1                             // Ch 2 - BMBIG3    
SetScale BMBIG3 p07_scale
SetTotalHitPoints BMBIG3 BMBIG_hp

CloneCharacter BMBIG1                             // Ch 3 - BMBIG4    
SetScale BMBIG4 p07_scale
SetTotalHitPoints BMBIG4 BMBIG_hp

CloneCharacter BMBIG1                             // Ch 4 - BMBIG5    
SetScale BMBIG5 p08_scale
SetTotalHitPoints BMBIG5 BMBIG_hp

CloneCharacter BMBIG1                             // Ch 5 - BMBIG6    
SetScale BMBIG6 p07_scale
SetTotalHitPoints BMBIG6 BMBIG_hp

CloneCharacter BMBIG1                             // Ch 6 - BMBIG7    
SetScale BMBIG7 p07_scale
SetTotalHitPoints BMBIG7 BMBIG_hp

LoadKRT \SPRITES\LE2\BANK\B1\BMGALO.KRT              // Ch 7 - BMGALO1
SetScale BMGALO1 p06_scale
SetTotalHitPoints BMGALO1 BMGALO_hp

CloneCharacter BMGALO1                            // Ch 8 - BMGALO2   
SetScale BMGALO2 p02_scale
SetTotalHitPoints BMGALO2 BMGALO_hp

LoadKRT \SPRITES\LE2\BANK\B1\BMJUN.KRT               // Ch 9 - BMJUN1
SetScale BMJUN1 p01_scale
SetTotalHitPoints BMJUN1 BMJUN_hp

CloneCharacter BMJUN1                             // Ch 10 - BMJUN2   
SetScale BMJUN2 p01_scale
SetTotalHitPoints BMJUN2 BMJUN_hp

LoadKRT \SPRITES\LE2\BANK\B1\BMKEVN.KRT              // Ch 11 - BMKEVN1
SetScale BMKEVN1 p01_scale
SetTotalHitPoints BMKEVN1 BMKEVN_hp

CloneCharacter BMKEVN1                            // Ch 12 - BMKEVN2  
SetScale BMKEVN2 p03_scale
SetTotalHitPoints BMKEVN2 BMKEVN_hp

LoadKRT \SPRITES\LE2\BANK\B1\BMLONG.KRT              // Ch 13 - BMLONG1
SetScale BMLONG1 p03_scale
SetTotalHitPoints BMLONG1 BMLONG_hp

CloneCharacter BMLONG1                            // Ch 14 - BMLONG2  
SetScale BMLONG2 p01_scale
SetTotalHitPoints BMLONG2 BMLONG_hp

LoadKRT \SPRITES\LE2\BANK\B2\BMSTEV.KRT              // Ch 15 - BMSTEV1
SetScale BMSTEV1 p01_scale
SetTotalHitPoints BMSTEV1 BMSTEV_hp

CloneCharacter BMSTEV1                            // Ch 16 - BMSTEV2  
SetScale BMSTEV2 p01_scale
SetTotalHitPoints BMSTEV2 BMSTEV_hp

CloneCharacter BMSTEV1                            // Ch 17 - BMSTEV3  
SetScale BMSTEV3 p05_scale
SetTotalHitPoints BMSTEV3 BMSTEV_hp

CloneCharacter BMSTEV1                            // Ch 18 - BMSTEV4  
SetScale BMSTEV4 p01_scale
SetTotalHitPoints BMSTEV4 BMSTEV_hp

CloneCharacter BMSTEV1                            // Ch 19 - BMSTEV5  
SetScale BMSTEV5 p05_scale
SetTotalHitPoints BMSTEV5 BMSTEV_hp

LoadKRT \SPRITES\LE2\BANK\B2\BMTETS.KRT              // Ch 20 - BMTETS1
SetScale BMTETS1 p03_scale
SetTotalHitPoints BMTETS1 BMTETS_hp

LoadKRT \SPRITES\LE2\BANK\B2\BMTHIN.KRT              // Ch 21 - BMTHIN1
SetScale BMTHIN1 p03_scale
SetTotalHitPoints BMTHIN1 BMTHIN_hp

CloneCharacter BMTHIN1                            // Ch 22 - BMTHIN2  
SetScale BMTHIN2 p02_scale
SetTotalHitPoints BMTHIN2 BMTHIN_hp

LoadKRT \SPRITES\LE2\BANK\B2\BWTINA.KRT              // Ch 23 - BWTINA1
SetScale BWTINA1 p01_scale
SetTotalHitPoints BWTINA1 BWTINA_hp

CloneCharacter BWTINA1                            // Ch 24 - BWTINA2  
SetScale BWTINA2 p05_scale
SetTotalHitPoints BWTINA2 BWTINA_hp

CloneCharacter BWTINA1                            // Ch 25 - BWTINA3  
SetScale BWTINA3 p03_scale
SetTotalHitPoints BWTINA3 BWTINA_hp

CloneCharacter BWTINA1                            // Ch 26 - BWTINA4  
SetScale BWTINA4 p03_scale
SetTotalHitPoints BWTINA4 BWTINA_hp

LoadKRT \SPRITES\LE2\BANK\B2\GMRUSH.KRT              // Ch 27 - GMRUSH1
SetScale GMRUSH1 p04_scale
SetTotalHitPoints GMRUSH1 GMRUSH_hp
ObjectCharacteristics GMRUSH1 VICTIM|DISAPPEAR|SCROLL

LoadKRT \SPRITES\LE2\BANK\B1\B4DOOR.KRT              // Ch 28 - DOOR
ObjectCharacteristics DOOR NOKILL|SCROLL|START_ANIM

LoadKRT \SPRITES\LE2\BANK\B1\B4WIN.KRT               // Ch 29 - FRAME
ObjectCharacteristics FRAME NOKILL|SCROLL|START_ANIM

LoadKRT \SPRITES\LE2\BANK\B1\B4PICT.KRT              // Ch 30 - PICTURE

LoadKRT \SPRITES\LE2\BANK\B1\B2LAMP.KRT              // Ch 31 - LAMP1
ObjectCharacteristics LAMP1 SCROLL
CloneCharacter LAMP1				  // Ch 32 - LAMP2
SetDepth LAMP1b 6

LoadKRT \SPRITES\LE2\L2GUNS.KRT                   // Ch 33 - GATLING
ObjectCharacteristics GATLING SCROLL|GUN

// Links
Link FRAME BMGALO2 1 7 0 0 306 107	// Window breaks when bad guy jumps
Link DOOR  BMGALO1 2 4 0 0 198 126      // Door falls when bad guy enters
	
// Broken lamps
Link LAMP1b  LAMP1    4  3  0  0  60       60+7

PlayTrack 500 0                 // SD_BGM1

// Objects
StartActionXY LAMP1       2    60       60       6     0        0 L1
StartActionXY FRAME       0    306      107      6     0        0 L1
StartActionXY DOOR        0    198      126      6     0        0 L1
StartActionXY PICTURE     0    250      90       6     0        0 L1

// Action!
define FC     0  // Frame Counter
StartActionXY BMSTEV1  10    p01_x    p01_y    p01_l FC+64    0 L1  // STND
StartActionXY BMTHIN1  16    p03_x    p03_y+20 p03_l FC+80    0 L5  // LOW
StartActionXY BMKEVN1  10    p01_x    p01_y    p01_l FC+192   1 L5  // STND
StartActionXY BMBIG1    4    p08_x    p08_y    p08_l FC+196   0 L1  // STND
StartActionXY BWTINA1   4    p01_x    p01_y    p01_l FC+328   0 L2  // STND
StartActionXY BMBIG2    4    p08_x    p08_y    p08_l FC+336   0 L1  // STND
StartActionXY BMLONG1   6    p03_x    p03_y    p03_l FC+400   0 L2  // SIDE
StartActionXY BMBIG3    4    p07_x    p07_y    p07_l FC+416   0 L7  // STND
StartActionXY BMGALO1   4    p06_x    p06_y    p06_l FC+420   0 L1  // Open door
ResetCharacteristics DOOR  NOKILL|SCROLL FC+421
StartActionXY BMJUN1   10    p01_x    p01_y    p01_l FC+448   0 L5  // STND
StartActionXY BMKEVN2  14    p03_x    p03_y+20 p03_l FC+688   0 L6  // LOW
StartActionXY BMSTEV2  10    p01_x    p01_y    p01_l FC+736   1 L3  // STND
StartActionXY BWTINA2   6    p05_x    p05_y    p05_l FC+832   1 L5  // SIDE
StartActionXY BMTETS1  14    p03_x    p03_y+20 p03_l FC+833   0 L1  // LOW
Attach GATLING BMTETS1 4 0 FC+833 0 0 p03_l L1
StartActionXY BMBIG4    4    p07_x    p07_y    p07_l FC+952   1 L2  // STND
StartActionXY BMJUN2   10    p01_x    p01_y    p01_l FC+960   0 L6  // STND
StartActionXY BMSTEV3  14    p05_x    p05_y    p05_l FC+1024  1 L3  // LOW
StartActionXY BMLONG2   4    p01_x    p01_y    p01_l FC+1096  0 L1  // STND
StartActionXY BMBIG5    4    p08_x    p08_y    p08_l FC+1104  1 L6  // STND
StartActionXY BWTINA3   6    p03_x    p03_y    p03_l FC+1152  0 L2  // SIDE
StartActionXY GMRUSH1   2    p04_x    p04_y    p04_l FC+1160  0 L1  // RUN
StartActionXY BMGALO2   7    p02_x    p02_y    p02_l FC+1216  1 L1  // JUMP
StartActionXY BMSTEV4  10    p01_x    p01_y    p01_l FC+1218  0 L5  // STND
StartActionXY BMBIG6    4    p07_x    p07_y    p07_l FC+1312  1 L1  // STND
StartActionXY BWTINA4   6    p03_x    p03_y    p03_l FC+1314  0 L3  // SIDE
StartActionXY BMSTEV5  14    p05_x    p05_y    p05_l FC+1380  1 L7  // LOW
StartActionXY BMTHIN2  14    p02_x-40 p02_y-20 p02_l FC+1504  1 L4  // JUMP
StartActionXY BMBIG7    4    p07_x    p07_y    p07_l FC+1505  0 L1  // STND

StopAction FRAME FC+1536
ScrollBKDTo 0 0 0 0 FC+1537

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