unit variables;

interface

uses OpenGL, constants, records;

var
  {PERSPECTIVE VIEW}
  screen_width : integer = 1024;
  screen_height : integer = 768;
  scr_field_of_view : single = 70;
  scr_aspect : single = 1;
  scr_near : single = 0.1;
  scr_far : single = 300000;
  scr_left : integer = 0;
  scr_top : integer = 0;
  scr_right : integer = 0;
  scr_bottom : integer = 0;

  {SCALES}
  global_scale_x : single = 1;
  global_scale_y : single = 1;
  global_scale_z : single = 1;

  {MOUSE}
  mouse_x, mouse_y : integer;

  {MOVE / ROTATE}
  fps, count_new, count_last, count_sec : integer;
  min_fps, max_fps : integer;

  count_time : integer;
  old_x, old_y, old_z, old_angle, old_visible : single;

  {BORDERS}
  move_hor, move_old_hor, move_ver, move_old_ver : single;
  move_left_border : integer = 3;
  move_top_border : integer = 3;
  move_right_border : integer = 3;
  move_bottom_border : integer = 3;

  {SENS}
  sens_hor : single = 0.09;
  sens_ver : single = 0.09;
  sens_zoom_height : single = 15;
  sens_zoom_destination : single = 30;

  {MISC}
  application_started : boolean;
  polygon_mode : integer;
  fog_destination_density, fog_height_density : single;
  visible_radius_x : integer = 18;
  visible_radius_y : integer = 30;
  Dest : RDestination;
  ambient_playing : boolean;
  color_walk, color_not_walk, color_build : RColor;
  fps_string : string = '0';
  triangles_rendered : integer;
  filtered_textures : boolean = true;
  builded_towers : array[0..3] of integer = (0, 0, 0, 0);
  player_name : string;
  music_file_name : string;
  rain_aviable : boolean;

  {SELECTION}
  vp : array [0..3] of GLint;
  selectbuf : array [0..max_select - 1] of GLuint;
  select_objects : boolean;
  tower_creation_mode : integer = 0;
  radar_radius : integer = 20;
  selected_tower : integer = 0;
  showed_weapon : integer = 1;
  selected_enemy : integer = 0;

  {TIME}
  minutes, hours, days : integer;
  time_control : integer = 1;
  time_scale : integer;
  sky_color : RColor;
  sky_colors : array[0..24] of RColor;
  start_days, start_hours : integer;
  next_wave_day, next_wave_hour, next_wave_minute : integer;

  {CAMERA}
  eye_map_x, eye_map_y : integer;
  eye_pos_x, eye_pos_y, eye_pos_z : single;

  {BASE}
  base_health : single;                
  base_x, base_y : integer;

  {ENEMYS}
  life_enemys : integer = 0;
  killed_enemys : integer = 0;
  missed_enemys : integer = 0;

  {CREDITS/SCORES}
  credits : integer = 1500;
  score : integer = 10;
  credits_for_minute : integer = 1;
  credits_for_hour : integer = 20;
  credits_for_day : integer = 100;
  score_for_minute : integer = 0;
  score_for_hour : integer = 3;
  score_for_day : integer = 5;
  prices : array[1..3] of RPrice = ((credits : 250; scores : 0),
                                    (credits : 450; scores : 15),
                                    (credits : 1100; scores : 40));

  {SOUND}
  play_enemy_kill : integer = 0;
  play_enemy_miss : integer = 0;
  play_interface_click : integer = 0;
  play_interface_move : integer = 0;
  play_error : integer = 0;
  play_new_wave : integer = 0;
  play_shoot : integer = 0;
  sound_music : boolean = true;
  sound_effects : boolean = true;

  {INTERFACE}
  interface_opacity : single = 1;
  minimap_opacity : single = 1;
  interface_scale_x : single = 1;
  interface_scale_y : single = 1;
  interface_selected : integer = 0;
  upgrades_showed : boolean;
  bonuses_showed : boolean;
  font_name : string = 'Impact';
  font_scale_x : integer = 20;
  font_scale_y : integer = 7;

implementation

end.
