From 871552eab28d07c3aaf0cabb5fb167c0eb365bdf Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 22 Dec 2014 16:02:48 +0000 Subject: Fixed a bug where the lad/savegame dialog wouldn't show the screenshot of the first selected savegame, minor code cleamups in material handling. --- src/model/material.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/model/material.h') diff --git a/src/model/material.h b/src/model/material.h index c775c04..c6577ef 100644 --- a/src/model/material.h +++ b/src/model/material.h @@ -174,7 +174,7 @@ public: /** * @brief material registry * */ - static inline Registry registry() + static inline Registry & registry() { return material_registry; } @@ -213,6 +213,11 @@ public: * @brief find a material in the registry * */ static Material *find(const std::string &name); + + /** + * @brief add a new material to the registry. + * */ + static Material *add(const std::string &name); static void set_imageloader_func(ImageLoaderFuncPtr func); -- cgit v1.2.3