2011-12-10 13:25:22 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "IL/il.h"
|
|
|
|
#include "IL/ilu.h"
|
|
|
|
|
|
|
|
#include "shared/types.h"
|
|
|
|
#include "shared/constants.h"
|
|
|
|
#include "shared/functions.h"
|
|
|
|
#include "shared/globals.h"
|
2012-01-07 16:53:23 +00:00
|
|
|
#include "shared/system.h"
|
2012-01-22 18:39:42 +00:00
|
|
|
|
2012-01-03 15:40:50 +00:00
|
|
|
#include "terrain.h"
|
2012-01-22 18:39:42 +00:00
|
|
|
#include "water.h"
|
|
|
|
#include "lighting.h"
|
|
|
|
#include "textures.h"
|
|
|
|
#include "sky.h"
|
|
|
|
#include "clouds.h"
|
2011-12-10 13:25:22 +00:00
|
|
|
|
2011-12-23 22:39:13 +00:00
|
|
|
void paysagesInit()
|
2011-12-10 13:25:22 +00:00
|
|
|
{
|
2012-01-07 16:53:23 +00:00
|
|
|
systemInit();
|
2011-12-10 13:25:22 +00:00
|
|
|
ilInit();
|
|
|
|
iluInit();
|
|
|
|
|
|
|
|
autoInit();
|
2012-01-22 18:39:42 +00:00
|
|
|
renderInit();
|
2011-12-18 21:59:33 +00:00
|
|
|
|
2012-01-23 23:45:33 +00:00
|
|
|
cameraSetLocation(-12.0, 5.0, 2.0);
|
|
|
|
cameraSetTarget(0.0, 5.0, 0.0);
|
|
|
|
|
2011-12-10 13:25:22 +00:00
|
|
|
autoSetRenderQuality(5);
|
|
|
|
autoGenRealisticLandscape(0);
|
|
|
|
autoSetDaytime(8, 30);
|
2012-01-22 18:39:42 +00:00
|
|
|
|
2012-01-03 15:40:50 +00:00
|
|
|
// DEBUG
|
2012-01-05 11:32:14 +00:00
|
|
|
/*double last_height, height, x;
|
2012-01-03 15:40:50 +00:00
|
|
|
last_height = height = 0.0;
|
|
|
|
x = 0.0;
|
|
|
|
while (height <= 1.0 || height >= last_height || last_height < 0.1)
|
|
|
|
{
|
|
|
|
last_height = height;
|
|
|
|
height = terrainGetHeight(x, 0.0);
|
|
|
|
x += 0.1;
|
|
|
|
}
|
|
|
|
cameraSetLocation(x - 2.0, height, 0.0);
|
2012-01-05 11:32:14 +00:00
|
|
|
cameraSetTarget(x - 1.0, height, 0.0);*/
|
2011-12-10 13:25:22 +00:00
|
|
|
}
|
2012-01-22 18:39:42 +00:00
|
|
|
|
|
|
|
void paysagesSave(char* filepath)
|
|
|
|
{
|
2012-01-23 23:45:33 +00:00
|
|
|
scenerySaveToFile(filepath);
|
2012-01-22 18:39:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void paysagesLoad(char* filepath)
|
|
|
|
{
|
2012-01-23 23:45:33 +00:00
|
|
|
sceneryLoadFromFile(filepath);
|
2012-01-22 18:39:42 +00:00
|
|
|
}
|