paysages: Sources refactoring (splitting lib and gui).

git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@201 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
Michaël Lemaire 2011-12-23 22:58:50 +00:00 committed by ThunderK
parent ef68f38061
commit ddd9d7d638
8 changed files with 69 additions and 1 deletions

View file

@ -4,6 +4,10 @@
#include "shared/types.h"
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
double ycenter;
@ -45,4 +49,8 @@ CloudsQuality cloudsGetQuality();
Color cloudsGetColorCustom(Vector3 start, Vector3 end, CloudsDefinition* definition, CloudsQuality* quality, CloudsEnvironment* environment);
Color cloudsGetColor(Vector3 start, Vector3 end);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -3,6 +3,10 @@
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
extern Color COLOR_TRANSPARENT;
extern Color COLOR_BLACK;
extern Color COLOR_RED;
@ -13,4 +17,8 @@ extern Color COLOR_GREY;
extern Vector3 VECTOR_ZERO;
#ifdef __cplusplus
}
#endif
#endif

View file

@ -4,6 +4,10 @@
#include "types.h"
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
void paysagesInit();
/* array.c */
@ -211,4 +215,8 @@ void zoneAddHeightRange(Zone* zone, double value, double hardmin, double softmin
void zoneAddSteepnessRange(Zone* zone, double value, double hardmin, double softmin, double softmax, double hardmax);
double zoneGetValue(Zone* zone, Vector3 location, Vector3 normal);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -3,6 +3,10 @@
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
extern Vector3 camera_location;
extern int render_width;
@ -13,4 +17,8 @@ extern double sun_color_lum;
extern Vector3 sun_direction;
extern Vector3 sun_direction_inv;
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,5 +1,12 @@
#ifndef _PAYSAGES_SYSTEM_H_
#define _PAYSAGES_SYSTEM_H_
#include <glib.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef GThread Thread;
typedef void*(*ThreadFunction)(void* data);
@ -41,3 +48,8 @@ static inline void timeSleepMs(unsigned long ms)
g_usleep(ms * 1000);
}
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,6 +1,10 @@
#ifndef _PAYSAGES_TYPES_H_
#define _PAYSAGES_TYPES_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
double x;
@ -104,7 +108,7 @@ struct NoiseLevel
typedef struct NoiseLevel NoiseLevel;
typedef struct NoiseGenerator NoiseGenerator;
typedef struct Zone Zone;
typedef struct Zone Zone;
typedef struct HeightModifier HeightModifier;
@ -122,4 +126,8 @@ typedef struct
} RayCastingResult;
typedef RayCastingResult (*RayCastingFunction)(Vector3 start, Vector3 direction);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -4,6 +4,10 @@
#include "shared/types.h"
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
double daytime;
@ -46,4 +50,8 @@ Color skyGetColor(Vector3 eye, Vector3 look);
Color skyProjectRay(Vector3 start, Vector3 direction);
void skyRender(RenderProgressCallback callback);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -4,6 +4,10 @@
#include "shared/types.h"
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
double height;
@ -55,4 +59,8 @@ WaterResult waterGetColorCustom(Vector3 location, Vector3 look, WaterDefinition*
Color waterGetColor(Vector3 location, Vector3 look);
void waterRender(RenderProgressCallback callback);
#ifdef __cplusplus
}
#endif
#endif