/*
    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/>.
*/

#ifndef __DEM_H__
#define __DEM_H__

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <math.h>
#include <unistd.h>
#include "Globals.h"
#include "Life.h"
#include <stdint.h>
#include <inttypes.h>
//#include "OpenGL.h"

extern struct Species ***life;
extern struct Stats *stats;
extern struct Stats_T stats_t;
extern struct image_attr *ia;
extern unsigned int Threads;
extern char *filename_dem;
extern char *filename_backup_save;
extern char *filename_backup_load;
extern double Backup_Freq_Runtime;
extern double Year_Runtime;
extern unsigned char **Alive;
//extern int lsb_Verbose;
extern double Sim_Score;

//adjusts sea levels by 1m when called
void Adjust_Sea_Level(int load);
//adjust climate by .2C
void Adjust_Climate(int load);
//loads file data into **data, allocates initial image
int Load_Terrain(void);
void Gen_Detailed_Counts(void);
int Save_Current_State(void);
int Load_State(void);

#endif
