print("Loading Areamap")

clear();

--LEVEL SETUP

--set Background
--texture, width, height, position X, position Y
setBackGround("gamemap.dds", 520, 520, 0, 0);
setTerrainMap("terraininfo_gamemap.tga");
setGameMode(0);
setCameraHeight(160);

--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
if (getStage() >= 2 and getStage() < 4)  then
setCameraExtentMode(2);
addBorder(0, 260, PI, 0.7);
addBorder(0, 0, HALFPI, 0.7);
addBorder(0, -260, 0, 0.7);
addBorder(-260, 0, THREEHALFPI, 0.7);
elseif getStage() >= 4 then
setCameraExtentMode(0);
addBorder(0, 260, PI, 0.7);
addBorder(260, 0, HALFPI, 0.7);
addBorder(0, -260, 0, 0.7);
addBorder(-260, 0, THREEHALFPI, 0.7);
else
setCameraExtentMode(1);
addBorder(0, 260, PI, 0.7);
addBorder(0, 0, HALFPI, 0.7);
addBorder(0, 0, 0, 0.7);
addBorder(-260, 0, THREEHALFPI, 0.7);
end



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


player = addBeing(playerCar, getPlayerPosX(), getPlayerPosY(), getPlayerRot(), 1);
setPlayerBeing(player);
setMobHealth(player, getPlayerHealth());

setWeapon(player, 1, playerWeapon1);
setWeapon(player, 2, playerWeapon2);

--TEMP ADD GHOSTS

reviveGhosts();

if getStage() == 9 then
gofile("hawk.lua");
setStage(getStage() + 1);
end



