SuperSpaceInvaderTurboApoca.../headers/mySprite.h
2022-01-11 10:17:54 +01:00

34 lines
703 B
C++

#ifndef GUARD_MYSPRITE_H
#define GUARD_MYSPRITE_H
#include <future>
#include <optional>
#include "mingl/gui/sprite.h"
#include "pixelManager/pixelManager.h"
using namespace std;
class MySprite{
public:
/*!
* @brief optional actual Sprite
* We need to use an optional to init the object through a function, that can be used with std::async
*/
optional<nsGui::Sprite> sp;
/*!
* @brief load a sprite asynchronously
* @fn Task asyncLoad(const string& fname);
* @returns An async task of the loading action
*/
Task asyncLoad(const string& fname);
/*!
* @brief Mirror a sprite pixel data into this one
* @fn void mirror(MySprite& msp);
*/
void mirror(MySprite& msp);
};
#endif