Рабочий материал - download

Ночное видение

bmap nvision640_map = <nv640.pcx>; //название, формат рисунков.
bmap nvision800_map = <nv800.pcx>; // название, формат рисунков.
bmap nvision1024_map = <nv1024.pcx>; //название, формат рисунков.
 
/////////////////////////////////////////////////////////////////////////////////////////
 
function init_nvision(); //Главноя функция.
 
/////////////////////////////////////////////////////////////////////////////////////////
 
panel nvision640_pan
{
 bmap = nvision640_map;
 layer = 20; 
 pos_x = 0;
 pos_y = 0;
 flags = overlay, refresh, d3d;
}
 
panel nvision800_pan
{
 bmap = nvision800_map;
 layer = 20; 
 pos_x = 0;
 pos_y = 0;
 flags = overlay, refresh, d3d;
}
 
panel nvision1024_pan
{
 bmap = nvision1024_map;
 layer = 20; 
 pos_x = 0;
 pos_y = 0;
 flags = overlay, refresh, d3d;
}
 
entity fog_sprite
{
 type = <fog+5.pcx>;
 layer = 15;
 x = 200;
 y = 0;
 z = 0;
 flags = flare, bright;
}
 
///////////////////////////////////////////////////////////////////////////////
 
function init_nvision()
{
 while (1)
 {
  if (key_n == 1) 
  {
   if (video_mode == 6) // 640x480
   {
    nvision640_pan.visible = on;
    nvision800_pan.visible = off;
    nvision1024_pan.visible = off;
   }
   if (video_mode == 7) // 800x600
   {
    nvision640_pan.visible = off;
    nvision800_pan.visible = on;
    nvision1024_pan.visible = off;
   }
 
   if (video_mode == 8) // 1024x768
   {
    nvision640_pan..visible = off;
    nvision800_pan.visible = off;
    nvision1024_pan.visible = on;
   }
   camera.ambient = 100;
   fog_sprite.visible = on;
   if (random(1) > 0.97) // every few seconds
   {
    fog_sprite.frame = random(5); // pick a random "fog" frame number
   }   
  }
  else
  {
   nvision640_pan.visible = off;
   nvision800_pan.visible = off;
   nvision1024_pan.visible = off;
   fog_sprite.visible = off;
   camera.ambient = 0;
  }
  wait (1);
 }   
}
on_n init_nvision;

 

Используются технологии uCoz