diff options
-rw-r--r-- | include/honey.h | 21 | ||||
-rw-r--r-- | include/mesh.h | 10 | ||||
-rw-r--r-- | include/primitives.h | 4 | ||||
-rw-r--r-- | include/texture.h | 5 | ||||
-rw-r--r-- | src/honey.c | 4 |
5 files changed, 32 insertions, 12 deletions
diff --git a/include/honey.h b/include/honey.h index bea21c4..3cddabc 100644 --- a/include/honey.h +++ b/include/honey.h @@ -1,7 +1,11 @@ #ifndef HONEY_ENGINE_H #define HONEY_ENGINE_H -/** @file Defines the basic loading and callback functions. */ +/** @file honey.h + * + * @brief Defines the basic loading and callback functions. +*/ + #include "common.h" #include "mesh.h" #include "primitives.h" @@ -20,12 +24,23 @@ honey_window honey_setup(int screen_width, int screen_height, char* window_title static void (*honey_update_callback)(float dt); static void (*honey_draw_callback)(); -static float honey_draw_dt = 0.16; +/** @brief Set the main update function. + * + * @param[in] update_callback The function to call every loop + */ void honey_set_update_callback(void (*update_callback)(float)); + +/** @brief Set the main draw function + * + * @param[in] draw_callback The function to call every draw cycle + */ void honey_set_draw_callback(void (*draw_callback)()); -void honey_set_fps(unsigned int); +/** @brief The main game loop. + * + * @param[in] window The window the game is running in, created with honey_setup() + */ void honey_run(honey_window window); #define honey_set_resize_callback glfwSetFramebufferSizeCallback diff --git a/include/mesh.h b/include/mesh.h index 24aec26..e3b5c39 100644 --- a/include/mesh.h +++ b/include/mesh.h @@ -1,9 +1,13 @@ -/** @file Defines the honey_mesh struct and related basic mesh functions. -*/ - #ifndef HONEY_MESH_H #define HONEY_MESH_H +/** @file mesh.h + * + * @brief Defines the honey_mesh struct and related basic mesh functions. +*/ + + + #include "common.h" #include "shader.h" diff --git a/include/primitives.h b/include/primitives.h index 81dc16f..bfa944d 100644 --- a/include/primitives.h +++ b/include/primitives.h @@ -1,7 +1,9 @@ #ifndef HONEY_PRIMITIVES_H #define HONEY_PRIMITIVES H -/** @file Define various common primitive objects. +/** @file primitives.h + * + * @brief Define various common primitive objects. */ #include "common.h" diff --git a/include/texture.h b/include/texture.h index ee367ba..e773e62 100644 --- a/include/texture.h +++ b/include/texture.h @@ -1,7 +1,10 @@ #ifndef HONEY_TEXTURE_H #define HONEY_TEXTURE_H -/** @file Defines the honey_texture struct and associated functions. */ +/** @file texture.h + * + *@brief Defines the honey_texture struct and associated functions. +*/ #include "common.h" diff --git a/src/honey.c b/src/honey.c index c55ddc2..b6f783f 100644 --- a/src/honey.c +++ b/src/honey.c @@ -41,10 +41,6 @@ void honey_set_draw_callback(void (*draw_callback)()) { honey_draw_callback = draw_callback; } -void honey_set_fps(unsigned int fps) { - honey_draw_dt = 1.0f / fps; -} - /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ void honey_run(honey_window window) { |