/*
    Living Realms is a primate evolution simulator.
    Copyright (C) 2011  Sterling Pickens

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "Globals.h"

pthread_mutex_t Mutex1 = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t Mutex2 = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t Mutex3 = PTHREAD_MUTEX_INITIALIZER;
pthread_barrier_t Barrier1;
pthread_barrier_t Barrier2;
pthread_barrier_t Barrier3;
pthread_mutex_t Region_Mutexes[HEIGHT/5];
unsigned char Region_Handled[HEIGHT/5];
unsigned char **Alive;
unsigned char **Fought;
unsigned char **Mated;
double Backup_Freq_Runtime;
double Year_Runtime;
uint32_t Backup_Freq;
char *filename_backup_load;
char *filename_backup_save;
char *filename_dem;
uint32_t Threads;
//uint32_t Thread_Step;
struct timeval Year_Starttime,Year_Endtime;
struct Species ***life;
struct Stats *stats;
struct Stats_T stats_t;
struct image_attr *ia;
char *life_speed_up_X;
char *life_speed_up_Y;
char **thread_status;
int No_Exit;
struct Thread_I *Actions_t_info;
//struct Thread_I *Opengl_t_info;
int Stats_Handled;
//unsigned char Region_Offsets[5] = {0, 1, 2, 3, 4}; //Initialized