From 95a301d3842976e4b5e6fa75c08ce3ca79f32ff9 Mon Sep 17 00:00:00 2001 From: Duskhorn Date: Mon, 18 Mar 2024 12:10:51 +0100 Subject: [PATCH 1/2] added docs to getshaderparamname() --- slot.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/slot.h b/slot.h index f373dad..25394d4 100644 --- a/slot.h +++ b/slot.h @@ -287,7 +287,20 @@ extern std::vector slots; extern std::vector vslots; extern std::vector editingvslots; +/** + * @brief Extract or replace the shader parameter name, inserting if it doesn't exist, in `shaderparams`. + * + * Extracts the name from a global `shaderparams` whose type is `std::unordered_set`. + * It performs the necessary "conversion" from `std::string` to `const char *`. + * + * If the name doesn't exist yet, it is inserted, then returned + * + * @param name The name to retrieve + * @param insert A bool value representing wether or not to replace it in the global shaderparams global; default true + * @return The corresponding shader name parameter in the `shaderparams` global set +*/ extern const char *getshaderparamname(const char *name, bool insert = true); + extern void setldrnotexture(); extern VSlot *findvslot(const Slot &slot, const VSlot &src, const VSlot &delta); From b69d990edd390e201f8e4bbe9e2875880ca366fa Mon Sep 17 00:00:00 2001 From: Duskhorn Date: Mon, 18 Mar 2024 12:36:06 +0100 Subject: [PATCH 2/2] added first docs --- slot.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/slot.h b/slot.h index 25394d4..7333349 100644 --- a/slot.h +++ b/slot.h @@ -105,6 +105,10 @@ struct Slot } virtual const char *name() const; + + /** + * @brief The directory where textures are stored + */ virtual const char *texturedir() const { return "media/texture";