print("Loading Bricktown Level")
clear();

--LEVEL SETUP

--set Background
--texture, width, height, position X, position Y
--setBackGround(map_BackGround, 200, 200, 0, 0);
setBackGround("map_bricktown.dds", 200, 200, 0, 0);
setTerrainMap("terraininfo_bricktown.tga");
setGameMode(3);
gofile("multiplayer/netViewDistance.lua");

--set Sun
--distance X, distance Y
setSunDist(-0.55, 1.0);

--set Dust visual element
setDustElement(vel_dust);
setSkidElement(vel_skid);

--set Borders
--position X, position Y, direction, elasticity
addBorder(0, 100, PI, 0.7);
addBorder(100, 0, HALFPI, 0.7);
addBorder(0, -100, 0, 0.7);
addBorder(-100, 0, THREEHALFPI, 0.7);

--setWaypoints
--position X, position Y
addWaypoint(-60, 65);
addWaypoint(50, 65);
addWaypoint(40, -25);
addWaypoint(-60, -30);

--set Camera Extents
--max X, min X, max Y, min Y
--setCameraExtents(50.0, -50.0, 62.5, -62.5);
autoCameraExtents();

--set Obstacles
--texture, size X, size Y, position X, position Y, direction 
addObstacleBox(map_Building, 24, 60, -54, 56, PI * -0.05);
addObstacleBox(map_Building, 16, 35, 68, 47.5, PI * -0.05);
addObstacleBox(map_Building, 16, 35, 53.8, -57.5, PI * -0.05);
addObstacleBox(map_Building, 30, 36, 64.5, -7.5, PI * -0.05);

--misc Mobs
--texture, size X, size Y, position X, position Y, mass, elastic, friction, round, dir 
addGroundMob(map_tireutil,    4,      4,      -37,     -15,      6,      0.9,   0.1,    true, 0.1);
addGroundMob(map_tireold,     3,      3,      -40,     -20,      6,      0.9,   0.1,    true, 0.2);

--texture, size X, size Y, position X, position Y, mass, elastic, friction, round, dir
addGroundMobq(map_barrelblue, 3, 5, -32, -10, 2, 0.9, 0.1, false, 0.5);

ndc();