diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2014-05-26 16:39:30 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2014-05-26 16:39:51 -0400 |
commit | 3c2e6050b579c8e3c16d980e2ce70436d87e3a2d (patch) | |
tree | 13e1d7fc3ee93658179a3cc7db90ceca76a6519e /libdimension/dimension | |
parent | 036123cc8bb3f1b0ef96f6bd15f0c4d0eefe571e (diff) | |
download | dimension-3c2e6050b579c8e3c16d980e2ce70436d87e3a2d.tar.xz |
light: Get rid of ->ptr field.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r-- | libdimension/dimension/camera.h | 2 | ||||
-rw-r--r-- | libdimension/dimension/light.h | 19 | ||||
-rw-r--r-- | libdimension/dimension/object.h | 2 |
3 files changed, 16 insertions, 7 deletions
diff --git a/libdimension/dimension/camera.h b/libdimension/dimension/camera.h index d8e0bdf..e94e227 100644 --- a/libdimension/dimension/camera.h +++ b/libdimension/dimension/camera.h @@ -61,7 +61,7 @@ dmnsn_camera *dmnsn_new_camera(void); /** * Initialize a dmnsn_camera field. - * @param[in,out] camera The camera to initialize. + * @param[out] camera The camera to initialize. */ void dmnsn_init_camera(dmnsn_camera *camera); diff --git a/libdimension/dimension/light.h b/libdimension/dimension/light.h index a1f7ff2..aebb2d8 100644 --- a/libdimension/dimension/light.h +++ b/libdimension/dimension/light.h @@ -1,5 +1,5 @@ /************************************************************************* - * Copyright (C) 2009-2011 Tavian Barnes <tavianator@tavianator.com> * + * Copyright (C) 2009-2014 Tavian Barnes <tavianator@tavianator.com> * * * * This file is part of The Dimension Library. * * * @@ -54,16 +54,19 @@ typedef dmnsn_color dmnsn_light_illumination_fn(const dmnsn_light *light, */ typedef bool dmnsn_light_shadow_fn(const dmnsn_light *light, double t); +/** + * Light destruction callback. + * @param[in,out] light The light to free. + */ +typedef void dmnsn_light_free_fn(dmnsn_light *light); + /** A light. */ struct dmnsn_light { /* Callbacks */ dmnsn_light_direction_fn *direction_fn; /**< Direction callback. */ dmnsn_light_illumination_fn *illumination_fn; /**< Illumination callback. */ dmnsn_light_shadow_fn *shadow_fn; /**< Shadow callback. */ - dmnsn_free_fn *free_fn; /**< Desctructor callback. */ - - /** Generic pointer for light info. */ - void *ptr; + dmnsn_light_free_fn *free_fn; /**< Desctructor callback. */ DMNSN_REFCOUNT; /**< Reference count. */ }; @@ -75,6 +78,12 @@ struct dmnsn_light { dmnsn_light *dmnsn_new_light(void); /** + * Initialize a dmnsn_light field. + * @param[out] light The light to initialize. + */ +void dmnsn_init_light(dmnsn_light *light); + +/** * Delete a light. * @param[in,out] light The light to delete. */ diff --git a/libdimension/dimension/object.h b/libdimension/dimension/object.h index 8d76cc7..75a8aa7 100644 --- a/libdimension/dimension/object.h +++ b/libdimension/dimension/object.h @@ -105,7 +105,7 @@ dmnsn_object *dmnsn_new_object(void); /** * Initialize a dmnsn_object field. - * @param[in,out] object The object to initialize. + * @param[out] object The object to initialize. */ void dmnsn_init_object(dmnsn_object *object); |