even more docs
This commit is contained in:
+57
-9
@@ -44,27 +44,75 @@ class Engine {
|
||||
double delta = 0.0;
|
||||
|
||||
std::unique_ptr<gui::GUI> gui;
|
||||
|
||||
void updateTimers();
|
||||
void updateHotkeys();
|
||||
public:
|
||||
Engine(EngineSettings& settings, EnginePaths* paths);
|
||||
~Engine();
|
||||
|
||||
void updateTimers();
|
||||
void updateHotkeys();
|
||||
/**
|
||||
* Start main engine input/update/render loop
|
||||
* Automatically sets MenuScreen
|
||||
*/
|
||||
void mainloop();
|
||||
|
||||
Assets* getAssets();
|
||||
gui::GUI* getGUI();
|
||||
EngineSettings& getSettings();
|
||||
void setScreen(std::shared_ptr<Screen> screen);
|
||||
EnginePaths* getPaths();
|
||||
const Content* getContent() const;
|
||||
std::vector<ContentPack>& getContentPacks();
|
||||
/**
|
||||
* Set screen (scene).
|
||||
* nullptr may be used to delete previous screen before creating new one
|
||||
* example:
|
||||
*
|
||||
* engine->setScreen(nullptr);
|
||||
* engine->setScreen(std::make_shared<...>(...));
|
||||
*
|
||||
* not-null value must be set before next frame
|
||||
*/
|
||||
void setScreen(std::shared_ptr<Screen> screen);
|
||||
|
||||
/**
|
||||
* Change locale to specified
|
||||
* @param locale isolanguage_ISOCOUNTRY (example: en_US)
|
||||
*/
|
||||
void setLanguage(std::string locale);
|
||||
|
||||
/**
|
||||
* Load all selected content-packs and reload assets
|
||||
*/
|
||||
void loadContent();
|
||||
/**
|
||||
* Collect world content-packs and load content
|
||||
* @see loadContent
|
||||
* @param folder world folder
|
||||
*/
|
||||
void loadWorldContent(const fs::path& folder);
|
||||
|
||||
/**
|
||||
* Collect all available content-packs from res/content
|
||||
*/
|
||||
void loadAllPacks();
|
||||
|
||||
/** Get current frame delta-time */
|
||||
double getDelta() const;
|
||||
|
||||
/** Get active assets storage instance */
|
||||
Assets* getAssets();
|
||||
|
||||
/** Get main UI controller */
|
||||
gui::GUI* getGUI();
|
||||
|
||||
/** Get writeable engine settings structure instance */
|
||||
EngineSettings& getSettings();
|
||||
|
||||
/** Get engine filesystem paths source */
|
||||
EnginePaths* getPaths();
|
||||
|
||||
/** Get current Content instance */
|
||||
const Content* getContent() const;
|
||||
|
||||
/** Get selected content packs */
|
||||
std::vector<ContentPack>& getContentPacks();
|
||||
|
||||
/** Get current screen */
|
||||
std::shared_ptr<Screen> getScreen();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user