#pragma once #include "building/building_data.hpp" #include "inventory/item.hpp" struct Researching { BuildingType b_type = BuildingType::NONE; BuildingData_s b_stats = {}; ItemType i_type = ItemType::NONE; ItemStats i_stats = {}; float duration = 0; bool is_researching = false; }; namespace Research { extern bool is_researching; extern Researching research_item; extern std::vector research_buildings; extern std::vector research_items; void draw_ReserachMenu(SDL_Renderer*, SDL_Rect win_size, BuildingType type, std::vector& researched_buildings, std::vector& researched_items, bool hovering_research_button); bool is_CursorOverMenuInfoPanel(const SDL_FPoint mouse_pos); bool cursor_OverResearchButton(const SDL_FPoint mouse_pos); int cursor_ResearchGridTileIndex(SDL_FPoint mouse, SDL_Rect win_size); bool research_Start(); bool research_Continue(std::vector& researched_buildings, std::vector& researched_items); void research_Stop(); }