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:
parent
ef68f38061
commit
ddd9d7d638
8 changed files with 69 additions and 1 deletions
|
@ -4,6 +4,10 @@
|
||||||
#include "shared/types.h"
|
#include "shared/types.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
double ycenter;
|
double ycenter;
|
||||||
|
@ -45,4 +49,8 @@ CloudsQuality cloudsGetQuality();
|
||||||
Color cloudsGetColorCustom(Vector3 start, Vector3 end, CloudsDefinition* definition, CloudsQuality* quality, CloudsEnvironment* environment);
|
Color cloudsGetColorCustom(Vector3 start, Vector3 end, CloudsDefinition* definition, CloudsQuality* quality, CloudsEnvironment* environment);
|
||||||
Color cloudsGetColor(Vector3 start, Vector3 end);
|
Color cloudsGetColor(Vector3 start, Vector3 end);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
extern Color COLOR_TRANSPARENT;
|
extern Color COLOR_TRANSPARENT;
|
||||||
extern Color COLOR_BLACK;
|
extern Color COLOR_BLACK;
|
||||||
extern Color COLOR_RED;
|
extern Color COLOR_RED;
|
||||||
|
@ -13,4 +17,8 @@ extern Color COLOR_GREY;
|
||||||
|
|
||||||
extern Vector3 VECTOR_ZERO;
|
extern Vector3 VECTOR_ZERO;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
void paysagesInit();
|
void paysagesInit();
|
||||||
|
|
||||||
/* array.c */
|
/* 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);
|
void zoneAddSteepnessRange(Zone* zone, double value, double hardmin, double softmin, double softmax, double hardmax);
|
||||||
double zoneGetValue(Zone* zone, Vector3 location, Vector3 normal);
|
double zoneGetValue(Zone* zone, Vector3 location, Vector3 normal);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
extern Vector3 camera_location;
|
extern Vector3 camera_location;
|
||||||
|
|
||||||
extern int render_width;
|
extern int render_width;
|
||||||
|
@ -13,4 +17,8 @@ extern double sun_color_lum;
|
||||||
extern Vector3 sun_direction;
|
extern Vector3 sun_direction;
|
||||||
extern Vector3 sun_direction_inv;
|
extern Vector3 sun_direction_inv;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
|
#ifndef _PAYSAGES_SYSTEM_H_
|
||||||
|
#define _PAYSAGES_SYSTEM_H_
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef GThread Thread;
|
typedef GThread Thread;
|
||||||
typedef void*(*ThreadFunction)(void* data);
|
typedef void*(*ThreadFunction)(void* data);
|
||||||
|
|
||||||
|
@ -41,3 +48,8 @@ static inline void timeSleepMs(unsigned long ms)
|
||||||
g_usleep(ms * 1000);
|
g_usleep(ms * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#ifndef _PAYSAGES_TYPES_H_
|
#ifndef _PAYSAGES_TYPES_H_
|
||||||
#define _PAYSAGES_TYPES_H_
|
#define _PAYSAGES_TYPES_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
double x;
|
double x;
|
||||||
|
@ -122,4 +126,8 @@ typedef struct
|
||||||
} RayCastingResult;
|
} RayCastingResult;
|
||||||
typedef RayCastingResult (*RayCastingFunction)(Vector3 start, Vector3 direction);
|
typedef RayCastingResult (*RayCastingFunction)(Vector3 start, Vector3 direction);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
#include "shared/types.h"
|
#include "shared/types.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
double daytime;
|
double daytime;
|
||||||
|
@ -46,4 +50,8 @@ Color skyGetColor(Vector3 eye, Vector3 look);
|
||||||
Color skyProjectRay(Vector3 start, Vector3 direction);
|
Color skyProjectRay(Vector3 start, Vector3 direction);
|
||||||
void skyRender(RenderProgressCallback callback);
|
void skyRender(RenderProgressCallback callback);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
#include "shared/types.h"
|
#include "shared/types.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
double height;
|
double height;
|
||||||
|
@ -55,4 +59,8 @@ WaterResult waterGetColorCustom(Vector3 location, Vector3 look, WaterDefinition*
|
||||||
Color waterGetColor(Vector3 location, Vector3 look);
|
Color waterGetColor(Vector3 location, Vector3 look);
|
||||||
void waterRender(RenderProgressCallback callback);
|
void waterRender(RenderProgressCallback callback);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue