diff --git a/lib_paysages/atmosphere.c b/lib_paysages/atmosphere.c index 8b18604..101e2d5 100644 --- a/lib_paysages/atmosphere.c +++ b/lib_paysages/atmosphere.c @@ -5,14 +5,6 @@ #include "color.h" #include "tools.h" -void atmosphereInit() -{ -} - -void atmosphereQuit() -{ -} - void atmosphereSave(PackStream* stream, AtmosphereDefinition* definition) { packWriteDouble(stream, &definition->distance_near); diff --git a/lib_paysages/atmosphere.h b/lib_paysages/atmosphere.h index ad1d2b7..1ec855f 100644 --- a/lib_paysages/atmosphere.h +++ b/lib_paysages/atmosphere.h @@ -19,8 +19,6 @@ typedef struct Color color; } AtmosphereDefinition; -void atmosphereInit(); -void atmosphereQuit(); void atmosphereSave(PackStream* stream, AtmosphereDefinition* definition); void atmosphereLoad(PackStream* stream, AtmosphereDefinition* definition); diff --git a/lib_paysages/camera.c b/lib_paysages/camera.c index 233f23c..21f67a6 100644 --- a/lib_paysages/camera.c +++ b/lib_paysages/camera.c @@ -9,14 +9,6 @@ #include "scenery.h" #include "tools.h" -void cameraInit() -{ -} - -void cameraQuit() -{ -} - void cameraSave(PackStream* stream, CameraDefinition* camera) { v3Save(stream, &camera->location); diff --git a/lib_paysages/camera.h b/lib_paysages/camera.h index 0cf7098..057507d 100644 --- a/lib_paysages/camera.h +++ b/lib_paysages/camera.h @@ -9,8 +9,6 @@ extern "C" { #endif -void cameraInit(); -void cameraQuit(); void cameraSave(PackStream* stream, CameraDefinition* camera); void cameraLoad(PackStream* stream, CameraDefinition* camera); diff --git a/lib_paysages/layers.c b/lib_paysages/layers.c new file mode 100644 index 0000000..d71f441 --- /dev/null +++ b/lib_paysages/layers.c @@ -0,0 +1,189 @@ +#include "layers.h" + +#include +#include +#include + +#define LAYERS_MAX_NAME_LENGTH 50 + +typedef struct +{ + void* definition; + char name[LAYERS_MAX_NAME_LENGTH + 1]; +} LayerInfo; + +struct Layers { + LayerType type; + int count; + int max_count; + void* null_layer; + LayerInfo* layers_info; +}; + +Layers* layersCreate(LayerType type, int max_layer_count) +{ + Layers* result = malloc(sizeof(Layers)); + + result->type = type; + result->count = 0; + result->max_count = max_layer_count; + result->null_layer = type.callback_create(); + result->layers_info = malloc(sizeof(LayerInfo) * max_layer_count); + + return result; +} + +void layersDelete(Layers* layers) +{ + int i; + for (i = 0; i < layers->count; i++) + { + layers->type.callback_delete(layers->layers_info[i].definition); + } + + free(layers->null_layer); + free(layers->layers_info); + free(layers); +} + +void layersCopy(Layers* source, Layers* destination) +{ + int i; + + assert(source->type == destination->type); + assert(source->max_count == destination->max_count); + + /* TODO Optimize by reusing common layers */ + while (destination->count > 0) + { + layersDeleteLayer(destination, 0); + } + for (i = 0; i < source->count; i++) + { + layersAddLayer(destination, source->layers_info[i].definition); + layersSetName(destination, i, layersGetName(source, i)); + } +} + +void layersValidate(Layers* layers) +{ + int i; + + for (i = 0; i < layers->count; i++) + { + layers->type.callback_validate(layers->layers_info[i].definition); + layers->layers_info[i].name[LAYERS_MAX_NAME_LENGTH] = '\0'; + } +} + +void layersSave(PackStream* stream, Layers* layers) +{ + int i; + + packWriteInt(stream, &layers->count); + for (i = 0; i < layers->count; i++) + { + packWriteString(stream, layers->layers_info[i].name, LAYERS_MAX_NAME_LENGTH); + layers->type.callback_save(stream, layers->layers_info[i].definition); + } +} + +void layersLoad(PackStream* stream, Layers* layers) +{ + int i; + + packReadInt(stream, &layers->count); + for (i = 0; i < layers->count; i++) + { + packReadString(stream, layers->layers_info[i].name, LAYERS_MAX_NAME_LENGTH); + layers->type.callback_load(stream, layers->layers_info[i].definition); + } + layersValidate(layers); +} + +const char* layersGetName(Layers* layers, int layer) +{ + if (layer >= 0 && layer < layers->count) + { + return layers->layers_info[layer].name; + } + else + { + return ""; + } +} + +void layersSetName(Layers* layers, int layer, const char* name) +{ + if (layer >= 0 && layer < layers->count) + { + strncpy(layers->layers_info[layer].name, name, LAYERS_MAX_NAME_LENGTH); + } +} + +int layersCount(Layers* layers) +{ + return layers->count; +} + +void* layersGetLayer(Layers* layers, int layer) +{ + if (layer >= 0 && layer < layers->count) + { + return layers->layers_info[layer].definition; + } + else + { + return layers->null_layer; + } +} + +int layersAddLayer(Layers* layers, void* definition) +{ + if (layers->count < layers->max_count) + { + layers->layers_info[layers->count].definition = layers->type.callback_create(); + if (definition) + { + layers->type.callback_copy(definition, layers->layers_info[layers->count].definition); + } + + layers->count++; + layersSetName(layers, layers->count - 1, "unnamed"); + } + else + { + return -1; + } +} + +void layersDeleteLayer(Layers* layers, int layer) +{ + if (layer >= 0 && layer < layers->count) + { + layers->type.callback_delete(layers->layers_info[layer].definition); + if (layers->count > 1 && layer < layers->count - 1) + { + memmove(layers->layers_info + layer, layers->layers_info + layer + 1, sizeof(LayerInfo) * (layers->count - layer - 1)); + } + layers->count--; + } +} + +void layersMove(Layers* layers, int layer, int new_position) +{ + if (layer >= 0 && layer < layers->count && new_position != layer && new_position >= 0 && new_position < layers->count) + { + LayerInfo temp; + temp = layers->layers_info[layer]; + if (new_position > layer) + { + memmove(layers->layers_info + layer, layers->layers_info + layer + 1, sizeof(LayerInfo) * (new_position - layer)); + } + else + { + memmove(layers->layers_info + new_position + 1, layers->layers_info + new_position, sizeof(LayerInfo) * (layer - new_position)); + } + layers->layers_info[new_position] = temp; + } +} diff --git a/lib_paysages/layers.h b/lib_paysages/layers.h new file mode 100644 index 0000000..13a2384 --- /dev/null +++ b/lib_paysages/layers.h @@ -0,0 +1,52 @@ +#ifndef _PAYSAGES_LAYERS_H_ +#define _PAYSAGES_LAYERS_H_ + +/* Factorized layer management (with names) */ + +#include "pack.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void* (*LayerCallbackCreate)(); +typedef void (*LayerCallbackDelete)(void* layer); +typedef void (*LayerCallbackCopy)(void* source, void* definition); +typedef void (*LayerCallbackValidate)(void* layer); +typedef void (*LayerCallbackSave)(PackStream* stream, void* layer); +typedef void (*LayerCallbackLoad)(PackStream* stream, void* layer); + +typedef struct { + LayerCallbackCreate callback_create; + LayerCallbackDelete callback_delete; + LayerCallbackCopy callback_copy; + LayerCallbackValidate callback_validate; + LayerCallbackSave callback_save; + LayerCallbackLoad callback_load; +} LayerType; + +typedef struct Layers Layers; + +Layers* layersCreate(LayerType type, int max_layer_count); +void layersDelete(Layers* layers); + +void layersCopy(Layers* source, Layers* destination); +void layersValidate(Layers* layers); + +void layersSave(PackStream* stream, Layers* layers); +void layersLoad(PackStream* stream, Layers* layers); + +const char* layersGetName(Layers* layers, int layer); +void layersSetName(Layers* layers, int layer, const char* name); + +int layersCount(Layers* layers); +void* layersGetLayer(Layers* layers, int layer); +int layersAddLayer(Layers* layers, void* definition); +void layersDeleteLayer(Layers* layers, int layer); +void layersMove(Layers* layers, int layer, int new_position); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/lib_paysages/scenery.c b/lib_paysages/scenery.c index a6a5abc..cbaba5f 100644 --- a/lib_paysages/scenery.c +++ b/lib_paysages/scenery.c @@ -24,15 +24,9 @@ static void* _custom_data = NULL; void sceneryInit() { noiseInit(); - atmosphereInit(); - cameraInit(); cloudsInit(); lightingInit(); - skyInit(); - terrainInit(); texturesInit(); - vegetationInit(); - waterInit(); _atmosphere = atmosphereCreateDefinition(); _camera = cameraCreateDefinition(); @@ -60,15 +54,9 @@ void sceneryQuit() vegetationDeleteDefinition(_vegetation); waterDeleteDefinition(&_water); - atmosphereQuit(); - cameraQuit(); cloudsQuit(); lightingQuit(); - skyQuit(); - terrainQuit(); texturesQuit(); - vegetationQuit(); - waterQuit(); noiseQuit(); } diff --git a/lib_paysages/sky.c b/lib_paysages/sky.c index 54a8489..cc59e95 100644 --- a/lib_paysages/sky.c +++ b/lib_paysages/sky.c @@ -16,14 +16,6 @@ #define SPHERE_SIZE 1000.0 /******************************** Configuration ********************************/ -void skyInit() -{ -} - -void skyQuit() -{ -} - void skySave(PackStream* stream, SkyDefinition* definition) { packWriteInt(stream, (int*)&definition->model); diff --git a/lib_paysages/sky.h b/lib_paysages/sky.h index ac6af65..9b41d3b 100644 --- a/lib_paysages/sky.h +++ b/lib_paysages/sky.h @@ -39,8 +39,6 @@ typedef struct } model_preetham; } SkyDefinition; -void skyInit(); -void skyQuit(); void skySave(PackStream* stream, SkyDefinition* definition); void skyLoad(PackStream* stream, SkyDefinition* definition); diff --git a/lib_paysages/terrain.c b/lib_paysages/terrain.c index 6184d82..db169c4 100644 --- a/lib_paysages/terrain.c +++ b/lib_paysages/terrain.c @@ -11,54 +11,26 @@ #include "textures.h" #include "water.h" #include "tools.h" - -void terrainInit() -{ -} - -void terrainQuit() -{ -} +#include "layers.h" +#include "terraincanvas.h" void terrainSave(PackStream* stream, TerrainDefinition* definition) { - int i; - noiseSaveGenerator(stream, definition->height_noise); packWriteDouble(stream, &definition->height_factor); packWriteDouble(stream, &definition->scaling); + layersSave(stream, &definition->canvases); packWriteDouble(stream, &definition->shadow_smoothing); - - packWriteInt(stream, &definition->height_modifiers_count); - for (i = 0; i < definition->height_modifiers_count; i++) - { - modifierSave(stream, definition->height_modifiers[i]); - } } void terrainLoad(PackStream* stream, TerrainDefinition* definition) { - int i, n; - HeightModifier* modifier; - noiseLoadGenerator(stream, definition->height_noise); packReadDouble(stream, &definition->height_factor); packReadDouble(stream, &definition->scaling); + layersLoad(stream, &definition->canvases); packReadDouble(stream, &definition->shadow_smoothing); - while (definition->height_modifiers_count > 0) - { - terrainDelModifier(definition, 0); - } - packReadInt(stream, &n); - for (i = 0; i < n; i++) - { - modifier = modifierCreate(); - modifierLoad(stream, modifier); - terrainAddModifier(definition, modifier); - modifierDelete(modifier); - } - terrainValidateDefinition(definition); } @@ -69,7 +41,7 @@ TerrainDefinition terrainCreateDefinition() definition.height_noise = noiseCreateGenerator(); definition.height_factor = 0.0; definition.scaling = 1.0; - definition.height_modifiers_count = 0; + definition.canvases = layersCreate(terrainCanvasGetLayerType(), 50); definition.shadow_smoothing = 0.0; terrainValidateDefinition(&definition); @@ -82,10 +54,7 @@ void terrainDeleteDefinition(TerrainDefinition* definition) int i; noiseDeleteGenerator(definition->height_noise); - for (i = 0; i < definition->height_modifiers_count; i++) - { - modifierDelete(definition->height_modifiers[i]); - } + layersDelete(definition->canvases); } void terrainCopyDefinition(TerrainDefinition* source, TerrainDefinition* destination) @@ -95,52 +64,19 @@ void terrainCopyDefinition(TerrainDefinition* source, TerrainDefinition* destina noiseCopy(source->height_noise, destination->height_noise); destination->height_factor = source->height_factor; destination->scaling = source->scaling; + layersCopy(source->canvases, destination->canvases); destination->shadow_smoothing = source->shadow_smoothing; - for (i = 0; i < destination->height_modifiers_count; i++) - { - modifierDelete(destination->height_modifiers[i]); - } - destination->height_modifiers_count = 0; - - for (i = 0; i < source->height_modifiers_count; i++) - { - terrainAddModifier(destination, source->height_modifiers[i]); - } - terrainValidateDefinition(destination); } void terrainValidateDefinition(TerrainDefinition* definition) { + noiseValidate(definition->height_noise); + layersValidate(definition->canvases); + definition->_max_height = noiseGetMaxValue(definition->height_noise) * definition->height_factor; - /* FIXME _max_height depends on modifiers */ -} - -int terrainAddModifier(TerrainDefinition* definition, HeightModifier* modifier) -{ - if (definition->height_modifiers_count < TERRAIN_MAX_MODIFIERS) - { - definition->height_modifiers[definition->height_modifiers_count] = modifierCreateCopy(modifier); - return definition->height_modifiers_count++; - } - else - { - return -1; - } -} - -void terrainDelModifier(TerrainDefinition* definition, int modifier_position) -{ - if (modifier_position >= 0 && modifier_position < definition->height_modifiers_count) - { - modifierDelete(definition->height_modifiers[modifier_position]); - if (definition->height_modifiers_count > 1 && modifier_position < definition->height_modifiers_count - 1) - { - memmove(definition->height_modifiers + modifier_position, definition->height_modifiers + modifier_position + 1, sizeof(HeightModifier*) * (definition->height_modifiers_count - modifier_position - 1)); - } - definition->height_modifiers_count--; - } + /* FIXME _max_height depends on canvases/modifiers */ } static inline double _getHeight(TerrainDefinition* definition, double x, double z) @@ -152,10 +88,7 @@ static inline double _getHeight(TerrainDefinition* definition, double x, double location.y = noiseGet2DTotal(definition->height_noise, x / definition->scaling, z / definition->scaling) * definition->height_factor; location.z = z; - for (i = 0; i < definition->height_modifiers_count; i++) - { - location = modifierApply(definition->height_modifiers[i], location); - } + /* TODO Apply canvases and modifiers */ return location.y; } @@ -169,10 +102,7 @@ static inline double _getHeightDetail(TerrainDefinition* definition, double x, d location.y = noiseGet2DDetail(definition->height_noise, x / definition->scaling, z / definition->scaling, detail / definition->height_factor) * definition->height_factor; location.z = z; - for (i = 0; i < definition->height_modifiers_count; i++) - { - location = modifierApply(definition->height_modifiers[i], location); - } + /* TODO Apply canvases and modifiers */ return location.y; } diff --git a/lib_paysages/terrain.h b/lib_paysages/terrain.h index 9ef08e6..a65f1fa 100644 --- a/lib_paysages/terrain.h +++ b/lib_paysages/terrain.h @@ -6,6 +6,7 @@ #include "noise.h" #include "lighting.h" #include "pack.h" +#include "layers.h" #ifdef __cplusplus extern "C" { @@ -18,15 +19,12 @@ typedef struct NoiseGenerator* height_noise; double height_factor; double scaling; - int height_modifiers_count; - HeightModifier* height_modifiers[TERRAIN_MAX_MODIFIERS]; + Layers* canvases; double shadow_smoothing; double _max_height; } TerrainDefinition; -void terrainInit(); -void terrainQuit(); void terrainSave(PackStream* stream, TerrainDefinition* definition); void terrainLoad(PackStream* stream, TerrainDefinition* definition); @@ -35,9 +33,6 @@ void terrainDeleteDefinition(TerrainDefinition* definition); void terrainCopyDefinition(TerrainDefinition* source, TerrainDefinition* destination); void terrainValidateDefinition(TerrainDefinition* definition); -int terrainAddModifier(TerrainDefinition* definition, HeightModifier* modifier); -void terrainDelModifier(TerrainDefinition* definition, int modifier_position); - Color terrainLightFilter(TerrainDefinition* definition, Renderer* renderer, Color light, Vector3 location, Vector3 light_location, Vector3 direction_to_light); int terrainProjectRay(TerrainDefinition* definition, Renderer* renderer, Vector3 start, Vector3 direction, Vector3* hit_point, Color* hit_color); double terrainGetHeight(TerrainDefinition* definition, double x, double z); diff --git a/lib_paysages/terraincanvas.c b/lib_paysages/terraincanvas.c new file mode 100644 index 0000000..c849241 --- /dev/null +++ b/lib_paysages/terraincanvas.c @@ -0,0 +1,130 @@ +#include "terraincanvas.h" + +#include +#include + +TerrainCanvas* terrainCanvasCreate() +{ + TerrainCanvas* result = malloc(sizeof(TerrainCanvas)); + + result->area.bounded = 1; + result->area.location_x = 0.0; + result->area.location_z = 0.0; + result->area.size_x = 1.0; + result->area.size_z = 1.0; + result->offset_z = 0.0; + result->height_map.data = malloc(sizeof(double)); + result->height_map.resolution_x = 1; + result->height_map.resolution_z = 1; + result->height_factor = 1.0; + result->detail_noise = noiseCreateGenerator(); + result->detail_height_factor = 0.1; + result->detail_scaling = 1.0; + result->mask_mode = TERRAINCANVAS_MASKMODE_SQUARE; + result->mask_smoothing = 0.0; + + return result; +} + +void terrainCanvasDelete(TerrainCanvas* canvas) +{ + free(canvas->height_map.data); + noiseDeleteGenerator(canvas->detail_noise); + free(canvas); +} + +void terrainCanvasCopy(TerrainCanvas* source, TerrainCanvas* destination) +{ + destination->area = source->area; + destination->offset_z = source->offset_z; + destination->height_map.resolution_x = source->height_map.resolution_x; + destination->height_map.resolution_z = source->height_map.resolution_z; + destination->height_map.data = realloc(destination->height_map.data, sizeof(double) * destination->height_map.resolution_x * destination->height_map.resolution_z); + memcpy(destination->height_map.data, source->height_map.data, sizeof(double) * destination->height_map.resolution_x * destination->height_map.resolution_z); + destination->height_factor = source->height_factor; + noiseCopy(source->detail_noise, destination->detail_noise); + destination->detail_height_factor = source->detail_height_factor; + destination->detail_scaling = source->detail_scaling; + destination->mask_mode = source->mask_mode; + destination->mask_smoothing = source->mask_smoothing; +} + +void terrainCanvasValidate(TerrainCanvas* canvas) +{ + if (canvas->detail_scaling < 0.00001) + { + canvas->detail_scaling = 0.00001; + } + noiseValidate(canvas->detail_noise); +} + +LayerType terrainCanvasGetLayerType() +{ + LayerType result; + + result.callback_create = (LayerCallbackCreate)terrainCanvasCreate; + result.callback_delete = (LayerCallbackDelete)terrainCanvasDelete; + result.callback_copy = (LayerCallbackCopy)terrainCanvasCopy; + result.callback_validate = (LayerCallbackValidate)terrainCanvasValidate; + result.callback_save = (LayerCallbackSave)terrainCanvasSave; + result.callback_load = (LayerCallbackLoad)terrainCanvasLoad; + + return result; +} + +void terrainCanvasSave(PackStream* stream, TerrainCanvas* canvas) +{ + int i; + + packWriteInt(stream, &canvas->area.bounded); + packWriteDouble(stream, &canvas->area.location_x); + packWriteDouble(stream, &canvas->area.location_z); + packWriteDouble(stream, &canvas->area.size_x); + packWriteDouble(stream, &canvas->area.size_z); + packWriteDouble(stream, &canvas->offset_z); + packWriteInt(stream, &canvas->height_map.resolution_x); + packWriteInt(stream, &canvas->height_map.resolution_z); + for (i = 0; i < canvas->height_map.resolution_x * canvas->height_map.resolution_z; i++) + { + packWriteDouble(stream, &canvas->height_map.data[i]); + } + packWriteDouble(stream, &canvas->height_factor); + noiseSaveGenerator(stream, canvas->detail_noise); + packWriteDouble(stream, &canvas->detail_height_factor); + packWriteDouble(stream, &canvas->detail_scaling); + packWriteInt(stream, &canvas->mask_mode); + packWriteDouble(stream, &canvas->mask_smoothing); +} + +void terrainCanvasLoad(PackStream* stream, TerrainCanvas* canvas) +{ + int i; + + packReadInt(stream, &canvas->area.bounded); + packReadDouble(stream, &canvas->area.location_x); + packReadDouble(stream, &canvas->area.location_z); + packReadDouble(stream, &canvas->area.size_x); + packReadDouble(stream, &canvas->area.size_z); + packReadDouble(stream, &canvas->offset_z); + packReadInt(stream, &canvas->height_map.resolution_x); + packReadInt(stream, &canvas->height_map.resolution_z); + canvas->height_map.data = realloc(canvas->height_map.data, sizeof(double) * canvas->height_map.resolution_x * canvas->height_map.resolution_z); + for (i = 0; i < canvas->height_map.resolution_x * canvas->height_map.resolution_z; i++) + { + packReadDouble(stream, &canvas->height_map.data[i]); + } + packReadDouble(stream, &canvas->height_factor); + noiseLoadGenerator(stream, canvas->detail_noise); + packReadDouble(stream, &canvas->detail_height_factor); + packReadDouble(stream, &canvas->detail_scaling); + packReadInt(stream, &canvas->mask_mode); + packReadDouble(stream, &canvas->mask_smoothing); +} + +void terrainCanvasRevertToTerrain(TerrainCanvas* canvas, TerrainDefinition* terrain, int only_masked) +{ +} + +Vector3 terrainCanvasApply(TerrainCanvas* canvas, Vector3 position) +{ +} diff --git a/lib_paysages/terraincanvas.h b/lib_paysages/terraincanvas.h new file mode 100644 index 0000000..a8e45f4 --- /dev/null +++ b/lib_paysages/terraincanvas.h @@ -0,0 +1,63 @@ +#ifndef _PAYSAGES_TERRAINCANVAS_H_ +#define _PAYSAGES_TERRAINCANVAS_H_ + +/* Terrain edition by painting over an area */ + +#include "pack.h" +#include "noise.h" +#include "terrain.h" +#include "layers.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct +{ + int bounded; + double location_x; + double location_z; + double size_x; + double size_z; +} GeoArea; + +typedef struct +{ + int resolution_x; + int resolution_z; + double* data; +} HeightMap; + +#define TERRAINCANVAS_MASKMODE_SQUARE 0 +#define TERRAINCANVAS_MASKMODE_CIRCLE 1 + +typedef struct +{ + GeoArea area; + double offset_z; + HeightMap height_map; + double height_factor; + NoiseGenerator* detail_noise; + double detail_height_factor; + double detail_scaling; + int mask_mode; + double mask_smoothing; +} TerrainCanvas; + +TerrainCanvas* terrainCanvasCreate(); +void terrainCanvasDelete(TerrainCanvas* canvas); +void terrainCanvasCopy(TerrainCanvas* source, TerrainCanvas* destination); +void terrainCanvasValidate(TerrainCanvas* canvas); +LayerType terrainCanvasGetLayerType(); + +void terrainCanvasSave(PackStream* stream, TerrainCanvas* canvas); +void terrainCanvasLoad(PackStream* stream, TerrainCanvas* canvas); + +void terrainCanvasRevertToTerrain(TerrainCanvas* canvas, TerrainDefinition* terrain, int only_masked); +Vector3 terrainCanvasApply(TerrainCanvas* canvas, Vector3 position); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/lib_paysages/vegetation.c b/lib_paysages/vegetation.c index b529fd5..af8acda 100644 --- a/lib_paysages/vegetation.c +++ b/lib_paysages/vegetation.c @@ -7,14 +7,6 @@ struct VegetationDefinition { VegetationLayerDefinition layers[MAX_LAYER_COUNT]; }; -void vegetationInit() -{ -} - -void vegetationQuit() -{ -} - void vegetationSave(PackStream* stream, VegetationDefinition* definition) { } diff --git a/lib_paysages/vegetation.h b/lib_paysages/vegetation.h index 12077c6..d9d6b62 100644 --- a/lib_paysages/vegetation.h +++ b/lib_paysages/vegetation.h @@ -18,8 +18,6 @@ typedef struct typedef struct VegetationDefinition VegetationDefinition; -void vegetationInit(); -void vegetationQuit(); void vegetationSave(PackStream* stream, VegetationDefinition* definition); void vegetationLoad(PackStream* stream, VegetationDefinition* definition); diff --git a/lib_paysages/water.c b/lib_paysages/water.c index 4804cc8..380d53e 100644 --- a/lib_paysages/water.c +++ b/lib_paysages/water.c @@ -10,14 +10,6 @@ #include -void waterInit() -{ -} - -void waterQuit() -{ -} - void waterSave(PackStream* stream, WaterDefinition* definition) { packWriteDouble(stream, &definition->height); diff --git a/lib_paysages/water.h b/lib_paysages/water.h index ed1a071..f358dc3 100644 --- a/lib_paysages/water.h +++ b/lib_paysages/water.h @@ -34,8 +34,6 @@ typedef struct Color final; } WaterResult; -void waterInit(); -void waterQuit(); void waterSave(PackStream* stream, WaterDefinition* definition); void waterLoad(PackStream* stream, WaterDefinition* definition);