/* _______________ +---------------------------------------------------------------------------------------+ //~~~~~~~~~~~~~\\ | a game by @ohsqueezy & @sleepin | //```````````````\\ | [ohsqueezy.itch.io] [instagram.com/sleepin] | //_0_0_0_0_0_0_0_0_\\ | | //_/_/_/_/___\_\_\_\_\\ | with code licensed for copy, modification and redistribution [git.nugget.fun/pudding] | //GGGUUUNNNKKKIIISSSSSS\\ | | //_/__/__/__/_\__\__\__\_\\ | 😀 Thank you for choosing Puddendo for your business 😀 | +---------------------------------------------------------------------------------------+ */ #ifndef Item_h_ #define Item_h_ /* including so we can use GLuint type */ #if defined(__EMSCRIPTEN__) #include #else #include "glew/glew.h" #endif #include #include #include #include #include #include #include "json/json.hpp" #include "extension.hpp" #include "Node.hpp" #include "Texture.hpp" #include "Log.hpp" class Item : public Node { private: nlohmann::json json = {}; std::vector image_textures; std::string brand_name = "", product_name = "", upc = ""; int current_image_index = 0; void set_text_property(const std::string&, std::string&, const std::string&); /* * add properties: ingredients, protein weight, nutrition grade, popularity, "serving unit", keywords, * allergens, calories, fat, saturated fat, cholesterol, sodium, carbohydrates, fiber, sugar, potassium */ public: Item(Node*); void add_image_texture(Texture); const std::vector& get_image_textures() const; const Texture& get_active_image_texture() const; void set_brand_name(const std::string&); const std::string& get_brand_name() const; void set_product_name(const std::string&); const std::string& get_product_name() const; void set_upc(const std::string&); const std::string& get_upc() const; std::string get_full_name() const; void increment_image_index(int = 1); }; #endif