SUPER Space invader : Turbo edition DX - VS GOD 1.0.0
A simple space invader ripoff
MySprite Class Reference

#include <mySprite.h>

Public Member Functions

Task asyncLoad (const string &fname)
 load a sprite asynchronously More...
 
void mirror (MySprite &msp)
 Mirror a sprite pixel data into this one. More...
 

Public Attributes

optional< nsGui::Sprite > sp
 optional actual Sprite We need to use an optional to init the object through a function, that can be used with std::async mutable because for some reason MinGL stores a Vec2D with the pixel data, so we modify it each time we need to draw it Else, we could copy the Sprite each time, but copying a bunch of images each frame doesn't seems like a good idea More...
 

Detailed Description

Definition at line 11 of file mySprite.h.

Member Function Documentation

◆ asyncLoad()

Task MySprite::asyncLoad ( const string &  fname)

load a sprite asynchronously

Returns
An async task of the loading action

Definition at line 4 of file mySprite.cpp.

◆ mirror()

void MySprite::mirror ( MySprite msp)

Mirror a sprite pixel data into this one.

Definition at line 11 of file mySprite.cpp.

Member Data Documentation

◆ sp

optional<nsGui::Sprite> MySprite::sp
mutable

optional actual Sprite We need to use an optional to init the object through a function, that can be used with std::async mutable because for some reason MinGL stores a Vec2D with the pixel data, so we modify it each time we need to draw it Else, we could copy the Sprite each time, but copying a bunch of images each frame doesn't seems like a good idea

Definition at line 20 of file mySprite.h.


The documentation for this class was generated from the following files: