diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-11 22:01:53 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-11 22:01:53 +0100 |
commit | f06be6004ec8b47e3b4b1ba4fda068b365923683 (patch) | |
tree | 26376513f8a52386e6127af324aa65177b620620 | |
parent | a6803980f1e74ecf1abb007b7c77f00d2cd92c43 (diff) |
update doxygen documentation w/ updated APIloek/doxygen
-rw-r--r-- | Doxyfile | 2 | ||||
-rw-r--r-- | src/doc/feature/config.dox | 4 | ||||
-rw-r--r-- | src/doc/feature/scene.dox | 15 | ||||
-rw-r--r-- | src/doc/feature/script.dox | 14 | ||||
-rw-r--r-- | src/doc/feature/script_ecs.dox | 6 | ||||
-rw-r--r-- | src/doc/index.dox | 9 | ||||
-rw-r--r-- | src/doc/layout.xml | 4 |
7 files changed, 32 insertions, 22 deletions
@@ -20,6 +20,8 @@ TAB_SIZE = 2 HTML_INDEX_NUM_ENTRIES = 999 HTML_EXTRA_STYLESHEET = src/doc/style.css SHOW_HEADERFILE = NO +DISABLE_INDEX = NO +GENERATE_TREEVIEW = NO REPEAT_BRIEF = NO diff --git a/src/doc/feature/config.dox b/src/doc/feature/config.dox index 85d6803..ae3a054 100644 --- a/src/doc/feature/config.dox +++ b/src/doc/feature/config.dox @@ -54,8 +54,8 @@ tr td:first-child { font-family: monospace; } |\ref Config::log::level ".log.level"|\copybrief Config::log::level| |\ref Config::physics::gravity ".physics.gravity"|\copybrief Config::physics::gravity| |\ref Config::savemgr::location ".savemgr.location"|\copybrief Config::savemgr::location| -|\ref Config::window::size ".window.size"|\copybrief Config::window::size| -|\ref Config::window::title ".window.title"|\copybrief Config::window::title| +|\ref Config::window_settings::default_size ".window_settings.default_size"|\copybrief Config::window_settings::default_size| +|\ref Config::window_settings::window_title ".window_settings.window_title"|\copybrief Config::window_settings::window_title| */ } diff --git a/src/doc/feature/scene.dox b/src/doc/feature/scene.dox index 4124e37..b680eec 100644 --- a/src/doc/feature/scene.dox +++ b/src/doc/feature/scene.dox @@ -40,31 +40,28 @@ added to the loop/scene manger via loop_mgr::add_scene<>(). The templated argument should define the concrete scene to be added. ```cpp -#include <crepe/api/LoopManager.h> -#include <crepe/api/GameObject.h> +#include <crepe/api/Engine.h> #include <crepe/api/Scene.h> -#include <crepe/types.h> using namespace crepe; class MyScene : public Scene { public: void load_scene() { - ComponentManager & mgr = this->component_manager; - GameObject object1 = mgr.new_object("object1", "tag_my_scene", vec2{0, 0}, 0, 1); - GameObject object2 = mgr.new_object("object2", "tag_my_scene", vec2{1, 0}, 0, 1); + GameObject object1 = new_object("object1", "tag_my_scene", vec2{0, 0}, 0, 1); + GameObject object2 = new_object("object2", "tag_my_scene", vec2{1, 0}, 0, 1); } string get_name() const { return "my_scene"; } }; int main() { - LoopManager loop_mgr; + Engine foo; // Add the scenes to the loop manager - loop_mgr.add_scene<MyScene>(); + foo.add_scene<MyScene>(); - loop_mgr.start(); + return foo.main(); } ``` diff --git a/src/doc/feature/script.dox b/src/doc/feature/script.dox index e3b5508..162b0f5 100644 --- a/src/doc/feature/script.dox +++ b/src/doc/feature/script.dox @@ -21,10 +21,10 @@ BehaviorScript \ref Component "component". \"\ref feature_gameobject\" first. First, define a class (anywhere) that inherits from Script. The Script class -acts as an interface, and has two functions (\ref Script::init "\c init()" and -\ref Script::update "\c update()"), which *may* be implemented (they are empty -by default). From now on, this derivative class will be referred to as a -*concrete script*. +acts as an interface, and has three functions (\ref Script::init "\c init()", +\ref Script::fixed_update "\c fixed_update()" and \ref Script::frame_update +"\c frame_update()"), which *may* be implemented (they are empty by default). +From now on, this derivative class will be referred to as a *concrete script*. ```cpp #include <crepe/api/Script.h> @@ -34,9 +34,13 @@ class MyScript : public crepe::Script { void init() { // called once } - void update() { + + void fixed_update(crepe::duration_t delta_time) { // called on fixed update } + void frame_update(crepe::duration_t delta_time) { + // called for every rendered frame + } }; ``` diff --git a/src/doc/feature/script_ecs.dox b/src/doc/feature/script_ecs.dox index bbe1abc..8bd3376 100644 --- a/src/doc/feature/script_ecs.dox +++ b/src/doc/feature/script_ecs.dox @@ -40,14 +40,14 @@ using namespace crepe; class MyScript : public Script { void show_self() { Metadata & own_metadata = get_component<Metadata>(); - Log::logf("My name is {}", own_metadata.name); + logf("My name is {}", own_metadata.name); } void list_enemies() { RefVector<Metadata> enemies = get_components_by_tag<Metadata>("enemy"); - Log::logf("There are {} enemies:", enemies.size()); + logf("There are {} enemies:", enemies.size()); for (const Metadata & enemy : enemies) { - Log::logf("- {}", enemy.name); + logf("- {}", enemy.name); } } }; diff --git a/src/doc/index.dox b/src/doc/index.dox index 7796f34..342db98 100644 --- a/src/doc/index.dox +++ b/src/doc/index.dox @@ -5,7 +5,14 @@ Welcome to the documentation for the crêpe game engine. -\see feature +\see \ref install "Engine installation instructions" +\see \ref feature "Example code and usage instructions" +\see [API documentation](annotated.html) + +\noop No bold links in "See also" section +\htmlonly +<style> .section.see a { font-weight: normal; } </style> +\endhtmlonly */ diff --git a/src/doc/layout.xml b/src/doc/layout.xml index 6038249..c98c790 100644 --- a/src/doc/layout.xml +++ b/src/doc/layout.xml @@ -4,7 +4,7 @@ <tab type="mainpage" visible="yes" title="Intro"/> <tab type="user" url="@ref install" title="Installation"/> <tab type="user" url="@ref feature" title="Features"/> - <tab type="user" url="@ref internal" title="Internals"/> + <!-- <tab type="user" url="@ref internal" title="Internals"/> --> <tab type="pages" visible="no" title="" intro=""/> <tab type="topics" visible="no" title="" intro=""/> <tab type="modules" visible="no" title="" intro=""> @@ -22,7 +22,7 @@ <tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/> <tab type="interfacehierarchy" visible="yes" title="" intro=""/> </tab> - <tab type="classes" visible="yes" title=""> + <tab type="classes" visible="yes" title="API"> <tab type="classlist" visible="yes" title="" intro=""/> <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> <tab type="hierarchy" visible="yes" title="" intro=""/> |