Merge branch 'master' of github.com:Thomas776/SAE102-SpaceInvaders

This commit is contained in:
Djalim Simaila 2022-01-11 15:21:49 +01:00
commit 95bf76d352
3 changed files with 2 additions and 4 deletions

View File

@ -40,9 +40,7 @@ typedef nsGui::GlutFont::GlutFonts Font;
* It's MinGL's fault. This is all I have to say
*/
// The convention to add another argument seems to just add a number to the macro name
#define ADD_SPRITE_TASK(X) ADD_SPRITE_TASK2(X, X)
#define ADD_SPRITE_TASK2(X, Y) tasks.push_back((X).asyncLoad("assets/"#Y".si2"));
#define ADD_SPRITE_TASK(X) tasks.push_back((X).asyncLoad("assets/"#X".si2"));
class PixelManager{
public:

View File

@ -5,7 +5,7 @@ void PixelManager::loadSprites(vector<Task>& tasks){
ADD_SPRITE_TASK(logo)
ADD_SPRITE_TASK(menuBackground)
ADD_SPRITE_TASK(gameBackground)
ADD_SPRITE_TASK2(rightHand, hand)
ADD_SPRITE_TASK(rightHand)
}
void PixelManager::startFrame() const {